Difference between revisions of "Mod Command"
From GeoGebra Manual
(If you want a function to do this, you can define it yourself eg <code>mod(x, y) = y (x / y - floor(x / y))</code>) |
|||
Line 14: | Line 14: | ||
:Yields the remainder when the dividend polynomial is divided by the divisor polynomial. | :Yields the remainder when the dividend polynomial is divided by the divisor polynomial. | ||
:{{example|1=<code><nowiki>Mod[x^3 + x^2 + x + 6, x^2 - 3]</nowiki></code> yields ''4 x + 9''.}} | :{{example|1=<code><nowiki>Mod[x^3 + x^2 + x + 6, x^2 - 3]</nowiki></code> yields ''4 x + 9''.}} | ||
+ | |||
+ | |||
+ | {{note|1=<div> | ||
+ | If you want a function to do this, you can define it yourself eg <code>mod(x, y) = y (x / y - floor(x / y))</code> | ||
+ | </div>}} |
Revision as of 10:17, 28 November 2014
- Mod[ <Dividend Number>, <Divisor Number> ]
- Yields the remainder when dividend number is divided by divisor number.
- Example:
Mod[9, 4]
yields 1.
- Mod[ <Dividend Polynomial>, <Divisor Polynomial> ]
- Yields the remainder when the dividend polynomial is divided by the divisor polynomial.
- Example:
Mod[x^3 + x^2 + x + 6, x^2 - 3]
yields 4 x + 9.
CAS Syntax
- Mod[ <Dividend Number>, <Divisor Number> ]
- Yields the remainder when dividend number is divided by divisor number.
- Example:
Mod[9, 4]
yields 1.
- Mod[ <Dividend Polynomial>, <Divisor Polynomial> ]
- Yields the remainder when the dividend polynomial is divided by the divisor polynomial.
- Example:
Mod[x^3 + x^2 + x + 6, x^2 - 3]
yields 4 x + 9.
Note:
If you want a function to do this, you can define it yourself eg mod(x, y) = y (x / y - floor(x / y))