Quadratic roots, wide range

Percentage Accurate: 17.8% → 99.7%
Time: 34.2s
Alternatives: 7
Speedup: 29.0×

Specification

?
\[\left(\left(4.930380657631324 \cdot 10^{-32} < a \land a < 2.028240960365167 \cdot 10^{+31}\right) \land \left(4.930380657631324 \cdot 10^{-32} < b \land b < 2.028240960365167 \cdot 10^{+31}\right)\right) \land \left(4.930380657631324 \cdot 10^{-32} < c \land c < 2.028240960365167 \cdot 10^{+31}\right)\]
\[\begin{array}{l} \\ \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))
double code(double a, double b, double c) {
	return (-b + sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a);
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = (-b + sqrt(((b * b) - ((4.0d0 * a) * c)))) / (2.0d0 * a)
end function
public static double code(double a, double b, double c) {
	return (-b + Math.sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a);
}
def code(a, b, c):
	return (-b + math.sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a)
function code(a, b, c)
	return Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(4.0 * a) * c)))) / Float64(2.0 * a))
end
function tmp = code(a, b, c)
	tmp = (-b + sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a);
end
code[a_, b_, c_] := N[(N[((-b) + N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(4.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 7 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 17.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))
double code(double a, double b, double c) {
	return (-b + sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a);
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = (-b + sqrt(((b * b) - ((4.0d0 * a) * c)))) / (2.0d0 * a)
end function
public static double code(double a, double b, double c) {
	return (-b + Math.sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a);
}
def code(a, b, c):
	return (-b + math.sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a)
function code(a, b, c)
	return Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(4.0 * a) * c)))) / Float64(2.0 * a))
end
function tmp = code(a, b, c)
	tmp = (-b + sqrt(((b * b) - ((4.0 * a) * c)))) / (2.0 * a);
end
code[a_, b_, c_] := N[(N[((-b) + N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(4.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a}
\end{array}

Alternative 1: 99.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \frac{\left(a \cdot -2\right) \cdot \frac{c}{a}}{b + \sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (/ (* (* a -2.0) (/ c a)) (+ b (sqrt (* a (fma c -4.0 (/ (pow b 2.0) a)))))))
double code(double a, double b, double c) {
	return ((a * -2.0) * (c / a)) / (b + sqrt((a * fma(c, -4.0, (pow(b, 2.0) / a)))));
}
function code(a, b, c)
	return Float64(Float64(Float64(a * -2.0) * Float64(c / a)) / Float64(b + sqrt(Float64(a * fma(c, -4.0, Float64((b ^ 2.0) / a))))))
end
code[a_, b_, c_] := N[(N[(N[(a * -2.0), $MachinePrecision] * N[(c / a), $MachinePrecision]), $MachinePrecision] / N[(b + N[Sqrt[N[(a * N[(c * -4.0 + N[(N[Power[b, 2.0], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\left(a \cdot -2\right) \cdot \frac{c}{a}}{b + \sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}}
\end{array}
Derivation
  1. Initial program 20.0%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
  2. Step-by-step derivation
    1. *-commutative20.0%

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

      \[\leadsto \frac{\color{blue}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + \left(-b\right)}}{a \cdot 2} \]
    3. sqr-neg20.0%

      \[\leadsto \frac{\sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(4 \cdot a\right) \cdot c} + \left(-b\right)}{a \cdot 2} \]
    4. unsub-neg20.0%

      \[\leadsto \frac{\color{blue}{\sqrt{\left(-b\right) \cdot \left(-b\right) - \left(4 \cdot a\right) \cdot c} - b}}{a \cdot 2} \]
    5. sqr-neg20.0%

      \[\leadsto \frac{\sqrt{\color{blue}{b \cdot b} - \left(4 \cdot a\right) \cdot c} - b}{a \cdot 2} \]
    6. fma-neg20.1%

      \[\leadsto \frac{\sqrt{\color{blue}{\mathsf{fma}\left(b, b, -\left(4 \cdot a\right) \cdot c\right)}} - b}{a \cdot 2} \]
    7. distribute-lft-neg-in20.1%

      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(-4 \cdot a\right) \cdot c}\right)} - b}{a \cdot 2} \]
    8. *-commutative20.1%

      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{c \cdot \left(-4 \cdot a\right)}\right)} - b}{a \cdot 2} \]
    9. *-commutative20.1%

      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(-\color{blue}{a \cdot 4}\right)\right)} - b}{a \cdot 2} \]
    10. distribute-rgt-neg-in20.1%

      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \color{blue}{\left(a \cdot \left(-4\right)\right)}\right)} - b}{a \cdot 2} \]
    11. metadata-eval20.1%

      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot \color{blue}{-4}\right)\right)} - b}{a \cdot 2} \]
  3. Simplified20.1%

    \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)} - b}{a \cdot 2}} \]
  4. Add Preprocessing
  5. Taylor expanded in a around inf 20.1%

    \[\leadsto \frac{\sqrt{\color{blue}{a \cdot \left(-4 \cdot c + \frac{{b}^{2}}{a}\right)}} - b}{a \cdot 2} \]
  6. Step-by-step derivation
    1. flip--20.0%

      \[\leadsto \frac{\color{blue}{\frac{\sqrt{a \cdot \left(-4 \cdot c + \frac{{b}^{2}}{a}\right)} \cdot \sqrt{a \cdot \left(-4 \cdot c + \frac{{b}^{2}}{a}\right)} - b \cdot b}{\sqrt{a \cdot \left(-4 \cdot c + \frac{{b}^{2}}{a}\right)} + b}}}{a \cdot 2} \]
    2. add-sqr-sqrt20.5%

      \[\leadsto \frac{\frac{\color{blue}{a \cdot \left(-4 \cdot c + \frac{{b}^{2}}{a}\right)} - b \cdot b}{\sqrt{a \cdot \left(-4 \cdot c + \frac{{b}^{2}}{a}\right)} + b}}{a \cdot 2} \]
    3. *-commutative20.5%

      \[\leadsto \frac{\frac{a \cdot \left(\color{blue}{c \cdot -4} + \frac{{b}^{2}}{a}\right) - b \cdot b}{\sqrt{a \cdot \left(-4 \cdot c + \frac{{b}^{2}}{a}\right)} + b}}{a \cdot 2} \]
    4. fma-define20.5%

      \[\leadsto \frac{\frac{a \cdot \color{blue}{\mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)} - b \cdot b}{\sqrt{a \cdot \left(-4 \cdot c + \frac{{b}^{2}}{a}\right)} + b}}{a \cdot 2} \]
    5. unpow220.5%

      \[\leadsto \frac{\frac{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right) - \color{blue}{{b}^{2}}}{\sqrt{a \cdot \left(-4 \cdot c + \frac{{b}^{2}}{a}\right)} + b}}{a \cdot 2} \]
    6. *-commutative20.5%

      \[\leadsto \frac{\frac{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right) - {b}^{2}}{\sqrt{a \cdot \left(\color{blue}{c \cdot -4} + \frac{{b}^{2}}{a}\right)} + b}}{a \cdot 2} \]
    7. fma-define20.5%

      \[\leadsto \frac{\frac{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right) - {b}^{2}}{\sqrt{a \cdot \color{blue}{\mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}} + b}}{a \cdot 2} \]
  7. Applied egg-rr20.5%

    \[\leadsto \frac{\color{blue}{\frac{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right) - {b}^{2}}{\sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)} + b}}}{a \cdot 2} \]
  8. Taylor expanded in a around 0 99.4%

    \[\leadsto \frac{\frac{\color{blue}{-4 \cdot \left(a \cdot c\right)}}{\sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)} + b}}{a \cdot 2} \]
  9. Step-by-step derivation
    1. *-commutative99.4%

      \[\leadsto \frac{\frac{\color{blue}{\left(a \cdot c\right) \cdot -4}}{\sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)} + b}}{a \cdot 2} \]
    2. *-commutative99.4%

      \[\leadsto \frac{\frac{\color{blue}{\left(c \cdot a\right)} \cdot -4}{\sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)} + b}}{a \cdot 2} \]
  10. Simplified99.4%

    \[\leadsto \frac{\frac{\color{blue}{\left(c \cdot a\right) \cdot -4}}{\sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)} + b}}{a \cdot 2} \]
  11. Step-by-step derivation
    1. *-un-lft-identity99.4%

      \[\leadsto \color{blue}{1 \cdot \frac{\frac{\left(c \cdot a\right) \cdot -4}{\sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)} + b}}{a \cdot 2}} \]
    2. associate-/l/99.3%

      \[\leadsto 1 \cdot \color{blue}{\frac{\left(c \cdot a\right) \cdot -4}{\left(a \cdot 2\right) \cdot \left(\sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)} + b\right)}} \]
    3. associate-*l*99.3%

      \[\leadsto 1 \cdot \frac{\color{blue}{c \cdot \left(a \cdot -4\right)}}{\left(a \cdot 2\right) \cdot \left(\sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)} + b\right)} \]
    4. sqrt-prod99.2%

      \[\leadsto 1 \cdot \frac{c \cdot \left(a \cdot -4\right)}{\left(a \cdot 2\right) \cdot \left(\color{blue}{\sqrt{a} \cdot \sqrt{\mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}} + b\right)} \]
    5. fma-define99.3%

      \[\leadsto 1 \cdot \frac{c \cdot \left(a \cdot -4\right)}{\left(a \cdot 2\right) \cdot \color{blue}{\mathsf{fma}\left(\sqrt{a}, \sqrt{\mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}, b\right)}} \]
  12. Applied egg-rr99.3%

    \[\leadsto \color{blue}{1 \cdot \frac{c \cdot \left(a \cdot -4\right)}{\left(a \cdot 2\right) \cdot \mathsf{fma}\left(\sqrt{a}, \sqrt{\mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}, b\right)}} \]
  13. Step-by-step derivation
    1. *-lft-identity99.3%

      \[\leadsto \color{blue}{\frac{c \cdot \left(a \cdot -4\right)}{\left(a \cdot 2\right) \cdot \mathsf{fma}\left(\sqrt{a}, \sqrt{\mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}, b\right)}} \]
    2. associate-/r*99.7%

      \[\leadsto \color{blue}{\frac{\frac{c \cdot \left(a \cdot -4\right)}{a \cdot 2}}{\mathsf{fma}\left(\sqrt{a}, \sqrt{\mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}, b\right)}} \]
    3. associate-*r*99.7%

      \[\leadsto \frac{\frac{\color{blue}{\left(c \cdot a\right) \cdot -4}}{a \cdot 2}}{\mathsf{fma}\left(\sqrt{a}, \sqrt{\mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}, b\right)} \]
    4. *-commutative99.7%

      \[\leadsto \frac{\frac{\color{blue}{\left(a \cdot c\right)} \cdot -4}{a \cdot 2}}{\mathsf{fma}\left(\sqrt{a}, \sqrt{\mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}, b\right)} \]
    5. times-frac99.7%

      \[\leadsto \frac{\color{blue}{\frac{a \cdot c}{a} \cdot \frac{-4}{2}}}{\mathsf{fma}\left(\sqrt{a}, \sqrt{\mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}, b\right)} \]
    6. associate-*r/99.7%

      \[\leadsto \frac{\color{blue}{\left(a \cdot \frac{c}{a}\right)} \cdot \frac{-4}{2}}{\mathsf{fma}\left(\sqrt{a}, \sqrt{\mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}, b\right)} \]
    7. metadata-eval99.7%

      \[\leadsto \frac{\left(a \cdot \frac{c}{a}\right) \cdot \color{blue}{-2}}{\mathsf{fma}\left(\sqrt{a}, \sqrt{\mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}, b\right)} \]
  14. Simplified99.7%

    \[\leadsto \color{blue}{\frac{\left(a \cdot \frac{c}{a}\right) \cdot -2}{\mathsf{fma}\left(\sqrt{a}, \sqrt{\mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}, b\right)}} \]
  15. Step-by-step derivation
    1. associate-/l*99.5%

      \[\leadsto \color{blue}{\left(a \cdot \frac{c}{a}\right) \cdot \frac{-2}{\mathsf{fma}\left(\sqrt{a}, \sqrt{\mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}, b\right)}} \]
    2. fma-undefine99.4%

      \[\leadsto \left(a \cdot \frac{c}{a}\right) \cdot \frac{-2}{\color{blue}{\sqrt{a} \cdot \sqrt{\mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)} + b}} \]
    3. sqrt-prod99.5%

      \[\leadsto \left(a \cdot \frac{c}{a}\right) \cdot \frac{-2}{\color{blue}{\sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}} + b} \]
  16. Applied egg-rr99.5%

    \[\leadsto \color{blue}{\left(a \cdot \frac{c}{a}\right) \cdot \frac{-2}{\sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)} + b}} \]
  17. Step-by-step derivation
    1. associate-*r/99.7%

      \[\leadsto \color{blue}{\frac{\left(a \cdot \frac{c}{a}\right) \cdot -2}{\sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)} + b}} \]
    2. associate-*r*99.7%

      \[\leadsto \frac{\color{blue}{a \cdot \left(\frac{c}{a} \cdot -2\right)}}{\sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)} + b} \]
    3. *-commutative99.7%

      \[\leadsto \frac{a \cdot \color{blue}{\left(-2 \cdot \frac{c}{a}\right)}}{\sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)} + b} \]
    4. associate-*r*99.7%

      \[\leadsto \frac{\color{blue}{\left(a \cdot -2\right) \cdot \frac{c}{a}}}{\sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)} + b} \]
    5. +-commutative99.7%

      \[\leadsto \frac{\left(a \cdot -2\right) \cdot \frac{c}{a}}{\color{blue}{b + \sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}}} \]
  18. Simplified99.7%

    \[\leadsto \color{blue}{\frac{\left(a \cdot -2\right) \cdot \frac{c}{a}}{b + \sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}}} \]
  19. Add Preprocessing

Alternative 2: 99.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \left(a \cdot \frac{c}{a}\right) \cdot \frac{-2}{b + \sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (* (* a (/ c a)) (/ -2.0 (+ b (sqrt (* a (fma c -4.0 (/ (pow b 2.0) a))))))))
double code(double a, double b, double c) {
	return (a * (c / a)) * (-2.0 / (b + sqrt((a * fma(c, -4.0, (pow(b, 2.0) / a))))));
}
function code(a, b, c)
	return Float64(Float64(a * Float64(c / a)) * Float64(-2.0 / Float64(b + sqrt(Float64(a * fma(c, -4.0, Float64((b ^ 2.0) / a)))))))
end
code[a_, b_, c_] := N[(N[(a * N[(c / a), $MachinePrecision]), $MachinePrecision] * N[(-2.0 / N[(b + N[Sqrt[N[(a * N[(c * -4.0 + N[(N[Power[b, 2.0], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(a \cdot \frac{c}{a}\right) \cdot \frac{-2}{b + \sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}}
\end{array}
Derivation
  1. Initial program 20.0%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
  2. Step-by-step derivation
    1. *-commutative20.0%

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

      \[\leadsto \frac{\color{blue}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + \left(-b\right)}}{a \cdot 2} \]
    3. sqr-neg20.0%

      \[\leadsto \frac{\sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(4 \cdot a\right) \cdot c} + \left(-b\right)}{a \cdot 2} \]
    4. unsub-neg20.0%

      \[\leadsto \frac{\color{blue}{\sqrt{\left(-b\right) \cdot \left(-b\right) - \left(4 \cdot a\right) \cdot c} - b}}{a \cdot 2} \]
    5. sqr-neg20.0%

      \[\leadsto \frac{\sqrt{\color{blue}{b \cdot b} - \left(4 \cdot a\right) \cdot c} - b}{a \cdot 2} \]
    6. fma-neg20.1%

      \[\leadsto \frac{\sqrt{\color{blue}{\mathsf{fma}\left(b, b, -\left(4 \cdot a\right) \cdot c\right)}} - b}{a \cdot 2} \]
    7. distribute-lft-neg-in20.1%

      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(-4 \cdot a\right) \cdot c}\right)} - b}{a \cdot 2} \]
    8. *-commutative20.1%

      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{c \cdot \left(-4 \cdot a\right)}\right)} - b}{a \cdot 2} \]
    9. *-commutative20.1%

      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(-\color{blue}{a \cdot 4}\right)\right)} - b}{a \cdot 2} \]
    10. distribute-rgt-neg-in20.1%

      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \color{blue}{\left(a \cdot \left(-4\right)\right)}\right)} - b}{a \cdot 2} \]
    11. metadata-eval20.1%

      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot \color{blue}{-4}\right)\right)} - b}{a \cdot 2} \]
  3. Simplified20.1%

    \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)} - b}{a \cdot 2}} \]
  4. Add Preprocessing
  5. Taylor expanded in a around inf 20.1%

    \[\leadsto \frac{\sqrt{\color{blue}{a \cdot \left(-4 \cdot c + \frac{{b}^{2}}{a}\right)}} - b}{a \cdot 2} \]
  6. Step-by-step derivation
    1. flip--20.0%

      \[\leadsto \frac{\color{blue}{\frac{\sqrt{a \cdot \left(-4 \cdot c + \frac{{b}^{2}}{a}\right)} \cdot \sqrt{a \cdot \left(-4 \cdot c + \frac{{b}^{2}}{a}\right)} - b \cdot b}{\sqrt{a \cdot \left(-4 \cdot c + \frac{{b}^{2}}{a}\right)} + b}}}{a \cdot 2} \]
    2. add-sqr-sqrt20.5%

      \[\leadsto \frac{\frac{\color{blue}{a \cdot \left(-4 \cdot c + \frac{{b}^{2}}{a}\right)} - b \cdot b}{\sqrt{a \cdot \left(-4 \cdot c + \frac{{b}^{2}}{a}\right)} + b}}{a \cdot 2} \]
    3. *-commutative20.5%

      \[\leadsto \frac{\frac{a \cdot \left(\color{blue}{c \cdot -4} + \frac{{b}^{2}}{a}\right) - b \cdot b}{\sqrt{a \cdot \left(-4 \cdot c + \frac{{b}^{2}}{a}\right)} + b}}{a \cdot 2} \]
    4. fma-define20.5%

      \[\leadsto \frac{\frac{a \cdot \color{blue}{\mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)} - b \cdot b}{\sqrt{a \cdot \left(-4 \cdot c + \frac{{b}^{2}}{a}\right)} + b}}{a \cdot 2} \]
    5. unpow220.5%

      \[\leadsto \frac{\frac{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right) - \color{blue}{{b}^{2}}}{\sqrt{a \cdot \left(-4 \cdot c + \frac{{b}^{2}}{a}\right)} + b}}{a \cdot 2} \]
    6. *-commutative20.5%

      \[\leadsto \frac{\frac{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right) - {b}^{2}}{\sqrt{a \cdot \left(\color{blue}{c \cdot -4} + \frac{{b}^{2}}{a}\right)} + b}}{a \cdot 2} \]
    7. fma-define20.5%

      \[\leadsto \frac{\frac{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right) - {b}^{2}}{\sqrt{a \cdot \color{blue}{\mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}} + b}}{a \cdot 2} \]
  7. Applied egg-rr20.5%

    \[\leadsto \frac{\color{blue}{\frac{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right) - {b}^{2}}{\sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)} + b}}}{a \cdot 2} \]
  8. Taylor expanded in a around 0 99.4%

    \[\leadsto \frac{\frac{\color{blue}{-4 \cdot \left(a \cdot c\right)}}{\sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)} + b}}{a \cdot 2} \]
  9. Step-by-step derivation
    1. *-commutative99.4%

      \[\leadsto \frac{\frac{\color{blue}{\left(a \cdot c\right) \cdot -4}}{\sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)} + b}}{a \cdot 2} \]
    2. *-commutative99.4%

      \[\leadsto \frac{\frac{\color{blue}{\left(c \cdot a\right)} \cdot -4}{\sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)} + b}}{a \cdot 2} \]
  10. Simplified99.4%

    \[\leadsto \frac{\frac{\color{blue}{\left(c \cdot a\right) \cdot -4}}{\sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)} + b}}{a \cdot 2} \]
  11. Step-by-step derivation
    1. *-un-lft-identity99.4%

      \[\leadsto \color{blue}{1 \cdot \frac{\frac{\left(c \cdot a\right) \cdot -4}{\sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)} + b}}{a \cdot 2}} \]
    2. associate-/l/99.3%

      \[\leadsto 1 \cdot \color{blue}{\frac{\left(c \cdot a\right) \cdot -4}{\left(a \cdot 2\right) \cdot \left(\sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)} + b\right)}} \]
    3. associate-*l*99.3%

      \[\leadsto 1 \cdot \frac{\color{blue}{c \cdot \left(a \cdot -4\right)}}{\left(a \cdot 2\right) \cdot \left(\sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)} + b\right)} \]
    4. sqrt-prod99.2%

      \[\leadsto 1 \cdot \frac{c \cdot \left(a \cdot -4\right)}{\left(a \cdot 2\right) \cdot \left(\color{blue}{\sqrt{a} \cdot \sqrt{\mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}} + b\right)} \]
    5. fma-define99.3%

      \[\leadsto 1 \cdot \frac{c \cdot \left(a \cdot -4\right)}{\left(a \cdot 2\right) \cdot \color{blue}{\mathsf{fma}\left(\sqrt{a}, \sqrt{\mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}, b\right)}} \]
  12. Applied egg-rr99.3%

    \[\leadsto \color{blue}{1 \cdot \frac{c \cdot \left(a \cdot -4\right)}{\left(a \cdot 2\right) \cdot \mathsf{fma}\left(\sqrt{a}, \sqrt{\mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}, b\right)}} \]
  13. Step-by-step derivation
    1. *-lft-identity99.3%

      \[\leadsto \color{blue}{\frac{c \cdot \left(a \cdot -4\right)}{\left(a \cdot 2\right) \cdot \mathsf{fma}\left(\sqrt{a}, \sqrt{\mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}, b\right)}} \]
    2. associate-/r*99.7%

      \[\leadsto \color{blue}{\frac{\frac{c \cdot \left(a \cdot -4\right)}{a \cdot 2}}{\mathsf{fma}\left(\sqrt{a}, \sqrt{\mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}, b\right)}} \]
    3. associate-*r*99.7%

      \[\leadsto \frac{\frac{\color{blue}{\left(c \cdot a\right) \cdot -4}}{a \cdot 2}}{\mathsf{fma}\left(\sqrt{a}, \sqrt{\mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}, b\right)} \]
    4. *-commutative99.7%

      \[\leadsto \frac{\frac{\color{blue}{\left(a \cdot c\right)} \cdot -4}{a \cdot 2}}{\mathsf{fma}\left(\sqrt{a}, \sqrt{\mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}, b\right)} \]
    5. times-frac99.7%

      \[\leadsto \frac{\color{blue}{\frac{a \cdot c}{a} \cdot \frac{-4}{2}}}{\mathsf{fma}\left(\sqrt{a}, \sqrt{\mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}, b\right)} \]
    6. associate-*r/99.7%

      \[\leadsto \frac{\color{blue}{\left(a \cdot \frac{c}{a}\right)} \cdot \frac{-4}{2}}{\mathsf{fma}\left(\sqrt{a}, \sqrt{\mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}, b\right)} \]
    7. metadata-eval99.7%

      \[\leadsto \frac{\left(a \cdot \frac{c}{a}\right) \cdot \color{blue}{-2}}{\mathsf{fma}\left(\sqrt{a}, \sqrt{\mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}, b\right)} \]
  14. Simplified99.7%

    \[\leadsto \color{blue}{\frac{\left(a \cdot \frac{c}{a}\right) \cdot -2}{\mathsf{fma}\left(\sqrt{a}, \sqrt{\mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}, b\right)}} \]
  15. Step-by-step derivation
    1. associate-/l*99.5%

      \[\leadsto \color{blue}{\left(a \cdot \frac{c}{a}\right) \cdot \frac{-2}{\mathsf{fma}\left(\sqrt{a}, \sqrt{\mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}, b\right)}} \]
    2. fma-undefine99.4%

      \[\leadsto \left(a \cdot \frac{c}{a}\right) \cdot \frac{-2}{\color{blue}{\sqrt{a} \cdot \sqrt{\mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)} + b}} \]
    3. sqrt-prod99.5%

      \[\leadsto \left(a \cdot \frac{c}{a}\right) \cdot \frac{-2}{\color{blue}{\sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}} + b} \]
  16. Applied egg-rr99.5%

    \[\leadsto \color{blue}{\left(a \cdot \frac{c}{a}\right) \cdot \frac{-2}{\sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)} + b}} \]
  17. Final simplification99.5%

    \[\leadsto \left(a \cdot \frac{c}{a}\right) \cdot \frac{-2}{b + \sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}} \]
  18. Add Preprocessing

Alternative 3: 99.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := -4 \cdot \left(a \cdot c\right)\\ \frac{\frac{t\_0}{b + \sqrt{{b}^{2} + t\_0}}}{a \cdot 2} \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (* -4.0 (* a c))))
   (/ (/ t_0 (+ b (sqrt (+ (pow b 2.0) t_0)))) (* a 2.0))))
double code(double a, double b, double c) {
	double t_0 = -4.0 * (a * c);
	return (t_0 / (b + sqrt((pow(b, 2.0) + t_0)))) / (a * 2.0);
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: t_0
    t_0 = (-4.0d0) * (a * c)
    code = (t_0 / (b + sqrt(((b ** 2.0d0) + t_0)))) / (a * 2.0d0)
end function
public static double code(double a, double b, double c) {
	double t_0 = -4.0 * (a * c);
	return (t_0 / (b + Math.sqrt((Math.pow(b, 2.0) + t_0)))) / (a * 2.0);
}
def code(a, b, c):
	t_0 = -4.0 * (a * c)
	return (t_0 / (b + math.sqrt((math.pow(b, 2.0) + t_0)))) / (a * 2.0)
function code(a, b, c)
	t_0 = Float64(-4.0 * Float64(a * c))
	return Float64(Float64(t_0 / Float64(b + sqrt(Float64((b ^ 2.0) + t_0)))) / Float64(a * 2.0))
end
function tmp = code(a, b, c)
	t_0 = -4.0 * (a * c);
	tmp = (t_0 / (b + sqrt(((b ^ 2.0) + t_0)))) / (a * 2.0);
end
code[a_, b_, c_] := Block[{t$95$0 = N[(-4.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]}, N[(N[(t$95$0 / N[(b + N[Sqrt[N[(N[Power[b, 2.0], $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := -4 \cdot \left(a \cdot c\right)\\
\frac{\frac{t\_0}{b + \sqrt{{b}^{2} + t\_0}}}{a \cdot 2}
\end{array}
\end{array}
Derivation
  1. Initial program 20.0%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
  2. Step-by-step derivation
    1. *-commutative20.0%

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

      \[\leadsto \frac{\color{blue}{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} + \left(-b\right)}}{a \cdot 2} \]
    3. sqr-neg20.0%

      \[\leadsto \frac{\sqrt{\color{blue}{\left(-b\right) \cdot \left(-b\right)} - \left(4 \cdot a\right) \cdot c} + \left(-b\right)}{a \cdot 2} \]
    4. unsub-neg20.0%

      \[\leadsto \frac{\color{blue}{\sqrt{\left(-b\right) \cdot \left(-b\right) - \left(4 \cdot a\right) \cdot c} - b}}{a \cdot 2} \]
    5. sqr-neg20.0%

      \[\leadsto \frac{\sqrt{\color{blue}{b \cdot b} - \left(4 \cdot a\right) \cdot c} - b}{a \cdot 2} \]
    6. fma-neg20.1%

      \[\leadsto \frac{\sqrt{\color{blue}{\mathsf{fma}\left(b, b, -\left(4 \cdot a\right) \cdot c\right)}} - b}{a \cdot 2} \]
    7. distribute-lft-neg-in20.1%

      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(-4 \cdot a\right) \cdot c}\right)} - b}{a \cdot 2} \]
    8. *-commutative20.1%

      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{c \cdot \left(-4 \cdot a\right)}\right)} - b}{a \cdot 2} \]
    9. *-commutative20.1%

      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(-\color{blue}{a \cdot 4}\right)\right)} - b}{a \cdot 2} \]
    10. distribute-rgt-neg-in20.1%

      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \color{blue}{\left(a \cdot \left(-4\right)\right)}\right)} - b}{a \cdot 2} \]
    11. metadata-eval20.1%

      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot \color{blue}{-4}\right)\right)} - b}{a \cdot 2} \]
  3. Simplified20.1%

    \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(b, b, c \cdot \left(a \cdot -4\right)\right)} - b}{a \cdot 2}} \]
  4. Add Preprocessing
  5. Taylor expanded in a around inf 20.1%

    \[\leadsto \frac{\sqrt{\color{blue}{a \cdot \left(-4 \cdot c + \frac{{b}^{2}}{a}\right)}} - b}{a \cdot 2} \]
  6. Step-by-step derivation
    1. flip--20.0%

      \[\leadsto \frac{\color{blue}{\frac{\sqrt{a \cdot \left(-4 \cdot c + \frac{{b}^{2}}{a}\right)} \cdot \sqrt{a \cdot \left(-4 \cdot c + \frac{{b}^{2}}{a}\right)} - b \cdot b}{\sqrt{a \cdot \left(-4 \cdot c + \frac{{b}^{2}}{a}\right)} + b}}}{a \cdot 2} \]
    2. add-sqr-sqrt20.5%

      \[\leadsto \frac{\frac{\color{blue}{a \cdot \left(-4 \cdot c + \frac{{b}^{2}}{a}\right)} - b \cdot b}{\sqrt{a \cdot \left(-4 \cdot c + \frac{{b}^{2}}{a}\right)} + b}}{a \cdot 2} \]
    3. *-commutative20.5%

      \[\leadsto \frac{\frac{a \cdot \left(\color{blue}{c \cdot -4} + \frac{{b}^{2}}{a}\right) - b \cdot b}{\sqrt{a \cdot \left(-4 \cdot c + \frac{{b}^{2}}{a}\right)} + b}}{a \cdot 2} \]
    4. fma-define20.5%

      \[\leadsto \frac{\frac{a \cdot \color{blue}{\mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)} - b \cdot b}{\sqrt{a \cdot \left(-4 \cdot c + \frac{{b}^{2}}{a}\right)} + b}}{a \cdot 2} \]
    5. unpow220.5%

      \[\leadsto \frac{\frac{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right) - \color{blue}{{b}^{2}}}{\sqrt{a \cdot \left(-4 \cdot c + \frac{{b}^{2}}{a}\right)} + b}}{a \cdot 2} \]
    6. *-commutative20.5%

      \[\leadsto \frac{\frac{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right) - {b}^{2}}{\sqrt{a \cdot \left(\color{blue}{c \cdot -4} + \frac{{b}^{2}}{a}\right)} + b}}{a \cdot 2} \]
    7. fma-define20.5%

      \[\leadsto \frac{\frac{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right) - {b}^{2}}{\sqrt{a \cdot \color{blue}{\mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)}} + b}}{a \cdot 2} \]
  7. Applied egg-rr20.5%

    \[\leadsto \frac{\color{blue}{\frac{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right) - {b}^{2}}{\sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)} + b}}}{a \cdot 2} \]
  8. Taylor expanded in a around 0 99.4%

    \[\leadsto \frac{\frac{\color{blue}{-4 \cdot \left(a \cdot c\right)}}{\sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)} + b}}{a \cdot 2} \]
  9. Step-by-step derivation
    1. *-commutative99.4%

      \[\leadsto \frac{\frac{\color{blue}{\left(a \cdot c\right) \cdot -4}}{\sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)} + b}}{a \cdot 2} \]
    2. *-commutative99.4%

      \[\leadsto \frac{\frac{\color{blue}{\left(c \cdot a\right)} \cdot -4}{\sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)} + b}}{a \cdot 2} \]
  10. Simplified99.4%

    \[\leadsto \frac{\frac{\color{blue}{\left(c \cdot a\right) \cdot -4}}{\sqrt{a \cdot \mathsf{fma}\left(c, -4, \frac{{b}^{2}}{a}\right)} + b}}{a \cdot 2} \]
  11. Taylor expanded in a around 0 99.4%

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

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

Alternative 4: 95.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \frac{c \cdot \left(-\mathsf{fma}\left(a, c \cdot {b}^{-2}, 1\right)\right)}{b} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (/ (* c (- (fma a (* c (pow b -2.0)) 1.0))) b))
double code(double a, double b, double c) {
	return (c * -fma(a, (c * pow(b, -2.0)), 1.0)) / b;
}
function code(a, b, c)
	return Float64(Float64(c * Float64(-fma(a, Float64(c * (b ^ -2.0)), 1.0))) / b)
end
code[a_, b_, c_] := N[(N[(c * (-N[(a * N[(c * N[Power[b, -2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision])), $MachinePrecision] / b), $MachinePrecision]
\begin{array}{l}

\\
\frac{c \cdot \left(-\mathsf{fma}\left(a, c \cdot {b}^{-2}, 1\right)\right)}{b}
\end{array}
Derivation
  1. Initial program 20.0%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
  2. Step-by-step derivation
    1. *-commutative20.0%

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

    \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
  4. Add Preprocessing
  5. Taylor expanded in c around 0 92.8%

    \[\leadsto \color{blue}{c \cdot \left(-1 \cdot \frac{a \cdot c}{{b}^{3}} - \frac{1}{b}\right)} \]
  6. Step-by-step derivation
    1. associate-*r/92.8%

      \[\leadsto c \cdot \left(\color{blue}{\frac{-1 \cdot \left(a \cdot c\right)}{{b}^{3}}} - \frac{1}{b}\right) \]
    2. neg-mul-192.8%

      \[\leadsto c \cdot \left(\frac{\color{blue}{-a \cdot c}}{{b}^{3}} - \frac{1}{b}\right) \]
    3. distribute-rgt-neg-in92.8%

      \[\leadsto c \cdot \left(\frac{\color{blue}{a \cdot \left(-c\right)}}{{b}^{3}} - \frac{1}{b}\right) \]
  7. Simplified92.8%

    \[\leadsto \color{blue}{c \cdot \left(\frac{a \cdot \left(-c\right)}{{b}^{3}} - \frac{1}{b}\right)} \]
  8. Step-by-step derivation
    1. frac-sub92.7%

      \[\leadsto c \cdot \color{blue}{\frac{\left(a \cdot \left(-c\right)\right) \cdot b - {b}^{3} \cdot 1}{{b}^{3} \cdot b}} \]
    2. distribute-rgt-neg-out92.7%

      \[\leadsto c \cdot \frac{\color{blue}{\left(-a \cdot c\right)} \cdot b - {b}^{3} \cdot 1}{{b}^{3} \cdot b} \]
    3. pow-plus92.6%

      \[\leadsto c \cdot \frac{\left(-a \cdot c\right) \cdot b - {b}^{3} \cdot 1}{\color{blue}{{b}^{\left(3 + 1\right)}}} \]
    4. metadata-eval92.6%

      \[\leadsto c \cdot \frac{\left(-a \cdot c\right) \cdot b - {b}^{3} \cdot 1}{{b}^{\color{blue}{4}}} \]
  9. Applied egg-rr92.6%

    \[\leadsto c \cdot \color{blue}{\frac{\left(-a \cdot c\right) \cdot b - {b}^{3} \cdot 1}{{b}^{4}}} \]
  10. Step-by-step derivation
    1. *-commutative92.6%

      \[\leadsto c \cdot \frac{\color{blue}{b \cdot \left(-a \cdot c\right)} - {b}^{3} \cdot 1}{{b}^{4}} \]
    2. distribute-rgt-neg-in92.6%

      \[\leadsto c \cdot \frac{b \cdot \color{blue}{\left(a \cdot \left(-c\right)\right)} - {b}^{3} \cdot 1}{{b}^{4}} \]
    3. *-rgt-identity92.6%

      \[\leadsto c \cdot \frac{b \cdot \left(a \cdot \left(-c\right)\right) - \color{blue}{{b}^{3}}}{{b}^{4}} \]
  11. Simplified92.6%

    \[\leadsto c \cdot \color{blue}{\frac{b \cdot \left(a \cdot \left(-c\right)\right) - {b}^{3}}{{b}^{4}}} \]
  12. Taylor expanded in b around -inf 92.8%

    \[\leadsto c \cdot \color{blue}{\left(-1 \cdot \frac{1 + \frac{a \cdot c}{{b}^{2}}}{b}\right)} \]
  13. Step-by-step derivation
    1. associate-*r/92.8%

      \[\leadsto c \cdot \color{blue}{\frac{-1 \cdot \left(1 + \frac{a \cdot c}{{b}^{2}}\right)}{b}} \]
    2. mul-1-neg92.8%

      \[\leadsto c \cdot \frac{\color{blue}{-\left(1 + \frac{a \cdot c}{{b}^{2}}\right)}}{b} \]
    3. +-commutative92.8%

      \[\leadsto c \cdot \frac{-\color{blue}{\left(\frac{a \cdot c}{{b}^{2}} + 1\right)}}{b} \]
    4. associate-/l*92.8%

      \[\leadsto c \cdot \frac{-\left(\color{blue}{a \cdot \frac{c}{{b}^{2}}} + 1\right)}{b} \]
  14. Simplified92.8%

    \[\leadsto c \cdot \color{blue}{\frac{-\left(a \cdot \frac{c}{{b}^{2}} + 1\right)}{b}} \]
  15. Step-by-step derivation
    1. associate-*r/93.1%

      \[\leadsto \color{blue}{\frac{c \cdot \left(-\left(a \cdot \frac{c}{{b}^{2}} + 1\right)\right)}{b}} \]
    2. fma-define93.1%

      \[\leadsto \frac{c \cdot \left(-\color{blue}{\mathsf{fma}\left(a, \frac{c}{{b}^{2}}, 1\right)}\right)}{b} \]
    3. div-inv93.1%

      \[\leadsto \frac{c \cdot \left(-\mathsf{fma}\left(a, \color{blue}{c \cdot \frac{1}{{b}^{2}}}, 1\right)\right)}{b} \]
    4. pow-flip93.1%

      \[\leadsto \frac{c \cdot \left(-\mathsf{fma}\left(a, c \cdot \color{blue}{{b}^{\left(-2\right)}}, 1\right)\right)}{b} \]
    5. metadata-eval93.1%

      \[\leadsto \frac{c \cdot \left(-\mathsf{fma}\left(a, c \cdot {b}^{\color{blue}{-2}}, 1\right)\right)}{b} \]
  16. Applied egg-rr93.1%

    \[\leadsto \color{blue}{\frac{c \cdot \left(-\mathsf{fma}\left(a, c \cdot {b}^{-2}, 1\right)\right)}{b}} \]
  17. Add Preprocessing

Alternative 5: 95.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\left(-c\right) - a \cdot {\left(\frac{c}{-b}\right)}^{2}}{b} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (/ (- (- c) (* a (pow (/ c (- b)) 2.0))) b))
double code(double a, double b, double c) {
	return (-c - (a * pow((c / -b), 2.0))) / b;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = (-c - (a * ((c / -b) ** 2.0d0))) / b
end function
public static double code(double a, double b, double c) {
	return (-c - (a * Math.pow((c / -b), 2.0))) / b;
}
def code(a, b, c):
	return (-c - (a * math.pow((c / -b), 2.0))) / b
function code(a, b, c)
	return Float64(Float64(Float64(-c) - Float64(a * (Float64(c / Float64(-b)) ^ 2.0))) / b)
end
function tmp = code(a, b, c)
	tmp = (-c - (a * ((c / -b) ^ 2.0))) / b;
end
code[a_, b_, c_] := N[(N[((-c) - N[(a * N[Power[N[(c / (-b)), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]
\begin{array}{l}

\\
\frac{\left(-c\right) - a \cdot {\left(\frac{c}{-b}\right)}^{2}}{b}
\end{array}
Derivation
  1. Initial program 20.0%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
  2. Step-by-step derivation
    1. *-commutative20.0%

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

    \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
  4. Add Preprocessing
  5. Taylor expanded in c around 0 92.8%

    \[\leadsto \color{blue}{c \cdot \left(-1 \cdot \frac{a \cdot c}{{b}^{3}} - \frac{1}{b}\right)} \]
  6. Step-by-step derivation
    1. associate-*r/92.8%

      \[\leadsto c \cdot \left(\color{blue}{\frac{-1 \cdot \left(a \cdot c\right)}{{b}^{3}}} - \frac{1}{b}\right) \]
    2. neg-mul-192.8%

      \[\leadsto c \cdot \left(\frac{\color{blue}{-a \cdot c}}{{b}^{3}} - \frac{1}{b}\right) \]
    3. distribute-rgt-neg-in92.8%

      \[\leadsto c \cdot \left(\frac{\color{blue}{a \cdot \left(-c\right)}}{{b}^{3}} - \frac{1}{b}\right) \]
  7. Simplified92.8%

    \[\leadsto \color{blue}{c \cdot \left(\frac{a \cdot \left(-c\right)}{{b}^{3}} - \frac{1}{b}\right)} \]
  8. Step-by-step derivation
    1. frac-sub92.7%

      \[\leadsto c \cdot \color{blue}{\frac{\left(a \cdot \left(-c\right)\right) \cdot b - {b}^{3} \cdot 1}{{b}^{3} \cdot b}} \]
    2. distribute-rgt-neg-out92.7%

      \[\leadsto c \cdot \frac{\color{blue}{\left(-a \cdot c\right)} \cdot b - {b}^{3} \cdot 1}{{b}^{3} \cdot b} \]
    3. pow-plus92.6%

      \[\leadsto c \cdot \frac{\left(-a \cdot c\right) \cdot b - {b}^{3} \cdot 1}{\color{blue}{{b}^{\left(3 + 1\right)}}} \]
    4. metadata-eval92.6%

      \[\leadsto c \cdot \frac{\left(-a \cdot c\right) \cdot b - {b}^{3} \cdot 1}{{b}^{\color{blue}{4}}} \]
  9. Applied egg-rr92.6%

    \[\leadsto c \cdot \color{blue}{\frac{\left(-a \cdot c\right) \cdot b - {b}^{3} \cdot 1}{{b}^{4}}} \]
  10. Step-by-step derivation
    1. *-commutative92.6%

      \[\leadsto c \cdot \frac{\color{blue}{b \cdot \left(-a \cdot c\right)} - {b}^{3} \cdot 1}{{b}^{4}} \]
    2. distribute-rgt-neg-in92.6%

      \[\leadsto c \cdot \frac{b \cdot \color{blue}{\left(a \cdot \left(-c\right)\right)} - {b}^{3} \cdot 1}{{b}^{4}} \]
    3. *-rgt-identity92.6%

      \[\leadsto c \cdot \frac{b \cdot \left(a \cdot \left(-c\right)\right) - \color{blue}{{b}^{3}}}{{b}^{4}} \]
  11. Simplified92.6%

    \[\leadsto c \cdot \color{blue}{\frac{b \cdot \left(a \cdot \left(-c\right)\right) - {b}^{3}}{{b}^{4}}} \]
  12. Taylor expanded in b around inf 93.1%

    \[\leadsto \color{blue}{\frac{-1 \cdot c + -1 \cdot \frac{a \cdot {c}^{2}}{{b}^{2}}}{b}} \]
  13. Step-by-step derivation
    1. neg-mul-193.1%

      \[\leadsto \frac{\color{blue}{\left(-c\right)} + -1 \cdot \frac{a \cdot {c}^{2}}{{b}^{2}}}{b} \]
    2. mul-1-neg93.1%

      \[\leadsto \frac{\left(-c\right) + \color{blue}{\left(-\frac{a \cdot {c}^{2}}{{b}^{2}}\right)}}{b} \]
    3. unsub-neg93.1%

      \[\leadsto \frac{\color{blue}{\left(-c\right) - \frac{a \cdot {c}^{2}}{{b}^{2}}}}{b} \]
    4. associate-/l*93.1%

      \[\leadsto \frac{\left(-c\right) - \color{blue}{a \cdot \frac{{c}^{2}}{{b}^{2}}}}{b} \]
    5. unpow293.1%

      \[\leadsto \frac{\left(-c\right) - a \cdot \frac{\color{blue}{c \cdot c}}{{b}^{2}}}{b} \]
    6. unpow293.1%

      \[\leadsto \frac{\left(-c\right) - a \cdot \frac{c \cdot c}{\color{blue}{b \cdot b}}}{b} \]
    7. times-frac93.1%

      \[\leadsto \frac{\left(-c\right) - a \cdot \color{blue}{\left(\frac{c}{b} \cdot \frac{c}{b}\right)}}{b} \]
    8. sqr-neg93.1%

      \[\leadsto \frac{\left(-c\right) - a \cdot \color{blue}{\left(\left(-\frac{c}{b}\right) \cdot \left(-\frac{c}{b}\right)\right)}}{b} \]
    9. distribute-frac-neg93.1%

      \[\leadsto \frac{\left(-c\right) - a \cdot \left(\color{blue}{\frac{-c}{b}} \cdot \left(-\frac{c}{b}\right)\right)}{b} \]
    10. distribute-frac-neg93.1%

      \[\leadsto \frac{\left(-c\right) - a \cdot \left(\frac{-c}{b} \cdot \color{blue}{\frac{-c}{b}}\right)}{b} \]
    11. unpow293.1%

      \[\leadsto \frac{\left(-c\right) - a \cdot \color{blue}{{\left(\frac{-c}{b}\right)}^{2}}}{b} \]
  14. Simplified93.1%

    \[\leadsto \color{blue}{\frac{\left(-c\right) - a \cdot {\left(\frac{-c}{b}\right)}^{2}}{b}} \]
  15. Final simplification93.1%

    \[\leadsto \frac{\left(-c\right) - a \cdot {\left(\frac{c}{-b}\right)}^{2}}{b} \]
  16. Add Preprocessing

Alternative 6: 95.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ c \cdot \left(\frac{-1}{b} - \left(a \cdot c\right) \cdot {b}^{-3}\right) \end{array} \]
(FPCore (a b c)
 :precision binary64
 (* c (- (/ -1.0 b) (* (* a c) (pow b -3.0)))))
double code(double a, double b, double c) {
	return c * ((-1.0 / b) - ((a * c) * pow(b, -3.0)));
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = c * (((-1.0d0) / b) - ((a * c) * (b ** (-3.0d0))))
end function
public static double code(double a, double b, double c) {
	return c * ((-1.0 / b) - ((a * c) * Math.pow(b, -3.0)));
}
def code(a, b, c):
	return c * ((-1.0 / b) - ((a * c) * math.pow(b, -3.0)))
function code(a, b, c)
	return Float64(c * Float64(Float64(-1.0 / b) - Float64(Float64(a * c) * (b ^ -3.0))))
end
function tmp = code(a, b, c)
	tmp = c * ((-1.0 / b) - ((a * c) * (b ^ -3.0)));
end
code[a_, b_, c_] := N[(c * N[(N[(-1.0 / b), $MachinePrecision] - N[(N[(a * c), $MachinePrecision] * N[Power[b, -3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
c \cdot \left(\frac{-1}{b} - \left(a \cdot c\right) \cdot {b}^{-3}\right)
\end{array}
Derivation
  1. Initial program 20.0%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
  2. Step-by-step derivation
    1. *-commutative20.0%

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

    \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
  4. Add Preprocessing
  5. Taylor expanded in c around 0 92.8%

    \[\leadsto \color{blue}{c \cdot \left(-1 \cdot \frac{a \cdot c}{{b}^{3}} - \frac{1}{b}\right)} \]
  6. Step-by-step derivation
    1. associate-*r/92.8%

      \[\leadsto c \cdot \left(\color{blue}{\frac{-1 \cdot \left(a \cdot c\right)}{{b}^{3}}} - \frac{1}{b}\right) \]
    2. neg-mul-192.8%

      \[\leadsto c \cdot \left(\frac{\color{blue}{-a \cdot c}}{{b}^{3}} - \frac{1}{b}\right) \]
    3. distribute-rgt-neg-in92.8%

      \[\leadsto c \cdot \left(\frac{\color{blue}{a \cdot \left(-c\right)}}{{b}^{3}} - \frac{1}{b}\right) \]
  7. Simplified92.8%

    \[\leadsto \color{blue}{c \cdot \left(\frac{a \cdot \left(-c\right)}{{b}^{3}} - \frac{1}{b}\right)} \]
  8. Step-by-step derivation
    1. div-inv92.8%

      \[\leadsto c \cdot \left(\color{blue}{\left(a \cdot \left(-c\right)\right) \cdot \frac{1}{{b}^{3}}} - \frac{1}{b}\right) \]
    2. *-un-lft-identity92.8%

      \[\leadsto c \cdot \left(\left(a \cdot \left(-c\right)\right) \cdot \frac{1}{{b}^{3}} - \color{blue}{1 \cdot \frac{1}{b}}\right) \]
    3. prod-diff92.8%

      \[\leadsto c \cdot \color{blue}{\left(\mathsf{fma}\left(a \cdot \left(-c\right), \frac{1}{{b}^{3}}, -\frac{1}{b} \cdot 1\right) + \mathsf{fma}\left(-\frac{1}{b}, 1, \frac{1}{b} \cdot 1\right)\right)} \]
    4. distribute-rgt-neg-out92.8%

      \[\leadsto c \cdot \left(\mathsf{fma}\left(\color{blue}{-a \cdot c}, \frac{1}{{b}^{3}}, -\frac{1}{b} \cdot 1\right) + \mathsf{fma}\left(-\frac{1}{b}, 1, \frac{1}{b} \cdot 1\right)\right) \]
    5. pow-flip92.8%

      \[\leadsto c \cdot \left(\mathsf{fma}\left(-a \cdot c, \color{blue}{{b}^{\left(-3\right)}}, -\frac{1}{b} \cdot 1\right) + \mathsf{fma}\left(-\frac{1}{b}, 1, \frac{1}{b} \cdot 1\right)\right) \]
    6. metadata-eval92.8%

      \[\leadsto c \cdot \left(\mathsf{fma}\left(-a \cdot c, {b}^{\color{blue}{-3}}, -\frac{1}{b} \cdot 1\right) + \mathsf{fma}\left(-\frac{1}{b}, 1, \frac{1}{b} \cdot 1\right)\right) \]
  9. Applied egg-rr92.8%

    \[\leadsto c \cdot \color{blue}{\left(\mathsf{fma}\left(-a \cdot c, {b}^{-3}, -\frac{1}{b} \cdot 1\right) + \mathsf{fma}\left(-\frac{1}{b}, 1, \frac{1}{b} \cdot 1\right)\right)} \]
  10. Step-by-step derivation
    1. +-commutative92.8%

      \[\leadsto c \cdot \color{blue}{\left(\mathsf{fma}\left(-\frac{1}{b}, 1, \frac{1}{b} \cdot 1\right) + \mathsf{fma}\left(-a \cdot c, {b}^{-3}, -\frac{1}{b} \cdot 1\right)\right)} \]
    2. fma-undefine92.8%

      \[\leadsto c \cdot \left(\mathsf{fma}\left(-\frac{1}{b}, 1, \frac{1}{b} \cdot 1\right) + \color{blue}{\left(\left(-a \cdot c\right) \cdot {b}^{-3} + \left(-\frac{1}{b} \cdot 1\right)\right)}\right) \]
    3. *-rgt-identity92.8%

      \[\leadsto c \cdot \left(\mathsf{fma}\left(-\frac{1}{b}, 1, \frac{1}{b} \cdot 1\right) + \left(\left(-a \cdot c\right) \cdot {b}^{-3} + \left(-\color{blue}{\frac{1}{b}}\right)\right)\right) \]
    4. associate-+r+92.8%

      \[\leadsto c \cdot \color{blue}{\left(\left(\mathsf{fma}\left(-\frac{1}{b}, 1, \frac{1}{b} \cdot 1\right) + \left(-a \cdot c\right) \cdot {b}^{-3}\right) + \left(-\frac{1}{b}\right)\right)} \]
    5. distribute-lft-neg-out92.8%

      \[\leadsto c \cdot \left(\left(\mathsf{fma}\left(-\frac{1}{b}, 1, \frac{1}{b} \cdot 1\right) + \color{blue}{\left(-\left(a \cdot c\right) \cdot {b}^{-3}\right)}\right) + \left(-\frac{1}{b}\right)\right) \]
    6. unsub-neg92.8%

      \[\leadsto c \cdot \left(\color{blue}{\left(\mathsf{fma}\left(-\frac{1}{b}, 1, \frac{1}{b} \cdot 1\right) - \left(a \cdot c\right) \cdot {b}^{-3}\right)} + \left(-\frac{1}{b}\right)\right) \]
    7. fma-undefine92.8%

      \[\leadsto c \cdot \left(\left(\color{blue}{\left(\left(-\frac{1}{b}\right) \cdot 1 + \frac{1}{b} \cdot 1\right)} - \left(a \cdot c\right) \cdot {b}^{-3}\right) + \left(-\frac{1}{b}\right)\right) \]
    8. distribute-rgt-out92.8%

      \[\leadsto c \cdot \left(\left(\color{blue}{1 \cdot \left(\left(-\frac{1}{b}\right) + \frac{1}{b}\right)} - \left(a \cdot c\right) \cdot {b}^{-3}\right) + \left(-\frac{1}{b}\right)\right) \]
    9. +-commutative92.8%

      \[\leadsto c \cdot \left(\left(1 \cdot \color{blue}{\left(\frac{1}{b} + \left(-\frac{1}{b}\right)\right)} - \left(a \cdot c\right) \cdot {b}^{-3}\right) + \left(-\frac{1}{b}\right)\right) \]
    10. sub-neg92.8%

      \[\leadsto c \cdot \left(\left(1 \cdot \color{blue}{\left(\frac{1}{b} - \frac{1}{b}\right)} - \left(a \cdot c\right) \cdot {b}^{-3}\right) + \left(-\frac{1}{b}\right)\right) \]
    11. +-inverses92.8%

      \[\leadsto c \cdot \left(\left(1 \cdot \color{blue}{0} - \left(a \cdot c\right) \cdot {b}^{-3}\right) + \left(-\frac{1}{b}\right)\right) \]
    12. metadata-eval92.8%

      \[\leadsto c \cdot \left(\left(\color{blue}{0} - \left(a \cdot c\right) \cdot {b}^{-3}\right) + \left(-\frac{1}{b}\right)\right) \]
    13. neg-sub092.8%

      \[\leadsto c \cdot \left(\color{blue}{\left(-\left(a \cdot c\right) \cdot {b}^{-3}\right)} + \left(-\frac{1}{b}\right)\right) \]
  11. Simplified92.8%

    \[\leadsto c \cdot \color{blue}{\left(\frac{-1}{b} - \left(c \cdot a\right) \cdot {b}^{-3}\right)} \]
  12. Final simplification92.8%

    \[\leadsto c \cdot \left(\frac{-1}{b} - \left(a \cdot c\right) \cdot {b}^{-3}\right) \]
  13. Add Preprocessing

Alternative 7: 90.5% accurate, 29.0× speedup?

\[\begin{array}{l} \\ \frac{c}{-b} \end{array} \]
(FPCore (a b c) :precision binary64 (/ c (- b)))
double code(double a, double b, double c) {
	return c / -b;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = c / -b
end function
public static double code(double a, double b, double c) {
	return c / -b;
}
def code(a, b, c):
	return c / -b
function code(a, b, c)
	return Float64(c / Float64(-b))
end
function tmp = code(a, b, c)
	tmp = c / -b;
end
code[a_, b_, c_] := N[(c / (-b)), $MachinePrecision]
\begin{array}{l}

\\
\frac{c}{-b}
\end{array}
Derivation
  1. Initial program 20.0%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{2 \cdot a} \]
  2. Step-by-step derivation
    1. *-commutative20.0%

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

    \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c}}{a \cdot 2}} \]
  4. Add Preprocessing
  5. Taylor expanded in b around inf 88.3%

    \[\leadsto \color{blue}{-1 \cdot \frac{c}{b}} \]
  6. Step-by-step derivation
    1. associate-*r/88.3%

      \[\leadsto \color{blue}{\frac{-1 \cdot c}{b}} \]
    2. mul-1-neg88.3%

      \[\leadsto \frac{\color{blue}{-c}}{b} \]
  7. Simplified88.3%

    \[\leadsto \color{blue}{\frac{-c}{b}} \]
  8. Final simplification88.3%

    \[\leadsto \frac{c}{-b} \]
  9. Add Preprocessing

Reproduce

?
herbie shell --seed 2024105 
(FPCore (a b c)
  :name "Quadratic roots, wide range"
  :precision binary64
  :pre (and (and (and (< 4.930380657631324e-32 a) (< a 2.028240960365167e+31)) (and (< 4.930380657631324e-32 b) (< b 2.028240960365167e+31))) (and (< 4.930380657631324e-32 c) (< c 2.028240960365167e+31)))
  (/ (+ (- b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))