| Alternative 1 | |
|---|---|
| Error | 44.3 |
| Cost | 33988 |
(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 (fma A (* C -4.0) (* B B)))
(t_1 (hypot B (- A C)))
(t_2 (fma B B (* A (* C -4.0))))
(t_3 (+ (pow B 2.0) (* C (* A -4.0))))
(t_4
(/
(-
(sqrt
(*
(* 2.0 (* t_3 F))
(- (+ A C) (sqrt (+ (pow B 2.0) (pow (- A C) 2.0)))))))
t_3)))
(if (<= t_4 -1e-150)
(/ (* (sqrt (* F (- A (- t_1 C)))) (- (sqrt (* 2.0 t_2)))) t_2)
(if (<= t_4 0.0)
(/
(-
(sqrt
(*
t_0
(*
(+ (/ -0.5 (/ C (+ (* B B) (- (* A A) (pow (- A) 2.0))))) (+ A A))
(* 2.0 F)))))
t_0)
(if (<= t_4 INFINITY)
(- (/ (sqrt (* 2.0 (* (* F t_2) (+ C (- A t_1))))) t_2))
(* (/ (- (sqrt 2.0)) B) (sqrt (* F (- A 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 = fma(A, (C * -4.0), (B * B));
double t_1 = hypot(B, (A - C));
double t_2 = fma(B, B, (A * (C * -4.0)));
double t_3 = pow(B, 2.0) + (C * (A * -4.0));
double t_4 = -sqrt(((2.0 * (t_3 * F)) * ((A + C) - sqrt((pow(B, 2.0) + pow((A - C), 2.0)))))) / t_3;
double tmp;
if (t_4 <= -1e-150) {
tmp = (sqrt((F * (A - (t_1 - C)))) * -sqrt((2.0 * t_2))) / t_2;
} else if (t_4 <= 0.0) {
tmp = -sqrt((t_0 * (((-0.5 / (C / ((B * B) + ((A * A) - pow(-A, 2.0))))) + (A + A)) * (2.0 * F)))) / t_0;
} else if (t_4 <= ((double) INFINITY)) {
tmp = -(sqrt((2.0 * ((F * t_2) * (C + (A - t_1))))) / t_2);
} else {
tmp = (-sqrt(2.0) / B) * sqrt((F * (A - 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 = fma(A, Float64(C * -4.0), Float64(B * B)) t_1 = hypot(B, Float64(A - C)) t_2 = fma(B, B, Float64(A * Float64(C * -4.0))) t_3 = Float64((B ^ 2.0) + Float64(C * Float64(A * -4.0))) t_4 = Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(t_3 * F)) * Float64(Float64(A + C) - sqrt(Float64((B ^ 2.0) + (Float64(A - C) ^ 2.0))))))) / t_3) tmp = 0.0 if (t_4 <= -1e-150) tmp = Float64(Float64(sqrt(Float64(F * Float64(A - Float64(t_1 - C)))) * Float64(-sqrt(Float64(2.0 * t_2)))) / t_2); elseif (t_4 <= 0.0) tmp = Float64(Float64(-sqrt(Float64(t_0 * Float64(Float64(Float64(-0.5 / Float64(C / Float64(Float64(B * B) + Float64(Float64(A * A) - (Float64(-A) ^ 2.0))))) + Float64(A + A)) * Float64(2.0 * F))))) / t_0); elseif (t_4 <= Inf) tmp = Float64(-Float64(sqrt(Float64(2.0 * Float64(Float64(F * t_2) * Float64(C + Float64(A - t_1))))) / t_2)); else tmp = Float64(Float64(Float64(-sqrt(2.0)) / B) * sqrt(Float64(F * Float64(A - 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[(A * N[(C * -4.0), $MachinePrecision] + N[(B * B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]}, Block[{t$95$2 = N[(B * B + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Power[B, 2.0], $MachinePrecision] + N[(C * N[(A * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[((-N[Sqrt[N[(N[(2.0 * N[(t$95$3 * 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$3), $MachinePrecision]}, If[LessEqual[t$95$4, -1e-150], N[(N[(N[Sqrt[N[(F * N[(A - N[(t$95$1 - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[N[(2.0 * t$95$2), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[t$95$4, 0.0], N[((-N[Sqrt[N[(t$95$0 * N[(N[(N[(-0.5 / N[(C / N[(N[(B * B), $MachinePrecision] + N[(N[(A * A), $MachinePrecision] - N[Power[(-A), 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(A + A), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[t$95$4, Infinity], (-N[(N[Sqrt[N[(2.0 * N[(N[(F * t$95$2), $MachinePrecision] * N[(C + N[(A - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$2), $MachinePrecision]), N[(N[((-N[Sqrt[2.0], $MachinePrecision]) / B), $MachinePrecision] * N[Sqrt[N[(F * N[(A - B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}
\begin{array}{l}
t_0 := \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)\\
t_1 := \mathsf{hypot}\left(B, A - C\right)\\
t_2 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\
t_3 := {B}^{2} + C \cdot \left(A \cdot -4\right)\\
t_4 := \frac{-\sqrt{\left(2 \cdot \left(t_3 \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}}{t_3}\\
\mathbf{if}\;t_4 \leq -1 \cdot 10^{-150}:\\
\;\;\;\;\frac{\sqrt{F \cdot \left(A - \left(t_1 - C\right)\right)} \cdot \left(-\sqrt{2 \cdot t_2}\right)}{t_2}\\
\mathbf{elif}\;t_4 \leq 0:\\
\;\;\;\;\frac{-\sqrt{t_0 \cdot \left(\left(\frac{-0.5}{\frac{C}{B \cdot B + \left(A \cdot A - {\left(-A\right)}^{2}\right)}} + \left(A + A\right)\right) \cdot \left(2 \cdot F\right)\right)}}{t_0}\\
\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot t_2\right) \cdot \left(C + \left(A - t_1\right)\right)\right)}}{t_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{-\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - B\right)}\\
\end{array}
if (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (-.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) < -1.00000000000000001e-150Initial program 38.0
Simplified32.5
[Start]38.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-rr22.5
Simplified22.5
[Start]22.5 | \[ \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 [=>]22.5 | \[ \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 [=>]22.5 | \[ \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 -1.00000000000000001e-150 < (/.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))) < 0.0Initial program 55.1
Simplified51.9
[Start]55.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}
\] |
|---|
Taylor expanded in C around inf 46.1
Simplified46.2
[Start]46.1 | \[ \frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(\left(A + -0.5 \cdot \frac{\left({B}^{2} + {A}^{2}\right) - {\left(-1 \cdot A\right)}^{2}}{C}\right) - -1 \cdot A\right) \cdot \left(2 \cdot F\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}
\] |
|---|---|
+-commutative [=>]46.1 | \[ \frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(\color{blue}{\left(-0.5 \cdot \frac{\left({B}^{2} + {A}^{2}\right) - {\left(-1 \cdot A\right)}^{2}}{C} + A\right)} - -1 \cdot A\right) \cdot \left(2 \cdot F\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}
\] |
associate--l+ [=>]46.1 | \[ \frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\color{blue}{\left(-0.5 \cdot \frac{\left({B}^{2} + {A}^{2}\right) - {\left(-1 \cdot A\right)}^{2}}{C} + \left(A - -1 \cdot A\right)\right)} \cdot \left(2 \cdot F\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}
\] |
associate-*r/ [=>]46.1 | \[ \frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(\color{blue}{\frac{-0.5 \cdot \left(\left({B}^{2} + {A}^{2}\right) - {\left(-1 \cdot A\right)}^{2}\right)}{C}} + \left(A - -1 \cdot A\right)\right) \cdot \left(2 \cdot F\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}
\] |
associate-/l* [=>]46.1 | \[ \frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(\color{blue}{\frac{-0.5}{\frac{C}{\left({B}^{2} + {A}^{2}\right) - {\left(-1 \cdot A\right)}^{2}}}} + \left(A - -1 \cdot A\right)\right) \cdot \left(2 \cdot F\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}
\] |
associate--l+ [=>]46.2 | \[ \frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(\frac{-0.5}{\frac{C}{\color{blue}{{B}^{2} + \left({A}^{2} - {\left(-1 \cdot A\right)}^{2}\right)}}} + \left(A - -1 \cdot A\right)\right) \cdot \left(2 \cdot F\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}
\] |
unpow2 [=>]46.2 | \[ \frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(\frac{-0.5}{\frac{C}{\color{blue}{B \cdot B} + \left({A}^{2} - {\left(-1 \cdot A\right)}^{2}\right)}} + \left(A - -1 \cdot A\right)\right) \cdot \left(2 \cdot F\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}
\] |
unpow2 [=>]46.2 | \[ \frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(\frac{-0.5}{\frac{C}{B \cdot B + \left(\color{blue}{A \cdot A} - {\left(-1 \cdot A\right)}^{2}\right)}} + \left(A - -1 \cdot A\right)\right) \cdot \left(2 \cdot F\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}
\] |
mul-1-neg [=>]46.2 | \[ \frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(\frac{-0.5}{\frac{C}{B \cdot B + \left(A \cdot A - {\color{blue}{\left(-A\right)}}^{2}\right)}} + \left(A - -1 \cdot A\right)\right) \cdot \left(2 \cdot F\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}
\] |
mul-1-neg [=>]46.2 | \[ \frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(\frac{-0.5}{\frac{C}{B \cdot B + \left(A \cdot A - {\left(-A\right)}^{2}\right)}} + \left(A - \color{blue}{\left(-A\right)}\right)\right) \cdot \left(2 \cdot F\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}
\] |
if 0.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))) < +inf.0Initial program 37.2
Simplified26.5
[Start]37.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-rr24.8
Simplified24.8
[Start]24.8 | \[ \frac{-\sqrt{2 \cdot \left(\left(\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right) \cdot F\right) \cdot C + \left(\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right) \cdot F\right) \cdot \left(-\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)}
\] |
|---|---|
distribute-lft-out [=>]24.8 | \[ \frac{-\sqrt{2 \cdot \color{blue}{\left(\left(\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right) \cdot F\right) \cdot \left(C + \left(-\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)}
\] |
*-commutative [=>]24.8 | \[ \frac{-\sqrt{2 \cdot \left(\color{blue}{\left(F \cdot \mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)\right)} \cdot \left(C + \left(-\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)}
\] |
*-commutative [=>]24.8 | \[ \frac{-\sqrt{2 \cdot \left(\left(F \cdot \mathsf{fma}\left(B, B, A \cdot \color{blue}{\left(C \cdot -4\right)}\right)\right) \cdot \left(C + \left(-\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)}
\] |
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 64.0
Simplified64.0
[Start]64.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 A around 0 63.9
Simplified63.9
[Start]63.9 | \[ \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(A + \left(C - \sqrt{{B}^{2} + {C}^{2}}\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
|---|---|
unpow2 [=>]63.9 | \[ \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(A + \left(C - \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
unpow2 [=>]63.9 | \[ \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(A + \left(C - \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}
\] |
Taylor expanded in C around 0 55.2
Simplified55.2
[Start]55.2 | \[ -1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - B\right)}\right)
\] |
|---|---|
associate-*r* [=>]55.2 | \[ \color{blue}{\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F \cdot \left(A - B\right)}}
\] |
associate-*r/ [=>]55.2 | \[ \color{blue}{\frac{-1 \cdot \sqrt{2}}{B}} \cdot \sqrt{F \cdot \left(A - B\right)}
\] |
mul-1-neg [=>]55.2 | \[ \frac{\color{blue}{-\sqrt{2}}}{B} \cdot \sqrt{F \cdot \left(A - B\right)}
\] |
Final simplification40.6
| Alternative 1 | |
|---|---|
| Error | 44.3 |
| Cost | 33988 |
| Alternative 2 | |
|---|---|
| Error | 45.2 |
| Cost | 28688 |
| Alternative 3 | |
|---|---|
| Error | 44.4 |
| Cost | 27852 |
| Alternative 4 | |
|---|---|
| Error | 44.5 |
| Cost | 27588 |
| Alternative 5 | |
|---|---|
| Error | 44.5 |
| Cost | 27588 |
| Alternative 6 | |
|---|---|
| Error | 44.5 |
| Cost | 21836 |
| Alternative 7 | |
|---|---|
| Error | 48.4 |
| Cost | 21000 |
| Alternative 8 | |
|---|---|
| Error | 51.2 |
| Cost | 16028 |
| Alternative 9 | |
|---|---|
| Error | 51.5 |
| Cost | 15236 |
| Alternative 10 | |
|---|---|
| Error | 51.8 |
| Cost | 14740 |
| Alternative 11 | |
|---|---|
| Error | 48.8 |
| Cost | 14476 |
| Alternative 12 | |
|---|---|
| Error | 49.2 |
| Cost | 14344 |
| Alternative 13 | |
|---|---|
| Error | 54.5 |
| Cost | 14233 |
| Alternative 14 | |
|---|---|
| Error | 50.2 |
| Cost | 14216 |
| Alternative 15 | |
|---|---|
| Error | 55.2 |
| Cost | 8844 |
| Alternative 16 | |
|---|---|
| Error | 55.1 |
| Cost | 8844 |
| Alternative 17 | |
|---|---|
| Error | 53.9 |
| Cost | 8584 |
| Alternative 18 | |
|---|---|
| Error | 53.7 |
| Cost | 8584 |
| Alternative 19 | |
|---|---|
| Error | 58.0 |
| Cost | 8452 |
| Alternative 20 | |
|---|---|
| Error | 55.6 |
| Cost | 8452 |
| Alternative 21 | |
|---|---|
| Error | 57.5 |
| Cost | 7748 |
| Alternative 22 | |
|---|---|
| Error | 60.5 |
| Cost | 6976 |
| Alternative 23 | |
|---|---|
| Error | 60.4 |
| Cost | 6976 |
| Alternative 24 | |
|---|---|
| Error | 62.0 |
| Cost | 6848 |
| Alternative 25 | |
|---|---|
| Error | 62.8 |
| Cost | 6784 |
herbie shell --seed 2023017
(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))))