Pavel Holoborodko
2011-10-31 02:59:42 UTC
I've encountered strange behavior for this simple code (Windows, MPFR 3.1.0
/ 3.2.0 dev, compiled by msvc2010 using Brian Gladman's port):
mpfr_t t;
mpfr_set_default_prec(84); // approx. 25 decimal places
mpfr_init(t);
mpfr_set_str(t, "999.99999999999999999999", 10, MPFR_RNDN); // twenty '9'
after decimal point.
mpfr_printf("%.25RNg\n",t);
mpfr_printf("%.20RNg\n",t);
Which give output:
999.99999999999999999999
100
Could someone confirm this?
Thanks in advance,
Pavel Holoborodko.
/ 3.2.0 dev, compiled by msvc2010 using Brian Gladman's port):
mpfr_t t;
mpfr_set_default_prec(84); // approx. 25 decimal places
mpfr_init(t);
mpfr_set_str(t, "999.99999999999999999999", 10, MPFR_RNDN); // twenty '9'
after decimal point.
mpfr_printf("%.25RNg\n",t);
mpfr_printf("%.20RNg\n",t);
Which give output:
999.99999999999999999999
100
Could someone confirm this?
Thanks in advance,
Pavel Holoborodko.