The clang with /Ox + /fp:fast seems to be over-optimize (incorrect pre-calculation) in the XDSP test with updated xDSP.h. This issue will be gone by changing to /fp:precise. The VC generate a function call and there is no issue with /fp:fast. It would be better to modify to complex code not affected by compiler optimization.
test_cpp_with_clang_fpfast_disasm.txt
clang /fp:fast, All complex numbers were 1.0,-0.0.
test_cpp_with_clang_fpprecise_disasm.txt
clang /fp:precise, Less accurate than VC but within updated epsilon range.
test_cpp_with_vc_fpfast_disasm.txt
VC /fp:fast, Looks good. :)
The clang with /Ox + /fp:fast seems to be over-optimize (incorrect pre-calculation) in the XDSP test with updated xDSP.h. This issue will be gone by changing to /fp:precise. The VC generate a function call and there is no issue with /fp:fast. It would be better to modify to complex code not affected by compiler optimization.
test_cpp_with_clang_fpfast_disasm.txt
clang /fp:fast, All complex numbers were 1.0,-0.0.
test_cpp_with_clang_fpprecise_disasm.txt
clang /fp:precise, Less accurate than VC but within updated epsilon range.
test_cpp_with_vc_fpfast_disasm.txt
VC /fp:fast, Looks good. :)