| Alternative 1 | |
|---|---|
| Error | 43.5 |
| Cost | 40972 |
(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
(/
1.0
(-
(/
(/ (- (pow B 2.0) (* A (* C 4.0))) C)
(sqrt (* F (* A -16.0)))))))
(t_1 (* 0.25 (sqrt (* (/ F C) -16.0)))))
(if (<= B -1.9e-30)
(- (sqrt (* -2.0 (/ F B))))
(if (<= B -2.85e-111)
t_0
(if (<= B -4e-140)
(- (sqrt (- (/ F C))))
(if (<= B -1.05e-245)
t_1
(if (<= B -5.5e-286)
(- (sqrt (- (/ F A))))
(if (<= B -6.5e-296)
(* 0.25 (sqrt (* (/ F A) -16.0)))
(if (<= B 6.6e-307)
t_1
(if (<= B 1.85e-106)
t_0
(if (<= B 5.4e+252)
(* (/ (sqrt 2.0) B) (- (sqrt (* F B))))
(- (sqrt (* (/ F B) 2.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 = 1.0 / -(((pow(B, 2.0) - (A * (C * 4.0))) / C) / sqrt((F * (A * -16.0))));
double t_1 = 0.25 * sqrt(((F / C) * -16.0));
double tmp;
if (B <= -1.9e-30) {
tmp = -sqrt((-2.0 * (F / B)));
} else if (B <= -2.85e-111) {
tmp = t_0;
} else if (B <= -4e-140) {
tmp = -sqrt(-(F / C));
} else if (B <= -1.05e-245) {
tmp = t_1;
} else if (B <= -5.5e-286) {
tmp = -sqrt(-(F / A));
} else if (B <= -6.5e-296) {
tmp = 0.25 * sqrt(((F / A) * -16.0));
} else if (B <= 6.6e-307) {
tmp = t_1;
} else if (B <= 1.85e-106) {
tmp = t_0;
} else if (B <= 5.4e+252) {
tmp = (sqrt(2.0) / B) * -sqrt((F * B));
} else {
tmp = -sqrt(((F / B) * 2.0));
}
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) :: tmp
t_0 = 1.0d0 / -((((b ** 2.0d0) - (a * (c * 4.0d0))) / c) / sqrt((f * (a * (-16.0d0)))))
t_1 = 0.25d0 * sqrt(((f / c) * (-16.0d0)))
if (b <= (-1.9d-30)) then
tmp = -sqrt(((-2.0d0) * (f / b)))
else if (b <= (-2.85d-111)) then
tmp = t_0
else if (b <= (-4d-140)) then
tmp = -sqrt(-(f / c))
else if (b <= (-1.05d-245)) then
tmp = t_1
else if (b <= (-5.5d-286)) then
tmp = -sqrt(-(f / a))
else if (b <= (-6.5d-296)) then
tmp = 0.25d0 * sqrt(((f / a) * (-16.0d0)))
else if (b <= 6.6d-307) then
tmp = t_1
else if (b <= 1.85d-106) then
tmp = t_0
else if (b <= 5.4d+252) then
tmp = (sqrt(2.0d0) / b) * -sqrt((f * b))
else
tmp = -sqrt(((f / b) * 2.0d0))
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 = 1.0 / -(((Math.pow(B, 2.0) - (A * (C * 4.0))) / C) / Math.sqrt((F * (A * -16.0))));
double t_1 = 0.25 * Math.sqrt(((F / C) * -16.0));
double tmp;
if (B <= -1.9e-30) {
tmp = -Math.sqrt((-2.0 * (F / B)));
} else if (B <= -2.85e-111) {
tmp = t_0;
} else if (B <= -4e-140) {
tmp = -Math.sqrt(-(F / C));
} else if (B <= -1.05e-245) {
tmp = t_1;
} else if (B <= -5.5e-286) {
tmp = -Math.sqrt(-(F / A));
} else if (B <= -6.5e-296) {
tmp = 0.25 * Math.sqrt(((F / A) * -16.0));
} else if (B <= 6.6e-307) {
tmp = t_1;
} else if (B <= 1.85e-106) {
tmp = t_0;
} else if (B <= 5.4e+252) {
tmp = (Math.sqrt(2.0) / B) * -Math.sqrt((F * B));
} else {
tmp = -Math.sqrt(((F / B) * 2.0));
}
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 = 1.0 / -(((math.pow(B, 2.0) - (A * (C * 4.0))) / C) / math.sqrt((F * (A * -16.0)))) t_1 = 0.25 * math.sqrt(((F / C) * -16.0)) tmp = 0 if B <= -1.9e-30: tmp = -math.sqrt((-2.0 * (F / B))) elif B <= -2.85e-111: tmp = t_0 elif B <= -4e-140: tmp = -math.sqrt(-(F / C)) elif B <= -1.05e-245: tmp = t_1 elif B <= -5.5e-286: tmp = -math.sqrt(-(F / A)) elif B <= -6.5e-296: tmp = 0.25 * math.sqrt(((F / A) * -16.0)) elif B <= 6.6e-307: tmp = t_1 elif B <= 1.85e-106: tmp = t_0 elif B <= 5.4e+252: tmp = (math.sqrt(2.0) / B) * -math.sqrt((F * B)) else: tmp = -math.sqrt(((F / B) * 2.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(1.0 / Float64(-Float64(Float64(Float64((B ^ 2.0) - Float64(A * Float64(C * 4.0))) / C) / sqrt(Float64(F * Float64(A * -16.0)))))) t_1 = Float64(0.25 * sqrt(Float64(Float64(F / C) * -16.0))) tmp = 0.0 if (B <= -1.9e-30) tmp = Float64(-sqrt(Float64(-2.0 * Float64(F / B)))); elseif (B <= -2.85e-111) tmp = t_0; elseif (B <= -4e-140) tmp = Float64(-sqrt(Float64(-Float64(F / C)))); elseif (B <= -1.05e-245) tmp = t_1; elseif (B <= -5.5e-286) tmp = Float64(-sqrt(Float64(-Float64(F / A)))); elseif (B <= -6.5e-296) tmp = Float64(0.25 * sqrt(Float64(Float64(F / A) * -16.0))); elseif (B <= 6.6e-307) tmp = t_1; elseif (B <= 1.85e-106) tmp = t_0; elseif (B <= 5.4e+252) tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(F * B)))); else tmp = Float64(-sqrt(Float64(Float64(F / B) * 2.0))); 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 = 1.0 / -((((B ^ 2.0) - (A * (C * 4.0))) / C) / sqrt((F * (A * -16.0)))); t_1 = 0.25 * sqrt(((F / C) * -16.0)); tmp = 0.0; if (B <= -1.9e-30) tmp = -sqrt((-2.0 * (F / B))); elseif (B <= -2.85e-111) tmp = t_0; elseif (B <= -4e-140) tmp = -sqrt(-(F / C)); elseif (B <= -1.05e-245) tmp = t_1; elseif (B <= -5.5e-286) tmp = -sqrt(-(F / A)); elseif (B <= -6.5e-296) tmp = 0.25 * sqrt(((F / A) * -16.0)); elseif (B <= 6.6e-307) tmp = t_1; elseif (B <= 1.85e-106) tmp = t_0; elseif (B <= 5.4e+252) tmp = (sqrt(2.0) / B) * -sqrt((F * B)); else tmp = -sqrt(((F / B) * 2.0)); 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[(1.0 / (-N[(N[(N[(N[Power[B, 2.0], $MachinePrecision] - N[(A * N[(C * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision] / N[Sqrt[N[(F * N[(A * -16.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision])), $MachinePrecision]}, Block[{t$95$1 = N[(0.25 * N[Sqrt[N[(N[(F / C), $MachinePrecision] * -16.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -1.9e-30], (-N[Sqrt[N[(-2.0 * N[(F / B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), If[LessEqual[B, -2.85e-111], t$95$0, If[LessEqual[B, -4e-140], (-N[Sqrt[(-N[(F / C), $MachinePrecision])], $MachinePrecision]), If[LessEqual[B, -1.05e-245], t$95$1, If[LessEqual[B, -5.5e-286], (-N[Sqrt[(-N[(F / A), $MachinePrecision])], $MachinePrecision]), If[LessEqual[B, -6.5e-296], N[(0.25 * N[Sqrt[N[(N[(F / A), $MachinePrecision] * -16.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 6.6e-307], t$95$1, If[LessEqual[B, 1.85e-106], t$95$0, If[LessEqual[B, 5.4e+252], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(F * B), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], (-N[Sqrt[N[(N[(F / B), $MachinePrecision] * 2.0), $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 := \frac{1}{-\frac{\frac{{B}^{2} - A \cdot \left(C \cdot 4\right)}{C}}{\sqrt{F \cdot \left(A \cdot -16\right)}}}\\
t_1 := 0.25 \cdot \sqrt{\frac{F}{C} \cdot -16}\\
\mathbf{if}\;B \leq -1.9 \cdot 10^{-30}:\\
\;\;\;\;-\sqrt{-2 \cdot \frac{F}{B}}\\
\mathbf{elif}\;B \leq -2.85 \cdot 10^{-111}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq -4 \cdot 10^{-140}:\\
\;\;\;\;-\sqrt{-\frac{F}{C}}\\
\mathbf{elif}\;B \leq -1.05 \cdot 10^{-245}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq -5.5 \cdot 10^{-286}:\\
\;\;\;\;-\sqrt{-\frac{F}{A}}\\
\mathbf{elif}\;B \leq -6.5 \cdot 10^{-296}:\\
\;\;\;\;0.25 \cdot \sqrt{\frac{F}{A} \cdot -16}\\
\mathbf{elif}\;B \leq 6.6 \cdot 10^{-307}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;B \leq 1.85 \cdot 10^{-106}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;B \leq 5.4 \cdot 10^{+252}:\\
\;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot B}\right)\\
\mathbf{else}:\\
\;\;\;\;-\sqrt{\frac{F}{B} \cdot 2}\\
\end{array}
Results
if B < -1.9000000000000002e-30Initial program 53.7
Simplified53.6
[Start]53.7 | \[ \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 [<=]53.7 | \[ \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 -inf 55.2
Simplified55.2
[Start]55.2 | \[ \frac{\sqrt{2 \cdot \left(\left(\left({B}^{2} - A \cdot \left(4 \cdot C\right)\right) \cdot F\right) \cdot \left(A + \left(C + -1 \cdot B\right)\right)\right)}}{A \cdot \left(4 \cdot C\right) - {B}^{2}}
\] |
|---|---|
rational.json-simplify-2 [=>]55.2 | \[ \frac{\sqrt{2 \cdot \left(\left(\left({B}^{2} - A \cdot \left(4 \cdot C\right)\right) \cdot F\right) \cdot \left(A + \left(C + \color{blue}{B \cdot -1}\right)\right)\right)}}{A \cdot \left(4 \cdot C\right) - {B}^{2}}
\] |
rational.json-simplify-9 [=>]55.2 | \[ \frac{\sqrt{2 \cdot \left(\left(\left({B}^{2} - A \cdot \left(4 \cdot C\right)\right) \cdot F\right) \cdot \left(A + \left(C + \color{blue}{\left(-B\right)}\right)\right)\right)}}{A \cdot \left(4 \cdot C\right) - {B}^{2}}
\] |
Taylor expanded in C around 0 63.0
Simplified63.0
[Start]63.0 | \[ -1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - B\right)}\right)
\] |
|---|---|
rational.json-simplify-43 [=>]63.0 | \[ \color{blue}{\frac{\sqrt{2}}{B} \cdot \left(\sqrt{F \cdot \left(A - B\right)} \cdot -1\right)}
\] |
rational.json-simplify-2 [<=]63.0 | \[ \frac{\sqrt{2}}{B} \cdot \left(\sqrt{\color{blue}{\left(A - B\right) \cdot F}} \cdot -1\right)
\] |
rational.json-simplify-9 [=>]63.0 | \[ \frac{\sqrt{2}}{B} \cdot \color{blue}{\left(-\sqrt{\left(A - B\right) \cdot F}\right)}
\] |
rational.json-simplify-2 [=>]63.0 | \[ \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{\color{blue}{F \cdot \left(A - B\right)}}\right)
\] |
Taylor expanded in A around 0 64.0
Simplified37.9
[Start]64.0 | \[ -1 \cdot \left(\left(\sqrt{2} \cdot \sqrt{-1}\right) \cdot \sqrt{\frac{F}{B}}\right)
\] |
|---|---|
rational.json-simplify-2 [=>]64.0 | \[ \color{blue}{\left(\left(\sqrt{2} \cdot \sqrt{-1}\right) \cdot \sqrt{\frac{F}{B}}\right) \cdot -1}
\] |
rational.json-simplify-9 [=>]64.0 | \[ \color{blue}{-\left(\sqrt{2} \cdot \sqrt{-1}\right) \cdot \sqrt{\frac{F}{B}}}
\] |
rational.json-simplify-2 [=>]64.0 | \[ -\color{blue}{\sqrt{\frac{F}{B}} \cdot \left(\sqrt{2} \cdot \sqrt{-1}\right)}
\] |
exponential.json-simplify-20 [=>]64.0 | \[ -\sqrt{\frac{F}{B}} \cdot \color{blue}{\sqrt{-1 \cdot 2}}
\] |
metadata-eval [=>]64.0 | \[ -\sqrt{\frac{F}{B}} \cdot \sqrt{\color{blue}{-2}}
\] |
exponential.json-simplify-20 [=>]37.9 | \[ -\color{blue}{\sqrt{-2 \cdot \frac{F}{B}}}
\] |
if -1.9000000000000002e-30 < B < -2.85e-111 or 6.59999999999999999e-307 < B < 1.8499999999999999e-106Initial program 51.0
Simplified50.1
[Start]51.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 [<=]51.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 [<=]51.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 [=>]51.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)}}
\] |
Applied egg-rr50.4
Applied egg-rr50.3
Taylor expanded in C around inf 64.0
Simplified51.6
[Start]64.0 | \[ \frac{1}{\frac{A \cdot \left(C \cdot 4\right) - {B}^{2}}{\sqrt{A \cdot F} \cdot \left(\sqrt{2} \cdot \left(C \cdot \sqrt{-8}\right)\right)}}
\] |
|---|---|
rational.json-simplify-43 [=>]64.0 | \[ \frac{1}{\frac{A \cdot \left(C \cdot 4\right) - {B}^{2}}{\sqrt{A \cdot F} \cdot \color{blue}{\left(C \cdot \left(\sqrt{-8} \cdot \sqrt{2}\right)\right)}}}
\] |
rational.json-simplify-2 [<=]64.0 | \[ \frac{1}{\frac{A \cdot \left(C \cdot 4\right) - {B}^{2}}{\sqrt{A \cdot F} \cdot \left(C \cdot \color{blue}{\left(\sqrt{2} \cdot \sqrt{-8}\right)}\right)}}
\] |
rational.json-simplify-43 [=>]64.0 | \[ \frac{1}{\frac{A \cdot \left(C \cdot 4\right) - {B}^{2}}{\color{blue}{C \cdot \left(\left(\sqrt{2} \cdot \sqrt{-8}\right) \cdot \sqrt{A \cdot F}\right)}}}
\] |
exponential.json-simplify-20 [=>]64.0 | \[ \frac{1}{\frac{A \cdot \left(C \cdot 4\right) - {B}^{2}}{C \cdot \left(\color{blue}{\sqrt{-8 \cdot 2}} \cdot \sqrt{A \cdot F}\right)}}
\] |
exponential.json-simplify-20 [=>]51.6 | \[ \frac{1}{\frac{A \cdot \left(C \cdot 4\right) - {B}^{2}}{C \cdot \color{blue}{\sqrt{\left(A \cdot F\right) \cdot \left(-8 \cdot 2\right)}}}}
\] |
rational.json-simplify-2 [=>]51.6 | \[ \frac{1}{\frac{A \cdot \left(C \cdot 4\right) - {B}^{2}}{C \cdot \sqrt{\color{blue}{\left(F \cdot A\right)} \cdot \left(-8 \cdot 2\right)}}}
\] |
metadata-eval [=>]51.6 | \[ \frac{1}{\frac{A \cdot \left(C \cdot 4\right) - {B}^{2}}{C \cdot \sqrt{\left(F \cdot A\right) \cdot \color{blue}{-16}}}}
\] |
Applied egg-rr51.0
if -2.85e-111 < B < -3.9999999999999999e-140Initial program 47.9
Simplified48.4
[Start]47.9 | \[ \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.9 | \[ \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 [<=]47.9 | \[ \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 [=>]47.9 | \[ \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 B around 0 64.0
Simplified53.2
[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 [=>]53.2 | \[ -\color{blue}{\sqrt{\frac{F}{C} \cdot -1}}
\] |
rational.json-simplify-9 [=>]53.2 | \[ -\sqrt{\color{blue}{-\frac{F}{C}}}
\] |
if -3.9999999999999999e-140 < B < -1.05000000000000005e-245 or -6.49999999999999963e-296 < B < 6.59999999999999999e-307Initial program 51.9
Simplified52.5
[Start]51.9 | \[ \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 [<=]51.9 | \[ \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
Simplified50.5
[Start]64.0 | \[ 0.25 \cdot \left(\left(\sqrt{2} \cdot \sqrt{-8}\right) \cdot \sqrt{\frac{F}{C}}\right)
\] |
|---|---|
exponential.json-simplify-20 [=>]64.0 | \[ 0.25 \cdot \left(\color{blue}{\sqrt{-8 \cdot 2}} \cdot \sqrt{\frac{F}{C}}\right)
\] |
metadata-eval [=>]64.0 | \[ 0.25 \cdot \left(\sqrt{\color{blue}{-16}} \cdot \sqrt{\frac{F}{C}}\right)
\] |
exponential.json-simplify-20 [=>]50.5 | \[ 0.25 \cdot \color{blue}{\sqrt{\frac{F}{C} \cdot -16}}
\] |
if -1.05000000000000005e-245 < B < -5.4999999999999998e-286Initial program 54.1
Simplified53.7
[Start]54.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-50 [<=]54.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(4 \cdot A\right) \cdot C - {B}^{2}}}
\] |
rational.json-simplify-5 [<=]54.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)}}{\color{blue}{\left(\left(4 \cdot A\right) \cdot C - {B}^{2}\right) - 0}}
\] |
rational.json-simplify-50 [=>]54.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)}}{0 - \left(\left(4 \cdot A\right) \cdot C - {B}^{2}\right)}}
\] |
Taylor expanded in C around inf 64.0
Simplified49.5
[Start]64.0 | \[ -1 \cdot \left(\left(\sqrt{2} \cdot \sqrt{-0.5}\right) \cdot \sqrt{\frac{F}{A}}\right)
\] |
|---|---|
rational.json-simplify-2 [=>]64.0 | \[ \color{blue}{\left(\left(\sqrt{2} \cdot \sqrt{-0.5}\right) \cdot \sqrt{\frac{F}{A}}\right) \cdot -1}
\] |
rational.json-simplify-9 [=>]64.0 | \[ \color{blue}{-\left(\sqrt{2} \cdot \sqrt{-0.5}\right) \cdot \sqrt{\frac{F}{A}}}
\] |
exponential.json-simplify-20 [=>]64.0 | \[ -\color{blue}{\sqrt{-0.5 \cdot 2}} \cdot \sqrt{\frac{F}{A}}
\] |
metadata-eval [=>]64.0 | \[ -\sqrt{\color{blue}{-1}} \cdot \sqrt{\frac{F}{A}}
\] |
exponential.json-simplify-20 [=>]49.5 | \[ -\color{blue}{\sqrt{\frac{F}{A} \cdot -1}}
\] |
rational.json-simplify-9 [=>]49.5 | \[ -\sqrt{\color{blue}{-\frac{F}{A}}}
\] |
if -5.4999999999999998e-286 < B < -6.49999999999999963e-296Initial program 55.8
Simplified53.9
[Start]55.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 [<=]55.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}}}
\] |
Taylor expanded in C around inf 64.0
Simplified50.1
[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 [=>]50.1 | \[ 0.25 \cdot \color{blue}{\sqrt{\frac{F}{A} \cdot -16}}
\] |
if 1.8499999999999999e-106 < B < 5.40000000000000021e252Initial program 50.4
Simplified50.3
[Start]50.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 [<=]50.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}}}
\] |
Taylor expanded in B around inf 54.7
Taylor expanded in C around 0 43.8
Simplified43.8
[Start]43.8 | \[ -1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A + \left(0.5 \cdot \frac{{A}^{2}}{B} + B\right)\right) \cdot F}\right)
\] |
|---|---|
rational.json-simplify-43 [=>]43.8 | \[ \color{blue}{\frac{\sqrt{2}}{B} \cdot \left(\sqrt{\left(A + \left(0.5 \cdot \frac{{A}^{2}}{B} + B\right)\right) \cdot F} \cdot -1\right)}
\] |
rational.json-simplify-9 [=>]43.8 | \[ \frac{\sqrt{2}}{B} \cdot \color{blue}{\left(-\sqrt{\left(A + \left(0.5 \cdot \frac{{A}^{2}}{B} + B\right)\right) \cdot F}\right)}
\] |
rational.json-simplify-2 [=>]43.8 | \[ \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{\color{blue}{F \cdot \left(A + \left(0.5 \cdot \frac{{A}^{2}}{B} + B\right)\right)}}\right)
\] |
rational.json-simplify-41 [=>]43.8 | \[ \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \color{blue}{\left(0.5 \cdot \frac{{A}^{2}}{B} + \left(B + A\right)\right)}}\right)
\] |
Taylor expanded in A around 0 42.6
if 5.40000000000000021e252 < B 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}}}
\] |
Taylor expanded in B around inf 64.0
Taylor expanded in C around 0 38.8
Simplified38.8
[Start]38.8 | \[ -1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A + \left(0.5 \cdot \frac{{A}^{2}}{B} + B\right)\right) \cdot F}\right)
\] |
|---|---|
rational.json-simplify-43 [=>]38.8 | \[ \color{blue}{\frac{\sqrt{2}}{B} \cdot \left(\sqrt{\left(A + \left(0.5 \cdot \frac{{A}^{2}}{B} + B\right)\right) \cdot F} \cdot -1\right)}
\] |
rational.json-simplify-9 [=>]38.8 | \[ \frac{\sqrt{2}}{B} \cdot \color{blue}{\left(-\sqrt{\left(A + \left(0.5 \cdot \frac{{A}^{2}}{B} + B\right)\right) \cdot F}\right)}
\] |
rational.json-simplify-2 [=>]38.8 | \[ \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{\color{blue}{F \cdot \left(A + \left(0.5 \cdot \frac{{A}^{2}}{B} + B\right)\right)}}\right)
\] |
rational.json-simplify-41 [=>]38.8 | \[ \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \color{blue}{\left(0.5 \cdot \frac{{A}^{2}}{B} + \left(B + A\right)\right)}}\right)
\] |
Taylor expanded in A around 0 28.5
Simplified28.3
[Start]28.5 | \[ -1 \cdot \left(\sqrt{2} \cdot \sqrt{\frac{F}{B}}\right)
\] |
|---|---|
rational.json-simplify-2 [=>]28.5 | \[ \color{blue}{\left(\sqrt{2} \cdot \sqrt{\frac{F}{B}}\right) \cdot -1}
\] |
rational.json-simplify-9 [=>]28.5 | \[ \color{blue}{-\sqrt{2} \cdot \sqrt{\frac{F}{B}}}
\] |
exponential.json-simplify-20 [=>]28.3 | \[ -\color{blue}{\sqrt{\frac{F}{B} \cdot 2}}
\] |
Final simplification43.9
| Alternative 1 | |
|---|---|
| Error | 43.5 |
| Cost | 40972 |
| Alternative 2 | |
|---|---|
| Error | 43.5 |
| Cost | 40908 |
| Alternative 3 | |
|---|---|
| Error | 43.7 |
| Cost | 21324 |
| Alternative 4 | |
|---|---|
| Error | 43.5 |
| Cost | 13708 |
| Alternative 5 | |
|---|---|
| Error | 43.6 |
| Cost | 7640 |
| Alternative 6 | |
|---|---|
| Error | 43.2 |
| Cost | 7624 |
| Alternative 7 | |
|---|---|
| Error | 43.5 |
| Cost | 7508 |
| Alternative 8 | |
|---|---|
| Error | 43.7 |
| Cost | 7444 |
| Alternative 9 | |
|---|---|
| Error | 49.4 |
| Cost | 7116 |
| Alternative 10 | |
|---|---|
| Error | 47.6 |
| Cost | 6852 |
| Alternative 11 | |
|---|---|
| Error | 54.8 |
| Cost | 6720 |
herbie shell --seed 2023067
(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))))