pow

Summary

Raises a number (base) to the specified power (exponent).

Signatures

Click on a signature to select it and view its documentation.

Usage

public static int pow(int base, int exponent)

Returns

The base raised to the power of the specified exponent.

Parameters

base

The base of the exponentiation operation.

exponent

The exponent to raise the base to.

Description

Raises a number (base) to the specified power (exponent).

Mathematically, this would be represented as baseexponent.

Examples

Basic Usage
1
2
3
4
import System;
 
// 2 to the 5th power
Console.log(Math.pow(2, 5)); // 32

Share

HTML | BBCode | Direct Link