conatus.expert.secant_root

conatus.expert.secant_root(hill, start, *, tol, max_iterations=50, step=0.0001 + 0.0001j, allow_unconverged=False)[source]

Secant on det M(μ)/|det M(start)| (log-scaled, no overflow) from an explicit start.

Returns a SecantRoot (mu, converged, residual = the scaled determinant at mu, iterations, reasons). Converged means the last secant step is below tol; otherwise ConvergenceError is raised, carrying the last iterate (err.result), unless allow_unconverged=True (the v0.1 tuple (μ, reasons) let secant_root(...)[0] be used as a root; unpacking it keeps working with a DeprecationWarning). The tolerance must stay above the round-off floor of det: it is the caller’s choice. max_iterations: declared default SECANT_MAX_ITERATIONS (a budget); maxit and seed are the deprecated former names of max_iterations and start.

Parameters:
  • hill (HillBlocks)

  • start (complex)

  • tol (float)

  • max_iterations (int)

  • step (complex)

  • allow_unconverged (bool)

Return type:

SecantRoot