ppc float.h

Andreas Tobler andreast-list at fgznet.ch
Wed Nov 12 11:50:24 PST 2008


Hello,

can somebody explain why we have these defines in 
sys/powerpc/include/float.h ?

#define LDBL_MANT_DIG	DBL_MANT_DIG
#define LDBL_EPSILON	DBL_EPSILON
#define LDBL_DIG	DBL_DIG
#define LDBL_MIN_EXP	DBL_MIN_EXP
#define LDBL_MIN	DBL_MIN
#define LDBL_MIN_10_EXP	DBL_MIN_10_EXP
#define LDBL_MAX_EXP	DBL_MAX_EXP
#define LDBL_MAX	DBL_MAX
#define LDBL_MAX_10_EXP	DBL_MAX_10_EXP


I mean, why do we use the DBL_* for the LDBL instead of defining them 
like this:

#define LDBL_MANT_DIG	64
#define LDBL_EPSILON	1.0842021724855044340E-19L
#define LDBL_DIG	18
#define LDBL_MIN_EXP	(-16381)
#define LDBL_MIN	3.3621031431120935063E-4932L
#define LDBL_MIN_10_EXP	(-4931)
#define LDBL_MAX_EXP	16384
#define LDBL_MAX	1.1897314953572317650E+4932L
#define LDBL_MAX_10_EXP	4932


The float.h itself states that it is derived from:
from: FreeBSD: src/sys/i386/include/float.h,v 1.8 1999/08/28 00:44:11

Having a look into src/sys/i386/include/float.h shows that the LDBL_* 
are defined as the above.

Are there missing issues in libc or so?

TIA,
Regards,
Andreas


More information about the freebsd-ppc mailing list