« Return to Thread: [Bug 43940] [PATCH] Faster method for double formatting

[Bug 43940] [PATCH] Faster method for double formatting

by Bugzilla from bugzilla@apache.org :: Rate this Message:

| View in Thread

https://issues.apache.org/bugzilla/show_bug.cgi?id=43940

Julien Aymé <julien.ayme@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #28850|0                           |1
        is obsolete|                            |

--- Comment #43 from Julien Aymé <julien.ayme@...> ---
Created attachment 28855
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28855&action=edit
patch for both class and test case (DoubleFormatUtil.java and
DoubleFormatUtilTest.java)

Added test case for limit conditions, and fixed DoubleFormatUtil accordingly.

There was a bug in the private format(StringBuffer, ...) method, when checking
against tenPow(scale) if scale >= 19 (since 10^19 > Long.MAX_VALUE).
There was also a bug in formatDoublePrecise when trying to reconstruct the full
decimal part from the scientific representation, when decLength < digits.

Again, the tests at limits showed these bugs, and I fixed them.

--
You are receiving this mail because:
You are the assignee for the bug.

 « Return to Thread: [Bug 43940] [PATCH] Faster method for double formatting