pub struct LogosComplexF(pub ComplexF);Expand description
A floating-point complex re + im·i (each part f64) — the AOT mirror of the interpreter’s
ComplexF (LAPACK Z). complex(3.0, 4.0) compiles to LogosComplexF::new(..); + − × ÷ and
sqrt are inexact f64 (the reason it exists over the exact LogosComplex). NOT ordered.
Display matches the interpreter (2+i, 4+6i) via fmt_f64.
Tuple Fields§
§0: ComplexFImplementations§
Source§impl LogosComplexF
impl LogosComplexF
pub fn add(&self, other: &LogosComplexF) -> LogosComplexF
pub fn sub(&self, other: &LogosComplexF) -> LogosComplexF
pub fn mul(&self, other: &LogosComplexF) -> LogosComplexF
Sourcepub fn div_exact(&self, other: &LogosComplexF) -> LogosComplexF
pub fn div_exact(&self, other: &LogosComplexF) -> LogosComplexF
Division; panics on a zero divisor, mirroring / 0.
Sourcepub fn sqrt(&self) -> LogosComplexF
pub fn sqrt(&self) -> LogosComplexF
The principal square root (via the real sqrt) — the operation the exact LogosComplex lacks.
pub fn conjugate(&self) -> LogosComplexF
pub fn abs(&self) -> f64
Trait Implementations§
Source§impl Clone for LogosComplexF
impl Clone for LogosComplexF
Source§fn clone(&self) -> LogosComplexF
fn clone(&self) -> LogosComplexF
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LogosComplexF
impl Debug for LogosComplexF
Source§impl Display for LogosComplexF
impl Display for LogosComplexF
Source§impl From<f64> for LogosComplexF
impl From<f64> for LogosComplexF
Source§impl PartialEq for LogosComplexF
impl PartialEq for LogosComplexF
impl Copy for LogosComplexF
impl StructuralPartialEq for LogosComplexF
Auto Trait Implementations§
impl Freeze for LogosComplexF
impl RefUnwindSafe for LogosComplexF
impl Send for LogosComplexF
impl Sync for LogosComplexF
impl Unpin for LogosComplexF
impl UnsafeUnpin for LogosComplexF
impl UnwindSafe for LogosComplexF
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