File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
libc/src/__support/FPUtil Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ LIBC_INLINE T find_leading_one(T mant, int &shift_length) {
3030 if (mant > 0 ) {
3131 shift_length = (sizeof (mant) * 8 ) - 1 - cpp::countl_zero (mant);
3232 }
33- return (T)( T (1 ) << shift_length);
33+ return static_cast <T>(( T (1 ) << shift_length) );
3434}
3535
3636} // namespace internal
@@ -207,9 +207,8 @@ LIBC_INLINE T hypot(T x, T y) {
207207
208208 for (StorageType current_bit = leading_one >> 1 ; current_bit;
209209 current_bit >>= 1 ) {
210- r = (StorageType)(r << 1 ) + ((tail_bits & current_bit) ? 1 : 0 );
211- StorageType tmp =
212- (StorageType)(y_new << 1 ) + current_bit; // 2*y_new(n - 1) + 2^(-n)
210+ r = static_cast <StorageType>((r << 1 )) + ((tail_bits & current_bit) ? 1 : 0 );
211+ StorageType tmp = static_cast <StorageType>((y_new << 1 )) + current_bit; // 2*y_new(n - 1) + 2^(-n)
213212 if (r >= tmp) {
214213 r -= tmp;
215214 y_new += current_bit;
You can’t perform that action at this time.
0 commit comments