Skip to main content

Crate ffl

Crate ffl 

Source
Expand description

Fuchsia Fixed-Point Library (FFL)

FFL is a fixed-point arithmetic library ported from C++. It provides:

  • Fixed: The primary fixed-point type, parameterized by the underlying integer type and fractional bit count.
  • FastFixed: A wrapper type designed for high-performance arithmetic operations on 64-bit platforms, by saturating to 64-bit intermediates instead of standard 128-bit intermediates.
  • ExponentialAverage: A utility for tracking exponential moving averages and variance using fixed-point values.
  • Expression templates: Deferred-evaluation expression structures like expression::DivExpression and expression::MulExpression to maintain resolution and precision for division and multiplication operations until the result is converted to a concrete format.

Re-exports§

pub use exponential_average::ExponentialAverage;
pub use expression::from_ratio;
pub use expression::to_resolution;
pub use fast::FastExpression;
pub use fast::FastFixed;
pub use fixed::Fixed;
pub use fixed::compare_fixed;
pub use string::Mode;
pub use string::String;

Modules§

exponential_average
expression
fast
fixed
fixed_format
num_traits
string

Functions§

from_raw
Creates a Fixed value from a raw underlying integer value.
round
Rounds the given fixed-point value to the nearest integer using round-half-to-even (convergent rounding).