Fix float to integer conversion

Now all testfloat's f2i and i2f tests passes