RFR: 8366478: BigDecimal roots [v25]
Raffaello Giulietti
rgiulietti at openjdk.org
Mon Oct 27 20:58:12 UTC 2025
On Mon, 27 Oct 2025 20:47:52 GMT, fabioromano1 <duke at openjdk.org> wrote:
>> src/java.base/share/classes/java/math/BigDecimal.java line 2169:
>>
>>> 2167: * {@code ZERO}, {@code ZERO.rootn(n, mc).equals(ZERO)} is true with
>>> 2168: * any {@code MathContext} as an argument.
>>> 2169: * </ul>
>>
>> Why does ZERO deserves a discussion as a special case? Isn't ZERO already covered by the general contract?
>
> Simply to mimic `sqrt()` spec, no particular reason.
I reviewed the CSR. If you have nothing to add/modify you can "finalize" it, hence moving it to "finalized".
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27148#discussion_r2467057476
More information about the core-libs-dev
mailing list