Article View: comp.lang.fortran
Article #6537True probabilistic rounding [was Re: Precision ...]
From: Nick Maclaren
Date: Tue, 30 Sep 2003 10:42
Date: Tue, 30 Sep 2003 10:42
48 lines
3468 bytes
3468 bytes
In article <QEbeb.377802$2x.116648@rwcrnsc52.ops.asp.att.net>, "Glen Herrmannsfeldt" <gah@ugcs.caltech.edu> writes: |> |> > 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. That is my understanding, too. |> 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. It would be very interesting. Generator efficiency isn't a problem, because you can have (say) a decent shift register generator running in parallel (e.g. all the time!), and XOR the hardware generator in with the results of that when you need them. It wouldn't matter if the hardware generator updated a word only every 100 cycles, given a suitably decent pseudorandom generator. I am not enough of an expert on the details of the methods used in hardware to be quite certain that there need be NO performance loss, but I am 99% sure that it would be negligible at worst and there might even be a slight gain. Yes, really. The reason I say the last is that there is no need to calculate a multiplication to full accuracy - all you need is to generate enough bits for a decision. Of course, this means that operations can take variable times, which is Not Approved Of. But it might help, especially for extended precision multiplication. Regards, Nick Maclaren.
Technical Details
Message-ID:
<blbmni$g2$1@pegasus.csx.cam.ac.uk>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!server1.netnews.ja.net!pegasus.csx.cam.ac.uk!nmm1References:
<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> <QEbeb.377802$2x.116648@rwcrnsc52.ops.asp.att.net>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: 1094ba,7830916812112af0 X-Google-Attributes: gid1094ba,public X-Google-Thread: 102b75,7830916812112af0 X-Google-Attributes: gid102b75,public X-Google-ArrivalTime: 2003-09-30 03:43:00 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!server1.netnews.ja.net!pegasus.csx.cam.ac.uk!nmm1 From: nmm1@cus.cam.ac.uk (Nick Maclaren) Newsgroups: comp.lang.fortran,comp.arch,bit.listserv.ibm-main Subject: True probabilistic rounding [was Re: Precision ...] Date: 30 Sep 2003 10:42:58 GMT Organization: University of Cambridge, England Lines: 48 Message-ID: <blbmni$g2$1@pegasus.csx.cam.ac.uk> 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> <QEbeb.377802$2x.116648@rwcrnsc52.ops.asp.att.net> NNTP-Posting-Host: virgo.cus.cam.ac.uk Originator: nmm1@virgo.cus.cam.ac.uk