long doubles?

Andrew Gallatin gallatin at cs.duke.edu
Sun Jul 18 14:31:04 PDT 2004


The reason that vmstat, iostat, systat, etc print wildly bogus device
stats is because the printing of long doubles seems to be broken.

According to a printf of sizeof(long double), the size of a long
double is 8 bytes, the same as a double.  However, according to
sys/powerpc/include/float.h, LDBL_MANT_DIG == 113..  I don't know a
lot about floating point, but I'm not sure this is possible. ;)

If long doubles are 8 bytes (and they are on MacOSX, so that's a good
sign), then shouldn't the LDBL_* constants be the same as the DBL*
constants from float.h?  (they are on MacOSX)

Thanks,

Drew


More information about the freebsd-ppc mailing list