-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d7b0d70
commit f44eaf1
Showing
3 changed files
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# What is modulo? | ||
Modulo is a mathematical operation returning the remainder of a division of two whole numbers [[20240910110120]]. | ||
e.g. 1 mod 2 would return 1. | ||
e.g. 1 mod 2 would return 1 | ||
|
||
#math #division #gds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# What is the modulo of a negative number? | ||
The modulo [[20241006151644]] of a negative number is the solution of $a=b*q+r$, where r is always positive. | ||
So you need to find the solutions for $q$ and $r$, so that r is positive. | ||
|
||
#math #gds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Calculate -11 mod 7 | ||
Bring it into the form $a=b*q+r$ [[20241008172642]] which is $-11=7*q+r$ | ||
Now find $q$, so that $b*q$ is smaller than $a$. In this case $q=-2$. | ||
So now the equation takes the form $-11=7*(-2)+r$. | ||
Now we just solve for r, $r=3$ and we are done. | ||
|
||
#math #gds |