Re: A82: Fixed point math & trig routines needed!


[Prev][Next][Index][Thread]

Re: A82: Fixed point math & trig routines needed!




You're correct.  the ROM routines would be MUCH too slow.  Besides being slow
in the first place, they're all floating point.  Oh well.
Another thing, I didn't realize that Dines' routines don't include a division
function.  So no matter what, I NEED a division (which is the hardest to
write) routine.
I guess I figured out the format of Dines' routines.  It uses all 2.2 fixed
point numbers (hex at least) and the genius (at least I think so) is that the
fractional part is really a fraction i.e. $8080 would be 128.(128/256=1/2) or
128.5; or $8020 is 128.(256/32=1/8) or 128.125, so I guess numbers could be
accurate to 1/256 or whatever.  That's pretty cool anyway.
sorry for my ramblings

~Adamman

In a message dated 98-06-24 21:00:18 EDT, you write:

> Adamman, I hate to say this, but wait for Ash 3.1 to be released. Adding,
>  subtracting, multiplying, and dividing floating point numbers is
>  extremely easy. Still, it probably won't give you the kind of speed you
>  need for a doom-type game.
>  
>  
>  On Wed, 24 Jun 1998 11:42:43 EDT ADAMMAN106@aol.com writes:
>  >
>  >I think I'm going to start writing a demo raycasting maze while I wait 
>  >for
>  >breakthroughs from OBD and Will Dempster, the people who are trying to 
>  >find
>  >the fatal Dr. Mario bug.  I have a working raycaster on my calculator, 
>  >but
>  >it's in BASIC and runs at a speed of about 1 frame per 2 minutes, not 
>  >exactly
>  >realtime.
>  >So here's what I need:
>  >
>  >1.) addition/subtraction/multiplication/division routines that input 
>  >and
>  >output numbers with a fixed decimal of 2 or 3 places.
>  >
>  >2.) I don't really need a trig routine, but I will use the format of 
>  >the math
>  >routines to make trig tables.
>  >
>  >I would make the routines myself, but small and fast routines aren't 
>  >exactly
>  >my expertise.
>  >Thank you in advance for any help!
>  >
>  >~Adamman
>  >
>  >PS: I found Dines' math routines on ticalc.org but it doesn't say the 
>  >format
>  >of the numbers in the file.  If Dines could explain this than maybe I 
>  >will use
>  >those routines.  Nice work, Dines!
>  >