Re: Calculate with tolerances anyone?



In article <g6p9vu$o8p$1@xxxxxxxxxxxxxxxxxx>,
Daniel Armyr <firstname@xxxxxxxxxxx> wrote:

I work as a system design engineer and now and then I am
faced with measurement values that are not exact, but have a
tolerance attached to them. Since I work with algorithms and
larger systems I often need to process and combine these
numbers through complex formulas.

Now, calculating by hand with tolerances is really a mess
and I was wondering if someone has made a toolkit that helps
out? I am vurrently writing one as the basics are quite
trivial. Before I spend the rest of the week on it, though,
I was wondering is someone has allready beaten me to it.

Maple has range arithemetic. I don't know how much of that range
arithmetic is exposed through the Matlab Symbolic Toolbox; you
might need to use the Extended version of the Toolbox to gain
access to it.


However, range arithmetic in maple is often frustrating to work with,
as each instance of the variable is replaced by the entire variable
range. For example,

x := INTERVAL(2..7);
x := INTERVAL(2 .. 7)
evalr(x*(x-1));
INTERVAL(2 .. 42)

evalr(expand(x*(x-1)));
INTERVAL(-3 .. 47)

which is equivilent to

evalr(x^2 - x);
INTERVAL(-3 .. 47)

To understand this result, you have to imagine that the first time that
x is seen, it is replaced by the definite value 2, giving x^2 of 4,
but that when the -x is seen, that it is replaced by the definite value
7, giving x^2-x of 4-7 = -3

evalr((x-3)*x*(x+3));
INTERVAL(-70 .. 280)
eval((y-3)*y*(y+3),y=2);
-10

If you end up trying to solve for a root over the range, you will
almost certainly get virtual garbage because of this effect. If you
get an answer at all:

solve(x-3);
[empty response, whereas the 'proper' response should be x since x
is a range that includes a point at which x-3=0]


The interval arithemetic available via maple is fine for basic
operations in which each variable appears once, not very useful for much
else.

See also an earlier posting of mine on this topic,
http://groups.google.ca/group/comp.soft-sys.matlab/msg/28d15f01c458f7f4
--
"All is vanity." -- Ecclesiastes
.



Relevant Pages

  • Re: Development of computer analysis systems
    ... IMO the answer to the latter question is no. ... don't wish to make the algorithms public. ... Maple 11, and in any case, it is far more complicated ... Integration by parts is pretty simple, ...
    (sci.math.symbolic)
  • Re: Advanced expression simplification
    ... > Are there any good treatises on expression simplification. ... I think you might check out Maple, because its algorithms at least used to ... Andre Heck wrote a book "Introduction to Maple". ...
    (comp.compilers)
  • Re: Development of computer analysis systems
    ... don't wish to make the algorithms public. ... Maple 11, and in any case, it is far more complicated ... are those of the Statistics Department or of Purdue University. ... Herman Rubin, Department of Statistics, Purdue University ...
    (sci.math.symbolic)
  • Re: maths problem
    ... That's effectively been what I've been doing, but the algorithms I ... coming up, laptop fully charged, Maple and C at the ready ... ... Ian ... Prev by Date: ...
    (uk.education.maths)