What’s the difference between identical(x, y) and isTRUE(all.equal(x, y))?

all.equal tests for near equality, while identical is more exact (e.g. it has no tolerance for differences, and it compares storage type). From ?identical: The function ‘all.equal’ is also sometimes used to test equality this way, but was intended for something different: it allows for small differences in numeric results. And one reason you would … Read more

Why can’t I compare reals in Standard ML?

Why doesn’t 1.0 = 2.0 work? Isn’t real an equality type? No. The type variable ”Z indicates that the operands of = must have equality types. Why won’t reals in patterns work […]? Pattern matching relies implicitly on testing for equality. The cryptic error message syntax error: inserting EQUALOP indicates that the SML/NJ parser does … Read more