1.0.12 • Published 7 years ago

string-calc v1.0.12

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

string-calc – a JavaScript library for string-encoded integers

Getting Started

npm i string-cal -S

Then, call from your file:

const stringCalc = require('string-calc');

console.log(stringCalc.mul("3403","3232345")  // "10999670035"

This library lets you work with arbitrarily large integers, by storing them in strings. The focus has been on ease of understanding, not on performance. This library should still be useful for applications where performance isn’t critical, but you need to work with large integers.

The following operations are available:

  • lt(x, y): is x < y (“less than”)?
  • le(x, y): is x ≤ y (“less or equal”)?
  • gt(x, y): is x > y (“greater than”)?
  • ge(x, y): is x ≥ y (“greater or equal”)?
  • eq(x, y): is x = y (“equals”)?
  • add(x, y)
  • sub(x, y)
  • mul(x, y)
  • div(x, y)
  • abs(x)
  • isNegative(x)
  • isPositive(x)
  • negate(x)
1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago