Skip to content

Commit

Permalink
truncate integer division
Browse files Browse the repository at this point in the history
  • Loading branch information
kjnilsson committed Mar 6, 2018
1 parent 978d9a2 commit 52bd167
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Microsoft.FSharp.Core.Operators.erl
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ op_RangeStep(Start, Step, Finish)
op_Modulus(X, Y) ->
X rem Y.

op_Division(X, Y) when is_integer(X) ->
trunc(X/Y);
op_Division(X, Y) ->
X / Y.

Expand Down

0 comments on commit 52bd167

Please sign in to comment.