This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [PATCH] S/390: Do not raise inexact exception in lrint/lround functions in overflow case.


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


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