| Alternative 1 | |
|---|---|
| Error | 45.9 |
| Cost | 149260 |
(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 (- (pow B 2.0) (* (* 4.0 A) C)))
(t_1 (* (sqrt 2.0) (- (sqrt (/ F B)))))
(t_2 (pow (- A C) 2.0))
(t_3
(/
(-
(sqrt (* (* 2.0 (* t_0 F)) (+ (+ A C) (sqrt (+ t_2 (pow B 2.0)))))))
t_0))
(t_4 (* A (* C 4.0))))
(if (<= t_3 (- INFINITY))
t_1
(if (<= t_3 -1e-202)
(/
1.0
(/
(- t_4 (pow B 2.0))
(sqrt
(*
2.0
(*
(+ A (+ C (sqrt (+ (pow B 2.0) t_2))))
(* (- (pow B 2.0) t_4) F))))))
(if (<= t_3 INFINITY)
(/
(-
(sqrt
(+
(* 8.0 (* C (* F (pow B 2.0))))
(+
(* -16.0 (* A (* (pow C 2.0) F)))
(*
-2.0
(/
(*
F
(+ (* 0.5 (pow B 4.0)) (* -2.0 (* (pow C 2.0) (pow B 2.0)))))
A))))))
(- (pow B 2.0) (* 4.0 (* A C))))
t_1)))))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 = pow(B, 2.0) - ((4.0 * A) * C);
double t_1 = sqrt(2.0) * -sqrt((F / B));
double t_2 = pow((A - C), 2.0);
double t_3 = -sqrt(((2.0 * (t_0 * F)) * ((A + C) + sqrt((t_2 + pow(B, 2.0)))))) / t_0;
double t_4 = A * (C * 4.0);
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_3 <= -1e-202) {
tmp = 1.0 / ((t_4 - pow(B, 2.0)) / sqrt((2.0 * ((A + (C + sqrt((pow(B, 2.0) + t_2)))) * ((pow(B, 2.0) - t_4) * F)))));
} else if (t_3 <= ((double) INFINITY)) {
tmp = -sqrt(((8.0 * (C * (F * pow(B, 2.0)))) + ((-16.0 * (A * (pow(C, 2.0) * F))) + (-2.0 * ((F * ((0.5 * pow(B, 4.0)) + (-2.0 * (pow(C, 2.0) * pow(B, 2.0))))) / A))))) / (pow(B, 2.0) - (4.0 * (A * C)));
} else {
tmp = t_1;
}
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 = Math.pow(B, 2.0) - ((4.0 * A) * C);
double t_1 = Math.sqrt(2.0) * -Math.sqrt((F / B));
double t_2 = Math.pow((A - C), 2.0);
double t_3 = -Math.sqrt(((2.0 * (t_0 * F)) * ((A + C) + Math.sqrt((t_2 + Math.pow(B, 2.0)))))) / t_0;
double t_4 = A * (C * 4.0);
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_3 <= -1e-202) {
tmp = 1.0 / ((t_4 - Math.pow(B, 2.0)) / Math.sqrt((2.0 * ((A + (C + Math.sqrt((Math.pow(B, 2.0) + t_2)))) * ((Math.pow(B, 2.0) - t_4) * F)))));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = -Math.sqrt(((8.0 * (C * (F * Math.pow(B, 2.0)))) + ((-16.0 * (A * (Math.pow(C, 2.0) * F))) + (-2.0 * ((F * ((0.5 * Math.pow(B, 4.0)) + (-2.0 * (Math.pow(C, 2.0) * Math.pow(B, 2.0))))) / A))))) / (Math.pow(B, 2.0) - (4.0 * (A * C)));
} else {
tmp = t_1;
}
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 = math.pow(B, 2.0) - ((4.0 * A) * C) t_1 = math.sqrt(2.0) * -math.sqrt((F / B)) t_2 = math.pow((A - C), 2.0) t_3 = -math.sqrt(((2.0 * (t_0 * F)) * ((A + C) + math.sqrt((t_2 + math.pow(B, 2.0)))))) / t_0 t_4 = A * (C * 4.0) tmp = 0 if t_3 <= -math.inf: tmp = t_1 elif t_3 <= -1e-202: tmp = 1.0 / ((t_4 - math.pow(B, 2.0)) / math.sqrt((2.0 * ((A + (C + math.sqrt((math.pow(B, 2.0) + t_2)))) * ((math.pow(B, 2.0) - t_4) * F))))) elif t_3 <= math.inf: tmp = -math.sqrt(((8.0 * (C * (F * math.pow(B, 2.0)))) + ((-16.0 * (A * (math.pow(C, 2.0) * F))) + (-2.0 * ((F * ((0.5 * math.pow(B, 4.0)) + (-2.0 * (math.pow(C, 2.0) * math.pow(B, 2.0))))) / A))))) / (math.pow(B, 2.0) - (4.0 * (A * C))) else: tmp = t_1 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((B ^ 2.0) - Float64(Float64(4.0 * A) * C)) t_1 = Float64(sqrt(2.0) * Float64(-sqrt(Float64(F / B)))) t_2 = Float64(A - C) ^ 2.0 t_3 = Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(t_0 * F)) * Float64(Float64(A + C) + sqrt(Float64(t_2 + (B ^ 2.0))))))) / t_0) t_4 = Float64(A * Float64(C * 4.0)) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = t_1; elseif (t_3 <= -1e-202) tmp = Float64(1.0 / Float64(Float64(t_4 - (B ^ 2.0)) / sqrt(Float64(2.0 * Float64(Float64(A + Float64(C + sqrt(Float64((B ^ 2.0) + t_2)))) * Float64(Float64((B ^ 2.0) - t_4) * F)))))); elseif (t_3 <= Inf) tmp = Float64(Float64(-sqrt(Float64(Float64(8.0 * Float64(C * Float64(F * (B ^ 2.0)))) + Float64(Float64(-16.0 * Float64(A * Float64((C ^ 2.0) * F))) + Float64(-2.0 * Float64(Float64(F * Float64(Float64(0.5 * (B ^ 4.0)) + Float64(-2.0 * Float64((C ^ 2.0) * (B ^ 2.0))))) / A)))))) / Float64((B ^ 2.0) - Float64(4.0 * Float64(A * C)))); else tmp = t_1; 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 = (B ^ 2.0) - ((4.0 * A) * C); t_1 = sqrt(2.0) * -sqrt((F / B)); t_2 = (A - C) ^ 2.0; t_3 = -sqrt(((2.0 * (t_0 * F)) * ((A + C) + sqrt((t_2 + (B ^ 2.0)))))) / t_0; t_4 = A * (C * 4.0); tmp = 0.0; if (t_3 <= -Inf) tmp = t_1; elseif (t_3 <= -1e-202) tmp = 1.0 / ((t_4 - (B ^ 2.0)) / sqrt((2.0 * ((A + (C + sqrt(((B ^ 2.0) + t_2)))) * (((B ^ 2.0) - t_4) * F))))); elseif (t_3 <= Inf) tmp = -sqrt(((8.0 * (C * (F * (B ^ 2.0)))) + ((-16.0 * (A * ((C ^ 2.0) * F))) + (-2.0 * ((F * ((0.5 * (B ^ 4.0)) + (-2.0 * ((C ^ 2.0) * (B ^ 2.0))))) / A))))) / ((B ^ 2.0) - (4.0 * (A * C))); else tmp = t_1; 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[(N[Power[B, 2.0], $MachinePrecision] - N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F / B), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[((-N[Sqrt[N[(N[(2.0 * N[(t$95$0 * 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$0), $MachinePrecision]}, Block[{t$95$4 = N[(A * N[(C * 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$1, If[LessEqual[t$95$3, -1e-202], N[(1.0 / N[(N[(t$95$4 - N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(2.0 * N[(N[(A + N[(C + N[Sqrt[N[(N[Power[B, 2.0], $MachinePrecision] + t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[B, 2.0], $MachinePrecision] - t$95$4), $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[((-N[Sqrt[N[(N[(8.0 * N[(C * N[(F * N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(-16.0 * N[(A * N[(N[Power[C, 2.0], $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-2.0 * N[(N[(F * N[(N[(0.5 * N[Power[B, 4.0], $MachinePrecision]), $MachinePrecision] + N[(-2.0 * N[(N[Power[C, 2.0], $MachinePrecision] * N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / N[(N[Power[B, 2.0], $MachinePrecision] - N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$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}
\begin{array}{l}
t_0 := {B}^{2} - \left(4 \cdot A\right) \cdot C\\
t_1 := \sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\
t_2 := {\left(A - C\right)}^{2}\\
t_3 := \frac{-\sqrt{\left(2 \cdot \left(t_0 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{t_2 + {B}^{2}}\right)}}{t_0}\\
t_4 := A \cdot \left(C \cdot 4\right)\\
\mathbf{if}\;t_3 \leq -\infty:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_3 \leq -1 \cdot 10^{-202}:\\
\;\;\;\;\frac{1}{\frac{t_4 - {B}^{2}}{\sqrt{2 \cdot \left(\left(A + \left(C + \sqrt{{B}^{2} + t_2}\right)\right) \cdot \left(\left({B}^{2} - t_4\right) \cdot F\right)\right)}}}\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;\frac{-\sqrt{8 \cdot \left(C \cdot \left(F \cdot {B}^{2}\right)\right) + \left(-16 \cdot \left(A \cdot \left({C}^{2} \cdot F\right)\right) + -2 \cdot \frac{F \cdot \left(0.5 \cdot {B}^{4} + -2 \cdot \left({C}^{2} \cdot {B}^{2}\right)\right)}{A}\right)}}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\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.0 or +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-50 [<=]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(4 \cdot A\right) \cdot C - {B}^{2}}}
\] |
rational.json-simplify-5 [<=]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)}}{\color{blue}{\left(\left(4 \cdot A\right) \cdot C - {B}^{2}\right) - 0}}
\] |
rational.json-simplify-50 [=>]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)}}{0 - \left(\left(4 \cdot A\right) \cdot C - {B}^{2}\right)}}
\] |
Taylor expanded in A around 0 63.5
Simplified63.5
[Start]63.5 | \[ \frac{-\sqrt{2 \cdot \left(\left(C + \sqrt{{B}^{2} + {C}^{2}}\right) \cdot \left(F \cdot {B}^{2}\right)\right)}}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}
\] |
|---|---|
rational.json-simplify-43 [=>]63.5 | \[ \frac{-\sqrt{\color{blue}{\left(C + \sqrt{{B}^{2} + {C}^{2}}\right) \cdot \left(\left(F \cdot {B}^{2}\right) \cdot 2\right)}}}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}
\] |
rational.json-simplify-2 [<=]63.5 | \[ \frac{-\sqrt{\left(C + \sqrt{{B}^{2} + {C}^{2}}\right) \cdot \color{blue}{\left(2 \cdot \left(F \cdot {B}^{2}\right)\right)}}}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}
\] |
rational.json-simplify-2 [=>]63.5 | \[ \frac{-\sqrt{\left(C + \sqrt{{B}^{2} + {C}^{2}}\right) \cdot \left(2 \cdot \color{blue}{\left({B}^{2} \cdot F\right)}\right)}}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}
\] |
Taylor expanded in C around 0 54.0
Simplified54.0
[Start]54.0 | \[ -1 \cdot \left(\sqrt{2} \cdot \sqrt{\frac{F}{B}}\right)
\] |
|---|---|
rational.json-simplify-43 [=>]54.0 | \[ \color{blue}{\sqrt{2} \cdot \left(\sqrt{\frac{F}{B}} \cdot -1\right)}
\] |
rational.json-simplify-9 [=>]54.0 | \[ \sqrt{2} \cdot \color{blue}{\left(-\sqrt{\frac{F}{B}}\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))) < -1e-202Initial program 1.5
Simplified2.4
[Start]1.5 | \[ \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-50 [<=]1.5 | \[ \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(4 \cdot A\right) \cdot C - {B}^{2}}}
\] |
rational.json-simplify-5 [<=]1.5 | \[ \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)}}{\color{blue}{\left(\left(4 \cdot A\right) \cdot C - {B}^{2}\right) - 0}}
\] |
rational.json-simplify-50 [=>]1.5 | \[ \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)}}{0 - \left(\left(4 \cdot A\right) \cdot C - {B}^{2}\right)}}
\] |
Applied egg-rr1.7
Applied egg-rr1.6
if -1e-202 < (/.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.4
Simplified50.7
[Start]52.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}
\] |
|---|---|
rational.json-simplify-50 [<=]52.4 | \[ \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(4 \cdot A\right) \cdot C - {B}^{2}}}
\] |
rational.json-simplify-5 [<=]52.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)}}{\color{blue}{\left(\left(4 \cdot A\right) \cdot C - {B}^{2}\right) - 0}}
\] |
rational.json-simplify-50 [=>]52.4 | \[ \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)}}{0 - \left(\left(4 \cdot A\right) \cdot C - {B}^{2}\right)}}
\] |
Taylor expanded in A around -inf 51.6
Final simplification45.7
| Alternative 1 | |
|---|---|
| Error | 45.9 |
| Cost | 149260 |
| Alternative 2 | |
|---|---|
| Error | 45.9 |
| Cost | 149260 |
| Alternative 3 | |
|---|---|
| Error | 51.1 |
| Cost | 21324 |
| Alternative 4 | |
|---|---|
| Error | 51.3 |
| Cost | 20684 |
| Alternative 5 | |
|---|---|
| Error | 51.6 |
| Cost | 20484 |
| Alternative 6 | |
|---|---|
| Error | 50.1 |
| Cost | 20356 |
| Alternative 7 | |
|---|---|
| Error | 50.3 |
| Cost | 19972 |
| Alternative 8 | |
|---|---|
| Error | 53.6 |
| Cost | 13892 |
| Alternative 9 | |
|---|---|
| Error | 53.7 |
| Cost | 13636 |
| Alternative 10 | |
|---|---|
| Error | 55.0 |
| Cost | 13184 |
| Alternative 11 | |
|---|---|
| Error | 62.1 |
| Cost | 6976 |
| Alternative 12 | |
|---|---|
| Error | 62.1 |
| Cost | 6848 |
herbie shell --seed 2023064
(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))))