php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46868 NaN == NaN on Windows
Submitted: 2008-12-15 13:47 UTC Modified: 2008-12-15 13:52 UTC
From: sv4php at fmethod dot com Assigned:
Status: Not a bug Package: Math related
PHP Version: 5.2.8 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
48 - 9 = ?
Subscribe to this entry?

 
 [2008-12-15 13:47 UTC] sv4php at fmethod dot com
Description:
------------
NaN should never match NaN by definition, but on the Windows builds of 5.2.5, 5.2.6, and 5.2.8 (5.2.7 not tested) it's true.

Strong emphasis on Windows, as it's a Windows-only issue.

Reproduce code:
---------------
$a = acos(8); // returns NaN

var_dump($a == $a); // false on Linux (proper), true on Windows (wrong)

Expected result:
----------------
bool(false)

Actual result:
--------------
bool(true)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-12-15 13:52 UTC] pajoye@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

duplicate of #42143

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 16 00:01:33 2024 UTC