Copyright 1993 David Metcalfe (firstname.lastname@example.org) %%%LICENSE_START(VERBATIM) Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this ...
NAMEinfnan - deal with infinite or not-a-number (NaN) result
#include <math.h> double infnan(int error);
Link with -lm.
DESCRIPTIONThe infnan() function returns a suitable value for infinity and "not-a-number" (NaN) results. The value of error can be ERANGE to represent infinity or anything else to represent NaN. errno is also set.
RETURN VALUEIf error is ERANGE (Infinity), HUGE_VAL is returned.
If error is -ERANGE (-Infinity), -HUGE_VAL is returned.
If error is anything else, NAN is returned.
- The value of error is "not-a-number" (NaN).
- The value of error is positive infinity or negative infinity.