Trait FixedOp

Source
pub trait FixedOp
where Self: Sized,
{ // Required methods fn fixed_sqrt(f: &Self) -> Option<Self>; fn fixed_pow(f: &Self, p: &Self) -> Option<Self>; fn fixed_exp(f: &Self) -> Option<Self>; fn fixed_ln(f: &Self) -> Option<Self>; }
Expand description

Unified interface for core fixed-point mathematical operations.

Implemented for all four fixed-point types: [FixedU64], [FixedU128], [FixedI64], [FixedI128]. Enables generic code that works across the entire fixed-point family through a single trait bound.

Required Methods§

Source

fn fixed_sqrt(f: &Self) -> Option<Self>

Square root (real domain).

Source

fn fixed_pow(f: &Self, p: &Self) -> Option<Self>

General power x^p (integer and fractional exponents).

Source

fn fixed_exp(f: &Self) -> Option<Self>

Natural exponential ( e^x ).

Source

fn fixed_ln(f: &Self) -> Option<Self>

Natural logarithm ( ln(x) ).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl FixedOp for FixedI64

FixedOp implementation for FixedI64.

Source§

fn fixed_sqrt(f: &Self) -> Option<Self>

Source§

fn fixed_pow(f: &Self, p: &Self) -> Option<Self>

Source§

fn fixed_exp(f: &Self) -> Option<Self>

Source§

fn fixed_ln(f: &Self) -> Option<Self>

Source§

impl FixedOp for FixedI128

FixedOp implementation for FixedI128.

Source§

fn fixed_sqrt(f: &Self) -> Option<Self>

Source§

fn fixed_pow(f: &Self, p: &Self) -> Option<Self>

Source§

fn fixed_exp(f: &Self) -> Option<Self>

Source§

fn fixed_ln(f: &Self) -> Option<Self>

Source§

impl FixedOp for FixedU64

FixedOp implementation for FixedU64.

Source§

fn fixed_sqrt(f: &Self) -> Option<Self>

Source§

fn fixed_pow(f: &Self, p: &Self) -> Option<Self>

Source§

fn fixed_exp(f: &Self) -> Option<Self>

Source§

fn fixed_ln(f: &Self) -> Option<Self>

Source§

impl FixedOp for FixedU128

FixedOp implementation for FixedU128.

Source§

fn fixed_sqrt(f: &Self) -> Option<Self>

Source§

fn fixed_pow(f: &Self, p: &Self) -> Option<Self>

Source§

fn fixed_exp(f: &Self) -> Option<Self>

Source§

fn fixed_ln(f: &Self) -> Option<Self>

Implementors§