JCL Help:IsRelativePrime

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Tests if two numbers are relatively prime.


Pascal

 function IsRelativePrime(const X: Cardinal; const Y: Cardinal): Boolean;


Parameters

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


Return Value

If the two numbers are relatively prime the result is True, otherwise the result is False.


Description

IsRelativePrime returns whether the two supplied numbers are relatively prime to each other. Two numbers are said to be relatively prime if their greatest common divisor equals 1. Another term used for relative prime is coprime.


See Also

GCD LCM


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