🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.fortran
Article #6551

Re: True probabilistic rounding [was Re: Precision ...]

#6551
From: Nick Maclaren
Date: Thu, 02 Oct 2003 18:36
45 lines
3036 bytes
In article <45022fc8.0310021010.4aaf0e5e@posting.google.com>,
Iain McClatchie <iain-3@truecircuits.com> wrote:
>
>Nick> Apparently it [true probabilistic rounding] is starting to be
>Nick> adopted in graphics.
>
>Whoa!
>
>The graphics guys at SGI soured on MADDs when they found out
>that fused multiply-add instructions round differently than two
>separate operations.  It turns out that you have to calculate the
>exact same screen position twice for a vertex which is part of two
>different triangles.  The bug they found was that the vertex went
>down two different code paths, and the two paths rounded
>differently, in this case because one path used multiply and then
>add, and the other used a fused multiply-add.
>
>Graphics guys are really into repeatability.  They'll get their
>performance by chucking precision or accuracy first.

If they code like that, they will also be sacrificing performance!

The first point is that you don't get repeatability in combination
with significant optimisation - even without that problem.  The
second one is, when calculating a vertex's coordinates and consistency
is critical, do it once and save it.  This can be essential for things
like Dirichlet tesselation, which are seriously numerically unstable.

I was actually referring to the use in dithering, which is somewhere
that true probabilistic rounding is much superior to any deterministic
rounding.

What is probably the case is that anyone who relies on absolutely
consistent floating-point results is living dangerously, and may be
deluding himself.  I know of at least half a dozen ways where the
assumption will fail, even on consistent IEEE-like architectures.
And considerably more on older ones.

That is part of the basis for my assertion that probabilistic rounding
is good because it forces programmers to realise that floating-point 
arithmetic does not give precisely predictable results.


Regards,
Nick Maclaren.
Technical Details
Message-ID: <blhr8a$916$1@pegasus.csx.cam.ac.uk>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed.stanford.edu!newsmi-us.news.garr.it!NewsITBone-GARR!news.mailgate.org!newsfeed.stueberl.de!fu-berlin.de!server1.netnews.ja.net!pegasus.csx.cam.ac.uk!nmm1
References: <dG4db.598668$uu5.97984@sccrnsc04> <blbmni$g2$1@pegasus.csx.cam.ac. <ble09h$pn2$1@pegasus.csx.cam.ac.uk> <45022fc8.0310021010.4aaf0e5e@posting.google.com>

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: 102b75,7830916812112af0
X-Google-Attributes: gid102b75,public
X-Google-Thread: 1094ba,7830916812112af0
X-Google-Attributes: gid1094ba,public
X-Google-ArrivalTime: 2003-10-02 11:37:01 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed.stanford.edu!newsmi-us.news.garr.it!NewsITBone-GARR!news.mailgate.org!newsfeed.stueberl.de!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: Re: True probabilistic rounding [was Re: Precision ...]
Date: 2 Oct 2003 18:36:58 GMT
Organization: University of Cambridge, England
Lines: 45
Message-ID: <blhr8a$916$1@pegasus.csx.cam.ac.uk>
References: <dG4db.598668$uu5.97984@sccrnsc04> <blbmni$g2$1@pegasus.csx.cam.ac. <ble09h$pn2$1@pegasus.csx.cam.ac.uk> <45022fc8.0310021010.4aaf0e5e@posting.google.com>
NNTP-Posting-Host: libra.cus.cam.ac.uk