[−][src]Struct decimal::d128
A 128-bit decimal floating point type.
Methods
impl d128
[src]
impl d128
pub unsafe fn from_raw_bytes(bytes: [u8; 16]) -> d128
[src]
pub unsafe fn from_raw_bytes(bytes: [u8; 16]) -> d128
Creates a d128 from raw bytes. Endianess is host dependent.
pub fn to_raw_bytes(&self) -> [u8; 16]
[src]
pub fn to_raw_bytes(&self) -> [u8; 16]
Returns raw bytes for this d128. Endianess is host dependent.
pub fn get_status() -> Status
[src]
pub fn get_status() -> Status
Returns the thread local status.
pub fn set_status(status: Status)
[src]
pub fn set_status(status: Status)
Sets the thread local status.
pub fn from_hex(s: &str) -> d128
[src]
pub fn from_hex(s: &str) -> d128
Reads the hex binary representation from a string. This is the reverse of formatting with {:x}.
pub fn zero() -> d128
[src]
pub fn zero() -> d128
Returns the d128 representing +0.
pub fn infinity() -> d128
[src]
pub fn infinity() -> d128
Returns the d128 representing +Infinity.
pub fn neg_infinity() -> d128
[src]
pub fn neg_infinity() -> d128
Returns the d128 representing -Infinity.
pub fn abs(self) -> d128
[src]
pub fn abs(self) -> d128
Returns the absolute value of self
.
pub fn mul_add<O: AsRef<d128>>(self, a: O, b: O) -> d128
[src]
pub fn mul_add<O: AsRef<d128>>(self, a: O, b: O) -> d128
Calculates the fused multiply-add self
× a
+ b
and returns the result. The multiply
is carried out first and is exact, so this operation has only the one, final, rounding.
pub fn logb(self) -> d128
[src]
pub fn logb(self) -> d128
Returns the adjusted exponent of self
, according to IEEE 754 rules. That is, the exponent
returned is calculated as if the decimal point followed the first significant digit (so,
for example, if self
were 123 then the result would be 2). If self
is infinite, the
result is +Infinity. If self
is a zero, the result is –Infinity, and the
DIVISION_BY_ZERO
flag is set. If self
is less than zero, the absolute value of self
is used. If self
is 1, the result is 0. NaNs are handled (propagated) as for arithmetic
operations.
pub fn max<O: AsRef<d128>>(self, other: O) -> d128
[src]
pub fn max<O: AsRef<d128>>(self, other: O) -> d128
If both self
and other
are numeric (not NaNs) this returns the larger of the two
(compared using total ordering, to give a well-defined result). If either (but not both of)
is a quiet NaN then the other argument is the result; otherwise NaNs are handled as for
arithmetic operations.
pub fn min<O: AsRef<d128>>(self, other: O) -> d128
[src]
pub fn min<O: AsRef<d128>>(self, other: O) -> d128
If both self
and other
are numeric (not NaNs) this returns the smaller of the two
(compared using total ordering, to give a well-defined result). If either (but not both of)
is a quiet NaN then the other argument is the result; otherwise NaNs are handled as for
arithmetic operations.
pub fn next(self) -> d128
[src]
pub fn next(self) -> d128
Returns the ‘next’ d128 to self
in the direction of +Infinity according to IEEE 754 rules
for nextUp. The only status possible is INVALID_OPERATION
(from an sNaN).
pub fn previous(self) -> d128
[src]
pub fn previous(self) -> d128
Returns the ‘next’ d128 to self
in the direction of –Infinity according to IEEE 754 rules
for nextDown. The only status possible is INVALID_OPERATION
(from an sNaN).
pub fn pow<O: AsRef<d128>>(self, exp: O) -> d128
[src]
pub fn pow<O: AsRef<d128>>(self, exp: O) -> d128
The number is set to the result of raising self
to the power of exp
. Results will be
exact when exp
has an integral value and the result does not need to be rounded, and also
will be exact in certain special cases, such as when self
is a zero (see the arithmetic
specification for details). Inexact results will always be full precision, and will almost
always be correctly rounded, but may be up to 1 ulp (unit in last place) in error in rare
cases. This is a mathematical function; the 106 restrictions on precision and
range apply as described above, except that the normal range of values is allowed if exp
has an integral value in the range –1999999997 through +999999999.
pub fn exp<O: AsRef<d128>>(self, exp: O) -> d128
[src]
pub fn exp<O: AsRef<d128>>(self, exp: O) -> d128
The number is set to e raised to the power of exp
. Finite results will always be full
precision and inexact, except when exp
is a zero or –Infinity (giving 1 or 0
respectively). Inexact results will almost always be correctly rounded, but may be up to 1
ulp (unit in last place) in error in rare cases. This is a mathematical function; the
106 restrictions on precision and range apply as described above.
pub fn ln(self) -> d128
[src]
pub fn ln(self) -> d128
The number is set to the natural logarithm (logarithm in base e) of self
. self
must be
positive or a zero. Finite results will always be full precision and inexact, except when
self
is equal to 1, which gives an exact result of 0. Inexact results will almost always
be correctly rounded, but may be up to 1 ulp (unit in last place) in error in rare cases.
This is a mathematical function; the 106 restrictions on precision and range
apply as described above.
pub fn log10(self) -> d128
[src]
pub fn log10(self) -> d128
The number is set to the logarithm in base ten of self
. self
must be positive or a
zero. Finite results will always be full precision and inexact, except when self
is equal
to an integral power of ten, in which case the result is the exact integer. Inexact results
will almost always be correctly rounded, but may be up to 1 ulp (unit in last place) in
error in rare cases. This is a mathematical function; the 106 restrictions on
precision and range apply as described above.
pub fn towards<O: AsRef<d128>>(self, other: O) -> d128
[src]
pub fn towards<O: AsRef<d128>>(self, other: O) -> d128
Returns the ‘next’ d128 to self
in the direction of other
according to proposed IEEE
754 rules for nextAfter. If self
== other
the result is self
. If either operand is
a NaN the result is as for arithmetic operations. Otherwise (the operands are numeric and
different) the result of adding (or subtracting) an infinitesimal positive amount to self
and rounding towards +Infinity (or –Infinity) is returned, depending on whether other
is
larger (or smaller) than self
. The addition will set flags, except that if the result is
normal (finite, non-zero, and not subnormal) no flags are set.
pub fn quantize<O: AsRef<d128>>(self, other: O) -> d128
[src]
pub fn quantize<O: AsRef<d128>>(self, other: O) -> d128
Returns self
set to have the same quantum as other
, if possible (that is, numerically
the same value but rounded or padded if necessary to have the same exponent as other
, for
example to round a monetary quantity to cents).
pub fn reduce(self) -> d128
[src]
pub fn reduce(self) -> d128
Returns a copy of self
with its coefficient reduced to its shortest possible form without
changing the value of the result. This removes all possible trailing zeros from the
coefficient (some may remain when the number is very close to the most positive or most
negative number). Infinities and NaNs are unchanged and no status is set unless self
is
an sNaN. If self
is a zero the result exponent is 0.
pub fn rotate<O: AsRef<d128>>(self, amount: O) -> d128
[src]
pub fn rotate<O: AsRef<d128>>(self, amount: O) -> d128
The result is a copy of self
with the digits of the coefficient rotated to the left (if
amount
is positive) or to the right (if amount
is negative) without adjusting the
exponent or the sign of self
. amount
is the count of positions to rotate and must be a
finite integer (with exponent=0) in the range -34 through +34. NaNs are propagated as
usual. If self
is infinite the result is Infinity of the same sign. No status is set
unless amount
is invalid or an operand is an sNaN.
pub fn scaleb<O: AsRef<d128>>(self, other: O) -> d128
[src]
pub fn scaleb<O: AsRef<d128>>(self, other: O) -> d128
This calculates self
× 10other
and returns the result. other
must be an
integer (finite with exponent=0) in the range ±2 × (34 + 6144), typically resulting from
logb
. Underflow and overflow might occur. NaNs propagate as usual.
pub fn compare<O: AsRef<d128>>(&self, other: O) -> d128
[src]
pub fn compare<O: AsRef<d128>>(&self, other: O) -> d128
Compares self
and other
numerically and returns the result. The result may be –1, 0, 1,
or NaN (unordered); –1 indicates that self
is less than other
, 0 indicates that they
are numerically equal, and 1 indicates that self
is greater than other
. NaN is returned
only if self
or other
is a NaN.
pub fn compare_total<O: AsRef<d128>>(&self, other: O) -> d128
[src]
pub fn compare_total<O: AsRef<d128>>(&self, other: O) -> d128
Compares self
and other
using the IEEE 754 total ordering (which takes into account the
exponent) and returns the result. No status is set (a signaling NaN is ordered between
Infinity and NaN). The result will be –1, 0, or 1.
pub fn canonical(self) -> d128
[src]
pub fn canonical(self) -> d128
Returns self
ensuring that the encoding is canonical.
pub fn class(&self) -> Class
[src]
pub fn class(&self) -> Class
Returns the class of self
.
pub fn classify(&self) -> FpCategory
[src]
pub fn classify(&self) -> FpCategory
Same as class()
but returns std::num::FpCategory
.
pub fn digits(&self) -> u32
[src]
pub fn digits(&self) -> u32
Returns the number of significant digits in self
. If self
is a zero or is infinite, 1
is returned. If self
is a NaN then the number of digits in the payload is returned.
pub fn is_canonical(&self) -> bool
[src]
pub fn is_canonical(&self) -> bool
Returns true
if the encoding of self
is canonical, or false
otherwise.
pub fn is_finite(&self) -> bool
[src]
pub fn is_finite(&self) -> bool
Returns true
if self
is neither infinite nor a NaN, or false
otherwise.
pub fn is_integer(&self) -> bool
[src]
pub fn is_integer(&self) -> bool
Returns true
if self
is finite and its exponent is zero, or false
otherwise.
pub fn is_logical(&self) -> bool
[src]
pub fn is_logical(&self) -> bool
Returns true
if self
is a valid argument for logical operations (that is, self
is
zero or positive, an integer (finite with a zero exponent) and comprises only zeros and/or
ones), or false
otherwise.
pub fn is_infinite(&self) -> bool
[src]
pub fn is_infinite(&self) -> bool
Returns true
if the encoding of self
is an infinity, or false
otherwise.
pub fn is_nan(&self) -> bool
[src]
pub fn is_nan(&self) -> bool
Returns true
if self
is a NaN (quiet or signaling), or false
otherwise.
pub fn is_negative(&self) -> bool
[src]
pub fn is_negative(&self) -> bool
Returns true
if self
is less than zero and not a NaN, or false
otherwise.
pub fn is_normal(&self) -> bool
[src]
pub fn is_normal(&self) -> bool
Returns true
if self
is a normal number (that is, is finite, non-zero, and not
subnormal), or false
otherwise.
pub fn is_positive(&self) -> bool
[src]
pub fn is_positive(&self) -> bool
Returns true
if self
is greater than zero and not a NaN, or false
otherwise.
pub fn is_signaling(&self) -> bool
[src]
pub fn is_signaling(&self) -> bool
Returns true
if self
is a signaling NaN, or false
otherwise.
pub fn is_signed(&self) -> bool
[src]
pub fn is_signed(&self) -> bool
Returns true
if self
has a minus sign, or false
otherwise. Note that zeros and NaNs
may have a minus sign.
pub fn is_subnormal(&self) -> bool
[src]
pub fn is_subnormal(&self) -> bool
Returns true
if self
is subnormal (that is, finite, non-zero, and with magnitude less
than 10-6143), or false
otherwise.
pub fn is_zero(&self) -> bool
[src]
pub fn is_zero(&self) -> bool
Returns true
if self
is zero, or false
otherwise.
Trait Implementations
impl Clone for d128
[src]
impl Clone for d128
fn clone(&self) -> d128
[src]
fn clone(&self) -> d128
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Copy for d128
[src]
impl Copy for d128
impl From<i32> for d128
[src]
impl From<i32> for d128
Converts an i32 to d128. The result is exact and no error is possible.
impl From<u32> for d128
[src]
impl From<u32> for d128
Converts an u32 to d128. The result is exact and no error is possible.
impl From<u64> for d128
[src]
impl From<u64> for d128
Converts an u64 to d128. The result is exact and no error is possible.
impl From<i64> for d128
[src]
impl From<i64> for d128
Converts an i64 to d128. The result is exact and no error is possible.
impl Into<OrdVar<d128>> for d128
[src]
impl Into<OrdVar<d128>> for d128
impl Into<i32> for d128
[src]
impl Into<i32> for d128
Converts this d128 to an i32. It uses Rounding::HalfEven.
impl Into<u32> for d128
[src]
impl Into<u32> for d128
Converts this d128 to an u32. It uses Rounding::HalfEven.
impl AsRef<d128> for d128
[src]
impl AsRef<d128> for d128
impl PartialOrd<d128> for d128
[src]
impl PartialOrd<d128> for d128
fn partial_cmp(&self, other: &d128) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &d128) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Default for d128
[src]
impl Default for d128
impl PartialEq<d128> for d128
[src]
impl PartialEq<d128> for d128
fn eq(&self, other: &d128) -> bool
[src]
fn eq(&self, other: &d128) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl Hash for d128
[src]
impl Hash for d128
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash<H: Hasher>(&self, state: &mut H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Display for d128
[src]
impl Display for d128
Formats a d128. Finite numbers will be converted to a string with exponential notation if the exponent is positive or if the magnitude of x is less than 1 and would require more than five zeros between the decimal point and the first significant digit. Note that strings which are not simply numbers (one of Infinity, –Infinity, NaN, or sNaN) are possible. A NaN string may have a leading – sign and/or following payload digits. No digits follow the NaN string if the payload is 0.
fn fmt(&self, fmt: &mut Formatter) -> Result
[src]
fn fmt(&self, fmt: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Debug for d128
[src]
impl Debug for d128
Same as fmt::Display
.
fn fmt(&self, fmt: &mut Formatter) -> Result
[src]
fn fmt(&self, fmt: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl LowerExp for d128
[src]
impl LowerExp for d128
Formats a d128 with engineering notation. This is the same as fmt::Display except that if exponential notation is used the exponent will be a multiple of 3.
impl FromStr for d128
[src]
impl FromStr for d128
Converts a string to d128. The length of the coefficient and the size of the exponent are
checked by this routine, so rounding will be applied if necessary, and this may set status
flags (UNDERFLOW
, OVERFLOW
) will be reported, or rounding applied, as necessary. There is
no limit to the coefficient length for finite inputs; NaN payloads must be integers with no
more than 33 digits. Exponents may have up to nine significant digits. The syntax of the string
is fully checked; if it is not valid, the result will be a quiet NaN and an error flag will be
set.
type Err = ()
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, ()>
[src]
fn from_str(s: &str) -> Result<Self, ()>
Parses a string s
to return a value of this type. Read more
impl Add<d128> for d128
[src]
impl Add<d128> for d128
type Output = d128
The resulting type after applying the +
operator.
fn add(self, other: d128) -> d128
[src]
fn add(self, other: d128) -> d128
Performs the +
operation.
impl<'a> Add<d128> for &'a d128
[src]
impl<'a> Add<d128> for &'a d128
type Output = d128
The resulting type after applying the +
operator.
fn add(self, other: d128) -> d128
[src]
fn add(self, other: d128) -> d128
Performs the +
operation.
impl<'a> Add<&'a d128> for d128
[src]
impl<'a> Add<&'a d128> for d128
type Output = d128
The resulting type after applying the +
operator.
fn add(self, other: &'a d128) -> d128
[src]
fn add(self, other: &'a d128) -> d128
Performs the +
operation.
impl<'a, 'b> Add<&'a d128> for &'b d128
[src]
impl<'a, 'b> Add<&'a d128> for &'b d128
type Output = d128
The resulting type after applying the +
operator.
fn add(self, other: &'a d128) -> d128
[src]
fn add(self, other: &'a d128) -> d128
Performs the +
operation.
impl Sub<d128> for d128
[src]
impl Sub<d128> for d128
type Output = d128
The resulting type after applying the -
operator.
fn sub(self, other: d128) -> d128
[src]
fn sub(self, other: d128) -> d128
Performs the -
operation.
impl<'a> Sub<d128> for &'a d128
[src]
impl<'a> Sub<d128> for &'a d128
type Output = d128
The resulting type after applying the -
operator.
fn sub(self, other: d128) -> d128
[src]
fn sub(self, other: d128) -> d128
Performs the -
operation.
impl<'a> Sub<&'a d128> for d128
[src]
impl<'a> Sub<&'a d128> for d128
type Output = d128
The resulting type after applying the -
operator.
fn sub(self, other: &'a d128) -> d128
[src]
fn sub(self, other: &'a d128) -> d128
Performs the -
operation.
impl<'a, 'b> Sub<&'a d128> for &'b d128
[src]
impl<'a, 'b> Sub<&'a d128> for &'b d128
type Output = d128
The resulting type after applying the -
operator.
fn sub(self, other: &'a d128) -> d128
[src]
fn sub(self, other: &'a d128) -> d128
Performs the -
operation.
impl Mul<d128> for d128
[src]
impl Mul<d128> for d128
type Output = d128
The resulting type after applying the *
operator.
fn mul(self, other: d128) -> d128
[src]
fn mul(self, other: d128) -> d128
Performs the *
operation.
impl<'a> Mul<d128> for &'a d128
[src]
impl<'a> Mul<d128> for &'a d128
type Output = d128
The resulting type after applying the *
operator.
fn mul(self, other: d128) -> d128
[src]
fn mul(self, other: d128) -> d128
Performs the *
operation.
impl<'a> Mul<&'a d128> for d128
[src]
impl<'a> Mul<&'a d128> for d128
type Output = d128
The resulting type after applying the *
operator.
fn mul(self, other: &'a d128) -> d128
[src]
fn mul(self, other: &'a d128) -> d128
Performs the *
operation.
impl<'a, 'b> Mul<&'a d128> for &'b d128
[src]
impl<'a, 'b> Mul<&'a d128> for &'b d128
type Output = d128
The resulting type after applying the *
operator.
fn mul(self, other: &'a d128) -> d128
[src]
fn mul(self, other: &'a d128) -> d128
Performs the *
operation.
impl Div<d128> for d128
[src]
impl Div<d128> for d128
type Output = d128
The resulting type after applying the /
operator.
fn div(self, other: d128) -> d128
[src]
fn div(self, other: d128) -> d128
Performs the /
operation.
impl<'a> Div<d128> for &'a d128
[src]
impl<'a> Div<d128> for &'a d128
type Output = d128
The resulting type after applying the /
operator.
fn div(self, other: d128) -> d128
[src]
fn div(self, other: d128) -> d128
Performs the /
operation.
impl<'a> Div<&'a d128> for d128
[src]
impl<'a> Div<&'a d128> for d128
type Output = d128
The resulting type after applying the /
operator.
fn div(self, other: &'a d128) -> d128
[src]
fn div(self, other: &'a d128) -> d128
Performs the /
operation.
impl<'a, 'b> Div<&'a d128> for &'b d128
[src]
impl<'a, 'b> Div<&'a d128> for &'b d128
type Output = d128
The resulting type after applying the /
operator.
fn div(self, other: &'a d128) -> d128
[src]
fn div(self, other: &'a d128) -> d128
Performs the /
operation.
impl Rem<d128> for d128
[src]
impl Rem<d128> for d128
type Output = d128
The resulting type after applying the %
operator.
fn rem(self, other: d128) -> d128
[src]
fn rem(self, other: d128) -> d128
Performs the %
operation.
impl<'a> Rem<d128> for &'a d128
[src]
impl<'a> Rem<d128> for &'a d128
type Output = d128
The resulting type after applying the %
operator.
fn rem(self, other: d128) -> d128
[src]
fn rem(self, other: d128) -> d128
Performs the %
operation.
impl<'a> Rem<&'a d128> for d128
[src]
impl<'a> Rem<&'a d128> for d128
type Output = d128
The resulting type after applying the %
operator.
fn rem(self, other: &'a d128) -> d128
[src]
fn rem(self, other: &'a d128) -> d128
Performs the %
operation.
impl<'a, 'b> Rem<&'a d128> for &'b d128
[src]
impl<'a, 'b> Rem<&'a d128> for &'b d128
type Output = d128
The resulting type after applying the %
operator.
fn rem(self, other: &'a d128) -> d128
[src]
fn rem(self, other: &'a d128) -> d128
Performs the %
operation.
impl Neg for d128
[src]
impl Neg for d128
type Output = d128
The resulting type after applying the -
operator.
fn neg(self) -> d128
[src]
fn neg(self) -> d128
Performs the unary -
operation.
impl<'a> Neg for &'a d128
[src]
impl<'a> Neg for &'a d128
type Output = d128
The resulting type after applying the -
operator.
fn neg(self) -> d128
[src]
fn neg(self) -> d128
Performs the unary -
operation.
impl AddAssign<d128> for d128
[src]
impl AddAssign<d128> for d128
fn add_assign(&mut self, other: d128)
[src]
fn add_assign(&mut self, other: d128)
Performs the +=
operation.
impl SubAssign<d128> for d128
[src]
impl SubAssign<d128> for d128
fn sub_assign(&mut self, other: d128)
[src]
fn sub_assign(&mut self, other: d128)
Performs the -=
operation.
impl MulAssign<d128> for d128
[src]
impl MulAssign<d128> for d128
fn mul_assign(&mut self, other: d128)
[src]
fn mul_assign(&mut self, other: d128)
Performs the *=
operation.
impl DivAssign<d128> for d128
[src]
impl DivAssign<d128> for d128
fn div_assign(&mut self, other: d128)
[src]
fn div_assign(&mut self, other: d128)
Performs the /=
operation.
impl RemAssign<d128> for d128
[src]
impl RemAssign<d128> for d128
fn rem_assign(&mut self, other: d128)
[src]
fn rem_assign(&mut self, other: d128)
Performs the %=
operation.
impl Not for d128
[src]
impl Not for d128
The operand must be zero or positive, an integer (finite with zero exponent) and comprise only zeros and/or ones; if not, INVALID_OPERATION is set.
type Output = d128
The resulting type after applying the !
operator.
fn not(self) -> d128
[src]
fn not(self) -> d128
Performs the unary !
operation.
impl<'a> Not for &'a d128
[src]
impl<'a> Not for &'a d128
type Output = d128
The resulting type after applying the !
operator.
fn not(self) -> d128
[src]
fn not(self) -> d128
Performs the unary !
operation.
impl BitAnd<d128> for d128
[src]
impl BitAnd<d128> for d128
The operands must be zero or positive, an integer (finite with zero exponent) and comprise only zeros and/or ones; if not, INVALID_OPERATION is set.
type Output = d128
The resulting type after applying the &
operator.
fn bitand(self, other: d128) -> d128
[src]
fn bitand(self, other: d128) -> d128
Performs the &
operation.
impl<'a> BitAnd<d128> for &'a d128
[src]
impl<'a> BitAnd<d128> for &'a d128
type Output = d128
The resulting type after applying the &
operator.
fn bitand(self, other: d128) -> d128
[src]
fn bitand(self, other: d128) -> d128
Performs the &
operation.
impl<'a> BitAnd<&'a d128> for d128
[src]
impl<'a> BitAnd<&'a d128> for d128
type Output = d128
The resulting type after applying the &
operator.
fn bitand(self, other: &'a d128) -> d128
[src]
fn bitand(self, other: &'a d128) -> d128
Performs the &
operation.
impl<'a, 'b> BitAnd<&'a d128> for &'b d128
[src]
impl<'a, 'b> BitAnd<&'a d128> for &'b d128
type Output = d128
The resulting type after applying the &
operator.
fn bitand(self, other: &'a d128) -> d128
[src]
fn bitand(self, other: &'a d128) -> d128
Performs the &
operation.
impl BitOr<d128> for d128
[src]
impl BitOr<d128> for d128
The operands must be zero or positive, an integer (finite with zero exponent) and comprise only zeros and/or ones; if not, INVALID_OPERATION is set.
type Output = d128
The resulting type after applying the |
operator.
fn bitor(self, other: d128) -> d128
[src]
fn bitor(self, other: d128) -> d128
Performs the |
operation.
impl<'a> BitOr<d128> for &'a d128
[src]
impl<'a> BitOr<d128> for &'a d128
type Output = d128
The resulting type after applying the |
operator.
fn bitor(self, other: d128) -> d128
[src]
fn bitor(self, other: d128) -> d128
Performs the |
operation.
impl<'a> BitOr<&'a d128> for d128
[src]
impl<'a> BitOr<&'a d128> for d128
type Output = d128
The resulting type after applying the |
operator.
fn bitor(self, other: &'a d128) -> d128
[src]
fn bitor(self, other: &'a d128) -> d128
Performs the |
operation.
impl<'a, 'b> BitOr<&'a d128> for &'b d128
[src]
impl<'a, 'b> BitOr<&'a d128> for &'b d128
type Output = d128
The resulting type after applying the |
operator.
fn bitor(self, other: &'a d128) -> d128
[src]
fn bitor(self, other: &'a d128) -> d128
Performs the |
operation.
impl BitXor<d128> for d128
[src]
impl BitXor<d128> for d128
The operands must be zero or positive, an integer (finite with zero exponent) and comprise only zeros and/or ones; if not, INVALID_OPERATION is set.
type Output = d128
The resulting type after applying the ^
operator.
fn bitxor(self, other: d128) -> d128
[src]
fn bitxor(self, other: d128) -> d128
Performs the ^
operation.
impl<'a> BitXor<d128> for &'a d128
[src]
impl<'a> BitXor<d128> for &'a d128
type Output = d128
The resulting type after applying the ^
operator.
fn bitxor(self, other: d128) -> d128
[src]
fn bitxor(self, other: d128) -> d128
Performs the ^
operation.
impl<'a> BitXor<&'a d128> for d128
[src]
impl<'a> BitXor<&'a d128> for d128
type Output = d128
The resulting type after applying the ^
operator.
fn bitxor(self, other: &'a d128) -> d128
[src]
fn bitxor(self, other: &'a d128) -> d128
Performs the ^
operation.
impl<'a, 'b> BitXor<&'a d128> for &'b d128
[src]
impl<'a, 'b> BitXor<&'a d128> for &'b d128
type Output = d128
The resulting type after applying the ^
operator.
fn bitxor(self, other: &'a d128) -> d128
[src]
fn bitxor(self, other: &'a d128) -> d128
Performs the ^
operation.
impl Shl<usize> for d128
[src]
impl Shl<usize> for d128
The result is self
with the digits of the coefficient shifted to the left without adjusting
the exponent or the sign of self
. Any digits ‘shifted in’ from the right will be 0. amount
is the count of positions to shift and must be a in the range –34 through +34. NaNs are
propagated as usual. If self
is infinite the result is Infinity of the same sign. No status
is set unless amount
is invalid or self
is an sNaN.
type Output = d128
The resulting type after applying the <<
operator.
fn shl(self, amount: usize) -> d128
[src]
fn shl(self, amount: usize) -> d128
Performs the <<
operation.
impl<'a> Shl<usize> for &'a d128
[src]
impl<'a> Shl<usize> for &'a d128
type Output = d128
The resulting type after applying the <<
operator.
fn shl(self, amount: usize) -> d128
[src]
fn shl(self, amount: usize) -> d128
Performs the <<
operation.
impl Shr<usize> for d128
[src]
impl Shr<usize> for d128
The result is self
with the digits of the coefficient shifted to the right without adjusting
the exponent or the sign of self
. Any digits ‘shifted in’ from the left will be 0. amount
is the count of positions to shift and must be a in the range –34 through +34. NaNs are
propagated as usual. If self
is infinite the result is Infinity of the same sign. No status
is set unless amount
is invalid or self
is an sNaN.
type Output = d128
The resulting type after applying the >>
operator.
fn shr(self, amount: usize) -> d128
[src]
fn shr(self, amount: usize) -> d128
Performs the >>
operation.
impl<'a> Shr<usize> for &'a d128
[src]
impl<'a> Shr<usize> for &'a d128
type Output = d128
The resulting type after applying the >>
operator.
fn shr(self, amount: usize) -> d128
[src]
fn shr(self, amount: usize) -> d128
Performs the >>
operation.
impl BitAndAssign<d128> for d128
[src]
impl BitAndAssign<d128> for d128
fn bitand_assign(&mut self, other: d128)
[src]
fn bitand_assign(&mut self, other: d128)
Performs the &=
operation.
impl BitOrAssign<d128> for d128
[src]
impl BitOrAssign<d128> for d128
fn bitor_assign(&mut self, other: d128)
[src]
fn bitor_assign(&mut self, other: d128)
Performs the |=
operation.
impl BitXorAssign<d128> for d128
[src]
impl BitXorAssign<d128> for d128
fn bitxor_assign(&mut self, other: d128)
[src]
fn bitxor_assign(&mut self, other: d128)
Performs the ^=
operation.
impl ShlAssign<usize> for d128
[src]
impl ShlAssign<usize> for d128
fn shl_assign(&mut self, amount: usize)
[src]
fn shl_assign(&mut self, amount: usize)
Performs the <<=
operation.
impl ShrAssign<usize> for d128
[src]
impl ShrAssign<usize> for d128
fn shr_assign(&mut self, amount: usize)
[src]
fn shr_assign(&mut self, amount: usize)
Performs the >>=
operation.
impl<T> Sum<T> for d128 where
T: Borrow<d128>,
[src]
impl<T> Sum<T> for d128 where
T: Borrow<d128>,
fn sum<I: IntoIterator<Item = T>>(iter: I) -> d128
[src]
fn sum<I: IntoIterator<Item = T>>(iter: I) -> d128
Method which takes an iterator and generates Self
from the elements by "summing up" the items. Read more
impl LowerHex for d128
[src]
impl LowerHex for d128
Formats a d128 to hexadecimal binary representation.
impl OrdSubset for d128
[src]
impl OrdSubset for d128
fn is_outside_order(&self) -> bool
[src]
fn is_outside_order(&self) -> bool
impl Encodable for d128
[src]
impl Encodable for d128
fn encode<E: Encoder>(&self, e: &mut E) -> Result<(), E::Error>
[src]
fn encode<E: Encoder>(&self, e: &mut E) -> Result<(), E::Error>
Serialize a value using an Encoder
.
impl Decodable for d128
[src]
impl Decodable for d128
impl Serialize for d128
[src]
impl Serialize for d128
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
[src]
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<'de> Deserialize<'de> for d128
[src]
impl<'de> Deserialize<'de> for d128
fn deserialize<D>(deserializer: D) -> Result<d128, D::Error> where
D: Deserializer<'de>,
[src]
fn deserialize<D>(deserializer: D) -> Result<d128, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
impl<T> ToString for T where
T: Display + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
type Owned = T
fn to_owned(&self) -> T
[src]
fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)
[src]
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,