Section: Base Constants
y = inf
The returned type is a 64-bit float, but demotion to 64 bits preserves the infinity.
Note that infinities are not preserved under type conversion to integer types (see the examples below).
--> inf*0 ans = nan --> inf*2 ans = inf --> inf*-2 ans = -inf --> inf/inf ans = nan --> inf/0 ans = inf --> inf/nan ans = nan --> quit
Note that infinities are preserved under type conversion to floating point types (i.e., float
, double
, complex
and dcomplex
types), but not integer types.
--> uint32(inf) ans = 0 --> complex(inf) ans = inf + 0.0000i --> quit