-
Notifications
You must be signed in to change notification settings - Fork 230
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
First batch changes double-fp-backend #1226
Conversation
See also PR154 in GSoC repo Cc: @sinandredemption and @cosurgi |
One example of a change needed comes from the test point of the irregular Bessel function We need to compute which internally needs to compute the value of This number, however, underflows |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #1226 +/- ##
===========================================
- Coverage 93.83% 93.83% -0.01%
===========================================
Files 657 657
Lines 55241 55241
===========================================
- Hits 51836 51833 -3
- Misses 3405 3408 +3
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Hi John (@jzmaddock) and Matt (@mborland) there seem to be some tolerance issues in files like I'm not qualified to "up" the relevant tolerances. Does anyone know if these failures are relevant? Is it just a tolerance issue? Or does something actually need to be done? I'm not entirely sure, but I do not think my changes in areas like Bessel functions are related. But you never know in Math. Anyway, could you guys take a look? Thanks. |
Github updated the version of MSVC2022 and it caused three tests to fail consistently. I can nudge up the tolerance a bit because it's been consistent across runs instead of sporadic like normal tolerance problems. |
Should I just do that here while I'm on such a roll? If that's what's to be done, I can handle it. Thx Matt (@mborland) |
Please do |
Wow, @ckormanyos thank you very much for working on this. I am quite busy at the moment, so I only had a brief look, but please keep working. I don't remember much, but if it will be needed I will try to recall what I wrote in some of my code, when you will need it. |
Thanks @cosurgi we are actually getting close. Conservatively, I think we can get the double-fp backend into summer 1.89. But I might even hope for April's 1.88. Let's see if we can get all the edge cases to behave. It's not that far off the mark now. I'd like to first get double-double stable and in, then in a second push charge on for quad. |
Cycling now |
OK guys, CI is green. Yet the first batch of changes is not quite ready. For the type
I consider the second point to be done. The sub-normal case is a bit more tricky and I still need to check if my zero-handling is correct in the backend. Then we'll see what's up on that test case. Cc: @jzmaddock Also @mborland the adjusted tolerances on the cases we mentioned are (perhaps liberal) but green. |
OK, I think I see the issue, min and max values are asymetric, so in bessel_k0.hpp:473 the line:
Should actually be:
There will be other places as well... you caught me be lazy!! But that (along with any other similar mistakes) should fix things. |
OK amazing catch John, let me run that thing through CI and see how it shakes out.
It's really rather easy-going. I have a really short remaining-issue-list with one single point of Let me see if we can dial in this double-trouble type ASAP. |
Ah OK. John with the change in
Otherwise I get the vanilla hard-coded values for logarithms of max/min values. And I'm fine, perfectly fine defining this (at least preliminarily) in the Let me back out the changes in Then the only open point is: |
I mean in this PR. There will be batch2 of specfun changes needed to negotiate coming when we finish batch1. |
OK I needed to correct two wrongly-placed I need to move forward with this thing. So I just reverted the test-case-change on |
What I meant to say was - "I tend to make the same mistake over and over" so since all the Bessel rational approximations are pretty similar, there are probably other places where we have this bug whether or not we happen to have (un)fortunate test values in the (un)sweet spot that triggers the issue.
That should definitely NOT be needed unless there's something wrong with your numeric_limits specialization?
The result in that case is a denorm at double precision, is that the issue? |
Me too.
Maybe. Or perhaps I don't yet have proper handling of underflow(s) and/or zeros. I'll take a bit more time to figure out what I really need to do. But that is my assignment. In this PR, there is basically now just one change of an exponent-check constant, two removals of the word |
OK, so s390 is hanging on drone. Everything else is green. This thing will fix one single failure in the onslaught of There is nothing more controversial in this PR. I can play around with it since the erroneous Also the tolerances are corrected on some of those distributions mentioned above. So I'll push this thing. Then I need to study up on the backend details and find out exactly what is causing some of the final edge case failures. So this will be ocntinued in future PRs. Cc: @jzmaddock and @mborland |
I need to make some tiny changes in the Math tests when testing the candidate
double_fp_backend<double>
as a multiprecision backend.The min./max. exponents are really small (comparatively) for a multiple-precision type. I'm running the tests for double-double, which has$-291$ and $308$ . So this causes a few over/underflows unexpectedly for a multiprecision type under test.
min_exponent10
ofmax_exponent10
ofA second batch of similarly small, but more difficult-to-make changes will be needed. But I will do these in a second step, pending approval of the first, simpler batch.
Cc: @jzmaddock and @mborland