add: Pow(x, n)

This commit is contained in:
yige committed 2020-05-11 17:06:20 +08:00
1 parent 02a4031bd6
commit 36b0434402
4 files changed
+40 -6

No files matched your search

+7
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')
})