Skip to content

Commit

Permalink
Fix explanation of modulus/remainder calculation (#749)
Browse files Browse the repository at this point in the history
  • Loading branch information
jalvarezz13 authored Jul 9, 2024
1 parent f6b1014 commit c8be176
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion de/1/math.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Math in Solidity is pretty straightforward. The following operations are the sam
* Subtraction: `x - y`,
* Multiplication: `x * y`
* Division: `x / y`
* Modulus / remainder: `x % y` *(for example, `13 % 5` is `3`, because if you divide 5 into 13, 3 is the remainder)*
* Modulus / remainder: `x % y` *(for example, `13 % 5` is `3`, because if you divide 13 into 5, 3 is the remainder)*

Solidity also supports an ***exponential operator*** (i.e. "x to the power of y", x^y):

Expand Down
2 changes: 1 addition & 1 deletion en/1/math.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Math in Solidity is pretty straightforward. The following operations are the sam
* Subtraction: `x - y`,
* Multiplication: `x * y`
* Division: `x / y`
* Modulus / remainder: `x % y` _(for example, `13 % 5` is `3`, because if you divide 5 into 13, 3 is the remainder)_
* Modulus / remainder: `x % y` _(for example, `13 % 5` is `3`, because if you divide 13 into 5, 3 is the remainder)_

Solidity also supports an **_exponential operator_** (i.e. "x to the power of y", x^y):

Expand Down
2 changes: 1 addition & 1 deletion en/21/09.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Math in Rust is pretty straightforward. The following operations are the same as
* Subtraction: `x - y`,
* Multiplication: `x * y`
* Division: `x / y`
* Modulus / remainder: `x % y` _(for example, `13 % 5` is `3`, because if you divide 5 into 13, 3 is the remainder)_
* Modulus / remainder: `x % y` _(for example, `13 % 5` is `3`, because if you divide 13 into 5, 3 is the remainder)_

For raising to a power the operation is done straight up from the numeric type method `pow` :

Expand Down

0 comments on commit c8be176

Please sign in to comment.