Re: RFR: 8341402: BigDecimal's square root optimization [v32]

2025-04-10 Thread duke
On Fri, 28 Mar 2025 18:24:49 GMT, fabioromano1 wrote: >> After changing `BigInteger.sqrt()` algorithm, this can be also used to speed >> up `BigDecimal.sqrt()` implementation. Here is how I made it. >> >> The main steps of the algorithm are as follows: >> first argument reduce the value to an i

Re: RFR: 8341402: BigDecimal's square root optimization [v32]

2025-04-10 Thread Raffaello Giulietti
On Fri, 28 Mar 2025 18:24:49 GMT, fabioromano1 wrote: >> After changing `BigInteger.sqrt()` algorithm, this can be also used to speed >> up `BigDecimal.sqrt()` implementation. Here is how I made it. >> >> The main steps of the algorithm are as follows: >> first argument reduce the value to an i

Re: RFR: 8341402: BigDecimal's square root optimization [v32]

2025-03-28 Thread fabioromano1
> After changing `BigInteger.sqrt()` algorithm, this can be also used to speed > up `BigDecimal.sqrt()` implementation. Here is how I made it. > > The main steps of the algorithm are as follows: > first argument reduce the value to an integer using the following relations: > > x = y * 10 ^ exp >