From owner-freebsd-current Wed Oct 30 15:37:29 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9C91F37B404 for ; Wed, 30 Oct 2002 15:37:28 -0800 (PST) Received: from hawk.mail.pas.earthlink.net (hawk.mail.pas.earthlink.net [207.217.120.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id EB68843E42 for ; Wed, 30 Oct 2002 15:37:27 -0800 (PST) (envelope-from tlambert2@mindspring.com) Received: from pool0465.cvx40-bradley.dialup.earthlink.net ([216.244.43.210] helo=mindspring.com) by hawk.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 1872On-0000mu-00; Wed, 30 Oct 2002 15:37:22 -0800 Message-ID: <3DC06CE4.57CF2F96@mindspring.com> Date: Wed, 30 Oct 2002 15:36:04 -0800 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: "M. Warner Losh" Cc: bde@zeta.org.au, rittle@labs.mot.com, rittle@latour.rsch.comm.mot.com, current@FreeBSD.ORG, dschultz@uclink.Berkeley.EDU Subject: Re: Lack of real long double support References: <20021030.012222.123041962.imp@bsdimp.com> <20021030215500.E5692-100000@gamplex.bde.org> <20021030.162239.52163953.imp@bsdimp.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG "M. Warner Losh" wrote: > And there's a comment: > * 64-bit precision often gives bad results with high level languages > * because it makes the results of calculations depend on whether > * intermediate values are stored in memory or in FPU registers. > which seems like a compiler issue, not an OS issue to me. The compiler must emit instructions to truncate and set flags, as well as generating pseudo-exceptions (should they be called for) in the case that the storage is in registers bigger than the memory backing them. IT doesn't do this. This is the basis of Bruce's complaint: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=1099099+0+archive/2002/freebsd-current/20021027.freebsd-current | gcc can't actually support the full range, since it doesn't control | the runtime environement (it could issue a fninit before main() to | change the default, but it shouldn't and doesn't). The exponent | range is lost long before printf() is reached. E.g., | | long double x= DBL_MAX; | long double y = 2 * x; | | gives +Inf for y since the result is doesn't fit in 53-bit precision. | The system header correctly reports this default precision. Any header | genrated by the gcc build should be no different, since the build should | run in the target environment. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message