PR 36105: continued fractions convergents were diverging because of infinite intermediate computations. To solve this, if infinite computations are detected, linear scaling is performed to lessen the magnitude of these computations.