Jump to content

Modular arithmetic: Difference between revisions

adding remark about fields
(→‎{{header|Raku}}: update code to recent module version)
(adding remark about fields)
Line 6:
:<math>a = b + k\,p</math>
 
The corresponding set of [[wp:equivalence class|equivalence class]]es forms a [[wp:ring (mathematics)|ring]] denoted <math>\frac{\Z}{p\Z}</math>. When p is a prime number, this ring becomes [[wp:field (mathematics)|field]] denoted <math>\mathbb{F}_p</math>, but you won't have to implement the [[wp:multiplicative inverse|multiplicative inverse]] for this task.
 
Addition and multiplication on this ring have the same algebraic structure as in usual arithmeticsarithmetic, so that a function such as a polynomial expression could receive a ring element as argument and give a consistent result.
 
The purpose of this task is to show, if your programming language allows it,
1,934

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.