The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning. Learn more →
Decimal.js Alternatives
Similar projects and alternatives to decimal.js
-
-
-
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.
-
bigint-money
A Money class for high precision calculations using the ESnext bigint type.
-
-
-
-
eslint-plugin-big-number-rules
Enforce (or automatically fix) finance-safe calculations using BigNumber or similar libraries.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
-
bignumber.js
A JavaScript library for arbitrary-precision decimal and non-decimal arithmetic
-
big.js
A small, fast JavaScript library for arbitrary-precision decimal arithmetic.
-
-
-
-
dinero.js
Create, calculate, and format money in JavaScript and TypeScript.
-
proposal-pattern-matching
Pattern matching syntax for ECMAScript
-
-
-
eslint-config-standard
ESLint Config for JavaScript Standard Style
-
-
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.
decimal.js reviews and mentions
-
Decoding Why 0.6 + 0.3 = 0.8999999999999999 in JS and How to Solve?
ii) Third-Party Libraries There are various libraries like math.js, decimal.js, big.js that solve the problem. Each library functions according to its documentation. This approach is comparatively better.
-
Rant - Javascript should be able to do simple f**king math by now
I too wish JS had a dedicated Decimal Type, but there is plenty of 3rd party libraries available like decimal.js
-
The Last Breaking Change | JSON Schema Blog
For your particular example though, if we keep in mind that the input data to be validated is JSON-serializable, only a string could possibly accommodate the precision expected of a decimal from among the JSON-serializable JS primitives. You could use one or more regex patterns to describe the allowable permutations. The resultant schema would be cross-platform since it doesn't use custom keywords - nice! You can also use unions if you want to say that integers, NaN, and Infinity are also allowed per the docs there.
-
[AskJS] Are there numeric textbox widgets with built-in support for big numbers like decimal.js?
I'm working on a project where users will enter numbers like 9,999,999,999.99999 (up to 15 digits, up to 5 of them decimal) and we are having a problem with Numbers losing precision beyond certain number of digits (a typical issue for IEEE Standard 754 Floating Point Numbers, the 0.1 + 0.2 problem). I've solved this problem in a few projects before with the help of decimal.js or bignumber,js . In those cases, we kept user-input as strings and used a few custom-made numeric textbox widgets to accommodate this. Unfortunately, those widgets were proprietary... Now I need one again, but can't find anything. Do they exist?
-
Show HN: I made a web-based notepad with a built in unit calculator
Looks good! I love the idea of the embedded calculator
I noticed that it doesn't handle remainder/modulo (%) equations:
"10 % 2" results in: "Left hand side of addition cannot be a percentage."
It does look like decimal.js can handle that: https://mikemcl.github.io/decimal.js/#mod
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
-
[AskJS] How do you deal with floats in production apps?
https://github.com/MikeMcl/decimal.js/ great library
-
How are you handling your money?
Another different approach maybe to have the money represented in the decimal in your database at the decimal places of the currency with the highest decimal point you are going to be dealing with for example using Decimal(n, 2) in case of fiat, and perform your calculations in arbitrary-precision Decimal type. In javascript, using libraries like Big.js , Decimal.js will be of help.
-
GitHub - tc39/proposal-decimal: Built-in decimal datatype in JavaScript
If it wasn't for operator overloading this could have been polyfillable. I use decimal.js in my projects.
- How do I make 6.789-6 be 0.789 exactly and not that other number? (I'm learning the basics)
-
A note from our sponsor - WorkOS
workos.com | 28 Mar 2024
Stats
MikeMcl/decimal.js is an open source project licensed under MIT License which is an OSI approved license.
The primary programming language of decimal.js is JavaScript.