Re: Decimal Arithmetic

2011-05-24 Thread Paul D. Anderson
Paul D. Anderson Wrote:

> Let me know what you think. At this point I'd settle for a go/nogo decision. 
> We can work bikeshed stuff later.
> 
> Thanks,
> 
> Paul
> 

All right. Seems pretty clear it can be useful. Give me a couple of days to 
tidy up the code and I'll post it.

Thanks.



Re: Decimal Arithmetic

2011-05-24 Thread Andrej Mitrovic
Dial D for D Decimal Arithmetic.


Re: Decimal Arithmetic

2011-05-24 Thread Jesse Phillips
filgood Wrote:

> On 24/05/2011 08:34, Don wrote:
> > Go! We definitely want to get this into Phobos.
> >
> Go

D, Definitely.


Re: Decimal Arithmetic

2011-05-24 Thread filgood

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


Re: Decimal Arithmetic

2011-05-24 Thread Don

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.