Bug 123933

Summary: Multiplying a floating Number from an Array calculates incorrectly
Product: WebKit Reporter: Robert <zoshe>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Major CC: ahmad.saleem792, ap, bfulgham, iseki.m.aa, rniwa, ysuzuki
Priority: P3    
Version: 528+ (Nightly build)   
Hardware: Mac (Intel)   
OS: OS X 10.8   
Attachments:
Description Flags
Test Results
none
Safari 15.6 matches with the browsers none

Description Robert 2013-11-06 15:16:02 PST
Created attachment 216231 [details]
Test Results

<script>
var aaa = {numFloat:.55};
var bbb = 100 - (aaa.numFloat * 100); //Should be 45. Not 44.99999999999999
var ccc = aaa.numFloat * 100; // Should be 55,. Not 55.00000000000001
</script>
Comment 1 Ahmad Saleem 2022-07-21 15:21:19 PDT
Created attachment 461126 [details]
Safari 15.6 matches with the browsers

As can be seen from attached screenshot, all browsers have same output. I think this can be marked as "RESOLVED INVALID" or "RESOLVED WONTFIX". Thanks!
Comment 2 Yusuke Suzuki 2022-07-21 15:30:24 PDT
This is the right behavior. IEEE 754 defines this result, and all JS numbers are double.