Question
This must please be written in no other language than the language ML. In the language ML write a file named p0.sml that contains a
This must please be written in no other language than the language ML.
In the language ML write a file named p0.sml that contains a function named epoly, which accepts as parameters a list of real values a0 through an, and a single real value x. The list contains the coefficients of a polynomial of the form a0 + a1x + a2x2 + + anxn, where the real x used is the x parameter passed to your function. Your implementation must accept the list of coefficients as the first parameter and the value of x as the second. Your function must return the value of the polynomial specified by the parameters passed to it. It must be recursive. Recursive functions must have at least three characteristics.
- A recursive function must call itself.
- A recursive function must have at least one parameter that changes with each successive call to the function.
- A recursive function must have a stopping condition.
Please add proper documentation to the code, describing what is done and why.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started