[RFH] A simple way to figure out the number of bits used by a long double
Paolo Carlini
paolo.carlini@oracle.com
Fri Feb 26 12:07:00 GMT 2010
Hi,
I'm trying to simplify somewhat code in the library hashing floating
point numbers, and I would find very useful a simple "recipe" giving the
total number of bits actually used by a long double: the basic issue is
that for formats like the 80-bit Intel, I can't just rely on sizeof,
because the last 6 bytes are unused. At the moment I'm trying to cook up
something fixing that count with LDBL_MANT_DIG, but maybe there is
something simpler, maybe using preprocessor builtins?!?
Thanks in advance for any help...
Paolo.
More information about the Gcc
mailing list