Java float, double, StrictMath correction?

Joseph D. Darcy joe.darcy at oracle.com
Wed Mar 16 21:01:07 UTC 2022


On 3/15/2022 6:11 PM, A Z wrote:
[snip]
>
>
> Raffaello has said:
>
> 'Exact representation of 0.1 using base 2 is mathematically impossible,
>
> no matter the language (it is a periodic number in base 2).'
>
>
> Consideration of the article:
>
> https://people.eecs.berkeley.edu/~wkahan/JAVAhurt.pdf
>
>
> Which is admittedly older, but still accurate, indicates otherwise.

As the co-author of the article in question, I am familiar with its contents and the article does not question 1/10 being a repeating fraction in binary.

For comments on both the technical floating-point matters raised and style of discourse, I refer interested readers to a previous email on core-libs-dev:

     http://mail.openjdk.java.net/pipermail/core-libs-dev/2018-March/051952.html

-Joe



More information about the core-libs-dev mailing list