Re: Number of significand bits in long double?

From: Chuck Swiger <cswiger_at_mac.com>
Date: Thu, 04 Aug 2005 13:11:49 -0400
Steve Kargl wrote:
> On Thu, Aug 04, 2005 at 12:49:59PM -0400, Chuck Swiger wrote:
[ ... ]
>>/usr/include/float.h ...?
> 
> It's wrong.  Compare this
> 
[ ...a chunk of <float.h> snipped... ]
>
> with this
> 
>>PROPERTIES OF LONG DOUBLE
>>Base = 2
>>Significant base digits = 53 (= at least 15 decimal digits)
[ ...output from enquire.c trimmed... ]
>>Long double expressions are evaluated in double precision

Agreed, it does look like <float.h> is wrong.  A quick look suggests this was 
broken somewhere in 5.x, since <float.h> from 4.11 ends with:

#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
#endif /* _MACHINE_FLOAT_H_ */

-- 
-Chuck
Received on Thu Aug 04 2005 - 15:11:58 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:40 UTC