[PATCH v2] libstdc++: Use __FLT_EVAL_METHOD__ to enable test for piecewise distributions.
Jonathan Wakely
jwakely@redhat.com
Fri Jul 17 15:21:17 GMT 2026
On Fri, 17 Jul 2026 at 11:24, Tomasz Kaminski <tkaminsk@redhat.com> wrote:
>
>
>
> On Fri, Jul 17, 2026 at 12:06 PM Jakub Jelinek <jakub@redhat.com> wrote:
>>
>> On Fri, Jul 17, 2026 at 11:52:21AM +0200, Tomasz Kamiński wrote:
>> > As pointed out by Jakub, the use of excess precision is most likely source
>> > of differences.
>> >
>> > libstdc++-v3/ChangeLog:
>> >
>> > * testsuite/26_numerics/random/piecewise_constant_distribution/operators/serialize2.cc:
>> > Guard test_custom invocations with __FLT_EVAL_METHOD__ macros.
>> > * testsuite/26_numerics/random/piecewise_linear_distribution/operators/serialize2.cc:
>> > Guard test_custom invocations with __FLT_EVAL_METHOD__ macros.
>> > ---
>> > Jakub could you check if that fixes the issue for you?
>> > Test are passing with -m32 on my machine, but they were also yesterday.
>>
>> IMHO either don't include <cfloat>, or use FLT_EVAL_METHOD instead of
>> __FLT_EVAL_METHOD__.
>> The latter is compiler predefined macro used in float.h
>> #define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
>> the former is the standard macro defined by that header.
>
> Removed the <cfloat> include, and will push it to trunk in a moment.
I would prefer to rely on the standard macro rather than the internal one.
More information about the Libstdc++
mailing list