I hereby claim:
- I am magneticleaves on github.
- I am ellh (https://keybase.io/ellh) on keybase.
- I have a public key ASBaosPNTUGJcgF2qvBLMM_HNzhl4ffXIf2gJytLMNeXNgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
fn main() { | |
let n = 35; | |
let mut e: f64 = 1.0; | |
for i in 1..n { e += (1.0 / factorial(i) as f64); } | |
println!("e value: {}", e); | |
} | |
fn factorial(mut n: u128) -> u128 { | |
let mut r = 1; | |
for i in 2..n+1 { r *= i; } |