Skip to main content

ExactComplex

Struct ExactComplex 

Source
pub struct ExactComplex { /* private fields */ }
Expand description

Complex value re + i·im with software-limb real and imaginary parts.

Implementations§

Source§

impl ExactComplex

Source

pub fn new(re: ExactNum, im: ExactNum) -> ExactComplex

Constructs re + i·im.

Source

pub fn re(&self) -> &ExactNum

Real part.

Source

pub fn im(&self) -> &ExactNum

Imaginary part.

Source

pub fn zero(p: usize) -> ExactComplex

0 + 0i at precision p.

Source

pub fn one(p: usize) -> ExactComplex

1 + 0i at precision p.

Source

pub fn i(p: usize) -> ExactComplex

0 + 1i at precision p.

Source

pub fn inexact(&self) -> bool

True if either part is inexact.

Source

pub fn set_inexact(&mut self, inexact: bool)

Sets the inexact flag on both parts.

Source

pub fn set_precision(&mut self, p: usize, rm: RoundingMode) -> Result<(), Error>

Rounds both parts to precision p.

Source

pub fn from_real(re: ExactNum, p: usize) -> ExactComplex

Real x as x + 0i. Imaginary zero uses precision p.

Source

pub fn reciprocal(&self, p: usize, rm: RoundingMode) -> ExactComplex

1 / self.

Source

pub fn is_nan(&self) -> bool

True if either part is NaN.

Source

pub fn conj(&self) -> ExactComplex

Complex conjugate.

Source

pub fn abs(&self, p: usize, rm: RoundingMode) -> ExactNum

Modulus |z| = hypot(re, im) at precision p.

Source

pub fn arg(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNum

Argument atan2(im, re) at precision p.

Branch: same as real atan2; values lie in (−π, π]. The cut of ln / sqrt / pow is the non-positive real axis, approached from above as +π and from below as −π.

Source

pub fn add( &self, rhs: &ExactComplex, p: usize, rm: RoundingMode, ) -> ExactComplex

self + rhs at precision p.

Source

pub fn sub( &self, rhs: &ExactComplex, p: usize, rm: RoundingMode, ) -> ExactComplex

self - rhs at precision p.

Source

pub fn mul( &self, rhs: &ExactComplex, p: usize, rm: RoundingMode, ) -> ExactComplex

self * rhs at precision p.

Each of ac, bd, ad, bc is rounded at (p, rm), then ac−bd and ad+bc are rounded at (p, rm). That matches the MPFR componentwise gold. Callers that pass RoundingMode::None still keep full products (series paths).

Source

pub fn div( &self, rhs: &ExactComplex, p: usize, rm: RoundingMode, ) -> ExactComplex

self / rhs at precision p.

Source

pub fn exp(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactComplex

e^self using exp(re) (cos(im) + i sin(im)).

Source

pub fn ln(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactComplex

Principal logarithm ln|z| + i Arg(z).

Branch cut: (−∞, 0] on the real axis. ln(−1) is (argument +π).

Source

pub fn sin(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactComplex

sin(self) via sin(re)cosh(im) + i cos(re)sinh(im).

The complex value is not passed to rem_pi. Only the real (resp. imaginary) component uses real sin_cos / sinh_cosh.

Source

pub fn cos(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactComplex

cos(self) via cos(re)cosh(im) - i sin(re)sinh(im).

Source

pub fn tan(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactComplex

tan(self) = sin(self) / cos(self).

Source

pub fn sinh(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactComplex

sinh(self) via sinh(re)cos(im) + i cosh(re)sin(im).

Source

pub fn cosh(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactComplex

cosh(self) via cosh(re)cos(im) + i sinh(re)sin(im).

Source

pub fn tanh(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactComplex

tanh(self) = sinh(self) / cosh(self).

Source

pub fn sqrt(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactComplex

Principal square root: √r (cos(θ/2) + i sin(θ/2)).

Branch cut: (−∞, 0]. Real part of the result is ≥ 0. sqrt(−1) is +i.

Source

pub fn log2(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactComplex

log2(self) = ln(self) / ln 2 (principal branch).

Source

pub fn log10(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactComplex

log10(self) = ln(self) / ln 10 (principal branch).

Source

pub fn log( &self, base: &ExactComplex, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactComplex

log_base(self) = ln(self) / ln(base) (principal branch).

Source

pub fn log1p(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactComplex

ln(1 + self) (principal branch).

Source

pub fn exp2(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactComplex

exp2(self) = exp(self · ln 2).

Source

pub fn exp10(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactComplex

exp10(self) = exp(self · ln 10).

Source

pub fn expm1(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactComplex

exp(self) − 1.

Source

pub fn ldexp(&self, n: i32, p: usize, rm: RoundingMode) -> ExactComplex

Scale both parts by 2^n (ldexp on re and im).

Source

pub fn scalb(&self, n: i32, p: usize, rm: RoundingMode) -> ExactComplex

Same as ldexp.

Source

pub fn logb(&self, p: usize, rm: RoundingMode) -> ExactNum

logb(|z|) as a real (x + 0i).

Source

pub fn nth_root( &self, n: usize, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactComplex

Principal n-th root via exp(ln(z) / n). Inherits the ln branch cut.

Source

pub fn cbrt(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactComplex

Principal cube root. Same branch as nth_root with n = 3.

Source

pub fn hypot( &self, other: &ExactComplex, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactComplex

Principal sqrt(self² + other²) (analytic continuation of real hypot).

Source

pub fn fma( &self, b: &ExactComplex, c: &ExactComplex, p: usize, rm: RoundingMode, ) -> ExactComplex

self * b + c at extra working precision, then one round (not a fused complex hardware op).

Source

pub fn mul_add( &self, b: &ExactComplex, c: &ExactComplex, p: usize, rm: RoundingMode, ) -> ExactComplex

Alias of fma.

Source

pub fn pow( &self, rhs: &ExactComplex, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactComplex

self^rhs as exp(rhs * ln(self)) (principal branch).

Inherits the ln cut on self: non-positive real base uses Arg = ±π.

Source

pub fn asin(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactComplex

Principal asin: -i ln(i z + √(1 − z²)).

Source

pub fn acos(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactComplex

Principal acos: π/2 − asin(z).

Source

pub fn atan(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactComplex

Principal atan: (i/2) ln((i+z)/(i−z)).

Source

pub fn asinh(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactComplex

Principal asinh: ln(z + √(z² + 1)).

Source

pub fn acosh(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactComplex

Principal acosh: ln(z + √(z−1)√(z+1)).

Source

pub fn atanh(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactComplex

Principal atanh: (1/2) ln((1+z)/(1−z)).

Source§

impl ExactComplex

Source

pub fn ai(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactComplex

Airy (\mathrm{Ai}(z)). Entire. NaN in → NaN out.

§Precision
  • Algorithm: series for |z| < AIRY_SERIES_THRESHOLD (8); asymptotic otherwise.
  • Bound: Ziv on each part (MAX_PREC_RETRY).
  • MPFR oracle: no.
Source

pub fn bi(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactComplex

Airy (\mathrm{Bi}(z)). Entire. NaN in → NaN out.

§Precision
  • Algorithm: same AIRY_SERIES_THRESHOLD = 8 as Self::ai.
  • Bound: Ziv on each part (MAX_PREC_RETRY).
  • MPFR oracle: no.
Source§

impl ExactComplex

Source

pub fn bessel_j_nu( &self, nu: &ExactComplex, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactComplex

(J_\nu(z)). Entire for integer (\nu); cut on ((-\infty,0]) otherwise. (z=0) with non-integer (\nu) → NaN.

§Precision
  • Algorithm: series for |z| < BESSEL_SERIES_THRESHOLD (16); Hankel otherwise. Integer |n| ≤ BESSEL_INTEGER_MAX (64).
  • Bound: Ziv on each part (MAX_PREC_RETRY).
  • MPFR oracle: no.
Source

pub fn bessel_y( &self, nu: &ExactComplex, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactComplex

(Y_\nu(z)). Cut on ((-\infty,0]); (z=0) → NaN.

§Precision
  • Algorithm: from (J_ν); BESSEL_SERIES_THRESHOLD = 16.
  • Bound: Ziv on each part (MAX_PREC_RETRY).
  • MPFR oracle: no.
Source

pub fn bessel_i( &self, nu: &ExactComplex, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactComplex

(I_\nu(z)=i^{-\nu}J_\nu(iz)). Same cut rules as (J_\nu).

§Precision
  • Algorithm: via Self::bessel_j_nu; BESSEL_SERIES_THRESHOLD = 16.
  • Bound: Ziv on each part (MAX_PREC_RETRY).
  • MPFR oracle: no.
Source

pub fn bessel_k( &self, nu: &ExactComplex, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactComplex

(K_\nu(z)=(\pi/2),i^{\nu+1}H_\nu^{(1)}(iz)). Cut on ((-\infty,0]); (z=0) → NaN.

§Precision
  • Algorithm: Hankel of (iz); BESSEL_SERIES_THRESHOLD = 16.
  • Bound: Ziv on each part (MAX_PREC_RETRY).
  • MPFR oracle: no.
Source§

impl ExactComplex

Source

pub fn ei(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactComplex

Exponential integral (\mathrm{Ei}(z)). Cut on ((-\infty,0]); pole at (0) → NaN.

§Precision
  • Algorithm: power series for |z| < EI_SERIES_THRESHOLD (16); asymptotic otherwise.
  • Bound: Ziv on each part (MAX_PREC_RETRY).
  • MPFR oracle: no.
Source

pub fn si(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactComplex

Sine integral (\mathrm{Si}(z)=(E_i(iz)-E_i(-iz))/(2i)-\pi/2).

§Precision
  • Algorithm: via Self::ei; inherits EI_SERIES_THRESHOLD = 16.
  • Bound: Ziv on each part (MAX_PREC_RETRY).
  • MPFR oracle: no.
Source

pub fn ci(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactComplex

Cosine integral (\mathrm{Ci}(z)). Pole at (0) → NaN. Inherits the (\mathrm{Ei}) cut.

§Precision
  • Algorithm: via Self::ei; EI_SERIES_THRESHOLD = 16.
  • Bound: Ziv on each part (MAX_PREC_RETRY).
  • MPFR oracle: no.
Source

pub fn li(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactComplex

Logarithmic integral (\mathrm{li}(z)=\mathrm{Ei}(\ln z)). Cut on ((-\infty,1]); pole at (1) → NaN.

§Precision
  • Algorithm: Self::ei of ln z.
  • Bound: Ziv on each part (MAX_PREC_RETRY).
  • MPFR oracle: no.
Source

pub fn fresnel_s( &self, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactComplex

Fresnel sine integral (S(z)). Entire.

§Precision
  • Algorithm: via complex erf; Ziv on each part (MAX_PREC_RETRY).
  • MPFR oracle: no.
Source

pub fn fresnel_c( &self, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactComplex

Fresnel cosine integral (C(z)). Entire.

§Precision
  • Algorithm: via complex erf; Ziv on each part (MAX_PREC_RETRY).
  • MPFR oracle: no.
Source§

impl ExactComplex

Source

pub fn elliptic_k( &self, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactComplex

Complete elliptic (K(m)), (m=k^2). Cut on ([1,+\infty)). (m=1) is (+\infty).

§Precision
  • Algorithm: Carlson R_F in ℂ; CARLSON_DUPE_MAX = 128.
  • Bound: identities evaluated outside Ziv (nested Ziv would exhaust MAX_PREC_RETRY).
  • MPFR oracle: no.
Source

pub fn elliptic_e_complete( &self, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactComplex

Complete elliptic (E(m)). (E(1)=1). Cut of (K) inherited through (1-m).

§Precision
  • Algorithm: Carlson R_F / R_D; CARLSON_DUPE_MAX = 128.
  • Bound: same as Self::elliptic_k.
  • MPFR oracle: no.
Source

pub fn elliptic_f( &self, m: &ExactComplex, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactComplex

Incomplete (F(x|m)), (x=\sin\varphi), (m=k^2).

§Precision
  • Algorithm: Carlson R_F; CARLSON_DUPE_MAX = 128.
  • MPFR oracle: no.

Carlson (R_F(1-x^2,1-mx^2,1)). Cuts when (1-x^2) or (1-mx^2) lies on ((-\infty,0]) (principal square-root cut). (F(x,0)=\arcsin x).

Source

pub fn elliptic_e( &self, m: &ExactComplex, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactComplex

Incomplete (E(x|m)). Same (x,m) convention as Self::elliptic_f.

§Precision
  • Algorithm: Carlson R_F / R_D; CARLSON_DUPE_MAX = 128.
  • MPFR oracle: no. Cuts as for (F). (E(x,0)=\arcsin x); (E(x,1)=x).
Source

pub fn elliptic_pi_complete( &self, m: &ExactComplex, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactComplex

Complete (\Pi(n,m)). self is (n). (\Pi(0,m)=K(m)). Pole at (n=1).

§Precision
  • Algorithm: Carlson R_J; CARLSON_DUPE_MAX = 128.
  • MPFR oracle: no.
Source

pub fn elliptic_pi( &self, x: &ExactComplex, m: &ExactComplex, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactComplex

Incomplete (\Pi(n;x|m)). self is (n).

§Precision
  • Algorithm: Carlson R_J; CARLSON_DUPE_MAX = 128.
  • MPFR oracle: no.

Cuts when (1-x^2), (1-mx^2), or (1-nx^2) meets the Carlson cut ((-\infty,0]). (\Pi(0;x|m)=F(x|m)).

Source§

impl ExactComplex

Source

pub fn hypergeom_2f1( &self, b: &ExactComplex, c: &ExactComplex, z: &ExactComplex, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactComplex

Gaussian ({}_2F_1(a=\mathrm{self},b;c;z)) in (\mathbb{C}).

Series when (\lvert z\rvert<1); Pfaff when (\mathrm{Re}(z)<1/2); Euler / (1-z) and (1/z) linear transforms otherwise. Kummer at (z=1) when (\mathrm{Re}(c-a-b)>0). Cut on ([1,+\infty)) in (z) (principal value from above). Non-positive integer (c) (uncanceled) → NaN.

§Precision
  • Algorithm: series / Euler / Pfaff / Kummer. Caps HYPERGEOM_SERIES_MAX_TERMS = 10_000, HYPERGEOM_TRANSFORM_MAX = 8.
  • Bound: Ziv on each part (MAX_PREC_RETRY).
  • MPFR oracle: no.
Source§

impl ExactComplex

Source

pub fn erf(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactComplex

Error function (\mathrm{erf}(z)=1-\mathrm{erfc}(z)). Entire; NaN in → NaN out.

§Precision
  • Algorithm: Faddeeva w(z) series for |z| below FADDEEVA_SERIES_L1 = 8; continued fraction otherwise.
  • Bound: Ziv on each part (MAX_PREC_RETRY).
  • MPFR oracle: real axis vs mpfr_erf. GNU MPC has no mpc_erf. Off-axis: erf odd, erfc=1-erf.
Source

pub fn erfc(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactComplex

Complementary error function via Faddeeva: (\mathrm{erfc}(z)=e^{-z^2}w(iz)). Entire; NaN in → NaN out.

§Precision
  • Algorithm: same Faddeeva path as Self::erf.
  • Bound: Ziv on each part (MAX_PREC_RETRY).
  • MPFR oracle: real axis vs mpfr_erfc (via 1-erf identity). GNU MPC has no mpc_erfc.
Source

pub fn gamma(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactComplex

Gamma (\Gamma(z)). Poles at non-positive integers → NaN.

§Precision
  • Algorithm: Stirling (GAMMA_STIRLING_TERMS = 64) plus reflection; factorial for small integers (GAMMA_FACTORIAL_MAX = 64).
  • Bound: Ziv on each part (MAX_PREC_RETRY).
  • MPFR oracle: real axis vs mpfr_gamma. GNU MPC has no mpc_gamma. Integers: Γ(n)=(n-1)!.
Source

pub fn ln_gamma( &self, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactComplex

Principal (\ln\Gamma(z)). Cut on ((-\infty,0]); poles → NaN. Equals (\ln(\Gamma(z))) with the principal logarithm.

§Precision
  • Algorithm: Stirling (GAMMA_STIRLING_TERMS = 64) plus reflection.
  • Bound: Ziv on each part (MAX_PREC_RETRY).
  • MPFR oracle: no.
Source

pub fn digamma( &self, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactComplex

Digamma (\psi(z)=\Gamma’/\Gamma). Poles at non-positive integers → NaN.

§Precision
  • Algorithm: recurrence plus Bernoulli; reflection for (\operatorname{Re} z < 0).
  • Bound: Ziv on each part (MAX_PREC_RETRY).
  • MPFR oracle: no.

Trait Implementations§

Source§

impl Add for ExactComplex

Source§

type Output = ExactComplex

The resulting type after applying the + operator.
Source§

fn add(self, rhs: ExactComplex) -> ExactComplex

Performs the + operation. Read more
Source§

impl Add<&ExactComplex> for &ExactComplex

Source§

type Output = ExactComplex

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &ExactComplex) -> ExactComplex

Performs the + operation. Read more
Source§

impl Add<&ExactComplex> for ExactComplex

Source§

type Output = ExactComplex

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &ExactComplex) -> ExactComplex

Performs the + operation. Read more
Source§

impl Add<ExactComplex> for &ExactComplex

Source§

type Output = ExactComplex

The resulting type after applying the + operator.
Source§

fn add(self, rhs: ExactComplex) -> ExactComplex

Performs the + operation. Read more
Source§

impl Clone for ExactComplex

Source§

fn clone(&self) -> ExactComplex

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 Debug for ExactComplex

Source§

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

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

impl Div for ExactComplex

Source§

type Output = ExactComplex

The resulting type after applying the / operator.
Source§

fn div(self, rhs: ExactComplex) -> ExactComplex

Performs the / operation. Read more
Source§

impl Div<&ExactComplex> for &ExactComplex

Source§

type Output = ExactComplex

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &ExactComplex) -> ExactComplex

Performs the / operation. Read more
Source§

impl Div<&ExactComplex> for ExactComplex

Source§

type Output = ExactComplex

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &ExactComplex) -> ExactComplex

Performs the / operation. Read more
Source§

impl Div<ExactComplex> for &ExactComplex

Source§

type Output = ExactComplex

The resulting type after applying the / operator.
Source§

fn div(self, rhs: ExactComplex) -> ExactComplex

Performs the / operation. Read more
Source§

impl FromExt<&ExactComplex> for ExactComplex

Source§

fn from_ext( v: &ExactComplex, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactComplex

Converts v to ExactNum with precision p using rounding mode rm.
Source§

impl FromExt<ExactComplex> for ExactComplex

Source§

fn from_ext( v: ExactComplex, p: usize, rm: RoundingMode, _cc: &mut Consts, ) -> ExactComplex

Converts v to ExactNum with precision p using rounding mode rm.
Source§

impl<T> FromExt<T> for ExactComplex
where ExactNum: FromExt<T>,

Source§

fn from_ext(v: T, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactComplex

Converts v to ExactNum with precision p using rounding mode rm.
Source§

impl Mul for ExactComplex

Source§

type Output = ExactComplex

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: ExactComplex) -> ExactComplex

Performs the * operation. Read more
Source§

impl Mul<&ExactComplex> for &ExactComplex

Source§

type Output = ExactComplex

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &ExactComplex) -> ExactComplex

Performs the * operation. Read more
Source§

impl Mul<&ExactComplex> for ExactComplex

Source§

type Output = ExactComplex

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &ExactComplex) -> ExactComplex

Performs the * operation. Read more
Source§

impl Mul<ExactComplex> for &ExactComplex

Source§

type Output = ExactComplex

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: ExactComplex) -> ExactComplex

Performs the * operation. Read more
Source§

impl Sub for ExactComplex

Source§

type Output = ExactComplex

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: ExactComplex) -> ExactComplex

Performs the - operation. Read more
Source§

impl Sub<&ExactComplex> for &ExactComplex

Source§

type Output = ExactComplex

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &ExactComplex) -> ExactComplex

Performs the - operation. Read more
Source§

impl Sub<&ExactComplex> for ExactComplex

Source§

type Output = ExactComplex

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &ExactComplex) -> ExactComplex

Performs the - operation. Read more
Source§

impl Sub<ExactComplex> for &ExactComplex

Source§

type Output = ExactComplex

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: ExactComplex) -> ExactComplex

Performs the - operation. Read more

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<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> 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.