File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
libc/src/__support/FPUtil Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -81,18 +81,19 @@ template <typename T, size_t N> struct ExceptValues {
8181 StorageType out_bits = values[i].rnd_towardzero_result ;
8282 switch (fputil::quick_get_round ()) {
8383 case FE_UPWARD:
84- out_bits += static_cast <decltype (out_bits)>(
85- sign ? values[i].rnd_downward_offset
86- : values[i].rnd_upward_offset );
84+ if (sign)
85+ out_bits += values[i].rnd_downward_offset ;
86+ else
87+ out_bits += values[i].rnd_upward_offset ;
8788 break ;
8889 case FE_DOWNWARD:
89- out_bits += static_cast <decltype (out_bits)>(
90- sign ? values[i].rnd_upward_offset
91- : values[i].rnd_downward_offset );
90+ if (sign)
91+ out_bits += values[i].rnd_upward_offset ;
92+ else
93+ out_bits += values[i].rnd_downward_offset ;
9294 break ;
9395 case FE_TONEAREST:
94- out_bits +=
95- static_cast <decltype (out_bits)>(values[i].rnd_tonearest_offset );
96+ out_bits += values[i].rnd_tonearest_offset ;
9697 break ;
9798 }
9899 T result = FPBits<T>(out_bits).get_val ();
You can’t perform that action at this time.
0 commit comments