Average Error: 52.5 → 0.2
Time: 55.1s
Precision: 64
Internal Precision: 832
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
\[\frac{\frac{\left(c \cdot -4\right) \cdot a}{a \cdot 2}}{b + \sqrt{\frac{{\left(b \cdot b\right)}^{3} - {\left(4 \cdot \left(a \cdot c\right)\right)}^{3}}{\left(b \cdot b\right) \cdot \left(b \cdot b\right) + \left(\left(4 \cdot \left(a \cdot c\right)\right) \cdot \left(b \cdot b\right) + \left(4 \cdot \left(a \cdot c\right)\right) \cdot \left(4 \cdot \left(a \cdot c\right)\right)\right)}}}\]

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 52.5

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

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

    \[\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/52.5

    \[\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-/r*0.2

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

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

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

Runtime

Time bar (total: 55.1s)Debug logProfile

BaselineHerbieOracleSpan%
Regimes0.20.20.00.20%
herbie shell --seed 2018263 
(FPCore (a b c)
  :name "Quadratic roots, wide range"
  :pre (and (< 4.930380657631324e-32 a 2.028240960365167e+31) (< 4.930380657631324e-32 b 2.028240960365167e+31) (< 4.930380657631324e-32 c 2.028240960365167e+31))
  (/ (+ (- b) (sqrt (- (* b b) (* (* 4 a) c)))) (* 2 a)))