source: trunk/Source/WebKit/chromium/ChangeLog @ 122928

Revision 122928, 320.6 KB checked in by yosin@chromium.org, 2 years ago (diff)

Decimal::toString should not round integer value.
https://bugs.webkit.org/show_bug.cgi?id=91481

Reviewed by Kent Tamura.

Source/WebCore:

This patch makes Decimal::toString not to round an integer value
before converting string.

Tests: WebKit/chromium/tests/DecimalTest.cpp: DecimalTest.toString

  • platform/Decimal.cpp:

(WebCore::Decimal::toString): When the value is an integer, we don't
round coefficient to be DBL_DIG(15) digits because double can
represent an integer without rounding error.

Source/WebKit/chromium:

This patch adds a new test cases for Decimal::toString() for failed
value and maximum coefficient value with various exponent.

  • tests/DecimalTest.cpp:

(TEST_F): DecimalTest.toString: Add test cases for big coefficient values.

HTML preview not available, since the file size exceeds 262144 bytes. Try downloading the file instead.

Note: See TracBrowser for help on using the repository browser.