changed function and integral
This commit is contained in:
@@ -21,11 +21,10 @@ const SAMPLES_PER_ITERATION: usize = 250;
|
|||||||
|
|
||||||
fn f(x: f64) -> f64 {
|
fn f(x: f64) -> f64 {
|
||||||
E.powf(x) * (1.0 / x.sin()).cos() + x.powf(2.0)
|
E.powf(x) * (1.0 / x.sin()).cos() + x.powf(2.0)
|
||||||
//E.powf(-x) * x.tan() * (2.0 / (2.0 * x).sin()).cos() + 1.0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let bounds: Bounds = Bounds::new(LinearBounds::new(-1_f64, 1_f64), LinearBounds::new(0_f64, 10_f64));
|
let bounds: Bounds = Bounds::new(LinearBounds::new(3.1_f64, 3.2_f64), LinearBounds::new(0_f64, 10_f64));
|
||||||
let func: Function = Function::new(f);
|
let func: Function = Function::new(f);
|
||||||
|
|
||||||
let start: Instant = Instant::now();
|
let start: Instant = Instant::now();
|
||||||
|
|||||||
Reference in New Issue
Block a user