Re: math library

William Tanksley (wtanksle@owl.csusm.edu)
Fri, 28 Mar 1997 20:21:17 -0500

>Hi everyone,

>I'm confused about the math support. Can we use stuff less than 80 bits? I
>was looking into raycasting, and it needs lookup tables. With 80 bit numbers
>I'd end up with over 100k of fixed memory. That's not gonna multitask well.
>I don't need nearly that much precision, 32 bit is fine. Basically, what I
>need is the results of the trig functions put into lookup tables. Can I do
>this in less than 80 bit numbers?

Edward, there are very few circumstances under which floating point is the
best choice. For most things fixed point is good; for some things rational
numbers are better. I can imagine some times when you'd want to use
Triangle Sides (store two sides of a triangle, and use the to calculate trig
functions with a single division). Floating point is very general, but very
slow (even on the new Intel processors).

Try to invent your own format, or select from one of the many ones provided
by Geos. Unfortunately, I don't have a reference for this; I learned how to
deal with rational numbers from "Starting Forth", a book on Forth for really
tiny computers.

Raycasting, though -- that sounds like a lot of fun.

>| Edward Di Geronimo Jr.

-Billy