Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
brryan committed Sep 24, 2024
1 parent b6eaaec commit aec04ad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/utils/robust.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ KOKKOS_INLINE_FUNCTION auto ratio(const A &a, const B &b) {
// Optionally return true if reference value is close to zero
KOKKOS_FORCEINLINE_FUNCTION
bool SoftEquiv(const Real &val, const Real &ref,
const Real eps = 10. * std::numeric_limits<Real>::epsilon(),
const bool pass_on_small = true) {
return ((std::fabs(val - ref) < eps * std::fabs(ref))
|| ((std::fabs(ref) <std::numeric_limits<Real>::min()) && pass_on_small));
const Real eps = 10. * std::numeric_limits<Real>::epsilon(),
const bool pass_on_small = true) {
return ((std::fabs(val - ref) < eps * std::fabs(ref)) ||
((std::fabs(ref) < std::numeric_limits<Real>::min()) && pass_on_small));
}

} // namespace robust
Expand Down

0 comments on commit aec04ad

Please sign in to comment.