Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65650 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62330 invoked from network); 4 Feb 2013 20:50:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Feb 2013 20:50:27 -0000 Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.173 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.214.173 mail-ob0-f173.google.com Received: from [209.85.214.173] ([209.85.214.173:60161] helo=mail-ob0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 65/82-48414-11F10115 for ; Mon, 04 Feb 2013 15:50:26 -0500 Received: by mail-ob0-f173.google.com with SMTP id dn14so6897482obc.32 for ; Mon, 04 Feb 2013 12:50:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:date:x-google-sender-auth:message-id :subject:from:to:content-type; bh=kHgoln0fQLWU/htmfLACRUlhrv7GYi41pCUyFeKPags=; b=NxmoEztC1CzsRnk6lGRf/WYM+4wAHJTP18eUl4k0yO7vC1FwY0XBOyikIUWkotfTov f5Yn+utUFN+79MqhCi5T/X0b/qnKbmiv0LkVfbLM8V5ar9US7TZbt7AFYoiSPEmyy6RG vdunpyFxAaZCBK1s2/OMdg203NXHUA7nIPyu4nPDBckqhgOtxBhlF8izcZ/iFsTOZt8y LrrauIRHbttvveAAx1ilqc0roP1P0gIXh2mmYJS8fW+nioXML+8ViwfJNE/z3LuRKMfw 7DDhfbC3pYz2IUbuediR+H6F6E0pGXequkkxPFLH5t4TWIKijVEonorUzmBQD7FM6orZ uwRg== MIME-Version: 1.0 X-Received: by 10.182.192.70 with SMTP id he6mr16232676obc.99.1360011023185; Mon, 04 Feb 2013 12:50:23 -0800 (PST) Sender: morrison.levi@gmail.com Received: by 10.76.96.236 with HTTP; Mon, 4 Feb 2013 12:50:23 -0800 (PST) Date: Mon, 4 Feb 2013 13:50:23 -0700 X-Google-Sender-Auth: aIjhnpGUmU_bfkKABSCHYfnHzQg Message-ID: To: internals Content-Type: text/plain; charset=ISO-8859-1 Subject: PHP 5.4.11 tests: floating point diff From: levim@php.net (Levi Morrison) I have been compiling PHP under various compilers trying to figure out what flags I need for each compiler to pass all tests excluding XFAILs. With Intel 13.0.1 I'm down to two failing tests: ===================================================================== FAILED TEST SUMMARY --------------------------------------------------------------------- Test fmod() - basic function test fmod() [ext/standard/tests/math/fmod_basic.phpt] Test fmod function : 64bit long tests [ext/standard/tests/math/fmod_basiclong_64bit.phpt] ===================================================================== The only differences are between -0 and 0 (exact diffs at end of message). My understanding of floating point calculations is that -0 and 0 are equivalent, so I can safely ignore the failures. I wanted to first check to make sure that is actually true. Assuming that the above is correct, I wanted to patch the phpt files for the tests to pass. However, I'm not very familiar with that format. How would you suggest altering the tests to make this pass? ---------- cat ext/standard/tests/math/fmod_basic.diff 016+ float(0) 017+ float(0) 016- float(-0) 017- float(-0) 020+ float(0) 021+ float(0) 022+ float(0) 020- float(-0) 021- float(-0) 022- float(-0) 026+ float(0) 026- float(-0) cat ext/standard/tests/math/fmod_basiclong_64bit.diff 026+ float(0) 026- float(-0) 028+ float(0) 028- float(-0) 040+ float(0) 040- float(-0) 042+ float(0) 042- float(-0) 044+ float(0) 044- float(-0) 070+ float(0) 070- float(-0) 072+ float(0) 072- float(-0) 084+ float(0) 084- float(-0) 114+ float(0) 114- float(-0) 116+ float(0) 116- float(-0) 128+ float(0) 128- float(-0) 158+ float(0) 158- float(-0) 160+ float(0) 160- float(-0) 290+ float(0) 290- float(-0) 292+ float(0) 292- float(-0) 304+ float(0) 304- float(-0) 306+ float(0) 306- float(-0) 308+ float(0) 308- float(-0) 312+ float(0) 312- float(-0) 314+ float(0) 314- float(-0) 326+ float(0) 326- float(-0) 328+ float(0) 328- float(-0) 330+ float(0) 330- float(-0)