3.0.51 • Published 3 years ago

@talk2rajeev/simple-calculator v3.0.51

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

simple-calculator

GitHub issues

install

npm i @talk2rajeev/simple-calculator

How to Use

addition

import module from '@talk2rajeev/simple-calculator'

addition

addition takes multiple argument, all argument will be added together.

const { add, substract, multiply, divide } = module;

add(1,2) //Output: 3
add(1,2,3,4) //Output: 10

substract

substract takes multiple argument, all argument (except 1st) will be substrated from 1st one

substract(4,2) //output: 2

substract(10,2,1) //output: 7
Explanation: 10 -2 -1 = 7

Multiplication

multiply takes multiple argument, all argument will be multiplied together.

multiply(3,2) //output: 6

multiply(10,2,5) //output: 100
Explanation: 10 * 2 * 5 = 100

Division

division takes only 2 arguments

divide(8,2) //output: 4
divide(10,2) //output: 100

Power

power(2)(3) //output: 8
power(3)(4) //output: 81

Square Root

squareRoot(2); //Output: 1.4142135623730951
squareRoot(4); //Output: 2
squareRoot(9); //Output: 3

Cube Root

cubeRoot(3); //Output: 1.4422495703074083
cubeRoot(8); //Output: 2
cubeRoot(27); //Output: 3
3.0.4

3 years ago

3.0.3

3 years ago

3.0.2

3 years ago

3.0.5

3 years ago

3.0.51

3 years ago

3.0.1

3 years ago

2.1.0

3 years ago

3.0.0

6 years ago

2.0.0

6 years ago

1.0.0

6 years ago