bcpow()
function bcpow(string $num, string $exponent, ?int $scale = null): string
Raises an arbitrary-precision decimal number to an integral power.
Parameters:
$num(string)$exponent(string)$scale(?int), defaultnull, optional
Returns: string
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported — declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/math/bcpow.rs).
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how bcpow is implemented in the compiler, see the internals page.