Difference between revisions of "Manuals/calci/UNITMOD"

From ZCubes Wiki
Jump to navigation Jump to search
Line 7: Line 7:
 
*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.
 
*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.  
+
*<math>A</math> and <math>B</math> can be positive or negative. Suppose <math>A</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 sign of <math>A</math>.
+
*But <math>A</math> and <math>B</math> are with different sign, then the result will come with the sign of <math>A</math>.
  
 
==ZOS==
 
==ZOS==

Revision as of 05:37, 8 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.
  • and can be positive or negative. Suppose and are of same sign either '+' or '-',then the resultant sign is also the same.
  • But and are with different sign, then the result will come with the sign of .

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

  1. =UNITMOD(5,2)=1
  2. =UNITMOD(-11,-3)=-2
  3. =UNITMOD(25,5)=0
  4. =UNITMOD(12,-4)=0
  5. =UNITMOD(85,-9)=4
  6. =UNITMOD(-52,7)=-3
  7. =UNITMOD(0,9)=0
  8. =UNITMOD(9,0)=NAN
  9. =UNITMOD(5.5,2)=1.5

Related Videos

MOD

See Also


References

Mod