[Webkit-unassigned] [Bug 49782] New: 255 stepUp()s for step=0.00392156863 is not 1.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 18 19:56:09 PST 2010


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

           Summary: 255 stepUp()s for step=0.00392156863 is not 1.
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: dmikurube at google.com


How to reproduce:
1. <input type="number" min="0" value="0" step="0.00392156863" />
2. stepUp() for 255 times.

Expected:
1 (from an example at HTML5 spec. : 4.10.7.2.11 The step attribute)

Actual:
1.00000000065


Discussed at the bug 48976.

Hints:
I found we can calculate it if completely using IEEE 754 single precision numbers.
Re-considering precisions in calculation and printing may help.

Another option:
Re-consider the spec.

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