Problem with expand in lagrange interpolation



> This is a good point. However, it was my assumption that the naming of
> the routine was essentially accidental. The point is that the routine
> returns a global polynomial interpolatant, as opposed to the cubic
> splines or linear interpolation that the other routines in the file
> do.
> 

The function was written when a user asked for a Lagrange routine about
two years ago. That's the origin of the name and of the code. I recently
added the 'expand' call in order to get a shorter expression; maybe it
was a bad idea.

Writing a new (better than lagrange) interpolation_polynomial, as
Stavros suggested, makes sense to me. But in the meantime, I'll make two
minor changes in lagrange: a) transform the input to rationals, b)
remove expand, and c) modify documentation to warn users about floating
point evaluations with this polynomial.

Thanks a lot for your comments.

-- 
Mario Rodriguez Riotorto
www.biomates.net