Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65652 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65750 invoked from network); 4 Feb 2013 21:16:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Feb 2013 21:16:58 -0000 Authentication-Results: pb1.pair.com header.from=glopes@nebm.ist.utl.pt; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=glopes@nebm.ist.utl.pt; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain nebm.ist.utl.pt from 193.136.128.21 cause and error) X-PHP-List-Original-Sender: glopes@nebm.ist.utl.pt X-Host-Fingerprint: 193.136.128.21 smtp1.ist.utl.pt Linux 2.6 Received: from [193.136.128.21] ([193.136.128.21:43619] helo=smtp1.ist.utl.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9E/50-63819-84520115 for ; Mon, 04 Feb 2013 16:16:57 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp1.ist.utl.pt (Postfix) with ESMTP id B12C2700043E; Mon, 4 Feb 2013 21:16:53 +0000 (WET) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at ist.utl.pt Received: from smtp1.ist.utl.pt ([127.0.0.1]) by localhost (smtp1.ist.utl.pt [127.0.0.1]) (amavisd-new, port 10025) with LMTP id RUR0ZFQywLSY; Mon, 4 Feb 2013 21:16:53 +0000 (WET) Received: from mail2.ist.utl.pt (mail.ist.utl.pt [IPv6:2001:690:2100:1::8]) by smtp1.ist.utl.pt (Postfix) with ESMTP id 600BE7000425; Mon, 4 Feb 2013 21:16:53 +0000 (WET) Received: from damnation.nl.lo.geleia.net (unknown [IPv6:2001:470:94a2:4:21d:baff:feee:cc0b]) (Authenticated sender: ist155741) by mail2.ist.utl.pt (Postfix) with ESMTPSA id 7857B2002E3A; Mon, 4 Feb 2013 21:16:52 +0000 (WET) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: internals , "Levi Morrison" References: Date: Mon, 04 Feb 2013 22:16:48 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Organization: =?utf-8?Q?N=C3=BAcleo_de_Eng=2E_Biom=C3=A9di?= =?utf-8?Q?ca_do_I=2ES=2ET=2E?= Message-ID: In-Reply-To: User-Agent: Opera Mail/12.12 (Linux) Subject: Re: [PHP-DEV] PHP 5.4.11 tests: floating point diff From: glopes@nebm.ist.utl.pt ("Gustavo Lopes") On Mon, 04 Feb 2013 21:50:23 +0100, Levi Morrison wrote: > 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. No, they are not the same thing for several purposes. For instance, they have different serializations. See also: $ php 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? > Check these: http://qa.php.net/write-test.php http://qa.php.net/phpt_details.php You can also inspect the file run-tests.php if you have any doubt. -- Gustavo Lopes