You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functionjulia_to_gap(x::Integer)
# if it fits into a GAP immediate integer, convert x to Int64
x in-1<<60:(1<<60-1) &&returnInt64(x)
# for the general case, fall back to BigIntreturnjulia_to_gap(BigInt(x))
end...functionjulia_to_gap(x::UInt)
x < (1<<60) &&returnInt64(x)
returnccall((:ObjInt_UInt, libgap), GapObj, (UInt64, ), x)
end## BigInts are converted via a ccallfunctionjulia_to_gap(x::BigInt)
x in-1<<60:(1<<60-1) &&returnInt64(x)
return GC.@preserve x ccall((:MakeObjInt, libgap), GapObj, (Ptr{UInt64}, Cint), x.d, x.size)
end
Thus once the value 2^62 is converted to an Int and once to a GapObj.
This can be fixed by replace the checks involving 1<<60 to compare against typemin(Int) resp. typemax(Int)
I just run into this:
Without reflecting it deeper, I would expect the two to return the same thing. Maybe I am wrong, need to think more about it.
See also PR #434 and thinks that links to, and probably a bunch of other issues and PRs sigh
The text was updated successfully, but these errors were encountered: