pow

Compute the value of xn, where n is integral

  1. D pow(D x, T n)
    @IEEECompliant("pown", 42)
    D
    pow
    (
    D
    T
    )
    (
    auto const ref D x
    ,
    const T n
    )
    if (
    isDecimal!D &&
    isIntegral!T
    )
  2. auto pow(D1 x, D2 x)

Throws

InvalidOperationExceptionx is signaling NaN
DivisionByZeroExceptionx = ±0.0 and n < 0
OverflowExceptionresult is too big to be represented
UnderflowExceptionresult is too small to be represented
InexactExceptionresult is inexact

Special values

xnpow(x, n)
sNaNanyNaN
any0+1.0
NaNanyNaN
±∞any±∞
±0.0odd n < 0±∞
±0.0even n < 0+∞
±0.0odd n > 0±0.0
±0.0even n > 0+0.0

Meta