/* vim: set sw=4 sts=4 et foldmethod=syntax : */ #include <cmath> #include <iostream> double f(const double & h) { return std::sin(h) / h; } int main(int, char **) { for (unsigned i = 0 ; i < 5 ; ++i) { double h = std::pow(0.5, i); std::cout << h << "\t" << f(h) << std::endl; } return 0; }