Skip to main content

CBig

Struct CBig 

Source
pub struct CBig<R: Round = Zero, const B: Word = 2> { /* private fields */ }
Expand description

An arbitrary-precision complex number with arbitrary base and rounding mode.

The complex number consists of two Repr parts (the real part re and the imaginary part im) over a single shared Context. Each part keeps its own significand length; the shared context holds the precision cap and rounding mode applied independently to both components.

§Generic parameters

The const generic parameters are abbreviated as BASE -> B, RoundingMode -> R. The BASE must be in range [2, isize::MAX], and the rounding mode R is chosen from the dashu_float::round::mode module. With the defaults the number is base 2 rounded towards zero (matching FBig’s default).

§Rounding

Each component of a result is rounded independently with the single mode R, after the operation feeds each part enough guard precision. CBig follows the C99 Annex G / Kahan model and has no NaN; see the compliance guide for the full error policy.

§Examples

use dashu_cmplx::CBig;
use dashu_float::{FBig, round::mode::HalfAway};

// base-10 so each integer keeps its own significand
let z = CBig::<HalfAway, 10>::from_parts(FBig::from(3), FBig::from(4));
assert_eq!(z.re().significand(), &3.into());
assert_eq!(z.im().significand(), &4.into());

Implementations§

Source§

impl<R: Round, const B: Word> CBig<R, B>

Source

pub const ZERO: Self

The complex number zero 0 + 0i (unlimited precision).

Source

pub const ONE: Self

The complex number one 1 + 0i (unlimited precision).

Source

pub const NEG_ONE: Self

The complex number negative one -1 + 0i (unlimited precision).

Source

pub const I: Self

The imaginary unit 0 + 1i (unlimited precision).

Source

pub const fn new(re: Repr<B>, im: Repr<B>, context: Context<R>) -> Self

Create a CBig from raw parts (a const-capable constructor, the complex analog of dashu_float::FBig::from_repr_const). Used by the static_cbig! literal macro and internal code; in most cases prefer CBig::from_parts.

Source

pub fn from_parts(re: FBig<R, B>, im: FBig<R, B>) -> Self

Create a CBig from its real and imaginary parts.

The result context is max(re.context(), im.context()) (the larger precision wins; an unlimited 0 precision is treated as the minimum, so a limited operand’s precision wins), and the smaller-precision part is effectively widened to it — widening is exact, so only the precision cap changes. The rounding mode and base must match and are enforced by the type parameters.

§Examples
use dashu_cmplx::CBig;
use dashu_float::{FBig, round::mode::HalfAway};

type C = CBig<HalfAway, 10>;
type F = FBig<HalfAway, 10>;
let z = C::from_parts(F::from(3), F::from(4));
let (re, im) = z.into_parts();
assert_eq!(re, F::from(3));
assert_eq!(im, F::from(4));
Source

pub const fn context(&self) -> Context<R>

Get the shared Context of the complex number.

Source

pub const fn precision(&self) -> usize

Get the precision limit of the complex number (0 = unlimited). Both parts share it.

Source

pub const fn re(&self) -> &Repr<B>

Get a reference to the real part’s raw representation.

Source

pub const fn im(&self) -> &Repr<B>

Get a reference to the imaginary part’s raw representation.

Source

pub fn into_parts(self) -> (FBig<R, B>, FBig<R, B>)

Convert the complex number into its real and imaginary parts as FBigs, each carrying the (copied) shared context — zero clone of the significands.

Source

pub fn is_zero(&self) -> bool

Determine if the complex number is numerically zero (both parts ±0).

Source

pub fn is_infinite(&self) -> bool

Determine if either part of the complex number is infinite.

Source

pub fn is_finite(&self) -> bool

Determine if the complex number is finite (neither part infinite).

Source§

impl<R: Round, const B: Word> CBig<R, B>

Source

pub fn into_cached(self, cache: Rc<RefCell<ConstCache>>) -> CachedCBig<R, B>

Attach a shared cache handle, turning this CBig into a CachedCBig.

Source§

impl<R: Round, const B: Word> CBig<R, B>

Source

pub fn exp(&self) -> Self

Complex exponential e^z (convenience layer).

§Panics

Panics if the precision is unlimited or on an indeterminate special value.

Source

pub fn powi(&self, exp: IBig) -> Self

Integer power (convenience layer).

§Panics

Panics on an indeterminate / out-of-domain result (e.g. 0⁻¹).

Source

pub fn powf(&self, w: &Self) -> Self

Complex power self^w (convenience layer).

powf(z, 0) = 1 (including powf(0, 0) = 1), matching FBig::powf and the real 0⁰ = 1 convention.

Source§

impl<R: Round, const B: Word> CBig<R, B>

Source

pub fn ln(&self) -> Self

Complex natural logarithm (principal branch; convenience layer).

§Panics

Panics if the precision is unlimited.

Source§

impl<R: Round, const B: Word> CBig<R, B>

Source

pub fn sin(&self) -> Self

Complex sine (convenience layer). Panics on an indeterminate special value.

Source

pub fn cos(&self) -> Self

Complex cosine (convenience layer). Panics on an indeterminate special value.

Source

pub fn sin_cos(&self) -> (Self, Self)

Simultaneously compute (sin z, cos z) (convenience layer).

Source

pub fn tan(&self) -> Self

Complex tangent (convenience layer).

Source

pub fn asin(&self) -> Self

Inverse sine (convenience layer).

Source

pub fn acos(&self) -> Self

Inverse cosine (convenience layer).

Source

pub fn atan(&self) -> Self

Inverse tangent (convenience layer).

Source§

impl<R: Round, const B: Word> CBig<R, B>

Source

pub fn conj(&self) -> Self

The complex conjugate x - iy. Exact (sign flip of the imaginary part, including -0/-inf).

Source

pub fn proj(&self) -> Self

Project onto the Riemann sphere (proj): any part-infinite value maps to +∞ + i·0 (the imaginary zero carrying the sign of the original imaginary part); finite values are unchanged.

Source

pub fn mul_i(&self, negative: bool) -> Self

Multiply by ±i (exact rotation): ×i maps (re, im) -> (-im, re), ×(-i) maps (re, im) -> (im, -re).

Source

pub fn norm(&self) -> FBig<R, B>

The squared modulus re² + im² (a real FBig). Cheap and near-exact — it avoids the sqrt of CBig::abs. Matches num-complex’s norm_sqr.

Source

pub fn abs(&self) -> FBig<R, B>

The modulus |z| = sqrt(re² + im²) (a real FBig). A thin composition over dashu_float::Context::hypot (the overflow-safe scaled sum-of-squares), evaluated at guard precision and re-rounded. Near-correctly rounded.

§Panics

Panics if the precision is unlimited.

Source

pub fn arg(&self) -> FBig<R, B>

The argument (phase) atan2(im, re) ∈ ]-π, π]. The branch cut lies on ]−∞, 0]; signed zero and infinities are handled per the C99 Annex G atan2 table (reused from dashu-float).

Source§

impl<R: Round, const B: Word> CBig<R, B>

Source

pub fn sqr(&self) -> Self

Square the complex number (convenience layer).

Source§

impl<R: Round, const B: Word> CBig<R, B>

Source

pub fn sqrt(&self) -> Self

Principal square root (convenience layer).

§Panics

Panics if the precision is unlimited, or on an out-of-domain / indeterminate special value.

Trait Implementations§

Source§

impl<R: Round, const B: Word> AbsOrd for CBig<R, B>

Source§

fn abs_cmp(&self, other: &Self) -> Ordering

Magnitude comparison by |z|. Compared through |z|² (the exact squared modulus — both sides are non-negative, so the order is preserved) to avoid the sqrt/hypot of CBig::abs.

Source§

impl<R: Round, const B: Word> Add for CBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: CBig<R, B>) -> Self::Output

Performs the + operation. Read more
Source§

impl<'r, R: Round, const B: Word> Add<&'r CBig<R, B>> for CachedCBig<R, B>

Source§

type Output = CachedCBig<R, B>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &CBig<R, B>) -> Self::Output

Performs the + operation. Read more
Source§

impl<'l, 'r, R: Round, const B: Word> Add<&'r CBig<R, B>> for &'l CachedCBig<R, B>

Source§

type Output = CachedCBig<R, B>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &CBig<R, B>) -> Self::Output

Performs the + operation. Read more
Source§

impl<'r, R: Round, const B: Word> Add<&'r CachedCBig<R, B>> for CBig<R, B>

Source§

type Output = CachedCBig<R, B>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &CachedCBig<R, B>) -> Self::Output

Performs the + operation. Read more
Source§

impl<'l, 'r, R: Round, const B: Word> Add<&'r CachedCBig<R, B>> for &'l CBig<R, B>

Source§

type Output = CachedCBig<R, B>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &CachedCBig<R, B>) -> Self::Output

Performs the + operation. Read more
Source§

impl<R: Round, const B: Word> Add<&CBig<R, B>> for CBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &CBig<R, B>) -> Self::Output

Performs the + operation. Read more
Source§

impl<R: Round, const B: Word> Add<&CBig<R, B>> for &CBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &CBig<R, B>) -> Self::Output

Performs the + operation. Read more
Source§

impl<R: Round, const B: Word> Add<CBig<R, B>> for &CBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: CBig<R, B>) -> Self::Output

Performs the + operation. Read more
Source§

impl<R: Round, const B: Word> Add<CBig<R, B>> for CachedCBig<R, B>

Source§

type Output = CachedCBig<R, B>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: CBig<R, B>) -> Self::Output

Performs the + operation. Read more
Source§

impl<'l, R: Round, const B: Word> Add<CBig<R, B>> for &'l CachedCBig<R, B>

Source§

type Output = CachedCBig<R, B>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: CBig<R, B>) -> Self::Output

Performs the + operation. Read more
Source§

impl<R: Round, const B: Word> Add<CachedCBig<R, B>> for CBig<R, B>

Source§

type Output = CachedCBig<R, B>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: CachedCBig<R, B>) -> Self::Output

Performs the + operation. Read more
Source§

impl<'l, R: Round, const B: Word> Add<CachedCBig<R, B>> for &'l CBig<R, B>

Source§

type Output = CachedCBig<R, B>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: CachedCBig<R, B>) -> Self::Output

Performs the + operation. Read more
Source§

impl<R: Round, const B: Word> AddAssign for CBig<R, B>

Source§

fn add_assign(&mut self, rhs: CBig<R, B>)

Performs the += operation. Read more
Source§

impl<R: Round, const B: Word> AddAssign<&CBig<R, B>> for CBig<R, B>

Source§

fn add_assign(&mut self, rhs: &CBig<R, B>)

Performs the += operation. Read more
Source§

impl<R: Round, const B: Word> AddAssign<&CBig<R, B>> for CachedCBig<R, B>

Source§

fn add_assign(&mut self, rhs: &CBig<R, B>)

Performs the += operation. Read more
Source§

impl<R: Round, const B: Word> AddAssign<CBig<R, B>> for CachedCBig<R, B>

Source§

fn add_assign(&mut self, rhs: CBig<R, B>)

Performs the += operation. Read more
Source§

impl<R: Round, const B: Word> Clone for CBig<R, B>

Source§

fn clone(&self) -> Self

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<R: Round, const B: Word> Debug for CBig<R, B>

Source§

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

Structured form "re:<re> im:<im> (prec: <p>)" — e.g. "re:1.5 im:-2.0 (prec: 53)" — for quick inspection (mirrors FBig’s Debug style). The alternate # form exposes the raw significands and exponent scaling.

Source§

impl<R: Round, const B: Word> Default for CBig<R, B>

Source§

fn default() -> Self

Default value: 0 + 0i.

Source§

impl<R: Round, const B: Word> Display for CBig<R, B>

Source§

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

Format in algebraic a+bi form: "1+2i", "-3-4i", "5" (pure real), "-7i" (pure imaginary), "i" (0+1i), "-i" (0-1i). The imaginary term always carries an explicit sign, a unit coefficient is elided, and a zero imaginary is omitted. Each coefficient uses FBig’s native Display (specials render as inf / -inf).

Source§

impl<R: Round, const B: Word> Distribution<CBig<R, B>> for UniformCBig<R, B>

Source§

fn sample<RNG: Rng + ?Sized>(&self, rng: &mut RNG) -> CBig<R, B>

Generate a random value of T, using rng as the source of randomness.
Source§

fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>
where R: Rng, Self: Sized,

Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Source§

fn map<F, S>(self, func: F) -> DistMap<Self, F, T, S>
where F: Fn(T) -> S, Self: Sized,

Create a distribution of values of ‘S’ by mapping the output of Self through the closure F Read more
Source§

impl<R: Round, const B: Word> Distribution<CBig<R, B>> for Standard

Source§

fn sample<RNG: Rng + ?Sized>(&self, rng: &mut RNG) -> CBig<R, B>

Each part uniform in [0, 1) → the unit square [0, 1)², at inline precision.

Source§

fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>
where R: Rng, Self: Sized,

Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Source§

fn map<F, S>(self, func: F) -> DistMap<Self, F, T, S>
where F: Fn(T) -> S, Self: Sized,

Create a distribution of values of ‘S’ by mapping the output of Self through the closure F Read more
Source§

impl<R: Round, const B: Word> Distribution<CBig<R, B>> for Open01

Source§

fn sample<RNG: Rng + ?Sized>(&self, rng: &mut RNG) -> CBig<R, B>

Generate a random value of T, using rng as the source of randomness.
Source§

fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>
where R: Rng, Self: Sized,

Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Source§

fn map<F, S>(self, func: F) -> DistMap<Self, F, T, S>
where F: Fn(T) -> S, Self: Sized,

Create a distribution of values of ‘S’ by mapping the output of Self through the closure F Read more
Source§

impl<R: Round, const B: Word> Distribution<CBig<R, B>> for OpenClosed01

Source§

fn sample<RNG: Rng + ?Sized>(&self, rng: &mut RNG) -> CBig<R, B>

Generate a random value of T, using rng as the source of randomness.
Source§

fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>
where R: Rng, Self: Sized,

Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Source§

fn map<F, S>(self, func: F) -> DistMap<Self, F, T, S>
where F: Fn(T) -> S, Self: Sized,

Create a distribution of values of ‘S’ by mapping the output of Self through the closure F Read more
Source§

impl<R: Round, const B: Word> Distribution<CBig<R, B>> for UniformCBig<R, B>

Source§

fn sample<RNG: Rng + ?Sized>(&self, rng: &mut RNG) -> CBig<R, B>

Generate a random value of T, using rng as the source of randomness.
Source§

fn sample_iter<R>(self, rng: R) -> Iter<Self, R, T>
where R: Rng, Self: Sized,

Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Source§

fn map<F, S>(self, func: F) -> Map<Self, F, T, S>
where F: Fn(T) -> S, Self: Sized,

Map sampled values to type S Read more
Source§

impl<R: Round, const B: Word> Distribution<CBig<R, B>> for StandardUniform

Source§

fn sample<RNG: Rng + ?Sized>(&self, rng: &mut RNG) -> CBig<R, B>

Each part uniform in [0, 1) → the unit square [0, 1)², at inline precision.

Source§

fn sample_iter<R>(self, rng: R) -> Iter<Self, R, T>
where R: Rng, Self: Sized,

Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Source§

fn map<F, S>(self, func: F) -> Map<Self, F, T, S>
where F: Fn(T) -> S, Self: Sized,

Map sampled values to type S Read more
Source§

impl<R: Round, const B: Word> Distribution<CBig<R, B>> for Open01

Source§

fn sample<RNG: Rng + ?Sized>(&self, rng: &mut RNG) -> CBig<R, B>

Generate a random value of T, using rng as the source of randomness.
Source§

fn sample_iter<R>(self, rng: R) -> Iter<Self, R, T>
where R: Rng, Self: Sized,

Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Source§

fn map<F, S>(self, func: F) -> Map<Self, F, T, S>
where F: Fn(T) -> S, Self: Sized,

Map sampled values to type S Read more
Source§

impl<R: Round, const B: Word> Distribution<CBig<R, B>> for OpenClosed01

Source§

fn sample<RNG: Rng + ?Sized>(&self, rng: &mut RNG) -> CBig<R, B>

Generate a random value of T, using rng as the source of randomness.
Source§

fn sample_iter<R>(self, rng: R) -> Iter<Self, R, T>
where R: Rng, Self: Sized,

Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Source§

fn map<F, S>(self, func: F) -> Map<Self, F, T, S>
where F: Fn(T) -> S, Self: Sized,

Map sampled values to type S Read more
Source§

impl<R: Round, const B: Word> Distribution<CBig<R, B>> for UniformCBig<R, B>

Source§

fn sample<RNG: Rng + ?Sized>(&self, rng: &mut RNG) -> CBig<R, B>

Generate a random value of T, using rng as the source of randomness.
Source§

fn sample_iter<R>(self, rng: R) -> Iter<Self, R, T>
where R: Rng, Self: Sized,

Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Source§

fn map<F, S>(self, func: F) -> Map<Self, F, T, S>
where F: Fn(T) -> S, Self: Sized,

Map sampled values to type S Read more
Source§

impl<R: Round, const B: Word> Distribution<CBig<R, B>> for StandardUniform

Source§

fn sample<RNG: Rng + ?Sized>(&self, rng: &mut RNG) -> CBig<R, B>

Each part uniform in [0, 1) → the unit square [0, 1)², at inline precision.

Source§

fn sample_iter<R>(self, rng: R) -> Iter<Self, R, T>
where R: Rng, Self: Sized,

Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Source§

fn map<F, S>(self, func: F) -> Map<Self, F, T, S>
where F: Fn(T) -> S, Self: Sized,

Map sampled values to type S Read more
Source§

impl<R: Round, const B: Word> Distribution<CBig<R, B>> for Open01

Source§

fn sample<RNG: Rng + ?Sized>(&self, rng: &mut RNG) -> CBig<R, B>

Generate a random value of T, using rng as the source of randomness.
Source§

fn sample_iter<R>(self, rng: R) -> Iter<Self, R, T>
where R: Rng, Self: Sized,

Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Source§

fn map<F, S>(self, func: F) -> Map<Self, F, T, S>
where F: Fn(T) -> S, Self: Sized,

Map sampled values to type S Read more
Source§

impl<R: Round, const B: Word> Distribution<CBig<R, B>> for OpenClosed01

Source§

fn sample<RNG: Rng + ?Sized>(&self, rng: &mut RNG) -> CBig<R, B>

Generate a random value of T, using rng as the source of randomness.
Source§

fn sample_iter<R>(self, rng: R) -> Iter<Self, R, T>
where R: Rng, Self: Sized,

Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Source§

fn map<F, S>(self, func: F) -> Map<Self, F, T, S>
where F: Fn(T) -> S, Self: Sized,

Map sampled values to type S Read more
Source§

impl<R: Round, const B: Word> Div for CBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: CBig<R, B>) -> Self::Output

Performs the / operation. Read more
Source§

impl<'r, R: Round, const B: Word> Div<&'r CBig<R, B>> for CachedCBig<R, B>

Source§

type Output = CachedCBig<R, B>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &CBig<R, B>) -> Self::Output

Performs the / operation. Read more
Source§

impl<'l, 'r, R: Round, const B: Word> Div<&'r CBig<R, B>> for &'l CachedCBig<R, B>

Source§

type Output = CachedCBig<R, B>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &CBig<R, B>) -> Self::Output

Performs the / operation. Read more
Source§

impl<'r, R: Round, const B: Word> Div<&'r CachedCBig<R, B>> for CBig<R, B>

Source§

type Output = CachedCBig<R, B>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &CachedCBig<R, B>) -> Self::Output

Performs the / operation. Read more
Source§

impl<'l, 'r, R: Round, const B: Word> Div<&'r CachedCBig<R, B>> for &'l CBig<R, B>

Source§

type Output = CachedCBig<R, B>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &CachedCBig<R, B>) -> Self::Output

Performs the / operation. Read more
Source§

impl<R: Round, const B: Word> Div<&CBig<R, B>> for CBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &CBig<R, B>) -> Self::Output

Performs the / operation. Read more
Source§

impl<R: Round, const B: Word> Div<&CBig<R, B>> for &CBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &CBig<R, B>) -> Self::Output

Performs the / operation. Read more
Source§

impl<R: Round, const B: Word> Div<&CBig<R, B>> for &FBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &CBig<R, B>) -> CBig<R, B>

Performs the / operation. Read more
Source§

impl<R: Round, const B: Word> Div<&CBig<R, B>> for FBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &CBig<R, B>) -> CBig<R, B>

Performs the / operation. Read more
Source§

impl<R: Round, const B: Word> Div<&FBig<R, B>> for &CBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &FBig<R, B>) -> CBig<R, B>

Performs the / operation. Read more
Source§

impl<R: Round, const B: Word> Div<&FBig<R, B>> for CBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &FBig<R, B>) -> CBig<R, B>

Performs the / operation. Read more
Source§

impl<R: Round, const B: Word> Div<CBig<R, B>> for CachedCBig<R, B>

Source§

type Output = CachedCBig<R, B>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: CBig<R, B>) -> Self::Output

Performs the / operation. Read more
Source§

impl<'l, R: Round, const B: Word> Div<CBig<R, B>> for &'l CachedCBig<R, B>

Source§

type Output = CachedCBig<R, B>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: CBig<R, B>) -> Self::Output

Performs the / operation. Read more
Source§

impl<R: Round, const B: Word> Div<CBig<R, B>> for &CBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: CBig<R, B>) -> Self::Output

Performs the / operation. Read more
Source§

impl<R: Round, const B: Word> Div<CBig<R, B>> for &FBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: CBig<R, B>) -> CBig<R, B>

Performs the / operation. Read more
Source§

impl<R: Round, const B: Word> Div<CBig<R, B>> for FBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: CBig<R, B>) -> CBig<R, B>

Performs the / operation. Read more
Source§

impl<R: Round, const B: Word> Div<CachedCBig<R, B>> for CBig<R, B>

Source§

type Output = CachedCBig<R, B>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: CachedCBig<R, B>) -> Self::Output

Performs the / operation. Read more
Source§

impl<'l, R: Round, const B: Word> Div<CachedCBig<R, B>> for &'l CBig<R, B>

Source§

type Output = CachedCBig<R, B>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: CachedCBig<R, B>) -> Self::Output

Performs the / operation. Read more
Source§

impl<R: Round, const B: Word> Div<FBig<R, B>> for &CBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: FBig<R, B>) -> CBig<R, B>

Performs the / operation. Read more
Source§

impl<R: Round, const B: Word> Div<FBig<R, B>> for CBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: FBig<R, B>) -> CBig<R, B>

Performs the / operation. Read more
Source§

impl<R: Round, const B: Word> DivAssign for CBig<R, B>

Source§

fn div_assign(&mut self, rhs: CBig<R, B>)

Performs the /= operation. Read more
Source§

impl<R: Round, const B: Word> DivAssign<&CBig<R, B>> for CachedCBig<R, B>

Source§

fn div_assign(&mut self, rhs: &CBig<R, B>)

Performs the /= operation. Read more
Source§

impl<R: Round, const B: Word> DivAssign<&CBig<R, B>> for CBig<R, B>

Source§

fn div_assign(&mut self, rhs: &CBig<R, B>)

Performs the /= operation. Read more
Source§

impl<R: Round, const B: Word> DivAssign<CBig<R, B>> for CachedCBig<R, B>

Source§

fn div_assign(&mut self, rhs: CBig<R, B>)

Performs the /= operation. Read more
Source§

impl<R: Round, const B: Word> Eq for CBig<R, B>

Source§

impl<R: Round, const B: Word> From<CBig<R, B>> for CachedCBig<R, B>

Source§

fn from(cbig: CBig<R, B>) -> Self

Converts to this type from the input type.
Source§

impl<R: Round, const B: Word> From<CachedCBig<R, B>> for CBig<R, B>

Source§

fn from(cached: CachedCBig<R, B>) -> Self

Converts to this type from the input type.
Source§

impl<R: Round, const B: Word> From<FBig<R, B>> for CBig<R, B>

Source§

fn from(re: FBig<R, B>) -> Self

Embed a real FBig as a complex number with imaginary part +0.

Source§

impl<R: Round, const B: Word> From<IBig> for CBig<R, B>

Source§

fn from(v: IBig) -> Self

Embed a signed integer as a complex number (exact, unlimited precision) with imaginary +0.

Source§

impl<R: Round, const B: Word> From<UBig> for CBig<R, B>

Source§

fn from(v: UBig) -> Self

Embed an unsigned integer as a complex number (exact, unlimited precision) with imaginary +0.

Source§

impl<R: Round, const B: Word> From<i8> for CBig<R, B>

Source§

fn from(v: i8) -> Self

Converts to this type from the input type.
Source§

impl<R: Round, const B: Word> From<i16> for CBig<R, B>

Source§

fn from(v: i16) -> Self

Converts to this type from the input type.
Source§

impl<R: Round, const B: Word> From<i32> for CBig<R, B>

Source§

fn from(v: i32) -> Self

Converts to this type from the input type.
Source§

impl<R: Round, const B: Word> From<i64> for CBig<R, B>

Source§

fn from(v: i64) -> Self

Converts to this type from the input type.
Source§

impl<R: Round, const B: Word> From<i128> for CBig<R, B>

Source§

fn from(v: i128) -> Self

Converts to this type from the input type.
Source§

impl<R: Round, const B: Word> From<isize> for CBig<R, B>

Source§

fn from(v: isize) -> Self

Converts to this type from the input type.
Source§

impl<R: Round, const B: Word> From<u8> for CBig<R, B>

Source§

fn from(v: u8) -> Self

Converts to this type from the input type.
Source§

impl<R: Round, const B: Word> From<u16> for CBig<R, B>

Source§

fn from(v: u16) -> Self

Converts to this type from the input type.
Source§

impl<R: Round, const B: Word> From<u32> for CBig<R, B>

Source§

fn from(v: u32) -> Self

Converts to this type from the input type.
Source§

impl<R: Round, const B: Word> From<u64> for CBig<R, B>

Source§

fn from(v: u64) -> Self

Converts to this type from the input type.
Source§

impl<R: Round, const B: Word> From<u128> for CBig<R, B>

Source§

fn from(v: u128) -> Self

Converts to this type from the input type.
Source§

impl<R: Round, const B: Word> From<usize> for CBig<R, B>

Source§

fn from(v: usize) -> Self

Converts to this type from the input type.
Source§

impl<R: Round, const B: Word> FromStr for CBig<R, B>

Source§

type Err = ParseError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, ParseError>

Parses a string s to return a value of this type. Read more
Source§

impl<R: Round, const B: Word> Inverse for CBig<R, B>

Source§

type Output = CBig<R, B>

The type of the reciprocal.
Source§

fn inv(self) -> Self::Output

Compute the multiplicative inverse (reciprocal) of the number.
Source§

impl<R: Round, const B: Word> Inverse for &CBig<R, B>

Source§

type Output = CBig<R, B>

The type of the reciprocal.
Source§

fn inv(self) -> Self::Output

Compute the multiplicative inverse (reciprocal) of the number.
Source§

impl<R: Round, const B: Word> Mul for CBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: CBig<R, B>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'r, R: Round, const B: Word> Mul<&'r CBig<R, B>> for CachedCBig<R, B>

Source§

type Output = CachedCBig<R, B>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &CBig<R, B>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'l, 'r, R: Round, const B: Word> Mul<&'r CBig<R, B>> for &'l CachedCBig<R, B>

Source§

type Output = CachedCBig<R, B>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &CBig<R, B>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'r, R: Round, const B: Word> Mul<&'r CachedCBig<R, B>> for CBig<R, B>

Source§

type Output = CachedCBig<R, B>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &CachedCBig<R, B>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'l, 'r, R: Round, const B: Word> Mul<&'r CachedCBig<R, B>> for &'l CBig<R, B>

Source§

type Output = CachedCBig<R, B>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &CachedCBig<R, B>) -> Self::Output

Performs the * operation. Read more
Source§

impl<R: Round, const B: Word> Mul<&CBig<R, B>> for CBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &CBig<R, B>) -> Self::Output

Performs the * operation. Read more
Source§

impl<R: Round, const B: Word> Mul<&CBig<R, B>> for &CBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &CBig<R, B>) -> Self::Output

Performs the * operation. Read more
Source§

impl<R: Round, const B: Word> Mul<&CBig<R, B>> for &FBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &CBig<R, B>) -> CBig<R, B>

Performs the * operation. Read more
Source§

impl<R: Round, const B: Word> Mul<&CBig<R, B>> for FBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &CBig<R, B>) -> CBig<R, B>

Performs the * operation. Read more
Source§

impl<R: Round, const B: Word> Mul<&FBig<R, B>> for &CBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &FBig<R, B>) -> CBig<R, B>

Performs the * operation. Read more
Source§

impl<R: Round, const B: Word> Mul<&FBig<R, B>> for CBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &FBig<R, B>) -> CBig<R, B>

Performs the * operation. Read more
Source§

impl<R: Round, const B: Word> Mul<CBig<R, B>> for CachedCBig<R, B>

Source§

type Output = CachedCBig<R, B>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: CBig<R, B>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'l, R: Round, const B: Word> Mul<CBig<R, B>> for &'l CachedCBig<R, B>

Source§

type Output = CachedCBig<R, B>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: CBig<R, B>) -> Self::Output

Performs the * operation. Read more
Source§

impl<R: Round, const B: Word> Mul<CBig<R, B>> for &CBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: CBig<R, B>) -> Self::Output

Performs the * operation. Read more
Source§

impl<R: Round, const B: Word> Mul<CBig<R, B>> for &FBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: CBig<R, B>) -> CBig<R, B>

Performs the * operation. Read more
Source§

impl<R: Round, const B: Word> Mul<CBig<R, B>> for FBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: CBig<R, B>) -> CBig<R, B>

Performs the * operation. Read more
Source§

impl<R: Round, const B: Word> Mul<CachedCBig<R, B>> for CBig<R, B>

Source§

type Output = CachedCBig<R, B>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: CachedCBig<R, B>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'l, R: Round, const B: Word> Mul<CachedCBig<R, B>> for &'l CBig<R, B>

Source§

type Output = CachedCBig<R, B>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: CachedCBig<R, B>) -> Self::Output

Performs the * operation. Read more
Source§

impl<R: Round, const B: Word> Mul<FBig<R, B>> for &CBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: FBig<R, B>) -> CBig<R, B>

Performs the * operation. Read more
Source§

impl<R: Round, const B: Word> Mul<FBig<R, B>> for CBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: FBig<R, B>) -> CBig<R, B>

Performs the * operation. Read more
Source§

impl<R: Round, const B: Word> MulAssign for CBig<R, B>

Source§

fn mul_assign(&mut self, rhs: CBig<R, B>)

Performs the *= operation. Read more
Source§

impl<R: Round, const B: Word> MulAssign<&CBig<R, B>> for CachedCBig<R, B>

Source§

fn mul_assign(&mut self, rhs: &CBig<R, B>)

Performs the *= operation. Read more
Source§

impl<R: Round, const B: Word> MulAssign<&CBig<R, B>> for CBig<R, B>

Source§

fn mul_assign(&mut self, rhs: &CBig<R, B>)

Performs the *= operation. Read more
Source§

impl<R: Round, const B: Word> MulAssign<CBig<R, B>> for CachedCBig<R, B>

Source§

fn mul_assign(&mut self, rhs: CBig<R, B>)

Performs the *= operation. Read more
Source§

impl<R: Round, const B: Word> Neg for CBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<R: Round, const B: Word> Neg for &CBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<R: Round, const B: Word> NumHash for CBig<R, B>

Source§

fn num_hash<H: Hasher>(&self, state: &mut H)

Consistent Hash::hash on different numeric types. Read more
Source§

impl<R1: Round, R2: Round, const B: Word> NumOrd<CBig<R2, B>> for CBig<R1, B>

Source§

fn num_cmp(&self, other: &CBig<R2, B>) -> Ordering

Ord::cmp on different numeric types. It panics if either of the numeric values contains NaN.
Source§

fn num_partial_cmp(&self, other: &CBig<R2, B>) -> Option<Ordering>

PartialOrd::partial_cmp on different numeric types
Source§

fn num_eq(&self, other: &Other) -> bool

PartialEq::eq on different numeric types
Source§

fn num_ne(&self, other: &Other) -> bool

PartialEq::ne on different numeric types
Source§

fn num_lt(&self, other: &Other) -> bool

PartialOrd::lt on different numeric types
Source§

fn num_le(&self, other: &Other) -> bool

PartialOrd::le on different numeric types
Source§

fn num_gt(&self, other: &Other) -> bool

PartialOrd::gt on different numeric types
Source§

fn num_ge(&self, other: &Other) -> bool

PartialOrd::ge on different numeric types
Source§

impl<R: Round, const B: Word> Ord for CBig<R, B>

Source§

fn cmp(&self, other: &Self) -> Ordering

Lexicographic total order by (re, then im). Special values are placed consistently with FBig (-∞ < finite < +∞ per component).

1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<R1: Round, R2: Round, const B: Word> PartialEq<CBig<R2, B>> for CBig<R1, B>

Source§

fn eq(&self, other: &CBig<R2, B>) -> bool

Componentwise exact equality. +0 == -0 per component (matching FBig); the context is ignored.

1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<R1: Round, R2: Round, const B: Word> PartialOrd<CBig<R2, B>> for CBig<R1, B>

Source§

fn partial_cmp(&self, other: &CBig<R2, B>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<R: Round, const B: Word> Product for CBig<R, B>

Source§

fn product<I: Iterator<Item = Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by multiplying the items.
Source§

impl<'a, R: Round, const B: Word> Product<&'a CBig<R, B>> for CBig<R, B>

Source§

fn product<I: Iterator<Item = &'a Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by multiplying the items.
Source§

impl<R: Round, const B: Word> Sub for CBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: CBig<R, B>) -> Self::Output

Performs the - operation. Read more
Source§

impl<'r, R: Round, const B: Word> Sub<&'r CBig<R, B>> for CachedCBig<R, B>

Source§

type Output = CachedCBig<R, B>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &CBig<R, B>) -> Self::Output

Performs the - operation. Read more
Source§

impl<'l, 'r, R: Round, const B: Word> Sub<&'r CBig<R, B>> for &'l CachedCBig<R, B>

Source§

type Output = CachedCBig<R, B>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &CBig<R, B>) -> Self::Output

Performs the - operation. Read more
Source§

impl<'r, R: Round, const B: Word> Sub<&'r CachedCBig<R, B>> for CBig<R, B>

Source§

type Output = CachedCBig<R, B>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &CachedCBig<R, B>) -> Self::Output

Performs the - operation. Read more
Source§

impl<'l, 'r, R: Round, const B: Word> Sub<&'r CachedCBig<R, B>> for &'l CBig<R, B>

Source§

type Output = CachedCBig<R, B>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &CachedCBig<R, B>) -> Self::Output

Performs the - operation. Read more
Source§

impl<R: Round, const B: Word> Sub<&CBig<R, B>> for CBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &CBig<R, B>) -> Self::Output

Performs the - operation. Read more
Source§

impl<R: Round, const B: Word> Sub<&CBig<R, B>> for &CBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &CBig<R, B>) -> Self::Output

Performs the - operation. Read more
Source§

impl<R: Round, const B: Word> Sub<CBig<R, B>> for &CBig<R, B>

Source§

type Output = CBig<R, B>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: CBig<R, B>) -> Self::Output

Performs the - operation. Read more
Source§

impl<R: Round, const B: Word> Sub<CBig<R, B>> for CachedCBig<R, B>

Source§

type Output = CachedCBig<R, B>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: CBig<R, B>) -> Self::Output

Performs the - operation. Read more
Source§

impl<'l, R: Round, const B: Word> Sub<CBig<R, B>> for &'l CachedCBig<R, B>

Source§

type Output = CachedCBig<R, B>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: CBig<R, B>) -> Self::Output

Performs the - operation. Read more
Source§

impl<R: Round, const B: Word> Sub<CachedCBig<R, B>> for CBig<R, B>

Source§

type Output = CachedCBig<R, B>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: CachedCBig<R, B>) -> Self::Output

Performs the - operation. Read more
Source§

impl<'l, R: Round, const B: Word> Sub<CachedCBig<R, B>> for &'l CBig<R, B>

Source§

type Output = CachedCBig<R, B>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: CachedCBig<R, B>) -> Self::Output

Performs the - operation. Read more
Source§

impl<R: Round, const B: Word> SubAssign for CBig<R, B>

Source§

fn sub_assign(&mut self, rhs: CBig<R, B>)

Performs the -= operation. Read more
Source§

impl<R: Round, const B: Word> SubAssign<&CBig<R, B>> for CBig<R, B>

Source§

fn sub_assign(&mut self, rhs: &CBig<R, B>)

Performs the -= operation. Read more
Source§

impl<R: Round, const B: Word> SubAssign<&CBig<R, B>> for CachedCBig<R, B>

Source§

fn sub_assign(&mut self, rhs: &CBig<R, B>)

Performs the -= operation. Read more
Source§

impl<R: Round, const B: Word> SubAssign<CBig<R, B>> for CachedCBig<R, B>

Source§

fn sub_assign(&mut self, rhs: CBig<R, B>)

Performs the -= operation. Read more
Source§

impl<R: Round, const B: Word> Sum for CBig<R, B>

Source§

fn sum<I: Iterator<Item = Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl<'a, R: Round, const B: Word> Sum<&'a CBig<R, B>> for CBig<R, B>

Source§

fn sum<I: Iterator<Item = &'a Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl<R: Round, const B: Word> TryFrom<CBig<R, B>> for FBig<R, B>

Source§

fn try_from(z: CBig<R, B>) -> Result<Self, Self::Error>

Extract the real part, succeeding only when the imaginary part is zero (purely real; both ±0 count as zero). This is the guarded “is this complex actually real?” check — distinct from CBig::re / CBig::into_parts, which return the real part unconditionally.

Source§

type Error = ConversionError

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

impl<R: Round, const B: Word> TryFrom<CBig<R, B>> for IBig

Source§

fn try_from(z: CBig<R, B>) -> Result<Self, Self::Error>

Extract an integer, succeeding only when the number is purely real, finite, and integer-valued. Composes CBigFBigIBig; for a rounding-aware path use FBig::to_int on the real part (CBig::re).

Source§

type Error = ConversionError

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

impl<R: Round, const B: Word> TryFrom<CBig<R, B>> for UBig

Source§

fn try_from(z: CBig<R, B>) -> Result<Self, Self::Error>

Extract an unsigned integer, succeeding only when the number is purely real, finite, integer-valued, and non-negative. Composes CBigFBigUBig.

Source§

type Error = ConversionError

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

impl<R: Round, const B: Word> TryFrom<CBig<R, B>> for u8

Source§

type Error = ConversionError

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

fn try_from(z: CBig<R, B>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<R: Round, const B: Word> TryFrom<CBig<R, B>> for u16

Source§

type Error = ConversionError

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

fn try_from(z: CBig<R, B>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<R: Round, const B: Word> TryFrom<CBig<R, B>> for u32

Source§

type Error = ConversionError

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

fn try_from(z: CBig<R, B>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<R: Round, const B: Word> TryFrom<CBig<R, B>> for u64

Source§

type Error = ConversionError

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

fn try_from(z: CBig<R, B>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<R: Round, const B: Word> TryFrom<CBig<R, B>> for u128

Source§

type Error = ConversionError

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

fn try_from(z: CBig<R, B>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<R: Round, const B: Word> TryFrom<CBig<R, B>> for usize

Source§

type Error = ConversionError

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

fn try_from(z: CBig<R, B>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<R: Round, const B: Word> TryFrom<CBig<R, B>> for i8

Source§

type Error = ConversionError

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

fn try_from(z: CBig<R, B>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<R: Round, const B: Word> TryFrom<CBig<R, B>> for i16

Source§

type Error = ConversionError

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

fn try_from(z: CBig<R, B>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<R: Round, const B: Word> TryFrom<CBig<R, B>> for i32

Source§

type Error = ConversionError

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

fn try_from(z: CBig<R, B>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<R: Round, const B: Word> TryFrom<CBig<R, B>> for i64

Source§

type Error = ConversionError

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

fn try_from(z: CBig<R, B>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<R: Round, const B: Word> TryFrom<CBig<R, B>> for i128

Source§

type Error = ConversionError

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

fn try_from(z: CBig<R, B>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<R: Round, const B: Word> TryFrom<CBig<R, B>> for isize

Source§

type Error = ConversionError

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

fn try_from(z: CBig<R, B>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<R: Round> TryFrom<CBig<R>> for f32

Source§

type Error = ConversionError

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

fn try_from(z: CBig<R, 2>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<R: Round> TryFrom<CBig<R>> for f64

Source§

type Error = ConversionError

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

fn try_from(z: CBig<R, 2>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<R: Round> TryFrom<CBig<R>> for Complex32

Source§

fn try_from(z: CBig<R, 2>) -> Result<Self, Self::Error>

Round a base-2 CBig back to a primitive-float Complex, composing CBigFBigf32/f64 per part. Errors on overflow or inexactness, and also when a part is already infinite — mirroring FBig: TryFrom<FBig> for f64.

Source§

type Error = ConversionError

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

impl<R: Round> TryFrom<CBig<R>> for Complex64

Source§

fn try_from(z: CBig<R, 2>) -> Result<Self, Self::Error>

Round a base-2 CBig back to a primitive-float Complex, composing CBigFBigf32/f64 per part. Errors on overflow or inexactness, and also when a part is already infinite — mirroring FBig: TryFrom<FBig> for f64.

Source§

type Error = ConversionError

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

impl<R: Round> TryFrom<Complex<f32>> for CBig<R, 2>

Source§

fn try_from(c: Complex32) -> Result<Self, Self::Error>

Lift a primitive-float Complex to an exact base-2 CBig. A NaN part is unmappable (CBig has no NaN) and yields ConversionError::OutOfBounds; infinities and signed zeros are preserved, exactly as for FBig: TryFrom<f64>.

Source§

type Error = ConversionError

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

impl<R: Round> TryFrom<Complex<f64>> for CBig<R, 2>

Source§

fn try_from(c: Complex64) -> Result<Self, Self::Error>

Lift a primitive-float Complex to an exact base-2 CBig. A NaN part is unmappable (CBig has no NaN) and yields ConversionError::OutOfBounds; infinities and signed zeros are preserved, exactly as for FBig: TryFrom<f64>.

Source§

type Error = ConversionError

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

impl<R: Round> TryFrom<f32> for CBig<R, 2>

Source§

type Error = ConversionError

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

fn try_from(f: f32) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<R: Round> TryFrom<f64> for CBig<R, 2>

Source§

type Error = ConversionError

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

fn try_from(f: f64) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl<R, const B: u64> Freeze for CBig<R, B>

§

impl<R, const B: u64> RefUnwindSafe for CBig<R, B>
where R: RefUnwindSafe,

§

impl<R, const B: u64> Send for CBig<R, B>
where R: Send,

§

impl<R, const B: u64> Sync for CBig<R, B>
where R: Sync,

§

impl<R, const B: u64> Unpin for CBig<R, B>
where R: Unpin,

§

impl<R, const B: u64> UnsafeUnpin for CBig<R, B>

§

impl<R, const B: u64> UnwindSafe for CBig<R, B>
where R: UnwindSafe,

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> 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.