#[non_exhaustive]pub enum ArithmeticRequirement {
F64Ieee754Basic,
F32Ieee754Basic,
NearestEvenGradualUnderflow,
RoundToNearestSqrt,
FusedMulAdd,
CorrectlyRoundedElementary,
}Expand description
Arithmetic property that a runtime must provide for a component.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
F64Ieee754Basic
IEEE 754 binary64 add, subtract, multiply and divide.
F32Ieee754Basic
IEEE 754 binary32 add, subtract, multiply and divide.
NearestEvenGradualUnderflow
Round-to-nearest-even with gradual underflow to subnormals.
RoundToNearestSqrt
Square root rounded to nearest.
FusedMulAdd
Fused multiply-add with one rounding.
CorrectlyRoundedElementary
F64 exp, log, log1p, pow and acos through numr CorrectlyRoundedOps.
exp, log and log1p are correctly rounded to nearest.
pow is correctly rounded modulo the unknown hardest cases.
acos is correctly rounded on |x| >= 2^-4, proven by an exhaustive upstream search.
Below 2^-4 no proof covers it, and numr’s MPFR checks find no misrounded input.
Interval acos pads one ulp outward, which stays valid for any faithful result.
All five are deterministic on every runtime that meets the contracts.
Needs IEEE basic arithmetic and fused multiply-add.
Evidence: numr tests/correctly_rounded.rs checks every function against MPFR, and
tests/backend_parity/correctly_rounded.rs checks CUDA against CPU bit for bit.
Implementations§
Trait Implementations§
Source§impl Clone for ArithmeticRequirement
impl Clone for ArithmeticRequirement
impl Copy for ArithmeticRequirement
Source§impl Debug for ArithmeticRequirement
impl Debug for ArithmeticRequirement
impl Eq for ArithmeticRequirement
Source§impl PartialEq for ArithmeticRequirement
impl PartialEq for ArithmeticRequirement
impl StructuralPartialEq for ArithmeticRequirement
Auto Trait Implementations§
impl Forget for ArithmeticRequirement
impl Freeze for ArithmeticRequirement
impl Move for ArithmeticRequirement
impl RefUnwindSafe for ArithmeticRequirement
impl Send for ArithmeticRequirement
impl Sync for ArithmeticRequirement
impl Unpin for ArithmeticRequirement
impl UnsafeUnpin for ArithmeticRequirement
impl UnwindSafe for ArithmeticRequirement
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.