is real an 80-bit type or not?
Anders F Björklund
afb at algonet.se
Fri Dec 15 13:23:28 PST 2006
Bill Baxter wrote:
> I read somewhere (won't say where ;-)) that someone is annoyed by D
> "pretending that "real" is an 80-bit type". Is it not? real.sizeof
> sure seems to return 10 for me.
It's an 80-bit type on all (make that "both") DMD platforms...
It varies on the platforms and architectures that GDC supports.
"int" is a fixed 32-bit type, everywhere. "real" varies in size.
It's 80-bit on Intel, 64 bits on PowerPC and 128 bits on SPARC ?
It's defined as the "largest hardware implemented" float type.
Basically since it maps directly onto the "long double" C type.
--anders
PS. real.sizeof varies between Intel too, due to padding.
But it should be the same x87 format of the registers.
GDC manual says: "On Win32, GDC allocates 12 bytes for
the real type, while DMD allocates 10 bytes."
More information about the Digitalmars-d-learn
mailing list