Add test infrastructure for f16 and f128

Update test traits to support `f16` and `f128`, as applicable. Add the
new routines (`fabs` and `copysign` for `f16` and `f128`) to the list of
all operations.
This commit is contained in:
Trevor Gross
2025-01-03 00:12:53 +00:00
parent 42c7ace5ba
commit 6b5e8b20f0
13 changed files with 205 additions and 43 deletions

View File

@@ -187,3 +187,15 @@ impl HasDomain<f32> for crate::op::lgammaf_r::Routine {
impl HasDomain<f64> for crate::op::lgamma_r::Routine {
const DOMAIN: Domain<f64> = Domain::<f64>::LGAMMA;
}
/* Not all `f16` and `f128` functions exist yet so we can't easily use the macros. */
#[cfg(f16_enabled)]
impl HasDomain<f16> for crate::op::fabsf16::Routine {
const DOMAIN: Domain<f16> = Domain::<f16>::UNBOUNDED;
}
#[cfg(f128_enabled)]
impl HasDomain<f128> for crate::op::fabsf128::Routine {
const DOMAIN: Domain<f128> = Domain::<f128>::UNBOUNDED;
}