lib/factor/stepThrough.js
// Returns a list of details about each step.
Returns a list of details about each step.
Returns a list of details about each step .
function stepThrough(node, debug=false) {
  if (debug) {
    console.log('\n\nFactoring: ' + print.ascii(node, false, true));
  }
  if (checks.hasUnsupportedNodes(node)) {
    return [];
  }
  let nodeStatus;
  const steps = [];
  node = flattenOperands(node);
  node = removeUnnecessaryParens(node, true);
  if (checks.isQuadratic(node)) {
    nodeStatus = factorQuadratic(node);
    if (nodeStatus.hasChanged()) {
      steps.push(nodeStatus);
    }
  }
  return steps;
}
function stepThrough ( node , debug = false ) { if ( debug ) { console . log ( '\n\nFactoring: ' + print . ascii ( node , false , true ) ) ; } if ( checks . hasUnsupportedNodes ( node ) ) { return [ ] ; } let nodeStatus ; const steps = [ ] ; node = flattenOperands ( node ) ; node = removeUnnecessaryParens ( node , true ) ; if ( checks . isQuadratic ( node ) ) { nodeStatus = factorQuadratic ( node ) ; if ( nodeStatus . hasChanged ( ) ) { steps . push ( nodeStatus ) ; } } return steps ; }
Returns a list of details about each step.
Returns a list of details about each step .
// eslint-disable-next-line // Add factoring higher order polynomials...