| Alternative 1 | |
|---|---|
| Error | 47.8 |
| Cost | 53704 |
(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 (* 4.0 (* A C)))
(t_1 (- t_0 (pow B 2.0)))
(t_2 (pow (- A C) 2.0))
(t_3 (- (pow B 2.0) (* (* 4.0 A) C)))
(t_4
(/
(-
(sqrt (* (* 2.0 (* t_3 F)) (- (+ A C) (sqrt (+ t_2 (pow B 2.0)))))))
t_3)))
(if (<= t_4 (- INFINITY))
(/ (sqrt (* A (* 8.0 (* F (* C (* A -2.0)))))) t_1)
(if (<= t_4 -2e-208)
(/
(sqrt
(*
2.0
(*
(- (pow B 2.0) t_0)
(* F (- C (- (sqrt (+ (pow B 2.0) t_2)) A))))))
t_1)
(if (<= t_4 INFINITY)
(/ (sqrt (* 8.0 (* C (* A (* F (* -2.0 C)))))) t_1)
(* (/ (sqrt 2.0) B) (* -1.0 (sqrt (* F (- 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 = 4.0 * (A * C);
double t_1 = t_0 - pow(B, 2.0);
double t_2 = pow((A - C), 2.0);
double t_3 = pow(B, 2.0) - ((4.0 * A) * C);
double t_4 = -sqrt(((2.0 * (t_3 * F)) * ((A + C) - sqrt((t_2 + pow(B, 2.0)))))) / t_3;
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = sqrt((A * (8.0 * (F * (C * (A * -2.0)))))) / t_1;
} else if (t_4 <= -2e-208) {
tmp = sqrt((2.0 * ((pow(B, 2.0) - t_0) * (F * (C - (sqrt((pow(B, 2.0) + t_2)) - A)))))) / t_1;
} else if (t_4 <= ((double) INFINITY)) {
tmp = sqrt((8.0 * (C * (A * (F * (-2.0 * C)))))) / t_1;
} else {
tmp = (sqrt(2.0) / B) * (-1.0 * sqrt((F * -B)));
}
return tmp;
}
public static double code(double A, double B, double C, double F) {
return -Math.sqrt(((2.0 * ((Math.pow(B, 2.0) - ((4.0 * A) * C)) * F)) * ((A + C) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / (Math.pow(B, 2.0) - ((4.0 * A) * C));
}
public static double code(double A, double B, double C, double F) {
double t_0 = 4.0 * (A * C);
double t_1 = t_0 - Math.pow(B, 2.0);
double t_2 = Math.pow((A - C), 2.0);
double t_3 = Math.pow(B, 2.0) - ((4.0 * A) * C);
double t_4 = -Math.sqrt(((2.0 * (t_3 * F)) * ((A + C) - Math.sqrt((t_2 + Math.pow(B, 2.0)))))) / t_3;
double tmp;
if (t_4 <= -Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((A * (8.0 * (F * (C * (A * -2.0)))))) / t_1;
} else if (t_4 <= -2e-208) {
tmp = Math.sqrt((2.0 * ((Math.pow(B, 2.0) - t_0) * (F * (C - (Math.sqrt((Math.pow(B, 2.0) + t_2)) - A)))))) / t_1;
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((8.0 * (C * (A * (F * (-2.0 * C)))))) / t_1;
} else {
tmp = (Math.sqrt(2.0) / B) * (-1.0 * Math.sqrt((F * -B)));
}
return tmp;
}
def code(A, B, C, F): return -math.sqrt(((2.0 * ((math.pow(B, 2.0) - ((4.0 * A) * C)) * F)) * ((A + C) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / (math.pow(B, 2.0) - ((4.0 * A) * C))
def code(A, B, C, F): t_0 = 4.0 * (A * C) t_1 = t_0 - math.pow(B, 2.0) t_2 = math.pow((A - C), 2.0) t_3 = math.pow(B, 2.0) - ((4.0 * A) * C) t_4 = -math.sqrt(((2.0 * (t_3 * F)) * ((A + C) - math.sqrt((t_2 + math.pow(B, 2.0)))))) / t_3 tmp = 0 if t_4 <= -math.inf: tmp = math.sqrt((A * (8.0 * (F * (C * (A * -2.0)))))) / t_1 elif t_4 <= -2e-208: tmp = math.sqrt((2.0 * ((math.pow(B, 2.0) - t_0) * (F * (C - (math.sqrt((math.pow(B, 2.0) + t_2)) - A)))))) / t_1 elif t_4 <= math.inf: tmp = math.sqrt((8.0 * (C * (A * (F * (-2.0 * C)))))) / t_1 else: tmp = (math.sqrt(2.0) / B) * (-1.0 * math.sqrt((F * -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 = Float64(4.0 * Float64(A * C)) t_1 = Float64(t_0 - (B ^ 2.0)) t_2 = Float64(A - C) ^ 2.0 t_3 = Float64((B ^ 2.0) - Float64(Float64(4.0 * A) * C)) t_4 = Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(t_3 * F)) * Float64(Float64(A + C) - sqrt(Float64(t_2 + (B ^ 2.0))))))) / t_3) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = Float64(sqrt(Float64(A * Float64(8.0 * Float64(F * Float64(C * Float64(A * -2.0)))))) / t_1); elseif (t_4 <= -2e-208) tmp = Float64(sqrt(Float64(2.0 * Float64(Float64((B ^ 2.0) - t_0) * Float64(F * Float64(C - Float64(sqrt(Float64((B ^ 2.0) + t_2)) - A)))))) / t_1); elseif (t_4 <= Inf) tmp = Float64(sqrt(Float64(8.0 * Float64(C * Float64(A * Float64(F * Float64(-2.0 * C)))))) / t_1); else tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-1.0 * sqrt(Float64(F * Float64(-B))))); end return tmp end
function tmp = code(A, B, C, F) tmp = -sqrt(((2.0 * (((B ^ 2.0) - ((4.0 * A) * C)) * F)) * ((A + C) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / ((B ^ 2.0) - ((4.0 * A) * C)); end
function tmp_2 = code(A, B, C, F) t_0 = 4.0 * (A * C); t_1 = t_0 - (B ^ 2.0); t_2 = (A - C) ^ 2.0; t_3 = (B ^ 2.0) - ((4.0 * A) * C); t_4 = -sqrt(((2.0 * (t_3 * F)) * ((A + C) - sqrt((t_2 + (B ^ 2.0)))))) / t_3; tmp = 0.0; if (t_4 <= -Inf) tmp = sqrt((A * (8.0 * (F * (C * (A * -2.0)))))) / t_1; elseif (t_4 <= -2e-208) tmp = sqrt((2.0 * (((B ^ 2.0) - t_0) * (F * (C - (sqrt(((B ^ 2.0) + t_2)) - A)))))) / t_1; elseif (t_4 <= Inf) tmp = sqrt((8.0 * (C * (A * (F * (-2.0 * C)))))) / t_1; else tmp = (sqrt(2.0) / B) * (-1.0 * sqrt((F * -B))); end tmp_2 = 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[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 - N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(N[Power[B, 2.0], $MachinePrecision] - N[(N[(4.0 * A), $MachinePrecision] * C), $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[(t$95$2 + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$3), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], N[(N[Sqrt[N[(A * N[(8.0 * N[(F * N[(C * N[(A * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$4, -2e-208], N[(N[Sqrt[N[(2.0 * N[(N[(N[Power[B, 2.0], $MachinePrecision] - t$95$0), $MachinePrecision] * N[(F * N[(C - N[(N[Sqrt[N[(N[Power[B, 2.0], $MachinePrecision] + t$95$2), $MachinePrecision]], $MachinePrecision] - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[(N[Sqrt[N[(8.0 * N[(C * N[(A * N[(F * N[(-2.0 * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$1), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * N[(-1.0 * N[Sqrt[N[(F * (-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 := 4 \cdot \left(A \cdot C\right)\\
t_1 := t_0 - {B}^{2}\\
t_2 := {\left(A - C\right)}^{2}\\
t_3 := {B}^{2} - \left(4 \cdot A\right) \cdot C\\
t_4 := \frac{-\sqrt{\left(2 \cdot \left(t_3 \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{t_2 + {B}^{2}}\right)}}{t_3}\\
\mathbf{if}\;t_4 \leq -\infty:\\
\;\;\;\;\frac{\sqrt{A \cdot \left(8 \cdot \left(F \cdot \left(C \cdot \left(A \cdot -2\right)\right)\right)\right)}}{t_1}\\
\mathbf{elif}\;t_4 \leq -2 \cdot 10^{-208}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(\left({B}^{2} - t_0\right) \cdot \left(F \cdot \left(C - \left(\sqrt{{B}^{2} + t_2} - A\right)\right)\right)\right)}}{t_1}\\
\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;\frac{\sqrt{8 \cdot \left(C \cdot \left(A \cdot \left(F \cdot \left(-2 \cdot C\right)\right)\right)\right)}}{t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-1 \cdot \sqrt{F \cdot \left(-B\right)}\right)\\
\end{array}
Results
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))) < -inf.0Initial 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}
\] |
|---|---|
rational.json-simplify-28 [=>]64.0 | \[ \color{blue}{-\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}}
\] |
rational.json-simplify-43 [<=]64.0 | \[ \color{blue}{\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)}}{-\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)}}
\] |
Taylor expanded in C around inf 56.4
Simplified56.2
[Start]56.4 | \[ \frac{\sqrt{8 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(-1 \cdot A - A\right)\right)\right)\right)}}{4 \cdot \left(A \cdot C\right) - {B}^{2}}
\] |
|---|---|
rational.json-simplify-31 [=>]56.5 | \[ \frac{\sqrt{\color{blue}{A \cdot \left(8 \cdot \left(C \cdot \left(F \cdot \left(-1 \cdot A - A\right)\right)\right)\right)}}}{4 \cdot \left(A \cdot C\right) - {B}^{2}}
\] |
rational.json-simplify-31 [=>]56.2 | \[ \frac{\sqrt{A \cdot \left(8 \cdot \color{blue}{\left(F \cdot \left(C \cdot \left(-1 \cdot A - A\right)\right)\right)}\right)}}{4 \cdot \left(A \cdot C\right) - {B}^{2}}
\] |
rational.json-simplify-2 [=>]56.2 | \[ \frac{\sqrt{A \cdot \left(8 \cdot \left(F \cdot \left(C \cdot \left(\color{blue}{A \cdot -1} - A\right)\right)\right)\right)}}{4 \cdot \left(A \cdot C\right) - {B}^{2}}
\] |
rational.json-simplify-18 [=>]56.2 | \[ \frac{\sqrt{A \cdot \left(8 \cdot \left(F \cdot \left(C \cdot \color{blue}{\left(A \cdot \left(-1 + -1\right)\right)}\right)\right)\right)}}{4 \cdot \left(A \cdot C\right) - {B}^{2}}
\] |
metadata-eval [=>]56.2 | \[ \frac{\sqrt{A \cdot \left(8 \cdot \left(F \cdot \left(C \cdot \left(A \cdot \color{blue}{-2}\right)\right)\right)\right)}}{4 \cdot \left(A \cdot C\right) - {B}^{2}}
\] |
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))) < -2.0000000000000002e-208Initial program 1.3
Simplified2.4
[Start]1.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}
\] |
|---|---|
rational.json-simplify-28 [=>]1.3 | \[ \color{blue}{-\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}}
\] |
rational.json-simplify-43 [<=]1.3 | \[ \color{blue}{\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)}}{-\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)}}
\] |
if -2.0000000000000002e-208 < (/.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 52.1
Simplified52.1
[Start]52.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}
\] |
|---|---|
rational.json-simplify-28 [=>]52.1 | \[ \color{blue}{-\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}}
\] |
rational.json-simplify-43 [<=]52.1 | \[ \color{blue}{\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)}}{-\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)}}
\] |
Taylor expanded in A around inf 48.9
Simplified46.9
[Start]48.9 | \[ \frac{\sqrt{8 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(-1 \cdot C - C\right)\right)\right)\right)}}{4 \cdot \left(A \cdot C\right) - {B}^{2}}
\] |
|---|---|
rational.json-simplify-31 [=>]46.9 | \[ \frac{\sqrt{8 \cdot \color{blue}{\left(C \cdot \left(A \cdot \left(F \cdot \left(-1 \cdot C - C\right)\right)\right)\right)}}}{4 \cdot \left(A \cdot C\right) - {B}^{2}}
\] |
rational.json-simplify-2 [=>]46.9 | \[ \frac{\sqrt{8 \cdot \left(C \cdot \left(A \cdot \left(F \cdot \left(\color{blue}{C \cdot -1} - C\right)\right)\right)\right)}}{4 \cdot \left(A \cdot C\right) - {B}^{2}}
\] |
rational.json-simplify-18 [=>]46.9 | \[ \frac{\sqrt{8 \cdot \left(C \cdot \left(A \cdot \left(F \cdot \color{blue}{\left(C \cdot \left(-1 + -1\right)\right)}\right)\right)\right)}}{4 \cdot \left(A \cdot C\right) - {B}^{2}}
\] |
metadata-eval [=>]46.9 | \[ \frac{\sqrt{8 \cdot \left(C \cdot \left(A \cdot \left(F \cdot \left(C \cdot \color{blue}{-2}\right)\right)\right)\right)}}{4 \cdot \left(A \cdot C\right) - {B}^{2}}
\] |
rational.json-simplify-31 [<=]46.9 | \[ \frac{\sqrt{8 \cdot \left(C \cdot \left(A \cdot \color{blue}{\left(C \cdot \left(F \cdot -2\right)\right)}\right)\right)}}{4 \cdot \left(A \cdot C\right) - {B}^{2}}
\] |
rational.json-simplify-2 [<=]46.9 | \[ \frac{\sqrt{8 \cdot \left(C \cdot \left(A \cdot \left(C \cdot \color{blue}{\left(-2 \cdot F\right)}\right)\right)\right)}}{4 \cdot \left(A \cdot C\right) - {B}^{2}}
\] |
rational.json-simplify-31 [<=]46.9 | \[ \frac{\sqrt{8 \cdot \left(C \cdot \left(A \cdot \color{blue}{\left(-2 \cdot \left(C \cdot F\right)\right)}\right)\right)}}{4 \cdot \left(A \cdot C\right) - {B}^{2}}
\] |
rational.json-simplify-2 [=>]46.9 | \[ \frac{\sqrt{8 \cdot \left(C \cdot \left(A \cdot \left(-2 \cdot \color{blue}{\left(F \cdot C\right)}\right)\right)\right)}}{4 \cdot \left(A \cdot C\right) - {B}^{2}}
\] |
rational.json-simplify-31 [=>]46.9 | \[ \frac{\sqrt{8 \cdot \left(C \cdot \left(A \cdot \color{blue}{\left(F \cdot \left(-2 \cdot C\right)\right)}\right)\right)}}{4 \cdot \left(A \cdot C\right) - {B}^{2}}
\] |
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}
\] |
|---|---|
rational.json-simplify-28 [=>]64.0 | \[ \color{blue}{-\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}}
\] |
rational.json-simplify-43 [<=]64.0 | \[ \color{blue}{\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)}}{-\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)}}
\] |
Taylor expanded in B around inf 63.8
Taylor expanded in C around 0 63.4
Simplified63.4
[Start]63.4 | \[ \frac{\left(\sqrt{2} \cdot B\right) \cdot \sqrt{\left(A - B\right) \cdot F}}{4 \cdot \left(A \cdot C\right) - {B}^{2}}
\] |
|---|---|
rational.json-simplify-2 [=>]63.4 | \[ \frac{\color{blue}{\sqrt{\left(A - B\right) \cdot F} \cdot \left(\sqrt{2} \cdot B\right)}}{4 \cdot \left(A \cdot C\right) - {B}^{2}}
\] |
rational.json-simplify-31 [=>]63.4 | \[ \frac{\color{blue}{\sqrt{2} \cdot \left(\sqrt{\left(A - B\right) \cdot F} \cdot B\right)}}{4 \cdot \left(A \cdot C\right) - {B}^{2}}
\] |
rational.json-simplify-2 [=>]63.4 | \[ \frac{\sqrt{2} \cdot \left(\sqrt{\color{blue}{F \cdot \left(A - B\right)}} \cdot B\right)}{4 \cdot \left(A \cdot C\right) - {B}^{2}}
\] |
Taylor expanded in C around 0 54.7
Simplified54.7
[Start]54.7 | \[ -1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - B\right)}\right)
\] |
|---|---|
rational.json-simplify-31 [=>]54.7 | \[ \color{blue}{\frac{\sqrt{2}}{B} \cdot \left(-1 \cdot \sqrt{F \cdot \left(A - B\right)}\right)}
\] |
Taylor expanded in A around 0 54.3
Simplified54.3
[Start]54.3 | \[ \frac{\sqrt{2}}{B} \cdot \left(-1 \cdot \sqrt{-1 \cdot \left(F \cdot B\right)}\right)
\] |
|---|---|
rational.json-simplify-31 [=>]54.3 | \[ \frac{\sqrt{2}}{B} \cdot \left(-1 \cdot \sqrt{\color{blue}{F \cdot \left(-1 \cdot B\right)}}\right)
\] |
rational.json-simplify-2 [=>]54.3 | \[ \frac{\sqrt{2}}{B} \cdot \left(-1 \cdot \sqrt{F \cdot \color{blue}{\left(B \cdot -1\right)}}\right)
\] |
rational.json-simplify-9 [<=]54.3 | \[ \frac{\sqrt{2}}{B} \cdot \left(-1 \cdot \sqrt{F \cdot \color{blue}{\left(-B\right)}}\right)
\] |
Final simplification45.8
| Alternative 1 | |
|---|---|
| Error | 47.8 |
| Cost | 53704 |
| Alternative 2 | |
|---|---|
| Error | 50.2 |
| Cost | 40532 |
| Alternative 3 | |
|---|---|
| Error | 48.7 |
| Cost | 40004 |
| Alternative 4 | |
|---|---|
| Error | 48.7 |
| Cost | 40004 |
| Alternative 5 | |
|---|---|
| Error | 48.7 |
| Cost | 20804 |
| Alternative 6 | |
|---|---|
| Error | 48.8 |
| Cost | 20676 |
| Alternative 7 | |
|---|---|
| Error | 49.0 |
| Cost | 20612 |
| Alternative 8 | |
|---|---|
| Error | 49.4 |
| Cost | 20292 |
| Alternative 9 | |
|---|---|
| Error | 50.1 |
| Cost | 14472 |
| Alternative 10 | |
|---|---|
| Error | 51.0 |
| Cost | 14348 |
| Alternative 11 | |
|---|---|
| Error | 51.0 |
| Cost | 14348 |
| Alternative 12 | |
|---|---|
| Error | 50.0 |
| Cost | 14348 |
| Alternative 13 | |
|---|---|
| Error | 49.8 |
| Cost | 14212 |
| Alternative 14 | |
|---|---|
| Error | 52.1 |
| Cost | 13828 |
| Alternative 15 | |
|---|---|
| Error | 55.0 |
| Cost | 13440 |
| Alternative 16 | |
|---|---|
| Error | 62.8 |
| Cost | 13312 |
| Alternative 17 | |
|---|---|
| Error | 62.0 |
| Cost | 6976 |
| Alternative 18 | |
|---|---|
| Error | 62.0 |
| Cost | 6976 |
herbie shell --seed 2023053
(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))))