public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
From: "Jochen Küpper" <jochen@fhi-berlin.mpg.de>
To: gsl-discuss@sourceware.org
Subject: Unwanted compiler optimization (was: Bug report and fix for adaptive step size control in ODE solving)
Date: Thu, 03 Jan 2008 09:01:00 -0000	[thread overview]
Message-ID: <9AFC9075-1EA3-4E26-9BE9-EB9C475FE3D9@fhi-berlin.mpg.de> (raw)
In-Reply-To: <477BDBEE.2000603@googlemail.com>

[-- Attachment #1: Type: text/plain, Size: 974 bytes --]

Dear Optimization specialists,

On 02.01.2008, at 19:46, Frank Reininghaus wrote:

> Jochen Küpper wrote:
>
>> However, why don't you test what you really describe your comment?  
>> This would look like the following (untested):
>>
>>  h0 = GSL_MAX_DBL(GSL_DBL_MIN, (t0 != t0+h0) ? h0 :  
>> GSL_DBL_EPSILON*t0);
>
> Actually, I had been thinking of something like that first, but then  
> I was afraid that an optimising compiler might transform 't0 !=  
> t0+h0' into '0 != h0', making the patch useless for the 'h0 <  
> GSL_DBL_EPSILON*t0' problem.


Is this an optimization that is considered valid even for floating- 
point calculations in compiler building?

Maybe we should ask our friends from the GCC development about it...

Greetings,
Jochen
-- 
Einigkeit und Recht und Freiheit                http://www.Jochen-Kuepper.de
     Liberté, Égalité, Fraternité                GnuPG key: CC1B0B4D
         Sex, drugs and rock-n-roll



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 186 bytes --]

  reply	other threads:[~2008-01-03  9:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-26 22:14 Bug report and fix for adaptive step size control in ODE solving Frank Reininghaus
2008-01-02 13:40 ` Kevin H. Hobbs
2008-01-02 14:18 ` Jochen Küpper
2008-01-02 18:51   ` Frank Reininghaus
2008-01-03  9:01     ` Jochen Küpper [this message]
2008-01-04 10:44       ` Unwanted compiler optimization (was: Bug report and fix for adaptive step size control in ODE solving) Brian Gough
2008-01-03  5:15 ` Bug report and fix for adaptive step size control in ODE solving Michael Stauffer
2008-01-03 15:54 ` Brian Gough
2008-01-04  9:46 ` Brian Gough

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=9AFC9075-1EA3-4E26-9BE9-EB9C475FE3D9@fhi-berlin.mpg.de \
    --to=jochen@fhi-berlin.mpg.de \
    --cc=gsl-discuss@sourceware.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).