-
Notifications
You must be signed in to change notification settings - Fork 112
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
Compiling float128 failed in g++ 13.2 with the latest boost::multiprecision #569
Comments
Does the issue persist if you build with |
Yes, the issue is solved. This is to enable gnu extensions in c++20. Thank you! |
Just to confirm, that float128.hpp does indeed require gnu++XX not c++-XX, it should be documented somewhere... |
As far as my findings from boost.org and pdfs, requiring gnu++XX in float128 is not documented. |
I think you're right actually, I dimly remember removing that restriction, hence the use of quad_min/quad_max rather than Q suffixed constants. Will investigate further... |
Ummm, I'm not the expert here, but I think what the I'm almost certain that the fundamental support of Check it at Godbolt. |
Admittedly, |
My example was not nice. Here is a better one. |
OK, so here's the issue... we used to rely on Q suffixed constants for numeric_limits support, those were removed so that's all good. The issue here is convertibility... __float128 is only explicitly convertible to type number when building with c++XX rather than gnu++XX.... and the reason for that is that __float128 is not an arithmetic type (according to <type_traits>) when building with c++XX.... and we have a general rule in place that "arithmetic types are always implicitly convertible, everything else is only explicitly convertible and only if the backend has a suitable constructor". So either.... we change the convertibility rules so that __float128 is always treated as an arithmetic type, or I just add some explicit casts to the numeric_Limits functions. The former seems more logical, but messes up the enable_if logic if we have to treat __float128 as a special case. I also have a hunch that we're not testing any of this, so the testing logic needs looking at too... |
As a note the specializations of numeric_limits is changing in GCC 14: boostorg/math#992. I am not sure off hand if that is the case for <type_traits> too. |
Oh yes. That was one of the other things that is enabled by We need a list somewhere reminding what does and does not happen to |
This program showcases what is available for |
Allows float128 to be used in non gnu mode. Enable some tests for non-gnu mode. Fixes #569.
* Make __float128 a floating point type. Allows float128 to be used in non gnu mode. Enable some tests for non-gnu mode. Fixes #569. Also: * Remove msvc-14.0 testing as no longer supported. * correct float128_snips.cpp * Run specfun tests on github rather than CircleCI as the latter runs out of resources.
Dear all. I just encountered an issue when compiling the following code, which is to invoke the
boost::math::expm1
function.The command line for compiling code is:
The compiler error output is considerable. However, the main issue is
max min
type conversion:In above code, this issue will disappear if replacing
float128
bympfr_float_50
. Theboost::multiprecision
I used is the latest development version. The error happens whenever a math function needs to invokemax min
offloat128
. It seems that a bug exists infloat128.hpp
in boost. I hope the information above is enough to find the issue. Thanks a lot.Sean
The text was updated successfully, but these errors were encountered: