Two heights are one breakpoint when they differ by at most the plan's geometric tolerance or by the few ULPs that binary64 cannot resolve at their magnitude. Only the second term sees the absolute coordinate, so a representable tilt (tens of ULPs) far from the origin stays inclined.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | a | |||
| real(kind=dp), | intent(in) | :: | b | |||
| real(kind=dp), | intent(in) | :: | geometric_tolerance |
pure logical function zero_mode_heights_coincide(a, b, geometric_tolerance) result(coincide) real(dp), intent(in) :: a, b, geometric_tolerance coincide = abs(a - b) <= max(geometric_tolerance, 8.0_dp*spacing(max(abs(a), abs(b)))) end function zero_mode_heights_coincide