[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "seq .1 .1" would mistakenly generate no output on FreeBSD 6.1

From: Paul Eggert
Subject: Re: "seq .1 .1" would mistakenly generate no output on FreeBSD 6.1
Date: Wed, 21 Nov 2007 15:07:54 -0800
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Come to think of it, aren't the symptoms Jim reported in
nearly the opposite of the BeOS symptoms?

If I understand things aright, BeOS incorrectly claimed that
LDBL_MANT_DIG is 53 when it is actually 64.  But FreeBSD has a
different problem.  Its problem is that some long-double operations
use a 53-bit fraction while others use 64 bits.  In the example
program you gave, division converted to a 53-bit fraction, whereas
strtold converted to a 64-bit fraction.

For more details about the quirks of FreeBSD and long double, please see
(which talks about the problem with "seq") and
(which talks about the problem with <float.h> sometimes overestimating

One possible workaround is for vasnprintf to use fpsetprec/fesetprec
to undo the FreeBSD hack that forces long double operations to
generate only 53-bit results.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]