Skip to content

Commit

Permalink
code style changes
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulXiCao committed Jul 26, 2024
1 parent e9b00a4 commit 0ff240d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions libcxx/include/__math/hypot.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,16 @@ _LIBCPP_HIDE_FROM_ABI _Real __hypot(_Real __x, _Real __y, _Real __z) {
_Real __scale;
if (__max_abs > __overflow_threshold) { // x*x + y*y + z*z might overflow
__scale = __overflow_scale;
__x *= __scale;
__y *= __scale;
__z *= __scale;
} else if (__max_abs < 1 / __overflow_threshold) { // x*x + y*y + z*z might underflow
__scale = 1 / __overflow_scale;
__x *= __scale;
__y *= __scale;
__z *= __scale;
} else
} else {
__scale = 1;
}
__x *= __scale;
__y *= __scale;
__z *= __scale;

// Compute hypot of scaled arguments and undo scaling
return __math::sqrt(__x * __x + __y * __y + __z * __z) / __scale;
}

Expand Down

0 comments on commit 0ff240d

Please sign in to comment.