Decimal Floating Point types.

H. S. Teoh hsteoh at quickfur.ath.cx
Mon Oct 29 15:51:23 PDT 2012


On Mon, Oct 29, 2012 at 11:41:45PM +0100, Rob T wrote:
> On Monday, 29 October 2012 at 18:43:36 UTC, Iain Buclaw wrote:
> >Speaking on behalf of Dejan, he expressed a wish to have such a
> >type in D. (eg: such that assert(3.6 * 10 == 36.0) - which may not
> >always be true on all architectures).
> >
> >
> >As maybe a new backend type is out of the question.  Perhaps we
> >should create a new library type for the job - eg: _Decimal32,
> >_Decimal64, _Decimal128.
> >
> >Thoughts?
> >
> >
> >Regards
> >Iain.
> 
> I would definitely want these. They are necessary for doing math on
> currency values.
[...]

I thought it was better to use fixed-point with currency? Or at least,
so I've heard.


T

-- 
Mediocrity has been pushed to extremes.


More information about the Digitalmars-d mailing list