In C++, the isnormal() function is defined in the <cmath> or <math.h> header file and is used to determine whether a floating-point value is normal or not. A normal floating-point value is neither zero, subnormal, infinite, nor NaN (Not a Number).
The isnormal() function supports float, double, long double, and integer values.
It has the following syntax.
x: It is a floating point value.
| Parameter(x) | Return value |
|---|---|
| Infinite | 0 |
| Normal value | 1 |
| Subnormal value | 0 |
| Not a Number | 0 |
Here, we are going to discuss several examples to demonstrate the List isnormal() Function Function.
This example demonstrates how the isnormal() function checks normal, infinite, and NaN values.
Output:
isnormal(5) is : 1 isnormal(5.0/0.0) is : 0 isnormal(0.0/0.0) is : 0
This example demonstrates how the isnormal() function behaves when the input value is zero.
Output:
Value of x is : 0 isnormal(x) is : 0
This example demonstrates how the isnormal() function behaves when the input value is a subnormal floating-point value.
Output:
Value of x is : 1.11254e-308 isnormal(x) is : 0
We request you to subscribe our newsletter for upcoming updates.

We deliver comprehensive tutorials, interview question-answers, MCQs, study materials on leading programming languages and web technologies like Data Science, MEAN/MERN full stack development, Python, Java, C++, C, HTML, React, Angular, PHP and much more to support your learning and career growth.
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India