C141 Reasoning About Programs (for Joint Math/Computing Students)

taught by Michael Huth

  • this course is for JMC Students only, Computing Students need to take the course taught by Professor Drossopoulou
  • the PMT session sheets and all lecture notes can be found on CATE
  • solution to Exercise 4.2 in full detail
  • solution for computing dividend(x,y) in full detail
  • solution for computing euclid(x,y) in full detail
  • discovery of non-termination bug for critical code for Zune devices in full detail
  • Programming with "infinity" in Floyd's Algorithm (courtesy of Joseph Crowe): the IEEE 754-2008 Standard for Floating Point Arithmetic defines special values for positive and negative infinity, which behave as one might expect under arithmetic operations; see page 34, section 6.1 of that document. This standard is implemented in many languages, e.g. in class "Double" in Java, illustrated by this little test program.