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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sv4php at fmethod dot com
New email:
PHP Version: OS:

 

 [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: Mon Apr 29 08:01:29 2024 UTC