On Mon, 27 Oct 2025 05:03:29 GMT, Joe Darcy <[email protected]> wrote:
> > I'm also wondering if we should restrict n to |n| ≤ 999'999'999, as in > > pow(). This would allow users of BigDecimal to implement corrective > > actions, as in the schema above, by themselves. > > The pow limit was a carry-over some another language environment where an > earlier version of this decimal support for implemented. I don't regard it as > a strong precedent for us to follow here is we can have a very-wide range of > n without much difficulty. I would suggest removing that restriction from `BigDecimal.pow()` altogether, as `BigInteger.pow()` already performs check for overflow. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27148#issuecomment-3450728851
