File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -72,10 +72,14 @@ std::array<__hypot_factors<_Real>, 2> __create_factors() {
72
72
__overflow = __hypot_factors<_Real>{0x1 .0p510, 0x1 .0p-600 , 0x1 .0p+600 };
73
73
} else { // long double
74
74
static_assert (std::is_same_v<_Real, long double >);
75
- static_assert (-16'381 == std::numeric_limits<_Real>::min_exponent);
76
- static_assert (+16'384 == std::numeric_limits<_Real>::max_exponent);
77
- __underflow = __hypot_factors<_Real>{0x1 .0p-8'190l , 0x1 .0p9' 000l, 0x1.0p-9' 000l };
78
- __overflow = __hypot_factors<_Real>{0x1 .0p8' 190l, 0x1.0p-9' 000l , 0x1 .0p+9'000l };
75
+ if constexpr (sizeof (_Real) == sizeof (double ))
76
+ return static_cast <std::array<__hypot_factors<_Real>, 2 >>(__create_factors<double >());
77
+ else {
78
+ static_assert (-16'381 == std::numeric_limits<_Real>::min_exponent);
79
+ 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 };
82
+ }
79
83
}
80
84
return {__underflow, __overflow};
81
85
}
You can’t perform that action at this time.
0 commit comments