Skip to content

Commit

Permalink
Merge pull request #16 from davidozog/pr/associativity_note
Browse files Browse the repository at this point in the history
reductions: add note about FP associativity
  • Loading branch information
davidozog authored Oct 9, 2024
2 parents ceb9652 + d7a4aa5 commit c2addc4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions content/shmem_reductions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,18 @@ \subsubsubsection{PROD}
Zero on successful local completion. Nonzero otherwise.
}

\apinotes{
The binary operations performed by \openshmem reductions are intended to be
associative and commutative.
However, floating point arithmetic is not associative or commutative due to
the inherent inaccuracies of floating-point representations caused by
rounding errors and finite precision.
This can lead to variations in the result of \openshmem arithmetic
reduction operations on floating-point datatypes, including NaN values.
A future version of the \openshmem specification may clarify the behavior
of reductions on floating point datatypes.
}

\begin{apiexamples}

\apicexample
Expand Down

0 comments on commit c2addc4

Please sign in to comment.