On Wed, 2 Oct 2024 13:44:42 GMT, Raffaello Giulietti <rgiulie...@openjdk.org> 
wrote:

> Curiously, this one runs in a fraction of a second on the current 
> implementation, but not on the proposed one: 
> `BigDecimal.valueOf(100).sqrt(new MathContext(1_000_000, 
> RoundingMode.HALF_EVEN)).shortValue()`

@rgiulietti  This is because, in the current implementation, the check for even 
powers of 10 is always done, while in mine is done only if exact result is 
required.

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

PR Comment: https://git.openjdk.org/jdk/pull/21301#issuecomment-2389131197

Reply via email to