Fixes https://github.com/boostorg/math/issues/1035.
See also https://github.com/scipy/scipy/issues/19348.
Accuracy in left tail is still poor, and the reflection formula appears to be to blame as it's use causes the series to cancel out the first term, but it appears we have no real choice in the matter here. At least we do now get a few digits correct.
If `guess` passed to `inverse_discrete_quantile` cannot be represented
as floating point number, it is possible that `guess + 1` or `guess - 1`
does not change the value at all and we are stuck in infinite loop
inside `round_to_floor` or `round_to_ceil`. Fix this by
increase/decrease more than 1 in these cases.
Example code to reproduce this:
```c++
boost::math::binomial_distribution<> dist(9079765771874083840, 0.561815);
boost::math::quantile(dist, 0.0365346);
```
If `guess` passed to `inverse_discrete_quantile` cannot be represented
as floating point number, it is possible that `guess + 1` or `guess - 1`
does not change the value at all and we are stuck in infinite loop
inside `round_to_floor` or `round_to_ceil`. Fix this by
increase/decrease more than 1 in these cases.
Example code to reproduce this:
```c++
boost::math::binomial_distribution<> dist(9079765771874083840, 0.561815);
boost::math::quantile(dist, 0.0365346);
```
* Numerical evaluation of Fourier transform of Daubechies scaling functions.
* Update example/calculate_fourier_transform_daubechies_constants.cpp
Co-authored-by: Matt Borland <matt@mattborland.com>
* Update example/fourier_transform_daubechies_ulp_plot.cpp
Co-authored-by: Matt Borland <matt@mattborland.com>
* Update include/boost/math/special_functions/fourier_transform_daubechies_scaling.hpp
Co-authored-by: Matt Borland <matt@mattborland.com>
* Update include/boost/math/special_functions/fourier_transform_daubechies_scaling.hpp
Co-authored-by: Matt Borland <matt@mattborland.com>
* Rename include file to reflect it implements both the scaling and wavelet.
* Add performance to docs.
* Update test/math_unit_test.hpp
Co-authored-by: Matt Borland <matt@mattborland.com>
* Add boost-no-inspect to files with non-ASCII characters.
---------
Co-authored-by: Matt Borland <matt@mattborland.com>