RosettaCodeData/Task/Eulers-identity/Rust/eulers-identity.rust

9 lines
151 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
use std::f64::consts::PI;
extern crate num_complex;
use num_complex::Complex;
fn main() {
println!("{:e}", Complex::new(0.0, PI).exp() + 1.0);
}