Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ktowen
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
by
ktowen
3y ago
I will not be using numbers smaller than 0.0001
2.
▲
by
ktowen
3y ago
I will only be doing operations with numbers with max 4 decimal places
3.
▲
by
ktowen
3y ago
The idea is rounding the result of operations with JS float numbers, float 0.1025 * 14 should give 1.435 but gives 1.4349999999999998 and when I try to round to 2 decimal places it will give 1.43 instead of 1.44
4.
▲
by
ktowen
3y ago
Sorry about that, I thought I found an error that made it worthless but was an error in other area
5.
▲
Ask HN: Is double-rounding valid for JS floating point precision at 2 decimals?
3 points
by
ktowen
3y ago
|
10 comments