Error with `non_central_chi_squared::find_degrees_of_freedom` when running with Valgrind
- Dominant language
- C++
- Stars
- 42
- Forks
- 76
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 5
Description
Hello,
I ported the function `non_central_chi_squared::find_degrees_of_freedom` to a R package. My R-C++ function is just:
```cpp
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::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++.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.