Skip to content

Fix crashing Hankel1.n() calls - #306

Merged
inducer merged 3 commits into
inducer:mainfrom
alexfikl:symengine-hankel-evalf
Sep 13, 2026
Merged

inducer merged 3 commits into
inducer:mainfrom
alexfikl:symengine-hankel-evalf

Conversation

@alexfikl

Copy link
Copy Markdown
Collaborator

From what I can tell, the test was hard segfaulting on main because it was getting somewhere into symengine that assumes function wrappers of this type always return numeric values on .n(). It was then trying to cast that to a number and crashing..

The fix here works if the arguments to Hankel1/BesselJ are actually numeric, by going through sympy to evaluate them. If they're not numeric it still crashes, so that needs some code in symengine and symengine.py.

@inducer
inducer force-pushed the symengine-hankel-evalf branch from 70e88b3 to ffa511b Compare September 12, 2026 19:19
@inducer
inducer merged commit a234493 into inducer:main Sep 13, 2026
9 checks passed
@inducer

inducer commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Thx!

@alexfikl
alexfikl deleted the symengine-hankel-evalf branch October 6, 2026 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants