comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: GNAT Optimization of Constant Expressions
Date: Fri, 18 May 2007 12:28:04 -0500
Date: 2007-05-18T12:28:04-05:00	[thread overview]
Message-ID: <f2knja$b65$1@jacob-sparre.dk> (raw)
In-Reply-To: 1179487665.6721.7.camel@localhost.localdomain

"Georg Bauhaus" <bauhaus@futureapps.de> wrote in message
news:1179487665.6721.7.camel@localhost.localdomain...
> On Thu, 2007-05-17 at 18:38 -0500, Randy Brukardt wrote:
>
> >  Ada has fairly strict requirements on accuracy that C and
> > Fortran don't have. An optimizer shouldn't be providing the *wrong*
answer
> > in order to make code fast;
>
> An Apple employee once recommended using the then new FPT
> optimizations and to see whether the optimized program will meet
> the expectations. ("You can always sell speed".) So maybe accurate
> computation is a far reaching requirement for some software
> markets.

I think it is generally agreed these days that the Ada accuracy requirements
were a mistake, because they put Ada at a competitive disadvantage compared
to other languages for floating point math. Indeed, that is why they were
moved into "strict mode" in Ada 95. The problem is, faced with the need to
implement strict mode anyway, implementers have tended to avoid implementing
relaxed modes, because extra modes simply doubles the implementation and
testing effort - the fewer modes the better. And the argument is "who wants
less accuracy anyway?".

We talked briefly about dropping the accuracy requirements altogether this
time, but its obvious that would screw anyone that was depending on them.
And that didn't seem like a good idea. So Ada is rather stuck with its
slower but predictably accurate math. (In practice, this really only matters
in programs with intensive FP, like the OP's example.)

                      Randy.





  reply	other threads:[~2007-05-18 17:28 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-16 22:37 GNAT Optimization of Constant Expressions David Smith
2007-05-17  4:50 ` Randy Brukardt
2007-05-17 20:03   ` Gautier
2007-05-17 20:46     ` Randy Brukardt
2007-05-17 22:49       ` David Smith
2007-05-17 23:38         ` Randy Brukardt
2007-05-18  7:58           ` Dmitry A. Kazakov
2007-05-18 11:27           ` Georg Bauhaus
2007-05-18 17:28             ` Randy Brukardt [this message]
2007-05-18 16:25       ` Ray Blaak
2007-05-18 17:40         ` Randy Brukardt
2007-05-18 22:51           ` Adam Beneschan
2007-05-19  2:44             ` Randy Brukardt
2007-05-18  9:05   ` Markus E Leypold
2007-05-18  9:47   ` Florian Weimer
2007-05-18 11:32     ` Duncan Sands
2007-05-18 17:20     ` Randy Brukardt
2007-05-18 17:35       ` Duncan Sands
     [not found]       ` <200705181935.23877.baldrick@free.fr>
2007-05-18 17:49         ` Duncan Sands
2007-05-17  5:30 ` Martin Krischik
2007-05-18  9:56 ` Duncan Sands
2007-05-18 15:39   ` David Smith
2007-05-18 17:08     ` Duncan Sands
     [not found]     ` <200705181908.54920.baldrick@free.fr>
2007-05-18 17:32       ` Duncan Sands
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox