Fill in some more mathematical functions.

This commit is contained in:
Bob Nystrom
2014-01-08 07:47:14 -08:00
parent 9645ddcb26
commit a8b51f6c8b
9 changed files with 72 additions and 10 deletions
+11 -4
View File
@@ -1,5 +1,12 @@
IO.print(8 / 2) // expect: 4
IO.print(12.34 / -0.4) // expect: -30.85
IO.print(8 / 2) // expect: 4
IO.print(12.34 / -0.4) // expect: -30.85
// TODO: Unsupported RHS types.
// TODO: Divide by zero.
// 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