
NAME
 
NaN, Inf, isNaN, isInf – notanumber and infinity functions

SYNOPSIS
 
#include <u.h>
#include <libc.h>
double NaN(void)
double Inf(int)
int isNaN(double)
int isInf(double, int)

DESCRIPTION
 
The IEEE floating point standard defines values called ‘notanumber’
and positive and negative ‘infinity’. These values can be produced
by such things as overflow and division by zero. Also, the library
functions sometimes return them when the arguments are not in
the domain, or the result is out of range.
NaN returns a double that is notanumber. IsNaN returns true
if its argument is notanumber.
Inf(i) returns positive infinity if i is greater than or equal
to zero, else negative infinity. IsInf returns true if its first
argument is infinity with the same sign as the second argument.

SOURCE

