The problem set clearly states that you should use strictfp:
http://web.mit.edu/6.170/www/psets/ps6/ps6.html#MiscellaneousWe have designed our tests in such a way that we hope this is not necessary -- in other words, we are making an effort not to penalize those who forget to use strictfp. However, we cannot guarantee this, so we recommend the use of strictfp.