Basically, I have a user input field in which the user can enter a number. They would also like to enter equations in the input field.
Something like "874.45 * 0.825 + 4000" is converted to its actual numerical value.
All solutions found point to the awful eval () method. Especially if this is a user input field, I just worry about starting eval ("874.45 * 0.825 + 4000") and hoping to get the number from the back.
I suppose I could make a web service call to a server (ASP.NET), but I'm afraid that a little delay will create some frustration from the user.
Does anyone know about good technology or existing libraries?
taco source share