January 04, 2020 Re: Money type | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vitaly Livshic | On Wednesday, 1 January 2020 at 15:41:32 UTC, Vitaly Livshic wrote: > Good day. > > I came from Java world, where 'double' type inadequate for money calculation. BigDecimal serves for it. This is ugly type, but gives precise results. > > Which type I must use for money in D? Here you have a full IEE754-2008 compliant implementation of decimal data types (32, 64 and 128 bit). https://github.com/rumbu13/decimal Same as the Intel one proposed here by someone else, but written completely in D, no dependencies, no bindings. |
Copyright © 1999-2021 by the D Language Foundation