| Alternative 1 | |
|---|---|
| Error | 39.5 |
| Cost | 27864 |
(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) (* B B)))
(t_1 (fma B B (* C (* A -4.0))))
(t_2 (hypot B (- A C)))
(t_3 (sqrt (+ A (+ C t_2))))
(t_4 (- (sqrt 2.0)))
(t_5 (/ (* t_3 (* (sqrt F) (* B t_4))) t_0)))
(if (<= B -2.15e+130)
(* (/ (sqrt 2.0) B) (sqrt (* (- C B) F)))
(if (<= B -1.95e-72)
(/
(* (sqrt (* 2.0 (+ t_2 (+ C A)))) (* B (sqrt F)))
(fma -4.0 (* C A) (* B B)))
(if (<= B 5.6e-145)
(/ (* t_3 (- (sqrt (* -2.0 (* 4.0 (* F (* C A))))))) t_0)
(if (<= B 1.56e-114)
t_5
(if (<= B 5e-49)
(-
(/
(sqrt (* -2.0 (* t_1 (* F (- (- (/ (* (* B B) 0.5) C) A) A)))))
t_1))
(if (<= B 7.5e+151) t_5 (* (sqrt (/ F B)) t_4)))))))))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) + (B * B);
double t_1 = fma(B, B, (C * (A * -4.0)));
double t_2 = hypot(B, (A - C));
double t_3 = sqrt((A + (C + t_2)));
double t_4 = -sqrt(2.0);
double t_5 = (t_3 * (sqrt(F) * (B * t_4))) / t_0;
double tmp;
if (B <= -2.15e+130) {
tmp = (sqrt(2.0) / B) * sqrt(((C - B) * F));
} else if (B <= -1.95e-72) {
tmp = (sqrt((2.0 * (t_2 + (C + A)))) * (B * sqrt(F))) / fma(-4.0, (C * A), (B * B));
} else if (B <= 5.6e-145) {
tmp = (t_3 * -sqrt((-2.0 * (4.0 * (F * (C * A)))))) / t_0;
} else if (B <= 1.56e-114) {
tmp = t_5;
} else if (B <= 5e-49) {
tmp = -(sqrt((-2.0 * (t_1 * (F * (((((B * B) * 0.5) / C) - A) - A))))) / t_1);
} else if (B <= 7.5e+151) {
tmp = t_5;
} else {
tmp = sqrt((F / B)) * t_4;
}
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(Float64(Float64(C * A) * -4.0) + Float64(B * B)) t_1 = fma(B, B, Float64(C * Float64(A * -4.0))) t_2 = hypot(B, Float64(A - C)) t_3 = sqrt(Float64(A + Float64(C + t_2))) t_4 = Float64(-sqrt(2.0)) t_5 = Float64(Float64(t_3 * Float64(sqrt(F) * Float64(B * t_4))) / t_0) tmp = 0.0 if (B <= -2.15e+130) tmp = Float64(Float64(sqrt(2.0) / B) * sqrt(Float64(Float64(C - B) * F))); elseif (B <= -1.95e-72) tmp = Float64(Float64(sqrt(Float64(2.0 * Float64(t_2 + Float64(C + A)))) * Float64(B * sqrt(F))) / fma(-4.0, Float64(C * A), Float64(B * B))); elseif (B <= 5.6e-145) tmp = Float64(Float64(t_3 * Float64(-sqrt(Float64(-2.0 * Float64(4.0 * Float64(F * Float64(C * A))))))) / t_0); elseif (B <= 1.56e-114) tmp = t_5; elseif (B <= 5e-49) tmp = Float64(-Float64(sqrt(Float64(-2.0 * Float64(t_1 * Float64(F * Float64(Float64(Float64(Float64(Float64(B * B) * 0.5) / C) - A) - A))))) / t_1)); elseif (B <= 7.5e+151) tmp = t_5; else tmp = Float64(sqrt(Float64(F / B)) * t_4); 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[(N[(N[(C * A), $MachinePrecision] * -4.0), $MachinePrecision] + N[(B * B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(B * B + N[(C * N[(A * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(A + N[(C + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = (-N[Sqrt[2.0], $MachinePrecision])}, Block[{t$95$5 = N[(N[(t$95$3 * N[(N[Sqrt[F], $MachinePrecision] * N[(B * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[B, -2.15e+130], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * N[Sqrt[N[(N[(C - B), $MachinePrecision] * F), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.95e-72], N[(N[(N[Sqrt[N[(2.0 * N[(t$95$2 + N[(C + A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(B * N[Sqrt[F], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-4.0 * N[(C * A), $MachinePrecision] + N[(B * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.6e-145], N[(N[(t$95$3 * (-N[Sqrt[N[(-2.0 * N[(4.0 * N[(F * N[(C * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[B, 1.56e-114], t$95$5, If[LessEqual[B, 5e-49], (-N[(N[Sqrt[N[(-2.0 * N[(t$95$1 * N[(F * N[(N[(N[(N[(N[(B * B), $MachinePrecision] * 0.5), $MachinePrecision] / C), $MachinePrecision] - A), $MachinePrecision] - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$1), $MachinePrecision]), If[LessEqual[B, 7.5e+151], t$95$5, N[(N[Sqrt[N[(F / B), $MachinePrecision]], $MachinePrecision] * t$95$4), $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 := \left(C \cdot A\right) \cdot -4 + B \cdot B\\
t_1 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\
t_2 := \mathsf{hypot}\left(B, A - C\right)\\
t_3 := \sqrt{A + \left(C + t_2\right)}\\
t_4 := -\sqrt{2}\\
t_5 := \frac{t_3 \cdot \left(\sqrt{F} \cdot \left(B \cdot t_4\right)\right)}{t_0}\\
\mathbf{if}\;B \leq -2.15 \cdot 10^{+130}:\\
\;\;\;\;\frac{\sqrt{2}}{B} \cdot \sqrt{\left(C - B\right) \cdot F}\\
\mathbf{elif}\;B \leq -1.95 \cdot 10^{-72}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(t_2 + \left(C + A\right)\right)} \cdot \left(B \cdot \sqrt{F}\right)}{\mathsf{fma}\left(-4, C \cdot A, B \cdot B\right)}\\
\mathbf{elif}\;B \leq 5.6 \cdot 10^{-145}:\\
\;\;\;\;\frac{t_3 \cdot \left(-\sqrt{-2 \cdot \left(4 \cdot \left(F \cdot \left(C \cdot A\right)\right)\right)}\right)}{t_0}\\
\mathbf{elif}\;B \leq 1.56 \cdot 10^{-114}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;B \leq 5 \cdot 10^{-49}:\\
\;\;\;\;-\frac{\sqrt{-2 \cdot \left(t_1 \cdot \left(F \cdot \left(\left(\frac{\left(B \cdot B\right) \cdot 0.5}{C} - A\right) - A\right)\right)\right)}}{t_1}\\
\mathbf{elif}\;B \leq 7.5 \cdot 10^{+151}:\\
\;\;\;\;t_5\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{F}{B}} \cdot t_4\\
\end{array}
if B < -2.14999999999999992e130Initial program 62.2
Simplified62.2
[Start]62.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 0 63.8
Simplified63.8
[Start]63.8 | \[ \frac{-\sqrt{\left(C + \sqrt{{B}^{2} + {C}^{2}}\right) \cdot F} \cdot \left(\sqrt{2} \cdot B\right)}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
|---|---|
*-commutative [=>]63.8 | \[ \frac{-\sqrt{\color{blue}{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}} \cdot \left(\sqrt{2} \cdot B\right)}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
unpow2 [=>]63.8 | \[ \frac{-\sqrt{F \cdot \left(C + \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)} \cdot \left(\sqrt{2} \cdot B\right)}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
unpow2 [=>]63.8 | \[ \frac{-\sqrt{F \cdot \left(C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)} \cdot \left(\sqrt{2} \cdot B\right)}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
*-commutative [=>]63.8 | \[ \frac{-\sqrt{F \cdot \left(C + \sqrt{B \cdot B + C \cdot C}\right)} \cdot \color{blue}{\left(B \cdot \sqrt{2}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
Taylor expanded in B around -inf 62.8
Simplified62.8
[Start]62.8 | \[ \frac{-\sqrt{F \cdot \left(C + -1 \cdot B\right)} \cdot \left(B \cdot \sqrt{2}\right)}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
|---|---|
mul-1-neg [=>]62.8 | \[ \frac{-\sqrt{F \cdot \left(C + \color{blue}{\left(-B\right)}\right)} \cdot \left(B \cdot \sqrt{2}\right)}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
unsub-neg [=>]62.8 | \[ \frac{-\sqrt{F \cdot \color{blue}{\left(C - B\right)}} \cdot \left(B \cdot \sqrt{2}\right)}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
Applied egg-rr58.1
Simplified58.1
[Start]58.1 | \[ 0 + \frac{\sqrt{F \cdot \left(C - B\right)}}{\frac{\mathsf{fma}\left(B, B, \left(C \cdot A\right) \cdot -4\right)}{B \cdot \sqrt{2}}}
\] |
|---|---|
+-lft-identity [=>]58.1 | \[ \color{blue}{\frac{\sqrt{F \cdot \left(C - B\right)}}{\frac{\mathsf{fma}\left(B, B, \left(C \cdot A\right) \cdot -4\right)}{B \cdot \sqrt{2}}}}
\] |
*-commutative [=>]58.1 | \[ \frac{\sqrt{F \cdot \left(C - B\right)}}{\frac{\mathsf{fma}\left(B, B, \color{blue}{-4 \cdot \left(C \cdot A\right)}\right)}{B \cdot \sqrt{2}}}
\] |
*-commutative [=>]58.1 | \[ \frac{\sqrt{F \cdot \left(C - B\right)}}{\frac{\mathsf{fma}\left(B, B, -4 \cdot \left(C \cdot A\right)\right)}{\color{blue}{\sqrt{2} \cdot B}}}
\] |
Taylor expanded in A around 0 33.1
if -2.14999999999999992e130 < B < -1.95e-72Initial program 44.4
Simplified39.8
[Start]44.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-rr34.0
Taylor expanded in B around -inf 36.9
Simplified36.9
[Start]36.9 | \[ \frac{-\left(-1 \cdot \left(\sqrt{F} \cdot B\right)\right) \cdot \sqrt{2 \cdot \left(\mathsf{hypot}\left(B, A - C\right) + \left(A + C\right)\right)}}{\mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)}
\] |
|---|---|
*-commutative [=>]36.9 | \[ \frac{-\color{blue}{\left(\left(\sqrt{F} \cdot B\right) \cdot -1\right)} \cdot \sqrt{2 \cdot \left(\mathsf{hypot}\left(B, A - C\right) + \left(A + C\right)\right)}}{\mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)}
\] |
associate-*l* [=>]36.9 | \[ \frac{-\color{blue}{\left(\sqrt{F} \cdot \left(B \cdot -1\right)\right)} \cdot \sqrt{2 \cdot \left(\mathsf{hypot}\left(B, A - C\right) + \left(A + C\right)\right)}}{\mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)}
\] |
*-commutative [<=]36.9 | \[ \frac{-\left(\sqrt{F} \cdot \color{blue}{\left(-1 \cdot B\right)}\right) \cdot \sqrt{2 \cdot \left(\mathsf{hypot}\left(B, A - C\right) + \left(A + C\right)\right)}}{\mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)}
\] |
mul-1-neg [=>]36.9 | \[ \frac{-\left(\sqrt{F} \cdot \color{blue}{\left(-B\right)}\right) \cdot \sqrt{2 \cdot \left(\mathsf{hypot}\left(B, A - C\right) + \left(A + C\right)\right)}}{\mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)}
\] |
if -1.95e-72 < B < 5.6000000000000002e-145Initial program 53.1
Simplified53.1
[Start]53.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-rr43.1
Simplified43.1
[Start]43.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 [=>]43.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)}
\] |
*-commutative [=>]43.1 | \[ \frac{-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \sqrt{2 \cdot \color{blue}{\left(F \cdot \mathsf{fma}\left(B, B, \left(A \cdot C\right) \cdot -4\right)\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
Taylor expanded in B around 0 47.1
Simplified44.8
[Start]47.1 | \[ \frac{-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \sqrt{2 \cdot \left(-4 \cdot \left(A \cdot \left(C \cdot F\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
|---|---|
associate-*r* [=>]44.8 | \[ \frac{-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \sqrt{2 \cdot \left(-4 \cdot \color{blue}{\left(\left(A \cdot C\right) \cdot F\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
*-commutative [=>]44.8 | \[ \frac{-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \sqrt{2 \cdot \left(-4 \cdot \left(\color{blue}{\left(C \cdot A\right)} \cdot F\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
if 5.6000000000000002e-145 < B < 1.5599999999999999e-114 or 4.9999999999999999e-49 < B < 7.49999999999999977e151Initial program 44.7
Simplified44.7
[Start]44.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-rr33.9
Simplified33.9
[Start]33.9 | \[ \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 [=>]33.9 | \[ \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)}
\] |
*-commutative [=>]33.9 | \[ \frac{-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \sqrt{2 \cdot \color{blue}{\left(F \cdot \mathsf{fma}\left(B, B, \left(A \cdot C\right) \cdot -4\right)\right)}}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
Taylor expanded in B around inf 35.2
if 1.5599999999999999e-114 < B < 4.9999999999999999e-49Initial program 47.0
Simplified40.7
[Start]47.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}
\] |
|---|
Taylor expanded in C around -inf 49.8
Simplified49.8
[Start]49.8 | \[ \frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right) \cdot \left(F \cdot \left(A + \left(A + -0.5 \cdot \frac{{B}^{2}}{C}\right)\right)\right)\right)}}{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)}
\] |
|---|---|
associate-*r/ [=>]49.8 | \[ \frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right) \cdot \left(F \cdot \left(A + \left(A + \color{blue}{\frac{-0.5 \cdot {B}^{2}}{C}}\right)\right)\right)\right)}}{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)}
\] |
unpow2 [=>]49.8 | \[ \frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right) \cdot \left(F \cdot \left(A + \left(A + \frac{-0.5 \cdot \color{blue}{\left(B \cdot B\right)}}{C}\right)\right)\right)\right)}}{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)}
\] |
if 7.49999999999999977e151 < B Initial program 63.9
Simplified63.9
[Start]63.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 A around 0 63.5
Simplified63.5
[Start]63.5 | \[ \frac{-\sqrt{\left(C + \sqrt{{B}^{2} + {C}^{2}}\right) \cdot F} \cdot \left(\sqrt{2} \cdot B\right)}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
|---|---|
*-commutative [=>]63.5 | \[ \frac{-\sqrt{\color{blue}{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}} \cdot \left(\sqrt{2} \cdot B\right)}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
unpow2 [=>]63.5 | \[ \frac{-\sqrt{F \cdot \left(C + \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)} \cdot \left(\sqrt{2} \cdot B\right)}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
unpow2 [=>]63.5 | \[ \frac{-\sqrt{F \cdot \left(C + \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)} \cdot \left(\sqrt{2} \cdot B\right)}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
*-commutative [=>]63.5 | \[ \frac{-\sqrt{F \cdot \left(C + \sqrt{B \cdot B + C \cdot C}\right)} \cdot \color{blue}{\left(B \cdot \sqrt{2}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
Taylor expanded in C around 0 32.8
Simplified32.8
[Start]32.8 | \[ -1 \cdot \left(\sqrt{2} \cdot \sqrt{\frac{F}{B}}\right)
\] |
|---|---|
mul-1-neg [=>]32.8 | \[ \color{blue}{-\sqrt{2} \cdot \sqrt{\frac{F}{B}}}
\] |
distribute-rgt-neg-in [=>]32.8 | \[ \color{blue}{\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)}
\] |
Final simplification38.8
| Alternative 1 | |
|---|---|
| Error | 39.5 |
| Cost | 27864 |
| Alternative 2 | |
|---|---|
| Error | 38.8 |
| Cost | 27864 |
| Alternative 3 | |
|---|---|
| Error | 36.8 |
| Cost | 27848 |
| Alternative 4 | |
|---|---|
| Error | 40.5 |
| Cost | 21452 |
| Alternative 5 | |
|---|---|
| Error | 45.1 |
| Cost | 15184 |
| Alternative 6 | |
|---|---|
| Error | 45.1 |
| Cost | 15184 |
| Alternative 7 | |
|---|---|
| Error | 41.5 |
| Cost | 15176 |
| Alternative 8 | |
|---|---|
| Error | 45.1 |
| Cost | 14792 |
| Alternative 9 | |
|---|---|
| Error | 45.6 |
| Cost | 13508 |
| Alternative 10 | |
|---|---|
| Error | 50.4 |
| Cost | 13448 |
| Alternative 11 | |
|---|---|
| Error | 53.6 |
| Cost | 8976 |
| Alternative 12 | |
|---|---|
| Error | 53.6 |
| Cost | 8976 |
| Alternative 13 | |
|---|---|
| Error | 53.7 |
| Cost | 8848 |
| Alternative 14 | |
|---|---|
| Error | 53.9 |
| Cost | 8584 |
| Alternative 15 | |
|---|---|
| Error | 53.4 |
| Cost | 8584 |
| Alternative 16 | |
|---|---|
| Error | 54.9 |
| Cost | 8452 |
| Alternative 17 | |
|---|---|
| Error | 55.8 |
| Cost | 8200 |
| Alternative 18 | |
|---|---|
| Error | 55.9 |
| Cost | 8196 |
| Alternative 19 | |
|---|---|
| Error | 58.3 |
| Cost | 8072 |
| Alternative 20 | |
|---|---|
| Error | 55.8 |
| Cost | 8072 |
| Alternative 21 | |
|---|---|
| Error | 58.6 |
| Cost | 7808 |
| Alternative 22 | |
|---|---|
| Error | 62.0 |
| Cost | 6848 |
herbie shell --seed 2023054
(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))))