🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.fortran
Article #6552

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

#6552
From: Terje Mathisen
Date: Thu, 02 Oct 2003 19:42
48 lines
3907 bytes
Iain McClatchie 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.

You're absolutely right.

It really doesn't have to be mathematically perfect, but it does have to 
be repeatable.

id Software, in the form of my friend Mike Abrash, spent a few weeks 
catching an intermittent problem of exactly this kind:

Every once in a (long) while, such a duplicated calculation of screen 
coordinates along a vertex would turn up two different pixels, and 
there's be a one-frame-long single-pixel glitch in the screen.

This was only observed a few (3-4?) times, and only on one particular 
machine.

After a _lot_ of code inspections, logging, inserted debugging 
statements etc, they still couldn't come up with a repeatable scenario.

That was when they disassembled the cpu/cooling fan combo, and 
discovered that their vendor had delivered an overclocked (by just 11%, 
90 MHz -> 100 MHz) cpu. After a quick reset of the relevant motherboard 
switches, everything was OK.

So remember: Repeatability isn't an option, it's an absolute requirement.

Terje
-- 
- <Terje.Mathisen@hda.hydro.com>
"almost all programming can be viewed as an exercise in caching"
Technical Details
Message-ID: <blhv3t$tn5$1@osl016lin.hda.hydro.com>
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!newsfeed.vmunix.org!uio.no!news01.chello.no!newsfeed1.e.nsc.no!nsc.no!nextra.com!osl016lin.hda.hydro.com!not-for-mail
References: <dG4db.598668$uu5.97984@sccrnsc04> <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> <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: 1094ba,7830916812112af0
X-Google-Attributes: gid1094ba,public
X-Google-Thread: 102b75,7830916812112af0
X-Google-Attributes: gid102b75,public
X-Google-ArrivalTime: 2003-10-02 12:44:03 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!newsfeed.vmunix.org!uio.no!news01.chello.no!newsfeed1.e.nsc.no!nsc.no!nextra.com!osl016lin.hda.hydro.com!not-for-mail
From: Terje Mathisen <terje.mathisen@hda.hydro.com>
Newsgroups: comp.lang.fortran,comp.arch,bit.listserv.ibm-main
Subject: Re: True probabilistic rounding [was Re: Precision ...]
Date: Thu, 02 Oct 2003 15:42:49 -0400
Organization: Hydro
Lines: 49
Message-ID: <blhv3t$tn5$1@osl016lin.hda.hydro.com>
References: <dG4db.598668$uu5.97984@sccrnsc04> <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> <blbmni$g2$1@pegasus.csx.cam.ac. <ble09h$pn2$1@pegasus.csx.cam.ac.uk> <45022fc8.0310021010.4aaf0e5e@posting.google.com>
NNTP-Posting-Host: 136.164.29.1
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: osl016lin.hda.hydro.com 1065123776 30437 136.164.29.1 (2 Oct 2003 19:42:56 GMT)
X-Complaints-To: news@hda.hydro.com
NNTP-Posting-Date: Thu, 2 Oct 2003 19:42:56 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20030916
X-Accept-Language: en-us, en
In-Reply-To: <45022fc8.0310021010.4aaf0e5e@posting.google.com>
X-Received-Date: Thu, 02 Oct 2003 21:43:53 MET DST (news01.chello.no)