From malcolm@brackley.nag.co.uk  Wed Jan 24 14:56:06 2001
Received: from server-5.tower-4.starlabs.net (mail.london-1.starlabs.net [212.125.75.12])
	by dkuug.dk (8.9.2/8.9.2) with SMTP id OAA16900
	for <sc22wg5@dkuug.dk>; Wed, 24 Jan 2001 14:56:02 +0100 (CET)
	(envelope-from malcolm@brackley.nag.co.uk)
X-VirusChecked: Checked
Received: (qmail 24659 invoked from network); 24 Jan 2001 13:55:09 -0000
Received: from nagmx1e.nag.co.uk (HELO nag.co.uk) (62.232.54.130)
  by server-5.tower-4.starlabs.net with SMTP; 24 Jan 2001 13:55:09 -0000
Received: from brackley.nag.co.uk (brackley.nag.co.uk [192.156.217.21])
	by nag.co.uk (8.9.3/8.9.3) with ESMTP id NAA03869
	for <sc22wg5@dkuug.dk>; Wed, 24 Jan 2001 13:55:43 GMT
Received: (from malcolm@localhost)
	by brackley.nag.co.uk (8.9.3/8.9.3) id NAA58686
	for sc22wg5@dkuug.dk; Wed, 24 Jan 2001 13:57:54 GMT
	(envelope-from malcolm)
From: Malcolm Cohen <malcolm@nag.co.uk>
Message-Id: <200101241357.NAA58686@brackley.nag.co.uk>
Subject: Re: (SC22WG5.1991) N1423: WG5 letter ballot on interpretations
To: sc22wg5@dkuug.dk
Date: Wed, 24 Jan 2001 13:57:54 +0000 (GMT)
X-Mailer: ELM [version 2.4ME+ PL61 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

D Muxworthy asked:
> it would
> be helpful to have a note in F200x highlighting this difference, and
> giving an example of when NEAREST(X,1.) is different from X +
> SPACING(X).  Is this likely to be true only at extreme values?

Not in general (though for "normal" floating point types, yes).

Consider double precision implemented as double+double (the second double
being at least 2**53 smaller than the first double).

The Brown model for this will have 106 bits, so SPACING(1.0) will be
approximately 2**(-106).  However, if X is *exactly* 1.0, then NEAREST(X,1.)
will be 1.0 plus the smallest representable double, i.e. approx 1+10**(-308).

The Brown model has lots of other problems with double+double, not just this
one; basically the model is too simplistic.  So the other "model number"
intrinsics (TINY, HUGE, MAXEXPONENT, et al) also have slight anomalies for
this data type.

Cheers,
-- 
...........................Malcolm Cohen, NAG Ltd., Oxford, U.K.
                           (malcolm@nag.co.uk)

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.star.net.uk/stats.asp
