Money type

bachmeier no at
Wed Jan 1 20:09:45 UTC 2020

On Wednesday, 1 January 2020 at 18:16:01 UTC, Vitaly Livshic 
>  Thanks Steve, JN.
>  JN, BigInt is big integer. It cannot works with fractional 
> numbers. It is sadly, that wide-spread languages have no 
> convinient money type. This is abnormal.
>  Hope, D will have fixed point type either as built-in type or 
> library.

> It cannot works with fractional numbers.

Nothing can give you a better answer if your fraction is 176/100. 
You can always convert from int to some other type without losing 
precision on the initial calculations if you're in a situation 
where you want to calculate the per-unit cost for 37 units that 
cost a total of $500.17.

More information about the Digitalmars-d mailing list