Description |
The IsInfinite function returns True if FloatNumber is infinite in value.
|
| Related commands | Infinity | | Floating point value of infinite size | IsNaN | | Checks to see if a floating point number holds a real number | NaN | | Not a real number |
|
Download this web site as a Windows program.
|
|
|
|
Example code : Assign Infinity to a number and then test using IsInfinite | var
float : Double;
begin
 // Set the number to infinity
float := Infinity; // Equivalent to 1.0/0.0
 // Although infinite, we can still display it
ShowMessage('float = '+FloatToStr(float));
 // And we can test to see if it is infinite
if IsInfinite(float)
then ShowMessage('float is infinite')
else ShowMessage('float = '+FloatToStr(float));
end;
| Show full unit code | float = INF
float is infinite |
|
|