🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.fortran
Article #6522

Re: Precision of floating point multiply

#6522
From: Glen Herrmannsfeldt
Date: Mon, 29 Sep 2003 20:07
32 lines
2773 bytes
"Nick Maclaren" <nmm1@cus.cam.ac.uk> wrote in message
news:bl9ild$abv$1@pegasus.csx.cam.ac.uk...
>
> In article <xrXdb.631209$Ho3.121609@sccrnsc03>,
> "Glen Herrmannsfeldt" <gah@ugcs.caltech.edu> writes:
> |>
> |> I thought it was somewhere in the thread, but maybe not.
> |>
> |> For  C=C+A*B, single precision A, B, and double precision C:
> |>
> |>    LE 0,A   load single precision A
> |>    ME 0,B   Multiply by B generating double product in float register 0
> |>    SDR 2,2   Clear double float register 2
> |>    LER 2,0    copy single value from reg 0 to reg 2
> |>    AD 2,C     add double C
> |>    STD 2,C    store double into C
> |>
> |> The SDR and LER are used to clear the low half of the product.
>
> If my memory is right, those two are NOT done as part of the
> multiplication, but are the conversion from single to double
> precision.  I.e. you would also get them in:
>
>     C=C+A, single precision A, and double precision C.

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.

-- glen
Technical Details
Message-ID: <Rh0eb.632709$Ho3.121617@sccrnsc03>
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!sccrnsc03.POSTED!not-for-mail
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> <bl9ild$abv$1@pegasus.csx.cam.ac.uk>

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: 1094ba,7830916812112af0
X-Google-Attributes: gid1094ba,public
X-Google-Thread: 102b75,7830916812112af0
X-Google-Attributes: gid102b75,public
X-Google-ArrivalTime: 2003-09-29 13:07:16 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!sccrnsc03.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> <bl9ild$abv$1@pegasus.csx.cam.ac.uk>
Subject: Re: Precision of floating point multiply
Lines: 34
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: <Rh0eb.632709$Ho3.121617@sccrnsc03>
NNTP-Posting-Host: 12.207.204.17
X-Complaints-To: abuse@comcast.net
X-Trace: sccrnsc03 1064866033 12.207.204.17 (Mon, 29 Sep 2003 20:07:13 GMT)
NNTP-Posting-Date: Mon, 29 Sep 2003 20:07:13 GMT
Organization: Comcast Online
Date: Mon, 29 Sep 2003 20:07:13 GMT