Skip to content

A small, fast JavaScript library for arbitrary-precision decimal arithmetic.

License

Notifications You must be signed in to change notification settings

zhujun24/fuxk-calc

Repository files navigation

fuxk-calc npm package NPM downloads Dependency Status

A small, fast JavaScript library for arbitrary-precision decimal arithmetic.

Install

npm install fuxk-calc

Dev

grunt

How to use

let FuxkCalc = require('fuxk-calc');

let fuxkCalc = new FuxkCalc();

// add
console.log(fuxkCalc.add(13.3333, 1.8888888)); // 15.2221888

// subtract
console.log(fuxkCalc.subtract(13.3333, 1.8888888)); // 11.4444112
console.log(fuxkCalc.subtract(0.2, 0.3)); // -0.1

// multiply
console.log(fuxkCalc.multiply(0.3, 0.13)); // 0.039

// divide
console.log(fuxkCalc.divide(0.3, 0.2)); // 1.5

About

A small, fast JavaScript library for arbitrary-precision decimal arithmetic.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published