Question

I was looking at new features of C99 and saw the floating point environment:

#include <fenv.h>

My question is simple. If I'm performing floating point number computations, do I have to include the above preprocessor directive in my code? If no, then what does this directive do and when does it become important to include?

Thanks a lot...

Was it helpful?

Solution

You only need to include the fenv.h header if you intend to use any of the features it provides. Those features are described here-

OTHER TIPS

Possibly not very related, but C++11 now also includes support for C99 floating point environment functions via the cfenv header.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top