From owner-freebsd-questions Wed Mar 17 6:39: 2 1999 Delivered-To: freebsd-questions@freebsd.org Received: from maulwurf.franken.de (maulwurf.franken.de [193.141.110.9]) by hub.freebsd.org (Postfix) with ESMTP id AF19114E84 for ; Wed, 17 Mar 1999 06:38:42 -0800 (PST) (envelope-from gaspode.franken.de!tanis@maulwurf.franken.de) Received: by maulwurf.franken.de via rmail with stdio id for freebsd-questions@freebsd.org; Wed, 17 Mar 1999 15:38:22 +0100 (MET) (Smail-3.2 1996-Jul-4 #1 built DST-May-30) Received: (from tanis@localhost) by gaspode.franken.de (8.9.3/8.8.8) id PAA15529; Wed, 17 Mar 1999 15:35:38 +0100 (CET) (envelope-from tanis) Date: Wed, 17 Mar 1999 15:35:38 +0100 From: German Tischler To: Steffen Hein Cc: freebsd-questions@freebsd.org Subject: Re: gnu C compiler Message-ID: <19990317153538.A14957@gaspode.franken.de> References: <36EFA9ED.5126E95C@t-online.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: <36EFA9ED.5126E95C@t-online.de>; from Steffen Hein on Wed, Mar 17, 1999 at 01:11:09PM +0000 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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