Comments (1)
I think reading up on floating point numbers, precision, and round-off errors will give you all the answers. And secondly, in your example, you feed mathjs numbers. In that case, mathjs will multiply numbers and is not using higher precision Decimal.js.
from decimal.js.
Related Issues (20)
- Return type of sign() is Decimal in d.ts HOT 3
- some cases normal operations still accurate than decimal.js HOT 4
- jest toEqual doesn't work HOT 1
- Allow creation without the `new` keyword HOT 4
- isPositive() should return false for zero HOT 1
- Maximum call stack size exceeded HOT 3
- Precision is lost when working with cyclic division HOT 1
- Round Half Up working as expected? HOT 1
- toFixed() is inconsistent in some way HOT 3
- Add structuredClone support HOT 3
- Deviding by 3 HOT 3
- Create a security policy HOT 1
- Assigning to constructor at runtime
- Support for mathematical expression processing without loss of precision HOT 2
- Decimal.sum with large arrays exceeds the maximum call stack size
- Parsing from binary (Python encoding via avro) HOT 1
- question:Value of type 'typeof Decimal' is not callable. Did you mean to include 'new'? HOT 2
- Suggestion: new method `toFixedNumber(...)` that returns a number HOT 6
- Irregular length of precision for at least .sub method HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from decimal.js.