🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.fortran
Article #6536

Re: Precision of floating point multiply

#6536
From: Glen Herrmannsfeldt
Date: Tue, 30 Sep 2003 09:02
64 lines
4493 bytes
"Nick Maclaren" <nmm1@cus.cam.ac.uk> wrote in message
news:blbcjf$lrn$1@pegasus.csx.cam.ac.uk...
>
> In article <Zs2eb.157980$0v4.11847973@bgtnsc04-news.ops.worldnet.att.net>,
> "James Giles" <jamesgiles@worldnet.att.net> writes:
> |> Glen Herrmannsfeldt wrote:
> |> > "James Giles" <jamesgiles@worldnet.att.net> wrote in message
> |> > news:r%0eb.163529$3o3.11771639@bgtnsc05-news.ops.worldnet.att.net...

(snip)

> |> > Well, since truncating is systematic at puting in zeros, random bits
would,
> |> > on the average, be closer.
> |> >
> |> > The process of digitizing analog data, such as converting analog
audio into
> |> > digital form, works best with a process called dithering.  Random
noise of
> |> > approximately 1 LSB in amplitude is added before sampling.   The left
over
> |> > bits in registers might not be very random, though.   Using true
random
> |> > bits, one might even be able to sum into a single precision register
and get
> |> > good results!
> |>
> |> Or not.  The problem is that using "garbage bits" doesn't permit any
> |> useful or reliable analysis of the algorithms.  Clearing the bits does.
> |> Further, clearing the bits allows algorithmic work-arounds (like
> |> Kahan's summation).  Keeping "garbage bits" simply makes that
> |> inoperable.
>
> Yes, definitely.  Despite Kahan's analysis, there are very good
> reasons to want true probabilistic rounding.  Several of us have
> analysed that it has BETTER properties than nearest rounding (of
> any type) in some important operations, like vector summation.
> My limited experiments indicated that these benefits mean that it
> delivers comparable accuracy to nearest rounding on at least one
> of the analyses where the latter does well.
>
> But note that means TRUE probabilistic rounding - accept no
> imitations!

Not so long ago, someone came up with this statement from the standard:

>> Item (6) listed in Section 1.4 of the Fortran standard explicitly
>> states that the standard does not specify
>>
>>    (6)  The physical properties of the representation of quantities and
>>         the method of rounding, approximating, or computing numeric
>>         values on a particular processor.

I had tried to argue that at least the rounding would be expected to be
consistent (repeatable), but the discussion seems to say that it doesn't
need to be.   But yes, I agree that only true probabilistic rounding should
be used, if any is.

It seems that some processors now have a hardware random number generator
using an electronic noise source.  I don't know how fast it is, though.   It
would be interesting to see that work.

-- glen
Technical Details
Message-ID: <QEbeb.377802$2x.116648@rwcrnsc52.ops.asp.att.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.mathworks.com!wn13feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi_feed4!attbi.com!rwcrnsc52.ops.asp.att.net.POSTED!not-for-mail
References: <dG4db.598668$uu5.97984@sccrnsc04> <xrXdb.631209$Ho3.121609@sccrnsc03> <bl9ild$abv$1@pegasus.csx.cam.ac.uk> <Rh0eb.632709$Ho3.121617@sccrnsc03> <bla4k2$nas$1@pegasus.csx.cam.ac.uk> <FR0eb.637973$uu5.101567@sccrnsc04> <r%0eb.163529$3o3.11771639@bgtnsc05-news.ops.worldnet.att.net> <bY1eb.633341$Ho3.121512@sccrnsc03> <Zs2eb.157980$0v4.11847973@bgtnsc04-news.ops.worldnet.att.net> <blbcjf$lrn$1@pegasus.csx.cam.ac.uk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fd4af,7830916812112af0
X-Google-Attributes: gidfd4af,public
X-Google-Thread: fd705,7830916812112af0
X-Google-Attributes: gidfd705,public
X-Google-Thread: 1094ba,7830916812112af0
X-Google-Attributes: gid1094ba,public
X-Google-Thread: 102b75,7830916812112af0
X-Google-Attributes: gid102b75,public
X-Google-ArrivalTime: 2003-09-30 02:02:42 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.mathworks.com!wn13feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi_feed4!attbi.com!rwcrnsc52.ops.asp.att.net.POSTED!not-for-mail
From: "Glen Herrmannsfeldt" <gah@ugcs.caltech.edu>
Newsgroups: comp.lang.fortran,comp.arch,bit.listserv.ibm-main,alt.folklore.computers
References: <dG4db.598668$uu5.97984@sccrnsc04> <xrXdb.631209$Ho3.121609@sccrnsc03> <bl9ild$abv$1@pegasus.csx.cam.ac.uk> <Rh0eb.632709$Ho3.121617@sccrnsc03> <bla4k2$nas$1@pegasus.csx.cam.ac.uk> <FR0eb.637973$uu5.101567@sccrnsc04> <r%0eb.163529$3o3.11771639@bgtnsc05-news.ops.worldnet.att.net> <bY1eb.633341$Ho3.121512@sccrnsc03> <Zs2eb.157980$0v4.11847973@bgtnsc04-news.ops.worldnet.att.net> <blbcjf$lrn$1@pegasus.csx.cam.ac.uk>
Subject: Re: Precision of floating point multiply
Lines: 66
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Message-ID: <QEbeb.377802$2x.116648@rwcrnsc52.ops.asp.att.net>
NNTP-Posting-Host: 12.207.204.17
X-Complaints-To: abuse@comcast.net
X-Trace: rwcrnsc52.ops.asp.att.net 1064912560 12.207.204.17 (Tue, 30 Sep 2003 09:02:40 GMT)
NNTP-Posting-Date: Tue, 30 Sep 2003 09:02:40 GMT
Organization: Comcast Online
Date: Tue, 30 Sep 2003 09:02:40 GMT