Raises the decimal value to the specified power.


func NSDecimalPower(_ result: UnsafeMutablePointer<Decimal>, _ number: UnsafePointer<Decimal>, _ power: Int, _ roundingMode: NSDecimalNumber.RoundingMode) -> NSDecimalNumber.CalculationError


Raises number to power, possibly rounding off according to roundingMode, and stores the resulting value in result.

For explanations of the possible return values and rounding modes, see NSDecimalAdd(_:_:_:_:).

For more information, see Number and Value Programming Topics.

See Also

Performing Arithmetic Using References

func NSDecimalCompact(UnsafeMutablePointer<Decimal>)

Compacts the decimal structure for efficiency.

typealias Decimal.RoundingMode

An alias for an enumeration that specifies possible rounding modes.

enum NSDecimalNumber.RoundingMode

These constants specify rounding behaviors.

typealias Decimal.CalculationError

An alias for a type that specifies possible calculation errors.