Switched problem 3 to use doubles instead of longs for the same
reason