pub trait RealNumber: Float + FromPrimitive + Debug + Display + Copy + Sum + Product + AddAssign + SubAssign + MulAssign + DivAssign {
    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;

    fn square(self) -> Self { ... }
}
Expand description

Defines real number

Required Methods

Copy sign from sign - another real number

Calculates natural \( \ln(1+e^x) \) without overflow.

Efficient implementation of Sigmoid function, \( S(x) = \frac{1}{1 + e^{-x}} \), see Sigmoid function

Returns pseudorandom number between 0 and 1

Returns 2

Returns .5

Raw transmutation to u64

Provided Methods

Returns \( x^2 \)

Implementations on Foreign Types

Implementors