Shop OBEX P1 Docs P2 Docs Learn Events
log function in SimpleIDE — Parallax Forums

log function in SimpleIDE

idbruceidbruce Posts: 6,197
edited 2015-03-06 07:20 in Propeller 1
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:
	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

Sign In or Register to comment.