Use Horner's rule.

/Jens Axel


2015-11-06 22:27 GMT+01:00 Dave Yrueta <[email protected]>:

> Hi All —
>
> Given a list of constants (a0, a1… an) and a list of x-values (x0,
> x1,….xn), I want to write a function in Racket that produces the function
> p(x) = a0 + a1(x - x0) + a2(x - x0)(x - x1) + a3(x - x0)(x - x1) (x - x2) +
> ….+ an(x - x0)(x - x1)…(x - xn), or the interpolating polynomial in Newton
> form.   My understanding of functions that produce functions is limited to
> what’s in HtDP, and this example (I think) goes beyond that.  Any tips or
> advice would be much appreciated!
>
> Cheers,
> Dave Yrueta
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
-- 
Jens Axel Søgaard

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to