| Alternative 1 | |
|---|---|
| Accuracy | 50.1% |
| Cost | 28104 |
(FPCore (A B C F)
:precision binary64
(/
(-
(sqrt
(*
(* 2.0 (* (- (pow B 2.0) (* (* 4.0 A) C)) F))
(+ (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
(- (pow B 2.0) (* (* 4.0 A) C))))(FPCore (A B C F)
:precision binary64
(let* ((t_0 (* C (* A -4.0)))
(t_1 (fma B B t_0))
(t_2 (* A (* C -4.0)))
(t_3 (fma B B t_2))
(t_4 (+ (pow B 2.0) t_0))
(t_5
(-
(/
(sqrt
(*
(* 2.0 (* t_4 F))
(+ (+ A C) (sqrt (+ (pow B 2.0) (pow (- A C) 2.0))))))
t_4)))
(t_6 (sqrt (+ A (+ C (hypot B (- A C)))))))
(if (<= t_5 -5e-194)
(* (- t_6) (/ (* (sqrt (* 2.0 t_3)) (sqrt F)) t_3))
(if (<= t_5 2e-75)
(-
(/
(sqrt (* 2.0 (* t_1 (* F (fma 2.0 C (/ (* -0.5 (* B B)) A))))))
t_1))
(if (<= t_5 INFINITY)
(* t_6 (- (/ (sqrt (+ (* (* B B) (* 2.0 F)) (* t_2 (* 2.0 F)))) t_3)))
(* t_6 (* (sqrt F) (/ (sqrt 2.0) B))))))))double code(double A, double B, double C, double F) {
return -sqrt(((2.0 * ((pow(B, 2.0) - ((4.0 * A) * C)) * F)) * ((A + C) + sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / (pow(B, 2.0) - ((4.0 * A) * C));
}
double code(double A, double B, double C, double F) {
double t_0 = C * (A * -4.0);
double t_1 = fma(B, B, t_0);
double t_2 = A * (C * -4.0);
double t_3 = fma(B, B, t_2);
double t_4 = pow(B, 2.0) + t_0;
double t_5 = -(sqrt(((2.0 * (t_4 * F)) * ((A + C) + sqrt((pow(B, 2.0) + pow((A - C), 2.0)))))) / t_4);
double t_6 = sqrt((A + (C + hypot(B, (A - C)))));
double tmp;
if (t_5 <= -5e-194) {
tmp = -t_6 * ((sqrt((2.0 * t_3)) * sqrt(F)) / t_3);
} else if (t_5 <= 2e-75) {
tmp = -(sqrt((2.0 * (t_1 * (F * fma(2.0, C, ((-0.5 * (B * B)) / A)))))) / t_1);
} else if (t_5 <= ((double) INFINITY)) {
tmp = t_6 * -(sqrt((((B * B) * (2.0 * F)) + (t_2 * (2.0 * F)))) / t_3);
} else {
tmp = t_6 * (sqrt(F) * (sqrt(2.0) / B));
}
return tmp;
}
function code(A, B, C, F) return Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(Float64((B ^ 2.0) - Float64(Float64(4.0 * A) * C)) * F)) * Float64(Float64(A + C) + sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))))) / Float64((B ^ 2.0) - Float64(Float64(4.0 * A) * C))) end
function code(A, B, C, F) t_0 = Float64(C * Float64(A * -4.0)) t_1 = fma(B, B, t_0) t_2 = Float64(A * Float64(C * -4.0)) t_3 = fma(B, B, t_2) t_4 = Float64((B ^ 2.0) + t_0) t_5 = Float64(-Float64(sqrt(Float64(Float64(2.0 * Float64(t_4 * F)) * Float64(Float64(A + C) + sqrt(Float64((B ^ 2.0) + (Float64(A - C) ^ 2.0)))))) / t_4)) t_6 = sqrt(Float64(A + Float64(C + hypot(B, Float64(A - C))))) tmp = 0.0 if (t_5 <= -5e-194) tmp = Float64(Float64(-t_6) * Float64(Float64(sqrt(Float64(2.0 * t_3)) * sqrt(F)) / t_3)); elseif (t_5 <= 2e-75) tmp = Float64(-Float64(sqrt(Float64(2.0 * Float64(t_1 * Float64(F * fma(2.0, C, Float64(Float64(-0.5 * Float64(B * B)) / A)))))) / t_1)); elseif (t_5 <= Inf) tmp = Float64(t_6 * Float64(-Float64(sqrt(Float64(Float64(Float64(B * B) * Float64(2.0 * F)) + Float64(t_2 * Float64(2.0 * F)))) / t_3))); else tmp = Float64(t_6 * Float64(sqrt(F) * Float64(sqrt(2.0) / B))); end return tmp end
code[A_, B_, C_, F_] := N[((-N[Sqrt[N[(N[(2.0 * N[(N[(N[Power[B, 2.0], $MachinePrecision] - N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] + N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / N[(N[Power[B, 2.0], $MachinePrecision] - N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(C * N[(A * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(B * B + t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(B * B + t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[Power[B, 2.0], $MachinePrecision] + t$95$0), $MachinePrecision]}, Block[{t$95$5 = (-N[(N[Sqrt[N[(N[(2.0 * N[(t$95$4 * F), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] + N[Sqrt[N[(N[Power[B, 2.0], $MachinePrecision] + N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$4), $MachinePrecision])}, Block[{t$95$6 = N[Sqrt[N[(A + N[(C + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$5, -5e-194], N[((-t$95$6) * N[(N[(N[Sqrt[N[(2.0 * t$95$3), $MachinePrecision]], $MachinePrecision] * N[Sqrt[F], $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, 2e-75], (-N[(N[Sqrt[N[(2.0 * N[(t$95$1 * N[(F * N[(2.0 * C + N[(N[(-0.5 * N[(B * B), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$1), $MachinePrecision]), If[LessEqual[t$95$5, Infinity], N[(t$95$6 * (-N[(N[Sqrt[N[(N[(N[(B * B), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$3), $MachinePrecision])), $MachinePrecision], N[(t$95$6 * N[(N[Sqrt[F], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}
\begin{array}{l}
t_0 := C \cdot \left(A \cdot -4\right)\\
t_1 := \mathsf{fma}\left(B, B, t_0\right)\\
t_2 := A \cdot \left(C \cdot -4\right)\\
t_3 := \mathsf{fma}\left(B, B, t_2\right)\\
t_4 := {B}^{2} + t_0\\
t_5 := -\frac{\sqrt{\left(2 \cdot \left(t_4 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}}{t_4}\\
t_6 := \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)}\\
\mathbf{if}\;t_5 \leq -5 \cdot 10^{-194}:\\
\;\;\;\;\left(-t_6\right) \cdot \frac{\sqrt{2 \cdot t_3} \cdot \sqrt{F}}{t_3}\\
\mathbf{elif}\;t_5 \leq 2 \cdot 10^{-75}:\\
\;\;\;\;-\frac{\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \mathsf{fma}\left(2, C, \frac{-0.5 \cdot \left(B \cdot B\right)}{A}\right)\right)\right)}}{t_1}\\
\mathbf{elif}\;t_5 \leq \infty:\\
\;\;\;\;t_6 \cdot \left(-\frac{\sqrt{\left(B \cdot B\right) \cdot \left(2 \cdot F\right) + t_2 \cdot \left(2 \cdot F\right)}}{t_3}\right)\\
\mathbf{else}:\\
\;\;\;\;t_6 \cdot \left(\sqrt{F} \cdot \frac{\sqrt{2}}{B}\right)\\
\end{array}
if (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) < -5.0000000000000002e-194Initial program 40.5%
Simplified40.4%
[Start]40.5 | \[ \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}
\] |
|---|
Applied egg-rr63.8%
[Start]40.4 | \[ \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
|---|---|
associate-*r* [=>]40.5 | \[ \frac{-\sqrt{\color{blue}{\left(2 \cdot \left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
sqrt-prod [=>]47.5 | \[ \frac{-\color{blue}{\sqrt{2 \cdot \left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right)} \cdot \sqrt{\left(A + C\right) + \sqrt{B \cdot B + {\left(A - C\right)}^{2}}}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
fma-neg [=>]47.5 | \[ \frac{-\sqrt{2 \cdot \left(\color{blue}{\mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right)} \cdot F\right)} \cdot \sqrt{\left(A + C\right) + \sqrt{B \cdot B + {\left(A - C\right)}^{2}}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
distribute-lft-neg-in [=>]47.5 | \[ \frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, \color{blue}{\left(-4\right) \cdot \left(A \cdot C\right)}\right) \cdot F\right)} \cdot \sqrt{\left(A + C\right) + \sqrt{B \cdot B + {\left(A - C\right)}^{2}}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
*-commutative [=>]47.5 | \[ \frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, \color{blue}{\left(A \cdot C\right) \cdot \left(-4\right)}\right) \cdot F\right)} \cdot \sqrt{\left(A + C\right) + \sqrt{B \cdot B + {\left(A - C\right)}^{2}}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
metadata-eval [=>]47.5 | \[ \frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, \left(A \cdot C\right) \cdot \color{blue}{-4}\right) \cdot F\right)} \cdot \sqrt{\left(A + C\right) + \sqrt{B \cdot B + {\left(A - C\right)}^{2}}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
associate-+l+ [=>]47.5 | \[ \frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, \left(A \cdot C\right) \cdot -4\right) \cdot F\right)} \cdot \sqrt{\color{blue}{A + \left(C + \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
unpow2 [=>]47.5 | \[ \frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, \left(A \cdot C\right) \cdot -4\right) \cdot F\right)} \cdot \sqrt{A + \left(C + \sqrt{B \cdot B + \color{blue}{\left(A - C\right) \cdot \left(A - C\right)}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
hypot-def [=>]63.8 | \[ \frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, \left(A \cdot C\right) \cdot -4\right) \cdot F\right)} \cdot \sqrt{A + \left(C + \color{blue}{\mathsf{hypot}\left(B, A - C\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
Simplified63.7%
[Start]63.8 | \[ \frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, \left(A \cdot C\right) \cdot -4\right) \cdot F\right)} \cdot \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
|---|---|
*-commutative [=>]63.8 | \[ \frac{-\color{blue}{\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, \left(A \cdot C\right) \cdot -4\right) \cdot F\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
associate-*r* [=>]63.7 | \[ \frac{-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \sqrt{\color{blue}{\left(2 \cdot \mathsf{fma}\left(B, B, \left(A \cdot C\right) \cdot -4\right)\right) \cdot F}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
associate-*l* [=>]63.7 | \[ \frac{-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \sqrt{\left(2 \cdot \mathsf{fma}\left(B, B, \color{blue}{A \cdot \left(C \cdot -4\right)}\right)\right) \cdot F}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
Applied egg-rr63.6%
[Start]63.7 | \[ \frac{-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \sqrt{\left(2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\right) \cdot F}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
|---|---|
div-inv [=>]63.5 | \[ \color{blue}{\left(-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \sqrt{\left(2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\right) \cdot F}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}}
\] |
distribute-rgt-neg-in [=>]63.5 | \[ \color{blue}{\left(\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(-\sqrt{\left(2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\right) \cdot F}\right)\right)} \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
associate-*l* [=>]63.5 | \[ \color{blue}{\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(\left(-\sqrt{\left(2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\right) \cdot F}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\right)}
\] |
*-commutative [=>]63.5 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(\left(-\sqrt{\color{blue}{\left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot 2\right)} \cdot F}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\right)
\] |
associate-*l* [=>]63.6 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(\left(-\sqrt{\color{blue}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)}}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\right)
\] |
fma-neg [=>]63.6 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(\left(-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)}\right) \cdot \frac{1}{\color{blue}{\mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right)}}\right)
\] |
distribute-lft-neg-in [=>]63.6 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(\left(-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)}\right) \cdot \frac{1}{\mathsf{fma}\left(B, B, \color{blue}{\left(-4\right) \cdot \left(A \cdot C\right)}\right)}\right)
\] |
metadata-eval [=>]63.6 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(\left(-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)}\right) \cdot \frac{1}{\mathsf{fma}\left(B, B, \color{blue}{-4} \cdot \left(A \cdot C\right)\right)}\right)
\] |
*-commutative [<=]63.6 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(\left(-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)}\right) \cdot \frac{1}{\mathsf{fma}\left(B, B, \color{blue}{\left(A \cdot C\right) \cdot -4}\right)}\right)
\] |
associate-*r* [<=]63.6 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(\left(-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)}\right) \cdot \frac{1}{\mathsf{fma}\left(B, B, \color{blue}{A \cdot \left(C \cdot -4\right)}\right)}\right)
\] |
Simplified63.8%
[Start]63.6 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(\left(-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)}\right) \cdot \frac{1}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\right)
\] |
|---|---|
distribute-lft-neg-out [=>]63.6 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \color{blue}{\left(-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)} \cdot \frac{1}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\right)}
\] |
associate-*r/ [=>]63.8 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(-\color{blue}{\frac{\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)} \cdot 1}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}}\right)
\] |
*-rgt-identity [=>]63.8 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(-\frac{\color{blue}{\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\right)
\] |
distribute-frac-neg [<=]63.8 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \color{blue}{\frac{-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}}
\] |
Applied egg-rr79.8%
[Start]63.8 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \frac{-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
|---|---|
associate-*r* [=>]63.8 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \frac{-\sqrt{\color{blue}{\left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot 2\right) \cdot F}}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
sqrt-prod [=>]79.8 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \frac{-\color{blue}{\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot 2} \cdot \sqrt{F}}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
if -5.0000000000000002e-194 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) < 1.9999999999999999e-75Initial program 9.2%
Simplified11.4%
[Start]9.2 | \[ \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}
\] |
|---|
Taylor expanded in A around -inf 29.1%
Simplified29.1%
[Start]29.1 | \[ \frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right) \cdot \left(F \cdot \left(2 \cdot C + -0.5 \cdot \frac{{B}^{2}}{A}\right)\right)\right)}}{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)}
\] |
|---|---|
fma-def [=>]29.1 | \[ \frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right) \cdot \left(F \cdot \color{blue}{\mathsf{fma}\left(2, C, -0.5 \cdot \frac{{B}^{2}}{A}\right)}\right)\right)}}{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)}
\] |
associate-*r/ [=>]29.1 | \[ \frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right) \cdot \left(F \cdot \mathsf{fma}\left(2, C, \color{blue}{\frac{-0.5 \cdot {B}^{2}}{A}}\right)\right)\right)}}{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)}
\] |
unpow2 [=>]29.1 | \[ \frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right) \cdot \left(F \cdot \mathsf{fma}\left(2, C, \frac{-0.5 \cdot \color{blue}{\left(B \cdot B\right)}}{A}\right)\right)\right)}}{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)}
\] |
if 1.9999999999999999e-75 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) < +inf.0Initial program 35.3%
Simplified35.3%
[Start]35.3 | \[ \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}
\] |
|---|
Applied egg-rr82.4%
[Start]35.3 | \[ \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
|---|---|
associate-*r* [=>]35.3 | \[ \frac{-\sqrt{\color{blue}{\left(2 \cdot \left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
sqrt-prod [=>]39.3 | \[ \frac{-\color{blue}{\sqrt{2 \cdot \left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right)} \cdot \sqrt{\left(A + C\right) + \sqrt{B \cdot B + {\left(A - C\right)}^{2}}}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
fma-neg [=>]39.3 | \[ \frac{-\sqrt{2 \cdot \left(\color{blue}{\mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right)} \cdot F\right)} \cdot \sqrt{\left(A + C\right) + \sqrt{B \cdot B + {\left(A - C\right)}^{2}}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
distribute-lft-neg-in [=>]39.3 | \[ \frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, \color{blue}{\left(-4\right) \cdot \left(A \cdot C\right)}\right) \cdot F\right)} \cdot \sqrt{\left(A + C\right) + \sqrt{B \cdot B + {\left(A - C\right)}^{2}}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
*-commutative [=>]39.3 | \[ \frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, \color{blue}{\left(A \cdot C\right) \cdot \left(-4\right)}\right) \cdot F\right)} \cdot \sqrt{\left(A + C\right) + \sqrt{B \cdot B + {\left(A - C\right)}^{2}}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
metadata-eval [=>]39.3 | \[ \frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, \left(A \cdot C\right) \cdot \color{blue}{-4}\right) \cdot F\right)} \cdot \sqrt{\left(A + C\right) + \sqrt{B \cdot B + {\left(A - C\right)}^{2}}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
associate-+l+ [=>]39.3 | \[ \frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, \left(A \cdot C\right) \cdot -4\right) \cdot F\right)} \cdot \sqrt{\color{blue}{A + \left(C + \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
unpow2 [=>]39.3 | \[ \frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, \left(A \cdot C\right) \cdot -4\right) \cdot F\right)} \cdot \sqrt{A + \left(C + \sqrt{B \cdot B + \color{blue}{\left(A - C\right) \cdot \left(A - C\right)}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
hypot-def [=>]82.4 | \[ \frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, \left(A \cdot C\right) \cdot -4\right) \cdot F\right)} \cdot \sqrt{A + \left(C + \color{blue}{\mathsf{hypot}\left(B, A - C\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
Simplified82.1%
[Start]82.4 | \[ \frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, \left(A \cdot C\right) \cdot -4\right) \cdot F\right)} \cdot \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
|---|---|
*-commutative [=>]82.4 | \[ \frac{-\color{blue}{\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, \left(A \cdot C\right) \cdot -4\right) \cdot F\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
associate-*r* [=>]82.5 | \[ \frac{-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \sqrt{\color{blue}{\left(2 \cdot \mathsf{fma}\left(B, B, \left(A \cdot C\right) \cdot -4\right)\right) \cdot F}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
associate-*l* [=>]82.1 | \[ \frac{-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \sqrt{\left(2 \cdot \mathsf{fma}\left(B, B, \color{blue}{A \cdot \left(C \cdot -4\right)}\right)\right) \cdot F}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
Applied egg-rr81.7%
[Start]82.1 | \[ \frac{-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \sqrt{\left(2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\right) \cdot F}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
|---|---|
div-inv [=>]81.7 | \[ \color{blue}{\left(-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \sqrt{\left(2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\right) \cdot F}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}}
\] |
distribute-rgt-neg-in [=>]81.7 | \[ \color{blue}{\left(\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(-\sqrt{\left(2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\right) \cdot F}\right)\right)} \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
associate-*l* [=>]81.7 | \[ \color{blue}{\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(\left(-\sqrt{\left(2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\right) \cdot F}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\right)}
\] |
*-commutative [=>]81.7 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(\left(-\sqrt{\color{blue}{\left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot 2\right)} \cdot F}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\right)
\] |
associate-*l* [=>]81.7 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(\left(-\sqrt{\color{blue}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)}}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\right)
\] |
fma-neg [=>]81.7 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(\left(-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)}\right) \cdot \frac{1}{\color{blue}{\mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right)}}\right)
\] |
distribute-lft-neg-in [=>]81.7 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(\left(-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)}\right) \cdot \frac{1}{\mathsf{fma}\left(B, B, \color{blue}{\left(-4\right) \cdot \left(A \cdot C\right)}\right)}\right)
\] |
metadata-eval [=>]81.7 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(\left(-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)}\right) \cdot \frac{1}{\mathsf{fma}\left(B, B, \color{blue}{-4} \cdot \left(A \cdot C\right)\right)}\right)
\] |
*-commutative [<=]81.7 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(\left(-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)}\right) \cdot \frac{1}{\mathsf{fma}\left(B, B, \color{blue}{\left(A \cdot C\right) \cdot -4}\right)}\right)
\] |
associate-*r* [<=]81.7 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(\left(-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)}\right) \cdot \frac{1}{\mathsf{fma}\left(B, B, \color{blue}{A \cdot \left(C \cdot -4\right)}\right)}\right)
\] |
Simplified82.1%
[Start]81.7 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(\left(-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)}\right) \cdot \frac{1}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\right)
\] |
|---|---|
distribute-lft-neg-out [=>]81.7 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \color{blue}{\left(-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)} \cdot \frac{1}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\right)}
\] |
associate-*r/ [=>]82.1 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(-\color{blue}{\frac{\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)} \cdot 1}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}}\right)
\] |
*-rgt-identity [=>]82.1 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(-\frac{\color{blue}{\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\right)
\] |
distribute-frac-neg [<=]82.1 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \color{blue}{\frac{-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}}
\] |
Applied egg-rr82.1%
[Start]82.1 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \frac{-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
|---|---|
*-commutative [=>]82.1 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \frac{-\sqrt{\color{blue}{\left(2 \cdot F\right) \cdot \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
fma-udef [=>]82.1 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \frac{-\sqrt{\left(2 \cdot F\right) \cdot \color{blue}{\left(B \cdot B + A \cdot \left(C \cdot -4\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
distribute-rgt-in [=>]82.1 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \frac{-\sqrt{\color{blue}{\left(B \cdot B\right) \cdot \left(2 \cdot F\right) + \left(A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
if +inf.0 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) Initial program 0.0%
Simplified0.0%
[Start]0.0 | \[ \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}
\] |
|---|
Applied egg-rr0.1%
[Start]0.0 | \[ \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
|---|---|
associate-*r* [=>]0.0 | \[ \frac{-\sqrt{\color{blue}{\left(2 \cdot \left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
sqrt-prod [=>]0.0 | \[ \frac{-\color{blue}{\sqrt{2 \cdot \left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right)} \cdot \sqrt{\left(A + C\right) + \sqrt{B \cdot B + {\left(A - C\right)}^{2}}}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
fma-neg [=>]0.0 | \[ \frac{-\sqrt{2 \cdot \left(\color{blue}{\mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right)} \cdot F\right)} \cdot \sqrt{\left(A + C\right) + \sqrt{B \cdot B + {\left(A - C\right)}^{2}}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
distribute-lft-neg-in [=>]0.0 | \[ \frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, \color{blue}{\left(-4\right) \cdot \left(A \cdot C\right)}\right) \cdot F\right)} \cdot \sqrt{\left(A + C\right) + \sqrt{B \cdot B + {\left(A - C\right)}^{2}}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
*-commutative [=>]0.0 | \[ \frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, \color{blue}{\left(A \cdot C\right) \cdot \left(-4\right)}\right) \cdot F\right)} \cdot \sqrt{\left(A + C\right) + \sqrt{B \cdot B + {\left(A - C\right)}^{2}}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
metadata-eval [=>]0.0 | \[ \frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, \left(A \cdot C\right) \cdot \color{blue}{-4}\right) \cdot F\right)} \cdot \sqrt{\left(A + C\right) + \sqrt{B \cdot B + {\left(A - C\right)}^{2}}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
associate-+l+ [=>]0.0 | \[ \frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, \left(A \cdot C\right) \cdot -4\right) \cdot F\right)} \cdot \sqrt{\color{blue}{A + \left(C + \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
unpow2 [=>]0.0 | \[ \frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, \left(A \cdot C\right) \cdot -4\right) \cdot F\right)} \cdot \sqrt{A + \left(C + \sqrt{B \cdot B + \color{blue}{\left(A - C\right) \cdot \left(A - C\right)}}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
hypot-def [=>]0.1 | \[ \frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, \left(A \cdot C\right) \cdot -4\right) \cdot F\right)} \cdot \sqrt{A + \left(C + \color{blue}{\mathsf{hypot}\left(B, A - C\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
Simplified0.1%
[Start]0.1 | \[ \frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, \left(A \cdot C\right) \cdot -4\right) \cdot F\right)} \cdot \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
|---|---|
*-commutative [=>]0.1 | \[ \frac{-\color{blue}{\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, \left(A \cdot C\right) \cdot -4\right) \cdot F\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
associate-*r* [=>]0.1 | \[ \frac{-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \sqrt{\color{blue}{\left(2 \cdot \mathsf{fma}\left(B, B, \left(A \cdot C\right) \cdot -4\right)\right) \cdot F}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
associate-*l* [=>]0.1 | \[ \frac{-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \sqrt{\left(2 \cdot \mathsf{fma}\left(B, B, \color{blue}{A \cdot \left(C \cdot -4\right)}\right)\right) \cdot F}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
Applied egg-rr0.1%
[Start]0.1 | \[ \frac{-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \sqrt{\left(2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\right) \cdot F}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
|---|---|
div-inv [=>]0.1 | \[ \color{blue}{\left(-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \sqrt{\left(2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\right) \cdot F}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}}
\] |
distribute-rgt-neg-in [=>]0.1 | \[ \color{blue}{\left(\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(-\sqrt{\left(2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\right) \cdot F}\right)\right)} \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
associate-*l* [=>]0.1 | \[ \color{blue}{\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(\left(-\sqrt{\left(2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\right) \cdot F}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\right)}
\] |
*-commutative [=>]0.1 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(\left(-\sqrt{\color{blue}{\left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot 2\right)} \cdot F}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\right)
\] |
associate-*l* [=>]0.1 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(\left(-\sqrt{\color{blue}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)}}\right) \cdot \frac{1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\right)
\] |
fma-neg [=>]0.1 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(\left(-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)}\right) \cdot \frac{1}{\color{blue}{\mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right)}}\right)
\] |
distribute-lft-neg-in [=>]0.1 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(\left(-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)}\right) \cdot \frac{1}{\mathsf{fma}\left(B, B, \color{blue}{\left(-4\right) \cdot \left(A \cdot C\right)}\right)}\right)
\] |
metadata-eval [=>]0.1 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(\left(-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)}\right) \cdot \frac{1}{\mathsf{fma}\left(B, B, \color{blue}{-4} \cdot \left(A \cdot C\right)\right)}\right)
\] |
*-commutative [<=]0.1 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(\left(-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)}\right) \cdot \frac{1}{\mathsf{fma}\left(B, B, \color{blue}{\left(A \cdot C\right) \cdot -4}\right)}\right)
\] |
associate-*r* [<=]0.1 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(\left(-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)}\right) \cdot \frac{1}{\mathsf{fma}\left(B, B, \color{blue}{A \cdot \left(C \cdot -4\right)}\right)}\right)
\] |
Simplified0.1%
[Start]0.1 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(\left(-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)}\right) \cdot \frac{1}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\right)
\] |
|---|---|
distribute-lft-neg-out [=>]0.1 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \color{blue}{\left(-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)} \cdot \frac{1}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\right)}
\] |
associate-*r/ [=>]0.1 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(-\color{blue}{\frac{\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)} \cdot 1}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}}\right)
\] |
*-rgt-identity [=>]0.1 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(-\frac{\color{blue}{\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\right)
\] |
distribute-frac-neg [<=]0.1 | \[ \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \color{blue}{\frac{-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}}
\] |
Taylor expanded in B around -inf 21.3%
Final simplification47.1%
| Alternative 1 | |
|---|---|
| Accuracy | 50.1% |
| Cost | 28104 |
| Alternative 2 | |
|---|---|
| Accuracy | 45.6% |
| Cost | 27984 |
| Alternative 3 | |
|---|---|
| Accuracy | 45.8% |
| Cost | 27984 |
| Alternative 4 | |
|---|---|
| Accuracy | 50.0% |
| Cost | 27848 |
| Alternative 5 | |
|---|---|
| Accuracy | 44.2% |
| Cost | 27720 |
| Alternative 6 | |
|---|---|
| Accuracy | 43.1% |
| Cost | 27088 |
| Alternative 7 | |
|---|---|
| Accuracy | 38.1% |
| Cost | 26628 |
| Alternative 8 | |
|---|---|
| Accuracy | 26.8% |
| Cost | 22360 |
| Alternative 9 | |
|---|---|
| Accuracy | 25.1% |
| Cost | 21656 |
| Alternative 10 | |
|---|---|
| Accuracy | 25.3% |
| Cost | 21656 |
| Alternative 11 | |
|---|---|
| Accuracy | 26.3% |
| Cost | 21588 |
| Alternative 12 | |
|---|---|
| Accuracy | 25.5% |
| Cost | 21132 |
| Alternative 13 | |
|---|---|
| Accuracy | 26.6% |
| Cost | 21132 |
| Alternative 14 | |
|---|---|
| Accuracy | 25.7% |
| Cost | 14988 |
| Alternative 15 | |
|---|---|
| Accuracy | 20.9% |
| Cost | 14732 |
| Alternative 16 | |
|---|---|
| Accuracy | 25.6% |
| Cost | 14732 |
| Alternative 17 | |
|---|---|
| Accuracy | 24.7% |
| Cost | 13580 |
| Alternative 18 | |
|---|---|
| Accuracy | 19.3% |
| Cost | 13188 |
| Alternative 19 | |
|---|---|
| Accuracy | 19.3% |
| Cost | 8848 |
| Alternative 20 | |
|---|---|
| Accuracy | 15.5% |
| Cost | 8584 |
| Alternative 21 | |
|---|---|
| Accuracy | 15.8% |
| Cost | 8584 |
| Alternative 22 | |
|---|---|
| Accuracy | 16.7% |
| Cost | 8204 |
| Alternative 23 | |
|---|---|
| Accuracy | 14.4% |
| Cost | 7945 |
| Alternative 24 | |
|---|---|
| Accuracy | 16.5% |
| Cost | 7940 |
| Alternative 25 | |
|---|---|
| Accuracy | 15.6% |
| Cost | 7876 |
| Alternative 26 | |
|---|---|
| Accuracy | 11.4% |
| Cost | 6656 |
| Alternative 27 | |
|---|---|
| Accuracy | 1.2% |
| Cost | 6592 |
herbie shell --seed 2023126
(FPCore (A B C F)
:name "ABCF->ab-angle a"
:precision binary64
(/ (- (sqrt (* (* 2.0 (* (- (pow B 2.0) (* (* 4.0 A) C)) F)) (+ (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))) (- (pow B 2.0) (* (* 4.0 A) C))))