Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
nonononyes
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
by
nonononyes
11y ago
Yes, one should never, ever use floats to handle currency values. Since currencies round to decimal digits, one should use decimal numbers. Databases that store currency values have a "decimal" type too. Using integers works, but