log function in SimpleIDE
idbruce
Posts: 6,197
The math.h file has four declarations for the log functions and I am wondering which one to use. They are as follows:
int ilogb(double);
double log1p(double);
double log2(double);
double logb(double);
And the context in which it is being used is as follows:
Thanks for your assistance
EDIT: You would think that it would compile with either #include "simpletools.h" or #include <math.h> but it does not.
EDIT: In fact, I found a lot more declarations. There really should be a description somewhere about the available math functions, without digging through header files.
EDIT: Problem solved.... In addition to the #include <math.h>, you must also check the the math.lib checkbox in the linker options.
int ilogb(double);
double log1p(double);
double log2(double);
double logb(double);
And the context in which it is being used is as follows:
float steinhart; // (R/Ro) steinhart = average / THERMISTORNOMINAL; // ln(R/Ro) steinhart = log(steinhart);
Thanks for your assistance
EDIT: You would think that it would compile with either #include "simpletools.h" or #include <math.h> but it does not.
EDIT: In fact, I found a lot more declarations. There really should be a description somewhere about the available math functions, without digging through header files.
EDIT: Problem solved.... In addition to the #include <math.h>, you must also check the the math.lib checkbox in the linker options.
Comments
http://forums.parallax.com/showthread.php/160252-Log-Antilog-Table-In-C-C?p=1318530&viewfull=1#post1318530