On Thu, 16 Oct 2025 19:36:46 GMT, fabioromano1 <[email protected]> wrote:
>> src/java.base/share/classes/java/math/BigDecimal.java line 2181:
>>
>>> 2179: * @param mc the context to use.
>>> 2180: * @return the {@code n}<sup>th</sup> root of {@code this}.
>>> 2181: * @throws ArithmeticException if {@code n == 0 || n ==
>>> Integer.MIN_VALUE}.
>>
>> Just out of curiosity, is there a technical reason for the restriction on
>> MIN_VALUE?
>
> Yes, `|Integer.MIN_VALUE|` is out of range of `int`s, so it cannot be used as
> a degree for `BigInteger.nthRoot(int)`.
I'm not sure I get your point: how come is`MIN_VALUE` out of `int` range?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27148#discussion_r2439488233