add: Pow(x, n)

This commit is contained in:
2020-05-11 13:15:10 +08:00
parent 02a4031bd6
commit 36b0434402
4 changed files with 40 additions and 6 deletions

7
test/math/powx-n.test.js Normal file
View File

@ -0,0 +1,7 @@
import { myPow } from '../../src/math/powx-n'
test('Pow(x, n)', () => {
expect(myPow(2.00000, 10)).toBe('1024.00000')
expect(myPow(2.10000, 3)).toBe('9.26100')
expect(myPow(2.00000, -2)).toBe('0.25000')
})