| Alternative 1 | |
|---|---|
| Error | 48.3 |
| Cost | 41632 |
(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 (- (sqrt (- (/ F A))))) (t_1 (- (pow B 2.0) (* 4.0 (* A C)))))
(if (<= A -2.6e+149)
t_0
(if (<= A -3.8e+112)
(/
(-
(sqrt
(*
(* 2.0 F)
(+
(* (pow C 2.0) (* -8.0 A))
(+
(* C (* (pow B 2.0) 4.0))
(- (/ (+ (* 0.5 (pow B 4.0)) (* -2.0 (pow (* C B) 2.0))) A)))))))
t_1)
(if (<= A -5.1e-121)
t_0
(if (<= A 5.7e-307)
(* (/ (sqrt 2.0) B) (- (sqrt (* (+ B A) F))))
(if (<= A 1200000.0)
(- (sqrt (- (/ F C))))
(if (<= A 2.25e+79)
(/
(-
(sqrt
(*
(* 2.0 F)
(*
t_1
(+ (+ A C) (sqrt (+ (pow B 2.0) (pow (- A C) 2.0))))))))
t_1)
(/ (- (* A (sqrt (* (* F C) -16.0)))) (* A (* C -4.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 = -sqrt(-(F / A));
double t_1 = pow(B, 2.0) - (4.0 * (A * C));
double tmp;
if (A <= -2.6e+149) {
tmp = t_0;
} else if (A <= -3.8e+112) {
tmp = -sqrt(((2.0 * F) * ((pow(C, 2.0) * (-8.0 * A)) + ((C * (pow(B, 2.0) * 4.0)) + -(((0.5 * pow(B, 4.0)) + (-2.0 * pow((C * B), 2.0))) / A))))) / t_1;
} else if (A <= -5.1e-121) {
tmp = t_0;
} else if (A <= 5.7e-307) {
tmp = (sqrt(2.0) / B) * -sqrt(((B + A) * F));
} else if (A <= 1200000.0) {
tmp = -sqrt(-(F / C));
} else if (A <= 2.25e+79) {
tmp = -sqrt(((2.0 * F) * (t_1 * ((A + C) + sqrt((pow(B, 2.0) + pow((A - C), 2.0))))))) / t_1;
} else {
tmp = -(A * sqrt(((F * C) * -16.0))) / (A * (C * -4.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 = -sqrt(-(f / a))
t_1 = (b ** 2.0d0) - (4.0d0 * (a * c))
if (a <= (-2.6d+149)) then
tmp = t_0
else if (a <= (-3.8d+112)) then
tmp = -sqrt(((2.0d0 * f) * (((c ** 2.0d0) * ((-8.0d0) * a)) + ((c * ((b ** 2.0d0) * 4.0d0)) + -(((0.5d0 * (b ** 4.0d0)) + ((-2.0d0) * ((c * b) ** 2.0d0))) / a))))) / t_1
else if (a <= (-5.1d-121)) then
tmp = t_0
else if (a <= 5.7d-307) then
tmp = (sqrt(2.0d0) / b) * -sqrt(((b + a) * f))
else if (a <= 1200000.0d0) then
tmp = -sqrt(-(f / c))
else if (a <= 2.25d+79) then
tmp = -sqrt(((2.0d0 * f) * (t_1 * ((a + c) + sqrt(((b ** 2.0d0) + ((a - c) ** 2.0d0))))))) / t_1
else
tmp = -(a * sqrt(((f * c) * (-16.0d0)))) / (a * (c * (-4.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 = -Math.sqrt(-(F / A));
double t_1 = Math.pow(B, 2.0) - (4.0 * (A * C));
double tmp;
if (A <= -2.6e+149) {
tmp = t_0;
} else if (A <= -3.8e+112) {
tmp = -Math.sqrt(((2.0 * F) * ((Math.pow(C, 2.0) * (-8.0 * A)) + ((C * (Math.pow(B, 2.0) * 4.0)) + -(((0.5 * Math.pow(B, 4.0)) + (-2.0 * Math.pow((C * B), 2.0))) / A))))) / t_1;
} else if (A <= -5.1e-121) {
tmp = t_0;
} else if (A <= 5.7e-307) {
tmp = (Math.sqrt(2.0) / B) * -Math.sqrt(((B + A) * F));
} else if (A <= 1200000.0) {
tmp = -Math.sqrt(-(F / C));
} else if (A <= 2.25e+79) {
tmp = -Math.sqrt(((2.0 * F) * (t_1 * ((A + C) + Math.sqrt((Math.pow(B, 2.0) + Math.pow((A - C), 2.0))))))) / t_1;
} else {
tmp = -(A * Math.sqrt(((F * C) * -16.0))) / (A * (C * -4.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 = -math.sqrt(-(F / A)) t_1 = math.pow(B, 2.0) - (4.0 * (A * C)) tmp = 0 if A <= -2.6e+149: tmp = t_0 elif A <= -3.8e+112: tmp = -math.sqrt(((2.0 * F) * ((math.pow(C, 2.0) * (-8.0 * A)) + ((C * (math.pow(B, 2.0) * 4.0)) + -(((0.5 * math.pow(B, 4.0)) + (-2.0 * math.pow((C * B), 2.0))) / A))))) / t_1 elif A <= -5.1e-121: tmp = t_0 elif A <= 5.7e-307: tmp = (math.sqrt(2.0) / B) * -math.sqrt(((B + A) * F)) elif A <= 1200000.0: tmp = -math.sqrt(-(F / C)) elif A <= 2.25e+79: tmp = -math.sqrt(((2.0 * F) * (t_1 * ((A + C) + math.sqrt((math.pow(B, 2.0) + math.pow((A - C), 2.0))))))) / t_1 else: tmp = -(A * math.sqrt(((F * C) * -16.0))) / (A * (C * -4.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(-sqrt(Float64(-Float64(F / A)))) t_1 = Float64((B ^ 2.0) - Float64(4.0 * Float64(A * C))) tmp = 0.0 if (A <= -2.6e+149) tmp = t_0; elseif (A <= -3.8e+112) tmp = Float64(Float64(-sqrt(Float64(Float64(2.0 * F) * Float64(Float64((C ^ 2.0) * Float64(-8.0 * A)) + Float64(Float64(C * Float64((B ^ 2.0) * 4.0)) + Float64(-Float64(Float64(Float64(0.5 * (B ^ 4.0)) + Float64(-2.0 * (Float64(C * B) ^ 2.0))) / A))))))) / t_1); elseif (A <= -5.1e-121) tmp = t_0; elseif (A <= 5.7e-307) tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(Float64(B + A) * F)))); elseif (A <= 1200000.0) tmp = Float64(-sqrt(Float64(-Float64(F / C)))); elseif (A <= 2.25e+79) tmp = Float64(Float64(-sqrt(Float64(Float64(2.0 * F) * Float64(t_1 * Float64(Float64(A + C) + sqrt(Float64((B ^ 2.0) + (Float64(A - C) ^ 2.0)))))))) / t_1); else tmp = Float64(Float64(-Float64(A * sqrt(Float64(Float64(F * C) * -16.0)))) / Float64(A * Float64(C * -4.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 = -sqrt(-(F / A)); t_1 = (B ^ 2.0) - (4.0 * (A * C)); tmp = 0.0; if (A <= -2.6e+149) tmp = t_0; elseif (A <= -3.8e+112) tmp = -sqrt(((2.0 * F) * (((C ^ 2.0) * (-8.0 * A)) + ((C * ((B ^ 2.0) * 4.0)) + -(((0.5 * (B ^ 4.0)) + (-2.0 * ((C * B) ^ 2.0))) / A))))) / t_1; elseif (A <= -5.1e-121) tmp = t_0; elseif (A <= 5.7e-307) tmp = (sqrt(2.0) / B) * -sqrt(((B + A) * F)); elseif (A <= 1200000.0) tmp = -sqrt(-(F / C)); elseif (A <= 2.25e+79) tmp = -sqrt(((2.0 * F) * (t_1 * ((A + C) + sqrt(((B ^ 2.0) + ((A - C) ^ 2.0))))))) / t_1; else tmp = -(A * sqrt(((F * C) * -16.0))) / (A * (C * -4.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[Sqrt[(-N[(F / A), $MachinePrecision])], $MachinePrecision])}, Block[{t$95$1 = N[(N[Power[B, 2.0], $MachinePrecision] - N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -2.6e+149], t$95$0, If[LessEqual[A, -3.8e+112], N[((-N[Sqrt[N[(N[(2.0 * F), $MachinePrecision] * N[(N[(N[Power[C, 2.0], $MachinePrecision] * N[(-8.0 * A), $MachinePrecision]), $MachinePrecision] + N[(N[(C * N[(N[Power[B, 2.0], $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision] + (-N[(N[(N[(0.5 * N[Power[B, 4.0], $MachinePrecision]), $MachinePrecision] + N[(-2.0 * N[Power[N[(C * B), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$1), $MachinePrecision], If[LessEqual[A, -5.1e-121], t$95$0, If[LessEqual[A, 5.7e-307], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(N[(B + A), $MachinePrecision] * F), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], If[LessEqual[A, 1200000.0], (-N[Sqrt[(-N[(F / C), $MachinePrecision])], $MachinePrecision]), If[LessEqual[A, 2.25e+79], N[((-N[Sqrt[N[(N[(2.0 * F), $MachinePrecision] * N[(t$95$1 * 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]], $MachinePrecision]) / t$95$1), $MachinePrecision], N[((-N[(A * N[Sqrt[N[(N[(F * C), $MachinePrecision] * -16.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]) / N[(A * N[(C * -4.0), $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 := -\sqrt{-\frac{F}{A}}\\
t_1 := {B}^{2} - 4 \cdot \left(A \cdot C\right)\\
\mathbf{if}\;A \leq -2.6 \cdot 10^{+149}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq -3.8 \cdot 10^{+112}:\\
\;\;\;\;\frac{-\sqrt{\left(2 \cdot F\right) \cdot \left({C}^{2} \cdot \left(-8 \cdot A\right) + \left(C \cdot \left({B}^{2} \cdot 4\right) + \left(-\frac{0.5 \cdot {B}^{4} + -2 \cdot {\left(C \cdot B\right)}^{2}}{A}\right)\right)\right)}}{t_1}\\
\mathbf{elif}\;A \leq -5.1 \cdot 10^{-121}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;A \leq 5.7 \cdot 10^{-307}:\\
\;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{\left(B + A\right) \cdot F}\right)\\
\mathbf{elif}\;A \leq 1200000:\\
\;\;\;\;-\sqrt{-\frac{F}{C}}\\
\mathbf{elif}\;A \leq 2.25 \cdot 10^{+79}:\\
\;\;\;\;\frac{-\sqrt{\left(2 \cdot F\right) \cdot \left(t_1 \cdot \left(\left(A + C\right) + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}}{t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-A \cdot \sqrt{\left(F \cdot C\right) \cdot -16}}{A \cdot \left(C \cdot -4\right)}\\
\end{array}
Results
if A < -2.59999999999999979e149 or -3.80000000000000008e112 < A < -5.0999999999999998e-121Initial program 57.5
Simplified58.5
[Start]57.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}
\] |
|---|
Taylor expanded in C around inf 64.0
Simplified43.1
[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 [=>]43.1 | \[ -\color{blue}{\sqrt{\frac{F}{A} \cdot -1}}
\] |
rational.json-simplify-9 [=>]43.1 | \[ -\sqrt{\color{blue}{-\frac{F}{A}}}
\] |
if -2.59999999999999979e149 < A < -3.80000000000000008e112Initial program 61.7
Simplified62.9
[Start]61.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}
\] |
|---|
Taylor expanded in A around -inf 47.7
Simplified47.7
[Start]47.7 | \[ \frac{-\sqrt{\left(2 \cdot F\right) \cdot \left(-8 \cdot \left(A \cdot {C}^{2}\right) + \left(-1 \cdot \frac{0.5 \cdot {B}^{4} + -2 \cdot \left({C}^{2} \cdot {B}^{2}\right)}{A} + 4 \cdot \left(C \cdot {B}^{2}\right)\right)\right)}}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}
\] |
|---|---|
rational.json-simplify-43 [=>]47.7 | \[ \frac{-\sqrt{\left(2 \cdot F\right) \cdot \left(\color{blue}{A \cdot \left({C}^{2} \cdot -8\right)} + \left(-1 \cdot \frac{0.5 \cdot {B}^{4} + -2 \cdot \left({C}^{2} \cdot {B}^{2}\right)}{A} + 4 \cdot \left(C \cdot {B}^{2}\right)\right)\right)}}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}
\] |
rational.json-simplify-43 [=>]47.7 | \[ \frac{-\sqrt{\left(2 \cdot F\right) \cdot \left(\color{blue}{{C}^{2} \cdot \left(-8 \cdot A\right)} + \left(-1 \cdot \frac{0.5 \cdot {B}^{4} + -2 \cdot \left({C}^{2} \cdot {B}^{2}\right)}{A} + 4 \cdot \left(C \cdot {B}^{2}\right)\right)\right)}}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}
\] |
rational.json-simplify-1 [=>]47.7 | \[ \frac{-\sqrt{\left(2 \cdot F\right) \cdot \left({C}^{2} \cdot \left(-8 \cdot A\right) + \color{blue}{\left(4 \cdot \left(C \cdot {B}^{2}\right) + -1 \cdot \frac{0.5 \cdot {B}^{4} + -2 \cdot \left({C}^{2} \cdot {B}^{2}\right)}{A}\right)}\right)}}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}
\] |
rational.json-simplify-43 [=>]47.7 | \[ \frac{-\sqrt{\left(2 \cdot F\right) \cdot \left({C}^{2} \cdot \left(-8 \cdot A\right) + \left(\color{blue}{C \cdot \left({B}^{2} \cdot 4\right)} + -1 \cdot \frac{0.5 \cdot {B}^{4} + -2 \cdot \left({C}^{2} \cdot {B}^{2}\right)}{A}\right)\right)}}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}
\] |
rational.json-simplify-2 [=>]47.7 | \[ \frac{-\sqrt{\left(2 \cdot F\right) \cdot \left({C}^{2} \cdot \left(-8 \cdot A\right) + \left(C \cdot \left({B}^{2} \cdot 4\right) + \color{blue}{\frac{0.5 \cdot {B}^{4} + -2 \cdot \left({C}^{2} \cdot {B}^{2}\right)}{A} \cdot -1}\right)\right)}}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}
\] |
rational.json-simplify-9 [=>]47.7 | \[ \frac{-\sqrt{\left(2 \cdot F\right) \cdot \left({C}^{2} \cdot \left(-8 \cdot A\right) + \left(C \cdot \left({B}^{2} \cdot 4\right) + \color{blue}{\left(-\frac{0.5 \cdot {B}^{4} + -2 \cdot \left({C}^{2} \cdot {B}^{2}\right)}{A}\right)}\right)\right)}}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}
\] |
exponential.json-simplify-27 [=>]47.7 | \[ \frac{-\sqrt{\left(2 \cdot F\right) \cdot \left({C}^{2} \cdot \left(-8 \cdot A\right) + \left(C \cdot \left({B}^{2} \cdot 4\right) + \left(-\frac{0.5 \cdot {B}^{4} + -2 \cdot \color{blue}{{\left(C \cdot B\right)}^{2}}}{A}\right)\right)\right)}}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}
\] |
if -5.0999999999999998e-121 < A < 5.70000000000000017e-307Initial program 49.5
Simplified52.0
[Start]49.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}
\] |
|---|
Applied egg-rr51.9
Simplified49.5
[Start]51.9 | \[ \frac{-\sqrt{\left(F + F\right) \cdot \left(\left({B}^{2} - A \cdot \left(C \cdot 4\right)\right) \cdot \left(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)\right)}}{{B}^{2} - A \cdot \left(C \cdot 4\right)} + 0
\] |
|---|---|
rational.json-simplify-4 [=>]51.9 | \[ \color{blue}{\frac{-\sqrt{\left(F + F\right) \cdot \left(\left({B}^{2} - A \cdot \left(C \cdot 4\right)\right) \cdot \left(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)\right)}}{{B}^{2} - A \cdot \left(C \cdot 4\right)}}
\] |
Taylor expanded in B around inf 56.9
Taylor expanded in C around 0 50.1
Simplified50.1
[Start]50.1 | \[ -1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A + B\right) \cdot F}\right)
\] |
|---|---|
rational.json-simplify-43 [=>]50.1 | \[ \color{blue}{\frac{\sqrt{2}}{B} \cdot \left(\sqrt{\left(A + B\right) \cdot F} \cdot -1\right)}
\] |
rational.json-simplify-9 [=>]50.1 | \[ \frac{\sqrt{2}}{B} \cdot \color{blue}{\left(-\sqrt{\left(A + B\right) \cdot F}\right)}
\] |
rational.json-simplify-1 [=>]50.1 | \[ \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{\color{blue}{\left(B + A\right)} \cdot F}\right)
\] |
if 5.70000000000000017e-307 < A < 1.2e6Initial program 46.8
Simplified49.3
[Start]46.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}
\] |
|---|
Taylor expanded in B around 0 64.0
Simplified50.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 [=>]50.3 | \[ -\color{blue}{\sqrt{\frac{F}{C} \cdot -1}}
\] |
rational.json-simplify-9 [=>]50.3 | \[ -\sqrt{\color{blue}{-\frac{F}{C}}}
\] |
if 1.2e6 < A < 2.24999999999999997e79Initial program 39.0
Simplified40.1
[Start]39.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}
\] |
|---|
if 2.24999999999999997e79 < A Initial program 57.0
Simplified57.9
[Start]57.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-rr57.9
Simplified57.0
[Start]57.9 | \[ \frac{-\sqrt{\left(F + F\right) \cdot \left(\left({B}^{2} - A \cdot \left(C \cdot 4\right)\right) \cdot \left(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)\right)}}{{B}^{2} - A \cdot \left(C \cdot 4\right)} + 0
\] |
|---|---|
rational.json-simplify-4 [=>]57.9 | \[ \color{blue}{\frac{-\sqrt{\left(F + F\right) \cdot \left(\left({B}^{2} - A \cdot \left(C \cdot 4\right)\right) \cdot \left(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)\right)}}{{B}^{2} - A \cdot \left(C \cdot 4\right)}}
\] |
Taylor expanded in A around inf 64.0
Simplified44.9
[Start]64.0 | \[ \frac{-\left(A \cdot \left(\sqrt{2} \cdot \sqrt{-8}\right)\right) \cdot \sqrt{C \cdot F}}{{B}^{2} - C \cdot \left(4 \cdot A\right)}
\] |
|---|---|
rational.json-simplify-2 [=>]64.0 | \[ \frac{-\color{blue}{\sqrt{C \cdot F} \cdot \left(A \cdot \left(\sqrt{2} \cdot \sqrt{-8}\right)\right)}}{{B}^{2} - C \cdot \left(4 \cdot A\right)}
\] |
rational.json-simplify-43 [=>]64.0 | \[ \frac{-\color{blue}{A \cdot \left(\left(\sqrt{2} \cdot \sqrt{-8}\right) \cdot \sqrt{C \cdot F}\right)}}{{B}^{2} - C \cdot \left(4 \cdot A\right)}
\] |
exponential.json-simplify-20 [=>]64.0 | \[ \frac{-A \cdot \left(\color{blue}{\sqrt{-8 \cdot 2}} \cdot \sqrt{C \cdot F}\right)}{{B}^{2} - C \cdot \left(4 \cdot A\right)}
\] |
exponential.json-simplify-20 [=>]44.9 | \[ \frac{-A \cdot \color{blue}{\sqrt{\left(C \cdot F\right) \cdot \left(-8 \cdot 2\right)}}}{{B}^{2} - C \cdot \left(4 \cdot A\right)}
\] |
rational.json-simplify-2 [=>]44.9 | \[ \frac{-A \cdot \sqrt{\color{blue}{\left(F \cdot C\right)} \cdot \left(-8 \cdot 2\right)}}{{B}^{2} - C \cdot \left(4 \cdot A\right)}
\] |
metadata-eval [=>]44.9 | \[ \frac{-A \cdot \sqrt{\left(F \cdot C\right) \cdot \color{blue}{-16}}}{{B}^{2} - C \cdot \left(4 \cdot A\right)}
\] |
Taylor expanded in B around 0 44.8
Simplified44.8
[Start]44.8 | \[ \frac{-A \cdot \sqrt{\left(F \cdot C\right) \cdot -16}}{-4 \cdot \left(A \cdot C\right)}
\] |
|---|---|
rational.json-simplify-43 [=>]44.8 | \[ \frac{-A \cdot \sqrt{\left(F \cdot C\right) \cdot -16}}{\color{blue}{A \cdot \left(C \cdot -4\right)}}
\] |
Final simplification46.3
| Alternative 1 | |
|---|---|
| Error | 48.3 |
| Cost | 41632 |
| Alternative 2 | |
|---|---|
| Error | 48.3 |
| Cost | 41632 |
| Alternative 3 | |
|---|---|
| Error | 48.8 |
| Cost | 40200 |
| Alternative 4 | |
|---|---|
| Error | 47.0 |
| Cost | 13704 |
| Alternative 5 | |
|---|---|
| Error | 47.2 |
| Cost | 7956 |
| Alternative 6 | |
|---|---|
| Error | 47.4 |
| Cost | 7376 |
| Alternative 7 | |
|---|---|
| Error | 46.7 |
| Cost | 7048 |
| Alternative 8 | |
|---|---|
| Error | 47.4 |
| Cost | 6852 |
| Alternative 9 | |
|---|---|
| Error | 55.0 |
| Cost | 6720 |
herbie shell --seed 2023077
(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))))