This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Are there macros for infinity and not a number?

Hi, 

I haven't been able to find predefined variables for infinity , Nan, -infinity, or -0 for floats or doubles, are these predefined within the 7.4.0 compiler, if so what are their respective variable names?

Thank you.

  • There are no predefined macros for those values in that version of the compiler.  The C99 standard provides the macros NAN and INFINITY in math.h, but the TI compiler does not yet support that C99 feature.  That version of the TI compiler does not support negative zero or denormal numbers at all, and will not always correctly handle expressions involving NaN and Inf.  These issues are scheduled to be fixed; the release date is not yet known.