From 79533f042dac72f31ab57bf9a32cd1364193db02 Mon Sep 17 00:00:00 2001 From: Matthias Goerner <1239022+unhyperbolic@users.noreply.github.com> Date: Thu, 3 Aug 2023 15:24:12 -0700 Subject: [PATCH] Making min diameter a constant. --- python/verify/short_slopes.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/python/verify/short_slopes.py b/python/verify/short_slopes.py index 60ce68004..a09b530a9 100644 --- a/python/verify/short_slopes.py +++ b/python/verify/short_slopes.py @@ -28,7 +28,10 @@ def sqrt(x): return x.sqrt() return math.sqrt(x) - +# Reject computing short slopes if intervals for translations +# are too wide (error is more than 1%). +_min_diameter_translations = 0.01 + def short_slopes_from_cusp_shape_and_area( cusp_shape, cusp_area, length=6): """ @@ -144,12 +147,12 @@ def _verified_short_slopes_from_translations(translations, length=6): "Could not verify that longitude meridian translation " "has non-trivial imaginary part.") - if m_tran.diameter() > 0.01: + if m_tran.diameter() > _min_diameter_translations: raise InsufficientPrecisionError( "Meridian translation has insufficient precision to compute " "a reasonable set of short slopes.") - if l_tran.diameter() > 0.01: + if l_tran.diameter() > _min_diameter_translations: raise InsufficientPrecisionError( "Longitude translation has insufficient precision to compute " "a reasonable set of short slopes.")