comp.lang.ada
 help / color / mirror / Atom feed
* Interval arithmetic in Ada?
@ 2002-04-22  9:04 Dmitry A. Kazakov
  0 siblings, 0 replies; 5+ messages in thread
From: Dmitry A. Kazakov @ 2002-04-22  9:04 UTC (permalink / raw)


Hi!

Does anybody know an implementation of interval arithmetic in Ada?
Open source is preferable, of course.

Thanks in advance,
Dmitry Kazakov
www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Interval arithmetic in Ada?
@ 2002-04-22  9:13 Grein, Christoph
  2002-04-22 12:04 ` Dmitry A. Kazakov
  0 siblings, 1 reply; 5+ messages in thread
From: Grein, Christoph @ 2002-04-22  9:13 UTC (permalink / raw)


This was the Ada 83 floating point model.

> Hi!
> 
> Does anybody know an implementation of interval arithmetic in Ada?
> Open source is preferable, of course.
> 
> Thanks in advance,
> Dmitry Kazakov
> www.dmitry-kazakov.de
> _______________________________________________
> comp.lang.ada mailing list
> comp.lang.ada@ada.eu.org
> http://ada.eu.org/mailman/listinfo/comp.lang.ada



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Interval arithmetic in Ada?
  2002-04-22  9:13 Interval arithmetic in Ada? Grein, Christoph
@ 2002-04-22 12:04 ` Dmitry A. Kazakov
  0 siblings, 0 replies; 5+ messages in thread
From: Dmitry A. Kazakov @ 2002-04-22 12:04 UTC (permalink / raw)


On Mon, 22 Apr 2002 11:13:10 +0200 (MET DST), "Grein, Christoph"
<christoph.grein@eurocopter.com> wrote:

>This was the Ada 83 floating point model.

Hmm. Interval arithmetic is defined on intervals of numbers as opposed
to single numbers. It goes approximately like this:

[a,b] + [c,d] = [a+c, b+d]
[a,b] * [c,d] = [min (ac, ad, bc, bd), max (ac, ad, bc, bd)]
...

Usually it is used for numeric computations with an automatic control
over calculation errors. It is also tightly related with the
possibility theory, fuzzy numbers etc. It is relatively
straightforward, but firstly I do not want to reinvent wheel and
secondly it requires precise control over rounding. I feel myself not
very confident with Annexes A.5 and G.

---
Regards,
Dmitry Kazakov
www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Interval arithmetic in Ada?
@ 2002-04-22 13:21 Grein, Christoph
  2002-04-22 17:43 ` Robert Dewar
  0 siblings, 1 reply; 5+ messages in thread
From: Grein, Christoph @ 2002-04-22 13:21 UTC (permalink / raw)


> From: "Dmitry A.Kazakov" <mailbox@dmitry-kazakov.de>
>> On Mon, 22 Apr 2002 11:13:10 +0200 (MET DST), "Grein, Christoph"
> <christoph.grein@eurocopter.com> wrote:
> 
> >This was the Ada 83 floating point model.
> 
> Hmm. Interval arithmetic is defined on intervals of numbers as opposed
> to single numbers. It goes approximately like this:
> 
> [a,b] + [c,d] = [a+c, b+d]
> [a,b] * [c,d] = [min (ac, ad, bc, bd), max (ac, ad, bc, bd)]
> ...
> 
> Usually it is used for numeric computations with an automatic control
> over calculation errors. It is also tightly related with the
> possibility theory, fuzzy numbers etc. It is relatively
> straightforward, but firstly I do not want to reinvent wheel and
> secondly it requires precise control over rounding. I feel myself not
> very confident with Annexes A.5 and G.

Again, this _is_ the Ada 83 model with a and b the model numbers enclosing the 
actual value. See the Ada 83 RM.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Interval arithmetic in Ada?
  2002-04-22 13:21 Grein, Christoph
@ 2002-04-22 17:43 ` Robert Dewar
  0 siblings, 0 replies; 5+ messages in thread
From: Robert Dewar @ 2002-04-22 17:43 UTC (permalink / raw)


"Grein, Christoph" <christoph.grein@eurocopter.com> wrote in message news:<mailman.1019482382.32502.comp.lang.ada@ada.eu.org>...
> Again, this _is_ the Ada 83 model with a and b the model 
> numbers enclosing the actual value. See the Ada 83 RM.

And once again you are confused. Interval arithmetic involves a
representation where you use a pair of numbers
to represent a real, the lower and upper bounds.

You are keying off the word "interval" here, and missing
the target :-)

The answer is that the language does not specifically support interval
arithmetic. In general automatic support
for this notion is tricky. As an example, consider doing
Newton-Raphson iteration for a square root. 

If you just carry intervals through, they get wider and
wider and you don't converge. You have to realize that
the *estimate* each time is computed absolutely precisely,
with no slop, and thus the interval must be collapsed here.

The round towards +inf and round down towards -inf rounding
modes of IEEE are intended to support this model of arithmetic. See
Sam Figueroa's thesis for a further discussion of the use of these
rounding modes in Ada.

Robert Dewar



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-04-22 17:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-22  9:13 Interval arithmetic in Ada? Grein, Christoph
2002-04-22 12:04 ` Dmitry A. Kazakov
  -- strict thread matches above, loose matches on Subject: below --
2002-04-22 13:21 Grein, Christoph
2002-04-22 17:43 ` Robert Dewar
2002-04-22  9:04 Dmitry A. Kazakov

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