Weak Sequential equivalence
For weak sequential equivalence only mathematically valid constraints are enforced.
- Floating point arithmetic is not associative and not commutative.
- In most cases, no particular grouping of floating point operations is mathematically preferred so why take a performance hit by forcing the sequential order?
- In most cases, if you need a particular grouping of floating point operations, you have a bad algorithm.
How do you write a program that is portable and satisfies weak sequential equivalence?
- Follow the same rules as the strong case, but relax sequential ordering constraints.