1.3.3 โ€ข Published 3 years ago

huge-num v1.3.3

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Huge Numbers

A npm package to apply math ๐Ÿ”ข operations on huge numbers (unlimited length ๐Ÿ˜‰)

Version Downloads License Coverage Status

Features:

  • Numbers size limit:
    • unlimited
  • Math operators:
    • Sum (+)
    • Multiply (ร—)

Usage:

HugeNum can be used in node.js

Install HugeNum using npm:

npm install huge-num

Then you can define a huge number using a string

import HugeNum from 'huge-num';

const NUMBER_1 = "12213345674890";
const NUMBER_2 = "564564574982348";

let n1 = HugeNum(NUMBER_1);
let n2 = HugeNum(NUMBER_2);

Then you can use the operators on a huge number

huge_number_1.sum(huge_number_2)

const summation = n1.sum(NUMBER_2);
console.log(NUMBER_1 + ' + ' + NUMBER_2 + '=', summation);
// result -> 12213345674890 + 564564574982348= 576777920657238

huge_number_1.multiply(huge_number_2)

const multiply = n1.multiply(NUMBER_2);
console.log(NUMBER_1 + ' *+* ' + NUMBER_2 + '=', multiply);
// result -> 12213345674890 * 564564574982348= 6895222310056771043896841720

Documentation:

Contributors

To contribute, just fork the project, make some changes, and submit a pull request.

License

This project is public domain. For more details, read about the Unlicense.

Developer:

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago