external/blend2d/src/blend2d/blmath.cpp
// This routine calculates scalar quantities used to compute the next k
// polynomial and new estimates of the quadratic coefficients.
//
// type - integer variable set here indicating how the calculations are
//        normalized to avoid overflow.
This routine calculates scalar quantities used to compute the next k
polynomial and new estimates of the quadratic coefficients.

integer variable set here indicating how the calculations are
normalized to avoid overflow.
This routine calculates scalar quantities used to compute the next k polynomial and new estimates of the quadratic coefficients . integer variable set here indicating how the calculations are normalized to avoid overflow .
void BLJenkinsTraubSolver::calcsc(int* type) {
  quadsd(n - 1, &u, &v, k, qk, &c, &d);
  if (blAbs(c) > blAbs(k[n-1] * 100.0 * JT_ETA)) goto _10;
  if (blAbs(d) > blAbs(k[n-2] * 100.0 * JT_ETA)) goto _10;
  *type = 3;
  return;
_10:
  if (blAbs(d) < blAbs(c)) {
    *type = 1;
    e = a / c;
    f = d / c;
    g = u * e;
    h = v * b;
    a3 = a * e + b * (h / c + g);
    a1 = b - a * (d / c);
    a7 = a + g * d + h * f;
    return;
  }
  else {
    *type = 2;
    e = a / d;
    f = c / d;
    g = u * b;
    h = v * b;
    a3 = (a + g) * e + h * (b / d);
    a1 = b * f - a;
    a7 = (f + u) * a + h;
  }
}
void BLJenkinsTraubSolver :: calcsc ( int * type ) { quadsd ( n - 1 , & u , & v , k , qk , & c , & d ) ; if ( blAbs ( c ) > blAbs ( k [ n - 1 ] * 100.0 * JT_ETA ) ) goto _10 ; if ( blAbs ( d ) > blAbs ( k [ n - 2 ] * 100.0 * JT_ETA ) ) goto _10 ; * type = 3 ; return ; _10 : if ( blAbs ( d ) < blAbs ( c ) ) { * type = 1 ; e = a / c ; f = d / c ; g = u * e ; h = v * b ; a3 = a * e + b * ( h / c + g ) ; a1 = b - a * ( d / c ) ; a7 = a + g * d + h * f ; return ; } else { * type = 2 ; e = a / d ; f = c / d ; g = u * b ; h = v * b ; a3 = ( a + g ) * e + h * ( b / d ) ; a1 = b * f - a ; a7 = ( f + u ) * a + h ; } }
This routine calculates scalar quantities used to compute the next k
polynomial and new estimates of the quadratic coefficients.
This routine calculates scalar quantities used to compute the next k polynomial and new estimates of the quadratic coefficients .
// Synthetic division of k by the quadratic 1, u, v. // Type=3 indicates the quadratic is almost a factor of k. // Type=1 indicates that all formulas are divided by c. // Type=2 indicates that all formulas are divided by d.