StochasticRounding.jl
StochasticRounding.jl copied to clipboard
Up or down? Maybe both?
We currently do all of them deterministically, stochastic rounded is only for arithmetics, but I think we should change this depending on the target type - deterministic -> deterministic is...
In https://github.com/cboutsikas/stoch_rounding_iplicit_reg/issues/1 I ran into ```julia julia> GenericLinearAlgebra.svd!(rand(Float32sr,3,3)) ERROR: DomainError with -51: Cannot raise an integer x to a negative power -51. Convert input to float. Stacktrace: [1] throw_domerr_powbysq(::Float32sr, p::Int64)...
This test failure keeps coming up ```julia Test for U(0,1): Test Failed at /home/runner/work/StochasticRounding.jl/StochasticRounding.jl/test/float16sr.jl:114 Expression: Ndown + Nup == N Evaluated: 99998 == 100000 ``` Meaning that there's some stochastic...
Should be implemented ```julia julia> float(float(1f0)) 1.0f0 julia> stochastic_float(stochastic_float(1f0)) ERROR: MethodError: no method matching stochastic_float(::Type{Float32sr}) ```
```julia julia> stochastic_round(Float64,Double64(2)) 1.9999999999999998 ``` because `eps` changes from [1,2) to [2,4) the eps calculated from 2 reaches into prevfloat(2.0) making it possible to round down from 2 at a...