We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c269329 commit f062f10Copy full SHA for f062f10
2 files changed
stdlib/Random/src/XoshiroSimd.jl
@@ -46,7 +46,7 @@ simdThreshold(::Type{Bool}) = 640
46
ui = (x>>>32) % UInt32
47
li = x % UInt32
48
u = _uint2float(ui, Float32)
49
- l = _uint2float(ui, Float32)
+ l = _uint2float(li, Float32)
50
(UInt64(reinterpret(UInt32, u)) << 32) | UInt64(reinterpret(UInt32, l))
51
end
52
@inline function _bits2float(x::UInt64, ::Type{Float16})
stdlib/Random/test/runtests.jl
@@ -1250,6 +1250,12 @@ end
1250
@test length(xs) == 3
1251
1252
1253
+@testset "float32 bug" begin
1254
+ a = rand(Float32, 4)
1255
+ @test a[1] != a[2]
1256
+ @test a[3] != a[4]
1257
+end
1258
+
1259
@testset "Docstrings" begin
1260
@test isempty(Docs.undocumented_names(Random))
1261
0 commit comments