Extract method to perform safe point add (handling double and infinity result). Replace all instances of the extracted code.