SimpleIDE question: isinf?
mpark
Posts: 1,305
in Propeller 1
I'm trying to use isnan and isinf. In the code below, isnan works, but if I uncomment the line with isinf, the compiler gives me an "undefined reference to '___isinf" error.
What's the secret to using isinf??
#include "simpletools.h" int main() { print("%d\n", isnan(sqrt(-2))); // prints 1 // print("%d\n", isinf(sqrt(-2))); }I am using 64-bit doubles.
What's the secret to using isinf??
Comments
EDIT: I tested with GCC under cygwin, and it works OK. However, it fails with PropGCC. You'll have to define isinf() yourself. There are examples on the internet of how to do it. An infinite value has all ones for the exponent and all zeros for the mantissa.
I did write my own isinf, but I'm still curious as to why isinf doesn't work. After all, isnan is also a macro in math.h and it works, so what's up with isinf???
Is anyone maintaining this stuff?
Ray
Lol ain't that the sad truth.
@mpark, you could try opening a ticket at https://github.com/totalspectrum/proplib/ and reporting the problem.
Unfortunately, for a variety of reasons, SimpleIDE and PropGCC are not being maintained anymore.