Shop OBEX P1 Docs P2 Docs Learn Events
QLOG fixed point output versus SPIN2 floating point? — Parallax Forums

QLOG fixed point output versus SPIN2 floating point?

Has anyone come up with a slick way of converting QLOG's fixed point result to SPIN2 floating point format?

Comments

  • Have you tried using floating point log() in FlexC, compiling and looking at the disassembly? IIRC, FlexC uses the CORDIC unit for floating point math, at least QMUL, QDIV and SQRT. I haven't tested exp() and log(), so far.

  • No need to look at the disassembly, the source code for __builtin_log2f and __builtin_exp2f are in the FlexProp include/libsys/powers.c file. They're not highly optimized, but I think they work OK.

Sign In or Register to comment.