multiversx_sc::api

Trait BigFloatApiImpl

Source
pub trait BigFloatApiImpl: HandleTypeInfo {
Show 23 methods // Required methods fn bf_from_parts( &self, integral_part: i32, fractional_part: i32, exponent: i32, ) -> Self::BigFloatHandle; fn bf_from_frac( &self, numerator: i64, denominator: i64, ) -> Self::BigFloatHandle; fn bf_from_sci( &self, significand: i64, exponent: i64, ) -> Self::BigFloatHandle; fn bf_add( &self, dest: Self::BigFloatHandle, x: Self::BigFloatHandle, y: Self::BigFloatHandle, ); fn bf_sub( &self, dest: Self::BigFloatHandle, x: Self::BigFloatHandle, y: Self::BigFloatHandle, ); fn bf_mul( &self, dest: Self::BigFloatHandle, x: Self::BigFloatHandle, y: Self::BigFloatHandle, ); fn bf_div( &self, dest: Self::BigFloatHandle, x: Self::BigFloatHandle, y: Self::BigFloatHandle, ); fn bf_abs(&self, dest: Self::BigFloatHandle, x: Self::BigFloatHandle); fn bf_neg(&self, dest: Self::BigFloatHandle, x: Self::BigFloatHandle); fn bf_cmp( &self, x: Self::BigFloatHandle, y: Self::BigFloatHandle, ) -> Ordering; fn bf_sign(&self, x: Self::BigFloatHandle) -> Sign; fn bf_clone(&self, dest: Self::BigFloatHandle, x: Self::BigFloatHandle); fn bf_sqrt(&self, dest: Self::BigFloatHandle, x: Self::BigFloatHandle); fn bf_pow( &self, dest: Self::BigFloatHandle, x: Self::BigFloatHandle, exp: i32, ); fn bf_floor(&self, dest: Self::BigIntHandle, x: Self::BigFloatHandle); fn bf_ceil(&self, dest: Self::BigIntHandle, x: Self::BigFloatHandle); fn bf_trunc(&self, dest: Self::BigIntHandle, x: Self::BigFloatHandle); fn bf_is_bi(&self, x: Self::BigFloatHandle) -> bool; fn bf_set_i64(&self, dest: Self::BigFloatHandle, value: i64); fn bf_set_bi(&self, dest: Self::BigFloatHandle, bi: Self::BigIntHandle); fn bf_get_const_pi(&self, dest: Self::BigFloatHandle); fn bf_get_const_e(&self, dest: Self::BigFloatHandle); // Provided method fn bf_new_zero(&self) -> Self::BigFloatHandle { ... }
}
Expand description

Definition of the BigFloat type required by the API.

Required Methods§

Source

fn bf_from_parts( &self, integral_part: i32, fractional_part: i32, exponent: i32, ) -> Self::BigFloatHandle

Source

fn bf_from_frac(&self, numerator: i64, denominator: i64) -> Self::BigFloatHandle

Source

fn bf_from_sci(&self, significand: i64, exponent: i64) -> Self::BigFloatHandle

Source

fn bf_add( &self, dest: Self::BigFloatHandle, x: Self::BigFloatHandle, y: Self::BigFloatHandle, )

Source

fn bf_sub( &self, dest: Self::BigFloatHandle, x: Self::BigFloatHandle, y: Self::BigFloatHandle, )

Source

fn bf_mul( &self, dest: Self::BigFloatHandle, x: Self::BigFloatHandle, y: Self::BigFloatHandle, )

Source

fn bf_div( &self, dest: Self::BigFloatHandle, x: Self::BigFloatHandle, y: Self::BigFloatHandle, )

Source

fn bf_abs(&self, dest: Self::BigFloatHandle, x: Self::BigFloatHandle)

Source

fn bf_neg(&self, dest: Self::BigFloatHandle, x: Self::BigFloatHandle)

Source

fn bf_cmp(&self, x: Self::BigFloatHandle, y: Self::BigFloatHandle) -> Ordering

Source

fn bf_sign(&self, x: Self::BigFloatHandle) -> Sign

Source

fn bf_clone(&self, dest: Self::BigFloatHandle, x: Self::BigFloatHandle)

Source

fn bf_sqrt(&self, dest: Self::BigFloatHandle, x: Self::BigFloatHandle)

Source

fn bf_pow(&self, dest: Self::BigFloatHandle, x: Self::BigFloatHandle, exp: i32)

Source

fn bf_floor(&self, dest: Self::BigIntHandle, x: Self::BigFloatHandle)

Source

fn bf_ceil(&self, dest: Self::BigIntHandle, x: Self::BigFloatHandle)

Source

fn bf_trunc(&self, dest: Self::BigIntHandle, x: Self::BigFloatHandle)

Source

fn bf_is_bi(&self, x: Self::BigFloatHandle) -> bool

Source

fn bf_set_i64(&self, dest: Self::BigFloatHandle, value: i64)

Source

fn bf_set_bi(&self, dest: Self::BigFloatHandle, bi: Self::BigIntHandle)

Source

fn bf_get_const_pi(&self, dest: Self::BigFloatHandle)

Source

fn bf_get_const_e(&self, dest: Self::BigFloatHandle)

Provided Methods§

Implementors§