File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
libc/src/__support/FPUtil Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -135,15 +135,16 @@ LIBC_INLINE T hypot(T x, T y) {
135135 uint16_t b_exp = b_bits.get_biased_exponent ();
136136
137137 if ((a_exp - b_exp >= FPBits_t::FRACTION_LEN + 2 ) || (x == 0 ) || (y == 0 )) {
138+ #ifdef LIBC_TYPES_HAS_FLOAT16
138139 if constexpr (cpp::is_same_v<T, float16>) {
139140 // Compiler runtime for basic operations of float16 might not be correctly
140141 // rounded for all rounding modes.
141142 float af = fputil::cast<float >(x_abs.get_val ());
142143 float bf = fputil::cast<float >(y_abs.get_val ());
143144 return fputil::cast<float16>(af + bf);
144- } else {
145+ } else
146+ #endif // LIBC_TYPES_HAS_FLOAT16
145147 return x_abs.get_val () + y_abs.get_val ();
146- }
147148 }
148149
149150 uint64_t out_exp = a_exp;
You can’t perform that action at this time.
0 commit comments