Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
CS foundations
/
Floating-point arithmetic
Why can (a + b) + c differ from a + (b + c) for finite floating-point values?
from Floating-point arithmetic
Node 24
intermediate
1 min
Why can (a + b) + c differ from a + (b + c) for finite floating-point values?
Each grouping can round a different intermediate result.
Floating-point addition is never commutative.
Parentheses convert the operands to decimal.
Only negative values can lose precision.
Check
Ask AI about this kata
Report an error
next kata
What does Number.EPSILON describe?
Quiz
A new version is available
Reload