fivemack icon

Untitled

fivemack | PRO | 10/20/23 12:37:11 PM UTC | 0 ⭐ | 233 👁️ | Never ⏰ | []
text |

430 B

|

None

|

0 👍

/

0 👎

fn roots<T:std::ops::Add<Output = T> + 
std::ops::Sub<Output = T> +  
std::ops::Div<Output = T> + 
std::ops::Mul<Output = T> + 
std::ops::Neg<Output = T> +
num_traits::FromPrimitive + 
PartialOrd + 
std::fmt::Debug + 
Copy + Clone + 
num_traits::Zero>(f:Polynomial<T>, left:T, right:T) -> Vec<T>
{
    let rr = base_roots(f.clone(),left,right);
    rr.into_iter().map(|x| { root_by_newton_raphson_near(x, f.clone())}).collect()
}

Comments