Quote:
|
As to Math libraries, has anyone found a good integer based math.h for sqrt, cos, sin, tan, and atan (among others)?
|
Dr. J,
Although I am sure one exists, I usually roll my own using a Taylor Series expansion as a basis. It allows me to exactly control the precision and error I can tolerate for my application. I also know exactly how many machine operations I am executing.
A moderately good paper can be found here:
http://www.agere.com/enterprise_metr...cs/AP02044.pdf
The paper cited above is targeted for a different processor but the math is sound.
Of course, the exact implementation for the PIC is left as an "exercise for the student". ;-)
__________________
Mike Betts
Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013
As easy as 355/113...
|