MCPcopy Create free account
hub / github.com/arguiot/TheoremJS / pow

Method pow

__test__/theorem.js:108–117  ·  view source on GitHub ↗
(n, base)

Source from the content-addressed store, hash-verified

106 return new BigNumber(this.ln(x, n).div(this.ln(base, n)).toFixed(n - 1))
107 }
108 pow(n, base) {
109 if (typeof n != 'object' || BigNumber.isBigNumber(n)) {
110 n = [n]
111 }
112 let result = []
113 for (var i = 0; i < n.length; i++) {
114 result.push(new BigNumber(Math.pow(new BigNumber(n[i]).toNumber(), new BigNumber(base).toNumber()).toFixed(10)))
115 }
116 return result.length == 1 ? result[0] : new BigNumber(result)
117 }
118 root(n, base) {
119 if (typeof n != 'object' || BigNumber.isBigNumber(n)) {
120 n = [n]

Callers 15

sigmoidMethod · 0.95
roundMethod · 0.95
findRoots.jsFile · 0.45
correlation.jsFile · 0.45
round.jsFile · 0.45
gamma.jsFile · 0.45
pow.jsFile · 0.45
root.jsFile · 0.45
ln.jsFile · 0.45
sigmoid.jsFile · 0.45
gammaMethod · 0.45
lnMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected