pub enum NearCount {
Absolute,
Tolerant,
}Expand description
How a float that is merely NEAR a whole number is admitted where a
count, a length or an index belongs (⍳2+9E¯11, (2+9E¯11)⍴5).
This is not the comparison tolerance — (2+9E¯11)=2 is 0 under both
readings — and the two APL lines part company over it. GNU APL takes an
absolute 1E¯10 at every magnitude, so a large count buys no room and
1E¯11 reads as 0. Dyalog’s window is relative and follows ⎕CT, so
⍴⍳1000000+1E¯9 answers there and is refused here, while every
2±9E¯11 case is the other way about. Neither is a superset.
Variants§
Absolute
GNU APL: an absolute 1E¯10, whatever the magnitude.
Tolerant
Dyalog: the dialect’s own tolerant equality against the whole
number, so ⎕CT moves it and zero admits nothing.
Trait Implementations§
impl Copy for NearCount
impl Eq for NearCount
impl StructuralPartialEq for NearCount
Auto Trait Implementations§
impl Freeze for NearCount
impl RefUnwindSafe for NearCount
impl Send for NearCount
impl Sync for NearCount
impl Unpin for NearCount
impl UnsafeUnpin for NearCount
impl UnwindSafe for NearCount
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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> ⓘ
Converts
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> ⓘ
Converts
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 more