Lines Matching refs:f64
588 pub fn powd(x: f64, y: f64) -> f64 {
589 const BP: [f64; 2] = [1.0, 1.5];
590 const DP_H: [f64; 2] = [0.0, 5.84962487220764160156e-01]; /* 0x3fe2b803_40000000 */
591 const DP_L: [f64; 2] = [0.0, 1.35003920212974897128e-08]; /* 0x3E4CFDEB, 0x43CFD006 */
592 const TWO53: f64 = 9007199254740992.0; /* 0x43400000_00000000 */
593 const HUGE: f64 = 1.0e300;
594 const TINY: f64 = 1.0e-300;
597 const L1: f64 = 5.99999999999994648725e-01; /* 0x3fe33333_33333303 */
598 const L2: f64 = 4.28571428578550184252e-01; /* 0x3fdb6db6_db6fabff */
599 const L3: f64 = 3.33333329818377432918e-01; /* 0x3fd55555_518f264d */
600 const L4: f64 = 2.72728123808534006489e-01; /* 0x3fd17460_a91d4101 */
601 const L5: f64 = 2.30660745775561754067e-01; /* 0x3fcd864a_93c9db65 */
602 const L6: f64 = 2.06975017800338417784e-01; /* 0x3fca7e28_4a454eef */
603 const P1: f64 = 1.66666666666666019037e-01; /* 0x3fc55555_5555553e */
604 const P2: f64 = -2.77777777770155933842e-03; /* 0xbf66c16c_16bebd93 */
605 const P3: f64 = 6.61375632143793436117e-05; /* 0x3f11566a_af25de2c */
606 const P4: f64 = -1.65339022054652515390e-06; /* 0xbebbbd41_c5d26bf1 */
607 const P5: f64 = 4.13813679705723846039e-08; /* 0x3e663769_72bea4d0 */
608 const LG2: f64 = 6.93147180559945286227e-01; /* 0x3fe62e42_fefa39ef */
609 const LG2_H: f64 = 6.93147182464599609375e-01; /* 0x3fe62e43_00000000 */
610 const LG2_L: f64 = -1.90465429995776804525e-09; /* 0xbe205c61_0ca86c39 */
611 const OVT: f64 = 8.0085662595372944372e-017; /* -(1024-log2(ovfl+.5ulp)) */
612 const CP: f64 = 9.61796693925975554329e-01; /* 0x3feec709_dc3a03fd =2/(3ln2) */
613 const CP_H: f64 = 9.61796700954437255859e-01; /* 0x3feec709_e0000000 =(float)cp */
614 const CP_L: f64 = -7.02846165095275826516e-09; /* 0xbe3e2fe0_145b01f5 =tail of cp_h*/
615 const IVLN2: f64 = 1.44269504088896338700e+00; /* 0x3ff71547_652b82fe =1/ln2 */
616 const IVLN2_H: f64 = 1.44269502162933349609e+00; /* 0x3ff71547_60000000 =24b 1/ln2*/
617 const IVLN2_L: f64 = 1.92596299112661746887e-08; /* 0x3e54ae0b_f85ddf44 =1/ln2 tail*/
619 let t1: f64;
620 let t2: f64;
725 let mut ax: f64 = fabsd(x);
730 let mut z: f64 = ax;
749 let mut s: f64 = 1.0; /* sign of result */
802 let t: f64 = ax - 1.0; /* t has 20 trailing zeros */
803 let w: f64 = (t * t) * (0.5 - t * (0.3333333333333333333333 - t * 0.25));
804 let u: f64 = IVLN2_H * t; /* ivln2_h has 21 sig. bits */
805 let v: f64 = t * IVLN2_L - w * IVLN2;
839 let u: f64 = ax - i!(BP, k as usize); /* bp[0]=1.0, bp[1]=1.5 */
840 let v: f64 = 1.0 / (ax + i!(BP, k as usize));
841 let ss: f64 = u * v;
845 let t_h: f64 = with_set_high_word(
849 let t_l: f64 = ax - (t_h - i!(BP, k as usize));
850 let s_l: f64 = v * ((u - s_h * t_h) - s_h * t_l);
853 let s2: f64 = ss * ss;
854 let mut r: f64 = s2 * s2 * (L1 + s2 * (L2 + s2 * (L3 + s2 * (L4 + s2 * (L5 + s2 * L6)))));
856 let s2: f64 = s_h * s_h;
857 let t_h: f64 = with_set_low_word(3.0 + s2 + r, 0);
858 let t_l: f64 = r - ((t_h - 3.0) - s2);
861 let u: f64 = s_h * t_h;
862 let v: f64 = s_l * t_h + t_l * ss;
865 let p_h: f64 = with_set_low_word(u + v, 0);
867 let z_h: f64 = CP_H * p_h; /* cp_h+cp_l = 2/(3*log2) */
868 let z_l: f64 = CP_L * p_h + p_l * CP + i!(DP_L, k as usize);
871 let t: f64 = n as f64;
877 let y1: f64 = with_set_low_word(y, 0);
878 let p_l: f64 = (y - y1) * t1 + y * t2;
879 let mut p_h: f64 = y1 * t1;
880 let z: f64 = p_l + p_h;
918 let t: f64 = with_set_high_word(0.0, (n & !(0x000fffff >> k)) as u32);
926 let t: f64 = with_set_low_word(p_l + p_h, 0);
927 let u: f64 = t * LG2_H;
928 let v: f64 = (p_l - (t - p_h)) * LG2 + t * LG2_L;
929 let mut z: f64 = u + v;
930 let w: f64 = v - (z - u);
931 let t: f64 = z * z;
932 let t1: f64 = z - t * (P1 + t * (P2 + t * (P3 + t * (P4 + t * P5))));
933 let r: f64 = (z * t1) / (t1 - 2.0) - (w + z * w);
948 /// Absolute value (magnitude) (f64)
951 pub fn fabsd(x: f64) -> f64 {
952 f64::from_bits(x.to_bits() & (u64::MAX / 2))
955 pub fn scalbnd(x: f64, mut n: i32) -> f64 {
956 let x1p1023 = f64::from_bits(0x7fe0000000000000); // 0x1p1023 === 2 ^ 1023
957 let x1p53 = f64::from_bits(0x4340000000000000); // 0x1p53 === 2 ^ 53
958 let x1p_1022 = f64::from_bits(0x0010000000000000); // 0x1p-1022 === 2 ^ (-1022)
985 y * f64::from_bits(((0x3ff + n) as u64) << 52)
1066 pub fn sqrtd(x: f64) -> f64 {
1090 const TINY: f64 = 1.0e-300;
1092 let mut z: f64;
1215 f64::from_bits((ix0 as u64) << 32 | ix1.0 as u64)
1220 fn get_high_word(x: f64) -> u32 {
1225 fn with_set_high_word(f: f64, hi: u32) -> f64 {
1229 f64::from_bits(tmp)
1233 fn with_set_low_word(f: f64, lo: u32) -> f64 {
1237 f64::from_bits(tmp)