| Alternative 1 | |
|---|---|
| Error | 39.0% |
| Cost | 34516.00 |
(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 (hypot B (- A C)))
(t_1 (fma A (* C -4.0) (* B B)))
(t_2 (- (sqrt (* 2.0 t_1)))))
(if (<= B -9.2e+153)
(* (sqrt 2.0) (- (sqrt (/ F B))))
(if (<= B -4.2e-133)
(* (sqrt (* F (+ C (- A t_0)))) (/ t_2 t_1))
(if (<= B -2e-186)
(/ (- (sqrt (* F (* (* A -8.0) (* C (+ A A)))))) t_1)
(if (<= B 1e-121)
(/ (- (sqrt (* t_1 (* F (* C 4.0))))) t_1)
(if (<= B 2e+100)
(/
(* t_2 (sqrt (* F (- A (- t_0 C)))))
(fma B B (* A (* C -4.0))))
(* (sqrt (* F (- A (hypot B A)))) (- (/ (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 = hypot(B, (A - C));
double t_1 = fma(A, (C * -4.0), (B * B));
double t_2 = -sqrt((2.0 * t_1));
double tmp;
if (B <= -9.2e+153) {
tmp = sqrt(2.0) * -sqrt((F / B));
} else if (B <= -4.2e-133) {
tmp = sqrt((F * (C + (A - t_0)))) * (t_2 / t_1);
} else if (B <= -2e-186) {
tmp = -sqrt((F * ((A * -8.0) * (C * (A + A))))) / t_1;
} else if (B <= 1e-121) {
tmp = -sqrt((t_1 * (F * (C * 4.0)))) / t_1;
} else if (B <= 2e+100) {
tmp = (t_2 * sqrt((F * (A - (t_0 - C))))) / fma(B, B, (A * (C * -4.0)));
} else {
tmp = sqrt((F * (A - hypot(B, A)))) * -(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 = hypot(B, Float64(A - C)) t_1 = fma(A, Float64(C * -4.0), Float64(B * B)) t_2 = Float64(-sqrt(Float64(2.0 * t_1))) tmp = 0.0 if (B <= -9.2e+153) tmp = Float64(sqrt(2.0) * Float64(-sqrt(Float64(F / B)))); elseif (B <= -4.2e-133) tmp = Float64(sqrt(Float64(F * Float64(C + Float64(A - t_0)))) * Float64(t_2 / t_1)); elseif (B <= -2e-186) tmp = Float64(Float64(-sqrt(Float64(F * Float64(Float64(A * -8.0) * Float64(C * Float64(A + A)))))) / t_1); elseif (B <= 1e-121) tmp = Float64(Float64(-sqrt(Float64(t_1 * Float64(F * Float64(C * 4.0))))) / t_1); elseif (B <= 2e+100) tmp = Float64(Float64(t_2 * sqrt(Float64(F * Float64(A - Float64(t_0 - C))))) / fma(B, B, Float64(A * Float64(C * -4.0)))); else tmp = Float64(sqrt(Float64(F * Float64(A - hypot(B, A)))) * 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[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]}, Block[{t$95$1 = N[(A * N[(C * -4.0), $MachinePrecision] + N[(B * B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = (-N[Sqrt[N[(2.0 * t$95$1), $MachinePrecision]], $MachinePrecision])}, If[LessEqual[B, -9.2e+153], N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F / B), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], If[LessEqual[B, -4.2e-133], N[(N[Sqrt[N[(F * N[(C + N[(A - t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(t$95$2 / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -2e-186], N[((-N[Sqrt[N[(F * N[(N[(A * -8.0), $MachinePrecision] * N[(C * N[(A + A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$1), $MachinePrecision], If[LessEqual[B, 1e-121], N[((-N[Sqrt[N[(t$95$1 * N[(F * N[(C * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$1), $MachinePrecision], If[LessEqual[B, 2e+100], N[(N[(t$95$2 * N[Sqrt[N[(F * N[(A - N[(t$95$0 - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(B * B + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(F * N[(A - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $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 := \mathsf{hypot}\left(B, A - C\right)\\
t_1 := \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)\\
t_2 := -\sqrt{2 \cdot t_1}\\
\mathbf{if}\;B \leq -9.2 \cdot 10^{+153}:\\
\;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\
\mathbf{elif}\;B \leq -4.2 \cdot 10^{-133}:\\
\;\;\;\;\sqrt{F \cdot \left(C + \left(A - t_0\right)\right)} \cdot \frac{t_2}{t_1}\\
\mathbf{elif}\;B \leq -2 \cdot 10^{-186}:\\
\;\;\;\;\frac{-\sqrt{F \cdot \left(\left(A \cdot -8\right) \cdot \left(C \cdot \left(A + A\right)\right)\right)}}{t_1}\\
\mathbf{elif}\;B \leq 10^{-121}:\\
\;\;\;\;\frac{-\sqrt{t_1 \cdot \left(F \cdot \left(C \cdot 4\right)\right)}}{t_1}\\
\mathbf{elif}\;B \leq 2 \cdot 10^{+100}:\\
\;\;\;\;\frac{t_2 \cdot \sqrt{F \cdot \left(A - \left(t_0 - C\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{F \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)} \cdot \left(-\frac{\sqrt{2}}{B}\right)\\
\end{array}
if B < -9.2000000000000005e153Initial program 0.1
Simplified0.1
[Start]0.1 | \[ \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.1 | \[ \frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right) \cdot \left(2 \cdot F\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}
\] |
|---|---|
frac-2neg [=>]0.1 | \[ \color{blue}{\frac{-\left(-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right) \cdot \left(2 \cdot F\right)\right)}\right)}{-\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}}
\] |
remove-double-neg [=>]0.1 | \[ \frac{\color{blue}{\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right) \cdot \left(2 \cdot F\right)\right)}}}{-\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}
\] |
div-inv [=>]0.1 | \[ \color{blue}{\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right) \cdot \left(2 \cdot F\right)\right)} \cdot \frac{1}{-\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}}
\] |
associate-+r- [=>]0.1 | \[ \sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\color{blue}{\left(\left(A + C\right) - \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(2 \cdot F\right)\right)} \cdot \frac{1}{-\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}
\] |
Taylor expanded in B around -inf 0.1
Taylor expanded in A around 0 51.0
Simplified51.0
[Start]51.0 | \[ -1 \cdot \left(\sqrt{2} \cdot \sqrt{\frac{F}{B}}\right)
\] |
|---|---|
mul-1-neg [=>]51.0 | \[ \color{blue}{-\sqrt{2} \cdot \sqrt{\frac{F}{B}}}
\] |
distribute-rgt-neg-in [=>]51.0 | \[ \color{blue}{\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)}
\] |
if -9.2000000000000005e153 < B < -4.2000000000000002e-133Initial program 29.3
Simplified35.3
[Start]29.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-rr43.8
[Start]35.3 | \[ \frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right) \cdot \left(F \cdot \left(C - \left(\mathsf{hypot}\left(B, A - C\right) - A\right)\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
|---|---|
associate-*r* [=>]35.3 | \[ \frac{-\sqrt{\color{blue}{\left(2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)\right) \cdot \left(F \cdot \left(C - \left(\mathsf{hypot}\left(B, A - C\right) - A\right)\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
sqrt-prod [=>]43.7 | \[ \frac{-\color{blue}{\sqrt{2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \cdot \sqrt{F \cdot \left(C - \left(\mathsf{hypot}\left(B, A - C\right) - A\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
associate--r- [=>]43.8 | \[ \frac{-\sqrt{2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \cdot \sqrt{F \cdot \color{blue}{\left(\left(C - \mathsf{hypot}\left(B, A - C\right)\right) + A\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
+-commutative [=>]43.8 | \[ \frac{-\sqrt{2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \cdot \sqrt{F \cdot \color{blue}{\left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
Simplified43.8
[Start]43.8 | \[ \frac{-\sqrt{2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \cdot \sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
|---|---|
*-commutative [=>]43.8 | \[ \frac{-\color{blue}{\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
fma-def [<=]43.8 | \[ \frac{-\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{2 \cdot \color{blue}{\left(B \cdot B + A \cdot \left(-4 \cdot C\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
unpow2 [<=]43.8 | \[ \frac{-\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{2 \cdot \left(\color{blue}{{B}^{2}} + A \cdot \left(-4 \cdot C\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
+-commutative [=>]43.8 | \[ \frac{-\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{2 \cdot \color{blue}{\left(A \cdot \left(-4 \cdot C\right) + {B}^{2}\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
fma-def [=>]43.8 | \[ \frac{-\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{2 \cdot \color{blue}{\mathsf{fma}\left(A, -4 \cdot C, {B}^{2}\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
*-commutative [=>]43.8 | \[ \frac{-\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{2 \cdot \mathsf{fma}\left(A, \color{blue}{C \cdot -4}, {B}^{2}\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
unpow2 [=>]43.8 | \[ \frac{-\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{2 \cdot \mathsf{fma}\left(A, C \cdot -4, \color{blue}{B \cdot B}\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
Applied egg-rr43.6
[Start]43.8 | \[ \frac{-\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{2 \cdot \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
|---|---|
div-inv [=>]43.8 | \[ \color{blue}{\left(-\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{2 \cdot \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}\right) \cdot \frac{1}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}}
\] |
distribute-rgt-neg-in [=>]43.8 | \[ \color{blue}{\left(\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \left(-\sqrt{2 \cdot \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}\right)\right)} \cdot \frac{1}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
associate-*l* [=>]43.8 | \[ \color{blue}{\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \left(\left(-\sqrt{2 \cdot \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}\right) \cdot \frac{1}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}\right)}
\] |
+-commutative [=>]43.8 | \[ \sqrt{F \cdot \color{blue}{\left(\left(C - \mathsf{hypot}\left(B, A - C\right)\right) + A\right)}} \cdot \left(\left(-\sqrt{2 \cdot \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}\right) \cdot \frac{1}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}\right)
\] |
associate-+l- [=>]43.6 | \[ \sqrt{F \cdot \color{blue}{\left(C - \left(\mathsf{hypot}\left(B, A - C\right) - A\right)\right)}} \cdot \left(\left(-\sqrt{2 \cdot \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}\right) \cdot \frac{1}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}\right)
\] |
fma-udef [=>]43.6 | \[ \sqrt{F \cdot \left(C - \left(\mathsf{hypot}\left(B, A - C\right) - A\right)\right)} \cdot \left(\left(-\sqrt{2 \cdot \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}\right) \cdot \frac{1}{\color{blue}{B \cdot B + A \cdot \left(-4 \cdot C\right)}}\right)
\] |
+-commutative [<=]43.6 | \[ \sqrt{F \cdot \left(C - \left(\mathsf{hypot}\left(B, A - C\right) - A\right)\right)} \cdot \left(\left(-\sqrt{2 \cdot \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}\right) \cdot \frac{1}{\color{blue}{A \cdot \left(-4 \cdot C\right) + B \cdot B}}\right)
\] |
*-commutative [<=]43.6 | \[ \sqrt{F \cdot \left(C - \left(\mathsf{hypot}\left(B, A - C\right) - A\right)\right)} \cdot \left(\left(-\sqrt{2 \cdot \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}\right) \cdot \frac{1}{A \cdot \color{blue}{\left(C \cdot -4\right)} + B \cdot B}\right)
\] |
fma-udef [<=]43.6 | \[ \sqrt{F \cdot \left(C - \left(\mathsf{hypot}\left(B, A - C\right) - A\right)\right)} \cdot \left(\left(-\sqrt{2 \cdot \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}\right) \cdot \frac{1}{\color{blue}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}}\right)
\] |
Simplified43.7
[Start]43.6 | \[ \sqrt{F \cdot \left(C - \left(\mathsf{hypot}\left(B, A - C\right) - A\right)\right)} \cdot \left(\left(-\sqrt{2 \cdot \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}\right) \cdot \frac{1}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}\right)
\] |
|---|---|
distribute-lft-neg-out [=>]43.6 | \[ \sqrt{F \cdot \left(C - \left(\mathsf{hypot}\left(B, A - C\right) - A\right)\right)} \cdot \color{blue}{\left(-\sqrt{2 \cdot \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)} \cdot \frac{1}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}\right)}
\] |
associate-*r/ [=>]43.7 | \[ \sqrt{F \cdot \left(C - \left(\mathsf{hypot}\left(B, A - C\right) - A\right)\right)} \cdot \left(-\color{blue}{\frac{\sqrt{2 \cdot \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)} \cdot 1}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}}\right)
\] |
*-rgt-identity [=>]43.7 | \[ \sqrt{F \cdot \left(C - \left(\mathsf{hypot}\left(B, A - C\right) - A\right)\right)} \cdot \left(-\frac{\color{blue}{\sqrt{2 \cdot \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}\right)
\] |
distribute-frac-neg [<=]43.7 | \[ \sqrt{F \cdot \left(C - \left(\mathsf{hypot}\left(B, A - C\right) - A\right)\right)} \cdot \color{blue}{\frac{-\sqrt{2 \cdot \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}}
\] |
if -4.2000000000000002e-133 < B < -1.9999999999999998e-186Initial program 17.4
Simplified26.4
[Start]17.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}
\] |
|---|
Applied egg-rr19.6
[Start]26.4 | \[ \frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right) \cdot \left(F \cdot \left(C - \left(\mathsf{hypot}\left(B, A - C\right) - A\right)\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
|---|---|
associate-*r* [=>]26.4 | \[ \frac{-\sqrt{\color{blue}{\left(2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)\right) \cdot \left(F \cdot \left(C - \left(\mathsf{hypot}\left(B, A - C\right) - A\right)\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
sqrt-prod [=>]19.5 | \[ \frac{-\color{blue}{\sqrt{2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \cdot \sqrt{F \cdot \left(C - \left(\mathsf{hypot}\left(B, A - C\right) - A\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
associate--r- [=>]19.6 | \[ \frac{-\sqrt{2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \cdot \sqrt{F \cdot \color{blue}{\left(\left(C - \mathsf{hypot}\left(B, A - C\right)\right) + A\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
+-commutative [=>]19.6 | \[ \frac{-\sqrt{2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \cdot \sqrt{F \cdot \color{blue}{\left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
Simplified19.6
[Start]19.6 | \[ \frac{-\sqrt{2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \cdot \sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
|---|---|
*-commutative [=>]19.6 | \[ \frac{-\color{blue}{\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
fma-def [<=]19.6 | \[ \frac{-\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{2 \cdot \color{blue}{\left(B \cdot B + A \cdot \left(-4 \cdot C\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
unpow2 [<=]19.6 | \[ \frac{-\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{2 \cdot \left(\color{blue}{{B}^{2}} + A \cdot \left(-4 \cdot C\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
+-commutative [=>]19.6 | \[ \frac{-\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{2 \cdot \color{blue}{\left(A \cdot \left(-4 \cdot C\right) + {B}^{2}\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
fma-def [=>]19.6 | \[ \frac{-\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{2 \cdot \color{blue}{\mathsf{fma}\left(A, -4 \cdot C, {B}^{2}\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
*-commutative [=>]19.6 | \[ \frac{-\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{2 \cdot \mathsf{fma}\left(A, \color{blue}{C \cdot -4}, {B}^{2}\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
unpow2 [=>]19.6 | \[ \frac{-\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{2 \cdot \mathsf{fma}\left(A, C \cdot -4, \color{blue}{B \cdot B}\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
Applied egg-rr21.7
[Start]19.6 | \[ \frac{-\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{2 \cdot \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
|---|---|
distribute-frac-neg [=>]19.6 | \[ \color{blue}{-\frac{\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{2 \cdot \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}}
\] |
neg-sub0 [=>]19.6 | \[ \color{blue}{0 - \frac{\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{2 \cdot \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}}
\] |
*-commutative [=>]19.6 | \[ 0 - \frac{\color{blue}{\sqrt{2 \cdot \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)} \cdot \sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
Simplified21.7
[Start]21.7 | \[ 0 - \frac{\sqrt{F \cdot \left(\left(C - \left(\mathsf{hypot}\left(B, A - C\right) - A\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}
\] |
|---|---|
sub0-neg [=>]21.7 | \[ \color{blue}{-\frac{\sqrt{F \cdot \left(\left(C - \left(\mathsf{hypot}\left(B, A - C\right) - A\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}}
\] |
distribute-neg-frac [=>]21.7 | \[ \color{blue}{\frac{-\sqrt{F \cdot \left(\left(C - \left(\mathsf{hypot}\left(B, A - C\right) - A\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}}
\] |
*-commutative [=>]21.7 | \[ \frac{-\sqrt{F \cdot \color{blue}{\left(\left(2 \cdot \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)\right) \cdot \left(C - \left(\mathsf{hypot}\left(B, A - C\right) - A\right)\right)\right)}}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}
\] |
Taylor expanded in C around inf 24.6
Simplified24.6
[Start]24.6 | \[ \frac{-\sqrt{F \cdot \left(-8 \cdot \left(A \cdot \left(\left(A - -1 \cdot A\right) \cdot C\right)\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}
\] |
|---|---|
associate-*r* [=>]24.6 | \[ \frac{-\sqrt{F \cdot \color{blue}{\left(\left(-8 \cdot A\right) \cdot \left(\left(A - -1 \cdot A\right) \cdot C\right)\right)}}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}
\] |
*-commutative [=>]24.6 | \[ \frac{-\sqrt{F \cdot \left(\left(-8 \cdot A\right) \cdot \color{blue}{\left(C \cdot \left(A - -1 \cdot A\right)\right)}\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}
\] |
mul-1-neg [=>]24.6 | \[ \frac{-\sqrt{F \cdot \left(\left(-8 \cdot A\right) \cdot \left(C \cdot \left(A - \color{blue}{\left(-A\right)}\right)\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}
\] |
if -1.9999999999999998e-186 < B < 9.9999999999999998e-122Initial program 17.8
Simplified26.6
[Start]17.8 | \[ \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-rr24.2
[Start]26.6 | \[ \frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right) \cdot \left(2 \cdot F\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}
\] |
|---|---|
frac-2neg [=>]26.6 | \[ \color{blue}{\frac{-\left(-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right) \cdot \left(2 \cdot F\right)\right)}\right)}{-\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}}
\] |
remove-double-neg [=>]26.6 | \[ \frac{\color{blue}{\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right) \cdot \left(2 \cdot F\right)\right)}}}{-\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}
\] |
div-inv [=>]26.3 | \[ \color{blue}{\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right) \cdot \left(2 \cdot F\right)\right)} \cdot \frac{1}{-\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}}
\] |
associate-+r- [=>]24.2 | \[ \sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\color{blue}{\left(\left(A + C\right) - \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(2 \cdot F\right)\right)} \cdot \frac{1}{-\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}
\] |
Taylor expanded in C around -inf 23.2
Applied egg-rr23.4
[Start]23.2 | \[ \sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(2 \cdot C\right) \cdot \left(2 \cdot F\right)\right)} \cdot \frac{1}{-\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}
\] |
|---|---|
un-div-inv [=>]23.4 | \[ \color{blue}{\frac{\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(2 \cdot C\right) \cdot \left(2 \cdot F\right)\right)}}{-\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}}
\] |
frac-2neg [=>]23.4 | \[ \color{blue}{\frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(2 \cdot C\right) \cdot \left(2 \cdot F\right)\right)}}{-\left(-\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)\right)}}
\] |
associate-*r* [=>]23.4 | \[ \frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \color{blue}{\left(\left(\left(2 \cdot C\right) \cdot 2\right) \cdot F\right)}}}{-\left(-\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)\right)}
\] |
*-commutative [=>]23.4 | \[ \frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \color{blue}{\left(F \cdot \left(\left(2 \cdot C\right) \cdot 2\right)\right)}}}{-\left(-\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)\right)}
\] |
*-commutative [=>]23.4 | \[ \frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(F \cdot \left(\color{blue}{\left(C \cdot 2\right)} \cdot 2\right)\right)}}{-\left(-\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)\right)}
\] |
associate-*l* [=>]23.4 | \[ \frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(F \cdot \color{blue}{\left(C \cdot \left(2 \cdot 2\right)\right)}\right)}}{-\left(-\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)\right)}
\] |
metadata-eval [=>]23.4 | \[ \frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(F \cdot \left(C \cdot \color{blue}{4}\right)\right)}}{-\left(-\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)\right)}
\] |
remove-double-neg [=>]23.4 | \[ \frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(F \cdot \left(C \cdot 4\right)\right)}}{\color{blue}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}}
\] |
if 9.9999999999999998e-122 < B < 2.00000000000000003e100Initial program 31.1
Simplified40.0
[Start]31.1 | \[ \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-rr40.1
[Start]40.0 | \[ \frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right) \cdot \left(F \cdot \left(C - \left(\mathsf{hypot}\left(B, A - C\right) - A\right)\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
|---|---|
associate-*r* [=>]40.0 | \[ \frac{-\sqrt{\color{blue}{\left(2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)\right) \cdot \left(F \cdot \left(C - \left(\mathsf{hypot}\left(B, A - C\right) - A\right)\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
sqrt-prod [=>]39.8 | \[ \frac{-\color{blue}{\sqrt{2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \cdot \sqrt{F \cdot \left(C - \left(\mathsf{hypot}\left(B, A - C\right) - A\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
associate--r- [=>]40.1 | \[ \frac{-\sqrt{2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \cdot \sqrt{F \cdot \color{blue}{\left(\left(C - \mathsf{hypot}\left(B, A - C\right)\right) + A\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
+-commutative [=>]40.1 | \[ \frac{-\sqrt{2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \cdot \sqrt{F \cdot \color{blue}{\left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
Simplified40.1
[Start]40.1 | \[ \frac{-\sqrt{2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \cdot \sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
|---|---|
*-commutative [=>]40.1 | \[ \frac{-\color{blue}{\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
fma-def [<=]40.1 | \[ \frac{-\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{2 \cdot \color{blue}{\left(B \cdot B + A \cdot \left(-4 \cdot C\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
unpow2 [<=]40.1 | \[ \frac{-\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{2 \cdot \left(\color{blue}{{B}^{2}} + A \cdot \left(-4 \cdot C\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
+-commutative [=>]40.1 | \[ \frac{-\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{2 \cdot \color{blue}{\left(A \cdot \left(-4 \cdot C\right) + {B}^{2}\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
fma-def [=>]40.1 | \[ \frac{-\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{2 \cdot \color{blue}{\mathsf{fma}\left(A, -4 \cdot C, {B}^{2}\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
*-commutative [=>]40.1 | \[ \frac{-\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{2 \cdot \mathsf{fma}\left(A, \color{blue}{C \cdot -4}, {B}^{2}\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
unpow2 [=>]40.1 | \[ \frac{-\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{2 \cdot \mathsf{fma}\left(A, C \cdot -4, \color{blue}{B \cdot B}\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
if 2.00000000000000003e100 < B Initial program 5.7
Simplified6.7
[Start]5.7 | \[ \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-rr5.9
[Start]6.7 | \[ \frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right) \cdot \left(2 \cdot F\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}
\] |
|---|---|
expm1-log1p-u [=>]5.9 | \[ \frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right) \cdot \left(2 \cdot F\right)\right)}}{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)\right)\right)}}
\] |
Taylor expanded in C around 0 10.7
Simplified49.4
[Start]10.7 | \[ -1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{{B}^{2} + {A}^{2}}\right) \cdot F}\right)
\] |
|---|---|
mul-1-neg [=>]10.7 | \[ \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{{B}^{2} + {A}^{2}}\right) \cdot F}}
\] |
distribute-rgt-neg-in [=>]10.7 | \[ \color{blue}{\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{\left(A - \sqrt{{B}^{2} + {A}^{2}}\right) \cdot F}\right)}
\] |
*-commutative [=>]10.7 | \[ \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{\color{blue}{F \cdot \left(A - \sqrt{{B}^{2} + {A}^{2}}\right)}}\right)
\] |
unpow2 [=>]10.7 | \[ \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - \sqrt{\color{blue}{B \cdot B} + {A}^{2}}\right)}\right)
\] |
unpow2 [=>]10.7 | \[ \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - \sqrt{B \cdot B + \color{blue}{A \cdot A}}\right)}\right)
\] |
hypot-def [=>]49.4 | \[ \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - \color{blue}{\mathsf{hypot}\left(B, A\right)}\right)}\right)
\] |
Final simplification39.0
| Alternative 1 | |
|---|---|
| Error | 39.0% |
| Cost | 34516.00 |
| Alternative 2 | |
|---|---|
| Error | 26.2% |
| Cost | 34128.00 |
| Alternative 3 | |
|---|---|
| Error | 26.0% |
| Cost | 33996.00 |
| Alternative 4 | |
|---|---|
| Error | 25.4% |
| Cost | 28576.00 |
| Alternative 5 | |
|---|---|
| Error | 25.7% |
| Cost | 28116.00 |
| Alternative 6 | |
|---|---|
| Error | 25.5% |
| Cost | 28116.00 |
| Alternative 7 | |
|---|---|
| Error | 25.0% |
| Cost | 27992.00 |
| Alternative 8 | |
|---|---|
| Error | 39.2% |
| Cost | 21448.00 |
| Alternative 9 | |
|---|---|
| Error | 35.5% |
| Cost | 21400.00 |
| Alternative 10 | |
|---|---|
| Error | 36.3% |
| Cost | 21328.00 |
| Alternative 11 | |
|---|---|
| Error | 35.3% |
| Cost | 20696.00 |
| Alternative 12 | |
|---|---|
| Error | 33.6% |
| Cost | 20168.00 |
| Alternative 13 | |
|---|---|
| Error | 30.5% |
| Cost | 14612.00 |
| Alternative 14 | |
|---|---|
| Error | 32.1% |
| Cost | 14536.00 |
| Alternative 15 | |
|---|---|
| Error | 29.7% |
| Cost | 14348.00 |
| Alternative 16 | |
|---|---|
| Error | 30.8% |
| Cost | 14344.00 |
| Alternative 17 | |
|---|---|
| Error | 30.9% |
| Cost | 14344.00 |
| Alternative 18 | |
|---|---|
| Error | 29.2% |
| Cost | 13836.00 |
| Alternative 19 | |
|---|---|
| Error | 22.3% |
| Cost | 13316.00 |
| Alternative 20 | |
|---|---|
| Error | 14.0% |
| Cost | 8716.00 |
| Alternative 21 | |
|---|---|
| Error | 11.7% |
| Cost | 8584.00 |
| Alternative 22 | |
|---|---|
| Error | 13.4% |
| Cost | 8584.00 |
| Alternative 23 | |
|---|---|
| Error | 9.1% |
| Cost | 8452.00 |
| Alternative 24 | |
|---|---|
| Error | 5.7% |
| Cost | 8072.00 |
| Alternative 25 | |
|---|---|
| Error | 4.6% |
| Cost | 6980.00 |
| Alternative 26 | |
|---|---|
| Error | 4.6% |
| Cost | 6980.00 |
| Alternative 27 | |
|---|---|
| Error | 4.5% |
| Cost | 6976.00 |
| Alternative 28 | |
|---|---|
| Error | 2.9% |
| Cost | 6848.00 |
herbie shell --seed 2023104
(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))))