What would you like to share?
Investigate differences in modulo between compilers. In particular compiling with intel leads to a larger difference in the result compared to Python
I cannot remember why such a large tolerance is needed on Intel. Maybe it uses a "fast-math" algorithm for the modulo operation? Is this problem language-specific, or is it the same for C, C++, and Fortran?
Originally posted by @yguclu in #2628 (comment)
I'm not sure we ever investigated this, we just assumed that it must be using a different algorithm. From memory, the issue was the same for C and Fortran, C++ support hasn't been added for this file yet (maybe it is in #2537)
Originally posted by @EmilyBourne in #2628 (comment)
See:
|
# Relative and absolute tolerances for array comparisons in the form |
|
# numpy.isclose(a, b, rtol, atol). Intel seems to use a different algorithm |
|
if os.environ.get("PYCCEL_DEFAULT_COMPILER", "GNU") == "intel": |
|
RTOL = 1e-10 |
|
ATOL = 1e-10 |
Checklist 🚀
What would you like to share?
Investigate differences in modulo between compilers. In particular compiling with intel leads to a larger difference in the result compared to Python
See:
pyccel/tests/epyccel/test_epyccel_mod.py
Lines 10 to 14 in 1eae791
Checklist 🚀