From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_05,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 107079,183ebe04e93f0506 X-Google-Attributes: gid107079,public X-Google-Thread: 103376,183ebe04e93f0506 X-Google-Attributes: gid103376,public From: tmoran@bix.com (Tom Moran) Subject: Re: fixed point vs floating point Date: 1997/11/23 Message-ID: <3478ac76.237781@SantaClara01.news.InterNex.Net>#1/1 X-Deja-AN: 291944351 Distribution: inet References: <65846t$4vq$1@gonzo.sun3.iaf.nl> Organization: InterNex Information Services 1-800-595-3333 Newsgroups: comp.lang.ada,sci.math.num-analysis Date: 1997-11-23T00:00:00+00:00 List-Id: >Converting a fixed point value to fpt, issue the sinus instruction >and convert it back is much faster than even thinking about doing it in >fixed point. ;-) But "type degrees is delta 1.0/16 range 0.0 .. 360.0;" has only 5760 possible values, and a table lookup with a table of 5760 entries is often quite reasonable, and surely faster than converting to fp, calculating a sin, and converting back. Not to mention if the function is not just sin, but, say the 6th power of the cos (in a Phong illumination calculation, say). I can't seem to find my Cody&Waite, but I think they give fixed point algorithms, and I also think I've seen mention of Ada code for it in the PAL or some such public place.