-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add Tricomi's U through rational approximation of its asymptotic expa…
…nsion
- Loading branch information
1 parent
251d422
commit 2b47e2f
Showing
6 changed files
with
37 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
""" | ||
Compute Kummer's confluent hypergeometric function `M(a, b, z) = ₁F₁(a; b; z)`. | ||
""" | ||
function _₁F₁(a, b, z) | ||
if real(z) ≥ 0 | ||
return _₁F₁maclaurin(a, b, z) | ||
else | ||
return exp(z)*_₁F₁(b-a, b, -z) | ||
end | ||
end | ||
|
||
""" | ||
Compute Kummer's confluent hypergeometric function `M(a, b, z) = ₁F₁(a; b; z)`. | ||
""" | ||
const M = _₁F₁ | ||
|
||
""" | ||
Compute Tricomi's confluent hypergeometric function `U(a, b, z) ∼ z⁻ᵃ ₂F₀([a, a-b+1]; []; -z⁻¹)`. | ||
""" | ||
function U(a, b, z) | ||
return z^-a*pFq([a, a-b+1], typeof(z)[], -inv(z)) | ||
end |
This file contains 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
This file was deleted.
Oops, something went wrong.
2b47e2f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
2b47e2f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request created: JuliaRegistries/General/51053
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
2b47e2f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for immediate and kind commit for hypergeometricU function which is what I really need now, MikaelSlevinsky.But unstability occurs for small z. I compare the function you write with the function built-in Mathematica by MathLink.jl. And this difference shows as the picture. I would if there's any need of tuning , at least for small z case
!Thanks again!
Difference between julia and Mathematica
.