Overflow check on gradient before dot product taken (largegradcheck)