protected function

Catch numerical errors, and return -Inf