mxIsInf (C and Fortran)
Determine whether input is infinite
#include "matrix.h" bool mxIsInf(double value);
#include "fintrf.h" integer*4 mxIsInf(value) real*8 value
Double-precision, floating-point number to test
true) if value is infinite, and
mxIsInf to determine whether
equal to infinity or minus infinity. MATLAB® software stores the value of infinity in a permanent variable named
Inf, which represents IEEE® arithmetic positive infinity. The value of the variable
Inf is built into the system; you cannot modify it.
Operations that return infinity include:
Division by 0. For example,
Operations resulting in overflow. For example,
exp(10000)returns infinity because the result is too large to be represented on your machine.
NaN (Not-a-Number), then
false. In other words,
NaN is not equal to infinity.
See these examples in
Introduced before R2006a