1918{
1919 std::ostringstream format;
1920 const std::ios::fmtflags flags = os.flags();
1921
1922 format << ((flags & std::ios::showpos) ? "%+" : "%");
1923 if (os.precision() >= 0)
1924 format << '.' << os.precision() << "R*"
1925 << ((flags & std::ios::floatfield) == std::ios::fixed ? 'f' :
1926 (flags & std::ios::floatfield) == std::ios::scientific ? 'e' :
1927 'g');
1928 else
1929 format << "R*e";
1930
1932 if(!(mpfr_asprintf(&
s, format.str().c_str(),
1933 mpfr::mpreal::get_default_rnd(),
1935 < 0))
1936 {
1937 os << std::string(
s);
1939 }
1940 return os;
1941}
::mpfr_srcptr mpfr_srcptr() const