[Webkit-unassigned] [Bug 56829] REGRESSION (r81625): fast/css/percentage-non-integer.html fails on Windows

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 22 14:47:02 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=56829





--- Comment #7 from Rik Cabanier <cabanier at adobe.com>  2011-03-22 14:47:02 PST ---
(In reply to comment #6)
> Is there some way we can coerce MSVC into giving us better rounding behavior?

This is a 32bit intel rounding issue.
The FPU will always convert a 32 bit float of 80bit. This means that a value of 1.4 becomes 1.3999999997.
In this case the logic becomes:
1000*1.4f/100.0f -> 10000.0*1.3999997/100.0 -> 13.999997 -> (cast to int) 13

64 bit or MMX doesn't suffer this problem.
Setting/resetting the fpu precision should work around this issue but would result in slow code.
Adding a fudge factor would fix this issue as well as enforcing MMX...

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



More information about the webkit-unassigned mailing list