[−][src]Module gmp_mpfr_sys::mpc
Function and type bindings for the MPC library.
Examples
use core::{f64, 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 = MaybeUninit::uninit(); mpc::init3(c.as_mut_ptr(), 53, 53); let mut c = c.assume_init(); let dirs = mpc::set_d_d(&mut c, one_third, neg_inf, mpc::RNDNN); assert_eq!(dirs, 0); let re_ptr = mpc::realref_const(&c); let re = mpfr::get_d(re_ptr, mpfr::rnd_t::RNDN); assert_eq!(re, one_third); let im_ptr = mpc::imagref_const(&c); let im = mpfr::get_d(im_ptr, mpfr::rnd_t::RNDN); assert_eq!(im, neg_inf); mpc::clear(&mut c); }
Structs
mpc_t | See: |
Constants
RNDDD | See: Rounding Modes |
RNDDN | See: Rounding Modes |
RNDDU | See: Rounding Modes |
RNDDZ | See: Rounding Modes |
RNDND | See: Rounding Modes |
RNDNN | See: Rounding Modes |
RNDNU | See: Rounding Modes |
RNDNZ | See: Rounding Modes |
RNDUD | See: Rounding Modes |
RNDUN | See: Rounding Modes |
RNDUU | See: Rounding Modes |
RNDUZ | See: Rounding Modes |
RNDZD | See: Rounding Modes |
RNDZN | See: Rounding Modes |
RNDZU | See: Rounding Modes |
RNDZZ | See: Rounding Modes |
VERSION | See: |
VERSION_MAJOR | See: |
VERSION_MINOR | See: |
VERSION_PATCHLEVEL | |
VERSION_STRING | See: |
Functions
Type Definitions
rnd_t | See: |