1023 B

Function epow

Calculates the power of x to y element wise.

Syntax

math.epow(x, y)

Parameters

Parameter Type Description
x Number | BigNumber | Boolean | Complex | Unit | Array | Matrix The base
y Number | BigNumber | Boolean | Complex | Unit | Array | Matrix The exponent

Returns

Type Description
Number | BigNumber | Complex | Unit | Array | Matrix The value of x to the power y

Examples

var math = mathjs();

math.epow(2, 3);              // returns Number 8

var a = [[1, 2], [4, 3]];
math.epow(a, 2);              // returns Array [[1, 4], [16, 9]]
math.pow(a, 2);               // returns Array [[9, 8], [16, 17]]

See also

pow, sqrt, multiply