Core.Float32
— MethodConvert BFloat16sr to Float32 by padding trailing zeros.
StochasticRounding.BFloat16sr
— TypeThe BFloat16 + stochastic rounding type.
StochasticRounding.BFloat16sr
— MethodConvert to BFloat16sr from Float32 via round-to-nearest and tie to even. Identical to BFloat16(::Float32).
StochasticRounding.Float16sr
— TypeFloat16 + stochastic rounding type.
StochasticRounding.Float32sr
— TypeThe Float32 + stochastic rounding type.
StochasticRounding.Float64sr
— TypeThe Float64 + stochastic rounding type.
StochasticRounding.BFloat16_chance_roundup
— MethodChance that x::Float32 is round up when converted to BFloat16sr.
StochasticRounding.BFloat16_stochastic_round
— MethodStochastically round x::Float32 to BFloat16 with distance-proportional probabilities.
StochasticRounding.Float16_chance_roundup
— MethodFloat16_chance_roundup(x::Float32)
Chance that x::Float32 is round up when converted to Float16sr.
StochasticRounding.Float16_stochastic_round
— MethodFloat16_stochastic_round(x::Float32) -> Float16sr
Stochastically round x
to Float16 with distance-proportional probabilities.
StochasticRounding.Float32_chance_roundup
— MethodFloat32_chance_roundup(x::Float64)
Chance that x
is round up when converted to Float32sr.
StochasticRounding.Float32_stochastic_round
— MethodFloat32_stochastic_round(x::Float64) -> Float32sr
Stochastically round x::Float64 to Float32 with distance-proportional probabilities.
StochasticRounding.Float64_stochastic_round
— MethodStochastically round x::Double64 to Float64 with distance-proportional probabilities.
StochasticRounding.__init__
— MethodReseed the PRNG randomly by recalling.
StochasticRounding.rand_subnormal
— Methodrand_subnormal(rbits::UInt32) -> Float32
Create a random perturbation for the Float16 subnormals for stochastic rounding of Float32 -> Float16. This function samples uniformly from [-2.980232f-8,2.9802319f-8]. This function is algorithmically similar to randfloat from RandomNumbers.jl
StochasticRounding.rand_subnormal
— Methodrand_subnormal(rbits::UInt64) -> Float64
Create a random perturbation for the Float16 subnormals for stochastic rounding of Float32 -> Float16. This function samples uniformly from [-7.0064923216240846e-46,7.006492321624084e-46]. This function is algorithmically similar to randfloat from RandomNumbers.jl
StochasticRounding.seed
— MethodSeed the PRNG with any integer >0.
StochasticRounding.signexp_mask
— MethodMask for both sign and exponent bits. Equiv to ~significand_mask(Float64).