Expand description
Functions for handling fixed-point arithmetic.
This module provides constants and functions that enforce a fixed-point precision strategy, ensuring consistent precision and scaling across various types and calculations.
Constants§
- FIXED_
PRECISION - The maximum fixed-point precision.
- FIXED_
SCALAR - The scalar value corresponding to the maximum precision (10^16).
- FIXED_
SIZE_ BINARY - The data type name for the Arrow fixed-size binary representation.
- MAX_
FLOAT_ PRECISION - The maximum precision that can be safely used with f64-based constructors.
- PRECISION_
BYTES - The width in bytes for fixed-point value types in high-precision mode (128-bit).
- PRECISION_
DIFF_ SCALAR - The scalar representing the difference between high-precision and standard-precision modes.
Statics§
- HIGH_
PRECISION_ MODE - Indicates if high-precision mode is enabled.
Functions§
- check_
fixed_ precision - Checks if a given
precisionvalue is within the allowed fixed-point precision range. - f64_
to_ fixed_ i64 - Converts an
f64value to a raw fixed-pointi64representation with a specified precision. - f64_
to_ fixed_ i128 - Converts an
f64value to a raw fixed-pointi128representation with a specified precision. - f64_
to_ fixed_ u64 - Converts an
f64value to a raw fixed-pointu64representation with a specified precision. - f64_
to_ fixed_ u128 - Converts an
f64value to a raw fixed-pointu128representation with a specified precision. - fixed_
i64_ to_ f64 - Converts a raw fixed-point
i64value back to anf64value. - fixed_
i128_ to_ f64 - Converts a raw fixed-point
i128value back to anf64value. - fixed_
u64_ to_ f64 - Converts a raw fixed-point
u64value back to anf64value. - fixed_
u128_ to_ f64 - Converts a raw fixed-point
u128value back to anf64value.