work out poly
Need a help to work out the formula. I cant get my head around with this to work out. its polynomial with numerator and denominator. what is the formula for this. Thank you
FLOAT_TYPE num_coeff[] = {-2.42580348918581e2l, 4.43575581447635e2l, -8.6570608699616e2l, 7.34933695653457e2l, -7.02396810482965e1l};
FLOAT_TYPE den_coeff[] = {1.e0l, -8.87493143817912e-1l, 2.75291524634514e0l, -3.88521936154463e-1l, 9.08722079164108e-3l};
FLOAT_TYPE num_poly = num_coeff[sizeof(num_coeff) / sizeof(num_coeff[0]) - 1];
FLOAT_TYPE den_poly = den_coeff[sizeof(den_coeff) / sizeof(den_coeff[0]) - 1];
for (int i = (sizeof(num_coeff) / sizeof(num_coeff[0]) - 2); i >= 0; --i)
{
num_poly = num_poly * r + num_coeff[i];
}
for (int i = (sizeof(den_coeff) / sizeof(den_coeff[0]) - 2); i >= 0; --i)
{
den_poly = den_poly * r + den_coeff[i]; } return (num_poly / den_poly);
}
