www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Suggestion: floating point types

Just like there is a D keyword set aside for 128 bit
integers (that would be "cent"), there should be one
reserved for a future floating point type as well ?

I suggest "quad", for a quad precision floating point:
http://en.wikipedia.org/wiki/Quad_precision (128 bit)


"half" precision would be nice too, but less important:
http://en.wikipedia.org/wiki/Half_precision (16 bit)

There is C++ source for halfs in the OpenEXR project already,
http://savannah.nongnu.org/download/openexr/OpenEXR-1.2.2.tar.gz


Then again, I still think that an 80-bit floating point
should be called "extended" in D. But that is just me:

half 		16 bit floating point (storage only)
float 		32 bit floating point
double 		64 bit floating point
extended 	80 bit floating point
quad 		128 bit floating point (future use)

version(X86)
   alias extended real;
version (PPC)
   alias double real;

--anders
Jan 06 2006