---
id: math-pow
name: Math.pow
category: math
kind: namespace-method
tokens: Math.pow
sig: Math.pow(base, exp) -> fixed
tip: base raised to a fixed exponent.
order: 31
ns: Math
member: pow
---
Returns baseexp for base > 0 and any fixed exp, computed in Q16.16 as 2exp·log₂base — so non-integer exponents work (Math.pow(x, 0.5) is a square root, though Math.sqrt is cheaper and exact) and it stays bit-identical on every platform. Use it for gameplay curves that need a tunable exponent: damage falloff, easing shaped by a designer-set power, or compound-growth economies. Keep the result inside the fixed range (magnitudes below 32768); combinations that exceed it saturate.
```ludic
program Demo {
handler Step phase Update {
let falloff = Math.pow(0.9, distance) # each unit keeps 90% of the effect
}
}
```