- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Recently I did some refactoring work and verified that the original code and refactored code will produce exactly the same results under Debug mode.
However, if I switch to Release mode. the original code and refactored code will produce slightly different results, the difference is around the scale of 10^-10 ~10^-15. It looks like it's some precision issue. I'm wondering why there's such difference ? Is there anyway to remove this difference ?
Although the difference is small, but maybe because the refactored code needs to be run millions of times, the final results is very different.
I'm using Intel(R) Visual Fortran Compiler 16.0 [Intel(R) 64]
Thanks,
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please see Improving Numerical Reproducibility in C/C++/Fortran
This discussion on StackOverflow, especially the first answer, is also relevant: fortran - MATMUL result not equal with explicit calculation for double precision? - Stack Overflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page