Revert "Revert "Float to decimal error""

This reverts commit 97fa951df03adb96fb3500229931fbbc79312777.