I have submitted a pull request <https://github.com/gonum/gonum/pull/2026> 
to gonum providing an implementation based on Cephes.
This implementation passes tests from both R's hypergeo and Python's scipy.

On Tuesday, 25 February 2025 at 20:41:04 UTC+8 Jason E. Aten wrote:

> I'm not aware of one; doesn't mean a github/web search wouldn't find one 
> though.
>
> I usually start by looking in gonum (https://www.gonum.org/ and 
> https://github.com/gonum/gonum )
>
> Sadly, it appears however they don't have it: 
> https://github.com/gonum/gonum/issues/649
>
> Generally you end up having to roll your own. A little hassle,
> but usually it turns out not to be too bad. 
>
> Post it back to gonum or at least github, if you end up writing your own.
>
> Best wishes,
> Jason
>
>
> On Tuesday, February 25, 2025 at 9:36:45 AM UTC awaw wrote:
>
> Hi Fellow Gophers
>
> I wonder is there a canonical implementation for the Gauss Hypergeometric 
> function?
>
> https://en.wikipedia.org/wiki/Hypergeometric_function
>
> There's this proposal <https://github.com/golang/go/issues/24241> that 
> didn't get through.
> There's also this implementation 
> <https://pkg.go.dev/scientificgo.org/special#HypPFQ>, but it's unclear of 
> its correctness.
>
> By correctness, I mean clear documentation on the underlying algorithm 
> used to evaluate the function.
> For example, the R hypergeo 
> <https://cran.r-project.org/web/packages/hypergeo/hypergeo.pdf> package 
> leverages the transformations listed in Abramhowitz, and applies the best 
> one under the `tol` and `max_iterations` budget.
>
> What package do people mostly use for statistical or mathematical work?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/golang-nuts/d233475f-a86e-4cf5-86e9-2e1e4e9a0a03n%40googlegroups.com.

Reply via email to