1

i've a prob here, so i need a help:)

When i'm calculating expression like this "(10.5 + 3.5 / 2) * 2" with jscript vsa engine, it's ok, but now i 've a question... if in the string like above, i want to calculate also an exponent (10.5 + 3.5 / 2) * 2 + exp(2), what is the best way to do it?

PS: Math.Exp(); -- is not an option.

Slaine
  • 41
  • 1
  • 9

2 Answers2

1

If you are using jscript.net you can define exp function first and calculate expression after that. example was discussed for instance there

Community
  • 1
  • 1
vittore
  • 17,449
  • 6
  • 44
  • 82
1

proper way to code this is to make your calculations in integer and then Convert.ToString() it