diff --git a/src/lib.rs b/src/lib.rs index fd9d95ac..88b93b0b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,4 @@ pub mod framework; pub mod body; +pub mod zeroes; pub mod instruction; diff --git a/src/zeroes.rs b/src/zeroes.rs new file mode 100644 index 00000000..02fec711 --- /dev/null +++ b/src/zeroes.rs @@ -0,0 +1,27 @@ +//find roots of polynomials +pub fn zeroes2(a0:f32,a1:f32,a2:f32) -> Vec{ + if a2==0f32{ + return zeroes1(a0, a1); + } + let mut radicand=a1*a1-4f32*a2*a0; + if 0f32 Vec { + if a1==0f32{ + return vec![]; + } else { + return vec![-a0/a1]; + } +} \ No newline at end of file