Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!WATSON.IBM.COM!jbs From: jbs@WATSON.IBM.COM Newsgroups: comp.arch Subject: how to compute exp(pi**3) without dividing by ln(2) Message-ID: <9105140249.AA16091@ucbvax.Berkeley.EDU> Date: 14 May 91 02:18:20 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 17 Herman Rubin says: I fail to see how one would compute exp(pi^3) even to short precision without doing some computation like (pi^3)/ln2. I can think of at least 3 ways: 1) Use the power series. Since all terms are positive there are no numerical problems (if we compute in double). 2) Use exp(x)=exp(x/2)**2 to reduce the argument to a small number y, compute exp(y) with a minimax polynomial approximation, recover exp(x) by squaring the appropriate number of times. Each square will lose a bit of accuracy but if we are computing in double this need not be a problem. 3) Write x=a+b+c+d. Compute exp(a), exp(b), exp(c) and exp(d) by table look up. Compute exp(x) as exp(a)*exp(b)*exp(c)*exp(d). I am sure there are others. James B. Shearer