#float #numbers #floating-point #nan #infinity #80-bit #f80

extended

Extended precision 80-bit floating-point numbers (f80)

1 unstable release

0.1.0 May 27, 2022

#832 in Math

Download history 39/week @ 2023-11-29 1/week @ 2023-12-06 6/week @ 2023-12-13 5/week @ 2023-12-20 20/week @ 2023-12-27 99/week @ 2024-01-03 102/week @ 2024-01-10 38/week @ 2024-01-17 86/week @ 2024-01-24 84/week @ 2024-01-31 63/week @ 2024-02-07 86/week @ 2024-02-14 871/week @ 2024-02-21 4091/week @ 2024-02-28 3501/week @ 2024-03-06 2822/week @ 2024-03-13

11,289 downloads per month
Used in 24 crates (2 directly)

MIT license

14KB
238 lines

80-bit Extended-Precision Floating-Point Numbers

This is a Rust library that provides a type for representing 80-bit extended-precision floating-point numbers. It is licensed under the terms of the MIT license, see LICENSE.txt for details.

Rounding, Infinity, and NaN

This library uses round-to-even when converting from 80-bit floats to 64-bit floats. This should be what you’re used to, and what you expect! In round-to-even, when an 80-bit float is exactly half-way between two possible float64 values, the value with a zero in the least-significant bit is chosen (or the value with the larger exponent is chosen, if the values have different exponents).

Values which are outside the range of possible float64 values are rounded to infinity.

Infinity and NaN are preserved. Different types of NaN values are not distinguished from each other, but the sign of NaN values is preserved during conversion.


lib.rs:

Extended-precision 80-bit floating-point numbers (f80).

No runtime deps