Average Error: 52.5 → 0.2
Time: 1.6m
Precision: 64
Internal Precision: 832
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}\]
\[\frac{4}{2} \cdot \frac{-c}{b + \sqrt{\sqrt[3]{\left(b \cdot b - 4 \cdot \left(c \cdot a\right)\right) \cdot \left(\left(b \cdot b - 4 \cdot \left(c \cdot a\right)\right) \cdot \left(b \cdot b - 4 \cdot \left(c \cdot a\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(a \cdot 4\right) \cdot \left(-c\right)}}{\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 times-frac0.1

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

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

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

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

Runtime

Time bar (total: 1.6m)Debug logProfile

herbie shell --seed 2018225 
(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)))