Retoor software development Projects Research SearchXNG
Register Sign In

6 lines
144 B
Plaintext
Raw Normal View History

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.
2014-01-08 16:47:14 +01:00
IO.print(1.isNan) // expect: false
IO.print((0/0).isNan) // expect: true
// Infinity is not NaN.
IO.print((1/0).isNan) // expect: false
Reference in New Issue Copy Permalink
f2edb03389
wren/test/number/is_nan.wren
Response time: 37ms
Mail Licenses API