in reply to Re^3: Overloading print()
in thread Overloading print()

mpfr_get_str() probably does what you want here

Unfortunately it doesn't. All it does is return a string of digits (with a leading minus sign if it's a negative number) for the mantissa, and sets a variable to the value of the exponent. It's then up to Rmpfr_get_str to put the number into scientific notation, based on the information provided by mpfr_get_str.

If, as one would instinctively expect, mpfr_get_str returned a string formatted in the same way as the mpfr_out_str output, then you would be absolutely correct ... and this whole thread would never bave been born :-)

Cheers,
Rob