Open sroelants opened 6 days ago
e.g. in the lerp.wat tests, the test will pass or fail depending on how you structure the operations (because IEEE).
lerp.wat
// equal(lerp(10, 0, 1.1), -1) let works = 10 - 1.1 * 10 + 1.1 * 0 // -1 let fails = (1 - 1.1) * 10 + 1.1 * 0 // -1.0000000000000009
Most of the other float tests either use equalClose directly, or alias it to equal.
equalClose
equal
https://github.com/danprince/wasm-challenges/blob/79200c7d37dc9dcd5fac80fee086505de307465a/tests.mjs#L590
Must have just missed it for the lerp tests!
lerp
e.g. in the
lerp.wat
tests, the test will pass or fail depending on how you structure the operations (because IEEE).