Operations and constants for 64-bits floats (f64
type)
Trait Implementations
Converts a string in base 10 to a float.
Accepts an optional decimal exponent.
This function accepts strings such as
- '3.14'
- '+3.14', equivalent to '3.14'
- '-3.14'
- '2.5E10', or equivalently, '2.5e10'
- '2.5E-10'
- '.' (understood as 0)
- '5.'
- '.5', or, equivalently, '0.5'
- '+inf', 'inf', '-inf', 'NaN'
Leading and trailing whitespace represent an error.
Err(ParseFloatError)
if the string did not represent a valid
number. Otherwise, Ok(n)
where n
is the floating-point
number represented by src
.
impl<'a> Add<f64> for &'a f64
type Output = f64::Output
fn add(self, other: f64) -> f64::Output
impl<'a> Add<&'a f64> for f64
type Output = f64::Output
fn add(self, other: &'a f64) -> f64::Output
impl<'a, 'b> Add<&'a f64> for &'b f64
type Output = f64::Output
fn add(self, other: &'a f64) -> f64::Output
impl<'a> Sub<f64> for &'a f64
type Output = f64::Output
fn sub(self, other: f64) -> f64::Output
impl<'a> Sub<&'a f64> for f64
type Output = f64::Output
fn sub(self, other: &'a f64) -> f64::Output
impl<'a, 'b> Sub<&'a f64> for &'b f64
type Output = f64::Output
fn sub(self, other: &'a f64) -> f64::Output
impl<'a> Mul<f64> for &'a f64
type Output = f64::Output
fn mul(self, other: f64) -> f64::Output
impl<'a> Mul<&'a f64> for f64
type Output = f64::Output
fn mul(self, other: &'a f64) -> f64::Output
impl<'a, 'b> Mul<&'a f64> for &'b f64
type Output = f64::Output
fn mul(self, other: &'a f64) -> f64::Output
impl<'a> Div<f64> for &'a f64
type Output = f64::Output
fn div(self, other: f64) -> f64::Output
impl<'a> Div<&'a f64> for f64
type Output = f64::Output
fn div(self, other: &'a f64) -> f64::Output
impl<'a, 'b> Div<&'a f64> for &'b f64
type Output = f64::Output
fn div(self, other: &'a f64) -> f64::Output
impl<'a> Rem<f64> for &'a f64
type Output = f64::Output
fn rem(self, other: f64) -> f64::Output
impl<'a> Rem<&'a f64> for f64
type Output = f64::Output
fn rem(self, other: &'a f64) -> f64::Output
impl<'a, 'b> Rem<&'a f64> for &'b f64
type Output = f64::Output
fn rem(self, other: &'a f64) -> f64::Output
impl<'a> Neg for &'a f64
type Output = f64::Output
fn neg(self) -> f64::Output
Returns a deep copy of the value.
fn clone_from(&mut self, source: &Self)
Keyboard shortcuts
- ?
- Show this help dialog
- S
- Focus the search field
- ⇤
- Move up in search results
- ⇥
- Move down in search results
- ⏎
- Go to active search result
Search tricks
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
, enum
,
trait
, typedef
(or
tdef
).