Fixed -fsanitize=float-cast-overflow problems.

BUG=v8:3773
LOG=y

Review URL: https://codereview.chromium.org/809293003

Cr-Commit-Position: refs/heads/master@{#25880}