README
A BigInt can represent whole numbers larger than 2⁵³ - 1.
📦 NPM,
😺 GitHub,
🏃 RunKit,
🌔 Minified,
📜 Files,
📰 JSDoc,
📘 Wiki.
Stability: Experimental.
const bigint = require("extra-bigint");
// import * as bigint from "extra-bigint";
// import * as bigint from "https://unpkg.com/extra-bigint@0.0.60/index.mjs"; (deno)
bigint.log2(10n);
bigint.log2(11n);
bigint.log2(12n);
// 3
Index
Name | Action |
---|---|
is | Checks if value is a BigInt. |
isPrime | Checks if value is prime. |
floorDiv | Gives value ≤ x/y. |
ceilDiv | Gives value ≥ x/y. |
abs | Gives absolute value. |
sign | Gives sign of value. |
rem | Gets remainder of x/y with sign of x (truncated division). |
mod | Gets remainder of x/y with sign of y (floored division). |
modp | Gets remainder of x/y with +ve sign (euclidean division). |
sqrt | Gives square root of value. |
cbrt | Gives cube root of value. |
root | Gives nth root of value. |
hypot | Gives length of hypotenuse. |
log2 | Gives base-2 logarithm of value. |
log10 | Gives base-10 logarithm of value. |
min | Gives smallest value. |
max | Gives largest value. |
range | Gives smallest and largest value. |
lcm | Gives least common multiple of values. |
gcd | Gives greatest common divisor of values. |
hcf | Gives highest common factor of values. |
sum | Gives sum of values (Σ). |
product | Gives product of values (∏). |
arithmeticMean | Gives arithmetic mean of values. |
geometricMean | Gives geometric mean of values. |
harmonicMean | Gives harmonic mean of values. |
cubicMean | Gives cubic mean of values. |