Difference between revisions of "Manuals/calci/UNITMOD"
Jump to navigation
Jump to search
(Created page with "<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 ...") |
|||
Line 6: | Line 6: | ||
*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>. | *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. | *For e.g., UNITMOD(5,2)=1. Here 1 is the remainder. | ||
− | * | + | *This function gives an error when <math>B</math> value is 0. |
− | + | *<mathA</math> and <math>B</math> can be positive or negative. Suppose <mathA</math> and <math>B</math> are of same sign either '+' or '-',then the resultant sign is also the same. | |
− | + | *But <math>A</math> and <math>B</math> are with different then the result will come with the <math> B </math> sign only. | |
− | |||
− | *But <math> | ||
==ZOS== | ==ZOS== |
Revision as of 23:44, 5 April 2017
UNITMOD(A,B)
- and 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: with remainder . Here is the dividend, is the divisor, is the Quotient and is the remainder.So .
- For e.g., UNITMOD(5,2)=1. Here 1 is the remainder.
- This function gives an error when value is 0.
- <mathA</math> and can be positive or negative. Suppose <mathA</math> and are of same sign either '+' or '-',then the resultant sign is also the same.
- 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.,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
See Also
References