Example #1
0
 void bvisit(const Constant &x) {
     if (x.__eq__(*pi)) {
         mpfr_const_pi(result_, rnd_);
     } else if (x.__eq__(*E)) {
         mpfr_const_euler(result_, rnd_);
     } else if (x.__eq__(*EulerGamma)) {
         mpfr_const_euler(result_, rnd_);
     } else {
         throw std::runtime_error("Constant " + x.get_name() + " is not implemented.");
     }
 }