Function function_to_double_nothrow (o2scl)¶
-
int o2scl::function_to_double_nothrow(std::string s, double &result, int verbose = 0, rng<> *r = 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.