Decimal handling for currency (precision)
aberba
karabutaworld at gmail.com
Thu Nov 23 14:47:21 UTC 2017
Some suggest working with the lowest currency denomination to
avoid decimal precision handling and only convert to the highest
denominations (decimal) when displaying. I've also seen some use
decimal value handling libraries.
I'm thinking lowest denominations will result in extremely large
values that D's type system cannot store (if such large values
makes sense or can happen with money in real life).
What will be your advise on the type to use by default, the
currency denominations (100p instead of 1.0 dollars), and cost of
computation.
More information about the Digitalmars-d-learn
mailing list