Hacker News new | ask | show | jobs
by xigoi 1467 days ago
In what context couldn't you just use an integer?
2 comments

You can multiply and use integers but it's a bit ugly. Especially if you work across systems, you'll always need to store notations on the multiplier used. Having a decimal as a built in type with that information stored would be much easier.

But in the end I tend to use that for most numbers, especially as compression in time series also often better works on integers than floats if you have gradual changes in the numbers.

Multiplication context maybe?