I'm working on a webapp that for the last 2 years has used the unofficial API for Google Calculator like: http://www.google.com/ig/calculator?hl=en&q=
Now that iGoogle has been closed last week (https://support.google.com/websearch/answer/2664197) the google calculator api doesn't work either.
What's the best alternative for doing a javascript calculator? (Where I give it a string and it evaluates the answer.)
Some ideas I've had:
Any suggestions?
Here are some sample queries that the Google Calculator handles. The more I can do, the better:
"https://query.yahooapis.com/v1/public/yql?q=select%20Rate%20from%20yahoo.finance.xchange%20where%20pair%20in%20(%22" + from + to + "%22)&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback=callBackFunctionName"
You can use the math.js library:
http://mathjs.org/
It supports units and has a powerful expression parser.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With