On Mon, 29 Sep 2025 16:12:20 GMT, fabioromano1 <[email protected]> wrote:

>> A formula to lower the overestimate for the precision of an exact quotient, 
>> without introducing too expensive operations of division on numerator and 
>> denominator.
>
> fabioromano1 has updated the pull request incrementally with two additional 
> commits since the last revision:
> 
>  - Simplification
>  - Update DivideTests.java

src/java.base/share/classes/java/math/BigDecimal.java line 4294:

> 4292:         }
> 4293: 
> 4294:         return BigInteger.TEN.pow(n);

Suggestion:

        return fiveTo(n).shiftLeft(n);

@rgiulietti  I had thought about replacing the instruction on L. 4294 with the 
one above, but the `AddTests.java` of `BigDecimal` tests raises a timeout error.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27271#discussion_r2398167757

Reply via email to