I am looking for a free C++ fixed point library (Mainly for use with embedded devices, not for arbitrary precision math). Basically, the requirements are:
- No unnecessary runtime overhead: whatever can be done at compile time, should be done at compile time.
- Ability to transparently switch code between fixed and floating point, with no inherent overhead.
- Fixed point math functions. There's no much point using fixed point if you need to cast back and forth in order to take a square root.
- Small footprint.
Any suggestions?