public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Wolfgang Bangerth <wolfgang.bangerth@iwr.uni-heidelberg.de>
To: Gabriel Dos_Reis <gdosreis@sophia.inria.fr>
Cc: gcc@gcc.gnu.org, tim@hollebeek.com
Subject: Re: What is acceptable for -ffast-math? (Was: associative law incombine)
Date: Wed, 01 Aug 2001 10:08:00 -0000	[thread overview]
Message-ID: <Pine.SOL.4.10.10108011901530.29695-100000@eros> (raw)
In-Reply-To: <15208.13215.622778.721116@perceval.inria.fr>

> The transformations in question aren't documented.  So, those having
> "valid reasons to request them" don't even know what there are
> requesting with -fdubious-math.

Well, but then we're talking about a/b/c -> a/(b*c)  "and the like", as
  a*c+b*c -> (a+b)*c
  a*x/a   -> x
and probably a whole lot of other things that are equally "dubious".


> But then, if they would have written that form in the first place.

But, as I said, there might be cases where you can't write it in an
optimized way in the first place, such as in
  inline double f() { return a/b; }
  inline double g() { return c;   }
  x = f()/g();
plus inlining. You can't just rewrite this into a form that does the
optimized computation without the help of the compiler. However, I'd bet
that for the lower parts of the compiler the resulting stream of commands
look just the same as if it were  x=a/b/c  right away.

Regards
  Wolfgang

-------------------------------------------------------------------------
Wolfgang Bangerth          email: wolfgang.bangerth@iwr.uni-heidelberg.de
                             www: http://gaia.iwr.uni-heidelberg.de/~wolf


  reply	other threads:[~2001-08-01 10:08 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-01  9:46 Wolfgang Bangerth
2001-08-01  9:58 ` Gabriel Dos_Reis
2001-08-01 10:08   ` Wolfgang Bangerth [this message]
2001-08-01 11:12     ` Gabriel Dos_Reis
2001-08-01 11:27       ` What is acceptable for -ffast-math? (Was: associative law in combine) Theodore Papadopoulo
2001-08-01 11:47         ` Gabriel Dos_Reis
2001-08-03  7:32           ` Nick Ing-Simmons
2001-08-03  6:01       ` Per Abrahamsen
  -- strict thread matches above, loose matches on Subject: below --
2001-08-01 11:44 Gabriel Dos Reis
2001-08-01 11:58 ` What is acceptable for -ffast-math? (Was: associative law incombine) Linus Torvalds
2001-08-01 10:38 What is acceptable for -ffast-math? (Was: associative law in combine) dewar
2001-08-01 10:46 ` What is acceptable for -ffast-math? (Was: associative law incombine) Linus Torvalds
2001-08-01 10:58   ` Gabriel Dos_Reis
2001-08-01 10:28 What is acceptable for -ffast-math? (Was: associative law in combine) Gabriel Dos_Reis
2001-08-01 10:41 ` What is acceptable for -ffast-math? (Was: associative law incombine) Linus Torvalds
2001-08-01 10:55   ` Gabriel Dos_Reis
2001-08-01 10:13 What is acceptable for -ffast-math? (Was: associative law in combine) dewar
2001-08-01 10:32 ` What is acceptable for -ffast-math? (Was: associative law incombine) Linus Torvalds
2001-08-01  9:24 What is acceptable for -ffast-math? (Was: associative law in combine) Tim Hollebeek
2001-08-01  9:54 ` What is acceptable for -ffast-math? (Was: associative law incombine) Linus Torvalds
2001-08-01 10:26   ` Gabriel Dos_Reis
2001-08-01 10:35     ` Linus Torvalds
2001-08-01 10:45       ` Gabriel Dos_Reis
2001-07-31 17:37 What is acceptable for -ffast-math? (Was: associative law in combine) dewar
2001-07-31 19:05 ` What is acceptable for -ffast-math? (Was: associative law incombine) Linus Torvalds
2001-07-31  7:26 What is acceptable for -ffast-math? (Was: associative law in combine) dewar
2001-07-31 17:28 ` What is acceptable for -ffast-math? (Was: associative law incombine) Linus Torvalds
2001-07-30 21:43 What is acceptable for -ffast-math? (Was: associative law in combine) Joern Rennecke
2001-07-31 18:12 ` What is acceptable for -ffast-math? (Was: associative law incombine) Linus Torvalds
2001-07-30 21:11 What is acceptable for -ffast-math? (Was: associative law in combine) Gabriel Dos Reis
2001-07-31 18:12 ` What is acceptable for -ffast-math? (Was: associative law incombine) Linus Torvalds
2001-07-30 19:22 What is acceptable for -ffast-math? (Was: associative law in combine) Alexandre Oliva
2001-07-30 21:31 ` What is acceptable for -ffast-math? (Was: associative law incombine) Mark Mitchell
2001-07-30 16:29 What is acceptable for -ffast-math? (Was: associative law in combine) Alexandre Oliva
2001-07-30 17:21 ` What is acceptable for -ffast-math? (Was: associative law incombine) Joseph S. Myers
2001-07-30 13:10 What is acceptable for -ffast-math? (Was: associative law in combine) dewar
2001-07-31  2:54 ` What is acceptable for -ffast-math? (Was: associative law incombine) Linus Torvalds
2001-07-30  8:59 What is acceptable for -ffast-math? (Was: associative law in combine) mike stump
2001-07-30 15:46 ` What is acceptable for -ffast-math? (Was: associative law incombine) Stephen L Moshier
2001-07-30  6:00 What is acceptable for -ffast-math? (Was: associative law in combine) dewar
2001-07-30 10:34 ` What is acceptable for -ffast-math? (Was: associative law incombine) Linus Torvalds
2001-07-30  0:23 What is acceptable for -ffast-math? (Was: associative law in combine) Gabriel Dos Reis
2001-07-30 11:37 ` What is acceptable for -ffast-math? (Was: associative law incombine) Linus Torvalds
2001-07-29 14:22 What is acceptable for -ffast-math? (Was: associative law in combine) dewar
2001-07-29 21:33 ` What is acceptable for -ffast-math? (Was: associative law incombine) Linus Torvalds
2001-07-29 12:52 * Re: What is acceptable for -ffast-math? (Was: associative lawin combine) Linus Torvalds
2001-07-29 14:03 ` What is acceptable for -ffast-math? (Was: associative law incombine) Stephen L Moshier
2001-07-29 21:08   ` Linus Torvalds

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.SOL.4.10.10108011901530.29695-100000@eros \
    --to=wolfgang.bangerth@iwr.uni-heidelberg.de \
    --cc=gcc@gcc.gnu.org \
    --cc=gdosreis@sophia.inria.fr \
    --cc=tim@hollebeek.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).