Strange behavior of `ifort`

Glad to see that the discussion is on the right track finally.

To be brief, the problem is not about how real numbers are represented and calculated on computers, or how we should compare these numbers. All of these topics are important, but unfortunately, miss the point under the current discussion.

Obviously, something is wrong when two divisions with exactly the same operands produce different results, however tiny the difference is. Even worse, as demonstrated by @urbanjost’s experiments, the results become consistent after some seemingly irrelevant changes to the code. At least, this should not be the default behavior. If this behavior is acceptable by default, I cannot conceive how/when to trust the results computed by any code involving division.

The bug has been submitted to Intel, although no attention has been received. Maybe some Intel colleagues on this discourse can file a formal bug report? Many thanks.