← All docs

bcpow()

Raises an arbitrary-precision decimal number to an integral power.

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), default null, optional

Returns: string

Availability

No examples yet — check examples/ and showcases/ for usage patterns.

Internals

For how bcpow is implemented in the compiler, see the internals page.