From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 110187 invoked by alias); 6 Oct 2015 23:36:34 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org Received: (qmail 109944 invoked by uid 48); 6 Oct 2015 23:36:29 -0000 From: "jsm28 at gcc dot gnu.org" To: glibc-bugs@sourceware.org Subject: [Bug math/19079] New: dbl-64/wordsize-64 lround based on llround incorrect for ILP32 Date: Tue, 06 Oct 2015 23:36:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: math X-Bugzilla-Version: 2.22 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jsm28 at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-10/txt/msg00090.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=19079 Bug ID: 19079 Summary: dbl-64/wordsize-64 lround based on llround incorrect for ILP32 Product: glibc Version: 2.22 Status: NEW Severity: normal Priority: P2 Component: math Assignee: unassigned at sourceware dot org Reporter: jsm28 at gcc dot gnu.org Target Milestone: --- The implementation of lround in dbl-64/wordsize-64 as an alias or wrapper for llround is always incorrect when long is not 64-bit, because it misses required exceptions in overflow cases. E.g., for MIPS n32 modified to use this code: Failure: lround (0x1p31): Exception "Invalid operation" not set Failure: lround (0x1p32): Exception "Invalid operation" not set Failure: lround (0x1p33): Exception "Invalid operation" not set Failure: lround (-0x1p32): Exception "Invalid operation" not set Failure: lround (-0x1p33): Exception "Invalid operation" not set Failure: lround (-0x1p63): Exception "Invalid operation" not set Failure: lround_downward (0x1p31): Exception "Invalid operation" not set Failure: lround_downward (0x1p32): Exception "Invalid operation" not set Failure: lround_downward (0x1p33): Exception "Invalid operation" not set Failure: lround_downward (-0x1p32): Exception "Invalid operation" not set Failure: lround_downward (-0x1p33): Exception "Invalid operation" not set Failure: lround_downward (-0x1p63): Exception "Invalid operation" not set Failure: lround_towardzero (0x1p31): Exception "Invalid operation" not set Failure: lround_towardzero (0x1p32): Exception "Invalid operation" not set Failure: lround_towardzero (0x1p33): Exception "Invalid operation" not set Failure: lround_towardzero (-0x1p32): Exception "Invalid operation" not set Failure: lround_towardzero (-0x1p33): Exception "Invalid operation" not set Failure: lround_towardzero (-0x1p63): Exception "Invalid operation" not set Failure: lround_upward (0x1p31): Exception "Invalid operation" not set Failure: lround_upward (0x1p32): Exception "Invalid operation" not set Failure: lround_upward (0x1p33): Exception "Invalid operation" not set Failure: lround_upward (-0x1p32): Exception "Invalid operation" not set Failure: lround_upward (-0x1p33): Exception "Invalid operation" not set Failure: lround_upward (-0x1p63): Exception "Invalid operation" not set -- You are receiving this mail because: You are on the CC list for the bug.