direct: update birect.py

This commit is contained in:
Connor Olding 2024-02-15 19:15:56 -08:00
parent af95821dbb
commit da4d8a171d

View file

@ -307,7 +307,8 @@ def birect(
diagonal_cache, longest_cache = precompute_diagonals_by_length(min_diag) diagonal_cache, longest_cache = precompute_diagonals_by_length(min_diag)
depth_limit = len(diagonal_cache) 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): 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 if precision_met() or no_more_evals(): # check stopping conditions