Using Math Function LOG without a new library

Hey all,

I am trying to build a spark app that utilizes thermsistors, and trying to avoid adding libraries to handle it (until the library process is as beautiful as the current wireless flashing process)

I am following the formulas from this awesome doc: http://web.cecs.pdx.edu/~eas199/B/howto/thermistorArduino/thermistorArduino.pdf

but it appears that the natural logarithm function “log( float x)” is not included in the base set of functions, and require Math.h

so what is the best way to get this done with the current limitations?

well thats interesting.

looks like we can put in include math.h at the top of the script, and all is good! equation works…

#include <math.h>
2 Likes

And if anyone’s wondering why exactly that works, it’s because the GNU ARM toolchain uses newlib:
https://sourceware.org/newlib/

All newlib functions are available on the Core—some require #include, some don’t.