Skip to main content

flint_sys/
double_extras.rs

1/* automatically generated by rust-bindgen 0.70.1 */
2
3use crate::deps::*;
4use crate::flint::*;
5
6
7pub const D_BITS: u32 = 53;
8pub const D_MIN_NORMAL_EXPONENT: i32 = -1022;
9pub const D_MAX_NORMAL_EXPONENT: u32 = 1023;
10pub const D_EXPONENT_BIAS: u32 = 1023;
11pub const D_EXPONENT_SHIFT: u32 = 52;
12#[repr(C)]
13#[derive(Copy, Clone)]
14pub union double_uint64_u {
15    pub f: f64,
16    pub i: u64,
17}
18#[allow(clippy::unnecessary_operation, clippy::identity_op)]
19const _: () = {
20    ["Size of double_uint64_u"][::std::mem::size_of::<double_uint64_u>() - 8usize];
21    ["Alignment of double_uint64_u"][::std::mem::align_of::<double_uint64_u>() - 8usize];
22    ["Offset of field: double_uint64_u::f"][::std::mem::offset_of!(double_uint64_u, f) - 0usize];
23    ["Offset of field: double_uint64_u::i"][::std::mem::offset_of!(double_uint64_u, i) - 0usize];
24};
25impl Default for double_uint64_u {
26    fn default() -> Self {
27        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
28        unsafe {
29            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
30            s.assume_init()
31        }
32    }
33}
34extern "C" {
35    pub fn d_randtest(state: *mut flint_rand_struct) -> f64;
36    pub fn d_randtest_signed(state: *mut flint_rand_struct, minexp: slong, maxexp: slong) -> f64;
37    pub fn d_randtest_special(state: *mut flint_rand_struct, minexp: slong, maxexp: slong) -> f64;
38    #[link_name = "d_polyval__extern"]
39    pub fn d_polyval(poly: *const f64, len: libc::c_int, x: f64) -> f64;
40    pub fn d_lambertw(x: f64) -> f64;
41    #[link_name = "d_is_nan__extern"]
42    pub fn d_is_nan(x: f64) -> libc::c_int;
43    pub fn d_log2(x: f64) -> f64;
44    #[link_name = "d_mul_2exp_inrange__extern"]
45    pub fn d_mul_2exp_inrange(x: f64, i: libc::c_int) -> f64;
46    #[link_name = "d_mul_2exp_inrange2__extern"]
47    pub fn d_mul_2exp_inrange2(x: f64, i: libc::c_int) -> f64;
48    #[link_name = "d_mul_2exp__extern"]
49    pub fn d_mul_2exp(x: f64, i: libc::c_int) -> f64;
50}