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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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: Wed May 15 08:01:34 2024 UTC