Fix float error (doctest failed on Python 2.6 under TravisCI)