diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst index b5918e3063d86..02d4dce557a3d 100644 --- a/llvm/docs/LangRef.rst +++ b/llvm/docs/LangRef.rst @@ -15751,7 +15751,11 @@ Semantics: """""""""" This function returns the same values as the libm ``rint`` functions -would, and handles error conditions in the same way. +would, and handles error conditions in the same way. Since LLVM assumes the +:ref:`default floating-point environment `, the rounding mode is +assumed to be set to "nearest", so halfway cases are rounded to the even +integer. Use :ref:`Constrained Floating-Point Intrinsics ` +to avoid that assumption. .. _int_nearbyint: @@ -15789,7 +15793,11 @@ Semantics: """""""""" This function returns the same values as the libm ``nearbyint`` -functions would, and handles error conditions in the same way. +functions would, and handles error conditions in the same way. Since LLVM +assumes the :ref:`default floating-point environment `, the rounding +mode is assumed to be set to "nearest", so halfway cases are rounded to the even +integer. Use :ref:`Constrained Floating-Point Intrinsics ` to +avoid that assumption. .. _int_round: