#include <stdio.h>
#include <math.h>

#include "gmp.h"
#include "mpfr.h"
#include "mpf2mpfr.h"

main()
{
	mpf_t a, b, c;

	mpf_set_default_prec(ceil(50/log10(2.0)));

	mpf_init_set_ui(a, 1UL);
	mpf_init_set_str(b, "3.141592", 10);
	mpf_init(c);

	mpf_add(c, a, b);
	mpf_out_str(stdout, 10, 0, c);
	printf("\n");

	mpf_clear(a);
	mpf_clear(b);
	mpf_clear(c);
}

