I'm starting to learn QBASIC for while, but the first test is something I can't understand fully... There is a part about the y variable which is returning "inf" and I can't understand WHY...I searched up that in Google but its just showing "inf" error. If it IS an error at all, it should not run at all but the program is running beautifully. Here's the code :
Print "Hello World"
x = 123
Print x;
y = 123^210 * x
Print y
And here's the output :
Hello World
123 inf
Is it because The power's too much ?? It should show an error then, but the code's running perfectly...
The QBasic 1.1 Help file gives the following limits:
And in the Character set, we find that the <caret>-character represents the exponentiation as a mathematical operator. Hence, the value
123^210is, by far, larger than the maximum double-precision positive number which is2^1023 × (1 + (1 − 2^−52))