long number rounding error
See original GitHub issueHello, i initialize slider with data
var settings = {
connect: "lower",
range: {
max: 87654567890,
min: 0
},
start: 30679098762,
step: 1
}
after initialization slider value is 30679098761.50 why? Demo here - https://jsfiddle.net/serGlazkov/yrppsmvo/5/
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Rounding Error
Rounding (roundoff) error is a phenomenon of digital computing resulting from the computer's inability to represent some numbers exactly.
Read more >Rounding Errors - The Floating-Point Guide
Rounding Errors. Because floating-point numbers have a limited number of digits, they cannot represent all real numbers accurately: when there are more ...
Read more >Round-off error - Wikipedia
A roundoff error, also called rounding error, is the difference between the result produced by a given algorithm using exact arithmetic and the...
Read more >Rounding Error Definition - Investopedia
A rounding error is a mathematical miscalculation caused by altering a number to an integer or one with fewer decimals.
Read more >What is rounding error? | Definition from TechTarget
Rounding error is the difference between a rounded-off numerical value and the actual value. A rounded quantity is represented by a numeral with...
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 Free
Top 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
I’ve made some changes to the way decimals are handled, which resolves this issue. Thanks for the test case!
On initialization i set a integer value and why slider change it? I know what slider change value, because translate value to percent and back, and it not bad, but not on initialization. And more, i can’t set value, plugin change it. Demo here https://jsfiddle.net/serGlazkov/yrppsmvo/8/