Article View: comp.lang.fortran
Article #6524Re: Precision of floating point multiply
From: Glen Herrmannsfeldt
Date: Mon, 29 Sep 2003 20:30
Date: Mon, 29 Sep 2003 20:30
36 lines
3263 bytes
3263 bytes
"GerardS" <GerardS@PrairieTech.Net> wrote in message news:vngokjk8nourca@corp.supernews.com... > | Richard Maine wrote: > |> Ron Shepard wrote: > |> Are the exponents converted automatically with these instructions? > |> If they aren't, then it seems odd to be able to convert between a > |> double precision floating point value to a single precision value > |> just by loading the value into a register. > | > | Add usual caveat about my memory, but the exponents don't *NEED* > | converting. I recall thinking it sort of strange the first time I saw > | floating point formats where the exponents weren't the same for single > | and double. I've subsequently gotten used to it. Sounds to me like > | you are so used to it that you didn't think of the other possibility. :-) > > What if the number isn't normalized ? ___________________________Gerard S. For hex floating point, the exponent is 7 bits for short, long, and extended formats, allowing 16**-64 up to 16**63, or something like 10**-78 up to 10**75. Unnormalized values are also allowed in mathematical operations. For addition and subtraction, the prenormalization (aligning the hexadecimal point) is done based on the exponent supplied. The Fortran AINT function consists of adding 0*16**7, and DINT of adding 0*16**15. Prenormalization will shift out fractional digits, zero will be added, and post normalization will shift it back to properly normalized form. Multipy, divide, and square root prenormalize the the operand if it isn't normalized. (This is from ESA/390.) http://publibfp.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/dz9ar006/18.1.2 -- glen
Technical Details
Message-ID:
<TD0eb.630592$YN5.454239@sccrnsc01>Path:
arc1-ca.pugleaf.net!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!sccrnsc01.POSTED!not-for-mailReferences:
<dG4db.598668$uu5.97984@sccrnsc04> <iu6fnvch0g09q9f335tt89ogfcj5jm2ovh@4ax.com> <kmRdb.626671$YN5.452649@sccrnsc01> <bl8q1g$iv7$1@pegasus.csx.cam.ac.uk> <xrXdb.631209$Ho3.121609@sccrnsc03> <ron-shepard-609A55.10533829092003@news.comcast.giganews.com> <uefziffu7c.fsf@altair.dfrc.nasa.gov> <vngokjk8nourca@corp.supernews.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: 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:30:46 PST Path: arc1-ca.pugleaf.net!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!sccrnsc01.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> <iu6fnvch0g09q9f335tt89ogfcj5jm2ovh@4ax.com> <kmRdb.626671$YN5.452649@sccrnsc01> <bl8q1g$iv7$1@pegasus.csx.cam.ac.uk> <xrXdb.631209$Ho3.121609@sccrnsc03> <ron-shepard-609A55.10533829092003@news.comcast.giganews.com> <uefziffu7c.fsf@altair.dfrc.nasa.gov> <vngokjk8nourca@corp.supernews.com> Subject: Re: Precision of floating point multiply Lines: 38 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: <TD0eb.630592$YN5.454239@sccrnsc01> NNTP-Posting-Host: 12.207.204.17 X-Complaints-To: abuse@comcast.net X-Trace: sccrnsc01 1064867443 12.207.204.17 (Mon, 29 Sep 2003 20:30:43 GMT) NNTP-Posting-Date: Mon, 29 Sep 2003 20:30:43 GMT Organization: Comcast Online Date: Mon, 29 Sep 2003 20:30:43 GMT