Skip to content

Commit 84b365c

Browse files
authored
[LangRef] Correct documentation for roundeven (#125452)
Langref for `roundeven` implies that the C standard function `roundeven` may raise floating point exceptions. However, this is not correct; C23 does not mention exceptions for `roundeven`, and per [1] `FE_INEXACT` is never raised. Clarify that LLVM's `roundeven` behaves the same. [1]: https://en.cppreference.com/w/c/numeric/math/roundeven
1 parent cef6dbb commit 84b365c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/docs/LangRef.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17396,8 +17396,8 @@ Semantics:
1739617396
""""""""""
1739717397

1739817398
This function implements IEEE-754 operation ``roundToIntegralTiesToEven``. It
17399-
also behaves in the same way as C standard function ``roundeven``, except that
17400-
it does not raise floating point exceptions.
17399+
also behaves in the same way as C standard function ``roundeven``, including
17400+
that it disregards rounding mode and does not raise floating point exceptions.
1740117401

1740217402

1740317403
'``llvm.lround.*``' Intrinsic

0 commit comments

Comments
 (0)