Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Mar 1999 15:35:38 +0100
From:      German Tischler <tanis@gaspode.franken.de>
To:        Steffen Hein <spinner.rflab@t-online.de>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: gnu C compiler
Message-ID:  <19990317153538.A14957@gaspode.franken.de>
In-Reply-To: <36EFA9ED.5126E95C@t-online.de>; from Steffen Hein on Wed, Mar 17, 1999 at 01:11:09PM %2B0000
References:  <36EFA9ED.5126E95C@t-online.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Mar 17, 1999 at 01:11:09PM +0000, Steffen Hein wrote:
>    printf( "\n LDBL_MIN     = % Le ", LDBL_MIN );

In FreeBSD's float.h you'll find: 
#define DBL_MIN         2.2250738585072014E-308
#define LDBL_MIN        DBL_MIN

This means LDBL_MIN is really a double value, which you give to
printf, but tell it to expect a long double. This will end in either
garbage or an exception (e.g. a floating point exception), because
sizeof(double) != sizeof(long double) in this implementation.
You should cast the value to long double. A floating point literal is
probably implicitely converted to double.

-- 
German Tischler            tanis@gaspode.franken.de
Apple eaten (core dumped)  tanis@cip.informatik.uni-wuerzburg.de


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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