Is there an equivalent of the decimal type in D?

Myron Alexander someone at somewhere.com
Mon Jan 29 14:07:46 PST 2007


Leandro Lucarella wrote:
> Myron Alexander escribió:
>> Hello.
>>
>> I want to work with numbers without having to worry about binary 
>> representation. I work with currencies and other such values that must 
>> be absolute. In Java I have BigDecimal and in Python I have decimal.
>>
>> Does D have an equivalent, either at the language level or as a 
>> module/class?
> 
> You can try using a C arbitrary precision library (or wrap it so it's 
> little more pleasant to use in D), like GMP[1].
> 
> [1] http://www.swox.com/gmp/
> 

Hello Leandro.

Thanks for the pointer. I will take a look when I can.

All the best,

Myron.


More information about the Digitalmars-d-learn mailing list