how to find gcd of two float numbers code example
Example: how to find gcd of two float numbers
double fgcd(double a, double b)
{
if (b > a)
{
return fgcd(b, a);
}
if (fabs(b) < 0.001)
{
return a;
}
else
{
return (fgcd(b, a - floor(a / b) * b));
}
}