sabato 21 novembre 2020

X Modulo Y

X Modulo Y. X mod y = r. The notation x modulo y (y must be finite and nonzero) computes a value k of the same sign as y (or zero) such that abs(k) < abs(y) and x−k = q × y for some integer q.

What Is Modular Arithmetic Article Khan Academy
What Is Modular Arithmetic Article Khan Academy from cdn.kastatic.org
Khan academy is a 501(c)(3) nonprofit organization. Double integrals of modulo x + modulo y. The syntax of modulo operator is a % b.

Why do we need modulo

The modulo operator is used to carry out euclidean division. When we divide two positive numbers, the equation will look like this 100 mod 9 equals 1. So if y is positive, the result k of 'x modulo y' is positive regardless of the sign of x.


Nessun commento:

Posta un commento

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel