-
Notifications
You must be signed in to change notification settings - Fork 226
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
Query cyl_bessel_k for cpp_double_double #1228
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #1228 +/- ##
===========================================
- Coverage 93.83% 93.83% -0.01%
===========================================
Files 657 657
Lines 55243 55231 -12
===========================================
- Hits 51838 51826 -12
Misses 3405 3405
Continue to review full report in Codecov by Sentry.
|
This is a Math lib bug, and I've filed an issue with reduced test case here: #1229. It's not trivial to fix though, and I'm not sure how important the use case is, so my gut feeling is to push this to the long grass for the minute. |
Thank you John. That seems like a wise idea since scaling the recursion or other heavy-handed activities seem like a bit much. |
Hi John, I thought it might be easiest to keep the test point (the arrays and all the indexing stay the same), but change the order and argument. The test case appears in three individual areas. I'm liking for this test case, with |
If you get a chance, John (@jzmaddock), no hurry though, I'd like your opinion on my proposed changes to Cc: @mborland |
Remember to also compute the derivative. Note to self:
|
Hi @ckormanyos and Merry Christmas! Yes those changes are all good: if you wanted to be extra picky about it, you could add full specializations of log_max_value/log_min_value (in your MP code) given that those could presumably be noexcept and constexpr then? But yes, please do go ahead and merge this PR when ready! |
Thanks John (@jzmaddock) Merry Christmas also! Nothing like a few special functions of applied mathematics to raise the holida spirit!
Great!
I was considering adding these within the code of the multi-precision backend. Your comment now completes my motivation to do this. I'll do it in the next round. It is too time consuming to compute the logarithms in actual run-time, so a constexpr pure number would, in fact, be superior.
DONE! |
Hi John (@jzmaddock) I'm down to only 2 remaining functions having troubles with the candidate
cpp_double_double
.On$O(10^{-31}$ , but the intermediate steps do some underflowing.
cyl_bessel_k(-1000, T(700.0))
I have issues that I can't resolve alone. The result is not bad, havingThis calculation breaks the$-291/+308$ .
min_exponent10
/max_exponent10
near-symmetry, so the proposed (big) change inprecision.hpp
has motivated bycpp_double_double
havingmin_exponent10
/max_exponent10
ofThe real problem, however came when starting the recursion for$K_{1000}(700)$ . The value of $K_0(700)$ came back subnormal and the value of $K_1(0)$ was zero. This messed up the recursion start and lead to the wrong answer, regardless of how
exp(-x)
was calculated (halved or not).I know there would theoreticlaly be a way to do the recursion with another scaling, but that would be a very large change in Math requiring start points for scaled/unscaled$K_0(x)$ and $K_1(x)$ .
Do you see a way that the unusual$K_{1000}(700)$ ?
cpp_double_double
can actually with modest impact on Math calculateCc: @mborland