Question: Numerical precision error after subs

Hello all,

 

I'm experiencing an aggravating issue when substituting numerical values into a symbolic expression.  I'm using Maple 14.  I believe the issue may be related to floating point precision.  Either way, it's ruining my life.  If anyone has a solution or a work-around, I'd be most grateful.  The following code reproducibly produces the anomolay on my machine:

 

vx := Vector( 4, symbol=x ):

# A numerator and a denominator. They're equal.
num := (x[1]*x[3]+x[1]*x[4]+x[2]*x[3]+x[2]*x[4])^2:
den := ((x[1]+x[2])^2*(x[3]+x[4])^2):

# Prints true...
evalb(num=den);

# This equals zero
y := 0.1 - 0.1*num/den;

# Prints 0...
simplify(y);

# Prints 0...
simplify(subs(x[3]=1,x[4]=3,0.1-0.1*num/den));

# Prints 0...
simplify(subs(x[3]=1,x[4]=3,y));

# Prints 0.1 x 10^-10 !?!?
simplify(subs(x[3]=1,x[4]=2,y));

 

Please Wait...