Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
688 views
in Technique[技术] by (71.8m points)

floating point - NaN Literal in C?

How do you write an NaN floating-point literal in C?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

In C99's <math.h>

  7.12  Mathematics <math.h>
   [#5] The macro

           NAN

   is defined if and only if the implementation supports  quiet
   NaNs   for  the  float  type.   It  expands  to  a  constant
   expression of type float representing a quiet NaN.           |

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...