Invalid argument exception
This macro expands to a value of type
int that identifies the floating-point exception raised on invalid arguments.
Invalid argument exceptions are raised to signal that the argument passed to a function is out of its domain (i.e., the function is not defined for that value), such as sqrt(-1.0).
The value returned by a function that raises this exception is unspecified.
FE_INVALID is defined as a value that is an exact power of two, allowing several floating-point exceptions to be combined (using the bitwise OR operator:
|) into a single value:
Certain library implementations may support additional floating-point exception values (with their corresponding macros also beginning with
|FE_DIVBYZERO||Pole error: division by zero, or some other asymptotically infinite result (from finite arguments).|
|FE_INEXACT||Inexact: the result is not exact.|
|FE_INVALID||Domain error: At least one of the arguments is a value for which the function is not defined.|
|FE_OVERFLOW||Overflow range error: The result is too large in magnitude to be represented as a value of the return type.|
|FE_UNDERFLOW||Underflow range error: The result is too small in magnitude to be represented as a value of the return type.|
|FE_ALL_EXCEPT||All exceptions (selects all of the exceptions supported by the implementation).|
Libraries may define in
only the macro values above they support (the others may not be defined).
is always defined if math_errhandling
At least all of the above macro values are defined in
(even if not supported by the implementation).