Decimal Arithmetic

filgood filgood at somewhere.net
Tue May 24 02:26:31 PDT 2011


On 24/05/2011 08:34, Don wrote:
> Paul D. Anderson wrote:
>> I've got a D programming language implementation of the General
>> Decimal Arithmetic specification (http://speleotrove.com/decimal/)
>> that's' more or less complete* and am wondering if it would be useful.
>> I worked on this over a year ago but life got in the way, so I
>> neglected it for a time. I now have the time to finish it.
>>
>> It uses std.bigint as the basis for the decimal numbers. I know there
>> are plans to bring BigFloat, decimal32, decimal64, and decimal128
>> numbers into D. The completed* portion of the code fills the role of
>> BigFloat (although I called it Decimal), and I've got routines that
>> encode/decode the dec32, etc. numbers but they're not as far along as
>> the arbitrary precision version.
>>
>> I guess my question is whether I'm repeating work that's been done or
>> is being done in this area? If so, maybe I can lend a hand. If not,
>> I'd like some feedback on what is needed so I can work on the
>> important things first.
>>
>> Let me know what you think. At this point I'd settle for a go/nogo
>> decision. We can work bikeshed stuff later.
>
> Go! We definitely want to get this into Phobos.
>
>>
>> Thanks,
>>
>> Paul
>>
>> *"more or less complete" == It passes all the tests built in to the
>> spec. No logical operators or exp/ln/power. Still needs work. I
>> suppose it could be called an alpha version.

Go


More information about the Digitalmars-d mailing list