incorect result from previous calculation after redefined variable

incorect result from previous calculation after redefined variable - 消息

#1 已发布: 2013/5/7 02:37:11
xyonx

xyonx

0个赞,共10个帖子。

组: 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 已发布: 2013/5/7 03:03:34
Mike Kaganski

Mike Kaganski

184个赞,共434个帖子。

组: 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 已发布: 2013/5/7 03:20:37
xyonx

xyonx

0个赞,共10个帖子。

组: 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,
  • 有新帖
  • 无新帖