Evaluating a mathematical equation from a string [modified]
-
Hey guys, i was just wondering if there is something static funcitn in the Math, or string library that can evaluate a mathematical function...something like the following String problem = "2+2"; Double answer = WonderfulFunction.Evaluate(problem); //wonderful function being the function im looking for... just was wondering if it exists...if not then ill just have to create it...i figured there something out there... Thanking yall in advance, -- modified at 16:33 Tuesday 27th June, 2006
-
Hey guys, i was just wondering if there is something static funcitn in the Math, or string library that can evaluate a mathematical function...something like the following String problem = "2+2"; Double answer = WonderfulFunction.Evaluate(problem); //wonderful function being the function im looking for... just was wondering if it exists...if not then ill just have to create it...i figured there something out there... Thanking yall in advance, -- modified at 16:33 Tuesday 27th June, 2006
I've seen articles about classes like that here on CP. Probably searching for "parse" "math" "string" etc. would turn up the result you need.