If you need more accuracy do (i.9) (p.~ pol) (,: i...@#)0 1 4x 0 1 4 9 16 25 36 49 64
R.E. Boss > -----Oorspronkelijk bericht----- > Van: [email protected] [mailto:programming- > [email protected]] Namens Raul Miller > Verzonden: vrijdag 11 juni 2010 4:30 > Aan: Programming forum > Onderwerp: Re: [Jprogramming] Polynomial extrapolation > > On Thu, Jun 10, 2010 at 4:06 PM, R.E. Boss <[email protected]> wrote: > > The first problem, extrapolating a polynomial (of degree k) through k > > points, can be done as follows. > > > > pol=: (+/ . *~[: %.@:|: (^"_ 0 (i...@#)))/ > ... > > This extrapolating is much more efficient. > > However, it is not necessarily as accurate: > > (i.9) (p.~ pol) (,: i...@#)0 1 4 > 1.27676e_15 1 4 9 16 25 36 49 64 > > (Using differences, the first element of the result would be zero.) > > -- > Raul > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
