public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/15384] New: One constant fewer in ieee754/dbl-64/wordsize-64/s_finite.c
@ 2013-04-21 10:06 marc.glisse at normalesup dot org
  2013-04-21 10:54 ` Ondřej Bílka
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: marc.glisse at normalesup dot org @ 2013-04-21 10:06 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=15384

             Bug #: 15384
           Summary: One constant fewer in
                    ieee754/dbl-64/wordsize-64/s_finite.c
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: math
        AssignedTo: unassigned@sourceware.org
        ReportedBy: marc.glisse@normalesup.org
    Classification: Unclassified


Hello,

this is very minor, and I don't even know what platforms use this file, but in
ieee754/dbl-64/wordsize-64/s_finite.c:

int
__finite(double x)
{
  int64_t lx;
  EXTRACT_WORDS64(lx,x);
  return
(int)((uint64_t)((lx&INT64_C(0x7fffffffffffffff))-INT64_C(0x7ff0000000000000))>>63);
}

The first constant 0x7fffffffffffffff is unnecessary, it would work just as
well with 0x7ff0000000000000, so there is only one constant loaded. The same
applies to the 32 bit version, but for platforms like x86 that embed 32 bit
constants in the instruction it probably wouldn't matter.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-09-17 16:49 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-21 10:06 [Bug math/15384] New: One constant fewer in ieee754/dbl-64/wordsize-64/s_finite.c marc.glisse at normalesup dot org
2013-04-21 10:54 ` Ondřej Bílka
2013-04-21 10:54 ` [Bug math/15384] " neleai at seznam dot cz
2013-04-21 11:03 ` ondra at iuuk dot mff.cuni.cz
2013-04-21 14:39 ` ondra at iuuk dot mff.cuni.cz
2013-04-21 14:46 ` ondra at iuuk dot mff.cuni.cz
2013-04-21 15:44 ` marc.glisse at normalesup dot org
2013-04-21 15:59 ` marc.glisse at normalesup dot org
2013-04-21 17:27 ` ondra at iuuk dot mff.cuni.cz
2013-04-21 18:06 ` marc.glisse at normalesup dot org
2013-04-22  8:32 ` ondra at iuuk dot mff.cuni.cz
2014-06-13 18:22 ` fweimer at redhat dot com
2015-09-17 16:48 ` cvs-commit at gcc dot gnu.org
2015-09-17 16:49 ` jsm28 at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).