Libeval: Evaluate Arithmetic Expressions

Libeval provides a smilple means of evaluating simple arithmetic expressions involving literal numeric values, variables and functions using the addition (+), subtraction (-), multiplication (*), division (/), modulo division (\), exponentiation (^), sign (+-), percentag (%) and grouping (()) operators. Libeval provides a means of setting and interrogating variables, defining functions and converting error codes into human readable strings. A number of predefined functions are included with libeval that wrap the existing standard C library math functions.

You can download the current version of libeval here. There's no manual page, but there is a README file that should get you started.