fp
Fully qualified path: fp
Modules
Constants
Free functions
Structs
Traits
Impls
Modules
Modules
Errors
Fully qualified path: fp::Errors
Constants
| FP_ADD_OVERFLOW | — |
| FP_SUB_OVERFLOW | — |
| FP_MUL_OVERFLOW | — |
| FP_DIV_OVERFLOW | — |
| FP_SUB_UNDERFLOW | — |
| FELT_OVERFLOW | — |
| INT_VALUE_OVERFLOW | — |
| DIVISION_BY_ZERO | — |
Constants
Constants
| FP_ADD_OVERFLOW | — |
| FP_SUB_OVERFLOW | — |
| FP_MUL_OVERFLOW | — |
| FP_DIV_OVERFLOW | — |
| FP_SUB_UNDERFLOW | — |
| FELT_OVERFLOW | — |
| INT_VALUE_OVERFLOW | — |
| DIVISION_BY_ZERO | — |
FP_ADD_OVERFLOW
Fully qualified path: fp::Errors::FP_ADD_OVERFLOW
pub const FP_ADD_OVERFLOW: felt252 = 365090919740224395942701295758757719;
FP_SUB_OVERFLOW
Fully qualified path: fp::Errors::FP_SUB_OVERFLOW
pub const FP_SUB_OVERFLOW: felt252 = 365090925331496866927395489484394327;
FP_MUL_OVERFLOW
Fully qualified path: fp::Errors::FP_MUL_OVERFLOW
pub const FP_MUL_OVERFLOW: felt252 = 365090923474634031664153773587844951;
FP_DIV_OVERFLOW
Fully qualified path: fp::Errors::FP_DIV_OVERFLOW
pub const FP_DIV_OVERFLOW: felt252 = 365090920674809057101501301420478295;
FP_SUB_UNDERFLOW
Fully qualified path: fp::Errors::FP_SUB_UNDERFLOW
pub const FP_SUB_UNDERFLOW: felt252 = 93463276884863198043516953280769707863;
FELT_OVERFLOW
Fully qualified path: fp::Errors::FELT_OVERFLOW
pub const FELT_OVERFLOW: felt252 = 5567418118475409234156631904087;
INT_VALUE_OVERFLOW
Fully qualified path: fp::Errors::INT_VALUE_OVERFLOW
pub const INT_VALUE_OVERFLOW: felt252 = 6385851047807639379520149885964528571404119;
DIVISION_BY_ZERO
Fully qualified path: fp::Errors::DIVISION_BY_ZERO
pub const DIVISION_BY_ZERO: felt252 = 90768291480704981271960550256780071503;
Constants
Constants
EPSILON
Fully qualified path: fp::EPSILON
pub const EPSILON: u256 = 16;
MAX_INT
Fully qualified path: fp::MAX_INT
pub const MAX_INT: u128 = 10633823966279327296825105735305134080;
HALF
Fully qualified path: fp::HALF
pub const HALF: u128 = 170141183460469231731687303715884105728;
Free functions
Free functions
div_u64_by_u128
Fully qualified path: fp::div_u64_by_u128
pub fn div_u64_by_u128(lhs: u64, rhs: u128) -> UFixedPoint123x128
div_u64_by_fixed_point
Fully qualified path: fp::div_u64_by_fixed_point
pub fn div_u64_by_fixed_point(lhs: u64, rhs: UFixedPoint123x128) -> UFixedPoint123x128
mul_fixed_point_by_u128
Fully qualified path: fp::mul_fixed_point_by_u128
pub fn mul_fixed_point_by_u128(lhs: UFixedPoint123x128, rhs: u128) -> UFixedPoint123x128
Structs
Structs
UFixedPoint123x128
Fully qualified path: fp::UFixedPoint123x128
[derive(Debug, Drop, Copy, Serde)]
pub struct UFixedPoint123x128 { /* private fields */ }
Traits
Traits
UFixedPointTrait
Fully qualified path: fp::UFixedPointTrait
pub trait UFixedPointTrait
Trait functions
get_integer
Fully qualified path: fp::UFixedPointTrait::get_integer
fn get_integer(self: UFixedPoint123x128) -> u128
get_fractional
Fully qualified path: fp::UFixedPointTrait::get_fractional
fn get_fractional(self: UFixedPoint123x128) -> u128
round
Fully qualified path: fp::UFixedPointTrait::round
fn round(self: UFixedPoint123x128) -> u128
Impls
Impls
UFixedPoint123x128StorePacking
Fully qualified path: fp::UFixedPoint123x128StorePacking
pub impl UFixedPoint123x128StorePacking of StorePacking<UFixedPoint123x128, felt252>;
Impl functions
pack
Fully qualified path: fp::UFixedPoint123x128StorePacking::pack
fn pack(value: UFixedPoint123x128) -> felt252
unpack
Fully qualified path: fp::UFixedPoint123x128StorePacking::unpack
fn unpack(value: felt252) -> UFixedPoint123x128
UFixedPoint123x128PartialEq
Fully qualified path: fp::UFixedPoint123x128PartialEq
pub impl UFixedPoint123x128PartialEq of PartialEq<UFixedPoint123x128>;
Impl functions
eq
Fully qualified path: fp::UFixedPoint123x128PartialEq::eq
fn eq(lhs: @UFixedPoint123x128, rhs: @UFixedPoint123x128) -> bool
UFixedPoint123x128Zero
Fully qualified path: fp::UFixedPoint123x128Zero
pub impl UFixedPoint123x128Zero of Zero<UFixedPoint123x128>;
Impl functions
zero
Fully qualified path: fp::UFixedPoint123x128Zero::zero
fn zero() -> UFixedPoint123x128
is_zero
Fully qualified path: fp::UFixedPoint123x128Zero::is_zero
fn is_zero(self: @UFixedPoint123x128) -> bool
is_non_zero
Fully qualified path: fp::UFixedPoint123x128Zero::is_non_zero
fn is_non_zero(self: @UFixedPoint123x128) -> bool
UFixedPoint123x128Impl
Fully qualified path: fp::UFixedPoint123x128Impl
pub impl UFixedPoint123x128Impl of UFixedPointTrait;
Impl functions
get_integer
Fully qualified path: fp::UFixedPoint123x128Impl::get_integer
fn get_integer(self: UFixedPoint123x128) -> u128
get_fractional
Fully qualified path: fp::UFixedPoint123x128Impl::get_fractional
fn get_fractional(self: UFixedPoint123x128) -> u128
round
Fully qualified path: fp::UFixedPoint123x128Impl::round
fn round(self: UFixedPoint123x128) -> u128
UFixedPoint123x128ImplAdd
Fully qualified path: fp::UFixedPoint123x128ImplAdd
pub impl UFixedPoint123x128ImplAdd of Add<UFixedPoint123x128>;
Impl functions
add
Fully qualified path: fp::UFixedPoint123x128ImplAdd::add
fn add(lhs: UFixedPoint123x128, rhs: UFixedPoint123x128) -> UFixedPoint123x128
UFixedPoint123x128ImplSub
Fully qualified path: fp::UFixedPoint123x128ImplSub
pub impl UFixedPoint123x128ImplSub of Sub<UFixedPoint123x128>;
Impl functions
sub
Fully qualified path: fp::UFixedPoint123x128ImplSub::sub
fn sub(lhs: UFixedPoint123x128, rhs: UFixedPoint123x128) -> UFixedPoint123x128
UFixedPoint123x128ImplMul
Fully qualified path: fp::UFixedPoint123x128ImplMul
pub impl UFixedPoint123x128ImplMul of Mul<UFixedPoint123x128>;
Impl functions
mul
Fully qualified path: fp::UFixedPoint123x128ImplMul::mul
fn mul(lhs: UFixedPoint123x128, rhs: UFixedPoint123x128) -> UFixedPoint123x128
UFixedPoint123x128ImplDiv
Fully qualified path: fp::UFixedPoint123x128ImplDiv
pub impl UFixedPoint123x128ImplDiv of Div<UFixedPoint123x128>;
Impl functions
div
Fully qualified path: fp::UFixedPoint123x128ImplDiv::div
fn div(lhs: UFixedPoint123x128, rhs: UFixedPoint123x128) -> UFixedPoint123x128
U64IntoUFixedPoint
Fully qualified path: fp::U64IntoUFixedPoint
pub impl U64IntoUFixedPoint of Into<u64, UFixedPoint123x128>;
Impl functions
into
Fully qualified path: fp::U64IntoUFixedPoint::into
fn into(self: u64) -> UFixedPoint123x128
U128IntoUFixedPoint
Fully qualified path: fp::U128IntoUFixedPoint
pub impl U128IntoUFixedPoint of Into<u128, UFixedPoint123x128>;
Impl functions
into
Fully qualified path: fp::U128IntoUFixedPoint::into
fn into(self: u128) -> UFixedPoint123x128