Skip to content

Commit

Permalink
Merge pull request #32 from GregPlowman/GregPlowman/bigcrushJulia
Browse files Browse the repository at this point in the history
Avoid trunc error in smarsa_BirthSpacings in bigcrushJulia
  • Loading branch information
andreasnoack authored Jan 20, 2025
2 parents 4920b41 + e8245a1 commit cd8c174
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/RNGTest.jl
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,11 @@ module RNGTest
g->smarsa_CollisionOver(g, 30, 2*10^7, 27, 8, 14),
g->smarsa_CollisionOver(g, 30, 2*10^7, 0, 4, 21),
g->smarsa_CollisionOver(g, 30, 2*10^7, 28, 4, 21),
g->smarsa_BirthdaySpacings(g, 100, 10^7, 0, 2^31, 2, 1),
if typemax(Clong) < 2^31 # On Windows Clong is defined as Int32
g->smarsa_BirthdaySpacings(g, 250, 4*10^6, 0, 2^30, 2, 1)
else
g->smarsa_BirthdaySpacings(g, 100, 10^7, 0, 2^31, 2, 1)
end,
g->smarsa_BirthdaySpacings(g, 20, 2*10^7, 0, 2^21, 3, 1),
g->smarsa_BirthdaySpacings(g, 20, 3*10^7, 14, 2^16, 4, 1),
g->smarsa_BirthdaySpacings(g, 20, 2*10^7, 0, 2^9, 7, 1),
Expand Down
7 changes: 7 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ pval = 0.001
@testset "smarsa" begin
@testset "BirthdaySpacings" begin
@test RNGTest.smarsa_BirthdaySpacings(f, 1, 5000000, 0, 1073741824, 2, 1) > pval

# Issue28: smarsa_BirthdaySpacing called in bigcrushJulia
if typemax(Clong) < 2^31 # On Windows Clong is defined as Int32
@test RNGTest.smarsa_BirthdaySpacings(f, 250, 4*10^6, 0, 2^30, 2, 1) > pval
else
@test RNGTest.smarsa_BirthdaySpacings(f, 100, 10^7, 0, 2^31, 2, 1) > pval
end
end

@testset "MatrixRank" begin
Expand Down

0 comments on commit cd8c174

Please sign in to comment.