[all-commits] [llvm/llvm-project] 72825f: [libc++][math] Fix undue overflowing of `std::hypo...
PaulXiCao via All-commits
all-commits at lists.llvm.org
Mon Aug 5 13:09:09 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 72825fde03aab3ce9eba2635b872144d1fb6b6b2
https://github.com/llvm/llvm-project/commit/72825fde03aab3ce9eba2635b872144d1fb6b6b2
Author: PaulXiCao <paulxicao7 at gmail.com>
Date: 2024-08-05 (Mon, 05 Aug 2024)
Changed paths:
M libcxx/include/__math/hypot.h
M libcxx/include/cmath
M libcxx/test/libcxx/transitive_includes/cxx03.csv
M libcxx/test/libcxx/transitive_includes/cxx11.csv
M libcxx/test/libcxx/transitive_includes/cxx14.csv
M libcxx/test/libcxx/transitive_includes/cxx17.csv
M libcxx/test/libcxx/transitive_includes/cxx20.csv
M libcxx/test/libcxx/transitive_includes/cxx23.csv
M libcxx/test/libcxx/transitive_includes/cxx26.csv
M libcxx/test/std/numerics/c.math/cmath.pass.cpp
M libcxx/test/support/fp_compare.h
Log Message:
-----------
[libc++][math] Fix undue overflowing of `std::hypot(x,y,z)` (#100820)
This is in relation to mr #93350. It was merged to main, but reverted
because of failing sanitizer builds on PowerPC.
The fix includes replacing the hard-coded threshold constants (e.g.
`__overflow_threshold`) for different floating-point sizes by a general
computation using `std::ldexp`. Thus, it should now work for all architectures.
This has the drawback of not being `constexpr` anymore as `std::ldexp`
is not implemented as `constexpr` (even though the standard mandates it
for C++23).
Closes #92782
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list