This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 18/numeric_limits fail on solaris 2.8


Paolo Carlini wrote:

> Anyway, in this kind of test it seems to me in order an abs(), like:
>
> VERIFY( abs(extrema_min - limits_min) < epsilon );
> VERIFY( abs(limits_min - extrema_min) < epsilon );
> VERIFY( abs(extrema_max / limits_max) < (1 + epsilon) );
> VERIFY( abs(limits_max / extrema_max) < (1 + epsilon) );

Sorry, I meant the abs only for the first two, like:

    VERIFY( abs(extrema_min - limits_min) < epsilon );
    VERIFY( abs(limits_min - extrema_min) < epsilon );

But the second two still seem not ok. Something like this should be needed:

    VERIFY( (extrema_max / limits_max) < (1 + epsilon) &&
                       (extrema_max / limits_max) > (1 - epsilon));

    VERIFY( (limits_max / extrema_max) < (1 + epsilon) &&
                       (limits_max / extrema_max) > (1 - epsilon));

P.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]