Skip to content

Commit bfd4fa9

Browse files
committed
fixup! [libc][math][c23] Add {,u}fromfp{,x}{,f,l,f128} functions
1 parent 3b2d2eb commit bfd4fa9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

libc/docs/dev/undefined_behavior.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,11 @@ The C standard does not specify behavior for ``printf("%s", NULL)``. We will
8181
print the string literal ``(null)`` unless using the
8282
``LIBC_COPT_PRINTF_NO_NULLPTR_CHECKS`` option described in :ref:`printf
8383
behavior<printf_behavior>`.
84+
85+
Unknown Math Rounding Direction
86+
-------------------------------
87+
The C standard states that if the value of the ``rnd`` argument of the
88+
``fromfp``, ``ufromfp``, ``fromfpx`` and ``ufromfpx`` functions is not equal to
89+
the value of a math rounding direction macro, the direction of rounding is
90+
unspecified. LLVM's libc chooses to use the ``FP_INT_TONEAREST`` rounding
91+
direction in this case.

0 commit comments

Comments
 (0)