Anonymous user
Infinity: Difference between revisions
→{{header|MATLAB}}: Added an explanation and changed the sample code.
(→Python: Another way) |
(→{{header|MATLAB}}: Added an explanation and changed the sample code.) |
||
Line 351:
=={{header|MATLAB}}==
MATLAB implements the IEEE 754 floating point standard as the default for all numeric data types. +Inf and -Inf are by default implemented and supported by MATLAB. To check if a variable has the value +/-Inf, one can use the built-in function "isinf()" which will return a Boolean 1 if the number is +/-inf.
<lang Matlab>a = +Inf;
isinf(a);
Returns:
<lang Matlab>
ans =
1
</lang>
=={{header|Metafont}}==
|