awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
MikeMcl avatar

MikeMcl/bignumber.js

0
View on GitHub↗
7,004 stars·753 forks·JavaScript·MIT·6 viewsmikemcl.github.io/bignumber.js↗

Bignumber.js

bignumber.js is an arbitrary-precision JavaScript library designed to perform mathematical operations on decimals and integers that exceed the limits of standard floating-point numbers. It functions as a decimal arithmetic engine and a math library for calculating square roots, powers, and modular exponentiation.

The project provides a base conversion utility capable of parsing and translating numeric values between any base from 2 to 36. It also includes a numeric formatting tool for rendering high-precision values into localized strings with custom separators and notation styles.

The library covers a broad range of capabilities, including arbitrary precision arithmetic, configurable rounding rules, and high-precision value comparisons. It also provides tools for decimal to fraction conversion and cryptographically secure random number generation.

Features

  • Arbitrary Precision Arithmetic - Executes addition, subtraction, multiplication, and division on numbers exceeding standard floating-point limits.
  • Decimal Rounding Utilities - Adjusts numbers to a specific count of decimal places or significant digits using modes like floor or half-even.
  • Base Conversion Utilities - Includes functions for transforming numbers between different numerical bases from 2 to 36.
  • Digit-Array Arithmetic - Performs mathematical operations by manipulating individual digits in an array to simulate manual long-form calculation.
  • Financial Numeric Precision - Handles money and currency values with strict rounding rules and fixed decimal precision to avoid floating-point errors.
  • Exact Value Comparisons - Determines if one number is equal to, greater than, or less than another using exact high-precision comparison.
  • Precision-Tolerant Comparisons - Determines equality or magnitude by comparing digit sequences and exponents instead of using native numeric operators.
  • High-Precision Number Initialization - Initializes high-precision numbers from strings, native numbers, or other bases using exponential notation and separators.
  • JavaScript Math Libraries - Provides a comprehensive set of functions for square roots, powers, and modular exponentiation using arbitrary precision.
  • Numerical Base Conversions - Implements a comprehensive system for parsing and translating numeric values between any base from 2 to 36.
  • Rounding Modes - Applies specific mathematical modes like floor or half-even to truncate high-precision results to a defined scale.
  • Precision Arithmetic - Executes high-precision addition, subtraction, multiplication, and division with configurable rounding modes.
  • String-Based Numeric Storage - Stores numbers as strings of digits to bypass the precision limits and overflow of native floating-point types.
  • Numeric String Extractors - Extracts numeric values from strings containing non-numeric characters such as currency symbols or group separators.
  • Arbitrary Base Conversion - Translates numbers between different bases from 2 to 36, including binary, octal, and hexadecimal representations.
  • Base-Agnostic Numeric Parsing - Processes numeric values in any base from 2 to 36 using a customizable alphabet.
  • Calculation Precision Configurations - Defines global or instance rules for decimal precision, rounding modes, and exponential notation thresholds.
  • Exponential Operations - Provides calculations for square roots, powers with modular exponentiation, and modulo remainders.
  • Localized Numeric Formatting - Converts large or precise numbers into localized strings with custom separators and notation styles.
  • Numeric Data Formatting - Converts raw high-precision numeric values into human-readable strings using localized separators and notation styles.
  • Rational Approximations - Implements algorithms to find the best rational approximation of a decimal value given a denominator limit.
  • Cryptographic Random Number Generators - Produces high-entropy pseudo-random values for security-sensitive applications using cryptographically-secure methods.
  • Numeric Formatting - Provides logic for applying visual separators, localized fixed-point notation, and internationalization patterns to high-precision numbers.
  • Numeric and Math Utilities - Arbitrary-precision decimal and non-decimal arithmetic.

Star history

Star history chart for mikemcl/bignumber.jsStar history chart for mikemcl/bignumber.js

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Open-source alternatives to Bignumber.js

Similar open-source projects, ranked by how many features they share with Bignumber.js.
  • mikemcl/decimal.jsMikeMcl avatar

    MikeMcl/decimal.js

    7,205View on GitHub↗

    decimal.js is a JavaScript arbitrary precision library designed to perform mathematical calculations without the rounding errors associated with standard floating-point numbers. It provides a high-precision math toolkit for executing basic arithmetic and advanced transcendental functions with configurable significant digits. The library implements decimal-based math that supports various rounding modes and arbitrary precision settings. It includes a numeric string parser for converting decimal, hexadecimal, binary, and octal strings into high-precision numeric types, as well as a utility for

    JavaScript
    View on GitHub↗7,205
  • mikemcl/big.jsMikeMcl avatar

    MikeMcl/big.js

    5,186View on GitHub↗

    big.js is an arbitrary-precision decimal library for JavaScript designed to perform exact decimal arithmetic. It provides a set of tools for high-precision addition, subtraction, multiplication, and division to avoid the rounding errors common in binary floating-point representations. The library allows for the creation of custom number constructors to isolate precision settings and rounding rules for different groups of numbers. It supports configurable global precision and specific rounding behaviors, such as truncate or round half even, for division and power operations. The capability su

    JavaScript
    View on GitHub↗5,186
  • nefe/number-precisionnefe avatar

    nefe/number-precision

    4,100View on GitHub↗

    number-precision is a JavaScript math library and arbitrary precision arithmetic utility. It provides a set of functions for performing addition, subtraction, multiplication, and division while avoiding the rounding errors common in standard binary floating-point operations. The project focuses on maintaining controlled decimal precision to ensure consistent mathematical output. This makes it applicable for financial calculations where exact currency values are required, as well as for high precision data processing in scientific or technical reports. Its capabilities include precise floatin

    TypeScriptfloating-pointnumber-converterrounding-error
    View on GitHub↗4,100
  • josdejong/mathjsjosdejong avatar

    josdejong/mathjs

    15,036View on GitHub↗

    Math.js is a comprehensive JavaScript library for scientific, complex, and arbitrary precision calculations. It functions as a symbolic computation engine, a linear algebra toolkit, a statistical analysis library, and a unit conversion system. The project distinguishes itself by providing a symbolic engine capable of parsing, simplifying, and manipulating mathematical expressions algebraically without requiring immediate numerical evaluation. It includes a framework for defining and converting physical quantities with units of measure and automatic prefix support. The library covers a broad

    JavaScript
    View on GitHub↗15,036
See all 30 alternatives to Bignumber.js→

Frequently asked questions

What does mikemcl/bignumber.js do?

bignumber.js is an arbitrary-precision JavaScript library designed to perform mathematical operations on decimals and integers that exceed the limits of standard floating-point numbers. It functions as a decimal arithmetic engine and a math library for calculating square roots, powers, and modular exponentiation.

What are the main features of mikemcl/bignumber.js?

The main features of mikemcl/bignumber.js are: Arbitrary Precision Arithmetic, Decimal Rounding Utilities, Base Conversion Utilities, Digit-Array Arithmetic, Financial Numeric Precision, Exact Value Comparisons, Precision-Tolerant Comparisons, High-Precision Number Initialization.

What are some open-source alternatives to mikemcl/bignumber.js?

Open-source alternatives to mikemcl/bignumber.js include: mikemcl/decimal.js — decimal.js is a JavaScript arbitrary precision library designed to perform mathematical calculations without the… mikemcl/big.js — big.js is an arbitrary-precision decimal library for JavaScript designed to perform exact decimal arithmetic. It… nefe/number-precision — number-precision is a JavaScript math library and arbitrary precision arithmetic utility. It provides a set of… josdejong/mathjs — Math.js is a comprehensive JavaScript library for scientific, complex, and arbitrary precision calculations. It… adamwdraper/numeral-js — Numeral-js is a JavaScript number formatting library used to convert raw numeric values into human-readable strings… numbers/numbers.js — numbers.js is a comprehensive mathematics library for JavaScript that provides a collection of advanced functions for…