Money type
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Sat Jan 4 09:01:59 UTC 2020
On Friday, 3 January 2020 at 17:14:06 UTC, Ola Fosheim Grøstad
wrote:
> If you want the price without VAT, rounded you'll have to do:
>
> (price * 200 / 242 + 1) / 2
Hah! Another fixed point mistake!! It should have been:
(price * 200 / 121 + 1) / 2
This is what makes fixed point a chore, it is hard to read and
tricky to maintain, even when it was easy to write...
More information about the Digitalmars-d
mailing list