#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum SolMathError {
DomainError,
Overflow,
DivisionByZero,
NoConvergence,
}
impl core::fmt::Display for SolMathError {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.write_str(match self {
Self::DomainError => "input outside the mathematical domain",
Self::Overflow => "result would overflow the representable range",
Self::DivisionByZero => "division by zero",
Self::NoConvergence => "iterative method did not converge",
})
}
}