Article View: comp.arch
Article #10540Re: Compilers, architecture, and efficiency
From: Herman Rubin
Date: Thu, 02 May 1991 01:08
Date: Thu, 02 May 1991 01:08
20 lines
1553 bytes
1553 bytes
In article <WK=A6.G@xds13.ferranti.com>, peter@ficc.ferranti.com (peter da silva) writes:
> If you want to specify a boolean operation on a float, do the following:
>
> f * 2.0
>
> It's up to the compiler to determine if this multiplication by a constant
> two can be handled by incrementing the exponent or if you have to do a real
> floating multiply (say, for example, that it's m * e ^ 16).
This is a boolean operation? I do not even see how to express it as one.
It is a useful operation, however. But unless the appropriate hardware is
there, the compiler better ask the user for permission. On most machines,
adding to the exponent is safe only if neither overflow not underflow can
occur, and if floats are automatically normalized, even positive numbers
cannot be added to the exponent of 0.
--
Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907-1399
Phone: (317)494-6054
hrubin@l.cc.purdue.edu (Internet, bitnet) {purdue,pur-ee}!l.cc!hrubin(UUCP)
Technical Details
Message-ID:
<11739@mentor.cc.purdue.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!news.nd.edu!mentor.cc.purdue.edu!pop.stat.purdue.edu!hrubinReferences:
<1991Apr28.154603.8003@rice.edu> <1991Apr29.155945.29907@rice.edu> <WK=A6.G@xds13.ferranti.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!news.nd.edu!mentor.cc.purdue.edu!pop.stat.purdue.edu!hrubin From: hrubin@pop.stat.purdue.edu (Herman Rubin) Newsgroups: comp.arch Subject: Re: Compilers, architecture, and efficiency Message-ID: <11739@mentor.cc.purdue.edu> Date: 2 May 91 01:08:22 GMT Article-I.D.: mentor.11739 References: <1991Apr28.154603.8003@rice.edu> <1991Apr29.155945.29907@rice.edu> <WK=A6.G@xds13.ferranti.com> Sender: news@mentor.cc.purdue.edu Lines: 20