Function function_to_fp (o2scl)¶
-
template<class fp_t = double>
fp_t o2scl::function_to_fp(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::calc_utf8 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.