> I found a neat approximation for an arctangent in radians of a value of X > in [-1,1]: > > atan(X) = X / { 1 + 0.28 X*X } error < 0.005, |X| < 1 > > If I use 8-bit fixed point, then the denominator will require 9 bits, > which > creates an annoying problem with the division. Hi Robert, If the implementation of the arctan is for a PIC, then you may wish to consider: http://www.dattalo.com/technical/software/pic/arctan.asm This also has a similar error (~1/200) and doesn't involve any annoying division. On the other hand, the returned result is in normalized radians and thus may require an addition multiplication to convert to what ever units you're using. (However, it should be pointed out that the lookup table can be converted into other units). Scott -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist