Average Error: 28.6 → 0.3
Time: 26.4s
Precision: 64
Internal Precision: 576
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
\[\frac{c \cdot -4}{\left(b + \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}\right) \cdot 2}\]

Error

Bits error versus a

Bits error versus b

Bits error versus c

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 28.6

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
  2. Initial simplification28.6

    \[\leadsto \frac{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b}{2 \cdot a}\]
  3. Using strategy rm
  4. Applied flip--28.6

    \[\leadsto \frac{\color{blue}{\frac{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} \cdot \sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b \cdot b}{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} + b}}}{2 \cdot a}\]
  5. Applied associate-/l/28.6

    \[\leadsto \color{blue}{\frac{\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} \cdot \sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} - b \cdot b}{\left(2 \cdot a\right) \cdot \left(\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} + b\right)}}\]
  6. Simplified0.4

    \[\leadsto \frac{\color{blue}{\left(c \cdot -4\right) \cdot a}}{\left(2 \cdot a\right) \cdot \left(\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} + b\right)}\]
  7. Using strategy rm
  8. Applied associate-/l*0.3

    \[\leadsto \color{blue}{\frac{c \cdot -4}{\frac{\left(2 \cdot a\right) \cdot \left(\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} + b\right)}{a}}}\]
  9. Using strategy rm
  10. Applied *-un-lft-identity0.3

    \[\leadsto \frac{c \cdot -4}{\color{blue}{1 \cdot \frac{\left(2 \cdot a\right) \cdot \left(\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} + b\right)}{a}}}\]
  11. Applied associate-/r*0.3

    \[\leadsto \color{blue}{\frac{\frac{c \cdot -4}{1}}{\frac{\left(2 \cdot a\right) \cdot \left(\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} + b\right)}{a}}}\]
  12. Simplified0.3

    \[\leadsto \frac{\frac{c \cdot -4}{1}}{\color{blue}{\left(\sqrt{a \cdot \left(c \cdot -4\right) + b \cdot b} + b\right) \cdot 2}}\]
  13. Final simplification0.3

    \[\leadsto \frac{c \cdot -4}{\left(b + \sqrt{b \cdot b + a \cdot \left(c \cdot -4\right)}\right) \cdot 2}\]

Runtime

Time bar (total: 26.4s)Debug logProfile

BaselineHerbieOracleSpan%
Regimes0.30.30.00.30%
herbie shell --seed 2018296 
(FPCore (a b c)
  :name "Quadratic roots, narrow range"
  :pre (and (< 1.0536712127723509e-08 a 94906265.62425156) (< 1.0536712127723509e-08 b 94906265.62425156) (< 1.0536712127723509e-08 c 94906265.62425156))
  (/ (+ (- b) (sqrt (- (* b b) (* (* 4 a) c)))) (* 2 a)))