Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65653 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 67081 invoked from network); 4 Feb 2013 21:18:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Feb 2013 21:18:00 -0000 Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.173 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.223.173 mail-ie0-f173.google.com Received: from [209.85.223.173] ([209.85.223.173:33812] helo=mail-ie0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8F/A0-63819-58520115 for ; Mon, 04 Feb 2013 16:17:57 -0500 Received: by mail-ie0-f173.google.com with SMTP id 9so6357992iec.32 for ; Mon, 04 Feb 2013 13:17:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=b6WlxcXUJNFG4lZ4+OQ7KbjnkZrD0qEj7izs4iWyGu4=; b=hzO48EJCCIWWrcNtMmbuBpi3nmoz09fNOYBsoMgPAz9v+hBcABLtbd0bnvxb2k9KT8 dqLy1+oj7g3DyZE8ZokBN69Z4j27almhyT7zwHVhK/fvWSAqR9D9+HaarE8/Mw+elI37 AIeRNNSRxWnRKsX1jqCd8kyUEY2zuMgA34Nch3aqVLQpAW9maejCra91TUrdOl1XLTzb N/oq6eR3v/dTZJ4sQW4zalsBEPc0aKlPS0CVmgkJKIbVDY2oxZOk6Oa9S1KM89UlQ0g6 a4q99cHD7bY8LPCZSK0Dj1RURV5qUAQzdtr23qhIm8o2tvIzSaW3QXm8ixUJLz5P17xD syHA== MIME-Version: 1.0 X-Received: by 10.50.195.232 with SMTP id ih8mr9070337igc.17.1360012673075; Mon, 04 Feb 2013 13:17:53 -0800 (PST) Received: by 10.50.106.138 with HTTP; Mon, 4 Feb 2013 13:17:52 -0800 (PST) In-Reply-To: References: Date: Mon, 4 Feb 2013 22:17:52 +0100 Message-ID: To: Levi Morrison Cc: internals Content-Type: multipart/alternative; boundary=14dae934125544cb5404d4eca037 Subject: Re: [PHP-DEV] PHP 5.4.11 tests: floating point diff From: tyra3l@gmail.com (Ferenc Kovacs) --14dae934125544cb5404d4eca037 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, Feb 4, 2013 at 9:50 PM, 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: > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > 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] > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > 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) > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > hi, you could use EXPECTREGEX ( http://qa.php.net/phpt_details.php#expectregex_section) with something like float\([\+\-]*0\) --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --14dae934125544cb5404d4eca037--