| macro | isnormal(x) |
|---|
| function | bool isnormal (float x);bool isnormal (double x);bool isnormal (long double x); |
|---|
int value. The type of x shall be float, double or long double.bool value.true) if x is normal; and zero (false) otherwise.1
2
3
4
5
6
7
8
9
10
11
/* isnormal example */
#include <stdio.h> /* printf */
#include <math.h> /* isnormal */
int main()
{
printf ("isnormal(1.0) : %d\n",isnormal(1.0));
printf ("isnormal(0.0) : %d\n",isnormal(0.0));
printf ("isnormal(1.0/0.0): %d\n",isnormal(1.0/0.0));
return 0;
}
isnormal(1.0) : 1 isnormal(0.0) : 0 isnormal(1.0/0.0): 0