[−][src]Function bacon_sci::special::laguerre
pub fn laguerre<N: ComplexField>(
n: u32,
tol: N::RealField
) -> Result<Polynomial<N>, String>
Get the nth (positive) laguerre polynomial.
Gets the nth (positive) laguerre polynomial over a specified field. This is done using the direct formula and is properly normalized.
Examples
use bacon_sci::special::laguerre; fn example() { let p_3 = laguerre::<f64>(3, 1e-8).unwrap(); assert_eq!(p_3.order(), 3); assert!((p_3.get_coefficient(0) - 1.0).abs() < 0.00001); assert!((p_3.get_coefficient(1) + 3.0).abs() < 0.00001); assert!((p_3.get_coefficient(2) - 9.0/6.0).abs() < 0.00001); assert!((p_3.get_coefficient(3) + 1.0/6.0).abs() < 0.00001); }