Average Error: 52.7 → 0.4
Time: 32.5s
Precision: 64
Internal Precision: 128
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
\[\frac{\frac{c}{\frac{-1}{2}}}{a} \cdot \frac{a}{b + \sqrt{b \cdot b - \left(a \cdot c\right) \cdot 4}}\]

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.7

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

    \[\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.7

    \[\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.7

    \[\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 distribute-lft-in0.4

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

    \[\leadsto \frac{\left(c \cdot -4\right) \cdot a}{\color{blue}{\left(2 \cdot a\right) \cdot \left(\sqrt{b \cdot b - \left(c \cdot a\right) \cdot 4} + b\right)}}\]
  11. Applied times-frac0.4

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

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

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

Runtime

Time bar (total: 32.5s)Debug logProfile

BaselineHerbieOracleSpan%
Regimes0.40.40.00.40%
herbie shell --seed 2018355 
(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)))