delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/11/13/15:14:03

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <20011113201349.29089.qmail@web14507.mail.yahoo.com>
Date: Wed, 14 Nov 2001 07:13:49 +1100 (EST)
From: =?iso-8859-1?q?Danny=20Smith?= <danny_r_smith_2001 AT yahoo DOT co DOT nz>
Subject: Re: gcc bug: different results between -O0 and -O1
To: gilles civario <civario AT mimosa DOT ceng DOT cea DOT fr>
Cc: cygwin AT cygwin DOT com
In-Reply-To: <qq92vtsqejukfdlbepcag1n086lj6q0kb7@4ax.com>
MIME-Version: 1.0

 --- Mark Gordon <spamtrap AT ruddygore DOT net> wrote: > On Tue, 13 Nov 2001
07:57:57 +0100, gilles civario
> <civario AT mimosa DOT ceng DOT cea DOT fr> wrote:
> 
> >egor duda a écrit :
> >> Monday, 12 November, 2001 gilles civario civario AT mimosa DOT ceng DOT cea DOT fr
> wrote:
> >> 
> >> gc> Wile developing a performance test program for gettimeofday
> resolution,
> >> gc> I found a strange behavior for gcc under cygwin with the -O flags.
> >> gc> Everywhere else with native compiler or with gcc, the program
> return constant
> >> gc> results, with or without optimization. (On Sun, Dec, Linux and
> Fujitsu)
> >> gc> Only with cygwin, the result is divided by 5000 from -O0 to -O1,
> both with
> >> gc> gcc version 2.95.3-5 (cygwin special) and gcc version 3.0.2.
> >> gc> But it shouldn't. Ok for a little increase, but not for 5000 !
> >> 
> >> you cannot reliably test float values for equality. you should rethink
> >> the logic of your boucle () function to get reliable results.
> >


Have a look at the documentation for -mieee-fp switch.  Also -ffloat-store.
Then try your test case out with these switches,

In C99 standard there are additional functions to control fp rounding
modes.  In the meantime, for more control over fp precision and unordered
comparisons you could provide your own soft float library.

Danny


http://briefcase.yahoo.com.au - Yahoo! Briefcase
- Manage your files online.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019