| Alternative 1 | |
|---|---|
| Error | 67.49% |
| Cost | 33808 |
(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 (* A (* C -4.0)))
(t_1 (fma B B t_0))
(t_2 (+ (pow B 2.0) (* C (* A -4.0))))
(t_3
(/
(-
(sqrt
(*
(* 2.0 (* t_2 F))
(- (+ A C) (sqrt (+ (pow B 2.0) (pow (- A C) 2.0)))))))
t_2)))
(if (<= t_3 -2e-204)
(/
(* (sqrt (* F (- A (- (hypot B (- A C)) C)))) (- (sqrt (* 2.0 t_1))))
t_1)
(if (<= t_3 2e+138)
(/
(-
(sqrt (* t_1 (* (fma -0.5 (/ (* B B) (- A C)) (* 2.0 C)) (* 2.0 F)))))
t_1)
(if (<= t_3 INFINITY)
(* (sqrt 2.0) (/ (* (sqrt F) (* C (sqrt (* A -8.0)))) t_1))
(/
(* (sqrt (* F (- C (hypot B C)))) (- (sqrt 2.0)))
(hypot B (sqrt t_0))))))))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 = A * (C * -4.0);
double t_1 = fma(B, B, t_0);
double t_2 = pow(B, 2.0) + (C * (A * -4.0));
double t_3 = -sqrt(((2.0 * (t_2 * F)) * ((A + C) - sqrt((pow(B, 2.0) + pow((A - C), 2.0)))))) / t_2;
double tmp;
if (t_3 <= -2e-204) {
tmp = (sqrt((F * (A - (hypot(B, (A - C)) - C)))) * -sqrt((2.0 * t_1))) / t_1;
} else if (t_3 <= 2e+138) {
tmp = -sqrt((t_1 * (fma(-0.5, ((B * B) / (A - C)), (2.0 * C)) * (2.0 * F)))) / t_1;
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt(2.0) * ((sqrt(F) * (C * sqrt((A * -8.0)))) / t_1);
} else {
tmp = (sqrt((F * (C - hypot(B, C)))) * -sqrt(2.0)) / hypot(B, sqrt(t_0));
}
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(A * Float64(C * -4.0)) t_1 = fma(B, B, t_0) t_2 = Float64((B ^ 2.0) + Float64(C * Float64(A * -4.0))) t_3 = Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(t_2 * F)) * Float64(Float64(A + C) - sqrt(Float64((B ^ 2.0) + (Float64(A - C) ^ 2.0))))))) / t_2) tmp = 0.0 if (t_3 <= -2e-204) tmp = Float64(Float64(sqrt(Float64(F * Float64(A - Float64(hypot(B, Float64(A - C)) - C)))) * Float64(-sqrt(Float64(2.0 * t_1)))) / t_1); elseif (t_3 <= 2e+138) tmp = Float64(Float64(-sqrt(Float64(t_1 * Float64(fma(-0.5, Float64(Float64(B * B) / Float64(A - C)), Float64(2.0 * C)) * Float64(2.0 * F))))) / t_1); elseif (t_3 <= Inf) tmp = Float64(sqrt(2.0) * Float64(Float64(sqrt(F) * Float64(C * sqrt(Float64(A * -8.0)))) / t_1)); else tmp = Float64(Float64(sqrt(Float64(F * Float64(C - hypot(B, C)))) * Float64(-sqrt(2.0))) / hypot(B, sqrt(t_0))); 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[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(B * B + t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(N[Power[B, 2.0], $MachinePrecision] + N[(C * N[(A * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[((-N[Sqrt[N[(N[(2.0 * N[(t$95$2 * F), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] - N[Sqrt[N[(N[Power[B, 2.0], $MachinePrecision] + N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$2), $MachinePrecision]}, If[LessEqual[t$95$3, -2e-204], N[(N[(N[Sqrt[N[(F * N[(A - N[(N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision] - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[N[(2.0 * t$95$1), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$3, 2e+138], N[((-N[Sqrt[N[(t$95$1 * N[(N[(-0.5 * N[(N[(B * B), $MachinePrecision] / N[(A - C), $MachinePrecision]), $MachinePrecision] + N[(2.0 * C), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$1), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[(N[Sqrt[F], $MachinePrecision] * N[(C * N[Sqrt[N[(A * -8.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(F * N[(C - N[Sqrt[B ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision] / N[Sqrt[B ^ 2 + N[Sqrt[t$95$0], $MachinePrecision] ^ 2], $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 := A \cdot \left(C \cdot -4\right)\\
t_1 := \mathsf{fma}\left(B, B, t_0\right)\\
t_2 := {B}^{2} + C \cdot \left(A \cdot -4\right)\\
t_3 := \frac{-\sqrt{\left(2 \cdot \left(t_2 \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}}{t_2}\\
\mathbf{if}\;t_3 \leq -2 \cdot 10^{-204}:\\
\;\;\;\;\frac{\sqrt{F \cdot \left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right)} \cdot \left(-\sqrt{2 \cdot t_1}\right)}{t_1}\\
\mathbf{elif}\;t_3 \leq 2 \cdot 10^{+138}:\\
\;\;\;\;\frac{-\sqrt{t_1 \cdot \left(\mathsf{fma}\left(-0.5, \frac{B \cdot B}{A - C}, 2 \cdot C\right) \cdot \left(2 \cdot F\right)\right)}}{t_1}\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;\sqrt{2} \cdot \frac{\sqrt{F} \cdot \left(C \cdot \sqrt{A \cdot -8}\right)}{t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)} \cdot \left(-\sqrt{2}\right)}{\mathsf{hypot}\left(B, \sqrt{t_0}\right)}\\
\end{array}
if (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (-.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) < -2e-204Initial program 57.18
Simplified48.11
[Start]57.18 | \[ \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.65
Simplified33.65
[Start]33.65 | \[ \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 [=>]33.65 | \[ \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)}
\] |
*-commutative [=>]33.65 | \[ \frac{-\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 \color{blue}{\left(C \cdot -4\right)}\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
if -2e-204 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (-.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) < 2.0000000000000001e138Initial program 80.02
Simplified75.7
[Start]80.02 | \[ \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 B around 0 65.13
Simplified65.13
[Start]65.13 | \[ \frac{-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(\left(-0.5 \cdot \frac{{B}^{2}}{A - C} + 2 \cdot C\right) \cdot \left(2 \cdot F\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
|---|---|
fma-def [=>]65.13 | \[ \frac{-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(\color{blue}{\mathsf{fma}\left(-0.5, \frac{{B}^{2}}{A - C}, 2 \cdot C\right)} \cdot \left(2 \cdot F\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
unpow2 [=>]65.13 | \[ \frac{-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(\mathsf{fma}\left(-0.5, \frac{\color{blue}{B \cdot B}}{A - C}, 2 \cdot C\right) \cdot \left(2 \cdot F\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
if 2.0000000000000001e138 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (-.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) < +inf.0Initial program 85.48
Simplified57.84
[Start]85.48 | \[ \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-rr56.58
Simplified72.91
[Start]56.58 | \[ \sqrt{2 \cdot \left(\left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right) \cdot \left(\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right) \cdot F\right)\right)} \cdot \frac{1}{-\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
|---|---|
associate-*r/ [=>]55.94 | \[ \color{blue}{\frac{\sqrt{2 \cdot \left(\left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right) \cdot \left(\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right) \cdot F\right)\right)} \cdot 1}{-\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}}
\] |
*-rgt-identity [=>]55.94 | \[ \frac{\color{blue}{\sqrt{2 \cdot \left(\left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right) \cdot \left(\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right) \cdot F\right)\right)}}}{-\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
associate-*r* [=>]72.91 | \[ \frac{\sqrt{2 \cdot \color{blue}{\left(\left(\left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right) \cdot \mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)\right) \cdot F\right)}}}{-\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
associate-+r- [=>]72.91 | \[ \frac{\sqrt{2 \cdot \left(\left(\color{blue}{\left(\left(A + C\right) - \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)\right) \cdot F\right)}}{-\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
*-commutative [=>]72.91 | \[ \frac{\sqrt{2 \cdot \left(\left(\left(\left(A + C\right) - \mathsf{hypot}\left(B, A - C\right)\right) \cdot \mathsf{fma}\left(B, B, A \cdot \color{blue}{\left(C \cdot -4\right)}\right)\right) \cdot F\right)}}{-\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}
\] |
*-commutative [=>]72.91 | \[ \frac{\sqrt{2 \cdot \left(\left(\left(\left(A + C\right) - \mathsf{hypot}\left(B, A - C\right)\right) \cdot \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\right) \cdot F\right)}}{-\mathsf{fma}\left(B, B, A \cdot \color{blue}{\left(C \cdot -4\right)}\right)}
\] |
Taylor expanded in C around -inf 92.39
Simplified92.38
[Start]92.39 | \[ \frac{\sqrt{2 \cdot \left(\left(-8 \cdot \left(A \cdot {C}^{2}\right)\right) \cdot F\right)}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
|---|---|
associate-*r* [=>]92.38 | \[ \frac{\sqrt{2 \cdot \left(\color{blue}{\left(\left(-8 \cdot A\right) \cdot {C}^{2}\right)} \cdot F\right)}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
unpow2 [=>]92.38 | \[ \frac{\sqrt{2 \cdot \left(\left(\left(-8 \cdot A\right) \cdot \color{blue}{\left(C \cdot C\right)}\right) \cdot F\right)}}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
Applied egg-rr55.54
if +inf.0 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (-.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) Initial program 100
Simplified98.66
[Start]100 | \[ \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-rr99.25
Simplified99.17
[Start]99.25 | \[ \frac{-\mathsf{hypot}\left(B, \sqrt{A \cdot \left(C \cdot -4\right)}\right) \cdot \sqrt{\left(\left(A + C\right) - \mathsf{hypot}\left(B, A - C\right)\right) \cdot \left(2 \cdot F\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
|---|---|
associate-*r* [=>]99.25 | \[ \frac{-\mathsf{hypot}\left(B, \sqrt{\color{blue}{\left(A \cdot C\right) \cdot -4}}\right) \cdot \sqrt{\left(\left(A + C\right) - \mathsf{hypot}\left(B, A - C\right)\right) \cdot \left(2 \cdot F\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
+-commutative [=>]99.25 | \[ \frac{-\mathsf{hypot}\left(B, \sqrt{\left(A \cdot C\right) \cdot -4}\right) \cdot \sqrt{\left(\color{blue}{\left(C + A\right)} - \mathsf{hypot}\left(B, A - C\right)\right) \cdot \left(2 \cdot F\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
associate--l+ [=>]99.17 | \[ \frac{-\mathsf{hypot}\left(B, \sqrt{\left(A \cdot C\right) \cdot -4}\right) \cdot \sqrt{\color{blue}{\left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \left(2 \cdot F\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}
\] |
Applied egg-rr81.82
Simplified81.25
[Start]81.82 | \[ \frac{\mathsf{hypot}\left(B, \sqrt{C \cdot \left(A \cdot -4\right)}\right)}{\mathsf{hypot}\left(B, \sqrt{C \cdot \left(A \cdot -4\right)}\right)} \cdot \frac{-\sqrt{\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \left(2 \cdot F\right)}}{\mathsf{hypot}\left(B, \sqrt{C \cdot \left(A \cdot -4\right)}\right)}
\] |
|---|---|
*-inverses [=>]81.24 | \[ \color{blue}{1} \cdot \frac{-\sqrt{\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \left(2 \cdot F\right)}}{\mathsf{hypot}\left(B, \sqrt{C \cdot \left(A \cdot -4\right)}\right)}
\] |
distribute-frac-neg [=>]81.24 | \[ 1 \cdot \color{blue}{\left(-\frac{\sqrt{\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \left(2 \cdot F\right)}}{\mathsf{hypot}\left(B, \sqrt{C \cdot \left(A \cdot -4\right)}\right)}\right)}
\] |
distribute-rgt-neg-in [<=]81.24 | \[ \color{blue}{-1 \cdot \frac{\sqrt{\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \left(2 \cdot F\right)}}{\mathsf{hypot}\left(B, \sqrt{C \cdot \left(A \cdot -4\right)}\right)}}
\] |
associate-*r/ [=>]81.24 | \[ -\color{blue}{\frac{1 \cdot \sqrt{\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \left(2 \cdot F\right)}}{\mathsf{hypot}\left(B, \sqrt{C \cdot \left(A \cdot -4\right)}\right)}}
\] |
Taylor expanded in A around 0 99.2
Simplified81.94
[Start]99.2 | \[ -\frac{\sqrt{\left(C - \sqrt{{B}^{2} + {C}^{2}}\right) \cdot F} \cdot \sqrt{2}}{\mathsf{hypot}\left(B, \sqrt{A \cdot \left(C \cdot -4\right)}\right)}
\] |
|---|---|
*-commutative [=>]99.2 | \[ -\frac{\color{blue}{\sqrt{2} \cdot \sqrt{\left(C - \sqrt{{B}^{2} + {C}^{2}}\right) \cdot F}}}{\mathsf{hypot}\left(B, \sqrt{A \cdot \left(C \cdot -4\right)}\right)}
\] |
*-commutative [=>]99.2 | \[ -\frac{\sqrt{2} \cdot \sqrt{\color{blue}{F \cdot \left(C - \sqrt{{B}^{2} + {C}^{2}}\right)}}}{\mathsf{hypot}\left(B, \sqrt{A \cdot \left(C \cdot -4\right)}\right)}
\] |
unpow2 [=>]99.2 | \[ -\frac{\sqrt{2} \cdot \sqrt{F \cdot \left(C - \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)}}{\mathsf{hypot}\left(B, \sqrt{A \cdot \left(C \cdot -4\right)}\right)}
\] |
unpow2 [=>]99.2 | \[ -\frac{\sqrt{2} \cdot \sqrt{F \cdot \left(C - \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)}}{\mathsf{hypot}\left(B, \sqrt{A \cdot \left(C \cdot -4\right)}\right)}
\] |
hypot-def [=>]81.94 | \[ -\frac{\sqrt{2} \cdot \sqrt{F \cdot \left(C - \color{blue}{\mathsf{hypot}\left(B, C\right)}\right)}}{\mathsf{hypot}\left(B, \sqrt{A \cdot \left(C \cdot -4\right)}\right)}
\] |
Final simplification60.82
| Alternative 1 | |
|---|---|
| Error | 67.49% |
| Cost | 33808 |
| Alternative 2 | |
|---|---|
| Error | 66.34% |
| Cost | 27588 |
| Alternative 3 | |
|---|---|
| Error | 65.93% |
| Cost | 27588 |
| Alternative 4 | |
|---|---|
| Error | 66.49% |
| Cost | 27588 |
| Alternative 5 | |
|---|---|
| Error | 67.64% |
| Cost | 27144 |
| Alternative 6 | |
|---|---|
| Error | 73.09% |
| Cost | 21832 |
| Alternative 7 | |
|---|---|
| Error | 75.68% |
| Cost | 20884 |
| Alternative 8 | |
|---|---|
| Error | 75.04% |
| Cost | 20884 |
| Alternative 9 | |
|---|---|
| Error | 74.99% |
| Cost | 20884 |
| Alternative 10 | |
|---|---|
| Error | 77.16% |
| Cost | 20560 |
| Alternative 11 | |
|---|---|
| Error | 76.36% |
| Cost | 15368 |
| Alternative 12 | |
|---|---|
| Error | 78.05% |
| Cost | 14984 |
| Alternative 13 | |
|---|---|
| Error | 83.47% |
| Cost | 8585 |
| Alternative 14 | |
|---|---|
| Error | 79.74% |
| Cost | 8584 |
| Alternative 15 | |
|---|---|
| Error | 80.34% |
| Cost | 8452 |
| Alternative 16 | |
|---|---|
| Error | 86% |
| Cost | 7680 |
| Alternative 17 | |
|---|---|
| Error | 90.14% |
| Cost | 7556 |
| Alternative 18 | |
|---|---|
| Error | 95.14% |
| Cost | 6980 |
| Alternative 19 | |
|---|---|
| Error | 95.33% |
| Cost | 6980 |
| Alternative 20 | |
|---|---|
| Error | 96.93% |
| Cost | 6848 |
herbie shell --seed 2023089
(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))))