Trait smartcore::numbers::floatnum::FloatNumber
source · pub trait FloatNumber: Number + Float + Signed {
// Required methods
fn copysign(self, sign: Self) -> Self;
fn ln_1pe(self) -> Self;
fn sigmoid(self) -> Self;
fn rand() -> Self;
fn two() -> Self;
fn half() -> Self;
fn to_f32_bits(self) -> u32;
// Provided method
fn square(self) -> Self { ... }
}
Expand description
Defines float number
Required Methods§
sourcefn sigmoid(self) -> Self
fn sigmoid(self) -> Self
Efficient implementation of Sigmoid function, \( S(x) = \frac{1}{1 + e^{-x}} \), see Sigmoid function
sourcefn to_f32_bits(self) -> u32
fn to_f32_bits(self) -> u32
Raw transmutation to u64