Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED!nerds-end From: Jonathan Thornburg Newsgroups: comp.compilers Subject: Re: Programming language and IDE design Date: 19 Nov 2013 19:39:05 GMT Organization: Compilers Central Lines: 32 Sender: johnl@iecc.com Approved: comp.compilers@iecc.com Message-ID: <13-11-023@comp.compilers> References: <13-11-016@comp.compilers> NNTP-Posting-Host: news.iecc.com X-Trace: leila.iecc.com 1385050594 13086 64.57.183.58 (21 Nov 2013 16:16:34 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Thu, 21 Nov 2013 16:16:34 +0000 (UTC) Keywords: arithmetic, design Posted-Date: 21 Nov 2013 11:16:34 EST X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:1047 I asked: > at what point should floating-point arithmetic overflow > or underflow, and what should be the consequences of this happening? > To be very precise, what "single semantically valid meaning" should we > perscribe for trying to compute the square of 1.0e300? Martin Ward wrote: > These questions are precisely why the IEEE 754 floating point standard > was needed: it specifies precise answers to all these questions > (without leaving anything "implementation dependent", > other than extra information encoded in a NaN). See the paper > "What Every Computer Scientist Should Know About Floating Point": > > http://www.validlab.com/goldberg/paper.ps The IEEE single-extended and double-extended formats define the precision and exponent range as "implementation-dependent". You can see this in table D-1 of the validlab.com version of Goldberg's paper [which we should note was originally published in ACM Computing Surveys 23(1), March 1991, pages 5-48], and the immediately following sentence "The IEEE standard only specifies a lower bound on how many extra bits extended precision provides." This means that whether or not certain operations overflow is indeed implementation-dependent. -- -- "Jonathan Thornburg [remove -animal to reply]" Dept of Astronomy & IUCSS, Indiana University, Bloomington, Indiana, USA "There was of course no way of knowing whether you were being watched at any given moment. How often, or on what system, the Thought Police plugged in on any individual wire was guesswork. It was even conceivable that they watched everybody all the time." -- George Orwell, "1984"