4 ms·
But on computers, you get things such as console.log(0.1 + 0.2) // 0.30000000000000004 A mathematician might say that this shows that you do not really have
by kangnkodos 6y ago
But on computers, you get things such as
console.log(0.1 + 0.2)
// 0.30000000000000004
A mathematician might say that this shows that you do not really have accurate floating point values and arithmetic in your computer, but instead something close to it.
- traderjane 6y agoThat's a coincidence of the particular number system you use, and many programming languages have multiple number implementations. Racket starts with arbitrary precision rationals.