Compiler floating-point operation optimizations causing non-BE behaviour
Starting from version 14 Apple clang compiler [changed](https://releases.llvm.org/14.0.0/tools/clang/docs/ReleaseNotes.html#floating-point-support-in-clang) the default behaviour of FP contraction (FMA) from `off` to `on`. This attempts to optimize certain floating point operations, but may cause inaccurate results, e.g., on ARM Macs ([short description](https://discourse.llvm.org/t/fp-contraction-fma-on-by-default/64975/3)). This problem was observed when working on !1160 as it caused non-BE behaviour in the output before and after refactoring. Two potential fixes: 1. Disable the optimizations with ``` set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffp-contract=off") ``` 2. Or, build the project for x86 instead of native architecture ``` -D CMAKE_OSX_ARCHITECTURES=x86_64 ```
issue