ruby mathematical expression parser

Sean Blezard wrote:

Hi,

Has anyone come across a Ruby mathematical expression parser, capable of parsing out token, replacing them with values then executing the mathematical formula? Nothing too heavy, A * (44/12) * ... etc. where A is can be replaced with a value.

[stuff deleted]

Try this...

http://www.chipstips.com/?p=119

Sean Blezard wrote:

Hi,

Has anyone come across a Ruby mathematical expression parser, capable of parsing out token, replacing them with values then executing the mathematical formula? Nothing too heavy, A * (44/12) * ... etc. where A is can be replaced with a value.

Here's how I do it:

-- MarkusQ