From da4d8a171d63080ad31f0478711274c81a4ef598 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Thu, 15 Feb 2024 19:15:56 -0800 Subject: [PATCH] direct: update birect.py --- direct/birect.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/direct/birect.py b/direct/birect.py index a4742cb..568f7f1 100644 --- a/direct/birect.py +++ b/direct/birect.py @@ -307,7 +307,8 @@ def birect( diagonal_cache, longest_cache = precompute_diagonals_by_length(min_diag) depth_limit = len(diagonal_cache) - diagonal_cache = precompute_diagonals_by_limit(depth_limit) + if depth_limit <= 500: # prevents OverflowError: int too large to convert to float + diagonal_cache = precompute_diagonals_by_limit(depth_limit) for outer in range(1_000_000 if max_iters is None else max_iters): if precision_met() or no_more_evals(): # check stopping conditions