correlation_coefficient(double sxx, double syy, double sxy)
{
    double coe, tmp;
    tmp = sxx * syy;
    if (tmp < Tiny)
	tmp = Tiny;
    coe = sxy / sqrt(tmp);
    if (coe > 1.)
	return 1.;
    if (coe < -1.)
	return -1.;
    return coe;
}

The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.