Data update
This commit is contained in:
parent
ed705008a8
commit
0df55f9f24
2196 changed files with 32999 additions and 3075 deletions
9
Task/Gamma-function/Rust/gamma-function.rust
Normal file
9
Task/Gamma-function/Rust/gamma-function.rust
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
use std::f64::consts;
|
||||
|
||||
fn main() {
|
||||
let gamma = |x: f64| { assert_ne!(x, 0.0); (2.0*consts::PI/x).sqrt() * (x * (x/consts::E).ln()).exp()};
|
||||
(1..=20).for_each(|x| {
|
||||
let x = f64::from(x) / 10.0;
|
||||
println!("{:.02} => {:.10}", x, gamma(x));
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue