Skip to main content

* — Exponential / Exponent

Function. Hanzi: 幂 (冪). Ranks: 0 monadic, 0 0 dyadic

*Y: eY. Pervasive.

*0                ⍝ 1

X*Y: XY. Whole powers of integers give integers, and whole powers of rationals (ᵣ) give rationals. An integer power with a negative exponent is floored, as integer ÷ is:

2ₓ*3ₓ             ⍝ 8ₓ
2ₓ*¯3ₓ            ⍝ 0ₓ
¯2ₓ*¯3ₓ           ⍝ ¯1ₓ
2ᵣ*¯3ₓ            ⍝ 1ᵣ8

This holds under dynamic and static kinds and at every width. With a negative exponent, base 1ₓ gives 1ₓ, base ¯1ₓ gives 1ₓ or ¯1ₓ as the exponent is even or odd, and base 0ₓ gives the largest integer: i64’s under dynamic kinds, where integers widen, and the width’s own for fixed widths and under static kinds.

Other powers use principal complex branches where needed.

¯1*0.5            ⍝ 0j1

See also Power ⍣.

Inverse

*⁻ is ⊛. With the right argument fixed, (*↢X)⁻Y is Y*÷X.

2*⁻8      ⍝ 3
*↢2 ⁻ 9   ⍝ 3

Fast combinations

BPL computes this combination with a dedicated algorithm. Trains says which spellings BPL recognises.

Combination Applies to Benefit
¯1+*Y or (*Y)-1 real Y expm1 keeps the digits of a small Y that subtracting 1 from *Y cancels

On complex numbers, ¯1+*Y computes *Y, then subtracts 1.

f←¯1+* ◇ f 1E¯17         ⍝ 1ₑ¯17