to Exercise 4-5: Using Mathematical Functions; Solution to Exercise 4-6: Using Logical