| Alternative 1 | |
|---|---|
| Accuracy | 41.3% |
| Cost | 34128 |
(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 (sqrt (fma C (* A -8.0) (* B (* B 2.0)))))
(t_1
(*
t_0
(/ (- (sqrt (* F (- A (hypot B A))))) (fma B B (* -4.0 (* A C))))))
(t_2 (/ (* t_0 (- (sqrt (* F (+ A A))))) (fma B B (* A (* C -4.0)))))
(t_3 (* (- A (hypot A B)) F)))
(if (<= B -1.95)
(/ 1.0 (/ B (sqrt (* 2.0 t_3))))
(if (<= B -5.8e-213)
t_1
(if (<= B -1.55e-285)
(/
(-
(sqrt
(*
2.0
(fma
C
(* F (+ (* B B) (* -8.0 (* A A))))
(* 2.0 (* A (* B (* B F))))))))
(- (* B B) (* (* A C) 4.0)))
(if (<= B 5.1e-287)
(sqrt (/ F (* -2.0 (/ (* A C) (+ A A)))))
(if (<= B 1.3e-237)
t_2
(if (<= B 6.5e-169)
(sqrt (/ F (- C)))
(if (<= B 2.9e-128)
t_2
(if (<= B 2.5e-59)
(sqrt (/ F (- (/ (* (* B B) 0.25) A) C)))
(if (<= B 8.6e+49)
t_1
(* (sqrt t_3) (/ (- (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 = sqrt(fma(C, (A * -8.0), (B * (B * 2.0))));
double t_1 = t_0 * (-sqrt((F * (A - hypot(B, A)))) / fma(B, B, (-4.0 * (A * C))));
double t_2 = (t_0 * -sqrt((F * (A + A)))) / fma(B, B, (A * (C * -4.0)));
double t_3 = (A - hypot(A, B)) * F;
double tmp;
if (B <= -1.95) {
tmp = 1.0 / (B / sqrt((2.0 * t_3)));
} else if (B <= -5.8e-213) {
tmp = t_1;
} else if (B <= -1.55e-285) {
tmp = -sqrt((2.0 * fma(C, (F * ((B * B) + (-8.0 * (A * A)))), (2.0 * (A * (B * (B * F))))))) / ((B * B) - ((A * C) * 4.0));
} else if (B <= 5.1e-287) {
tmp = sqrt((F / (-2.0 * ((A * C) / (A + A)))));
} else if (B <= 1.3e-237) {
tmp = t_2;
} else if (B <= 6.5e-169) {
tmp = sqrt((F / -C));
} else if (B <= 2.9e-128) {
tmp = t_2;
} else if (B <= 2.5e-59) {
tmp = sqrt((F / ((((B * B) * 0.25) / A) - C)));
} else if (B <= 8.6e+49) {
tmp = t_1;
} else {
tmp = sqrt(t_3) * (-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 = sqrt(fma(C, Float64(A * -8.0), Float64(B * Float64(B * 2.0)))) t_1 = Float64(t_0 * Float64(Float64(-sqrt(Float64(F * Float64(A - hypot(B, A))))) / fma(B, B, Float64(-4.0 * Float64(A * C))))) t_2 = Float64(Float64(t_0 * Float64(-sqrt(Float64(F * Float64(A + A))))) / fma(B, B, Float64(A * Float64(C * -4.0)))) t_3 = Float64(Float64(A - hypot(A, B)) * F) tmp = 0.0 if (B <= -1.95) tmp = Float64(1.0 / Float64(B / sqrt(Float64(2.0 * t_3)))); elseif (B <= -5.8e-213) tmp = t_1; elseif (B <= -1.55e-285) tmp = Float64(Float64(-sqrt(Float64(2.0 * fma(C, Float64(F * Float64(Float64(B * B) + Float64(-8.0 * Float64(A * A)))), Float64(2.0 * Float64(A * Float64(B * Float64(B * F)))))))) / Float64(Float64(B * B) - Float64(Float64(A * C) * 4.0))); elseif (B <= 5.1e-287) tmp = sqrt(Float64(F / Float64(-2.0 * Float64(Float64(A * C) / Float64(A + A))))); elseif (B <= 1.3e-237) tmp = t_2; elseif (B <= 6.5e-169) tmp = sqrt(Float64(F / Float64(-C))); elseif (B <= 2.9e-128) tmp = t_2; elseif (B <= 2.5e-59) tmp = sqrt(Float64(F / Float64(Float64(Float64(Float64(B * B) * 0.25) / A) - C))); elseif (B <= 8.6e+49) tmp = t_1; else tmp = Float64(sqrt(t_3) * Float64(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[Sqrt[N[(C * N[(A * -8.0), $MachinePrecision] + N[(B * N[(B * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[((-N[Sqrt[N[(F * N[(A - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / N[(B * B + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$0 * (-N[Sqrt[N[(F * N[(A + A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / N[(B * B + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(A - N[Sqrt[A ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision] * F), $MachinePrecision]}, If[LessEqual[B, -1.95], N[(1.0 / N[(B / N[Sqrt[N[(2.0 * t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -5.8e-213], t$95$1, If[LessEqual[B, -1.55e-285], N[((-N[Sqrt[N[(2.0 * N[(C * N[(F * N[(N[(B * B), $MachinePrecision] + N[(-8.0 * N[(A * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(A * N[(B * N[(B * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / N[(N[(B * B), $MachinePrecision] - N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.1e-287], N[Sqrt[N[(F / N[(-2.0 * N[(N[(A * C), $MachinePrecision] / N[(A + A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[B, 1.3e-237], t$95$2, If[LessEqual[B, 6.5e-169], N[Sqrt[N[(F / (-C)), $MachinePrecision]], $MachinePrecision], If[LessEqual[B, 2.9e-128], t$95$2, If[LessEqual[B, 2.5e-59], N[Sqrt[N[(F / N[(N[(N[(N[(B * B), $MachinePrecision] * 0.25), $MachinePrecision] / A), $MachinePrecision] - C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[B, 8.6e+49], t$95$1, N[(N[Sqrt[t$95$3], $MachinePrecision] * N[((-N[Sqrt[2.0], $MachinePrecision]) / B), $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 := \sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)}\\
t_1 := t_0 \cdot \frac{-\sqrt{F \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)}}{\mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right)}\\
t_2 := \frac{t_0 \cdot \left(-\sqrt{F \cdot \left(A + A\right)}\right)}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\
t_3 := \left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F\\
\mathbf{if}\;B \leq -1.95:\\
\;\;\;\;\frac{1}{\frac{B}{\sqrt{2 \cdot t_3}}}\\
\mathbf{elif}\;B \leq -5.8 \cdot 10^{-213}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq -1.55 \cdot 10^{-285}:\\
\;\;\;\;\frac{-\sqrt{2 \cdot \mathsf{fma}\left(C, F \cdot \left(B \cdot B + -8 \cdot \left(A \cdot A\right)\right), 2 \cdot \left(A \cdot \left(B \cdot \left(B \cdot F\right)\right)\right)\right)}}{B \cdot B - \left(A \cdot C\right) \cdot 4}\\
\mathbf{elif}\;B \leq 5.1 \cdot 10^{-287}:\\
\;\;\;\;\sqrt{\frac{F}{-2 \cdot \frac{A \cdot C}{A + A}}}\\
\mathbf{elif}\;B \leq 1.3 \cdot 10^{-237}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;B \leq 6.5 \cdot 10^{-169}:\\
\;\;\;\;\sqrt{\frac{F}{-C}}\\
\mathbf{elif}\;B \leq 2.9 \cdot 10^{-128}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;B \leq 2.5 \cdot 10^{-59}:\\
\;\;\;\;\sqrt{\frac{F}{\frac{\left(B \cdot B\right) \cdot 0.25}{A} - C}}\\
\mathbf{elif}\;B \leq 8.6 \cdot 10^{+49}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t_3} \cdot \frac{-\sqrt{2}}{B}\\
\end{array}
if B < -1.94999999999999996Initial program 14.5%
Simplified12.4%
[Start]14.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-rr1.1%
[Start]12.4 | \[ \frac{-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
|---|---|
add-sqr-sqrt [=>]0.6 | \[ \color{blue}{\sqrt{\frac{-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}} \cdot \sqrt{\frac{-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}}}
\] |
sqrt-unprod [=>]0.9 | \[ \color{blue}{\sqrt{\frac{-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \cdot \frac{-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}}}
\] |
frac-times [=>]0.9 | \[ \sqrt{\color{blue}{\frac{\left(-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}\right) \cdot \left(-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}\right)}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}}}
\] |
Simplified1.2%
[Start]1.1 | \[ \sqrt{\frac{F \cdot \left(\left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)\right)}{{\left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\right)}^{2}}}
\] |
|---|---|
associate-/l* [=>]1.2 | \[ \sqrt{\color{blue}{\frac{F}{\frac{{\left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\right)}^{2}}{\left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)}}}}
\] |
Taylor expanded in C around 0 20.2%
Simplified47.5%
[Start]20.2 | \[ \sqrt{\left(A - \sqrt{{B}^{2} + {A}^{2}}\right) \cdot F} \cdot \frac{\sqrt{2}}{B}
\] |
|---|---|
*-commutative [=>]20.2 | \[ \color{blue}{\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{{B}^{2} + {A}^{2}}\right) \cdot F}}
\] |
+-commutative [=>]20.2 | \[ \frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{\color{blue}{{A}^{2} + {B}^{2}}}\right) \cdot F}
\] |
unpow2 [=>]20.2 | \[ \frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{\color{blue}{A \cdot A} + {B}^{2}}\right) \cdot F}
\] |
unpow2 [=>]20.2 | \[ \frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{A \cdot A + \color{blue}{B \cdot B}}\right) \cdot F}
\] |
hypot-def [=>]47.5 | \[ \frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \color{blue}{\mathsf{hypot}\left(A, B\right)}\right) \cdot F}
\] |
Applied egg-rr47.6%
[Start]47.5 | \[ \frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F}
\] |
|---|---|
associate-*l/ [=>]47.5 | \[ \color{blue}{\frac{\sqrt{2} \cdot \sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F}}{B}}
\] |
clear-num [=>]47.5 | \[ \color{blue}{\frac{1}{\frac{B}{\sqrt{2} \cdot \sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F}}}}
\] |
sqrt-unprod [=>]47.6 | \[ \frac{1}{\frac{B}{\color{blue}{\sqrt{2 \cdot \left(\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F\right)}}}}
\] |
if -1.94999999999999996 < B < -5.7999999999999999e-213 or 2.5000000000000001e-59 < B < 8.5999999999999998e49Initial program 28.0%
Simplified33.9%
[Start]28.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-rr33.0%
[Start]33.9 | \[ \frac{-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
|---|---|
associate-*r* [=>]37.7 | \[ \frac{-\sqrt{\color{blue}{\left(F \cdot \left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
sqrt-prod [=>]34.9 | \[ \frac{-\color{blue}{\sqrt{F \cdot \left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right)} \cdot \sqrt{\mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
associate--r- [=>]33.0 | \[ \frac{-\sqrt{F \cdot \color{blue}{\left(\left(A - \mathsf{hypot}\left(B, A - C\right)\right) + C\right)}} \cdot \sqrt{\mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
+-commutative [=>]33.0 | \[ \frac{-\sqrt{F \cdot \color{blue}{\left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)}} \cdot \sqrt{\mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
*-commutative [=>]33.0 | \[ \frac{-\sqrt{F \cdot \left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{\mathsf{fma}\left(C, A \cdot -8, \color{blue}{\left(B \cdot B\right) \cdot 2}\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
associate-*l* [=>]33.0 | \[ \frac{-\sqrt{F \cdot \left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{\mathsf{fma}\left(C, A \cdot -8, \color{blue}{B \cdot \left(B \cdot 2\right)}\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
Simplified33.0%
[Start]33.0 | \[ \frac{-\sqrt{F \cdot \left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
|---|---|
unpow1/2 [<=]33.0 | \[ \frac{-\color{blue}{{\left(F \cdot \left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)}^{0.5}} \cdot \sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
*-commutative [=>]33.0 | \[ \frac{-\color{blue}{\sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)} \cdot {\left(F \cdot \left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)}^{0.5}}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
unpow1/2 [=>]33.0 | \[ \frac{-\sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)} \cdot \color{blue}{\sqrt{F \cdot \left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
Taylor expanded in C around 0 31.7%
Simplified37.6%
[Start]31.7 | \[ \frac{-\sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)} \cdot \sqrt{\left(A - \sqrt{{B}^{2} + {A}^{2}}\right) \cdot F}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
|---|---|
unpow2 [=>]31.7 | \[ \frac{-\sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)} \cdot \sqrt{\left(A - \sqrt{\color{blue}{B \cdot B} + {A}^{2}}\right) \cdot F}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
unpow2 [=>]31.7 | \[ \frac{-\sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)} \cdot \sqrt{\left(A - \sqrt{B \cdot B + \color{blue}{A \cdot A}}\right) \cdot F}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
hypot-def [=>]37.6 | \[ \frac{-\sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)} \cdot \sqrt{\left(A - \color{blue}{\mathsf{hypot}\left(B, A\right)}\right) \cdot F}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
Applied egg-rr36.2%
[Start]37.6 | \[ \frac{-\sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)} \cdot \sqrt{\left(A - \mathsf{hypot}\left(B, A\right)\right) \cdot F}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
|---|---|
div-inv [=>]37.3 | \[ \color{blue}{\left(-\sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)} \cdot \sqrt{\left(A - \mathsf{hypot}\left(B, A\right)\right) \cdot F}\right) \cdot \frac{1}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}}
\] |
distribute-rgt-neg-in [=>]37.3 | \[ \color{blue}{\left(\sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)} \cdot \left(-\sqrt{\left(A - \mathsf{hypot}\left(B, A\right)\right) \cdot F}\right)\right)} \cdot \frac{1}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
associate-*l* [=>]36.2 | \[ \color{blue}{\sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)} \cdot \left(\left(-\sqrt{\left(A - \mathsf{hypot}\left(B, A\right)\right) \cdot F}\right) \cdot \frac{1}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\right)}
\] |
Simplified36.3%
[Start]36.2 | \[ \sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)} \cdot \left(\left(-\sqrt{\left(A - \mathsf{hypot}\left(B, A\right)\right) \cdot F}\right) \cdot \frac{1}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\right)
\] |
|---|---|
*-commutative [=>]36.2 | \[ \sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \color{blue}{\left(2 \cdot B\right)}\right)} \cdot \left(\left(-\sqrt{\left(A - \mathsf{hypot}\left(B, A\right)\right) \cdot F}\right) \cdot \frac{1}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\right)
\] |
associate-*r/ [=>]36.3 | \[ \sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(2 \cdot B\right)\right)} \cdot \color{blue}{\frac{\left(-\sqrt{\left(A - \mathsf{hypot}\left(B, A\right)\right) \cdot F}\right) \cdot 1}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}}
\] |
*-rgt-identity [=>]36.3 | \[ \sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(2 \cdot B\right)\right)} \cdot \frac{\color{blue}{-\sqrt{\left(A - \mathsf{hypot}\left(B, A\right)\right) \cdot F}}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
*-commutative [=>]36.3 | \[ \sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(2 \cdot B\right)\right)} \cdot \frac{-\sqrt{\color{blue}{F \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
associate-*r* [=>]36.3 | \[ \sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(2 \cdot B\right)\right)} \cdot \frac{-\sqrt{F \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)}}{\mathsf{fma}\left(B, B, \color{blue}{\left(A \cdot C\right) \cdot -4}\right)}
\] |
if -5.7999999999999999e-213 < B < -1.55e-285Initial program 19.4%
Simplified19.3%
[Start]19.4 | \[ \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 26.9%
Simplified26.9%
[Start]26.9 | \[ \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) - -1 \cdot A\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
|---|---|
mul-1-neg [=>]26.9 | \[ \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) - \color{blue}{\left(-A\right)}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
Taylor expanded in C around 0 31.4%
Simplified31.0%
[Start]31.4 | \[ \frac{-\sqrt{2 \cdot \left(2 \cdot \left(A \cdot \left(F \cdot {B}^{2}\right)\right) + \left(F \cdot {B}^{2} + -8 \cdot \left({A}^{2} \cdot F\right)\right) \cdot C\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
|---|---|
+-commutative [=>]31.4 | \[ \frac{-\sqrt{2 \cdot \color{blue}{\left(\left(F \cdot {B}^{2} + -8 \cdot \left({A}^{2} \cdot F\right)\right) \cdot C + 2 \cdot \left(A \cdot \left(F \cdot {B}^{2}\right)\right)\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
*-commutative [=>]31.4 | \[ \frac{-\sqrt{2 \cdot \left(\color{blue}{C \cdot \left(F \cdot {B}^{2} + -8 \cdot \left({A}^{2} \cdot F\right)\right)} + 2 \cdot \left(A \cdot \left(F \cdot {B}^{2}\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
fma-def [=>]31.4 | \[ \frac{-\sqrt{2 \cdot \color{blue}{\mathsf{fma}\left(C, F \cdot {B}^{2} + -8 \cdot \left({A}^{2} \cdot F\right), 2 \cdot \left(A \cdot \left(F \cdot {B}^{2}\right)\right)\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
*-commutative [=>]31.4 | \[ \frac{-\sqrt{2 \cdot \mathsf{fma}\left(C, \color{blue}{{B}^{2} \cdot F} + -8 \cdot \left({A}^{2} \cdot F\right), 2 \cdot \left(A \cdot \left(F \cdot {B}^{2}\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
associate-*r* [=>]31.0 | \[ \frac{-\sqrt{2 \cdot \mathsf{fma}\left(C, {B}^{2} \cdot F + \color{blue}{\left(-8 \cdot {A}^{2}\right) \cdot F}, 2 \cdot \left(A \cdot \left(F \cdot {B}^{2}\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
distribute-rgt-out [=>]31.0 | \[ \frac{-\sqrt{2 \cdot \mathsf{fma}\left(C, \color{blue}{F \cdot \left({B}^{2} + -8 \cdot {A}^{2}\right)}, 2 \cdot \left(A \cdot \left(F \cdot {B}^{2}\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
unpow2 [=>]31.0 | \[ \frac{-\sqrt{2 \cdot \mathsf{fma}\left(C, F \cdot \left(\color{blue}{B \cdot B} + -8 \cdot {A}^{2}\right), 2 \cdot \left(A \cdot \left(F \cdot {B}^{2}\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
unpow2 [=>]31.0 | \[ \frac{-\sqrt{2 \cdot \mathsf{fma}\left(C, F \cdot \left(B \cdot B + -8 \cdot \color{blue}{\left(A \cdot A\right)}\right), 2 \cdot \left(A \cdot \left(F \cdot {B}^{2}\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
*-commutative [=>]31.0 | \[ \frac{-\sqrt{2 \cdot \mathsf{fma}\left(C, F \cdot \left(B \cdot B + -8 \cdot \left(A \cdot A\right)\right), 2 \cdot \left(A \cdot \color{blue}{\left({B}^{2} \cdot F\right)}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
unpow2 [=>]31.0 | \[ \frac{-\sqrt{2 \cdot \mathsf{fma}\left(C, F \cdot \left(B \cdot B + -8 \cdot \left(A \cdot A\right)\right), 2 \cdot \left(A \cdot \left(\color{blue}{\left(B \cdot B\right)} \cdot F\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
associate-*l* [=>]31.0 | \[ \frac{-\sqrt{2 \cdot \mathsf{fma}\left(C, F \cdot \left(B \cdot B + -8 \cdot \left(A \cdot A\right)\right), 2 \cdot \left(A \cdot \color{blue}{\left(B \cdot \left(B \cdot F\right)\right)}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
if -1.55e-285 < B < 5.0999999999999998e-287Initial program 15.3%
Simplified22.7%
[Start]15.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-rr7.3%
[Start]22.7 | \[ \frac{-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
|---|---|
add-sqr-sqrt [=>]9.3 | \[ \color{blue}{\sqrt{\frac{-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}} \cdot \sqrt{\frac{-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}}}
\] |
sqrt-unprod [=>]8.9 | \[ \color{blue}{\sqrt{\frac{-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \cdot \frac{-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}}}
\] |
frac-times [=>]8.0 | \[ \sqrt{\color{blue}{\frac{\left(-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}\right) \cdot \left(-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}\right)}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}}}
\] |
Simplified8.3%
[Start]7.3 | \[ \sqrt{\frac{F \cdot \left(\left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)\right)}{{\left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\right)}^{2}}}
\] |
|---|---|
associate-/l* [=>]8.3 | \[ \sqrt{\color{blue}{\frac{F}{\frac{{\left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\right)}^{2}}{\left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)}}}}
\] |
Taylor expanded in C around inf 28.8%
Simplified28.8%
[Start]28.8 | \[ \sqrt{\frac{F}{-2 \cdot \frac{A \cdot C}{A - -1 \cdot A}}}
\] |
|---|---|
cancel-sign-sub-inv [=>]28.8 | \[ \sqrt{\frac{F}{-2 \cdot \frac{A \cdot C}{\color{blue}{A + \left(--1\right) \cdot A}}}}
\] |
metadata-eval [=>]28.8 | \[ \sqrt{\frac{F}{-2 \cdot \frac{A \cdot C}{A + \color{blue}{1} \cdot A}}}
\] |
*-lft-identity [=>]28.8 | \[ \sqrt{\frac{F}{-2 \cdot \frac{A \cdot C}{A + \color{blue}{A}}}}
\] |
if 5.0999999999999998e-287 < B < 1.3000000000000001e-237 or 6.5000000000000002e-169 < B < 2.9e-128Initial program 20.9%
Simplified27.7%
[Start]20.9 | \[ \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-rr21.4%
[Start]27.7 | \[ \frac{-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
|---|---|
associate-*r* [=>]32.6 | \[ \frac{-\sqrt{\color{blue}{\left(F \cdot \left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
sqrt-prod [=>]23.6 | \[ \frac{-\color{blue}{\sqrt{F \cdot \left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right)} \cdot \sqrt{\mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
associate--r- [=>]21.4 | \[ \frac{-\sqrt{F \cdot \color{blue}{\left(\left(A - \mathsf{hypot}\left(B, A - C\right)\right) + C\right)}} \cdot \sqrt{\mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
+-commutative [=>]21.4 | \[ \frac{-\sqrt{F \cdot \color{blue}{\left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)}} \cdot \sqrt{\mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
*-commutative [=>]21.4 | \[ \frac{-\sqrt{F \cdot \left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{\mathsf{fma}\left(C, A \cdot -8, \color{blue}{\left(B \cdot B\right) \cdot 2}\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
associate-*l* [=>]21.4 | \[ \frac{-\sqrt{F \cdot \left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{\mathsf{fma}\left(C, A \cdot -8, \color{blue}{B \cdot \left(B \cdot 2\right)}\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
Simplified21.4%
[Start]21.4 | \[ \frac{-\sqrt{F \cdot \left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
|---|---|
unpow1/2 [<=]21.4 | \[ \frac{-\color{blue}{{\left(F \cdot \left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)}^{0.5}} \cdot \sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
*-commutative [=>]21.4 | \[ \frac{-\color{blue}{\sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)} \cdot {\left(F \cdot \left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)}^{0.5}}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
unpow1/2 [=>]21.4 | \[ \frac{-\sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)} \cdot \color{blue}{\sqrt{F \cdot \left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
Taylor expanded in C around inf 31.5%
Simplified31.5%
[Start]31.5 | \[ \frac{-\sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)} \cdot \sqrt{\left(A - -1 \cdot A\right) \cdot F}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
|---|---|
*-commutative [=>]31.5 | \[ \frac{-\sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)} \cdot \sqrt{\color{blue}{F \cdot \left(A - -1 \cdot A\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
cancel-sign-sub-inv [=>]31.5 | \[ \frac{-\sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)} \cdot \sqrt{F \cdot \color{blue}{\left(A + \left(--1\right) \cdot A\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
metadata-eval [=>]31.5 | \[ \frac{-\sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)} \cdot \sqrt{F \cdot \left(A + \color{blue}{1} \cdot A\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
*-lft-identity [=>]31.5 | \[ \frac{-\sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)} \cdot \sqrt{F \cdot \left(A + \color{blue}{A}\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
if 1.3000000000000001e-237 < B < 6.5000000000000002e-169Initial program 17.2%
Simplified25.5%
[Start]17.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}
\] |
|---|
Applied egg-rr8.9%
[Start]25.5 | \[ \frac{-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
|---|---|
add-sqr-sqrt [=>]13.6 | \[ \color{blue}{\sqrt{\frac{-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}} \cdot \sqrt{\frac{-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}}}
\] |
sqrt-unprod [=>]11.1 | \[ \color{blue}{\sqrt{\frac{-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \cdot \frac{-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}}}
\] |
frac-times [=>]9.5 | \[ \sqrt{\color{blue}{\frac{\left(-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}\right) \cdot \left(-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}\right)}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}}}
\] |
Simplified9.4%
[Start]8.9 | \[ \sqrt{\frac{F \cdot \left(\left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)\right)}{{\left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\right)}^{2}}}
\] |
|---|---|
associate-/l* [=>]9.4 | \[ \sqrt{\color{blue}{\frac{F}{\frac{{\left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\right)}^{2}}{\left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)}}}}
\] |
Taylor expanded in A around -inf 37.5%
Simplified37.5%
[Start]37.5 | \[ \sqrt{\frac{F}{-1 \cdot C}}
\] |
|---|---|
mul-1-neg [=>]37.5 | \[ \sqrt{\frac{F}{\color{blue}{-C}}}
\] |
if 2.9e-128 < B < 2.5000000000000001e-59Initial program 24.9%
Simplified31.7%
[Start]24.9 | \[ \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-rr8.2%
[Start]31.7 | \[ \frac{-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
|---|---|
add-sqr-sqrt [=>]12.7 | \[ \color{blue}{\sqrt{\frac{-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}} \cdot \sqrt{\frac{-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}}}
\] |
sqrt-unprod [=>]10.0 | \[ \color{blue}{\sqrt{\frac{-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \cdot \frac{-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}}}
\] |
frac-times [=>]9.3 | \[ \sqrt{\color{blue}{\frac{\left(-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}\right) \cdot \left(-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}\right)}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}}}
\] |
Simplified9.3%
[Start]8.2 | \[ \sqrt{\frac{F \cdot \left(\left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)\right)}{{\left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\right)}^{2}}}
\] |
|---|---|
associate-/l* [=>]9.3 | \[ \sqrt{\color{blue}{\frac{F}{\frac{{\left(\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\right)}^{2}}{\left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)}}}}
\] |
Taylor expanded in A around -inf 34.0%
Simplified34.0%
[Start]34.0 | \[ \sqrt{\frac{F}{-1 \cdot \frac{-0.5 \cdot {B}^{2} - -0.25 \cdot {B}^{2}}{A} + -1 \cdot C}}
\] |
|---|---|
mul-1-neg [=>]34.0 | \[ \sqrt{\frac{F}{-1 \cdot \frac{-0.5 \cdot {B}^{2} - -0.25 \cdot {B}^{2}}{A} + \color{blue}{\left(-C\right)}}}
\] |
unsub-neg [=>]34.0 | \[ \sqrt{\frac{F}{\color{blue}{-1 \cdot \frac{-0.5 \cdot {B}^{2} - -0.25 \cdot {B}^{2}}{A} - C}}}
\] |
associate-*r/ [=>]34.0 | \[ \sqrt{\frac{F}{\color{blue}{\frac{-1 \cdot \left(-0.5 \cdot {B}^{2} - -0.25 \cdot {B}^{2}\right)}{A}} - C}}
\] |
neg-mul-1 [<=]34.0 | \[ \sqrt{\frac{F}{\frac{\color{blue}{-\left(-0.5 \cdot {B}^{2} - -0.25 \cdot {B}^{2}\right)}}{A} - C}}
\] |
distribute-rgt-out-- [=>]34.0 | \[ \sqrt{\frac{F}{\frac{-\color{blue}{{B}^{2} \cdot \left(-0.5 - -0.25\right)}}{A} - C}}
\] |
metadata-eval [=>]34.0 | \[ \sqrt{\frac{F}{\frac{-{B}^{2} \cdot \color{blue}{-0.25}}{A} - C}}
\] |
distribute-rgt-neg-in [=>]34.0 | \[ \sqrt{\frac{F}{\frac{\color{blue}{{B}^{2} \cdot \left(--0.25\right)}}{A} - C}}
\] |
unpow2 [=>]34.0 | \[ \sqrt{\frac{F}{\frac{\color{blue}{\left(B \cdot B\right)} \cdot \left(--0.25\right)}{A} - C}}
\] |
metadata-eval [=>]34.0 | \[ \sqrt{\frac{F}{\frac{\left(B \cdot B\right) \cdot \color{blue}{0.25}}{A} - C}}
\] |
if 8.5999999999999998e49 < B Initial program 9.9%
Simplified9.9%
[Start]9.9 | \[ \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 C around 0 16.6%
Simplified50.0%
[Start]16.6 | \[ -1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{{B}^{2} + {A}^{2}}\right) \cdot F}\right)
\] |
|---|---|
mul-1-neg [=>]16.6 | \[ \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{{B}^{2} + {A}^{2}}\right) \cdot F}}
\] |
distribute-rgt-neg-in [=>]16.6 | \[ \color{blue}{\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{\left(A - \sqrt{{B}^{2} + {A}^{2}}\right) \cdot F}\right)}
\] |
*-commutative [=>]16.6 | \[ \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{\color{blue}{F \cdot \left(A - \sqrt{{B}^{2} + {A}^{2}}\right)}}\right)
\] |
+-commutative [=>]16.6 | \[ \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - \sqrt{\color{blue}{{A}^{2} + {B}^{2}}}\right)}\right)
\] |
unpow2 [=>]16.6 | \[ \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - \sqrt{\color{blue}{A \cdot A} + {B}^{2}}\right)}\right)
\] |
unpow2 [=>]16.6 | \[ \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - \sqrt{A \cdot A + \color{blue}{B \cdot B}}\right)}\right)
\] |
hypot-def [=>]50.0 | \[ \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - \color{blue}{\mathsf{hypot}\left(A, B\right)}\right)}\right)
\] |
Final simplification40.9%
| Alternative 1 | |
|---|---|
| Accuracy | 41.3% |
| Cost | 34128 |
| Alternative 2 | |
|---|---|
| Accuracy | 41.0% |
| Cost | 28060 |
| Alternative 3 | |
|---|---|
| Accuracy | 41.3% |
| Cost | 28060 |
| Alternative 4 | |
|---|---|
| Accuracy | 40.1% |
| Cost | 27468 |
| Alternative 5 | |
|---|---|
| Accuracy | 40.3% |
| Cost | 20432 |
| Alternative 6 | |
|---|---|
| Accuracy | 24.3% |
| Cost | 20104 |
| Alternative 7 | |
|---|---|
| Accuracy | 24.3% |
| Cost | 14932 |
| Alternative 8 | |
|---|---|
| Accuracy | 25.0% |
| Cost | 14096 |
| Alternative 9 | |
|---|---|
| Accuracy | 25.0% |
| Cost | 13968 |
| Alternative 10 | |
|---|---|
| Accuracy | 31.5% |
| Cost | 13776 |
| Alternative 11 | |
|---|---|
| Accuracy | 29.3% |
| Cost | 8848 |
| Alternative 12 | |
|---|---|
| Accuracy | 27.5% |
| Cost | 8716 |
| Alternative 13 | |
|---|---|
| Accuracy | 27.2% |
| Cost | 7817 |
| Alternative 14 | |
|---|---|
| Accuracy | 21.2% |
| Cost | 7236 |
| Alternative 15 | |
|---|---|
| Accuracy | 20.9% |
| Cost | 6980 |
| Alternative 16 | |
|---|---|
| Accuracy | 2.0% |
| Cost | 6656 |
| Alternative 17 | |
|---|---|
| Accuracy | 20.1% |
| Cost | 6656 |
| Alternative 18 | |
|---|---|
| Accuracy | 1.5% |
| Cost | 6592 |
herbie shell --seed 2023151
(FPCore (A B C F)
:name "ABCF->ab-angle b"
: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))))