Skip to content

Commit

Permalink
Add new notes lol
Browse files Browse the repository at this point in the history
  • Loading branch information
if-loop69420 committed Oct 8, 2024
1 parent d7b0d70 commit f44eaf1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion notes/20241006151644.md
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
5 changes: 5 additions & 0 deletions notes/20241008172642.md
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
7 changes: 7 additions & 0 deletions notes/20241008172916.md
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

0 comments on commit f44eaf1

Please sign in to comment.