Enum qoqo_calculator::CalculatorFloat [−][src]
Expand description
CalculatorFloat is an enum combining Float and String.
Variants
Float
- f64 valueStr
- String instance
Variants
Float(f64)
Floating point value
Tuple Fields of Float
0: f64
Str(String)
Symbolic expression in String form
Tuple Fields of Str
0: String
Implementations
Constant zero for CalculatorFloat
Constant one for CalculatorFloat
Constant pi for CalculatorFloat
Constant Euler’s number e for CalculatorFloat
Constant 1/sqrt(2) e for CalculatorFloat
Constant pi / 2 e for CalculatorFloat
Constant pi / 4 e for CalculatorFloat
Constant sqrt(2) e for CalculatorFloat
Return True when CalculatorFloat does not contain symbolic expression.
Return square root of CalculatorFloat.
Return atan2 for CalculatorFloat and generic type T
.
Arguments
other
- Any type T for which CalculatorFloat::Fromtrait is implemented
Return Power for CalculatorFloat and generic type T
.
Arguments
other
- Any type T for which CalculatorFloat::Fromtrait is implemented
Return exponential function exp(x) for CalculatorFloat.
Return sine function sin(x) for CalculatorFloat.
Return cosine function cos(x) for CalculatorFloat.
Return arccosine function acos(x) for CalculatorFloat.
Return absolute value abs(x) for CalculatorFloat.
Return signum value sign(x) for CalculatorFloat.
Return True if self value is close to other value.
Return Some(f64) when CalculatorFloat is a numeric value
Return inverse/reciprocal function (1/x) for CalculatorFloat.
Trait Implementations
Implement +
(add) for CalculatorFloat and generic type T
.
Arguments
other
- Any type T for which CalculatorFloat::Fromtrait is implemented
Implement +
(add) for &CalculatorFloat and generic type T
.
Arguments
other
- Any type T for which CalculatorFloat::Fromtrait is implemented
type Output = CalculatorFloat
type Output = CalculatorFloat
The resulting type after applying the +
operator.
Performs the +
operation. Read more
Implement +=
(add) for CalculatorFloat and generic type T
.
Arguments
other
- Any type T for which CalculatorFloat::Fromtrait is implemented
Performs the +=
operation. Read more
fn deserialize<D>(deserializer: D) -> Result<CalculatorFloat, D::Error> where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<CalculatorFloat, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Implement Display trait for CalculatorFloat.
Allows use of simple text formating
Implement /=
(divide) for CalculatorFloat and generic type T
.
Arguments
other
- Any type T for which CalculatorFloat::Fromtrait is implemented
Panics
Panics on division by zero. Division by zero is only detected when other is converted to CalculatorFloat::Float
Performs the /=
operation. Read more
Performs the conversion.
Performs the conversion.
Implement *
(multiply) for CalculatorFloat and generic type T
.
Arguments
other
- Any type T for which CalculatorFloat::Fromtrait is implemented
Implement *=
(multiply) for CalculatorFloat and generic type T
.
Arguments
other
- Any type T for which CalculatorFloat::Fromtrait is implemented
Performs the *=
operation. Read more
Implement minus sign for CalculatorFloat.
type Output = CalculatorFloat
type Output = CalculatorFloat
The resulting type after applying the -
operator.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Implement -
(subtract) for CalculatorFloat and generic type T
.
Arguments
other
- Any type T for which CalculatorFloat::Fromtrait is implemented
Implement -=
(subtract) for CalculatorFloat and generic type T
.
Arguments
other
- Any type T for which CalculatorFloat::Fromtrait is implemented
Performs the -=
operation. Read more
Implements summing over an iterator of CalculatorFloat
Arguments
iter
- Any iterator over CalculatorFloat items
Method which takes an iterator and generates Self
from the elements by
“summing up” the items. Read more
Try turning CalculatorFloat into f64 float.
Returns
f64
Panics
Panics when CalculatorFloat contains symbolic string value
type Error = CalculatorError
type Error = CalculatorError
The type returned in the event of a conversion error.
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for CalculatorFloat
impl Send for CalculatorFloat
impl Sync for CalculatorFloat
impl Unpin for CalculatorFloat
impl UnwindSafe for CalculatorFloat
Blanket Implementations
Mutably borrows from an owned value. Read more