pub struct MultiDual<const N: usize> {
pub real: f64,
pub dual: [f64; N],
}Expand description
A real value carrying N simultaneous derivative lanes.
See the module docs for why the lanes are bit-identical to N
separate tang::Dual evaluations.
Fields§
§real: f64The value.
dual: [f64; N]The derivative in each seeded direction.
Implementations§
Trait Implementations§
Source§impl<const N: usize> AddAssign for MultiDual<N>
impl<const N: usize> AddAssign for MultiDual<N>
Source§fn add_assign(&mut self, o: Self)
fn add_assign(&mut self, o: Self)
Performs the
+= operation. Read moreimpl<const N: usize> Copy for MultiDual<N>
Source§impl<const N: usize> DivAssign for MultiDual<N>
impl<const N: usize> DivAssign for MultiDual<N>
Source§fn div_assign(&mut self, o: Self)
fn div_assign(&mut self, o: Self)
Performs the
/= operation. Read moreSource§impl<const N: usize> MulAssign for MultiDual<N>
impl<const N: usize> MulAssign for MultiDual<N>
Source§fn mul_assign(&mut self, o: Self)
fn mul_assign(&mut self, o: Self)
Performs the
*= operation. Read moreSource§impl<const N: usize> PartialOrd for MultiDual<N>
impl<const N: usize> PartialOrd for MultiDual<N>
Source§impl<const N: usize> Scalar for MultiDual<N>
impl<const N: usize> Scalar for MultiDual<N>
const ZERO: Self
const ONE: Self
const TWO: Self
const HALF: Self
const PI: Self
const TAU: Self
const FRAC_PI_2: Self
const EPSILON: Self
const INFINITY: Self
const NEG_INFINITY: Self
fn sqrt(self) -> Self
fn abs(self) -> Self
fn sin(self) -> Self
fn cos(self) -> Self
fn tan(self) -> Self
fn asin(self) -> Self
fn acos(self) -> Self
fn atan2(self, other: Self) -> Self
fn sin_cos(self) -> (Self, Self)
fn min(self, other: Self) -> Self
fn max(self, other: Self) -> Self
fn clamp(self, lo: Self, hi: Self) -> Self
fn recip(self) -> Self
fn powi(self, n: i32) -> Self
fn copysign(self, sign: Self) -> Self
fn signum(self) -> Self
fn floor(self) -> Self
fn ceil(self) -> Self
fn round(self) -> Self
fn exp(self) -> Self
fn ln(self) -> Self
fn powf(self, p: Self) -> Self
fn tanh(self) -> Self
fn sinh(self) -> Self
fn cosh(self) -> Self
fn acosh(self) -> Self
fn asinh(self) -> Self
fn atanh(self) -> Self
fn from_f64(v: f64) -> Self
fn to_f64(self) -> f64
fn from_i32(v: i32) -> Self
Source§fn select(cond: Self, a: Self, b: Self) -> Self
fn select(cond: Self, a: Self, b: Self) -> Self
Branchless select: returns
a if cond > 0, else b.Source§fn alg_add(self, other: Self) -> Self
fn alg_add(self, other: Self) -> Self
Reassociable add: with the
algebraic feature on f32/f64 the compiler
may reorder/vectorize chains of these (result varies by ~1 ulp per
element vs strict order). Defaults to strict + so Dual, Interval,
and non-feature builds are bit-identical to today.Source§fn alg_sub(self, other: Self) -> Self
fn alg_sub(self, other: Self) -> Self
Reassociable sub — see
Scalar::alg_add.Source§fn alg_mul(self, other: Self) -> Self
fn alg_mul(self, other: Self) -> Self
Reassociable mul — see
Scalar::alg_add.Auto Trait Implementations§
impl<const N: usize> Freeze for MultiDual<N>
impl<const N: usize> RefUnwindSafe for MultiDual<N>
impl<const N: usize> Send for MultiDual<N>
impl<const N: usize> Sync for MultiDual<N>
impl<const N: usize> Unpin for MultiDual<N>
impl<const N: usize> UnsafeUnpin for MultiDual<N>
impl<const N: usize> UnwindSafe for MultiDual<N>
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