aviks/julia — comment on commit 0498a1c81fd22b8191dbaae4f1de702eef54d7f8
File:  line 0
By StefanKarpinski:

I would do this for comparisons:

```
cmp(x::BigInt, y::BigInt) = ccall(dlsym(_jl_libgmp_wrapper, :_jl_mpz_cmp),
Int, (Ptr{Void}, Ptr{Void}), x.mpz, y.mpz)
```

That's an standard function that exists for other types as well. Then you define comparisons more succinctly like this:

```
==(x::BigInt, y::BigInt) = cmp(x,y) == 0
< (x::BigInt, y::BigInt) = cmp(x,y) < 0
<=(x::BigInt, y::BigInt) = cmp(x,y) <= 0
```