Why does this keep adding different numbers?
See original GitHub issueFor an example add a 9 to this 999999999999999 and it will be converted to 10,000,000,000,000,000, even adding very long numbers get changed, this isn’t great for a web app dealing with money…
I can’t see any docs revealing why this is happening or how to stop it, tried decimalScale={undefined}
, nothig changed…
Please, help
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
What is the name of the number that is being added to another ...
In a case when you are adding exactly two numbers, you can use augend and addend, to refer to the first and second...
Read more >Techniques for Adding the Numbers 1 to 100 - BetterExplained
By counting from 0, we get an “extra item” (10 in total) so we can have an even number of rows. However, our...
Read more >Adding Fractions with Unlike Denominators | Math with Mr. J
Mr. J will go through two adding fractions examples and explain the steps of how to add fractions with unlike denominators.
Read more >3 NUMBER: WHAT IS THERE TO KNOW? | Adding It Up
Later, other numbers are introduced: negative numbers and rational numbers (fractions and mixed numbers, including finite decimals). Children expend ...
Read more >Add different page numbers or number formats to different ...
You can use any other format instead. Select between the intro and the body of the document and go to Layout > Breaks...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, thanks for getting in touch.
Yes, I am aware there are some issues when a large digit number is entered. It was never my intention to handle large numbers like
999999999999999
so I’ve never really looked into handling it to be honest.In the future I might implement a solution, but if you’re in a rush I would recommend either:
Sorry my reply isn’t particularly helpful.
Hi, glad to hear from you… The issue has been affecting other parts of my dev since 2 days now(mostly my fault since i don’t like proceeding with development when there’s a pending bug to fix)
I had a fork pulled and started implementing the solution using bignumber.js library for all number-based implementations…
I’m done with it though, been testing to be sure i didn’t break anything…
Thanks for all suggestions, i’m unable to avoid large numbers since i’m in the finance sector.
After rigorous testing, i figured the react-number-format i mentioned also faced the same issue and going deep into the code, i saw it uses parseFloat even in more lines than yours 😊
I appreciate your work on the library and it was as simple and advanced as i want, kinda have all features i wanted.
If you want, i can upload the fork to github(not yet to avoid it competing with your library), maybe it might help you solve a major problem for many people facing same issue, just that you now have bignumber.js as a dependency.
Good luck and thanks again