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

wrong values for loggamma? #4

Open
lukaz-vaultree-com opened this issue Aug 25, 2021 · 1 comment
Open

wrong values for loggamma? #4

lukaz-vaultree-com opened this issue Aug 25, 2021 · 1 comment

Comments

@lukaz-vaultree-com
Copy link

BigDecimal d9 = BigDecimal.valueOf(1.9999542254);
BigDecimal d = loggam(d9.add(BigDecimal.ONE));
System.out.println(d); //-0.000019352145145910313920070482

correct value is 0.69310494089 (https://www.wolframalpha.com/input/?i=loggamma%281.9999542254+%2B+1%29)

it's giving the value of loggamma(d9) not loggamma(d9+1) which is curious. It wouldn't matter if you called loggamma(d9) but you're calling loggamma(d9+1) so I think it's incorrect?

@ssavvides
Copy link
Owner

thank you @lucas-zee, feel free to open a PR if you want to.

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

No branches or pull requests

2 participants