pub fn cos(x: &DBig, precision: usize) -> OxiNumResult<DBig>Expand description
Compute cos(x) using Taylor series with argument reduction.
ยงExamples
use oxinum_float::cos;
use std::str::FromStr;
let x = dashu_float::DBig::from_str("0.0").unwrap();
let result = cos(&x, 30).unwrap();
let s = result.to_string();
assert!(s.starts_with("1"), "cos(0) = {}", s);