This section describes some miscellaneous test functions on doubles. Prototypes for these functions appear in `math.h'. These are BSD functions, and thus are available if you define _BSD_SOURCE
or _GNU_SOURCE
.
-1
if x represents negative infinity, 1
if x represents positive infinity, and 0
otherwise.
x != x
to get the same result).
infnan
to decide what to return on occasion of an error. Its argument is an error code, EDOM
or ERANGE
; infnan
returns a suitable value to indicate this with. -ERANGE
is also acceptable as an argument, and corresponds to -HUGE_VAL
as a value.
In the BSD library, on certain machines, infnan
raises a fatal signal in all cases. The GNU library does not do likewise, because that does not fit the ANSI C specification.
Portability Note: The functions listed in this section are BSD extensions.