Function function_to_double (o2scl)¶
-
double o2scl::function_to_double(std::string s, int verbose = 0)¶
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”, “pi/3.0” and “exp(cos(-1.0e-2))” to floating point numbers. This function uses the constant database from lib_settings_class::get_find_constants() to interpret constant values.