[llvm] 84b365c - [LangRef] Correct documentation for `roundeven` (#125452)

via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 28 19:37:05 PST 2025


Author: Trevor Gross
Date: 2025-03-01T10:37:01+07:00
New Revision: 84b365c26b963de47ed4b712f59d276b15871ddb

URL: https://github.com/llvm/llvm-project/commit/84b365c26b963de47ed4b712f59d276b15871ddb
DIFF: https://github.com/llvm/llvm-project/commit/84b365c26b963de47ed4b712f59d276b15871ddb.diff

LOG: [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

Added: 
    

Modified: 
    llvm/docs/LangRef.rst

Removed: 
    


################################################################################
diff  --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index 0e48362a854f6..33c85c7ba9d29 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -17396,8 +17396,8 @@ Semantics:
 """"""""""
 
 This function implements IEEE-754 operation ``roundToIntegralTiesToEven``. It
-also behaves in the same way as C standard function ``roundeven``, except that
-it does not raise floating point exceptions.
+also behaves in the same way as C standard function ``roundeven``, including
+that it disregards rounding mode and does not raise floating point exceptions.
 
 
 '``llvm.lround.*``' Intrinsic


        


More information about the llvm-commits mailing list