[PATCH] Sunbug 7131192: Optimize BigInteger.doubleValue(), floatValue() (original) (raw)

Louis Wasserman wasserman.louis at gmail.com
Thu Jul 12 09:32:49 UTC 2012


It was attached to the previous message? I don't know if this list works with attachments. Alternately, the patch was attached here: https://bugs.openjdk.java.net/show_bug.cgi?id=100222

I'm not sure what you mean by double-rounding bugs, though. It's not difficult to actually implement the HALF_EVEN rounding behavior with bit twiddling. That said, I did encounter places where prior erroneous behavior (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6358355) of Float.parseFloat caused my correct implementation to fail tests...

Louis Wasserman wasserman.louis at gmail.com http://profiles.google.com/wasserman.louis

On Thu, Jul 12, 2012 at 7:58 AM, Andrew Haley <aph at redhat.com> wrote:

On 07/11/2012 11:05 PM, Louis Wasserman wrote: > Doing it with bit-twiddling and Double.longBitsToDouble improves the speed > of those methods by something like two orders of magnitude in my benchmarks.

Mmm, but that's going to hit double-rounding bugs for large numbers. Where is this patch, anyway? Andrew.



More information about the core-libs-dev mailing list