Files
wren/test/number/divide.wren
T

13 lines
413 B
Plaintext
Raw Normal View History

2014-01-08 07:47:14 -08:00
IO.print(8 / 2) // expect: 4
IO.print(12.34 / -0.4) // expect: -30.85
2013-10-31 07:04:44 -07:00
2014-01-08 07:47:14 -08:00
// Divide by zero.
IO.print(3 / 0) // expect: inf
IO.print(-3 / 0) // expect: -inf
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(0 / -0) // expect: nan
IO.print(-0 / -0) // expect: nan