Avoid negative results when converting floating point to unsigned