| The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information.... |
|

Home MathPack Math1 Miscellaneous Stuff GreatestCommonDivisor |
|||||||||
GreatestCommonDivisor |
|||||||||
The function GreatestCommonDivisor calculates the greatest common divisor (GCD), either of two values (versions [1] and [3]) or of an array of values (versions [2] and [4]). Further, the function not only supports the calculation of the GCG for integer values (varsions [1] and [2]), but also for floating point values (version [3] and [4]). In the case of floating point numbers you have to specify the number of decimal places to which the calculation is performed. For versions [1] and [3] the parameters v1 and v2 specify the two numbers to be processed, for versions [2] and [4] the open array values contains the numeric values for which the GCD is to be calculated. The parameter Precision may assume values between 0 and 12 and defines the number of decimal places to be taken into account when finding the greatest common divisor. The function returns the GCD. If there is no GCD (except the trivial one) the returned value is 1 in the case of versions[1] and [2] or 10-Precision for versions [3] and [4].
|
|||||||||