I made this for my numerical analysis class:
http://demo.sagenb.org/home/pub/67/
At the bottom you see Sage's command to do this (look for
R.lagrange...). Scipy also has a lot of interpolation functionality:
http://docs.scipy.org/doc/scipy/reference/interpolate.html
Thanks,
Jason
sage: K = GF(32003)
sage: P.<x> = K[]
sage: P.lagrange_polynomial([(K.random_element(),K.random_element()) for _ in
range(10)])
25484*x^9 + 16230*x^8 + 21258*x^7 + 5369*x^6 + 5329*x^5 + 26390*x^4 +
18568*x^3 + 24278*x^2 + 26684*x + 4684
Cheers,
Martin
--
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
_www: http://martinralbrecht.wordpress.com/
_jab: martinr...@jabber.ccc.de