Skip to main content

Double

Struct Double 

Source
pub struct Double;
Expand description

Double-double: DD, DV, Du, Jet<N>, DDLu; its dot product is the plain sum of double-double products

Trait Implementations§

Source§

impl Clone for Double

Source§

fn clone(&self) -> Double

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Double

Source§

impl Debug for Double

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<S> Precision<S> for Double
where S: Simd,

Source§

const PARTS: usize = 2

the number of f64 parts of a scalar: 2 for double-double, 4 for quad-double, 8 for octo-double
Source§

const ZERO: DD = DD::ZERO

zero and one
Source§

const ONE: DD = DD::ONE

Source§

type Scalar = DD

the scalar: DD, QD, OD
Source§

type V = DV<S>

8 scalars in lanes: DV, QV, OV
Source§

type U = Du<S>

forward-mode dual, value and one tangent in this precision: Du, Qu, Ou
Source§

type J<const N: usize> = Jet<S, N>

truncated power series with N coefficients in this precision: Jet<N>, QJet<N>, OJet<N>
Source§

type Lu = DDLu

dense LU with partial pivoting in this precision: DDLu, QDLu, ODLu
Source§

fn new(p: &[f64]) -> DD

a scalar from up to PARTS parts, the missing ones zero, renormalized (QD::new, OD::new) Read more
Source§

fn from_raw(p: &[f64]) -> DD

a scalar from exactly PARTS parts as they are, not renormalized (the struct literal QD { x }, OD { x }) Read more
Source§

fn part(x: DD, q: usize) -> f64

part q of a scalar Read more
Source§

fn from_dd(d: DD) -> DD

from double-double, exactly
Source§

fn to_dd(x: DD) -> DD

rounded to double-double
Source§

fn dot(pairs: impl Iterator<Item = (DD, DD)>) -> DD

sum of the products a b over the pairs, in this precision’s accumulator (QdAcc, OdAcc): add_prod per pair, finish at the end
Source§

fn splat(x: DD) -> DV<S>

the scalar in every lane (QV::splat, OV::splat)
Source§

fn dual(v: DV<S>, d: DV<S>) -> Du<S>

a dual from its value and tangent lanes
Source§

fn coef<L>(l: L, k: usize) -> DV<S>
where L: Lane<S = S>,

coefficient k of a lane in this precision (Lane::coef_qd, Lane::coef_od)
Source§

fn set_coef<L>(l: &mut L, k: usize, c: DV<S>)
where L: Lane<S = S>,

set coefficient k of a lane from this precision (Lane::set_coef_qd, Lane::set_coef_od)
Source§

fn load_field<const B: usize>(parts: &[&[f64]]) -> Fl<DV<S>, B>

a field of 8 B values from PARTS part arrays of at least 8 B values each (Fl::load_parts, Fl::load_parts_od) Read more
Source§

fn field_get<const B: usize>(f: &Fl<DV<S>, B>, j: usize) -> DD

value j of a field (Fl::get)
Source§

fn field_coef<L, const B: usize>(f: &Fl<L, B>, k: usize) -> Fl<DV<S>, B>
where L: Lane<S = S>,

coefficient k of a field in this precision (Fl::coef_qd, Fl::coef_od)
Source§

fn field_set_coef<L, const B: usize>( f: &mut Fl<L, B>, k: usize, c: &Fl<DV<S>, B>, )
where L: Lane<S = S>,

set coefficient k of a field from this precision (Fl::set_coef_qd, Fl::set_coef_od)
Source§

fn field_dual<const B: usize>( v: &Fl<DV<S>, B>, t: &Fl<DV<S>, B>, ) -> Fl<Du<S>, B>

a dual field from its values and tangents, exactly (Fl::from_vt_qd, Fl::from_vt_od)
Source§

fn lu_factor( n: usize, ld: usize, c: Vec<Vec<f64>>, par: bool, ) -> Result<DDLu, String>

factor the n x n matrix of PARTS column-major part arrays with leading dimension ld (QDLu::factor, ODLu::factor). Each entry’s parts must be normalized, as new returns them: the pivot search reads the leading parts only. Read more
Source§

fn lu_solve(lu: &DDLu, b: &mut [DD])

solve in place with the factored matrix (QDLu::solve, ODLu::solve)

Auto Trait Implementations§

§

impl Forget for Double

§

impl Freeze for Double

§

impl Move for Double

§

impl RefUnwindSafe for Double

§

impl Send for Double

§

impl Sync for Double

§

impl Unpin for Double

§

impl UnsafeUnpin for Double

§

impl UnwindSafe for Double

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<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.