[Webkit-unassigned] [Bug 80009] Setting '0.6' to the value of a range input makes the value 0.6000000000000001
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Mar 16 03:41:05 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=80009
--- Comment #2 from Kent Tamura <tkent at chromium.org> 2012-03-16 03:41:05 PST ---
(In reply to comment #1)
> This issue looks to be because of wrong step factor representation in double value. Here step factor is "0.1" when it is converted from string to double it is represented as "0.10000000000000001".
>
> Can anyone please confirm whether it is related to representation error mentioned here http://www.network-theory.co.uk/docs/pytut/RepresentationError.html.
Yeah, this is caused by the representation error in IEEE754.
We should update RangeInputType::sanitizeValue() like:
If proposedValue satisfies min/max/step restrictions,
return proposedValue
return serializeForNumberType(StepRange(element()).clampValue(proposedValue));
--
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