dtt.js
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Dtt.js

Installation

pnpm add https://github.com/JustAWaifuHunter/dtt.js

Example

const { Biggest, BigMath } = require("dtt.js");

function fibonacci(size) {
  let a = new Biggest(0),
    b = new Biggest(1);

  for (let i = BigInt(1); i < size; i++) {
    [a, b] = [b, a.add(b)];
  }

  return a;
}

console.log(fibonacci(BigInt(10)).isReallyBiggest()); // false

console.log(fibonacci(BigMath.pow(10, 4)).isReallyBiggest()); // true

Package Sidebar

Install

npm i dtt.js

Weekly Downloads

2

Version

1.0.0

License

ISC

Unpacked Size

46.3 kB

Total Files

11

Last publish

Collaborators

  • lrd_7