Reads mathematical expressions from stdin
and prints the result to stdout
. It can be used within shell-scripts for shells like bash
, where floating point arithmetic is not possible. All numbers (integers, floats etc.) are converted to a 64 bit floating point number, so be mindful of precision issues.
Assuming that you have gnumake
installed and are in the project root.
make
echo "100*(8-12/2)" | ./bmee
- It is implemented using a recursive descent parser.