JCL Help:GCD

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Returns the greatest common divisor.


Pascal

 function GCD(X: Cardinal; Y: Cardinal): Cardinal;


Parameters

Parameters Description
X: Cardinal First of the two values.
Y: Cardinal Second of the two values.


Return Value

The greatest common divisor of X and Y.


Description

The GCD function returns the greatest common divisor (GCD) of the two supplied integers. This is also sometimes referred to as the Highest Common Factor (HCF). The function is implemented using Euclid's algorithm.


See Also

LCM IsRelativePrime


About

Unit

JclMath


Donator

ESB Consultancy


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page