IsNan problem

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

IsNan problem

839件の閲覧回数
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 件の賞賛
返信
1 返信

766件の閲覧回数
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 件の賞賛
返信