The function gcd computes the greatest common divisor of two values.

In case the argument types NT1 and NT2 differ, the result_type is determined via Coercion_traits.
Thus, the result_type is well defined if NT1 and NT2 are a model of ExplicitInteroperable.
The actual gcd is performed with the semantic of that type.

The function is guaranteed to be well defined in case result_type is a model of the UniqueFactorizationDomain concept.

#include <CGAL/number_utils.h>

template <class NT1, class NT2>
result_type gcd ( NT1 x, NT2 y)

See Also