Thanks for the report and the fix. I've updated the code and strengthened the test; the only change was to use Cint instead of Int32 for consistency with our C calling code:
http://docs.julialang.org/en/release-0.3/manual/calling-c-and-fortran-code/#type-correspondences I've also enabled the issue tracker; didn't realize it was off. On Sat Jan 03 2015 at 12:52:41 PM <[email protected]> wrote: > Changing the line that calls libgmp like this ( Int is replaced with Int32 > ) > > return convert(Int,ccall((:__gmpz_jacobi, :libgmp), Int32, > > gives correct results. The C header and code says the return type is 'int'. > All values that should be -1, come out 4294967295. This may be system > dependent, but I only have one laptop available at the moment. > > > > On Saturday, January 3, 2015 6:44:40 PM UTC+1, [email protected] > wrote: >> >> This is not correct >> >> julia> jacobisymbol(10,7) >> 4294967295 >> >> This happens in v0.3 and v0.4 >> I can send more information, and have a possible fix. I tried to find a >> way to make a comment or issue or something at >> https://github.com/jiahao/Combinatorics.jl, >> but was unable to find a button for it. Better to talk before issuing a >> PR. >> >> --John >> >>
