question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect result for large numbers

See original GitHub issue

See example fiddle

  • Mask: # (for simplicity’s sake)
  • Value: 12345678901234567890
  • Actual result: 12345678901234567000
  • Expected result: 12345678901234567890 (same as Value)

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
Mottiecommented, Apr 26, 2018

Hi @jfstephe!

I was working on rewriting this library, but got distracted by life. I’d be open for a PR… I got stalled on carrying the one to the left within a string. I might have some time this weekend to work on it again, then we’ll see.

1reaction
jfstephecommented, Apr 26, 2018

Would be great if this supported BigJs numbers, or as you say a generic string input.

Would you be open to PRs for that? (Not volunteering just yet, but maybe in the future).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Incorrect multiplication result for large numbers - Lucee Dev
There is an issue with multiplying large numbers… <cfset result = 4745484599433 * 9291> #result# <!— result = 44090297413332000 → should be ...
Read more >
Java always give me wrong result with huge numbers [duplicate]
There's one incorrect statement in your answer: "The number overflows double". Being around 2.7e19, it's well within the double range, but can't ...
Read more >
Incorrect Results Calculating Large Numbers
I have some very large number in excel, its getting displayed as 1.4039E+25. This value is a addition "=SUM(B2:B25427)".
Read more >
GENERAL: Multiplying Two Ints Gives Incorrect Result
This pattern is called the usual arithmetic conversions: First, if either operand has type long double, the other operand is converted to long...
Read more >
Floating-point arithmetic may give inaccurate result in Excel
This article discusses how Microsoft Excel stores and calculates floating-point numbers. This may affect the results of some numbers or ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found