1

I'm doing a scientific calculator app but I don't know which library I should use. I need a library that can solve scientific math expressions and if it can solve functions even better. I'm looking for one that works with a given string and solves it without having to parse any operator, like exponents or roots.

What library do you recommend me? Thanks.

1

You can use JavaScript as a representation of your mathematical expressions. It's a full-flege language, and all mathematical expressions should be possible (although I am not a JavaScript programmer, so I can't say that with 100% certainty). Additionally, Nashhorn, a Javascript engine, is built into the JVM so there is no need for additional dependencies. If you need something in a slightly different format than Javascript requires, you could easily make simple modifications to the user's input and/or add JavaScript boilerplate before and/or after it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.