Re: 16 bit subtraction with ABS function



Well... you don't necessarily need fancy fixed-point math. You could
hack it by doing 16-bit integer math and discard the low-byte when you
want the "whole" number. That way, your sine table can have values 0
throught 255 and you only have to use the high-byte for the "whole"
number bit. This is more or less how I implemented it in the raycaster
engine, except I used values 0-127 so I could do signed math more
easily. Of course, now that I think about it, I didn't have to do
that. :-) Ah well, it's a learning experience.

.



Relevant Pages

  • Re: How Percentages change
    ... >>>How can we know unless you show your math? ... > he is going to discard *something* on the next trick. ... > something then that probability would also hold before you play the ...
    (rec.games.bridge)
  • Re: Better use of random number genator bits?
    ... discard it and go back to step 1. ... C = R div 1600 ... as the original method was about 10.5bits average. ... You mentioned that you might be able to do 256-bit math. ...
    (sci.math)
  • Re: Excel is unusable for finance or accounting.
    ... The processor can't do decimal math natively, ... Excel already provides a fixed-point alternative, ... binary rather than decimal (there being no difference for integer math per ... IEEE floating point, perhaps even faster. ...
    (microsoft.public.excel)
  • Re: Variable $i count a lot numbers...
    ... Sounds like you want integer math rather than floating point math. ...
    (perl.beginners)
  • Re: This calculation is just wrong / computer cant count!
    ... Then you need to go back to primary school mathematics classes! ... Millions of PCs need to be recalled because "the math is wrong". ... In integer math it is 0 ... In floating point math 0.833333 approximately ...
    (microsoft.public.vc.mfc)