| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| #include "mpc-impl.h" |
| |
| int |
| mpc_div_fr (mpc_ptr a, mpc_srcptr b, mpfr_srcptr c, mpc_rnd_t rnd) |
| { |
| int inex_re, inex_im; |
| mpfr_t real; |
| |
| |
| mpfr_init2 (real, MPC_PREC_RE (a)); |
| |
| inex_re = mpfr_div (real, mpc_realref(b), c, MPC_RND_RE(rnd)); |
| inex_im = mpfr_div (mpc_imagref(a), mpc_imagref(b), c, MPC_RND_IM(rnd)); |
| mpfr_set (mpc_realref (a), real, GMP_RNDN); |
| |
| mpfr_clear (real); |
| |
| return MPC_INEX(inex_re, inex_im); |
| } |