#ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef HAVE_GMP #include #include "GMPString.h" GMPString::GMPString(const GMPString & s) : str(s.str) { } GMPString::GMPString(const mpz_class & z) { gmp_asprintf(&str, "%Zd", z.get_mpz_t()); } GMPString::GMPString(const mpq_class & q) { gmp_asprintf(&str, "%Qd", q.get_mpq_t()); } GMPString::GMPString(const mpf_class & f) { gmp_asprintf(&str, "%Ff", f.get_mpf_t()); } GMPString::operator String() const { return String(str); } GMPString::~GMPString() { } #endif