[PATCH] S/390: Do not raise inexact exception in lrint/lround functions in overflow case.
Joseph Myers
joseph@codesourcery.com
Fri Jan 15 22:24:00 GMT 2016
On Fri, 15 Jan 2016, Stefan Liebler wrote:
> Hi,
>
> I get some math test-failures on s390 for float/double/ldouble for
> various lrint/lround functions like:
> lrint (0x1p64): Exception "Inexact" set
> lrint (-0x1p64): Exception "Inexact" set
> lround (0x1p64): Exception "Inexact" set
> lround (-0x1p64): Exception "Inexact" set
> ...
>
> GCC emits "convert to fixed" instructions for casting floating point
> values to integer values. These instructions raise invalid and inexact
> exceptions if the floating point value exceeds the integer type ranges.
>
> This patch enables the various FIX_DBL_LONG_CONVERT_OVERFLOW macros in
> order to avoid a cast from floating point to integer type and raise the
> invalid exception with feraiseexcept.
> The ldbl-128 rint/round functions are now using the same logic.
OK, given the usual bug filed in Bugzilla for a user-visible issue, listed
in the ChangeLog entry and marked as FIXED with the appropriate milestone
set when the fix is committed.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list