# hotspot-dev Digest, Vol 128, Issue 13

David Holmes david.holmes at oracle.com
Thu Dec 7 02:54:59 UTC 2017

```"A Z" you already basically asked this in your "Java SE Maths questions"
please never use the subject "hotspot-dev Digest, Vol XXX, Issue NN" -

Thank you.
David

On 7/12/2017 12:04 PM, A Z wrote:
> These are Java SE questions.
>
> -Is it likely that JEP 306 could be updated in a Java update, earlier?
> Apart from the assertion 'will not fix', accurate floating point
> is a massive requirement.  It isn't very possible to do within-range
> float or double multiplies, divides, powers, roots, or even things
> in other classes like obtaining the distances between two points
> (in Java2D and Java3D).
>
> -Could there be a BigDecimal version of StrictMath
> being put in to the standard libraries, under Java's own umbrella,
> and not as someone else's separate library?
>
>
> 'Consider the square root function on the interval [1, 2), that is the
> half-open region that includes 1 but does not include 2. This
> corresponds to the floating-point numbers with an exponent of 0. There
> are 2^52 floating-point values with this exponent. Mathematically,
> sqrt(1) = 1 and sqrt(2) ~= 1.414... Therefore, in floating-point, for
> values 1.0 <= x < 2.0, the result of sqrt(x) also has an exponent of 0.
> Now we see that there are 2^52 floating-point values with an exponent of
> 0 and taking a square root of those values will only yield about 0.414 *
> 2^52 distinct answers. Therefore, we see that using a fixed
> floating-point precision, the square root function on [1.0, 2.0)
> *cannot* be inverted losslessly since only a minority of the input