JuliaLang/julia — Issue #351: mixed signed/unsigned rem, mod, fld, div operations
Author: StefanKarpinski
Created: 2012-01-27 22:51:11+00:00
State: open
Labels: bugs, features

These tests ought to pass but don't:

```
for a=0:5, n=1:5
println("a=$a; n=$n;")
@assert rem(uint(a),uint(n)) == rem(a,n)
@assert mod(uint(a),uint(n)) == mod(a,n)
@assert rem(a,uint(n)) == rem(a,n)
@assert mod(a,uint(n)) == mod(a,n)
@assert rem(uint(a),n) == rem(a,n)
@assert mod(uint(a),n) == mod(a,n)

@assert mod(-a,uint(n)) == mod(-a,n)
@assert rem(-a,uint(n)) == rem(-a,n)
@assert mod(uint(a),-n) == mod(a,-n)
@assert rem(uint(a),-n) == rem(a,-n)
end
```

Not sure the best way to make them pass. I suspect that fld and div also have issues in these sorts of cases.