[Webkit-unassigned] [Bug 15445] New: NaN is not converted correctly from Math functions

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 9 17:54:36 PDT 2007


http://bugs.webkit.org/show_bug.cgi?id=15445

           Summary: NaN is not converted correctly from Math functions
           Product: WebKit
           Version: 522+ (nightly)
          Platform: PC
        OS/Version: Windows Server 2003
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: korisu at gmail.com


Running Safari (Windows) 3.0.3 v 522.15.5.

Try these in the address bar:
javascript:var x = Math.sqrt(-1); alert(x || "fallback value")
javascript:var x = Math.pow(-1, .5); alert(x || "fallback value")
javascript:var x = NaN; alert(x || "fallback value")

Local behavior: In Safari, alerts "NaN" for the first two, and "fallback value"
for the third. Alerts "fallback value" (expected behavior) in IE6/7, Firefox
2.0.0.7 and Opera 9.23. The same behavior happens with an explicit alert(x ? x
: "fallback value").

NaN should always convert to Boolean false; it seems that the Math functions
are at fault here.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list