clausen 1.0.1

Rust implementation of Clausen functions.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::range_reduction::range_reduce_odd;


/// Standard Clausen function Cl_1(x) for a real argument
pub fn cl1(x: f64) -> f64 {
    let r = range_reduce_odd(x);

    if r == 0.0 {
        std::f64::INFINITY
    } else {
        -(2.0*(0.5*r).sin()).ln()
    }
}