Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
poizan42
on Nov 13, 2015
|
parent
|
context
|
favorite
| on:
0.30000000000000004
Just say (0.1+0.2)*10-3. That works everywhere no matter the amount of rounding.
static_noise
on Nov 13, 2015
[–]
You've just invented fixed point numbers.
poizan42
on Nov 13, 2015
|
parent
[–]
I'm not sure I follow? The point here was to show that a language can't represent the decimal fractions exactly.
recursive
on Nov 13, 2015
|
root
|
parent
[–]
But they can. Many languages have decimal and rational types.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: