basic-calculator
A basic calculator.
Features
- Basic Mathematic Operations (add, subtract, division, multiplication, modulus, square, square root, powers)
- Standard Deviation
- Population Standard Deviation
- Min (from array)
- Max (from array)
- Mode , Median, Mean
- Simple and Precision rounding
- Slope
- Calculate Percentages
- Random number generation between min/max
- Assertion Tests
Installation
npm install basic-calculator --save
Run Tests
npm test
Usage
var bc = ; // addbc;// 3 // subtractbc;//-1 // divisionbc;// 0.5 // multiplicationbc;// 6 // modulusbc;// 1 // powerbc;// 1024 // squarebc;// 25 // square root bc;// 7 // percentbc;// 20 // slopebc;// -1.2 // meanbc;// 5 // median (even length)bc;// [2,3] // median (odd length)bc;// 2 // mode (no ties)bc;// [3] // mode (with ties)bc;// [1,5] // max bc;// 90 // minbc;// 2 // round up bc;// 7 // round downbc;// 6 // round to specific number of decimalsbc;// 6.6 // standard deviation bc;// 3.0607876523260447 // population standard deviationbc;// 2.9832867780352594 // variance of standard deviation rounded to 4 digitsvar variance = bc;var rounded = bc;// 9.3684 // variance of population standard deviationbc;// 8.9 // random number between 10-100bc;// 55 // random number between defaults (1,10)bc;// 5