bignumeric
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Big numbers

This library handles the basic mathematics operation between 2 numbers. These numbers can be of large digits like 100 digits or can be 1 or 2 digit number. Number can be also be alpha numeric like base 16 or base 36 numbers. It also supports conversion from one numeral system to another.

Installation

NPM

npm i bignumeric

PNPM

pnpm i bignumeric

YARN

yarn add bignumeric

Quick Start

Import

import { Bignum, NumeralSystem } from 'bignumeric';

Usage

const num1 = Bignum.parse('234.67', NumeralSystem.Base10);
const num2 = Bignum.parse('42.077', NumeralSystem.Base10);

const sum = num1.add(num2);

console.log(sum.toString()); // 276.747

Note Check Bignum.md and NumeralSystem.md for more details

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Add your changes: git add .
  4. Commit your changes: git commit -m 'your commit message'
  5. Push to the branch: git push origin my-new-feature
  6. Submit a pull request 😎

Development

Local Development

pnpm install
pnpm build

Test

pnpm test

Readme

Keywords

none

Package Sidebar

Install

npm i bignumeric

Weekly Downloads

2

Version

1.0.0

License

UNLICENSED

Unpacked Size

179 kB

Total Files

10

Last publish

Collaborators

  • satyam-bhadoria