Describe the bug
This is a bug which is inherent throughout all languages due to the non-trivial floating point arithmetic varying implementations across platforms, this will result in certain platforms failing tests for various float-based operations that are non-trivial.
To Reproduce
Run cargo test on MacOS, and probably a few other OS's.
Expected behavior
All tests should pass, as these failures are simply due to floating point inaccuracies.
Build environment (please complete the following information):
Additional context
This should be solvable with use of a tolerance or by using some approximately equal assertion, just quickly looking over these, approx or float-cmp, the latter seems much more often used, this may also be used in other cases where tests fail in future cases for floating point arithmetic.
I am planning to write a PR, using float-cmp for this, however, I'll wait for the go-ahead!
Go ahead!
In fact, with float-cmp we can reinstate the builtins::math::tests::tan test, as this was commented due to a similar issue, this is linked to #260 where the test had to be commented out. I think perhaps it may be valuable to refactor many float-based tests in the math module to using float-cmp for assertions that they pass.
Specifically for refactoring the currently commented test for tan, should I submit this in a separate PR branched from this PR?