fix #224 float truncation overflow
Merge pull request #225 from loicrouchon/float-truncate-overflow

fix #224 float truncation overflow