🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #12120

Re: IEEE arithmetic

#12120
From: Dik T. Winter
Date: Sat, 15 Jun 1991 23:15
30 lines
1486 bytes
In article <9106150206.AA15019@ucbvax.Berkeley.EDU> jbs@WATSON.IBM.COM writes:
 >          Unavoidable is too strong.  I believe there are compilers
 > (such as xlf) for which compiling with optimization does not change
 > the behavior of legal programs.
Right, it does some surprising things to get at that goal.  Now you have to
explain to your customers the reason that
	DO 10 I = 1, N
	DO 10 J = 1, N
10	X(I,J) = A * B(I) * C(J)
is faster than
	DO 10 I = 1, N
	DO 10 J = 1, N
10	X(I,J) = A * B(J) * C(I)

If you see the expressions some people write...
I though we had left that distinction behind us some 15 years ago.
More surprising is the code generated (non-optimized) for the statement:
	X(I) = 2.0 * A(I) + 2.0
it goes something like:
	load 2.0 in fr1
	load a(i) in fr2
	multiply fr1 and fr2 to fr0
	load 2.0 in fr1
	load 2.0 in fr1
	multiply fr1 and fr2 and add fr1 to fr0
granted, it is non-optimized, but even than it sees that the maf operation can
be used (otherwise it would not be able to use it in the optimized version).
--
dik t. winter, cwi, amsterdam, nederland
dik@cwi.nl
Technical Details
Message-ID: <3708@charon.cwi.nl>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!hp4nl!cwi.nl!dik
References: <9106150206.AA15019@ucbvax.Berkeley.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!hp4nl!cwi.nl!dik
From: dik@cwi.nl (Dik T. Winter)
Newsgroups: comp.arch
Subject: Re: IEEE arithmetic
Message-ID: <3708@charon.cwi.nl>
Date: 15 Jun 91 23:15:57 GMT
References: <9106150206.AA15019@ucbvax.Berkeley.EDU>
Sender: news@cwi.nl
Organization: CWI, Amsterdam
Lines: 30