infnan (3)
Leading comments
Copyright 1993 David Metcalfe (david@prism.demon.co.uk) %%%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 ...
NAME
infnan - deal with infinite or not-a-number (NaN) resultSYNOPSIS
#include <math.h> double infnan(int error);
Link with -lm.
DESCRIPTION
The 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 VALUE
If 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.
ERRORS
- EDOM
- The value of error is "not-a-number" (NaN).
- ERANGE
- The value of error is positive infinity or negative infinity.