Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: special: Fix typo in specfun::chgu #9

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Comment on lines 894 to 901
if (b <= a) {
b00 = b;
a -= b - 1.0;
b = 2.0 - b;
hu = chguit(x, a, b, &id);
hu *= pow(x, 1.0 - b);
hu *= pow(x, 1.0 - b00);
*md = 4;
} else if (bn && (~il1)) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we want to use the unmodified b.

           IF (B.LE.A) THEN
              A00=A
              B00=B 		! ........... save B, B00 <- B
              A=A-B+1.0D0
              B=2.0D0-B 	! ........... modify B, B <- 2 - B
              CALL CHGUIT(A,B,X,HU,ID)
              HU=X**(1.0D0-B00)*HU 		! use unmodified B00
              A=A00
              B=B00
              MD=4
           ELSE IF (BN.AND.(.NOT.IL1)) THEN
              CALL CHGUBI(A,B,X,HU,ID)
              MD=3
           ENDIF

xref: https://github.com/scipy/scipy/blob/9d08eb58205fb669ff72c60080b18be61b14d8e1/scipy/special/specfun/specfun.f#L4705-L4715

@steppi
Copy link
Collaborator

steppi commented Jan 13, 2025

Thanks @inkydragon. I appreciate your help finding issues like this. Until we finish getting CI set up, I don't think we can merge this and your other PR, but you can make PRs to SciPy if you like. I found that it's pretty straightforward to cherry pick commits over (it helps if there aren't any commits that touch both the xsf folder in SciPy and something outside of it). Or we can leave these open until CI is ready (hopefully this week).

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