| Alternative 1 | |
|---|---|
| Accuracy | 82.6% |
| Cost | 7624 |
(FPCore (a b c) :precision binary64 (/ (- (- b) (sqrt (- (* b b) (* 4.0 (* a c))))) (* 2.0 a)))
(FPCore (a b c)
:precision binary64
(let* ((t_0 (* -4.0 (* c a))))
(if (<= b -1e-15)
(* -0.5 (* -4.0 (/ c (fma b -2.0 (/ (* -0.5 c) (/ b (* -4.0 a)))))))
(if (<= b 1.25e-221)
(* -0.5 (* -4.0 (/ c (- (hypot (sqrt t_0) b) b))))
(if (<= b 1.12e+135)
(* -0.5 (/ (+ b (sqrt (+ t_0 (* b b)))) a))
(- (/ c b) (/ b a)))))))double code(double a, double b, double c) {
return (-b - sqrt(((b * b) - (4.0 * (a * c))))) / (2.0 * a);
}
double code(double a, double b, double c) {
double t_0 = -4.0 * (c * a);
double tmp;
if (b <= -1e-15) {
tmp = -0.5 * (-4.0 * (c / fma(b, -2.0, ((-0.5 * c) / (b / (-4.0 * a))))));
} else if (b <= 1.25e-221) {
tmp = -0.5 * (-4.0 * (c / (hypot(sqrt(t_0), b) - b)));
} else if (b <= 1.12e+135) {
tmp = -0.5 * ((b + sqrt((t_0 + (b * b)))) / a);
} else {
tmp = (c / b) - (b / a);
}
return tmp;
}
function code(a, b, c) return Float64(Float64(Float64(-b) - sqrt(Float64(Float64(b * b) - Float64(4.0 * Float64(a * c))))) / Float64(2.0 * a)) end
function code(a, b, c) t_0 = Float64(-4.0 * Float64(c * a)) tmp = 0.0 if (b <= -1e-15) tmp = Float64(-0.5 * Float64(-4.0 * Float64(c / fma(b, -2.0, Float64(Float64(-0.5 * c) / Float64(b / Float64(-4.0 * a))))))); elseif (b <= 1.25e-221) tmp = Float64(-0.5 * Float64(-4.0 * Float64(c / Float64(hypot(sqrt(t_0), b) - b)))); elseif (b <= 1.12e+135) tmp = Float64(-0.5 * Float64(Float64(b + sqrt(Float64(t_0 + Float64(b * b)))) / a)); else tmp = Float64(Float64(c / b) - Float64(b / a)); end return tmp end
code[a_, b_, c_] := N[(N[((-b) - N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(4.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(2.0 * a), $MachinePrecision]), $MachinePrecision]
code[a_, b_, c_] := Block[{t$95$0 = N[(-4.0 * N[(c * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1e-15], N[(-0.5 * N[(-4.0 * N[(c / N[(b * -2.0 + N[(N[(-0.5 * c), $MachinePrecision] / N[(b / N[(-4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.25e-221], N[(-0.5 * N[(-4.0 * N[(c / N[(N[Sqrt[N[Sqrt[t$95$0], $MachinePrecision] ^ 2 + b ^ 2], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.12e+135], N[(-0.5 * N[(N[(b + N[Sqrt[N[(t$95$0 + N[(b * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] - N[(b / a), $MachinePrecision]), $MachinePrecision]]]]]
\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}
\begin{array}{l}
t_0 := -4 \cdot \left(c \cdot a\right)\\
\mathbf{if}\;b \leq -1 \cdot 10^{-15}:\\
\;\;\;\;-0.5 \cdot \left(-4 \cdot \frac{c}{\mathsf{fma}\left(b, -2, \frac{-0.5 \cdot c}{\frac{b}{-4 \cdot a}}\right)}\right)\\
\mathbf{elif}\;b \leq 1.25 \cdot 10^{-221}:\\
\;\;\;\;-0.5 \cdot \left(-4 \cdot \frac{c}{\mathsf{hypot}\left(\sqrt{t_0}, b\right) - b}\right)\\
\mathbf{elif}\;b \leq 1.12 \cdot 10^{+135}:\\
\;\;\;\;-0.5 \cdot \frac{b + \sqrt{t_0 + b \cdot b}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{c}{b} - \frac{b}{a}\\
\end{array}
| Original | 48.0% |
|---|---|
| Target | 68.0% |
| Herbie | 87.1% |
if b < -1.0000000000000001e-15Initial program 15.1%
Simplified15.1%
[Start]15.1 | \[ \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}
\] |
|---|---|
/-rgt-identity [<=]15.1 | \[ \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{\color{blue}{\frac{2 \cdot a}{1}}}
\] |
metadata-eval [<=]15.1 | \[ \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{\frac{2 \cdot a}{\color{blue}{--1}}}
\] |
associate-/l* [=>]15.1 | \[ \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{\color{blue}{\frac{2}{\frac{--1}{a}}}}
\] |
associate-/r/ [=>]15.1 | \[ \color{blue}{\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2} \cdot \frac{--1}{a}}
\] |
*-commutative [<=]15.1 | \[ \color{blue}{\frac{--1}{a} \cdot \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2}}
\] |
metadata-eval [=>]15.1 | \[ \frac{\color{blue}{1}}{a} \cdot \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2}
\] |
metadata-eval [<=]15.1 | \[ \frac{\color{blue}{-1 \cdot -1}}{a} \cdot \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2}
\] |
associate-*l/ [<=]15.1 | \[ \color{blue}{\left(\frac{-1}{a} \cdot -1\right)} \cdot \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2}
\] |
associate-/r/ [<=]15.1 | \[ \color{blue}{\frac{-1}{\frac{a}{-1}}} \cdot \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2}
\] |
times-frac [<=]15.1 | \[ \color{blue}{\frac{-1 \cdot \left(\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}\right)}{\frac{a}{-1} \cdot 2}}
\] |
*-commutative [<=]15.1 | \[ \frac{-1 \cdot \left(\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}\right)}{\color{blue}{2 \cdot \frac{a}{-1}}}
\] |
times-frac [=>]15.1 | \[ \color{blue}{\frac{-1}{2} \cdot \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{\frac{a}{-1}}}
\] |
metadata-eval [=>]15.1 | \[ \color{blue}{-0.5} \cdot \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{\frac{a}{-1}}
\] |
associate-/r/ [=>]15.1 | \[ -0.5 \cdot \color{blue}{\left(\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{a} \cdot -1\right)}
\] |
*-commutative [<=]15.1 | \[ -0.5 \cdot \color{blue}{\left(-1 \cdot \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{a}\right)}
\] |
div-sub [=>]13.8 | \[ -0.5 \cdot \left(-1 \cdot \color{blue}{\left(\frac{-b}{a} - \frac{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{a}\right)}\right)
\] |
Applied egg-rr11.7%
[Start]15.1 | \[ -0.5 \cdot \frac{b + \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}}{a}
\] |
|---|---|
flip-+ [=>]15.1 | \[ -0.5 \cdot \frac{\color{blue}{\frac{b \cdot b - \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)} \cdot \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}}{b - \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}}}}{a}
\] |
add-sqr-sqrt [<=]15.1 | \[ -0.5 \cdot \frac{\frac{b \cdot b - \color{blue}{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}}{b - \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}}}{a}
\] |
div-sub [=>]15.1 | \[ -0.5 \cdot \frac{\color{blue}{\frac{b \cdot b}{b - \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}} - \frac{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}{b - \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}}}}{a}
\] |
fma-udef [=>]15.1 | \[ -0.5 \cdot \frac{\frac{b \cdot b}{b - \sqrt{\color{blue}{a \cdot \left(c \cdot -4\right) + b \cdot b}}} - \frac{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}{b - \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}}}{a}
\] |
+-commutative [=>]15.1 | \[ -0.5 \cdot \frac{\frac{b \cdot b}{b - \sqrt{\color{blue}{b \cdot b + a \cdot \left(c \cdot -4\right)}}} - \frac{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}{b - \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}}}{a}
\] |
add-sqr-sqrt [=>]11.7 | \[ -0.5 \cdot \frac{\frac{b \cdot b}{b - \sqrt{b \cdot b + \color{blue}{\sqrt{a \cdot \left(c \cdot -4\right)} \cdot \sqrt{a \cdot \left(c \cdot -4\right)}}}} - \frac{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}{b - \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}}}{a}
\] |
hypot-def [=>]11.7 | \[ -0.5 \cdot \frac{\frac{b \cdot b}{b - \color{blue}{\mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -4\right)}\right)}} - \frac{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}{b - \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}}}{a}
\] |
associate-*r* [=>]11.7 | \[ -0.5 \cdot \frac{\frac{b \cdot b}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{\left(a \cdot c\right) \cdot -4}}\right)} - \frac{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}{b - \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}}}{a}
\] |
Simplified47.3%
[Start]11.7 | \[ -0.5 \cdot \frac{\frac{b \cdot b}{b - \mathsf{hypot}\left(b, \sqrt{\left(a \cdot c\right) \cdot -4}\right)} - \frac{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -4\right)}{b - \mathsf{hypot}\left(b, \sqrt{\left(a \cdot c\right) \cdot -4}\right)}}{a}
\] |
|---|---|
div-sub [<=]11.7 | \[ -0.5 \cdot \frac{\color{blue}{\frac{b \cdot b - \mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -4\right)}{b - \mathsf{hypot}\left(b, \sqrt{\left(a \cdot c\right) \cdot -4}\right)}}}{a}
\] |
*-lft-identity [<=]11.7 | \[ -0.5 \cdot \frac{\color{blue}{1 \cdot \frac{b \cdot b - \mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -4\right)}{b - \mathsf{hypot}\left(b, \sqrt{\left(a \cdot c\right) \cdot -4}\right)}}}{a}
\] |
metadata-eval [<=]11.7 | \[ -0.5 \cdot \frac{\color{blue}{\frac{-1}{-1}} \cdot \frac{b \cdot b - \mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -4\right)}{b - \mathsf{hypot}\left(b, \sqrt{\left(a \cdot c\right) \cdot -4}\right)}}{a}
\] |
times-frac [<=]11.7 | \[ -0.5 \cdot \frac{\color{blue}{\frac{-1 \cdot \left(b \cdot b - \mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -4\right)\right)}{-1 \cdot \left(b - \mathsf{hypot}\left(b, \sqrt{\left(a \cdot c\right) \cdot -4}\right)\right)}}}{a}
\] |
neg-mul-1 [<=]11.7 | \[ -0.5 \cdot \frac{\frac{\color{blue}{-\left(b \cdot b - \mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -4\right)\right)}}{-1 \cdot \left(b - \mathsf{hypot}\left(b, \sqrt{\left(a \cdot c\right) \cdot -4}\right)\right)}}{a}
\] |
Applied egg-rr41.1%
[Start]47.3 | \[ -0.5 \cdot \frac{\frac{c \cdot \left(-4 \cdot a\right)}{\mathsf{hypot}\left(b, \sqrt{c \cdot \left(-4 \cdot a\right)}\right) - b}}{a}
\] |
|---|---|
add-log-exp [=>]19.7 | \[ -0.5 \cdot \color{blue}{\log \left(e^{\frac{\frac{c \cdot \left(-4 \cdot a\right)}{\mathsf{hypot}\left(b, \sqrt{c \cdot \left(-4 \cdot a\right)}\right) - b}}{a}}\right)}
\] |
*-un-lft-identity [=>]19.7 | \[ -0.5 \cdot \log \color{blue}{\left(1 \cdot e^{\frac{\frac{c \cdot \left(-4 \cdot a\right)}{\mathsf{hypot}\left(b, \sqrt{c \cdot \left(-4 \cdot a\right)}\right) - b}}{a}}\right)}
\] |
log-prod [=>]19.7 | \[ -0.5 \cdot \color{blue}{\left(\log 1 + \log \left(e^{\frac{\frac{c \cdot \left(-4 \cdot a\right)}{\mathsf{hypot}\left(b, \sqrt{c \cdot \left(-4 \cdot a\right)}\right) - b}}{a}}\right)\right)}
\] |
metadata-eval [=>]19.7 | \[ -0.5 \cdot \left(\color{blue}{0} + \log \left(e^{\frac{\frac{c \cdot \left(-4 \cdot a\right)}{\mathsf{hypot}\left(b, \sqrt{c \cdot \left(-4 \cdot a\right)}\right) - b}}{a}}\right)\right)
\] |
add-log-exp [<=]47.3 | \[ -0.5 \cdot \left(0 + \color{blue}{\frac{\frac{c \cdot \left(-4 \cdot a\right)}{\mathsf{hypot}\left(b, \sqrt{c \cdot \left(-4 \cdot a\right)}\right) - b}}{a}}\right)
\] |
associate-/l/ [=>]45.9 | \[ -0.5 \cdot \left(0 + \color{blue}{\frac{c \cdot \left(-4 \cdot a\right)}{a \cdot \left(\mathsf{hypot}\left(b, \sqrt{c \cdot \left(-4 \cdot a\right)}\right) - b\right)}}\right)
\] |
times-frac [=>]41.1 | \[ -0.5 \cdot \left(0 + \color{blue}{\frac{c}{a} \cdot \frac{-4 \cdot a}{\mathsf{hypot}\left(b, \sqrt{c \cdot \left(-4 \cdot a\right)}\right) - b}}\right)
\] |
hypot-udef [=>]35.4 | \[ -0.5 \cdot \left(0 + \frac{c}{a} \cdot \frac{-4 \cdot a}{\color{blue}{\sqrt{b \cdot b + \sqrt{c \cdot \left(-4 \cdot a\right)} \cdot \sqrt{c \cdot \left(-4 \cdot a\right)}}} - b}\right)
\] |
add-sqr-sqrt [<=]54.4 | \[ -0.5 \cdot \left(0 + \frac{c}{a} \cdot \frac{-4 \cdot a}{\sqrt{b \cdot b + \color{blue}{c \cdot \left(-4 \cdot a\right)}} - b}\right)
\] |
+-commutative [=>]54.4 | \[ -0.5 \cdot \left(0 + \frac{c}{a} \cdot \frac{-4 \cdot a}{\sqrt{\color{blue}{c \cdot \left(-4 \cdot a\right) + b \cdot b}} - b}\right)
\] |
add-sqr-sqrt [=>]35.4 | \[ -0.5 \cdot \left(0 + \frac{c}{a} \cdot \frac{-4 \cdot a}{\sqrt{\color{blue}{\sqrt{c \cdot \left(-4 \cdot a\right)} \cdot \sqrt{c \cdot \left(-4 \cdot a\right)}} + b \cdot b} - b}\right)
\] |
hypot-def [=>]41.1 | \[ -0.5 \cdot \left(0 + \frac{c}{a} \cdot \frac{-4 \cdot a}{\color{blue}{\mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right)} - b}\right)
\] |
Simplified55.4%
[Start]41.1 | \[ -0.5 \cdot \left(0 + \frac{c}{a} \cdot \frac{-4 \cdot a}{\mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right) - b}\right)
\] |
|---|---|
+-lft-identity [=>]41.1 | \[ -0.5 \cdot \color{blue}{\left(\frac{c}{a} \cdot \frac{-4 \cdot a}{\mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right) - b}\right)}
\] |
associate-*r/ [=>]45.8 | \[ -0.5 \cdot \color{blue}{\frac{\frac{c}{a} \cdot \left(-4 \cdot a\right)}{\mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right) - b}}
\] |
associate-*l/ [=>]51.1 | \[ -0.5 \cdot \frac{\color{blue}{\frac{c \cdot \left(-4 \cdot a\right)}{a}}}{\mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right) - b}
\] |
*-commutative [=>]51.1 | \[ -0.5 \cdot \frac{\frac{\color{blue}{\left(-4 \cdot a\right) \cdot c}}{a}}{\mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right) - b}
\] |
associate-*l/ [<=]55.3 | \[ -0.5 \cdot \frac{\color{blue}{\frac{-4 \cdot a}{a} \cdot c}}{\mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right) - b}
\] |
associate-*r/ [<=]55.3 | \[ -0.5 \cdot \color{blue}{\left(\frac{-4 \cdot a}{a} \cdot \frac{c}{\mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right) - b}\right)}
\] |
associate-/l* [=>]55.4 | \[ -0.5 \cdot \left(\color{blue}{\frac{-4}{\frac{a}{a}}} \cdot \frac{c}{\mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right) - b}\right)
\] |
*-inverses [=>]55.4 | \[ -0.5 \cdot \left(\frac{-4}{\color{blue}{1}} \cdot \frac{c}{\mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right) - b}\right)
\] |
metadata-eval [=>]55.4 | \[ -0.5 \cdot \left(\color{blue}{-4} \cdot \frac{c}{\mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right) - b}\right)
\] |
*-commutative [=>]55.4 | \[ -0.5 \cdot \left(-4 \cdot \frac{c}{\mathsf{hypot}\left(\sqrt{\color{blue}{\left(-4 \cdot a\right) \cdot c}}, b\right) - b}\right)
\] |
associate-*l* [=>]55.4 | \[ -0.5 \cdot \left(-4 \cdot \frac{c}{\mathsf{hypot}\left(\sqrt{\color{blue}{-4 \cdot \left(a \cdot c\right)}}, b\right) - b}\right)
\] |
*-commutative [<=]55.4 | \[ -0.5 \cdot \left(-4 \cdot \frac{c}{\mathsf{hypot}\left(\sqrt{-4 \cdot \color{blue}{\left(c \cdot a\right)}}, b\right) - b}\right)
\] |
Taylor expanded in b around -inf 0.0%
Simplified89.7%
[Start]0.0 | \[ -0.5 \cdot \left(-4 \cdot \frac{c}{-2 \cdot b + -0.5 \cdot \frac{c \cdot \left(a \cdot {\left(\sqrt{-4}\right)}^{2}\right)}{b}}\right)
\] |
|---|---|
*-commutative [=>]0.0 | \[ -0.5 \cdot \left(-4 \cdot \frac{c}{\color{blue}{b \cdot -2} + -0.5 \cdot \frac{c \cdot \left(a \cdot {\left(\sqrt{-4}\right)}^{2}\right)}{b}}\right)
\] |
fma-def [=>]0.0 | \[ -0.5 \cdot \left(-4 \cdot \frac{c}{\color{blue}{\mathsf{fma}\left(b, -2, -0.5 \cdot \frac{c \cdot \left(a \cdot {\left(\sqrt{-4}\right)}^{2}\right)}{b}\right)}}\right)
\] |
associate-/l* [=>]0.0 | \[ -0.5 \cdot \left(-4 \cdot \frac{c}{\mathsf{fma}\left(b, -2, -0.5 \cdot \color{blue}{\frac{c}{\frac{b}{a \cdot {\left(\sqrt{-4}\right)}^{2}}}}\right)}\right)
\] |
associate-*r/ [=>]0.0 | \[ -0.5 \cdot \left(-4 \cdot \frac{c}{\mathsf{fma}\left(b, -2, \color{blue}{\frac{-0.5 \cdot c}{\frac{b}{a \cdot {\left(\sqrt{-4}\right)}^{2}}}}\right)}\right)
\] |
*-commutative [=>]0.0 | \[ -0.5 \cdot \left(-4 \cdot \frac{c}{\mathsf{fma}\left(b, -2, \frac{\color{blue}{c \cdot -0.5}}{\frac{b}{a \cdot {\left(\sqrt{-4}\right)}^{2}}}\right)}\right)
\] |
unpow2 [=>]0.0 | \[ -0.5 \cdot \left(-4 \cdot \frac{c}{\mathsf{fma}\left(b, -2, \frac{c \cdot -0.5}{\frac{b}{a \cdot \color{blue}{\left(\sqrt{-4} \cdot \sqrt{-4}\right)}}}\right)}\right)
\] |
rem-square-sqrt [=>]89.7 | \[ -0.5 \cdot \left(-4 \cdot \frac{c}{\mathsf{fma}\left(b, -2, \frac{c \cdot -0.5}{\frac{b}{a \cdot \color{blue}{-4}}}\right)}\right)
\] |
if -1.0000000000000001e-15 < b < 1.24999999999999999e-221Initial program 64.5%
Simplified64.6%
[Start]64.5 | \[ \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}
\] |
|---|---|
/-rgt-identity [<=]64.5 | \[ \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{\color{blue}{\frac{2 \cdot a}{1}}}
\] |
metadata-eval [<=]64.5 | \[ \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{\frac{2 \cdot a}{\color{blue}{--1}}}
\] |
associate-/l* [=>]64.5 | \[ \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{\color{blue}{\frac{2}{\frac{--1}{a}}}}
\] |
associate-/r/ [=>]64.5 | \[ \color{blue}{\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2} \cdot \frac{--1}{a}}
\] |
*-commutative [<=]64.5 | \[ \color{blue}{\frac{--1}{a} \cdot \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2}}
\] |
metadata-eval [=>]64.5 | \[ \frac{\color{blue}{1}}{a} \cdot \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2}
\] |
metadata-eval [<=]64.5 | \[ \frac{\color{blue}{-1 \cdot -1}}{a} \cdot \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2}
\] |
associate-*l/ [<=]64.5 | \[ \color{blue}{\left(\frac{-1}{a} \cdot -1\right)} \cdot \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2}
\] |
associate-/r/ [<=]64.5 | \[ \color{blue}{\frac{-1}{\frac{a}{-1}}} \cdot \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2}
\] |
times-frac [<=]64.5 | \[ \color{blue}{\frac{-1 \cdot \left(\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}\right)}{\frac{a}{-1} \cdot 2}}
\] |
*-commutative [<=]64.5 | \[ \frac{-1 \cdot \left(\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}\right)}{\color{blue}{2 \cdot \frac{a}{-1}}}
\] |
times-frac [=>]64.6 | \[ \color{blue}{\frac{-1}{2} \cdot \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{\frac{a}{-1}}}
\] |
metadata-eval [=>]64.6 | \[ \color{blue}{-0.5} \cdot \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{\frac{a}{-1}}
\] |
associate-/r/ [=>]64.6 | \[ -0.5 \cdot \color{blue}{\left(\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{a} \cdot -1\right)}
\] |
*-commutative [<=]64.6 | \[ -0.5 \cdot \color{blue}{\left(-1 \cdot \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{a}\right)}
\] |
div-sub [=>]64.6 | \[ -0.5 \cdot \left(-1 \cdot \color{blue}{\left(\frac{-b}{a} - \frac{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{a}\right)}\right)
\] |
Applied egg-rr63.7%
[Start]64.6 | \[ -0.5 \cdot \frac{b + \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}}{a}
\] |
|---|---|
flip-+ [=>]64.4 | \[ -0.5 \cdot \frac{\color{blue}{\frac{b \cdot b - \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)} \cdot \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}}{b - \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}}}}{a}
\] |
add-sqr-sqrt [<=]64.3 | \[ -0.5 \cdot \frac{\frac{b \cdot b - \color{blue}{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}}{b - \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}}}{a}
\] |
div-sub [=>]64.3 | \[ -0.5 \cdot \frac{\color{blue}{\frac{b \cdot b}{b - \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}} - \frac{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}{b - \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}}}}{a}
\] |
fma-udef [=>]64.3 | \[ -0.5 \cdot \frac{\frac{b \cdot b}{b - \sqrt{\color{blue}{a \cdot \left(c \cdot -4\right) + b \cdot b}}} - \frac{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}{b - \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}}}{a}
\] |
+-commutative [=>]64.3 | \[ -0.5 \cdot \frac{\frac{b \cdot b}{b - \sqrt{\color{blue}{b \cdot b + a \cdot \left(c \cdot -4\right)}}} - \frac{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}{b - \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}}}{a}
\] |
add-sqr-sqrt [=>]63.8 | \[ -0.5 \cdot \frac{\frac{b \cdot b}{b - \sqrt{b \cdot b + \color{blue}{\sqrt{a \cdot \left(c \cdot -4\right)} \cdot \sqrt{a \cdot \left(c \cdot -4\right)}}}} - \frac{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}{b - \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}}}{a}
\] |
hypot-def [=>]63.7 | \[ -0.5 \cdot \frac{\frac{b \cdot b}{b - \color{blue}{\mathsf{hypot}\left(b, \sqrt{a \cdot \left(c \cdot -4\right)}\right)}} - \frac{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}{b - \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}}}{a}
\] |
associate-*r* [=>]63.7 | \[ -0.5 \cdot \frac{\frac{b \cdot b}{b - \mathsf{hypot}\left(b, \sqrt{\color{blue}{\left(a \cdot c\right) \cdot -4}}\right)} - \frac{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}{b - \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}}}{a}
\] |
Simplified68.0%
[Start]63.7 | \[ -0.5 \cdot \frac{\frac{b \cdot b}{b - \mathsf{hypot}\left(b, \sqrt{\left(a \cdot c\right) \cdot -4}\right)} - \frac{\mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -4\right)}{b - \mathsf{hypot}\left(b, \sqrt{\left(a \cdot c\right) \cdot -4}\right)}}{a}
\] |
|---|---|
div-sub [<=]63.7 | \[ -0.5 \cdot \frac{\color{blue}{\frac{b \cdot b - \mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -4\right)}{b - \mathsf{hypot}\left(b, \sqrt{\left(a \cdot c\right) \cdot -4}\right)}}}{a}
\] |
*-lft-identity [<=]63.7 | \[ -0.5 \cdot \frac{\color{blue}{1 \cdot \frac{b \cdot b - \mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -4\right)}{b - \mathsf{hypot}\left(b, \sqrt{\left(a \cdot c\right) \cdot -4}\right)}}}{a}
\] |
metadata-eval [<=]63.7 | \[ -0.5 \cdot \frac{\color{blue}{\frac{-1}{-1}} \cdot \frac{b \cdot b - \mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -4\right)}{b - \mathsf{hypot}\left(b, \sqrt{\left(a \cdot c\right) \cdot -4}\right)}}{a}
\] |
times-frac [<=]63.7 | \[ -0.5 \cdot \frac{\color{blue}{\frac{-1 \cdot \left(b \cdot b - \mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -4\right)\right)}{-1 \cdot \left(b - \mathsf{hypot}\left(b, \sqrt{\left(a \cdot c\right) \cdot -4}\right)\right)}}}{a}
\] |
neg-mul-1 [<=]63.7 | \[ -0.5 \cdot \frac{\frac{\color{blue}{-\left(b \cdot b - \mathsf{fma}\left(b, b, \left(a \cdot c\right) \cdot -4\right)\right)}}{-1 \cdot \left(b - \mathsf{hypot}\left(b, \sqrt{\left(a \cdot c\right) \cdot -4}\right)\right)}}{a}
\] |
Applied egg-rr56.5%
[Start]68.0 | \[ -0.5 \cdot \frac{\frac{c \cdot \left(-4 \cdot a\right)}{\mathsf{hypot}\left(b, \sqrt{c \cdot \left(-4 \cdot a\right)}\right) - b}}{a}
\] |
|---|---|
add-log-exp [=>]3.6 | \[ -0.5 \cdot \color{blue}{\log \left(e^{\frac{\frac{c \cdot \left(-4 \cdot a\right)}{\mathsf{hypot}\left(b, \sqrt{c \cdot \left(-4 \cdot a\right)}\right) - b}}{a}}\right)}
\] |
*-un-lft-identity [=>]3.6 | \[ -0.5 \cdot \log \color{blue}{\left(1 \cdot e^{\frac{\frac{c \cdot \left(-4 \cdot a\right)}{\mathsf{hypot}\left(b, \sqrt{c \cdot \left(-4 \cdot a\right)}\right) - b}}{a}}\right)}
\] |
log-prod [=>]3.6 | \[ -0.5 \cdot \color{blue}{\left(\log 1 + \log \left(e^{\frac{\frac{c \cdot \left(-4 \cdot a\right)}{\mathsf{hypot}\left(b, \sqrt{c \cdot \left(-4 \cdot a\right)}\right) - b}}{a}}\right)\right)}
\] |
metadata-eval [=>]3.6 | \[ -0.5 \cdot \left(\color{blue}{0} + \log \left(e^{\frac{\frac{c \cdot \left(-4 \cdot a\right)}{\mathsf{hypot}\left(b, \sqrt{c \cdot \left(-4 \cdot a\right)}\right) - b}}{a}}\right)\right)
\] |
add-log-exp [<=]68.0 | \[ -0.5 \cdot \left(0 + \color{blue}{\frac{\frac{c \cdot \left(-4 \cdot a\right)}{\mathsf{hypot}\left(b, \sqrt{c \cdot \left(-4 \cdot a\right)}\right) - b}}{a}}\right)
\] |
associate-/l/ [=>]57.6 | \[ -0.5 \cdot \left(0 + \color{blue}{\frac{c \cdot \left(-4 \cdot a\right)}{a \cdot \left(\mathsf{hypot}\left(b, \sqrt{c \cdot \left(-4 \cdot a\right)}\right) - b\right)}}\right)
\] |
times-frac [=>]56.5 | \[ -0.5 \cdot \left(0 + \color{blue}{\frac{c}{a} \cdot \frac{-4 \cdot a}{\mathsf{hypot}\left(b, \sqrt{c \cdot \left(-4 \cdot a\right)}\right) - b}}\right)
\] |
hypot-udef [=>]54.6 | \[ -0.5 \cdot \left(0 + \frac{c}{a} \cdot \frac{-4 \cdot a}{\color{blue}{\sqrt{b \cdot b + \sqrt{c \cdot \left(-4 \cdot a\right)} \cdot \sqrt{c \cdot \left(-4 \cdot a\right)}}} - b}\right)
\] |
add-sqr-sqrt [<=]58.7 | \[ -0.5 \cdot \left(0 + \frac{c}{a} \cdot \frac{-4 \cdot a}{\sqrt{b \cdot b + \color{blue}{c \cdot \left(-4 \cdot a\right)}} - b}\right)
\] |
+-commutative [=>]58.7 | \[ -0.5 \cdot \left(0 + \frac{c}{a} \cdot \frac{-4 \cdot a}{\sqrt{\color{blue}{c \cdot \left(-4 \cdot a\right) + b \cdot b}} - b}\right)
\] |
add-sqr-sqrt [=>]54.6 | \[ -0.5 \cdot \left(0 + \frac{c}{a} \cdot \frac{-4 \cdot a}{\sqrt{\color{blue}{\sqrt{c \cdot \left(-4 \cdot a\right)} \cdot \sqrt{c \cdot \left(-4 \cdot a\right)}} + b \cdot b} - b}\right)
\] |
hypot-def [=>]56.5 | \[ -0.5 \cdot \left(0 + \frac{c}{a} \cdot \frac{-4 \cdot a}{\color{blue}{\mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right)} - b}\right)
\] |
Simplified78.4%
[Start]56.5 | \[ -0.5 \cdot \left(0 + \frac{c}{a} \cdot \frac{-4 \cdot a}{\mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right) - b}\right)
\] |
|---|---|
+-lft-identity [=>]56.5 | \[ -0.5 \cdot \color{blue}{\left(\frac{c}{a} \cdot \frac{-4 \cdot a}{\mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right) - b}\right)}
\] |
associate-*r/ [=>]56.6 | \[ -0.5 \cdot \color{blue}{\frac{\frac{c}{a} \cdot \left(-4 \cdot a\right)}{\mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right) - b}}
\] |
associate-*l/ [=>]68.2 | \[ -0.5 \cdot \frac{\color{blue}{\frac{c \cdot \left(-4 \cdot a\right)}{a}}}{\mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right) - b}
\] |
*-commutative [=>]68.2 | \[ -0.5 \cdot \frac{\frac{\color{blue}{\left(-4 \cdot a\right) \cdot c}}{a}}{\mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right) - b}
\] |
associate-*l/ [<=]78.4 | \[ -0.5 \cdot \frac{\color{blue}{\frac{-4 \cdot a}{a} \cdot c}}{\mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right) - b}
\] |
associate-*r/ [<=]78.4 | \[ -0.5 \cdot \color{blue}{\left(\frac{-4 \cdot a}{a} \cdot \frac{c}{\mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right) - b}\right)}
\] |
associate-/l* [=>]78.4 | \[ -0.5 \cdot \left(\color{blue}{\frac{-4}{\frac{a}{a}}} \cdot \frac{c}{\mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right) - b}\right)
\] |
*-inverses [=>]78.4 | \[ -0.5 \cdot \left(\frac{-4}{\color{blue}{1}} \cdot \frac{c}{\mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right) - b}\right)
\] |
metadata-eval [=>]78.4 | \[ -0.5 \cdot \left(\color{blue}{-4} \cdot \frac{c}{\mathsf{hypot}\left(\sqrt{c \cdot \left(-4 \cdot a\right)}, b\right) - b}\right)
\] |
*-commutative [=>]78.4 | \[ -0.5 \cdot \left(-4 \cdot \frac{c}{\mathsf{hypot}\left(\sqrt{\color{blue}{\left(-4 \cdot a\right) \cdot c}}, b\right) - b}\right)
\] |
associate-*l* [=>]78.4 | \[ -0.5 \cdot \left(-4 \cdot \frac{c}{\mathsf{hypot}\left(\sqrt{\color{blue}{-4 \cdot \left(a \cdot c\right)}}, b\right) - b}\right)
\] |
*-commutative [<=]78.4 | \[ -0.5 \cdot \left(-4 \cdot \frac{c}{\mathsf{hypot}\left(\sqrt{-4 \cdot \color{blue}{\left(c \cdot a\right)}}, b\right) - b}\right)
\] |
if 1.24999999999999999e-221 < b < 1.1199999999999999e135Initial program 88.1%
Simplified88.1%
[Start]88.1 | \[ \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2 \cdot a}
\] |
|---|---|
/-rgt-identity [<=]88.1 | \[ \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{\color{blue}{\frac{2 \cdot a}{1}}}
\] |
metadata-eval [<=]88.1 | \[ \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{\frac{2 \cdot a}{\color{blue}{--1}}}
\] |
associate-/l* [=>]87.9 | \[ \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{\color{blue}{\frac{2}{\frac{--1}{a}}}}
\] |
associate-/r/ [=>]87.8 | \[ \color{blue}{\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2} \cdot \frac{--1}{a}}
\] |
*-commutative [<=]87.8 | \[ \color{blue}{\frac{--1}{a} \cdot \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2}}
\] |
metadata-eval [=>]87.8 | \[ \frac{\color{blue}{1}}{a} \cdot \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2}
\] |
metadata-eval [<=]87.8 | \[ \frac{\color{blue}{-1 \cdot -1}}{a} \cdot \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2}
\] |
associate-*l/ [<=]87.8 | \[ \color{blue}{\left(\frac{-1}{a} \cdot -1\right)} \cdot \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2}
\] |
associate-/r/ [<=]87.8 | \[ \color{blue}{\frac{-1}{\frac{a}{-1}}} \cdot \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{2}
\] |
times-frac [<=]88.1 | \[ \color{blue}{\frac{-1 \cdot \left(\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}\right)}{\frac{a}{-1} \cdot 2}}
\] |
*-commutative [<=]88.1 | \[ \frac{-1 \cdot \left(\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}\right)}{\color{blue}{2 \cdot \frac{a}{-1}}}
\] |
times-frac [=>]88.1 | \[ \color{blue}{\frac{-1}{2} \cdot \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{\frac{a}{-1}}}
\] |
metadata-eval [=>]88.1 | \[ \color{blue}{-0.5} \cdot \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{\frac{a}{-1}}
\] |
associate-/r/ [=>]88.1 | \[ -0.5 \cdot \color{blue}{\left(\frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{a} \cdot -1\right)}
\] |
*-commutative [<=]88.1 | \[ -0.5 \cdot \color{blue}{\left(-1 \cdot \frac{\left(-b\right) - \sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{a}\right)}
\] |
div-sub [=>]88.1 | \[ -0.5 \cdot \left(-1 \cdot \color{blue}{\left(\frac{-b}{a} - \frac{\sqrt{b \cdot b - 4 \cdot \left(a \cdot c\right)}}{a}\right)}\right)
\] |
Applied egg-rr88.1%
[Start]88.1 | \[ -0.5 \cdot \frac{b + \sqrt{\mathsf{fma}\left(a, c \cdot -4, b \cdot b\right)}}{a}
\] |
|---|---|
fma-udef [=>]88.1 | \[ -0.5 \cdot \frac{b + \sqrt{\color{blue}{a \cdot \left(c \cdot -4\right) + b \cdot b}}}{a}
\] |
associate-*r* [=>]88.1 | \[ -0.5 \cdot \frac{b + \sqrt{\color{blue}{\left(a \cdot c\right) \cdot -4} + b \cdot b}}{a}
\] |
if 1.1199999999999999e135 < b Initial program 11.9%
Taylor expanded in b around inf 95.2%
Simplified95.2%
[Start]95.2 | \[ \frac{c}{b} + -1 \cdot \frac{b}{a}
\] |
|---|---|
mul-1-neg [=>]95.2 | \[ \frac{c}{b} + \color{blue}{\left(-\frac{b}{a}\right)}
\] |
unsub-neg [=>]95.2 | \[ \color{blue}{\frac{c}{b} - \frac{b}{a}}
\] |
Final simplification87.1%
| Alternative 1 | |
|---|---|
| Accuracy | 82.6% |
| Cost | 7624 |
| Alternative 2 | |
|---|---|
| Accuracy | 82.7% |
| Cost | 7624 |
| Alternative 3 | |
|---|---|
| Accuracy | 76.4% |
| Cost | 7368 |
| Alternative 4 | |
|---|---|
| Accuracy | 63.6% |
| Cost | 388 |
| Alternative 5 | |
|---|---|
| Accuracy | 29.7% |
| Cost | 256 |
herbie shell --seed 2023152
(FPCore (a b c)
:name "The quadratic formula (r2)"
:precision binary64
:herbie-target
(if (< b 0.0) (/ c (* a (/ (+ (- b) (sqrt (- (* b b) (* 4.0 (* a c))))) (* 2.0 a)))) (/ (- (- b) (sqrt (- (* b b) (* 4.0 (* a c))))) (* 2.0 a)))
(/ (- (- b) (sqrt (- (* b b) (* 4.0 (* a c))))) (* 2.0 a)))