[all-commits] [llvm/llvm-project] 40af7e: [libc++][math] Fix undue overflowing of `std::hypo...
PaulXiCao via All-commits
all-commits at lists.llvm.org
Wed Jul 24 00:24:44 PDT 2024
Branch: refs/heads/release/19.x
Home: https://github.com/llvm/llvm-project
Commit: 40af7ee9c176ad96465a6055369646e574522501
https://github.com/llvm/llvm-project/commit/40af7ee9c176ad96465a6055369646e574522501
Author: PaulXiCao <paulxicao7 at gmail.com>
Date: 2024-07-24 (Wed, 24 Jul 2024)
Changed paths:
M libcxx/include/__math/hypot.h
M libcxx/include/cmath
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)` (#93350)
The 3-dimentionsional `std::hypot(x,y,z)` was sub-optimally implemented.
This lead to possible over-/underflows in (intermediate) results which
can be circumvented by this proposed change.
The idea is to to scale the arguments (see linked issue for full
discussion).
Tests have been added for problematic over- and underflows.
Closes #92782
(cherry picked from commit 9628777479a970db5d0c2d0b456dac6633864760)
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