struct f {
  Float operator() (const point& x) const { 
    Float r = sqrt(sqr(x[0])+sqr(x[1])+sqr(x[2]));
    Float sin_over_ar = (r == 0) ? 1 : sin(a*r)/(a*r);
    return sqr(a)*((d-1)*sin_over_ar + cos(a*r)); }
  f(size_t d1) : d(d1), a(acos(Float(-1.0))) {}
  size_t d; Float a;
};
struct g {
  Float operator() (const point& x) const { 
    return cos(a*sqrt(sqr(x[0])+sqr(x[1])+sqr(x[2]))); }
  g(size_t=0) : a(acos(Float(-1.0))) {}
  Float a;
};
