MATLAB Application Program Interface Reference | Help Desk |
mxIsInf
True if value is infinite
#include "matrix.h" bool mxIsInf(double value);value
The double-precision, floating-point number that you are testing.
true
if value is infinite; otherwise, returns false
.
Call mxIsInf
to determine whether or not value
is equal to infinity. MATLAB stores the value of infinity in a permanent variable named inf
, which represents IEEE arithmetic positive infinity. The value of inf
is built into the system; you cannot modify it.
Operations that return infinity include
5/0
returns infinity.
exp(10000)
returns infinity because the result is too large to be represented on your machine.
value
equals NaN
(Not-a-Number), then mxIsInf
returns false
. In other words, NaN
is not equal to infinity.
See mxIsInf.c
in the mx
subdirectory of the examples
directory.
mxIsFinite
, mxIsNaN