Answers for "how to find gcd of two float numbers"

0

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));
    }
}
Posted by: Guest on April-18-2021

Code answers related to "how to find gcd of two float numbers"

Browse Popular Code Answers by Language