Added EulersTotientFunction function to the Maths Folder

This commit is contained in:
sandyboypraper
2020-12-14 00:33:55 +05:30
parent 74f9bfb8a8
commit ee749bde47
4 changed files with 41 additions and 2 deletions

View File

@@ -0,0 +1,11 @@
import { EulersTotientFunction } from '../EulersTotientFunction';
describe('eulersTotientFunction', () => {
it('is a function', () => {
expect(typeof EulersTotientFunction).toEqual('function')
})
it('should return the phi of a given number', () => {
const phiOfNumber = EulersTotientFunction(10)
expect(phiOfNumber).toBe(4)
})
})