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

Error with non_central_chi_squared::find_degrees_of_freedom when running with Valgrind #95

Open
stla opened this issue Oct 13, 2023 · 0 comments

Comments

@stla
Copy link

stla commented Oct 13, 2023

Hello,

I ported the function non_central_chi_squared::find_degrees_of_freedom to a R package. My R-C++ function is just:

double find_chisq_df(double delta, double q, double p){
  // gives nu such that pchisq(q, nu, delta) = p
  return non_central_chi_squared::find_degrees_of_freedom(delta, q, p);
}

When an example is executed under Valgrind, this error is generated:

Error in function boost::math::non_central_chi_squared_distribution<long double>::non_central_chi_squared_distribution(long double,long double): Degrees of freedom argument is -nan, but must be > 0 !

Would you have an idea of the cause? I'm really not fluent in C++.

@mclow mclow transferred this issue from boostorg/boost Oct 13, 2023
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

1 participant