Skip to main content

RangeOps

Struct RangeOps 

Source
pub struct RangeOps(pub DType);
Expand description

Conservative range interpretation of the shared predicates.

Tuple Fields§

§0: DType

Trait Implementations§

Source§

impl<F: Float> Ops<F> for RangeOps

Source§

fn overflow(&self, op: Binary, x: Self::V, y: Self::V) -> Self::B

No overflow (Some(false)) where the operation’s range, as its formula’s facts give it, lies within the computing dtype’s values. Past 2⁵³ a bound and the result’s ends round, so a result stays strictly inside such a bound.

Source§

type V = Range

A value.
Source§

type B = Option<bool>

A truth value.
Source§

type I = Range

Integer bits at the resolved working width.
Source§

type W = Range

A binary64 temporary for short mixed-width reductions.
Source§

fn width(&self) -> FloatWidth

Source§

fn fused(&self) -> bool

Source§

fn integral(&self) -> bool

Whether values are integers, as a compiler’s values at an integer type are. A recipe for an integer object asks before taking an integer-only step (Binary::BitAnd). Floats never are.
Source§

fn widen(&self, _: Self::V) -> Self::W

Source§

fn wide_number(&self, x: f64) -> Self::W

Source§

fn wide_multiply_add(&self, _: Self::W, _: Self::W, _: Self::W) -> Self::W

Source§

fn narrow(&self, _: Self::W) -> Self::V

Source§

fn integer(&self, x: i64) -> Self::I

Source§

fn integer_op(&self, _: Integer, _: Self::I, _: Self::I) -> Self::I

Source§

fn integer_compare(&self, op: Cmp, x: Self::I, y: Self::I) -> Self::B

Source§

fn integer_select(&self, test: Self::B, x: Self::I, y: Self::I) -> Self::I

Source§

fn to_integer(&self, _: Self::V) -> Self::I

Source§

fn from_integer(&self, _: Self::I) -> Self::V

Source§

fn to_bits(&self, _: Self::V) -> Self::I

Source§

fn from_bits(&self, _: Self::I) -> Self::V

Source§

fn number(&self, x: F) -> Self::V

The number x.
Source§

fn constant(&self, x: Self::V) -> Option<F>

v where it’s one number that every item shares, known before any item is read, such as the 3 of x^3. A recipe can pick a cheaper formula by it. None where v varies by item.
Source§

fn unary(&self, op: Unary, x: Self::V) -> Self::V

Source§

fn binary(&self, _: Binary, _: Self::V, _: Self::V) -> Self::V

Source§

fn compare(&self, op: Cmp, x: Self::V, y: Self::V) -> Self::B

Source§

fn multiply_add(&self, _: Self::V, _: Self::V, _: Self::V) -> Self::V

x·y + z, rounded once where the target fuses multiply-add (FUSED), as rustymath’s mla gives it.
Source§

fn and(&self, x: Self::B, y: Self::B) -> Self::B

Source§

fn or(&self, x: Self::B, y: Self::B) -> Self::B

Source§

fn not(&self, x: Self::B) -> Self::B

Source§

fn select(&self, test: Self::B, x: Self::V, y: Self::V) -> Self::V

x where m holds, otherwise y. ∂’s recorder runs a recipe on whole values, where m and each array case must have one layout: build them from the same arguments.
Source§

fn one_where(&self, m: Self::B) -> Self::V

1 where m holds, otherwise 0.
Source§

fn tolerance(&self, fallback: F) -> Self::V

Captured tolerance; recording backends return its runtime setting slot.
Source§

fn sign(&self, x: Self::V) -> Self::V

The sign of x, as sign gives it.
Source§

fn reciprocal(&self, x: Self::V) -> Self::V

1 ÷ x, as reciprocal gives it.
Source§

fn power(&self, k: F, x: Self::V) -> Self::V

x raised to k, a constant that Exponent::of routes off the general route, as power gives it.
Source§

fn real_power(&self, x: Self::V, y: Self::V) -> Self::V

The real part of x^y through the existing power formula.
Source§

fn power_slope( &self, x: Self::V, y: Self::V, r: Self::V, halves: bool, ) -> Self::V

The partial in x of x^y = r; halves permits constant half-integer powers.
Source§

fn negate(&self, x: Self::V) -> Self::V

Source§

fn magnitude(&self, x: Self::V) -> Self::V

Source§

fn sqrt(&self, x: Self::V) -> Self::V

Source§

fn floor(&self, x: Self::V) -> Self::V

Source§

fn ln(&self, x: Self::V) -> Self::V

Source§

fn sin(&self, x: Self::V) -> Self::V

Source§

fn cos(&self, x: Self::V) -> Self::V

Source§

fn sinh(&self, x: Self::V) -> Self::V

Source§

fn cosh(&self, x: Self::V) -> Self::V

Source§

fn sqrt1mx2(&self, x: Self::V) -> Self::V

Source§

fn sqrt1px2(&self, x: Self::V) -> Self::V

Source§

fn digamma(&self, x: Self::V) -> Self::V

Source§

fn exp(&self, x: Self::V) -> Self::V

Source§

fn lgamma(&self, x: Self::V) -> Self::V

Source§

fn complement(&self, x: Self::V) -> Self::V

Source§

fn add(&self, x: Self::V, y: Self::V) -> Self::V

Source§

fn subtract(&self, x: Self::V, y: Self::V) -> Self::V

Source§

fn multiply(&self, x: Self::V, y: Self::V) -> Self::V

Source§

fn divide(&self, x: Self::V, y: Self::V) -> Self::V

Source§

fn larger(&self, x: Self::V, y: Self::V) -> Self::V

Source§

fn smaller(&self, x: Self::V, y: Self::V) -> Self::V

Source§

fn binom(&self, x: Self::V, y: Self::V) -> Self::V

Source§

fn binom_dn(&self, x: Self::V, y: Self::V) -> Self::V

Source§

fn binom_dk(&self, x: Self::V, y: Self::V) -> Self::V

Source§

fn polygamma(&self, x: Self::V, y: Self::V) -> Self::V

Source§

fn bit_and(&self, x: Self::V, y: Self::V) -> Self::V

Source§

fn less(&self, x: Self::V, y: Self::V) -> Self::B

Source§

fn less_equal(&self, x: Self::V, y: Self::V) -> Self::B

Source§

fn equal(&self, x: Self::V, y: Self::V) -> Self::B

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.