[webkit-reviews] review requested: [Bug 15145] (0.999).toPrecision(1) returns incorrect result. : [Attachment 16331] Patch to fix Number.toPrecision rounding

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 19 19:04:46 PDT 2007

Jason Foreman <jason at threeve.org> has asked  for review:
Bug 15145: (0.999).toPrecision(1) returns incorrect result.

Attachment 16331: Patch to fix Number.toPrecision rounding

------- Additional Comments from Jason Foreman <jason at threeve.org>
This is my first WebKit patch; started with something relatively small and
easy.  I welcome any and all input.

The problem seemed to be that when attempting to determine the best value for
n, the property n<intPow10(p) was broken and thus strange results were
returned.  I hope the way I correct this is acceptable.

More information about the webkit-reviews mailing list