IsNan problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IsNan problem

838 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Genesy on Tue Oct 15 03:09:30 MST 2013
Hi,
I would to use the function isnan to test if a float is equal to inf, but both with redlib and newlib I have compilation problem like this:
undefined reference to `__isnanf'


How can I solve this problem?

Thank you very much
0 Kudos
Reply
1 Reply

765 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by stalisman on Tue Oct 15 03:35:35 MST 2013
could try this for now:

One noteworthy property of NaNs is that they are not equal to themselves. Thus, x == x can be 0 if the value of x is a NaN. You can use this to test whether a value is a NaN or not: if it is not equal to itself, then it is a NaN.
0 Kudos
Reply