UNPKG

972 BMarkdownView Raw
1<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
2
3# Function dotPow
4
5Calculates the power of x to y element wise.
6
7
8## Syntax
9
10```js
11math.dotPow(x, y)
12```
13
14### Parameters
15
16Parameter | Type | Description
17--------- | ---- | -----------
18`x` | number &#124; BigNumber &#124; Complex &#124; Unit &#124; Array &#124; Matrix | The base
19`y` | number &#124; BigNumber &#124; Complex &#124; Unit &#124; Array &#124; Matrix | The exponent
20
21### Returns
22
23Type | Description
24---- | -----------
25number &#124; BigNumber &#124; Complex &#124; Unit &#124; Array &#124; Matrix | The value of `x` to the power `y`
26
27
28## Examples
29
30```js
31math.dotPow(2, 3) // returns number 8
32
33const a = [[1, 2], [4, 3]]
34math.dotPow(a, 2) // returns Array [[1, 4], [16, 9]]
35math.pow(a, 2) // returns Array [[9, 8], [16, 17]]
36```
37
38
39## See also
40
41[pow](pow.md),
42[sqrt](sqrt.md),
43[multiply](multiply.md)