-
Notifications
You must be signed in to change notification settings - Fork 0
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
Ensure function tests running #140
Conversation
# Conflicts: # include/boost/multiprecision/cpp_double_fp.hpp # test/math/test_gamma.cpp
The purpose of this PR is to check the original GSoC algos together with all improvements on formal conversoins, limits, elementary functions, string read, etc. The actual source code is capable of switching from the original GSoC algos to the Briggs style algos with a new compiler switch. in this PR the switch is set for tunning the origninal GSoC algos. |
Hi Fahad (@sinandredemption) It seems like we now have 5 test files failing. This last push should run through but is not intended have any functional changes, as it was simply a Git merge from develop into this branch. If it stays so good, we will merge to develop. Feel free to merge this branch and PR into develop after CI runs, please. Then I'll start removing some of my own redundant branches, as this gives us here probaly what we deed to finish In detail, one of the failing test cases that seem interesting includes the following, in which Let's see where it overflows or underflows.
|
Hi Fahad, it looks like buit-in I wonder if the limited exponent range of the
|
Hi Fahad (@sinandredemption), and finally, test cases similar to this particular test case starts to fail when the x-coordinate of the Bessel-K function increases. I seem to recall the multiplication of two extreme numbers for the Bessel-K. Could it be that x-coordinate 700 simply can't be used with
|
Thank you Chris (@ckormanyos) for your detailed and helpful analysis. I am investigating the issues, and will let you know my thoughts soon. |
Yes Chris (@ckormanyos), it seems like that is the case. I investigated the first case you sent, and it seems while computing It makes me wonder, is this acceptable? A casual user of this library might not expect such quirks and has to be very careful in advance if the resulting operation would underflow, given the extreme asymmetry of the exponent range. Does that mean we should optionally provide special underflow flags for this data type? EDIT: Note that double_fp constructions have a asymmetrical exponent range, i.e. valid exponent ranges for |
More details: the underflow occurs here in function bessel_k0_imp:
The part that underflows is This causes the function to return 0, which finally causes all the iterations to evaluate to 0 while computing the bessel function with function bessel_kn. CC: @ckormanyos |
Oh yes. Absolutely. I believe we have to find the range(s) where construct and/or possibly even mul/div will lead to overflow/underflow. I suspect these might be asymmetrically reduced ranges compared to the constituent type. Then when doing add/sub/mul/div, we usually detect overflow/underflow/infinitiy/NaN and zero purposefully and set these accorgingly to avoid nonsense such as inf/inf leading to NaN. As it turns out, I believe our ranges and edeg-case detection maight, in fact, be the most significant blocking points on We should do a bit more thinking and work on range checking and might even need to adjust the selected min/max values for the composite type. We might hash out this discussion here as well as in offline chats and maybe future issues. But I think this is kind of the last big hurdle for the |
Anyway, since this is really our, let's say, best state so far with the good CI and just a few failing files in I'll be cleaning up some of my redundant branches, since the new develop hass kind of all the right stuff to probably finish... |
Hi Fahad (@sinandredemption), thanks for investigating these matters. I wrote a long text on non-finite values in our offline chat, as I believe we have quite a lot more depth on this issue to discuss before formally finishing edge cases. Regarding the exact BesselK test case, I'm not actually sure if the We might re-visit this exact test case when we get a solid grip on infinities, NaNs, zeros and possible subnormals. |
No description provided.