>> Anyone know where I can find some 'C' source for a sine function that >> uses a >> larger lookup table for more accurate results? I am using the CCS C >> compiler, and the results get pretty inaccurate when dealing with very >> small >> numbers. For small angles sin(x) = x (angle in radians) to a reasonably good approximation. This is both easy and fast :-) (This is obvious enough when you look at how sin is defined using a triangle but far from intuitive otherwise. The error relates to using a straight line to approximate the length of the circumferential arc subtended by the given angle on a unit radius circle. As the angle approaches zero the straight line and arc approach equality.). Whether this is good enough depends on your requirements. Using degrees, error is 0.01% at 1 degree, 0.13% at 5 degrees, 0.51% at 10 degrees, 2.1% at 20 degrees RM _______________________________________________ http://www.piclist.com View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist