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:
@@ -0,0 +1,8 @@
|
||||
IO.print(123.ceil) // expect: 123
|
||||
IO.print(-123.ceil) // expect: -123
|
||||
IO.print(0.ceil) // expect: 0
|
||||
IO.print(-0.ceil) // expect: -0
|
||||
IO.print(0.123.ceil) // expect: 1
|
||||
IO.print(12.3.ceil) // expect: 13
|
||||
IO.print(-0.123.ceil) // expect: -0
|
||||
IO.print(-12.3.ceil) // expect: -12
|
||||
Reference in New Issue
Block a user