feat: add ceil, cos, sin, sqrt, isNan native methods and division-by-zero tests

Implement five new Num methods (ceil, cos, sin, sqrt, isNan) in wren_core.c and register them on the Num class. Add corresponding test files for ceil, floor, is_nan, and sqrt. Extend divide.wren with division-by-zero edge cases (inf, -inf, nan). Remove stale TODO comments from minus, multiply, and plus tests.
This commit is contained in:
Bob Nystrom
2014-01-08 15:47:14 +00:00
parent 693ab1c340
commit 193e4e30ab
9 changed files with 72 additions and 10 deletions
-2
View File
@@ -1,5 +1,3 @@
IO.print(1 + 2) // expect: 3
IO.print(12.34 + 0.13) // expect: 12.47
IO.print(3 + 5 + 2) // expect: 10
// TODO: Unsupported RHS types.