ToF64

Trait ToF64 

Source
pub trait ToF64 {
    // Required method
    fn to_f64(self) -> f64;
}
Expand description

Helper trait to convert numeric types to f64 for statistical calculations.

This trait provides a uniform interface for converting integer types to f64, which is necessary for the statistical estimation algorithms. The conversion may be lossy for very large i64 values (beyond 2^53), but this is acceptable for statistical approximations.

Required Methods§

Source

fn to_f64(self) -> f64

Converts the value to f64.

§Note

For i64 values larger than 2^53, precision may be lost in the conversion. This is acceptable for statistical calculations where exact precision is not required.

Implementations on Foreign Types§

Source§

impl ToF64 for i32

Source§

fn to_f64(self) -> f64

Source§

impl ToF64 for i64

Source§

fn to_f64(self) -> f64

Implementors§