public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Cristea Bogdan" <cristeab@gmail.com>
To: gcc-help@gcc.gnu.org
Subject: Floating point results change with different compilation options
Date: Tue, 23 Oct 2007 08:42:00 -0000	[thread overview]
Message-ID: <e7b7bbdc0710230104l55dcb060vef9233bc07922f12@mail.gmail.com> (raw)

Hi
   I use gcc compiler in order to study the behavior of some iterative
maps (x_n=f(x_{n-1})) using single floating point precision (following
IEEE 754 standard). I have noticed that using different compiler
options, the output sequence could be very different. My programs are
written in C++ using 'float' type and I use 'gcc version 4.1.2
20061115 (prerelease) (Debian 4.1.1-21)'. Compilation options are:
'-Wall -O3 -march=pentium4' or '-Wall'. The same program compiled with
gcc 4.2.2 gives the same results regardless of the compilation options
(on an athlon64 processor).
   Is this a bug of the compiler or the floating point representation
differs from one compiler version to the other?

-- 
Bogdan Cristea

             reply	other threads:[~2007-10-23  8:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-23  8:42 Cristea Bogdan [this message]
2007-10-23 12:01 ` John Love-Jensen
2007-10-23 17:36 ` burlen

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=e7b7bbdc0710230104l55dcb060vef9233bc07922f12@mail.gmail.com \
    --to=cristeab@gmail.com \
    --cc=gcc-help@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).