Add casts to double to fix compilation on ARM
Merge pull request #1684 from manisandro/armbuild

Add casts to double to fix compilation on ARM