Basenumber.js VS number-precision

Compare Basenumber.js vs number-precision and see what are their differences.

Basenumber.js

A BigDecimal library for arbitrary precision that allows you to work with numbers in different bases from 2 to 36. (by AlexSp3)

number-precision

🚀1K tiny & fast lib for doing addition, subtraction, multiplication and division operations precisely (by nefe)
SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
Basenumber.js number-precision
1 1
7 3,982
- 0.0%
0.0 0.0
about 2 years ago about 1 year ago
JavaScript TypeScript
MIT License -
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

Basenumber.js

Posts with mentions or reviews of Basenumber.js. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-09-09.
  • 0.1 + 0.2 is not 0.3 in JavaScript.
    3 projects | /r/javascript | 9 Sep 2021
    That's because every number in JavaScript is represented using 64 bits floating point. Since numbers are saved in binary, there are some decimal numbers that are periodics in binary but not in decimal, e.g. 0.2, equivalent to 0.00110011001100110011... in bin. You can avoid this using some BigDecimals libraries like decimal.js, or, if you need to work in different bases, you have Basenumber.js

number-precision

Posts with mentions or reviews of number-precision. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-09-30.
  • Node_modules: One character saved 50 GB of disk space
    2 projects | news.ycombinator.com | 30 Sep 2022
    > Like, let's introduce a dependency for decrement lol

    Here's a package that basically does that: https://www.npmjs.com/package/number-precision

    Not entirely unreasonable as all `number`s are floats by default in JS, but the implementation of the entire package (https://github.com/nefe/number-precision/blob/master/src/ind...) is less than 100 lines of code and actually contains a method called "minus".

    The very worst JS packages I've seen have got to be is-odd and is-even. 430,796 and 202,268 downloads every week, I kid you not!

What are some alternatives?

When comparing Basenumber.js and number-precision you can also consider the following projects:

dock-spawn-ts - A TypeScript HTML Docking Framework (fork of dock-spawn)

mpmath - Python library for arbitrary-precision floating-point arithmetic

jsbi-calculator - JSBI-Calculator is an IE11-compatible calculator utility to perform arbitrary (up to 18 decimals) arithmetic computation, with the help of JSBI-based BigDecimal.

Drachennest - Different algorithms for converting binary to decimal floating-point numbers

js-big-decimal - Work with large numbers on the client side with high precision.

mui-rff - MUI 5 / Material UI + React Final Form

Arrayality - Tiny puzzle which gives you freedom

qonvert - Qonvert lets you convert rational numbers between different bases and between different representations such as positional notation and improper, mixed, continued and Egyptian fractions, as well as Greek and Roman numerals. The numbers can have basically arbitrary size and precision.

num2words - Convert numbers like 42 to forty-two