public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "vincent-srcware at vinc17 dot net" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sources.redhat.com
Subject: [Bug math/13658] sincos() is incorrect for large inputs on x86_64
Date: Fri, 03 Feb 2012 15:09:00 -0000	[thread overview]
Message-ID: <bug-13658-131-0meU0klvsc@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-13658-131@http.sourceware.org/bugzilla/>

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.


  parent reply	other threads:[~2012-02-03 15:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-03 14:42 [Bug math/13658] New: sincos() is inaccurate " vincent-srcware at vinc17 dot net
2012-02-03 14:43 ` [Bug math/13658] sincos() is incorrect " vincent-srcware at vinc17 dot net
2012-02-03 15:00 ` aj at suse dot de
2012-02-03 15:09 ` vincent-srcware at vinc17 dot net [this message]
2012-02-03 19:58 ` ppluzhnikov at google dot com
2012-02-13  4:54 ` carlos at systemhalted dot org
2012-03-15 13:26 ` aj at suse dot de
2012-03-15 13:31 ` aj at suse dot de
2012-03-15 13:43 ` aj at suse dot de
2012-03-15 13:48 ` aj at suse dot de
2012-03-15 15:14 ` aj at suse dot de
2013-06-03 16:05 ` carlos at redhat dot com
2014-02-16 16:56 ` jackie.rosen at hushmail dot com
2014-05-28 19:42 ` schwab at sourceware dot org
2014-06-27  9:57 ` fweimer at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-13658-131-0meU0klvsc@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).