From owner-cvs-all@FreeBSD.ORG Mon Mar 31 01:25:37 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 215E437B401; Mon, 31 Mar 2003 01:25:37 -0800 (PST) Received: from newtrinity.zeist.de (newtrinity.zeist.de [195.49.175.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id E7CFB43F93; Mon, 31 Mar 2003 01:25:35 -0800 (PST) (envelope-from marius@newtrinity.zeist.de) Received: from newtrinity.zeist.de (localhost [127.0.0.1]) h2V9PYN6043115; Mon, 31 Mar 2003 11:25:34 +0200 (CEST) (envelope-from marius@newtrinity.zeist.de) Received: (from marius@localhost) by newtrinity.zeist.de (8.12.9/8.12.9/Submit) id h2V9PSj2043114; Mon, 31 Mar 2003 11:25:28 +0200 (CEST) (envelope-from marius) Date: Mon, 31 Mar 2003 11:25:28 +0200 From: marius@alchemy.franken.de To: Peter Jeremy Message-ID: <20030331112528.C20107@newtrinity.zeist.de> References: <200303272038.h2RKcM7L096560@repoman.freebsd.org> <20030327204935.GA18134@HAL9000.homeunix.com> <20030330175646.281097ad.Alexander@Leidinger.net> <20030331082023.GE11307@cirb503493.alcatel.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20030331082023.GE11307@cirb503493.alcatel.com.au>; from peterjeremy@optushome.com.au on Mon, Mar 31, 2003 at 06:20:23PM +1000 cc: Alexander Leidinger cc: das@freebsd.org cc: src-committers@freebsd.org cc: cvs-all@freebsd.org cc: cvs-src@freebsd.org Subject: Re: cvs commit: src/sys/ia64/include float.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Mar 2003 09:25:40 -0000 On Mon, Mar 31, 2003 at 06:20:23PM +1000, Peter Jeremy wrote: > On Sun, Mar 30, 2003 at 05:56:46PM +0200, Alexander Leidinger wrote: > >Attached is a test for 32 and 64 bit ieee values (edge cases). > > It's not clear exactly what this program is intended to test. > > > The *_MIN > >values (or my test program) at least on i386 machines are wrong. > > The *_MIN values represent the greatest negative value, not the > smallest positive value. > while all *_EPSILON, *_MIN and *_MAX values are rounded and not the exact ones (and for FLT_* and DBL_* are probably defined in some standard) the real point of concern are the LDBL_* values, FreeBSD seems to have simply adopted them from NetBSD, while e.g. the Intel compiler for Linux defines also rounded but more precise ones and Linux itself uses exact values via gcc-extensions, e.g.: #define LDBL_MIN (__extension__ ((union __convert_long_double) {__convert_long_double_i: {0x0, 0x80000000, 0x1, 0x0}}).__convert_long_double_d) i don't have it at hand right now but in the sources of stlport are some long double-conversion-tests that cause compiler-warnings ("value does not fit in required floating-point type" when putting a DBL_MIN in a long double or something like that) when using the FreeBSD/NetBSD-constants for LDBL_* and compiling with icc. at least for me it wasn't exactly clear if that's the fault of the constants or if the tests of stlport are bogus.