mod simpson;

#[derive(Debug)]
pub enum IntegrationError {
    DivergentIntegral,
}

impl std::fmt::Display for IntegrationError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match self {
            IntegrationError::DivergentIntegral => write!(f, "Integral did not converge"),
        }
    }
}

impl std::error::Error for IntegrationError {}

pub use simpson::{adaptive_simpson, simpson_1, simpson_2};
