Average Error: 29.5 → 17.2
Time: 27.1s
Precision: 64
Internal Precision: 2368
$\frac{b - \sqrt{{b}^{2} - 4 \cdot c}}{2}$
$\begin{array}{l} \mathbf{if}\;b \le 5.020139441458604 \cdot 10^{-101}:\\ \;\;\;\;\frac{b - \sqrt{{b}^{2} - 4 \cdot c}}{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{4 \cdot c}{b + \sqrt{{b}^{2} - 4 \cdot c}}}{2}\\ \end{array}$

# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Split input into 2 regimes
2. ## if b < 5.020139441458604e-101

1. Initial program 17.3

$\frac{b - \sqrt{{b}^{2} - 4 \cdot c}}{2}$

## if 5.020139441458604e-101 < b

1. Initial program 48.7

$\frac{b - \sqrt{{b}^{2} - 4 \cdot c}}{2}$
2. Using strategy rm
3. Applied flip--48.7

$\leadsto \frac{\color{blue}{\frac{b \cdot b - \sqrt{{b}^{2} - 4 \cdot c} \cdot \sqrt{{b}^{2} - 4 \cdot c}}{b + \sqrt{{b}^{2} - 4 \cdot c}}}}{2}$
4. Applied simplify17.0

$\leadsto \frac{\frac{\color{blue}{4 \cdot c}}{b + \sqrt{{b}^{2} - 4 \cdot c}}}{2}$
3. Recombined 2 regimes into one program.

# Runtime

Time bar (total: 27.1s)Debug log

herbie shell --seed '#(2775764126 3555076145 3898259844 1891440260 2599947619 1948460636)'
(FPCore (b c)
:name "(b - sqrt(b^2 - 4c)) / 2"
(/ (- b (sqrt (- (pow b 2) (* 4 c)))) 2))