boost non_central_chi_squared_distribution() exception.
- Ngôn ngữ chính
- HTML
- Star
- 8.6k
- Fork
- 1.9k
- Merge trung bình
- 39 phút
- Pull request đã merge (30 ngày)
- 2
Mô tả
The following code used to give correct result (1.53) but now (1.77) throws exception:
```
boost::math::non_central_chi_squared_distribution nchi2(0.001, 100);
double res = quantile(nchi2, 0.00000000000003659);
```
// use to return 5.8758639130601491, now throws exception
I traced the issue to line 476 in boost/math/distributions/non_central_chi_squared.hpp
instead
```
if(guess == 0)
guess = tools::min_value();
```
add the checking of guess for infinity fixes the issue
```
if(guess == 0 || isinf(guess))
guess = tools::min_value();
```
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.