Logo

Programming-Idioms

# 336 Exponent
Compute x = b

b raised to the power of n is equal to the product of n terms b × b × ... × b
New implementation

Be concise.

Be useful.

All contributions dictatorially edited by webmasters to match personal tastes.

Please do not paste any copyright violating material.

Please try to avoid dependencies to third-party libraries and frameworks.

Other implementations
Value := Base ** Exponent;
final x = b ** n;
x = b ** n
x = b ^ n
x = b ** n
import static java.lang.Math.pow;
double x = pow(b, n);
X := Power(B, N);
$x = $b**$n;
x = b ** n
Math::E ** (1i * Math::PI) + 1
let x = b.pow(n)