Files
wren/test/core/number/divide.wren
T

13 lines
433 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.
2015-03-13 07:35:10 -07:00
IO.print(3 / 0) // expect: infinity
IO.print(-3 / 0) // expect: -infinity
2014-01-08 07:47:14 -08:00
IO.print(0 / 0) // expect: nan
IO.print(-0 / 0) // expect: nan
2015-03-13 07:35:10 -07:00
IO.print(3 / -0) // expect: -infinity
IO.print(-3 / -0) // expect: infinity
2014-01-08 07:47:14 -08:00
IO.print(0 / -0) // expect: nan
IO.print(-0 / -0) // expect: nan