without looking at athis in detail, I believe that you are computing
ff(i) as a rational number and then converting to float or bigfloat
which is not the same thing as starting with a float or a bigfloat
and doing the arithmetic that way.
In the first case the result should be subject to one conversion/rounding
at the very end.
In the second case the result will have some more roundings etc.
RJF