Skip to content

Commit 574402e

Browse files
committed
fully qualify local function calls
1 parent d646342 commit 574402e

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

libcxx/include/__math/hypot.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,37 +56,37 @@ struct __hypot_factors {
5656

5757
// returns [underflow_factors, overflow_factors]
5858
template <class _Real>
59-
_LIBCPP_HIDE_FROM_ABI std::array<__hypot_factors<_Real>, 2> __create_factors() {
59+
_LIBCPP_HIDE_FROM_ABI std::array<__math::__hypot_factors<_Real>, 2> __create_factors() {
6060
static_assert(std::numeric_limits<_Real>::is_iec559);
6161

62-
__hypot_factors<_Real> __underflow, __overflow;
62+
__math::__hypot_factors<_Real> __underflow, __overflow;
6363
if constexpr (std::is_same_v<_Real, float>) {
6464
static_assert(-125 == std::numeric_limits<_Real>::min_exponent);
6565
static_assert(+128 == std::numeric_limits<_Real>::max_exponent);
66-
__underflow = __hypot_factors<_Real>{0x1.0p-62f, 0x1.0p70f, 0x1.0p-70f};
67-
__overflow = __hypot_factors<_Real>{0x1.0p62f, 0x1.0p-70f, 0x1.0p+70f};
66+
__underflow = __math::__hypot_factors<_Real>{0x1.0p-62f, 0x1.0p70f, 0x1.0p-70f};
67+
__overflow = __math::__hypot_factors<_Real>{0x1.0p62f, 0x1.0p-70f, 0x1.0p+70f};
6868
} else if constexpr (std::is_same_v<_Real, double>) {
6969
static_assert(-1021 == std::numeric_limits<_Real>::min_exponent);
7070
static_assert(+1024 == std::numeric_limits<_Real>::max_exponent);
71-
__underflow = __hypot_factors<_Real>{0x1.0p-510, 0x1.0p600, 0x1.0p-600};
72-
__overflow = __hypot_factors<_Real>{0x1.0p510, 0x1.0p-600, 0x1.0p+600};
71+
__underflow = __math::__hypot_factors<_Real>{0x1.0p-510, 0x1.0p600, 0x1.0p-600};
72+
__overflow = __math::__hypot_factors<_Real>{0x1.0p510, 0x1.0p-600, 0x1.0p+600};
7373
} else { // long double
7474
static_assert(std::is_same_v<_Real, long double>);
7575
if constexpr (sizeof(_Real) == sizeof(double))
76-
return static_cast<std::array<__hypot_factors<_Real>, 2>>(__create_factors<double>());
76+
return static_cast<std::array<__math::__hypot_factors<_Real>, 2>>(__math::__create_factors<double>());
7777
else {
7878
static_assert(-16'381 == std::numeric_limits<_Real>::min_exponent);
7979
static_assert(+16'384 == std::numeric_limits<_Real>::max_exponent);
80-
__underflow = __hypot_factors<_Real>{0x1.0p-8'190l, 0x1.0p9'000l, 0x1.0p-9'000l};
81-
__overflow = __hypot_factors<_Real>{0x1.0p8'190l, 0x1.0p-9'000l, 0x1.0p+9'000l};
80+
__underflow = __math::__hypot_factors<_Real>{0x1.0p-8'190l, 0x1.0p9'000l, 0x1.0p-9'000l};
81+
__overflow = __math::__hypot_factors<_Real>{0x1.0p8'190l, 0x1.0p-9'000l, 0x1.0p+9'000l};
8282
}
8383
}
8484
return {__underflow, __overflow};
8585
}
8686

8787
template <class _Real>
8888
_LIBCPP_HIDE_FROM_ABI _Real __hypot(_Real __x, _Real __y, _Real __z) {
89-
const auto [__underflow, __overflow] = __create_factors<_Real>();
89+
const auto [__underflow, __overflow] = __math::__create_factors<_Real>();
9090
_Real __M = std::max({__math::fabs(__x), __math::fabs(__y), __math::fabs(__z)});
9191
if (__M > __overflow.__threshold) { // x*x + y*y + z*z might overflow
9292
__x *= __overflow.__scale_xyz;
@@ -103,12 +103,12 @@ _LIBCPP_HIDE_FROM_ABI _Real __hypot(_Real __x, _Real __y, _Real __z) {
103103
return __M * __math::sqrt(__x * __x + __y * __y + __z * __z);
104104
}
105105

106-
inline _LIBCPP_HIDE_FROM_ABI float hypot(float __x, float __y, float __z) { return __hypot(__x, __y, __z); }
106+
inline _LIBCPP_HIDE_FROM_ABI float hypot(float __x, float __y, float __z) { return __math::__hypot(__x, __y, __z); }
107107

108-
inline _LIBCPP_HIDE_FROM_ABI double hypot(double __x, double __y, double __z) { return __hypot(__x, __y, __z); }
108+
inline _LIBCPP_HIDE_FROM_ABI double hypot(double __x, double __y, double __z) { return __math::__hypot(__x, __y, __z); }
109109

110110
inline _LIBCPP_HIDE_FROM_ABI long double hypot(long double __x, long double __y, long double __z) {
111-
return __hypot(__x, __y, __z);
111+
return __math::__hypot(__x, __y, __z);
112112
}
113113

114114
template <class _A1,
@@ -119,7 +119,7 @@ _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2, _A3>::type hypot(_A1 __x, _A2
119119
using __result_type = typename __promote<_A1, _A2, _A3>::type;
120120
static_assert(!(
121121
std::is_same_v<_A1, __result_type> && std::is_same_v<_A2, __result_type> && std::is_same_v<_A3, __result_type>));
122-
return __hypot(static_cast<__result_type>(__x), static_cast<__result_type>(__y), static_cast<__result_type>(__z));
122+
return __math::__hypot(static_cast<__result_type>(__x), static_cast<__result_type>(__y), static_cast<__result_type>(__z));
123123
}
124124
#endif
125125

0 commit comments

Comments
 (0)