Skip to content

Support negative and fractional exponents in Decimal.^ #9565

@GregoryTravis

Description

@GregoryTravis

Decimal.^ (aka pow) only supports positive integral values for the exponent. From the BigDecimal javadocs:

public pow(int n)
Returns a BigDecimal whose value is (this^n), The power is computed exactly, to unlimited precision.
The parameter n must be in the range 0 through 999999999, inclusive. ZERO.pow(0) returns ONE. Note that future releases may expand the allowable exponent range of this method.

Since they have not yet expanded the range of this method, this task is to allow it to taken arbitrary Decimal, subject to restrictions on the range of BigDecimal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    -libsLibraries: New libraries to be implementedp-lowLow priority

    Type

    No type

    Projects

    Status

    ❓New

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions