Article View: comp.lang.fortran
Article #6523Re: Precision of floating point multiply
From: Nick Maclaren
Date: Mon, 29 Sep 2003 20:27
Date: Mon, 29 Sep 2003 20:27
24 lines
2146 bytes
2146 bytes
In article <Rh0eb.632709$Ho3.121617@sccrnsc03>, Glen Herrmannsfeldt <gah@ugcs.caltech.edu> wrote: > >Well, you would get SDR 2,2 and LE 2,A in that case. The compiler does have >to keep track of which registers have single and which have double values. >Leaving low bits from previous calculations in would seem a bad idea. >Though according to other posts it may be legal in Fortran. It certainly is legal, provided they are from an appropriate calculation, but that is not what is going on here. The specification of IBM floating-point register operations is precisely that the unused low-order bits are ignored. Those bits are therefore NOT being left in the value; they are being left OUTSIDE the value. That is why it is quite safe for single precision multiply to create them and to leave them where they are. Similarly, conversion from single to double precision has to clear those bits, whether the operand being converted has been created by multiply or anything else. Regards, Nick Maclaren.
Technical Details
Message-ID:
<bla4k2$nas$1@pegasus.csx.cam.ac.uk>Path:
arc1-ca.pugleaf.net!news1.google.com!newsfeed.stanford.edu!newsmi-us.news.garr.it!NewsITBone-GARR!area.cu.mi.it!newsfeeder.edisontel.com!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>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: 102b75,7830916812112af0 X-Google-Attributes: gid102b75,public X-Google-Thread: 1094ba,7830916812112af0 X-Google-Attributes: gid1094ba,public X-Google-ArrivalTime: 2003-09-29 13:27:48 PST Path: arc1-ca.pugleaf.net!news1.google.com!newsfeed.stanford.edu!newsmi-us.news.garr.it!NewsITBone-GARR!area.cu.mi.it!newsfeeder.edisontel.com!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,alt.folklore.computers Subject: Re: Precision of floating point multiply Date: 29 Sep 2003 20:27:46 GMT Organization: University of Cambridge, England Lines: 24 Message-ID: <bla4k2$nas$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> NNTP-Posting-Host: draco.cus.cam.ac.uk