Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Light, ultra-fast javascript implementation for BigIntegers (base arithmetic operations)
BigNumber.js is a light javascript library for node.js and the browser. It supports arithmetic operations on Big Integers.
It is build with performance in mind, uses the fastest algorithms and supports all basic arithmetic operations (+, -, *, /, %, ^, abs). Works with both positive and negative big integers.
: (http://alexbardas.github.io/bignumber.js/)
Install: npm install
Test: npm test
Usage:
var BigNumber = require('big-number');
BigNumber(5).plus(97).minus(53).plus(434).multiply(5435423).add(321453).multiply(21).div(2).pow(2);
// 760056543044267246001
<script src ="big-number.js"></script>
n(5).plus(97).minus(53).plus(434).multiply(5435423).add(321453).multiply(21).div(2).pow(2);
// 760056543044267246001
Supported methods: add/plus
, minus/subtract
, multiply/mult
, divide/div
, power/pow
, mod
, equals
,
lt
, lte
, gt
, gte
, isZero
, abs
BigNumber(2).plus(10); // or
BigNumber(2).add(10);
BigNumber(2).minus(10); // or
BigNumber(2).subtract(10);
BigNumber(2).multiply(10); // or
BigNumber(2).mult(10);
BigNumber(2).divide(10); // or
BigNumber(2).div(10);
BigNumber(53).mod(14);
BigNumber(2).power(10); // or
BigNumber(2).pow(10);
FAQs
Light, ultra-fast javascript implementation for BigIntegers (base arithmetic operations)
The npm package big-number receives a total of 71,895 weekly downloads. As such, big-number popularity was classified as popular.
We found that big-number demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.