Function function_to_double (o2scl)

O2scl : Function List

double o2scl::function_to_double(std::string s)

Convert a formula to a double.

This function removes all quotes and apostrophes from the string and then uses o2scl::calculator to convert strings like “-1.0e-3”, “1.0/3.0” and “exp(cos(-1.0e-2))” to floating point numbers.