comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Everything You Know Is Wrong
Date: Wed, 2 Mar 2016 15:32:51 +0100
Date: 2016-03-02T15:32:51+01:00	[thread overview]
Message-ID: <nb6tja$g55$1@gioia.aioe.org> (raw)
In-Reply-To: 9974be39-f94d-4293-819e-bd1c9a1ddd65@googlegroups.com

On 02/03/2016 15:11, vincent.diemunsch@gmail.com wrote:
> Le lundi 29 février 2016 13:14:09 UTC+1, Jacob Sparre Andersen a écrit :
>
>> Some of the rules which (apparently) aren't wrong yet:
>>
>>     http://www.cse.msu.edu/~cse320/Documents/FloatingPoint.pdf
>>
>> Greetings,
>>
>> Jacob
>
> Very interesting !
> Here is the point about Ada :
>
> Remarkably enough, some languages don't clearly specify that if x is a
> floating-point variable (with say a value of 3.0/10.0), then every occurrence
> of (say) 10.0*x must have the same value. For example Ada, which is based
> on Brown's model, seems to imply that floating-point arithmetic only has to
> satisfy Brown's axioms, and thus expressions can have one of many possible
> values. Thinking about floating-point in this fuzzy way stands in sharp
> contrast to the IEEE model, where the result of each floating-point operation is
> precisely defined. In the IEEE model, we can prove that (3.0/10.0)*10.0
> evaluates to 3 (Theorem 7). In Brown's model, we cannot.
>
> Maybe this could be a topic for a new revision of Ada ?

No.

IEEE model is wrong and Ada 83 model is right being closer to the 
interval computations.

BTW, it is advisable to always turn the IEEE semantics off. E.g. not to 
use Float but

    subtype Proper_Float is Float range Float'Range;

instead. This saves a lot of debugging later.

 From the computational, rounding error control, engineering, etc POVs 
there is no reason to suggest that (x/y)*y=x should hold for 
floating-point numbers. They are not reals and cannot be reals. The 
model must sacrifice some less important properties like (x/y)*y=x 
(which is wrong for any measured values anyway) for more important ones 
like rounding errors control, performance, optimization.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


  parent reply	other threads:[~2016-03-02 14:32 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-27  0:37 Everything You Know Is Wrong Jeffrey R. Carter
2015-12-27  7:55 ` J-P. Rosen
2015-12-27 17:37   ` Jeffrey R. Carter
2015-12-27  8:46 ` Dmitry A. Kazakov
2015-12-27 17:36   ` Jeffrey R. Carter
2016-01-04 14:44     ` Alejandro R. Mosteo
2015-12-28  9:57 ` Georg Bauhaus
2015-12-28 11:19   ` Dmitry A. Kazakov
2015-12-28 16:27     ` Nicholas Collin Paul de Gloucester
2015-12-28 17:30       ` Dmitry A. Kazakov
2015-12-28 18:50         ` Nicholas Collin Paul de Gloucester
2015-12-28 20:40           ` Dmitry A. Kazakov
2015-12-29 11:42             ` G.B.
2015-12-29 12:36               ` Dmitry A. Kazakov
2015-12-29 13:50                 ` G.B.
2015-12-29 14:06                   ` J-P. Rosen
2015-12-29 14:16                   ` Dmitry A. Kazakov
2015-12-29 16:31                     ` Dennis Lee Bieber
2015-12-29 17:02                       ` G.B.
2015-12-29 16:57                     ` G.B.
2015-12-29 17:36                       ` Dmitry A. Kazakov
2015-12-29 17:53                         ` G.B.
2015-12-29 18:09                           ` G.B.
2015-12-29 22:05                           ` Randy Brukardt
2016-01-04 14:51                           ` Alejandro R. Mosteo
2015-12-29 21:58                         ` Randy Brukardt
2015-12-28 17:19 ` Nicholas Collin Paul de Gloucester
2015-12-29 23:37 ` darkestkhan
2016-01-05 13:52 ` brbarkstrom
2016-01-10 14:46 ` Michael Erdmann
2016-02-29 12:14 ` Jacob Sparre Andersen
2016-03-02 14:11   ` vincent.diemunsch
2016-03-02 14:23     ` J-P. Rosen
2016-03-02 15:44       ` Bob Brown
2016-03-02 16:30         ` J-P. Rosen
2016-03-02 16:36           ` Bob Brown
2016-03-02 16:52             ` Bob Brown
2016-03-02 14:32     ` Dmitry A. Kazakov [this message]
2016-03-02 15:31       ` vincent.diemunsch
2016-02-29 12:27 ` Jacob Sparre Andersen
replies disabled

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