Note that qfplib's main attraction was supposed to be that's it's much SMALLER than the gcc libraries (1k!!)
It also turns out that the trig functions are significantly faster, even though the primitive operations are approximately the same speed...
I did some work with getting qfplib to work transparently with gcc some time ago (mostly for SAMD10), and I was planning on writing up some instructions for this (and arduino.) But it doesn't look like I actually did anything ![]()
Short answer:
- Make sure that there are aliases so that gcc can call the function names that it expects (I think this was actually merged into qfplib)
- replace "-lm" with "-lqfplib" in the link step
- add the gcc switch mentioned above, which I think prevents gcc from using double math when doing calculations involving floating point constants (ie "float f = 3.14159 * sinf(theta);" would normally invoke a double precision multiplication, even though both arguments are only floats.)
I'll try to take another look if I ever finish with all the "summer commitments" in my non-techie pile of things to do.