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

From Apache OpenOffice Wiki
Jump to: navigation, search
Line 110: Line 110:
 
: returns <tt>'''1.25'''</tt>.
 
: returns <tt>'''1.25'''</tt>.
  
{{Documentation/SeeAlso|
+
{{SeeAlso|EN|
 
* [[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]]

Revision as of 19:06, 16 July 2018


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.



See Also
Retrieved from "https://wiki.openoffice.org/w/index.php?title=Documentation/How_Tos/Calc:_MOD_function&oldid=243286"
Views
Personal tools
Navigation
Tools