Add tests for edge cases

Introduce a generator that will tests various points of interest
including zeros, infinities, and NaNs.
This commit is contained in:
Trevor Gross
2024-12-19 11:22:02 +00:00
parent a8a2f70ae6
commit 13611a1b76
4 changed files with 101 additions and 3 deletions

View File

@@ -3,7 +3,7 @@
use std::fmt;
use std::ops::{self, Bound};
use crate::Float;
use crate::{Float, FloatExt};
/// Representation of a function's domain.
#[derive(Clone, Debug)]
@@ -19,7 +19,7 @@ pub struct Domain<T> {
type BoxIter<T> = Box<dyn Iterator<Item = T>>;
impl<F: Float> Domain<F> {
impl<F: FloatExt> Domain<F> {
/// The start of this domain, saturating at negative infinity.
pub fn range_start(&self) -> F {
match self.start {