Skip to content

Commit d64bbb1

Browse files
committed
Add a disclaimer about x86 f128 math functions
Due to a LLVM bug, `f128` math functions link successfully but LLVM chooses the wrong symbols (`long double` symbols rather than those for binary128). Since this is a notable problem that may surprise a number of users, add a note about it. Link: llvm/llvm-project#44744
1 parent e1d23c9 commit d64bbb1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

library/core/src/primitive_docs.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1244,6 +1244,9 @@ mod prim_f64 {}
12441244
/// actually implement it. For x86-64 and AArch64, ISA support is not even specified,
12451245
/// so it will always be a software implementation significantly slower than `f64`.
12461246
///
1247+
/// _Note: `f128` support is incomplete. Many platforms will not be able to link math functions. On
1248+
/// x86 in particular, these functions do link but their results are always incorrect._
1249+
///
12471250
/// *[See also the `std::f128::consts` module](crate::f128::consts).*
12481251
///
12491252
/// [wikipedia]: https://en.wikipedia.org/wiki/Quadruple-precision_floating-point_format

0 commit comments

Comments
 (0)