-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Description
Error when calling bigcrushJulia
InexactError: trunc(Int32, 2147483648)
Stacktrace:
[1] throw_inexacterror
@ .\boot.jl:750
[2] checked_trunc_sint
@ .\boot.jl:764 [inlined]
[3] toInt32
@ .\boot.jl:801 [inlined]
[4] Int32
@ .\boot.jl:891 [inlined]
[5] convert
@ .\number.jl:7 [inlined]
[6] cconvert
@ .\essentials.jl:687 [inlined]
[7] smarsa_BirthdaySpacings
@ C:\Users\plowman\.julia\packages\RNGTest\B8BCf\src\RNGTest.jl:460
[8] #35
@ C:\Users\plowman\.julia\packages\RNGTest\B8BCf\src\RNGTest.jl:967 [inlined]
[9] #129
@ C:\Users\plowman\.julia\packages\RNGTest\B8BCf\src\RNGTest.jl:1061
This error seems to be caused by passing 2^31 to a Clong argument in ccall
g->smarsa_BirthdaySpacings(g, 100, 10^7, 0, 2^31, 2, 1)
2^31 is passed to argument d , which in turn is passed as Clong in the ccall
function smarsa_BirthdaySpacings(gen::RNGGenerator, N::Integer, n::Integer, r::Integer, d::Integer, t::Integer, p::Integer)
unif01 = Unif01(gen, "")
sres = ResPoisson()
try
ccall((:smarsa_BirthdaySpacings, libtestu01), Cvoid,
(Ptr{Cvoid}, Ptr{Cvoid}, Clong, Clong,
Cint, Clong, Cint, Cint),
unif01.ptr, sres.ptr, N, n,
r, d, t, p)
finally
delete(unif01)
end
return pvalue(sres)
end
Presumably could be fixed by passing a smaller value. I don't understand the tests so not sure what value is appropriate.
Metadata
Metadata
Assignees
Labels
No labels