Browse Source

Add parentheses to remove ambiguity for `%`. (#2478)

Jon Ross-Perkins 3 years ago
parent
commit
c5f4e65fdd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      docs/design/expressions/arithmetic.md

+ 1 - 1
docs/design/expressions/arithmetic.md

@@ -128,7 +128,7 @@ Signed integer arithmetic produces the usual mathematical result. Unsigned
 integer arithmetic in `uN` wraps around modulo 2<sup>`N`</sup>.
 
 Division truncates towards zero. The result of the `%` operator is defined by
-the equation `a % b == a - a / b * b`.
+the equation `a % b == a - (a / b) * b`.
 
 #### Overflow and other error conditions