public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "siddhesh at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug math/13932] x86_64 pow unexpectedly slow for some inputs
Date: Mon, 11 Mar 2013 10:19:00 -0000	[thread overview]
Message-ID: <bug-13932-131-Ewdsu5bW46@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-13932-131@http.sourceware.org/bugzilla/>

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

--- Comment #8 from Siddhesh Poyarekar <siddhesh at redhat dot com> 2013-03-11 10:19:19 UTC ---
(In reply to comment #7)
> Hi, thanks for your work. Personally, I would be interested to have a pow
> version that is perhaps less precise but that does not have  such nasty
> corner-cases. A 4x improvement is nice, but given that the worst-case may be
> 12,000x slower, it is not a definitive solution.
> 
> There are some implementations on the net that perhaps could be used when
> -ffast-math is given?
> 
> http://jrfonseca.blogspot.be/2008/09/fast-sse2-pow-tables-or-polynomials.html
> 
> http://www.dctsystems.co.uk/Software/power.html
> 
> http://martin.ankerl.com/2012/01/25/optimized-approximative-pow-in-c-and-cpp/
> 
> I am no expert in IEEE floating-point arithmetic, so it may well be that those
> implementations produce extremely bad approximations for some inputs. Is that
> the case?

They're all in a way subsets of what the fast phase of libm does, so we don't
really need to reimplement libm to take advantage of those ideas.

That said, there is indeed a strong case for fast and (for some inputs)
imprecise computations of transcendentals.  That probably won't be the default
in glibc, but I won't rule out the possibility of having an alternate library
or configuration, provided there is consensus in the glibc community for it.

-- 
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:[~2013-03-11 10:19 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-31  2:23 [Bug math/13932] New: " ppluzhnikov at google dot com
2012-12-13 16:45 ` [Bug math/13932] " manu at gcc dot gnu.org
2012-12-13 18:58 ` ppluzhnikov at google dot com
2013-01-04 11:33 ` siddhesh at redhat dot com
2013-01-04 23:24 ` herve at guillemet dot org
2013-03-08 14:08 ` manu at gcc dot gnu.org
2013-03-11  6:29 ` siddhesh at redhat dot com
2013-03-11  6:36 ` siddhesh at redhat dot com
2013-03-11  9:07 ` manu at gcc dot gnu.org
2013-03-11 10:19 ` siddhesh at redhat dot com [this message]
2013-08-24 21:39 ` vz-sourceware at zeitlins dot org
2013-12-03 18:42 ` jsm28 at gcc dot gnu.org
2014-02-06 18:27 ` [Bug math/13932] dbl-64 " jsm28 at gcc dot gnu.org
2014-05-07 15:42 ` jsm28 at gcc dot gnu.org
2014-06-12 19:26 ` fweimer at redhat dot com
2020-05-23 19:32 ` mtk.manpages at gmail dot com
2020-05-23 21:31 ` vincent-srcware at vinc17 dot net
2020-05-25 11:38 ` mtk.manpages at gmail dot com
2020-05-25 12:08 ` vincent-srcware at vinc17 dot net
2020-05-25 13:19 ` mtk.manpages at gmail 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-13932-131-Ewdsu5bW46@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /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).