[Bug libgcc/126824] New: Incorrect rounding behavior documented for __trunc* routines

evonatarius at gmail dot com via Gcc-bugs <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126824

            Bug ID: 126824
           Summary: Incorrect rounding behavior documented for __trunc*
                    routines
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgcc
          Assignee: unassigned at gcc dot gnu.org
          Reporter: evonatarius at gmail dot com
  Target Milestone: ---

The GCC internals manual documents the following functions:

__truncxfdf2
__trunctfdf2
__truncxfsf2
__trunctfsf2
__truncdfsf2

as follows:

> These functions truncate `a` to the narrower mode of their return type, rounding toward zero.

This statement doesn't match the current libgcc implementation. The rounding
behavior of these functions depends on the target configuration and, on some
targets, the active rounding mode.

This report concerns documentation only.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.