Depends on accuracy that you need. If you are going to work with numbers like 5.25
, 9.14
, etc., you don't even need double
. float
will be good enough.
If you are going to work with account balance and add 0.01%
to number like 18 570.548911545
, then precision of 15 decimal digits that double
provides will be enough.
If you need a slightly higher precision, go for long double
. If that's not enough, only then look for "more precise alternative".