Next: , Previous: , Up: MPFR Interface   [Index]


5.3 Combined Initialization and Assignment Functions

Macro: int mpfr_init_set (mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)
Macro: int mpfr_init_set_ui (mpfr_t rop, unsigned long int op, mpfr_rnd_t rnd)
Macro: int mpfr_init_set_si (mpfr_t rop, long int op, mpfr_rnd_t rnd)
Macro: int mpfr_init_set_d (mpfr_t rop, double op, mpfr_rnd_t rnd)
Macro: int mpfr_init_set_ld (mpfr_t rop, long double op, mpfr_rnd_t rnd)
Macro: int mpfr_init_set_z (mpfr_t rop, mpz_t op, mpfr_rnd_t rnd)
Macro: int mpfr_init_set_q (mpfr_t rop, mpq_t op, mpfr_rnd_t rnd)
Macro: int mpfr_init_set_f (mpfr_t rop, mpf_t op, mpfr_rnd_t rnd)

Initialize rop and set its value from op, rounded in the direction rnd. The precision of rop will be taken from the active default precision, as set by mpfr_set_default_prec.

Function: int mpfr_init_set_str (mpfr_t x, const char *s, int base, mpfr_rnd_t rnd)

Initialize x and set its value from the string s in base base, rounded in the direction rnd. See mpfr_set_str.