# Struct artichoke_backend::extn::core::float::Float [−][src]

#[repr(transparent)]pub struct Float(_);

## Implementations

The minimum number of significant decimal digits in a double-precision floating point.

Usually defaults to 15.

The difference between 1 and the smallest double-precision floating point number greater than 1.

Usually defaults to 2.2204460492503131e-16.

The minimum number of significant decimal digits in a double-precision floating point.

Usually defaults to 15.

The largest possible integer in a double-precision floating point number.

Usually defaults to 1.7976931348623157e+308.

The largest positive exponent in a double-precision floating point where 10 raised to this power minus 1.

Usually defaults to 308.

The largest possible exponent value in a double-precision floating point.

Usually defaults to 1024.

The smallest positive normalized number in a double-precision floating point.

Usually defaults to 2.2250738585072014e-308.

If the platform supports denormalized numbers, there are numbers between
zero and `Float::MIN`

. `0.0.next_float`

returns the smallest positive
floating point number including denormalized numbers.

The smallest negative exponent in a double-precision floating point where 10 raised to this power minus 1.

Usually defaults to -307.

The smallest possible exponent value in a double-precision floating point.

Usually defaults to -1021.

The base of the floating point, or number of unique digits used to represent the number.

Usually defaults to 2 on most systems, which would represent a base-10 decimal.

Represents the rounding mode for floating point addition.

Usually defaults to 1, rounding to the nearest number.

Other modes include:

mode | value |
---|---|

Indeterminable | -1 |

Rounding towards zero | 0 |

Rounding to the nearest number | 1 |

Rounding towards positive infinity | 2 |

Rounding towards negative infinity | 3 |

# Rust Caveats

Rust does not support setting the rounding mode and the behavior from
LLVM is not documented. Because of this uncertainty, Artichoke sets its
rounding mode to `-1`

, Indeterminable.

The Rust docs say `f64::round`

rounds “half-way cases away from
0.0.” Stack Overflow has a
discussion around float rounding semantics in Rust and
LLVM.

Compute the remainder of self and other.

Equivalent to `self.as_f64() % other.as_f64()`

.

## Trait Implementations

Performs the infallible conversion.

This method returns an ordering between `self`

and `other`

values if one exists. Read more

This method tests less than (for `self`

and `other`

) and is used by the `<`

operator. Read more

This method tests less than or equal to (for `self`

and `other`

) and is used by the `<=`

operator. Read more

This method tests greater than (for `self`

and `other`

) and is used by the `>`

operator. Read more

## Auto Trait Implementations

`impl RefUnwindSafe for Float`

`impl UnwindSafe for Float`

## Blanket Implementations

Mutably borrows from an owned value. Read more