评估中字符串的数学EX pression字符串、数学、pression、EX

由网友(中意你)分享简介:我开发一个Android应用程序,我得到的数学EX pression我要计算一个字符串,我这样做是为了将字母转换成我需要的数字,但什么是评价最好的办法? I'm developing an Android app that i get an String with the mathematical expressio...

我开发一个Android应用程序,我得到的数学EX pression我要计算一个字符串,我这样做是为了将字母转换成我需要的数字,但什么是评价最好的办法?

I'm developing an Android app that i get an String with the mathematical expression i have to calculate, i did it to convert the letters into the numbers i need, but what is the best way to evaluate this?

没有什么太复杂的公式像: ((A * 2 + B * 3 + C * 5)/ 10)+ D

Nothing too complicated, the formulas are like those: ((A * 2 + B * 3 + C * 5) / 10) + D

编辑: 刚刚发现的家伙,非常简单的API,就像一个魅力 HTTP://$c$c.google.com/p / symja /维基/ MathEx pressionParser

Just found that guy, very simple API, works like a charm http://code.google.com/p/symja/wiki/MathExpressionParser

推荐答案

您需要某种数学分析器。

玩转推出自己的,还是有很多关于谷歌的点击率:https://www.google.co.uk/#hl=en&gs_nf=1&cp=16&gs_id=7&xhr=t&q=java+math+parser

Fun to roll your own, or there are plenty of hits on google: https://www.google.co.uk/#hl=en&gs_nf=1&cp=16&gs_id=7&xhr=t&q=java+math+parser

阅读全文

相关推荐

最新文章