RFR: 8366478: BigDecimal roots [v9]
Raffaello Giulietti
rgiulietti at openjdk.org
Fri Oct 24 17:06:41 UTC 2025
On Fri, 24 Oct 2025 10:35:20 GMT, fabioromano1 <duke at openjdk.org> wrote:
>> An implementation of `BigDecimal.nthRoot(int, MathContext)`.
>
> fabioromano1 has updated the pull request incrementally with one additional commit since the last revision:
>
> Correct call to rootn() in sqrt()
For n > 0 the spec speaks about 0.5 ulp and 1 ulp, but not about correct rounding, which is slightly more restrictive, as it includes a direction (up, down, to-even, etc.).
If the implementation already returns the correctly rounded result when n > 0, then the spec could be more precise.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27148#issuecomment-3444101040
More information about the core-libs-dev
mailing list