Difference between revisions of "Mod Command"
From GeoGebra Manual
m (Text replace - "<div class="box info"> 48px|left This page is part of the official manual for print and pdf. For structural reasons normal users can't edit this page. If you found any errors on this page please contact ) |
(command syntax: changed [ ] into ( )) |
||
(6 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
− | <noinclude>{{Manual Page|version= | + | <noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|cas=true|algebra}} |
− | {{command|cas=true|algebra}} | + | ;Mod( <Dividend Number>, <Divisor Number> ) |
− | ; Mod | + | :Yields the remainder when dividend number is divided by divisor number. |
− | :Yields the remainder when | + | :{{example|1=<code><nowiki>Mod(9, 4)</nowiki></code> yields ''1''.}} |
− | :{{example|1= | + | ;Mod( <Dividend Polynomial>, <Divisor Polynomial> ) |
− | ;Mod | + | :Yields the remainder when the dividend polynomial is divided by the divisor polynomial. |
− | :Yields the remainder when the | + | :{{example|1=<code><nowiki>Mod(x^3 + x^2 + x + 6, x^2 - 3)</nowiki></code> yields ''4 x + 9''.}} |
− | :{{example|1= | + | |
− | + | {{note|1=<div> | |
− | + | If you want a function to do this, you can define it yourself, e.g. <code>mod(x, y) = y (x / y - floor(x / y))</code>. | |
− | + | </div>}} | |
− | |||
− | |||
− | |||
− |
Latest revision as of 13:00, 5 October 2017
- 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, e.g. mod(x, y) = y (x / y - floor(x / y))
.