chore: Add PowLogarithmic in Math (#836)

* Add PowLogarithmic in Math

* add description
This commit is contained in:
YATIN KATHURIA
2021-11-19 10:40:51 +05:30
committed by GitHub
parent 65931be0f8
commit c1c895bebd
2 changed files with 41 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
import { powLogarithmic } from '../PowLogarithmic'
describe('PowLogarithmic', () => {
it('should return 1 for numbers with exponent 0', () => {
expect(powLogarithmic(2, 0)).toBe(1)
})
it('should return 0 for numbers with base 0', () => {
expect(powLogarithmic(0, 23)).toBe(0)
})
it('should return the base to the exponent power', () => {
expect(powLogarithmic(24, 4)).toBe(331776)
})
})