Function pow

Source
pub fn pow(a: Real, b: Real) -> Real
Expand description

Raises a value to a power.

This function computes a raised to the power of b (a^b). It handles various special cases and edge conditions:

  • 0^0 = 1 (by mathematical convention)
  • Negative base with non-integer exponent returns NaN
  • Very large exponents that would cause overflow return infinity
  • Very small values that would cause underflow return 0

§Parameters

  • a - Base value
  • b - Exponent

§Returns

The value of a raised to the power of b.