Skip to content
Snippets Groups Projects
Commit 8ca724ff authored by Kutalmış Berçin's avatar Kutalmış Berçin Committed by Andrew Heather
Browse files

ENH: improve stability in polynomialEqns

  - replaces floating-point equal comparisons in
    `linearEqn`, `quadraticEqn`, and `cubicEqn`,
  - ensures `quadraticEqn` and `cubicEqn` can return `complex` roots,
  - reorders if-branches in `quadraticEqn` and `cubicEqn` to avoid
    zero-equal comparison,
  - adds Kahan's cancellation-avoiding algorithm into `quadraticEqn` and
    `cubicEqn` for the numerically-sensitive discriminant computation,

  - adds/improves `polynomialEqns` tests:
    * adds Test-linearEqn.C
    * adds Test-quadraticEqn.C
    * improves Test-cubicEqn.C
parent 97bdd5bc
Branches
Tags
Showing
with 1181 additions and 166 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment