fixed point math library recommendations?

I had previously posted a thread: "floating point precision: is true double possible?", but it seems that the answer to that question was basically "no".

...so, in lieu of floating point math on true (64 bit) doubles, I'll need to resort to using fixed point math. This would require re-writing all of the normal floating-point functions (sine, tangent, exponentiation, etc.), but I'm sure this has been done before -- probably many times over. I'm curious if there are recommendations for fixed-point math libraries that have been successfully tested on the Arduino.

Alternately, an arbitrary precision library or library implementing 64-bit floating points would also be extremely useful. Any recommendations would be appreciated!

Thanks,
-Jon

Have you considered this library?

http://www.mpfr.org/

Thank you it seems a very good library. Now we just have to figure out how to inlcude it in an Arduino sketch... :slight_smile:

AVRfix download | SourceForge.net may be a tad more usable.

I dont think anyone will every fit MPFR along with GMP on an AVR. :slight_smile:

Thank you.

I tried to compile it with arduino but it gives me this error:

error: fixed-point types not supported for this target

I'm trying to make it compile.
Will report back.

After specifying MCU=atmega328p in the makefile, I've been able to compile the library from the command line, by just typing "make".

I'm trying to figure out how to make arduino include the libavrfix.a file without trying to recompile the its source from scratch...