Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 04 Aug 2005 13:11:49 -0400
From:      Chuck Swiger <cswiger@mac.com>
To:        Steve Kargl <sgk@troutmask.apl.washington.edu>,  current@freebsd.org
Subject:   Re: Number of significand bits in long double?
Message-ID:  <42F24C55.2010501@mac.com>
In-Reply-To: <20050804170421.GD96813@troutmask.apl.washington.edu>
References:  <20050804162618.GA96657@troutmask.apl.washington.edu> <42F24737.2060705@mac.com> <20050804170421.GD96813@troutmask.apl.washington.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42F24C55.2010501>