This repository has been archived by the owner on Jan 30, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Workaround to prevent this calculation to blow the stack
Specifically, the CPython interpreter's symbol visibility analysis makes recursive calls into a function called `symtable_visit_expr`, and can overflow the stack when analyzing a very large expression of binary operators (this also came up in this ticket: https://trac.sagemath.org/ticket/16014). While I seek a more general fix to that problem, we need to work around it. In this case the polynomial `psi` is converted one term at a time, and then summed, rather than summed first and then converted (resulting in evaluating a very large Singular polynomial). The result is the same either way though might be slightly slower with this workaround, though I haven't tested.
- Loading branch information