public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Toon Moene <toon@moene.indiv.nluug.nl>
To: Joe Buck <Joe.Buck@synopsys.COM>
Cc: Bradley Lucier <lucier@math.purdue.edu>,
	 roger@eyesopen.com,  gdr@integrable-solutions.net,
	 gcc@gcc.gnu.org,  abraham@dina.kvl.dk,  gcc-patches@gcc.gnu.org,
	 laurent@guerby.net,  fjahanian@apple.com
Subject: Re: GCC beaten by ICC in stupid trig test!
Date: Wed, 24 Mar 2004 23:48:00 -0000	[thread overview]
Message-ID: <4061F6EF.3090803@moene.indiv.nluug.nl> (raw)
In-Reply-To: <20040324110433.A2050@synopsys.com>

Joe Buck wrote:

> No.  Why would we need such a thing?  If the user does not care about
> order of evaluation, the user can write a+b+c .  As someone said, right
> now we can't tell the difference between a+b+c; if we turn it into GIMPLE
> and make t1 = a+b; 52 = t1+c; we can't tell if the user initially wrote
> (a+b)+c or a+b+c. 

This is true as far as Fortran is concerned (I cannot speak for other 
languages).

A+B+C means that the compiler could either evaluate (A+B)+C or A+(B+C) 
or (A+C)+B.

If you don't write the parentheses, you leave it up to the compiler to 
find the most convenient sequence of computations.

Dave Korn wrote:

 >   IIUIC the fact that the + operator is specified in the standard as
 > binding left-to-right imply that "a + b + c" with no brackets *has* to
 > be interpreted as "(a + b) + c".

No, it establishes the way the multi-operator expressions may be 
combined *for interpretation*.  I.e., what the expression means (on a 
high level, before applying such rules as 1.4 (6) [This standard does 
not specify] ... the method of rounding, approximating or computing 
numeric values on a particular processor").

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://gcc.gnu.org/fortran/ (under construction)

  reply	other threads:[~2004-03-24 21:00 UTC|newest]

Thread overview: 85+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-24 19:04 Bradley Lucier
2004-03-24 19:29 ` Joe Buck
2004-03-24 19:43   ` Bradley Lucier
2004-03-24 19:50     ` Joe Buck
2004-03-24 23:48       ` Toon Moene [this message]
2004-03-25  0:02         ` Toon Moene
2004-03-25  0:11           ` Roger Sayle
2004-03-25  5:56             ` Scott Robert Ladd
2004-03-25  6:07             ` Bradley Lucier
2004-03-25  8:18             ` Robert Dewar
2004-03-25 16:15               ` Roger Sayle
2004-03-25 16:36                 ` David Edelsohn
2004-03-25 17:09                   ` Scott Robert Ladd
2004-03-25 17:47                     ` David Edelsohn
2004-03-25 18:03                       ` Scott Robert Ladd
2004-03-26  1:29                 ` Toon Moene
2004-03-27  0:23                 ` Daniel Egger
2004-03-27  0:50                 ` Laurent GUERBY
2004-03-27  0:55                   ` Joe Buck
2004-03-27  0:58                     ` Laurent GUERBY
2004-03-27  1:16                       ` Joe Buck
2004-03-25  5:36         ` Gabriel Dos Reis
2004-03-25  8:46           ` Robert Dewar
2004-03-25  5:34       ` Gabriel Dos Reis
2004-03-25  7:24       ` Robert Dewar
2004-03-25  8:28         ` Gabriel Dos Reis
2004-03-25 18:19       ` Per Abrahamsen
2004-03-24 20:14   ` Paul Koning
2004-03-24 21:00     ` Joe Buck
2004-03-24 22:20       ` Dale Johannesen
2004-03-24 21:07     ` Joseph S. Myers
2004-03-24 21:38       ` Joe Buck
2004-03-24 21:44       ` Joe Buck
2004-03-24 22:49         ` Joseph S. Myers
2004-03-24 22:19       ` Richard Guenther
2004-03-24 22:21         ` Dale Johannesen
2004-03-25  7:29     ` Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
2004-03-25 16:51 Wolfgang Bangerth
2004-03-15 16:06 Robert Dewar
2004-03-16  8:45 ` Per Abrahamsen
2004-03-17  0:09   ` Robert Dewar
2004-03-17  0:36     ` Scott Robert Ladd
2004-03-17  5:53     ` Gabriel Dos Reis
2004-03-17  7:21       ` Robert Dewar
2004-03-17  9:10         ` Gabriel Dos Reis
2004-03-21 16:55           ` Robert Dewar
2004-03-23 19:38       ` Joe Buck
2004-03-23 19:58         ` Gabriel Dos Reis
2004-03-23 20:49           ` Laurent GUERBY
2004-03-24  8:17             ` Toon Moene
2004-03-24 13:50               ` Robert Dewar
2004-03-24 18:25                 ` Paul Koning
2004-03-24 18:51                   ` Robert Dewar
2004-03-25 18:18                     ` Per Abrahamsen
2004-03-27  1:26                       ` Robert Dewar
2004-03-24 18:56                 ` Joe Buck
2004-03-24 19:10                   ` Robert Dewar
2004-03-24 19:14                     ` Richard Guenther
2004-03-24 19:39                       ` Paul Brook
2004-03-24 19:45                         ` Dave Korn
2004-03-24 20:57                           ` Paul Brook
2004-03-25  6:14                           ` Robert Dewar
2004-03-25 18:32                             ` Scott Robert Ladd
2004-03-27  1:28                               ` Robert Dewar
2004-03-17 14:51     ` Per Abrahamsen
2004-03-17 15:18       ` Gabriel Dos Reis
2004-03-17 16:05         ` Per Abrahamsen
2004-03-16 12:14 ` Scott Robert Ladd
2004-03-17  0:19   ` Robert Dewar
2004-03-14 23:40 GCC viciously beaten by ICC in " Scott Robert Ladd
2004-03-15  0:12 ` GCC beaten by ICC in stupid " Andrew Pinski
2004-03-15  0:32   ` Paolo Carlini
2004-03-15  1:31   ` Scott Robert Ladd
2004-03-15  2:36   ` Scott Robert Ladd
2004-03-15 11:25   ` Paolo Carlini
2004-03-15 11:31     ` Paolo Carlini
2004-03-15 13:29     ` Zdenek Dvorak
2004-03-15 13:42       ` Paolo Carlini
2004-03-15 13:51         ` Zdenek Dvorak
2004-03-15 13:55           ` Paolo Carlini
2004-03-15 14:00             ` Zdenek Dvorak
2004-03-15 14:05           ` Joseph S. Myers
2004-03-15 14:13             ` Paolo Carlini
2004-03-15 14:18               ` Zdenek Dvorak
2004-03-15 14:29                 ` Segher Boessenkool
2004-03-15 14:28               ` Joseph S. Myers

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=4061F6EF.3090803@moene.indiv.nluug.nl \
    --to=toon@moene.indiv.nluug.nl \
    --cc=Joe.Buck@synopsys.COM \
    --cc=abraham@dina.kvl.dk \
    --cc=fjahanian@apple.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=gdr@integrable-solutions.net \
    --cc=laurent@guerby.net \
    --cc=lucier@math.purdue.edu \
    --cc=roger@eyesopen.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).