New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unsigned modulo #2

Closed
io7m opened this Issue Jan 2, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@io7m
Owner

io7m commented Jan 2, 2017

Java's modulo operator is unsigned. An unsigned modulo can be emulated with:

let modulo x y =
  let r = x % y in
    if r < 0
    then r + y
    else r

@io7m io7m added the enhancement label Jan 2, 2017

@io7m io7m self-assigned this Jan 2, 2017

@io7m io7m closed this in 29b351a Jan 2, 2017

io7m added a commit that referenced this issue Jan 2, 2017

io7m added a commit that referenced this issue Jan 2, 2017

Merge branch 'release/0.3.0'
Release: io7m-junsigned 0.3.0
Code new: Add unsigned modulo. (tickets: #2)

io7m added a commit that referenced this issue Jan 2, 2017

Merge tag 'io7m-junsigned-0.3.0' into develop
Release: io7m-junsigned 0.3.0

Code new: Add unsigned modulo. (tickets: #2)

io7m added a commit that referenced this issue Feb 23, 2017

Merge branch 'release/1.0.0'
Release: io7m-junsigned 1.0.0
Code new: Add unsigned modulo. (tickets: #2)
Code new: Initial public API release. (tickets: #3)

io7m added a commit that referenced this issue Feb 23, 2017

Merge tag 'io7m-junsigned-1.0.0' into develop
Release: io7m-junsigned 1.0.0

Code new: Add unsigned modulo. (tickets: #2)
Code new: Initial public API release. (tickets: #3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment