Run-Time Problem
You can't take the square root of a negative number (P57)
|
![]() |
Most problems are detected when Inform translates the source text, but this is one of the exceptions, a "run-time problem" which emerges only during play. Inform's square root of... phrase can only take the square root of 0 or a positive number. Although mathematicians are able to invent imaginary numbers, making sense out of square roots of negative numbers, Inform doesn't do this. There just isn't an Inform number which squares to give -1, so it cannot possibly produce a result of the square root of -1. |