JuliaMath / JuliaMath/HypergeometricFunctions.jl

_₂F₁(-n,1.5,2.5,2) loses accuracy for large n

Open
#49 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Julia
Stars
76
Forks
12
PR merge metrics
No merged PRs in 30d

Description

These two expressions should be identical,
```julia
a=[2*sqrt(2)/(n+1)*_₂F₁(1,n+2.5,n+2,-1)+(-1)^n*beta(n+1,1.5) for n=0:100]
c=[2*sqrt(2)*(-1)^n*beta(1.5,1)*_₂F₁(-n,1.5,2.5,2) for n=0:100]
```
But it turns out that `a` is more accurate:
```julia
plot(abs.([a c]), yaxis=:log, labels=["a" "c"])
```
![image](https://user-images.githubusercontent.com/44583944/187695961-9991c7d5-f672-461b-aa03-6007e269befd.png)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.