Re: MAPLE TOLERANCES



goloo_99@xxxxxxxxx writes:

Dear All

I am sure I am doing something wrong but so far not been able to
figure out what exactly so am pasting the following small MAPLE file
using its TOLERANCE package.
It is supposed to calculate the resultant of two parallel resistances
given as R1 and R2. The parallel is designated RT.

restart;
with(Tolerances):
interface(displayprecision=2);

-1


R1:= 10E3 &+- 100;

R1 := 10000.00 +-(100.00)

R2:= 10E3 &+- 100;

R2 := 10000.00 +-(100.00)

RT = (R1*R2)/(R1+R2);

RT = 5002.00 +-(150.02)

NominalValue((R1*R2)/(R1+R2));

5002.00

As can be seen Maple values calculated above are incorrect. The
correct value is
5000 +-50 and a Nominal value of 5000.

Not in Maple's model of interval arithmetic. Of course, (R1*R2)/(R1+R2)
can be "simplified" to 1/(1/R2 + 1/R1) which would indeed be 5000 +- 50.
But Maple is not making this simplification. A correct Maple result might
take the following steps:

R1 * R2 = 100010000 +- 2000000 (i.e. the interval 98010000 .. 102010000)
R1 + R2 = 20000 +- 200 (i.e. the interval 19800 .. 20200)
so (R1*R2)/(R1 + R2) should be the interval 98010000/20200 ..
102010000/19800, which is approximately 5002.0002 +- 150.02.


Any clues as to why Maple's caculations are different would be greatly
appreciated.

Actually I think there is a bug. Consider this one:

A:= 0 &+- 2; B:= 0 &+- 2;
A*B;
2 2
0.000 +-(2.000)

At least, that's what it looks like in Classic. What it actually is, is
INTERVAL(-2..2)^2. The real problem is that Maple thinks that A = B. And
then (to get it to actually do the interval arithmetic)

A*B*1.0;
2.000 +-(2.000)

which is of course quite wrong.
--
Robert Israel israel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia Vancouver, BC, Canada
.