Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!ub!rutgers!mcnc!uvaarpa!murdoch!hemlock!clc5q From: clc5q@hemlock.cs.Virginia.EDU (Clark L. Coleman) Newsgroups: comp.arch Subject: Re: float/float = integer, remainder Message-ID: <1991May14.141623.16040@murdoch.acc.Virginia.EDU> Date: 14 May 91 14:16:23 GMT References: <9105130317.AA09926@ucbvax.Berkeley.EDU> <12248@mentor.cc.purdue.edu> Sender: usenet@murdoch.acc.Virginia.EDU Organization: University of Virginia Computer Science Department Lines: 37 In article <12248@mentor.cc.purdue.edu> hrubin@pop.stat.purdue.edu (Herman Rubin) writes: >In article <9105130317.AA09926@ucbvax.Berkeley.EDU>, jbs@WATSON.IBM.COM writes: > >> 2. In any case it is not true that "every" exponential routine >> does this computation. The scalar short precision exp routine in IBM's >> vs fortran library does not do this computation in any way. > >I fail to see how one would compute exp(pi^3) even to short precision >without doing some computation like (pi^3)/ln2. A reference to check: Cody, William J., Jr., and William Waite, "Software Manual for the Elementary Functions," Prentice-Hall, 1980. Pages 60-71 seem to describe an algorithm for the Exponential routine that involves the division by ln2 that Herman describes. Of course, they recommend multiplication by the reciprocal of ln2, which can be computed and used as a stored constant. No divides are found in the algorithm, as best as I can tell from a cursory reading. Perhaps IBM's VS FORTRAN library is using the multiply instead of the divide in the same fashion? The Cody/Waite algorithm does do float -> integer conversion at one point, and the presence of Herman's requested instruction would make it possible to do things differently. But, should we be requesting a floating multiply instruction that produces an integer result and a floating fractional result? This might be faster. Or are there other routines that cannot be altered from a divide to a multiply and are important enough to justify the requested divide instruction ? ----------------------------------------------------------------------------- "The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offence." E.W.Dijkstra, 18th June 1975. ||| clc5q@virginia.edu (Clark L. Coleman)