3 ms·
For finances, numbers are typically stored as integers, since floating point problems can crop up quite easily if you don't. Some languages can handle arbitrary
by physicsguy 2y ago
For finances, numbers are typically stored as integers, since floating point problems can crop up quite easily if you don't. Some languages can handle arbitrary precision integers out of the box - this is true in Python for e.g., in others then you have to use special libraries to do so. Even when you can represent the numbers, you still have to take care since doing things like calculating interest might lead to floating point numbers which need to be handled.