Difference between revisions of "Documentation/How Tos/Calc: MOD function"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Robot: Automated text replacement %s)
m (Robot: Automated text replacement %s)
Line 19: Line 19:
 
{{Documentation/SeeAlso|
 
{{Documentation/SeeAlso|
 
* [[Documentation/How_Tos/Calc: QUOTIENT function|QUOTIENT]]
 
* [[Documentation/How_Tos/Calc: QUOTIENT function|QUOTIENT]]
* [[Documentation/How_Tos/Calc: INT function|INT]]'''
+
* [[Documentation/How_Tos/Calc: INT function|INT]]
  
* [[Documentation/How_Tos/Calc: Mathematical functions|Mathematical functions]]'''
+
* [[Documentation/How_Tos/Calc: Mathematical functions|Mathematical functions]]
  
 
* [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]]
 
* [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]]
 
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}}
 
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}}

Revision as of 14:26, 26 February 2009


MOD

Returns the remainder when one integer is divided by another.

Syntax:

MOD(number; divisor)

For integer arguments this function returns number modulo divisor, that is the remainder when number is divided by divisor.
This function is implemented as number - divisor * INT( number/divisor) , and this formula gives the result if the arguments are not integer.

Example:

MOD(22; 3)

returns 1, the remainder when 22 is divided by 3.

MOD(11.25; 2.5)

returns 1.25.

Template:Documentation/SeeAlso

Personal tools