[Webkit-unassigned] [Bug 25645] SVG - numeric overflow for very large elements

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 6 09:29:58 PDT 2010


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





--- Comment #24 from Darin Adler <darin at apple.com>  2010-05-06 09:29:56 PST ---
(In reply to comment #23)
> (In reply to comment #22)
> > 2) The reason the original patch failed is that, although 2147483647 cannot be
> > represented exactly by float, the closest representable value of 2147483648
> > will not be obtained when building digit-by-digit using float.
> > 
> > This proposed patch uses double rather than float for building the
> > representation, which is then cast to float. While similar problems could also
> > occur with double, fixing that would require a complete overhaul of the number
> > parser.
> 
> Looks reasonable.

The same issue can exist with numbers at the extreme range of what double can
represent, and in the case of double using a larger floating point number is
not practical. One way to fix this is to build digit by digit in the opposite
direction after counting digits. This is what the constant
mantissaOverflowLowerBound and parseIntOverflow in JSGlobalObjectFunctions.h
are written to deal with. We might want to take a similar approach for float.

-- 
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