I already tried GMP, MPFR. But I can not execute a simple section as shown below. BTW I have an LLVM compiler in Xcode. I am trying to compile, run it in IOS Simulator.
mpf_t a;
mpf_init2 (a, 256);
mpf_set_d (a, 0.7);
mpf_t b; mpf_init2 (b, 256);
mpf_set_d (b, 1.0);
mpf_t l; mpf_init2 (l, 256);
gmp_printf ("%. * Ff \ n", 5, a); --- 0.70000
gmp_printf ("%. * Ff \ n", 5, b); --- 1.00000
mpf_div (l, a, b);
gmp_printf ("%. * Ff", 5, l); --- 0.52502
source share