BUG: amos/amos.h: fix translation bugs in binu and rati#138
Open
JaRoSchm wants to merge 1 commit intoscipy:mainfrom
Open
BUG: amos/amos.h: fix translation bugs in binu and rati#138JaRoSchm wants to merge 1 commit intoscipy:mainfrom
JaRoSchm wants to merge 1 commit intoscipy:mainfrom
Conversation
Contributor
|
Thanks for digging so deep into this difficult code. Tests should go into this folder. You could mimic the approach from the other tests in that folder. With a little help from the LLM of your choice, it should hopefully not be too difficult (at least that was my experience as someone who never used ctest before). Do you have any specific questions? |
dschmitz89
reviewed
May 6, 2026
Comment on lines
2790
to
+2795
| if (nw > 0) { | ||
| return -1; | ||
| nz = -1; | ||
| if (nw == -2) { | ||
| nz = -2; | ||
| } | ||
| return nz; |
Contributor
There was a problem hiding this comment.
The if condition in 2792 is unreachable as first we check for nw>0 and then for nw==-2. Was this in the original Fortran source?
dschmitz89
requested changes
May 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference issue
What does this implement/fix?
Hi, I detected these errors in the same way as in #92. This time I used
besjwithz = 70.26595687262548 - 0.7026595687262548jand n = 50 in https://github.com/JaRoSchm/pyamos/blob/main/compare_xsf_zbessel.py for finding the bugs. This was simply incorrectly translated from FORTRAN, see https://github.com/scipy/scipy/blob/4edfcaa3ce8a387450b6efce968572def71be089/scipy/special/amos/. Regarding testing the same question/comment from #92 applies.Additional information
AI Generation Disclosure
No AI tools used