Control string representation of infinity.

This commit is contained in:
Bob Nystrom
2015-03-13 07:35:10 -07:00
parent 3ac7d80af5
commit 69567c5eb5
2 changed files with 6 additions and 4 deletions
+4 -4
View File
@@ -2,11 +2,11 @@ IO.print(8 / 2) // expect: 4
IO.print(12.34 / -0.4) // expect: -30.85
// Divide by zero.
IO.print(3 / 0) // expect: inf
IO.print(-3 / 0) // expect: -inf
IO.print(3 / 0) // expect: infinity
IO.print(-3 / 0) // expect: -infinity
IO.print(0 / 0) // expect: nan
IO.print(-0 / 0) // expect: nan
IO.print(3 / -0) // expect: -inf
IO.print(-3 / -0) // expect: inf
IO.print(3 / -0) // expect: -infinity
IO.print(-3 / -0) // expect: infinity
IO.print(0 / -0) // expect: nan
IO.print(-0 / -0) // expect: nan