Changed to avoid platform issues pertaining to the reporting of infinities.  Also changed the worst case calculation.