Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!polyslo!rcfische From: rcfische@polyslo.CalPoly.EDU (Raymond C. Fischer) Newsgroups: comp.sys.mac.programmer Subject: Re: Lookup table vs 68881/2 Message-ID: <25abc41f.867@polyslo.CalPoly.EDU> Date: 10 Jan 90 23:24:15 GMT References: <9001091506.AA00567@cscwam.umd.edu> Reply-To: rcfische@polyslo.CalPoly.EDU (Raymond C. Fischer) Distribution: usa Organization: Cal Poly State Univ,CSC Dept,San Luis Obispo,CA 93407 Lines: 19 In article <9001091506.AA00567@cscwam.umd.edu> rick@wam.umd.edu (Frederick E. Brown) writes: >Can anyone tell me which is faster: sin/cos lookup tables or using the >68881/2 on a mac II. I'm writing a 3D program and want to know which has >the performance edge. > rick@wam.umd.edu If you are using floating point anyway, stick with the 68881. The time required to convert a floating point number to an index, do the lookup, andgenerate the result will take up more time than just doing the calculations. If you don't have to use floating point, consider the fixed point routines in the Mac ROM. Although the accuracy is not as good (56 bits floating point vs. 32 fixed) the routines are much faster and do include sin/cos. Look up FracSin and FracCos in IM IV. Ray Fischer rcfische@polyslo.calpoly.edu