Math Libraries (Ch. 20) — and Errors in the Text

Our authors have several errors in Chapter 20.

A reminder:  C follows the mathematician's preference and represents angles in radians, not degrees.  This is why back on 16 Jan. we developed the functions double deg_to_rad(double degrees) and double rad_to_deg(double radians).

double rad_to_deg(double radians)
   double degrees = radians * (45 / atan(1.0));  // Degrees per radian

   return degrees;;

double deg_to_rad(double degrees)
   double radians = degrees * (atan(1.0) / 45);  // Radians per degree
   return radians;
You will NOT be responsible for the material in Chapter 20.

Preview of the Second Half of CSCD-255

We will be spending the rest of the quarter on the following topics: