fn r(z: f64) -> f64 { let p: f64 = z * (PS0 + z * (PS1 + z * (PS2 + z * (PS3 + z * (PS4 + z * PS5))))); let q: f64 = 1.0 + z * (QS1 + z * (QS2 + z * (QS3 + z * QS4)));
p / q
}
/// Arccosine (f64) /// /// Computes the inverse cosine (arc cosine) of the input value. /// Arguments must be in the range -1 to 1. /// Returns values in radians, in the range of 0 to pi. #[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] pubfn acos(x: f64) -> f64 { let x1p_120f = f64::from_bits(0x3870000000000000); // 0x1p-120 === 2 ^ -120 let z: f64; let w: f64; let s: f64; let c: f64; let df: f64; let hx: u32; let ix: u32;
hx = (x.to_bits() >> 32) as u32;
ix = hx & 0x7fffffff; /* |x| >= 1 or nan */ if ix >= 0x3ff00000 { let lx: u32 = x.to_bits() as u32;
if ((ix - 0x3ff00000) | lx) == 0 { /* acos(1)=0, acos(-1)=pi */ if (hx >> 31) != 0 { return2. * PIO2_HI + x1p_120f;
} return0.;
} return0. / (x - x);
} /* |x| < 0.5 */ if ix < 0x3fe00000 { if ix <= 0x3c600000 { /* |x| < 2**-57 */ return PIO2_HI + x1p_120f;
} return PIO2_HI - (x - (PIO2_LO - x * r(x * x)));
} /* x < -0.5 */ if (hx >> 31) != 0 {
z = (1.0 + x) * 0.5;
s = sqrt(z);
w = r(z) * s - PIO2_LO; return2. * (PIO2_HI - (s + w));
} /* x > 0.5 */
z = (1.0 - x) * 0.5;
s = sqrt(z); // Set the low 4 bytes to zero
df = f64::from_bits(s.to_bits() & 0xff_ff_ff_ff_00_00_00_00);
c = (z - df * df) / (s + df);
w = r(z) * s + c; 2. * (df + w)
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet am 2026-06-18)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.