[webkit-reviews] review granted: [Bug 7748] toPrecision sometimes
messes up the last digit on intel Macs : [Attachment 7040]
fix by adding intPow10 function
bugzilla-request-daemon at opendarwin.org
bugzilla-request-daemon at opendarwin.org
Sun Mar 12 20:44:17 PST 2006
Darin Adler <darin at apple.com> has granted Darin Adler <darin at apple.com>'s
request for review:
Bug 7748: toPrecision sometimes messes up the last digit on intel Macs
http://bugzilla.opendarwin.org/show_bug.cgi?id=7748
Attachment 7040: fix by adding intPow10 function
http://bugzilla.opendarwin.org/attachment.cgi?id=7040&action=edit
------- Additional Comments from Darin Adler <darin at apple.com>
- e = static_cast<int>(log10(x));
+ e = static_cast<int>(trunc(log10(x)));
Why that change? Does trunc add value? Why trunc and not floor?
+ n = floor(x / tens);
Looks like there's a tab in the patch.
r=me
More information about the webkit-reviews
mailing list