This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/15384] New: One constant fewer in ieee754/dbl-64/wordsize-64/s_finite.c
- From: "marc.glisse at normalesup dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Sun, 21 Apr 2013 10:06:00 +0000
- Subject: [Bug math/15384] New: One constant fewer in ieee754/dbl-64/wordsize-64/s_finite.c
- Auto-submitted: auto-generated
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.