CS 107 - Introduction to Scientific Computation Homework #4 |
1. Power Sum: Exercise 6.1. Name your function powersum
.
2. Rectangular/Polar Coordinate Conversion: Exercise 6.11.
Relative error is the
absolute error of the value approximation divided by the magnitude of the value.
Name your functions polarToRect
, rectToPolar
, and testPolarToRect
.
3. Quadratic Roots: Exercise 7.10. Extra Hint: There is a way to do
this without computing the entire quadratic formula. Name your function quadRootType
.
4. Maximizing by Case: Exercise 7.2. Call your function max4
.
Do not use Matlab's max function in your implementation.