Test more sqrt corner cases
@@ -1095,6 +1095,7 @@ describe("Pallene coder /", function()
assert(2.0 == test.square_root(4.0))
assert(3.0 == test.square_root(9.0))
assert(4.0 == test.square_root(16.0))
+ assert(math.huge == test.square_root(math.huge))
]])
end)
@@ -1104,6 +1105,13 @@ describe("Pallene coder /", function()
assert(x ~= x)
]])
end)
+
+ it("returns NaN on NaN", function()
+ run_test([[
+ local x = test.square_root(0.0 / 0.0)
+ assert(x ~= x)
+ ]])
+ end)
end)
describe("value", function()
