Math Isnormal Function - C++ Programming Tutorial
C++ Course / Math Functions / Math Isnormal Function

Math Isnormal Function

BLUF: Mastering Math Isnormal Function is a critical step in becoming a proficient C++ developer. This lesson provides a deep dive into the syntax, performance considerations, and real-world applications of this concept.
Key Performance Insight: Math Isnormal Function

C++ is renowned for its efficiency. Learn how Math Isnormal Function enables low-level control and high-performance computing in the tutorial below.

C++ Math isnormal

The function checks if a provided number is standard or not. It will output 1 if the number is standard, otherwise it will return 0.

Syntax

Suppose a number is 'x'. Syntax would be:

Example

bool  isnormal(float x);
bool  isnormal(double x);
bool  isnormal(long double x);
bool  isnormal(integral x);

Parameter

x : It is a floating point value.

Return value

Parameter(x) Return value
Infinite 0
Normal value 1
Subnormal value 0
Not a Number 0

Example 1

Let's see the simple example.

Example

#include <iostream>
#include<math.h>
using namespace std;
int main()
{
   std::cout << "isnormal(5) is : " <<isnormal(5)<< std::endl;
   std::cout << "isnormal(5.0/0.0) is : " <<isnormal(5.0/0.0)<< std::endl;
   std::cout << "isnormal(0.0/0.0) is : " <<isnormal(0.0/0.0)<< std::endl;
   return 0;
}

Output:

Output

isnormal(5) is : 1
isnormal(5.0/0.0) is : 0
isnormal(0.0/0.0) is : 0

Input Required

This code uses input(). Please provide values below:

Logic Practice
Install Logic Practice
Add to home screen for a faster app-like experience