Skip to content

Conversation

mdhaber
Copy link
Contributor

@mdhaber mdhaber commented Sep 22, 2024

Reference issue

Closes gh-12895
Closes gh-17920

What does this implement/fix?

gh-12895 requests that the sign convention for special.riccati_yn be changed from $xy_n(x)$ to $-xy_n(x)$. Both conventions are valid, and SciPy's convention can be found in reputable references including Abramowitz and Stegun and DLMF (#12895 (comment)), so I don't think we would change it now to please some and disrupt others. This PR modifies the documentation to highlight the convention used by SciPy.

@mdhaber mdhaber added scipy.special Documentation Issues related to the SciPy documentation. Also check https://github.com/scipy/scipy.org labels Sep 22, 2024
y_n(x)`, where :math:`y_n` is the spherical Bessel function of the second
kind of order :math:`n`.
kind of order :math:`n`. _Note that this is in contrast to a common convention
that includes a minus sign in the definition._
Copy link
Contributor

Choose a reason for hiding this comment

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

The DLMF reference seems to support the current usage, I wasn't smart enough to read the older PDF reference. I guess the negation convention is related to the singularity.

Is the _ notation doing what you intend in the rendered version?

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, I guess I was mixing up with markdown

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image

Thanks @tylerjereddy. Fixed.

@lucascolley lucascolley changed the title DOC: special.riccati_yn: highlight sign convention DOC: special.riccati_yn: highlight sign convention Sep 22, 2024
Copy link
Member

@lucascolley lucascolley left a comment

Choose a reason for hiding this comment

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

thanks Matt!

@lucascolley lucascolley added this to the 1.15.0 milestone Sep 22, 2024
@lucascolley lucascolley merged commit d4ee7c7 into scipy:main Sep 22, 2024
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Issues related to the SciPy documentation. Also check https://github.com/scipy/scipy.org scipy.special
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: special: Riccati Bessel function of the second kind lacks a minus sign BUG: special.riccati_yn: Definition missing minus sign
3 participants