From: "Joseph S. Myers" <joseph@codesourcery.com>
To: Vincent Lefevre <vincent+gcc@vinc17.org>
Cc: libc-alpha@sourceware.org, gcc@gcc.gnu.org,
Geert Bosch <bosch@adacore.com>,
Christoph Lauter <christoph.lauter@lip6.fr>
Subject: Re: The state of glibc libm
Date: Wed, 14 Mar 2012 14:40:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.64.1203141432400.22094@digraph.polyomino.org.uk> (raw)
In-Reply-To: <20120314143045.GG3804@xvii.vinc17.org>
On Wed, 14 Mar 2012, Vincent Lefevre wrote:
> For double-double (IBM long double), I don't think the notion of
> correct rounding makes much sense anyway. Actually the double-double
> arithmetic is mainly useful for the basic operations in order to be
> able to implement elementary functions accurately (first step in
> Ziv's strategy, possibly a second step as well). IMHO, on such a
> platform, if expl() (for instance) just calls exp(), this is OK.
expl just calling exp - losing 53 bits of precision - seems rather
extreme. But I'd think it would be fine to say: when asked to compute
f(x), take x' within 10ulp of x, and return a number within 10ulp of
f(x'), where ulp is interpreted as if the mantissa were a fixed 106 bits
(fewer bits for subnormals, of course). (And as a consequence, accurate
range reduction for large arguments would be considered not to matter for
IBM long double; sin and cos could return any value in the range [-1, 1]
for sufficiently large arguments.)
> > (b) Where functions do make attempts at being correctly rounded
> > (especially the IBM Accurate Mathematical Library functions), they tend to
> > be sufficiently slow that the slowness attracts bug reports. Again, this
> > would likely be addressed by new implementations that use careful error
> > bounds and information about worst cases to reduce the cost of being
> > correctly rounding.
>
> I'm not sure that the complaints are about worst cases. More probably
> software implementation vs hardware implementation in the average
> case. But a new software implementation (better in average) could
> help.
Various bugs do complain about particular cases being slow (as well as
about such things as sinf being slower than sin - there, if you
automatically generate functions based not just on the type for the
function being generated but also on what wider types are available and
efficient in hardware, you could generate a version of sinf that uses
double or long double computations internally to speed things up).
--
Joseph S. Myers
joseph@codesourcery.com
next prev parent reply other threads:[~2012-03-14 14:40 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-29 18:21 Joseph S. Myers
2012-02-29 21:56 ` David Miller
2012-03-14 14:31 ` Vincent Lefevre
2012-03-14 14:40 ` Joseph S. Myers [this message]
2012-03-15 2:08 ` Vincent Lefevre
2012-03-15 18:23 ` James Cloos
2012-03-16 12:17 ` Steven Munroe
2012-03-22 16:11 ` Vincent Lefevre
2012-03-22 16:29 ` Joseph S. Myers
2012-03-26 10:26 ` Vincent Lefevre
2012-03-26 16:13 ` Steven Munroe
2012-03-27 13:01 ` Vincent Lefevre
2012-03-14 16:11 ` Jeff Law
2012-03-14 16:30 ` Joseph S. Myers
2012-03-14 17:08 ` Jeff Law
2012-03-14 20:37 ` Andi Kleen
2012-03-14 21:05 ` Joseph S. Myers
2012-03-14 21:47 ` Andi Kleen
2012-03-15 9:46 ` Richard Guenther
2012-03-15 14:18 ` Andi Kleen
2012-03-15 14:24 ` Richard Guenther
2012-03-14 21:57 ` David Miller
2012-03-14 20:52 ` Marc Glisse
2012-03-14 21:08 ` Joseph S. Myers
2012-03-28 15:18 ` Joseph S. Myers
[not found] <CAFULd4bg4Ctr_CUZAduBbkV+s6A_Y0cACNfuiE5iAYRtEeUoDg@mail.gmail.com>
2012-03-15 14:53 ` Uros Bizjak
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=Pine.LNX.4.64.1203141432400.22094@digraph.polyomino.org.uk \
--to=joseph@codesourcery.com \
--cc=bosch@adacore.com \
--cc=christoph.lauter@lip6.fr \
--cc=gcc@gcc.gnu.org \
--cc=libc-alpha@sourceware.org \
--cc=vincent+gcc@vinc17.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).