Difference between revisions of "Manuals/calci/MOD"

From ZCubes Wiki
Jump to navigation Jump to search
(Created page with "<div id="16SpaceContent" align="left"><div class="ZEditBox" align="justify"> Syntax </div></div> ---- <div id="4SpaceContent" align="left"><div class="ZEditBox" align=...")
 
 
(15 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<div id="16SpaceContent" align="left"><div class="ZEditBox" align="justify">
+
<div style="font-size:30px">'''MOD(Number,Divisor) '''</div><br/>
 +
*<math>Number</math> and <math>Divisor</math> are any real numbers.
 +
**MOD() returns the remainder from division.
  
Syntax
+
==Description==
 +
*This function gives the remainder of the number after dividing with some number.
 +
*When we divide two integers we will get the result like this:  <math>\frac{X}{Y}= Q</math> with remainder <math>R</math>. Here <math> X </math> is the dividend, <math>Y</math> is the divisor, <math>Q</math> is the Quotient and <math> R</math> is the remainder.So <math> MOD(n,d)=R</math>.
 +
*For e.g., MOD(5,2)=1. Here 1 is the remainder.
 +
*Ler number be "n" and the divisor be "d"
 +
*The <math>MOD</math> function we can write using <math>INT</math> function: <math> MOD(n,d)=n-d*INT(n/d)</math>.
 +
*This function will return the result as error when the <math>d</math> value is 0.
 +
*Suppose the value of <math>n</math> and <math>d</math> with same sign either '+' or '-',then the result also with same sign.
 +
*But <math>n</math> and <math>d</math> are with different then the result will come with the <math> d </math> sign only.
  
</div></div>
+
==ZOS==
----
+
*The syntax is to calculate remainder of the given numbers in ZOS is <math>MOD(Number,Divisor)</math>.
<div id="4SpaceContent" align="left"><div class="ZEditBox" align="justify">
+
**<math>Number</math> and <math>Divisor</math> are any real numbers.
 +
*For e.g.,mod(10,2),mod(50.2,-4)
  
Remarks
+
==Examples==
 +
#=MOD(5,2)=1
 +
#=MOD(-11,-3)=-2
 +
#=MOD(25,5)=0
 +
#=MOD(12,-4)=0
 +
#=MOD(85,-9)=-5
 +
#=MOD(-52,7)=4
 +
#=MOD(0,9)=0
 +
#=MOD(9,0)=#N/A (DIVISOR == 0)
 +
#=MOD(5.5,2)=1.5
  
</div></div>
+
==Related Videos==
----
 
<div id="2SpaceContent" align="left"><div class="ZEditBox" align="justify">
 
  
Examples
+
{{#ev:youtube|io-EZ8VS0MY|280|center|MOD}}
  
</div></div>
+
==See Also==
----
+
*[[Manuals/calci/INT  | INT ]]
<div id="8SpaceContent" align="left"><div class="ZEditBox" align="justify">'''<font face="Times New Roman">''''''''''''<font size="6"> </font>''' '''''''''</font>'''</div></div>
+
*[[Manuals/calci/ROUND  | ROUND ]]
----
 
<div id="11SpaceContent" align="left"><div class="ZEditBox mceEditable" align="justify">
 
  
<font size="5">Description</font>
+
==References==
 +
[http://en.wikipedia.org/wiki/Modulo_operation Mod]
  
</div></div>
 
----
 
<div id="10SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">'''<font face="Times New Roman"> <font size="6">MOD</font> </font>'''</div></div>
 
----
 
<div id="3SpaceContent" class="zcontent" align="left"><br /><div id="7Space" class="gamizbox" title="7Space"><div id="7SpaceHeader" class="zheaderstyle" title="Double-click to start and stop editing the header."><center></center></div><div id="7SpaceRollup" title="Double-click to rolldown" align="left"><span><span id="7SpaceRollupContent" align="center"></span></span></div><div id="7SpaceCover"><div id="7SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify"><font size="3" face="Times New Roman"> </font>
 
  
'''MOD''' ('''N''',''' D''')
 
  
'''N'''   is the number.
+
*[[Z_API_Functions | List of Main Z Functions]]
  
'''D''' is the divisor.
+
*[[ Z3 Z3 home ]]
 
 
</div></div>
 
----
 
<div id="13SpaceContent" class="zcontent" align="left"><br /><br /><div id="1Space" class="gamizbox" title="1Space"><div id="1SpaceHeader" class="zheaderstyle" title="Double-click to start and stop editing the header."><center></center></div><div id="1SpaceRollup" title="Double-click to rolldown" align="left"><span><span id="1SpaceRollupContent" align="center"></span></span></div><div id="1SpaceCover"><div id="1SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">      If Divisor is 0, MOD shows the error value.</div></div>
 
----
 
<div id="14SpaceContent" class="zcontent" align="left"><br /><br /><br /><div id="5Space" class="gamizbox" title="5Space"><div id="5SpaceHeader" class="zheaderstyle" title="Double-click to start and stop editing the header."><center></center></div><div id="5SpaceRollup" title="Double-click to rolldown" align="left"><span><span id="5SpaceRollupContent" align="center"></span></span></div><div id="5SpaceCover"><div id="5SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify"><font size="3"><font face="Times New Roman"> This function calculates the remainder of a number after division.</font></font></div></div>
 
----
 
<div id="12SpaceContent" class="zcontent" align="left"><br /><br /><br /><div id="9Space" class="gamizbox" title="9Space"><div id="9SpaceHeader" class="zheaderstyle" title="Double-click to start and stop editing the header."><center></center></div><div id="9SpaceRollup" title="Double-click to rolldown" align="left"><span><span id="9SpaceRollupContent" align="center"></span></span></div><div id="9SpaceCover"><div id="9SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify"><font size="3"><font face="Times New Roman"> 
 
 
 
Lets see an example in (Column1 Row 1, Column2Row1)
 
 
 
MOD (N, D)
 
 
 
MOD (C1R1, C2R1)
 
 
 
i.e. = MOD (5, 4) is 1
 
 
 
</font></font></div></div>
 
----
 
<div id="6SpaceContent" class="zcontent" align="left">
 
 
 
{| id="TABLE3" class="SpreadSheet blue"
 
|- class="even"
 
| class="   " |
 
<div id="6Space_Copy" title="Click and Drag over to AutoFill other cells."></div>
 
| Column1
 
| class="  " | Column2
 
| class="  " | Column3
 
| class="  " | Column4
 
|- class="odd"
 
| class=" " | Row1
 
| class="sshl_f" | 5
 
| class="sshl_f" | 4
 
| class="sshl_f" |
 
| class="sshl_f" |
 
|- class="even"
 
| class="  " | Row2
 
| class="sshl_f" | 1
 
| class="sshl_f" |
 
| class="sshl_f" |
 
| class="sshl_f" |
 
|- class="odd"
 
| Row3
 
| class="sshl_f SelectTD SelectTD" |
 
<div id="6Space_Handle" title="Click and Drag to resize CALCI Column/Row/Cell. It is EZ!"></div><div id="6Space_Copy" title="Click and Drag over to AutoFill other cells."></div>
 
| class="sshl_f" |
 
| class="sshl_f" |
 
| class="sshl_f" |
 
|- class="even"
 
| Row4
 
| class="sshl_f" |
 
| class="sshl_f" |
 
| class="sshl_f" |
 
| class="sshl_f" |
 
|- class="odd"
 
| class=" " | Row5
 
| class="sshl_f" |
 
| class="sshl_f" |
 
| class="sshl_f" |
 
| class="sshl_f" |
 
|- class="even"
 
| Row6
 
| class="sshl_f" |
 
| class="sshl_f" |
 
| class="sshl_f" |
 
| class="sshl_f" |
 
|}
 
 
 
<div align="left">[[Image:calci1.gif]]</div></div>
 
----
 
</div></div></div></div></div></div></div></div></div></div></div></div>
 

Latest revision as of 03:18, 9 June 2020

MOD(Number,Divisor)


  • and are any real numbers.
    • MOD() returns the remainder from division.

Description

  • This function gives the remainder of the number after dividing with some number.
  • When we divide two integers we will get the result like this: with remainder . Here is the dividend, is the divisor, is the Quotient and is the remainder.So .
  • For e.g., MOD(5,2)=1. Here 1 is the remainder.
  • Ler number be "n" and the divisor be "d"
  • The function we can write using function: .
  • This function will return the result as error when the value is 0.
  • Suppose the value of and with same sign either '+' or '-',then the result also with same sign.
  • But and are with different then the result will come with the sign only.

ZOS

  • The syntax is to calculate remainder of the given numbers in ZOS is .
    • and are any real numbers.
  • For e.g.,mod(10,2),mod(50.2,-4)

Examples

  1. =MOD(5,2)=1
  2. =MOD(-11,-3)=-2
  3. =MOD(25,5)=0
  4. =MOD(12,-4)=0
  5. =MOD(85,-9)=-5
  6. =MOD(-52,7)=4
  7. =MOD(0,9)=0
  8. =MOD(9,0)=#N/A (DIVISOR == 0)
  9. =MOD(5.5,2)=1.5

Related Videos

MOD

See Also

References

Mod