https://github.com/expander/clausen.rs
Clausen functions in rust
https://github.com/expander/clausen.rs
math rust special-functions
Last synced: 2 months ago
JSON representation
Clausen functions in rust
- Host: GitHub
- URL: https://github.com/expander/clausen.rs
- Owner: Expander
- Created: 2023-11-10T06:13:50.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-02T08:53:22.000Z (over 1 year ago)
- Last Synced: 2025-10-20T08:54:08.074Z (6 months ago)
- Topics: math, rust, special-functions
- Language: Rust
- Homepage:
- Size: 585 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Citation: CITATION.cff
Awesome Lists containing this project
README
clausen
=======
[](https://github.com/Expander/clausen.rs/actions)
[](https://docs.rs/clausen/)
[](https://coveralls.io/github/Expander/clausen.rs)
The clausen package provides Rust implementations of the Standard
Clausen functions and Glaisher-Clausen functions of integer order for
real or complex arguments.
The clausen package depends on the `num` and the `polylog` crates.
Example
-------
```rust
use clausen::{Cl, Sl};
use num::complex::Complex;
let x = 1.0;
let z = Complex::new(1.0, 1.0);
let n = 2;
println!("Cl_{}({}) = {}", n, x, x.cl(n)); // Cl_n(x)
println!("Cl_{}({}) = {}", n, z, z.cl(n)); // Cl_n(z)
println!("Sl_{}({}) = {}", n, x, x.sl(n)); // Sl_n(x)
println!("Sl_{}({}) = {}", n, z, z.sl(n)); // Sl_n(z)
```
Notes
-----
The implementation of the Standard Clausen function `x.cl(n)` for real
`x` and positive `n` follows the approach presented in [Jiming Wu,
Xiaoping Zhang, Dongjie Liu, "An efficient calculation of the Clausen
functions Cl_n(θ)(n >= 2)", Bit Numer Math 50, 193-206 (2010)
[https://doi.org/10.1007/s10543-009-0246-8](https://doi.org/10.1007/s10543-009-0246-8)].
Copying
-------
clausen is licenced under the GNU Lesser General Public License (GNU
LGPL) version 3.