![](https://www.devx.com/wp-content/uploads/2022/02/thumbnail.jpg)
Portable Functions to Check for NaN and Infinity
Currently, there are no portable C/C++ functions to check for NaN (not a number) and infinity (positive or negative). Unix provides isnan() and isinf(), while Microsoft’s implementation uses _isnan() and