|
Approximate!
Posted by Joe Johnson at 04/12/2001 10:40 PM EST
Engineer on team #47, Chief Delphi, from Pontiac Central High School and Delphi Automotive Systems.
In Reply to: my big beef about pbasic...
Posted by Nick on 04/12/2001 10:25 PM EST:
Every time I think I can't live without an inverse trig
function, I end up finding an approximation that gets
me near enough to it without the fuss of actually
having to use them.
Most of the time, I am able to approximate them close
enough with a simple linear function, but if that is
not good enough, the lookup/lookdown functions can give
about as complex of a function as you could want or
need.
Finally, if you HAVE to have it, simply devote the EEPROM
space to defining ARCSIN, ARCCOS and ARCTAN.
It would use up 3/8's of your code space in each
programming slot you need the funtions, but this would
not be too hard to manage if you break your code up
into several slots. I think you could do it if you really
needed it.
Just my opinion. I have been wrong before (once ;-)
Joe J.
__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
|