Big discrete integer library
There are plenty of big number implementations, even a node-native one these days. What I found missing was a library to handle discrete integers and logic, basically having a large fixed-with integer implementation.
npm install --save bigdesc
const BigDesc = require('bigdesc');
Initializes a new bigdesc entity, optionally with a numerical value.
Formats the value of the bigdesc instance to a string with the given format.
Returns a new bigdesc instance with all bits in it's value inverted.
Returns a new bigdesc instance with the given value added to the original value.
Returns a new bigdesc instance with the given value subtracted from the original value.
Returns a boolean true if the value held equals zero. If not, this method returns a boolean false.
Returns a boolean true if the value held is negative. If not, this method returns a boolean false.
Returns a boolean true if the value held is positive. If not, this method returns a boolean false.
Returns a boolean true if the value held is larger than the given value. If not, this method returns a boolean false.
Returns a boolean true if the value held is smaller than the given value. If not, this method returns a boolean false.
Returns a booelan true if the value held matches the given value. If not, this method returns a boolean false.
Returns a boolean true if the value held is larger or equal to the given value. If not, this method returns a boolean false.
Returns a boolean true if the value held is smaller or equal to the given value. If not, this method returns a boolean false.