Infinity
From REALbasicWiki
(Redirected from Infinite number)
| Overall article skill | ✭ |
Infinity is a mathematical concept but it needed to be incorporated into computing. Hence, infinity consists in a special single or double value which is created whenever necessary.
Infinity is defined by the IEEE floating-point standard on Wikipedia.
[edit] Infinity in REALbasic
Infinity can be either positive or negative.
dim positiveInfinity, negativeInfinity as double
positiveInfinity = 1.0 / 0.0
negativeInfinity = -1.0 / 0.0
// Str( positiveInfinity ) returns "INF"
// Str( negativeInfinity ) returns "-INF"
You can also create an infinite number with:
dim myInfiniteNumber as double = Val( "INF" )
