🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #12187

Re: Condition number of uniform random matrices; residuals

#12187
From: Dik T. Winter
Date: Wed, 19 Jun 1991 23:20
45 lines
2986 bytes
Some initial comments:
I think fp arithmetic is good if it has the Brown model properties.
I.e. given an mathematical operation o and its fp approximation o', then
a.  The should never be a machine number between o' applied to its operands
    and o applied to its operands (i.e. the error is at most 1 ulp).
b.  If o applied to its operands is representable as a machine number, that
    machine number should be returned when o' is applied to its operands
    (i.e. the error is never exactly 1 ulp).
So in all the error is always less than 1 ulp.
These properties allow truncation, rounding to nearest, random rounding etc.
Many machines fail with these properties.
FP arithmetic is very good if rounding to nearest is done.
Round to nearest allows some neat algorithms, for instance T.J.Dekker's,
1966-1970 timeframe, routines to perform double precision arithmetic using
only single precision.  (The resultant arithmetic is *not* properly rounding,
as in many cases more information is kept than would result from proper
rounding.  So the algorithms can not be applied recursively.)
Having said that:

In article <9106190421.AA02128@ucbvax.Berkeley.EDU> jbs@WATSON.IBM.COM writes:
 > Also I believe the statistics of chopping improve if .5 ulp is added to
 > each operand before every operation.

This technique (or somesuch similar) is known and used in the 60 bit CDC Cybers
and in Crays.  I have no CDC and Cray manuals here at home, so I do not know
now the exact technique they use.  But:
Note first that it is not necessary to tack a bit onto both numbers, tacking
a bit only to the absolute largest number differs only in those cases where
there is a tie between the nearest machine numbers.  Cray tacks slightly more
than 1 bit to the mantissa of the absolute largest number.  The reason being
that loosely speaking 'this makes it statistically approximate round to
nearest', in some measure.  I have my doubts.

The problem is that when you subtract and if there is cancellation of high
order bits, the tacked on bit can become visible.  Try this with a t bit
machine, subtracting 2^t-1 from 2^1.  When tacking a 1 bit to both numbers
the result is 1.5, which violates property b.  Using this method your machine
will only satisfy the above model with one bit of precision.
Try (1.0-0.75)-0.25.  The result is non-zero.

However, worse than tacking 1 bits onto numbers is when the final result is
{truncated,rounded} first and normalized later (as many machines do).
--
dik t. winter, cwi, amsterdam, nederland
dik@cwi.nl
Technical Details
Message-ID: <3743@charon.cwi.nl>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!hp4nl!cwi.nl!dik
References: <9106190421.AA02128@ucbvax.Berkeley.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!hp4nl!cwi.nl!dik
From: dik@cwi.nl (Dik T. Winter)
Newsgroups: comp.arch
Subject: Re: Condition number of uniform random matrices; residuals
Message-ID: <3743@charon.cwi.nl>
Date: 19 Jun 91 23:20:53 GMT
References: <9106190421.AA02128@ucbvax.Berkeley.EDU>
Sender: news@cwi.nl
Organization: CWI, Amsterdam
Lines: 45