Module gmp_mpfr_sys::mpc
source · Expand description
Function and type bindings for the MPC library.
§Examples
use core::f64;
use core::mem::MaybeUninit;
use gmp_mpfr_sys::{mpc, mpfr};
let one_third = 1.0_f64 / 3.0;
let neg_inf = f64::NEG_INFINITY;
unsafe {
let mut c = {
let mut c = MaybeUninit::uninit();
mpc::init3(c.as_mut_ptr(), 53, 53);
c.assume_init()
};
let dirs = mpc::set_d_d(&mut c, one_third, neg_inf, mpc::RNDNN);
assert_eq!(dirs, 0);
let re = mpfr::get_d(mpc::realref_const(&c), mpfr::rnd_t::RNDN);
assert_eq!(re, one_third);
let im = mpfr::get_d(mpc::imagref_const(&c), mpfr::rnd_t::RNDN);
assert_eq!(im, neg_inf);
mpc::clear(&mut c);
}
Structs§
Constants§
- See: Rounding Modes
- See: Rounding Modes
- See: Rounding Modes
- See: Rounding Modes
- See: Rounding Modes
- See: Rounding Modes
- See: Rounding Modes
- See: Rounding Modes
- See: Rounding Modes
- See: Rounding Modes
- See: Rounding Modes
- See: Rounding Modes
- See: Rounding Modes
- See: Rounding Modes
- See: Rounding Modes
- See: Rounding Modes
- See: Rounding Modes
- See: Rounding Modes
- See: Rounding Modes
- See: Rounding Modes
- See: Rounding Modes
- See: Rounding Modes
- See: Rounding Modes
- See: Rounding Modes
- See: Rounding Modes
- See:
MPC_VERSION
- See:
MPC_VERSION_MAJOR
- See:
MPC_VERSION_MINOR
- See:
MPC_VERSION_STRING
Functions§
- See: Return Value
- See: Return Value
- See: Return Value
- See: Return Value
- See:
MPC_VERSION_NUM
- abs⚠See:
mpc_abs
- acos⚠See:
mpc_acos
- See:
mpc_acosh
- add⚠See:
mpc_add
- See:
mpc_add_fr
- See:
mpc_add_ui
- agm⚠See:
mpc_agm
- arg⚠See:
mpc_arg
- asin⚠See:
mpc_asin
- See:
mpc_asinh
- atan⚠See:
mpc_atan
- See:
mpc_atanh
- See:
mpc_clear
- cmp⚠See:
mpc_cmp
- See:
mpc_cmp_abs
- See:
mpc_cmp_si
- See:
mpc_cmp_si_si
- conj⚠See:
mpc_conj
- cos⚠See:
mpc_cos
- cosh⚠See:
mpc_cosh
- div⚠See:
mpc_div
- See:
mpc_div_2si
- See:
mpc_div_2ui
- See:
mpc_div_fr
- See:
mpc_div_ui
- dot⚠See:
mpc_dot
- Experimental function. See:
mpc_eta_fund
- exp⚠See:
mpc_exp
- fma⚠See:
mpc_fma
- See:
mpc_fr_div
- See:
mpc_fr_sub
- See:
mpc_free_str
- See:
mpc_get_prec
- See:
mpc_get_prec2
- See:
mpc_get_str
- See:
mpc_get_version
- imag⚠See:
mpc_imag
- See:
mpc_imagref
- Constant version of
imagref
. - See:
mpc_init2
- See:
mpc_init3
- See:
mpc_inp_str
- log⚠See:
mpc_log
- See:
mpc_log10
- Experimental function. See:
mpcb_add
- Experimental function. See:
mpcb_can_round
- Experimental function. See:
mpcb_clear
- Experimental function. See:
mpcb_div
- Experimental function. See:
mpcb_div_2ui
- Experimental function. See:
mpcb_get_prec
- Experimental function. See:
mpcb_init
- Experimental function. See:
mpcb_mul
- Experimental function. See:
mpcb_neg
- Experimental function. See:
mpcb_pow_ui
- Experimental function. See:
mpcb_round
- Experimental function. See:
mpcb_set
- Experimental function. See:
mpcb_set_c
- Experimental function. See:
mpcb_set_inf
- Experimental function. See:
mpcb_set_ui_ui
- Experimental function. See:
mpcb_sqr
- Experimental function. See:
mpcb_sqrt
- Experimental function. See:
mpcr_add
- Experimental function. See:
mpcr_add_rounding_error
- Experimental function. See:
mpcr_c_abs_rnd
- Experimental function. See:
mpcr_cmp
- Experimental function. See:
mpcr_div
- Experimental function. See:
mpcr_div_2ui
- Experimental function. See:
mpcr_get_exp
- Experimental function. See:
mpcr_inf_p
- Experimental function. See:
mpcr_lt_half_p
- Experimental function. See:
mpcr_max
- Experimental function. See:
mpcr_mul
- Experimental function. See:
mpcr_mul_2ui
- Experimental function. See:
mpcr_out_str
- Experimental function. See:
mpcr_set
- Experimental function. See:
mpcr_set_inf
- Experimental function. See:
mpcr_set_one
- Experimental function. See:
mpcr_set_ui64_2si64
- Experimental function. See:
mpcr_set_zero
- Experimental function. See:
mpcr_sqr
- Experimental function. See:
mpcr_sqrt
- Experimental function. See:
mpcr_sub
- Experimental function. See:
mpcr_sub_rnd
- Experimental function. See:
mpcr_zero_p
- mul⚠See:
mpc_mul
- See:
mpc_mul_2si
- See:
mpc_mul_2ui
- See:
mpc_mul_fr
- See:
mpc_mul_i
- See:
mpc_mul_si
- See:
mpc_mul_ui
- neg⚠See:
mpc_neg
- norm⚠See:
mpc_norm
- See:
mpc_out_str
- pow⚠See:
mpc_pow
- See:
mpc_pow_d
- See:
mpc_pow_fr
- See:
mpc_pow_si
- See:
mpc_pow_ui
- See:
mpc_pow_z
- proj⚠See:
mpc_proj
- real⚠See:
mpc_real
- See:
mpc_realref
- Constant version of
realref
. - See:
mpc_rootofunity
- set⚠See:
mpc_set
- See:
mpc_set_d
- See:
mpc_set_d_d
- See:
mpc_set_f
- See:
mpc_set_f_f
- See:
mpc_set_fr
- See:
mpc_set_fr_fr
- See:
mpc_set_nan
- See:
mpc_set_prec
- See:
mpc_set_q
- See:
mpc_set_q_q
- See:
mpc_set_si
- See:
mpc_set_si_si
- See:
mpc_set_sj
- See:
mpc_set_sj_sj
- See:
mpc_set_str
- See:
mpc_set_ui
- See:
mpc_set_ui_ui
- See:
mpc_set_uj
- See:
mpc_set_uj_uj
- See:
mpc_set_z
- See:
mpc_set_z_z
- sin⚠See:
mpc_sin
- See:
mpc_sin_cos
- sinh⚠See:
mpc_sinh
- sqr⚠See:
mpc_sqr
- sqrt⚠See:
mpc_sqrt
- See:
mpc_strtoc
- sub⚠See:
mpc_fr_sub
- See:
mpc_sub_fr
- See:
mpc_sub_ui
- sum⚠See:
mpc_sum
- swap⚠See:
mpc_swap
- tan⚠See:
mpc_tan
- tanh⚠See:
mpc_tanh
- See:
mpc_ui_div
- See:
mpc_ui_sub
- See:
mpc_ui_ui_sub
- See:
mpc_urandom
Type Aliases§
- See:
mpc_rnd_t