1,741 bytes added
, 01:57, 6 April 2017
<div style="font-size:30px">'''UNITMOD(A,B) '''</div><br/>
*<math>A</math> and <math>B</math> are any real numbers.
==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{A}{B}= Q</math> with remainder <math>R</math>. Here <math>A</math> is the dividend, <math>B</math> is the divisor, <math>Q</math> is the Quotient and <math> R</math> is the remainder.So <math> UNITMOD(A,B)=R</math>.
*For e.g., UNITMOD(5,2)=1. Here 1 is the remainder.
*Let number be "A" and the divisor be "B"
*The <math>UNITMOD</math> function we can write using <math>INT</math> function: <math> UNITMOD(A,B)=A-B*INT(A/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.
==ZOS==
*The syntax is to calculate remainder of the given numbers in ZOS is <math>UNITMOD(A,B)</math>.
**<math>A</math> and <math>B</math> are any real numbers.
*For e.g.,UNITMOD(10,2),UNITMOD(50.2,-4)
==Examples==
#=UNITMOD(5,2)=1
#=UNITMOD(-11,-3)=-2
#=UNITMOD(25,5)=0
#=UNITMOD(12,-4)=0
#=UNITMOD(85,-9)=-5
#=UNITMOD(-52,7)=4
#=UNITMOD(0,9)=0
#=UNITMOD(9,0)=NAN
#=UNITMOD(5.5,2)=1.5
==Related Videos==
{{#ev:youtube|io-EZ8VS0MY|280|center|MOD}}
==See Also==
*[[Manuals/calci/MOD | MOD ]]
*[[Manuals/calci/UNITDIVIDE | UNITDIVIDE ]]
==References==
[http://en.wikipedia.org/wiki/Modulo_operation Mod]
*[[Z_API_Functions | List of Main Z Functions]]
*[[ Z3 | Z3 home ]]