incorect result from previous calculation after redefined variable

incorect result from previous calculation after redefined variable - Messages

#1 Posted: 5/7/2013 2:37:11 AM
xyonx

xyonx

0 likes in 10 posts.

Group: User

this is a simple calculation where i do routine in small programming with python, sheet contains multiple branch & redefine variable, at the end of stage need to take result from a previous calculation.



i have a simple calculation, but get wrong results in SMATH.. can not figure out where i goes wrong, i try to make comparasion with MATHCAD





can anybody help, explain why i get wrong results?? thanx u
#2 Posted: 5/7/2013 3:03:34 AM
Mike Kaganski

Mike Kaganski

184 likes in 434 posts.

Group: User

When you define [MATH]M,nxa[/MATH] you define it as a formula, that is recalculated every time its result is shown. So, the second time you see the second calculation using new lambdas. Try using eval() function: [MATH]M,nxa:eval(algorithm)[/MATH]
С уважением, Михаил Каганский
#3 Posted: 5/7/2013 3:20:37 AM
xyonx

xyonx

0 likes in 10 posts.

Group: User

thanx for quick response,

yes, after using "EVAL" function the answer are correct as expected.



i don't know SMATH always recalculate with new variable even without redefined formula. this behaviour are differ from many others math programming.

regards,
  • New Posts New Posts
  • No New Posts No New Posts