Expand description
Berkeley SoftFloat bindings.
These are partial bindings, and only part of the SoftFloat package is actually linked into the library. Some of the names have been altered to be more in line with Rust naming.
Structs§
- Sf32
- A single-precision soft-float. Internally represented as
u32. - Sf64
- A double-precision soft-float. Internally represented as
u64.
Constants§
- FLAG_
INEXACT - Inexact result exception.
- FLAG_
INFINITE - Result is infinity (division by zero).
- FLAG_
INVALID - Invalid operation (result is NaN).
- FLAG_
OVERFLOW - Overflow exception.
- FLAG_
UNDERFLOW - Underflow exception.
- ROUND_
MAX - Round towards +∞.
- ROUND_
MIN - Round towards -∞.
- ROUND_
MIN_ MAG - Round towards 0.
- ROUND_
NEAR_ EVEN - Round to nearest, ties to even.
- ROUND_
NEAR_ MAXMAG - Round to nearest, ties away from 0.
Functions§
- f32_add⚠
- Addition with single-precision values.
- f32_div⚠
- Division with single-precision values.
- f32_eq⚠
- Test equality with single-precision values.
- f32_
is_ ⚠signaling_ nan - Whether the single-precision value is a signalling NaN.
- f32_le⚠
- Test less-than-or-equal with single-precision values.
- f32_lt⚠
- Test less-than with single-precision values.
- f32_mul⚠
- Multiplication with single-precision values.
- f32_
mulAdd ⚠ - Fused multiplication and addition with single-precision values.
- f32_rem⚠
- Modulus / remainder with single-precision values.
- f32_
sqrt ⚠ - Square root of a single-precision value.
- f32_sub⚠
- Subtraction with single-precision values.
- f32_
to_ ⚠f64 - Convert a single-precision value to a double-precision value.
- f32_
to_ ⚠i32 - Convert a single-precision value to an
i32. - f32_
to_ ⚠u32 - Convert a single-precision value to a
u32. - f64_add⚠
- Addition with double-precision values.
- f64_div⚠
- Division with double-precision values.
- f64_eq⚠
- Test equality with double-precision values.
- f64_
is_ ⚠signaling_ nan - Whether the double-precision value is a signalling NaN.
- f64_le⚠
- Test less-than-or-equal with double-precision values.
- f64_lt⚠
- Test less-than with double-precision values.
- f64_mul⚠
- Multiplication with double-precision values.
- f64_
mulAdd ⚠ - Fused multiplication and addition with double-precision values.
- f64_rem⚠
- Modulus / remainder with double-precision values.
- f64_
sqrt ⚠ - Square root of a double-precision value.
- f64_sub⚠
- Subtraction with double-precision values.
- f64_
to_ ⚠f32 - Convert a double-precision value to a single-precision value.
- f64_
to_ ⚠i32 - Convert a double-precision value to an
i32. - f64_
to_ ⚠u32 - Convert a double-precision value to a
u32. - get_
flags ⚠ - Get the exception flags from thread-local storage.
- get_
rounding_ ⚠mode - Get the current rounding mode from thread-local storage.
- i32_
to_ ⚠f32 - Convert an
i32to a single-precision value. - i32_
to_ ⚠f64 - Convert an
i32to a double-precision value. - raise_
flags ⚠ - Add to the exception flags.
- set_
flags ⚠ - Set the exception flags.
- set_
rounding_ ⚠mode - Set the rounding mode.
- u32_
to_ ⚠f32 - Convert a
u32to a single-precision value. - u32_
to_ ⚠f64 - Convert a
u32to a double-precision value.