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

From Apache OpenOffice Wiki
Jump to: navigation, search
(Initial content)
 
m
 
(10 intermediate revisions by 5 users not shown)
Line 1: Line 1:
__NOTOC__
+
{{DISPLAYTITLE:GCD function}}
 +
{{Documentation/CalcFunc MathematicalTOC
 +
|ShowPrevNext=block
 +
|PrevPage=Documentation/How_Tos/Calc:_FACTDOUBLE_function
 +
|NextPage=Documentation/How_Tos/Calc:_GCD_ADD_function
 +
}}__NOTOC__
  
 
== GCD ==
 
== GCD ==
 
Returns the greatest common divisor of two or more integers.
 
Returns the greatest common divisor of two or more integers.
 
  
 
=== Syntax: ===
 
=== Syntax: ===
Line 10: Line 14:
  
 
: The greatest common divisor (or highest common factor) is the largest positive integer which will divide, without remainder, each of the given integers.
 
: The greatest common divisor (or highest common factor) is the largest positive integer which will divide, without remainder, each of the given integers.
 
  
 
=== Example: ===
 
=== Example: ===
Line 23: Line 26:
  
  
=== See also: ===
+
{{SeeAlso|EN|
'''[[Documentation/How_Tos/Calc: GCD_ADD function|GCD_ADD]]''',
+
* [[Documentation/How_Tos/Calc: GCD_ADD function|GCD_ADD]]
'''[[Documentation/How_Tos/Calc: LCM function|LCM]]''',
+
* [[Documentation/How_Tos/Calc: LCM function|LCM]]
'''[[Documentation/How_Tos/Calc: LCM_ADD function|LCM_ADD]]'''
+
* [[Documentation/How_Tos/Calc: LCM_ADD function|LCM_ADD]]
  
'''[[Documentation/How_Tos/Calc: Mathematical functions|Mathematical functions]]'''
+
* [[Documentation/How_Tos/Calc: Mathematical functions|Mathematical functions]]
  
=== Issues: ===
+
* [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]]
<tt>'''GCD'''</tt> will currently produce results with negative and fractional arguments. This has not been a documented feature, and it is planned that from OOo3.0 negative arguments will yield an error and that fractional arguments will be truncated prior to processing, in order to comply with the ODFF standard.
+
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}}
 +
[[Category: Documentation/Reference/Calc/Mathematical functions]]

Latest revision as of 15:26, 31 January 2024

GCD

Returns the greatest common divisor of two or more integers.

Syntax:

GCD(integer1; integer2; ... integer30)

integer1 to integer30 are up to 30 integers or ranges of integers whose greatest common divisor is to be calculated.
The greatest common divisor (or highest common factor) is the largest positive integer which will divide, without remainder, each of the given integers.

Example:

GCD(16; 32; 24)

returns 8, because 8 is the largest number that can divide 16, 24 and 32 without a remainder.

GCD(B1:B3)

where cells B1, B2, and B3 contain 9, 12, and 6 returns 3.

GCD(3; 5)

returns 1.




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