rsl-polynomials 0.1.5

A re-write of GSL's Polynomials Routines in Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
use crate::{PolyError, Result};

/// Solves a linear equation ax+b = 0, with real coefficients, returning a Vec with the
/// found 0-2 real roots.
pub(crate) fn solve_real_linear(a: f64, b: f64) -> Result<f64> {
    match a {
        0.0 => Err(PolyError::ConstantPoly),
        _ => Ok(-b / a),
    }
}