This is the mail archive of the glibc-bugs@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]

[Bug math/13658] sincos() is incorrect for large inputs on x86_64


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

--- Comment #2 from Vincent LefÃvre <vincent-srcware at vinc17 dot net> 2012-02-03 15:09:07 UTC ---
For the reference about the hardware trig instructions, you can see "Intel 64
and IA-32 Architectures Software Developer's Manual Volume 1: Basic
Architecture" on:

 
http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html

in particular Section 8.1.3.2, which says:

"The FPTAN, FSIN, FCOS, and FSINCOS instructions set the C2 flag to 1 to
indicate that the source operand is beyond the allowable range of Â2^63 and
clear the C2 flag if the source operand is within the allowable range."

So, outside the interval [-2^63,+2^63] ("allowable range"), these instructions
must not be used (or they can be used, but with a fallback if the C2 flag is
set to 1). But note that the glibc implementation is more accurate, even with
(very probably) correct rounding, so that it is better to use it anyway.

-- 
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.


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