| Alternative 1 | |
|---|---|
| Error | 45.4 |
| Cost | 41172 |
(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 (* A (* C 4.0)))
(t_3 (* (* 4.0 A) C))
(t_4 (- (pow B 2.0) t_0))
(t_5 (+ A (- C (sqrt (+ (pow B 2.0) (pow (- A C) 2.0)))))))
(if (<= C -4.2e+230)
(* 0.25 (sqrt (* (/ F A) -16.0)))
(if (<= C -3.4e+155)
(* (/ 1.0 t_1) (sqrt (* t_4 (* 2.0 (* F (+ A (+ C C)))))))
(if (<= C -4.5e-294)
(/
1.0
(/
(- t_2 (pow B 2.0))
(sqrt (* 2.0 (* t_5 (* (- (pow B 2.0) t_2) F))))))
(if (<= C 1.45e-248)
(/ (sqrt (* (* 2.0 F) (* t_4 (+ A (- C (- A)))))) t_1)
(if (<= C 8.5e-9)
(/
(sqrt (* 2.0 (* (- (pow B 2.0) t_3) (* F t_5))))
(- t_3 (pow B 2.0)))
(- (sqrt (- (/ F C)))))))))))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 = A * (C * 4.0);
double t_3 = (4.0 * A) * C;
double t_4 = pow(B, 2.0) - t_0;
double t_5 = A + (C - sqrt((pow(B, 2.0) + pow((A - C), 2.0))));
double tmp;
if (C <= -4.2e+230) {
tmp = 0.25 * sqrt(((F / A) * -16.0));
} else if (C <= -3.4e+155) {
tmp = (1.0 / t_1) * sqrt((t_4 * (2.0 * (F * (A + (C + C))))));
} else if (C <= -4.5e-294) {
tmp = 1.0 / ((t_2 - pow(B, 2.0)) / sqrt((2.0 * (t_5 * ((pow(B, 2.0) - t_2) * F)))));
} else if (C <= 1.45e-248) {
tmp = sqrt(((2.0 * F) * (t_4 * (A + (C - -A))))) / t_1;
} else if (C <= 8.5e-9) {
tmp = sqrt((2.0 * ((pow(B, 2.0) - t_3) * (F * t_5)))) / (t_3 - pow(B, 2.0));
} else {
tmp = -sqrt(-(F / C));
}
return tmp;
}
real(8) function code(a, b, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: f
code = -sqrt(((2.0d0 * (((b ** 2.0d0) - ((4.0d0 * a) * c)) * f)) * ((a + c) - sqrt((((a - c) ** 2.0d0) + (b ** 2.0d0)))))) / ((b ** 2.0d0) - ((4.0d0 * a) * c))
end function
real(8) function code(a, b, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = 4.0d0 * (a * c)
t_1 = t_0 - (b ** 2.0d0)
t_2 = a * (c * 4.0d0)
t_3 = (4.0d0 * a) * c
t_4 = (b ** 2.0d0) - t_0
t_5 = a + (c - sqrt(((b ** 2.0d0) + ((a - c) ** 2.0d0))))
if (c <= (-4.2d+230)) then
tmp = 0.25d0 * sqrt(((f / a) * (-16.0d0)))
else if (c <= (-3.4d+155)) then
tmp = (1.0d0 / t_1) * sqrt((t_4 * (2.0d0 * (f * (a + (c + c))))))
else if (c <= (-4.5d-294)) then
tmp = 1.0d0 / ((t_2 - (b ** 2.0d0)) / sqrt((2.0d0 * (t_5 * (((b ** 2.0d0) - t_2) * f)))))
else if (c <= 1.45d-248) then
tmp = sqrt(((2.0d0 * f) * (t_4 * (a + (c - -a))))) / t_1
else if (c <= 8.5d-9) then
tmp = sqrt((2.0d0 * (((b ** 2.0d0) - t_3) * (f * t_5)))) / (t_3 - (b ** 2.0d0))
else
tmp = -sqrt(-(f / c))
end if
code = tmp
end function
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 = A * (C * 4.0);
double t_3 = (4.0 * A) * C;
double t_4 = Math.pow(B, 2.0) - t_0;
double t_5 = A + (C - Math.sqrt((Math.pow(B, 2.0) + Math.pow((A - C), 2.0))));
double tmp;
if (C <= -4.2e+230) {
tmp = 0.25 * Math.sqrt(((F / A) * -16.0));
} else if (C <= -3.4e+155) {
tmp = (1.0 / t_1) * Math.sqrt((t_4 * (2.0 * (F * (A + (C + C))))));
} else if (C <= -4.5e-294) {
tmp = 1.0 / ((t_2 - Math.pow(B, 2.0)) / Math.sqrt((2.0 * (t_5 * ((Math.pow(B, 2.0) - t_2) * F)))));
} else if (C <= 1.45e-248) {
tmp = Math.sqrt(((2.0 * F) * (t_4 * (A + (C - -A))))) / t_1;
} else if (C <= 8.5e-9) {
tmp = Math.sqrt((2.0 * ((Math.pow(B, 2.0) - t_3) * (F * t_5)))) / (t_3 - Math.pow(B, 2.0));
} else {
tmp = -Math.sqrt(-(F / C));
}
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 = A * (C * 4.0) t_3 = (4.0 * A) * C t_4 = math.pow(B, 2.0) - t_0 t_5 = A + (C - math.sqrt((math.pow(B, 2.0) + math.pow((A - C), 2.0)))) tmp = 0 if C <= -4.2e+230: tmp = 0.25 * math.sqrt(((F / A) * -16.0)) elif C <= -3.4e+155: tmp = (1.0 / t_1) * math.sqrt((t_4 * (2.0 * (F * (A + (C + C)))))) elif C <= -4.5e-294: tmp = 1.0 / ((t_2 - math.pow(B, 2.0)) / math.sqrt((2.0 * (t_5 * ((math.pow(B, 2.0) - t_2) * F))))) elif C <= 1.45e-248: tmp = math.sqrt(((2.0 * F) * (t_4 * (A + (C - -A))))) / t_1 elif C <= 8.5e-9: tmp = math.sqrt((2.0 * ((math.pow(B, 2.0) - t_3) * (F * t_5)))) / (t_3 - math.pow(B, 2.0)) else: tmp = -math.sqrt(-(F / C)) 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 * Float64(C * 4.0)) t_3 = Float64(Float64(4.0 * A) * C) t_4 = Float64((B ^ 2.0) - t_0) t_5 = Float64(A + Float64(C - sqrt(Float64((B ^ 2.0) + (Float64(A - C) ^ 2.0))))) tmp = 0.0 if (C <= -4.2e+230) tmp = Float64(0.25 * sqrt(Float64(Float64(F / A) * -16.0))); elseif (C <= -3.4e+155) tmp = Float64(Float64(1.0 / t_1) * sqrt(Float64(t_4 * Float64(2.0 * Float64(F * Float64(A + Float64(C + C))))))); elseif (C <= -4.5e-294) tmp = Float64(1.0 / Float64(Float64(t_2 - (B ^ 2.0)) / sqrt(Float64(2.0 * Float64(t_5 * Float64(Float64((B ^ 2.0) - t_2) * F)))))); elseif (C <= 1.45e-248) tmp = Float64(sqrt(Float64(Float64(2.0 * F) * Float64(t_4 * Float64(A + Float64(C - Float64(-A)))))) / t_1); elseif (C <= 8.5e-9) tmp = Float64(sqrt(Float64(2.0 * Float64(Float64((B ^ 2.0) - t_3) * Float64(F * t_5)))) / Float64(t_3 - (B ^ 2.0))); else tmp = Float64(-sqrt(Float64(-Float64(F / C)))); 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 * 4.0); t_3 = (4.0 * A) * C; t_4 = (B ^ 2.0) - t_0; t_5 = A + (C - sqrt(((B ^ 2.0) + ((A - C) ^ 2.0)))); tmp = 0.0; if (C <= -4.2e+230) tmp = 0.25 * sqrt(((F / A) * -16.0)); elseif (C <= -3.4e+155) tmp = (1.0 / t_1) * sqrt((t_4 * (2.0 * (F * (A + (C + C)))))); elseif (C <= -4.5e-294) tmp = 1.0 / ((t_2 - (B ^ 2.0)) / sqrt((2.0 * (t_5 * (((B ^ 2.0) - t_2) * F))))); elseif (C <= 1.45e-248) tmp = sqrt(((2.0 * F) * (t_4 * (A + (C - -A))))) / t_1; elseif (C <= 8.5e-9) tmp = sqrt((2.0 * (((B ^ 2.0) - t_3) * (F * t_5)))) / (t_3 - (B ^ 2.0)); else tmp = -sqrt(-(F / C)); 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[(A * N[(C * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]}, Block[{t$95$4 = N[(N[Power[B, 2.0], $MachinePrecision] - t$95$0), $MachinePrecision]}, Block[{t$95$5 = N[(A + N[(C - N[Sqrt[N[(N[Power[B, 2.0], $MachinePrecision] + N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -4.2e+230], N[(0.25 * N[Sqrt[N[(N[(F / A), $MachinePrecision] * -16.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -3.4e+155], N[(N[(1.0 / t$95$1), $MachinePrecision] * N[Sqrt[N[(t$95$4 * N[(2.0 * N[(F * N[(A + N[(C + C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, -4.5e-294], N[(1.0 / N[(N[(t$95$2 - N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(2.0 * N[(t$95$5 * N[(N[(N[Power[B, 2.0], $MachinePrecision] - t$95$2), $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.45e-248], N[(N[Sqrt[N[(N[(2.0 * F), $MachinePrecision] * N[(t$95$4 * N[(A + N[(C - (-A)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[C, 8.5e-9], N[(N[Sqrt[N[(2.0 * N[(N[(N[Power[B, 2.0], $MachinePrecision] - t$95$3), $MachinePrecision] * N[(F * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(t$95$3 - N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], (-N[Sqrt[(-N[(F / C), $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 := A \cdot \left(C \cdot 4\right)\\
t_3 := \left(4 \cdot A\right) \cdot C\\
t_4 := {B}^{2} - t_0\\
t_5 := A + \left(C - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\\
\mathbf{if}\;C \leq -4.2 \cdot 10^{+230}:\\
\;\;\;\;0.25 \cdot \sqrt{\frac{F}{A} \cdot -16}\\
\mathbf{elif}\;C \leq -3.4 \cdot 10^{+155}:\\
\;\;\;\;\frac{1}{t_1} \cdot \sqrt{t_4 \cdot \left(2 \cdot \left(F \cdot \left(A + \left(C + C\right)\right)\right)\right)}\\
\mathbf{elif}\;C \leq -4.5 \cdot 10^{-294}:\\
\;\;\;\;\frac{1}{\frac{t_2 - {B}^{2}}{\sqrt{2 \cdot \left(t_5 \cdot \left(\left({B}^{2} - t_2\right) \cdot F\right)\right)}}}\\
\mathbf{elif}\;C \leq 1.45 \cdot 10^{-248}:\\
\;\;\;\;\frac{\sqrt{\left(2 \cdot F\right) \cdot \left(t_4 \cdot \left(A + \left(C - \left(-A\right)\right)\right)\right)}}{t_1}\\
\mathbf{elif}\;C \leq 8.5 \cdot 10^{-9}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(\left({B}^{2} - t_3\right) \cdot \left(F \cdot t_5\right)\right)}}{t_3 - {B}^{2}}\\
\mathbf{else}:\\
\;\;\;\;-\sqrt{-\frac{F}{C}}\\
\end{array}
Results
if C < -4.19999999999999986e230Initial 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}}}
\] |
Taylor expanded in B around 0 64.0
Simplified47.4
[Start]64.0 | \[ 0.25 \cdot \left(\left(\sqrt{2} \cdot \sqrt{-8}\right) \cdot \sqrt{\frac{F}{A}}\right)
\] |
|---|---|
exponential.json-simplify-20 [=>]64.0 | \[ 0.25 \cdot \left(\color{blue}{\sqrt{-8 \cdot 2}} \cdot \sqrt{\frac{F}{A}}\right)
\] |
metadata-eval [=>]64.0 | \[ 0.25 \cdot \left(\sqrt{\color{blue}{-16}} \cdot \sqrt{\frac{F}{A}}\right)
\] |
exponential.json-simplify-20 [=>]47.4 | \[ 0.25 \cdot \color{blue}{\sqrt{\frac{F}{A} \cdot -16}}
\] |
if -4.19999999999999986e230 < C < -3.4000000000000001e155Initial 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}}}
\] |
Taylor expanded in C around -inf 50.7
Simplified50.7
[Start]50.7 | \[ \frac{\sqrt{2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(F \cdot \left(A + \left(C - -1 \cdot C\right)\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - {B}^{2}}
\] |
|---|---|
rational.json-simplify-2 [=>]50.7 | \[ \frac{\sqrt{2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(F \cdot \left(A + \left(C - \color{blue}{C \cdot -1}\right)\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - {B}^{2}}
\] |
rational.json-simplify-9 [=>]50.7 | \[ \frac{\sqrt{2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot \left(F \cdot \left(A + \left(C - \color{blue}{\left(-C\right)}\right)\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - {B}^{2}}
\] |
Applied egg-rr50.7
if -3.4000000000000001e155 < C < -4.49999999999999981e-294Initial program 44.4
Simplified44.6
[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}
\] |
|---|---|
rational.json-simplify-50 [=>]44.4 | \[ \color{blue}{\frac{-\left(-\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)}\right)}{\left(4 \cdot A\right) \cdot C - {B}^{2}}}
\] |
rational.json-simplify-5 [<=]44.4 | \[ \frac{-\left(-\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)}\right)}{\color{blue}{\left(\left(4 \cdot A\right) \cdot C - {B}^{2}\right) - 0}}
\] |
rational.json-simplify-50 [<=]44.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)}}
\] |
Applied egg-rr44.5
Applied egg-rr44.5
if -4.49999999999999981e-294 < C < 1.4500000000000001e-248Initial program 47.0
Simplified48.1
[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}
\] |
|---|---|
rational.json-simplify-50 [<=]47.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}}}
\] |
Taylor expanded in A around -inf 57.0
Simplified57.0
[Start]57.0 | \[ \frac{\sqrt{\left(2 \cdot F\right) \cdot \left(\left({B}^{2} - 4 \cdot \left(A \cdot C\right)\right) \cdot \left(A + \left(C - -1 \cdot A\right)\right)\right)}}{4 \cdot \left(A \cdot C\right) - {B}^{2}}
\] |
|---|---|
rational.json-simplify-2 [=>]57.0 | \[ \frac{\sqrt{\left(2 \cdot F\right) \cdot \left(\left({B}^{2} - 4 \cdot \left(A \cdot C\right)\right) \cdot \left(A + \left(C - \color{blue}{A \cdot -1}\right)\right)\right)}}{4 \cdot \left(A \cdot C\right) - {B}^{2}}
\] |
rational.json-simplify-9 [=>]57.0 | \[ \frac{\sqrt{\left(2 \cdot F\right) \cdot \left(\left({B}^{2} - 4 \cdot \left(A \cdot C\right)\right) \cdot \left(A + \left(C - \color{blue}{\left(-A\right)}\right)\right)\right)}}{4 \cdot \left(A \cdot C\right) - {B}^{2}}
\] |
if 1.4500000000000001e-248 < C < 8.5e-9Initial program 48.8
Simplified48.3
[Start]48.8 | \[ \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 [<=]48.8 | \[ \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}}}
\] |
if 8.5e-9 < C Initial program 61.0
Taylor expanded in A around -inf 64.0
Simplified40.3
[Start]64.0 | \[ -1 \cdot \left(\left(\sqrt{2} \cdot \sqrt{-0.5}\right) \cdot \sqrt{\frac{F}{C}}\right)
\] |
|---|---|
rational.json-simplify-2 [=>]64.0 | \[ \color{blue}{\left(\left(\sqrt{2} \cdot \sqrt{-0.5}\right) \cdot \sqrt{\frac{F}{C}}\right) \cdot -1}
\] |
rational.json-simplify-9 [=>]64.0 | \[ \color{blue}{-\left(\sqrt{2} \cdot \sqrt{-0.5}\right) \cdot \sqrt{\frac{F}{C}}}
\] |
exponential.json-simplify-20 [=>]64.0 | \[ -\color{blue}{\sqrt{-0.5 \cdot 2}} \cdot \sqrt{\frac{F}{C}}
\] |
metadata-eval [=>]64.0 | \[ -\sqrt{\color{blue}{-1}} \cdot \sqrt{\frac{F}{C}}
\] |
exponential.json-simplify-20 [=>]40.3 | \[ -\color{blue}{\sqrt{\frac{F}{C} \cdot -1}}
\] |
rational.json-simplify-9 [=>]40.3 | \[ -\sqrt{\color{blue}{-\frac{F}{C}}}
\] |
Final simplification45.4
| Alternative 1 | |
|---|---|
| Error | 45.4 |
| Cost | 41172 |
| Alternative 2 | |
|---|---|
| Error | 47.8 |
| Cost | 40532 |
| Alternative 3 | |
|---|---|
| Error | 48.6 |
| Cost | 22252 |
| Alternative 4 | |
|---|---|
| Error | 47.8 |
| Cost | 21648 |
| Alternative 5 | |
|---|---|
| Error | 49.5 |
| Cost | 14540 |
| Alternative 6 | |
|---|---|
| Error | 47.4 |
| Cost | 14100 |
| Alternative 7 | |
|---|---|
| Error | 48.7 |
| Cost | 8812 |
| Alternative 8 | |
|---|---|
| Error | 48.7 |
| Cost | 8812 |
| Alternative 9 | |
|---|---|
| Error | 48.6 |
| Cost | 8812 |
| Alternative 10 | |
|---|---|
| Error | 47.9 |
| Cost | 8556 |
| Alternative 11 | |
|---|---|
| Error | 47.4 |
| Cost | 8348 |
| Alternative 12 | |
|---|---|
| Error | 48.0 |
| Cost | 8292 |
| Alternative 13 | |
|---|---|
| Error | 48.1 |
| Cost | 8160 |
| Alternative 14 | |
|---|---|
| Error | 47.4 |
| Cost | 7312 |
| Alternative 15 | |
|---|---|
| Error | 47.7 |
| Cost | 7248 |
| Alternative 16 | |
|---|---|
| Error | 47.5 |
| Cost | 7116 |
| Alternative 17 | |
|---|---|
| Error | 47.1 |
| Cost | 6852 |
| Alternative 18 | |
|---|---|
| Error | 54.6 |
| Cost | 6720 |
herbie shell --seed 2023073
(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))))