incorect result from previous calculation after redefined variable

incorect result from previous calculation after redefined variable - Messaggi

#1 Pubblicato: 07/05/2013 02:37:11
xyonx

xyonx

0 apprezzamenti in 10 post.

Gruppo: 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 Pubblicato: 07/05/2013 03:03:34
Mike Kaganski

Mike Kaganski

184 apprezzamenti in 434 post.

Gruppo: 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 Pubblicato: 07/05/2013 03:20:37
xyonx

xyonx

0 apprezzamenti in 10 post.

Gruppo: 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,
  • Nuovi post
  • Nessun nuovo post