public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: kaih@khms.westfalen.de (Kai Henningsen)
To: gcc@gcc.gnu.org
Subject: Re: why not consfold sin(const)
Date: Mon, 20 Sep 2004 08:15:00 -0000	[thread overview]
Message-ID: <9HFmjhjmw-B@khms.westfalen.de> (raw)
In-Reply-To: <87oek257mp.fsf@codesourcery.com>

zack@codesourcery.com (Zack Weinberg)  wrote on 19.09.04 in <87oek257mp.fsf@codesourcery.com>:

> Luchezar Belev <l_belev@yahoo.com> writes:
>
> >> Yes, but it does not stretch as far as giving complete junk results,
> >> which is what would happen in some cases if you used host functions.
> >
> > I see. I'm surprised that in the compiler there is no sin/cos/log/etc.
> > funcs already implemented for other reasons.
>
> I'm not sure about exp/log, but trigonometric functions are
> substantially harder to implement with accuracy over their entire
> domain (i.e. the range of the floating-point type) - to do argument
> reduction, glibc has a table giving 2/pi to 5628 hexadecimal digits!
>
> This is the sort of thing where we'd probably take a patch if someone
> wrote one, but we don't consider it very important, certainly not
> compared to how hard it would be to code.  And I think you are
> seriously underestimating the difficulty.

I'd expect that looking into stuff like that would get much more  
interesting if gcc had gmp+mpfr regularly available (as opposed to only  
gfortran using it as an external library).

MfG Kai

  reply	other threads:[~2004-09-20  7:11 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-19 16:02 Luchezar Belev
2004-09-19 18:00 ` Robert Dewar
2004-09-19 19:17   ` Luchezar Belev
2004-09-19 19:31     ` Robert Dewar
2004-09-19 19:55       ` Luchezar Belev
2004-09-19 20:25         ` Robert Dewar
2004-09-19 20:34           ` Luchezar Belev
2004-09-19 20:56             ` Zack Weinberg
2004-09-20  8:15               ` Kai Henningsen [this message]
2004-09-19 21:12             ` Robert Dewar
2004-09-19 20:53           ` Timothy J.Wood
2004-09-19 22:41             ` Robert Dewar
2004-09-20  0:31               ` Timothy J.Wood
2004-09-20  4:27                 ` Robert Dewar
2004-09-20  5:44                   ` Dale Johannesen
2004-09-20 19:43       ` Toon Moene
2004-09-20 20:34         ` Kaveh R. Ghazi
2004-09-20 23:31         ` Robert Dewar
2004-09-21  0:13         ` Scott Robert Ladd
2004-09-21  5:18           ` Steven Bosscher
2004-09-21  5:55             ` Scott Robert Ladd
2004-09-23 11:35 Bradley Lucier
2004-09-23 23:04 ` Toon Moene

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=9HFmjhjmw-B@khms.westfalen.de \
    --to=kaih@khms.westfalen.de \
    --cc=gcc@gcc.gnu.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).