5. Use a zip and a filter to define one more function polyUnconvert that receives the full coefficient list representation of a polynomial and returns a coefficient-index list representation of that polynomial. For example: polyUnconvert [0.0,3.0,0.0,2.0] should evaluate to either [(2.0,3), (3.0,1)] or [(3.0,1), (2.0,3)] at your discretion. We are now ready to manipulate polynomials. All the function below receive polynomial argu- ments in their coefficient-index list representation and return polynomial values using the same representation. However, they should work internally using the full coefficient list representation for polynomials. Therefore polyConvert should be called at the beginning and polyUnconvert at the end as applicable. For example the function polyAdd implemented for Question 7 below should start something like this: polyAdd px py = polyUnconvert (polyAdd' (polyConvert px) (polyConvert py)) where polyAdd' px py = your actual function here
5. Use a zip and a filter to define one more function polyUnconvert that receives the full coefficient list representation of a polynomial and returns a coefficient-index list representation of that polynomial. For example: polyUnconvert [0.0,3.0,0.0,2.0] should evaluate to either [(2.0,3), (3.0,1)] or [(3.0,1), (2.0,3)] at your discretion. We are now ready to manipulate polynomials. All the function below receive polynomial argu- ments in their coefficient-index list representation and return polynomial values using the same representation. However, they should work internally using the full coefficient list representation for polynomials. Therefore polyConvert should be called at the beginning and polyUnconvert at the end as applicable. For example the function polyAdd implemented for Question 7 below should start something like this: polyAdd px py = polyUnconvert (polyAdd' (polyConvert px) (polyConvert py)) where polyAdd' px py = your actual function here
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps