
(FPCore (A B C F)
:precision binary64
(let* ((t_0 (- (pow B 2.0) (* (* 4.0 A) C))))
(/
(-
(sqrt
(*
(* 2.0 (* t_0 F))
(+ (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
t_0)))
double code(double A, double B, double C, double F) {
double t_0 = pow(B, 2.0) - ((4.0 * A) * C);
return -sqrt(((2.0 * (t_0 * F)) * ((A + C) + sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / t_0;
}
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
t_0 = (b ** 2.0d0) - ((4.0d0 * a) * c)
code = -sqrt(((2.0d0 * (t_0 * f)) * ((a + c) + sqrt((((a - c) ** 2.0d0) + (b ** 2.0d0)))))) / t_0
end function
public static double code(double A, double B, double C, double F) {
double t_0 = Math.pow(B, 2.0) - ((4.0 * A) * C);
return -Math.sqrt(((2.0 * (t_0 * F)) * ((A + C) + Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / t_0;
}
def code(A, B, C, F): t_0 = math.pow(B, 2.0) - ((4.0 * A) * C) return -math.sqrt(((2.0 * (t_0 * F)) * ((A + C) + math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / t_0
function code(A, B, C, F) t_0 = Float64((B ^ 2.0) - Float64(Float64(4.0 * A) * C)) return Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(t_0 * F)) * Float64(Float64(A + C) + sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))))) / t_0) end
function tmp = code(A, B, C, F) t_0 = (B ^ 2.0) - ((4.0 * A) * C); tmp = -sqrt(((2.0 * (t_0 * F)) * ((A + C) + sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / t_0; end
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]}, N[((-N[Sqrt[N[(N[(2.0 * N[(t$95$0 * 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]) / t$95$0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {B}^{2} - \left(4 \cdot A\right) \cdot C\\
\frac{-\sqrt{\left(2 \cdot \left(t_0 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{t_0}
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C F)
:precision binary64
(let* ((t_0 (- (pow B 2.0) (* (* 4.0 A) C))))
(/
(-
(sqrt
(*
(* 2.0 (* t_0 F))
(+ (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
t_0)))
double code(double A, double B, double C, double F) {
double t_0 = pow(B, 2.0) - ((4.0 * A) * C);
return -sqrt(((2.0 * (t_0 * F)) * ((A + C) + sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / t_0;
}
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
t_0 = (b ** 2.0d0) - ((4.0d0 * a) * c)
code = -sqrt(((2.0d0 * (t_0 * f)) * ((a + c) + sqrt((((a - c) ** 2.0d0) + (b ** 2.0d0)))))) / t_0
end function
public static double code(double A, double B, double C, double F) {
double t_0 = Math.pow(B, 2.0) - ((4.0 * A) * C);
return -Math.sqrt(((2.0 * (t_0 * F)) * ((A + C) + Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / t_0;
}
def code(A, B, C, F): t_0 = math.pow(B, 2.0) - ((4.0 * A) * C) return -math.sqrt(((2.0 * (t_0 * F)) * ((A + C) + math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / t_0
function code(A, B, C, F) t_0 = Float64((B ^ 2.0) - Float64(Float64(4.0 * A) * C)) return Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(t_0 * F)) * Float64(Float64(A + C) + sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))))) / t_0) end
function tmp = code(A, B, C, F) t_0 = (B ^ 2.0) - ((4.0 * A) * C); tmp = -sqrt(((2.0 * (t_0 * F)) * ((A + C) + sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / t_0; end
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]}, N[((-N[Sqrt[N[(N[(2.0 * N[(t$95$0 * 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]) / t$95$0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {B}^{2} - \left(4 \cdot A\right) \cdot C\\
\frac{-\sqrt{\left(2 \cdot \left(t_0 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{t_0}
\end{array}
\end{array}
NOTE: B should be positive before calling this function
(FPCore (A B C F)
:precision binary64
(if (<= (pow B 2.0) 5e+142)
(/
(*
(sqrt (* 2.0 (* F (+ (* B B) (* -4.0 (* A C))))))
(- (sqrt (+ A (+ C (hypot B (- A C)))))))
(- (* B B) (* (* A C) 4.0)))
(* (/ (sqrt 2.0) B) (* (sqrt (+ C (hypot C B))) (- (sqrt F))))))B = abs(B);
double code(double A, double B, double C, double F) {
double tmp;
if (pow(B, 2.0) <= 5e+142) {
tmp = (sqrt((2.0 * (F * ((B * B) + (-4.0 * (A * C)))))) * -sqrt((A + (C + hypot(B, (A - C)))))) / ((B * B) - ((A * C) * 4.0));
} else {
tmp = (sqrt(2.0) / B) * (sqrt((C + hypot(C, B))) * -sqrt(F));
}
return tmp;
}
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
double tmp;
if (Math.pow(B, 2.0) <= 5e+142) {
tmp = (Math.sqrt((2.0 * (F * ((B * B) + (-4.0 * (A * C)))))) * -Math.sqrt((A + (C + Math.hypot(B, (A - C)))))) / ((B * B) - ((A * C) * 4.0));
} else {
tmp = (Math.sqrt(2.0) / B) * (Math.sqrt((C + Math.hypot(C, B))) * -Math.sqrt(F));
}
return tmp;
}
B = abs(B) def code(A, B, C, F): tmp = 0 if math.pow(B, 2.0) <= 5e+142: tmp = (math.sqrt((2.0 * (F * ((B * B) + (-4.0 * (A * C)))))) * -math.sqrt((A + (C + math.hypot(B, (A - C)))))) / ((B * B) - ((A * C) * 4.0)) else: tmp = (math.sqrt(2.0) / B) * (math.sqrt((C + math.hypot(C, B))) * -math.sqrt(F)) return tmp
B = abs(B) function code(A, B, C, F) tmp = 0.0 if ((B ^ 2.0) <= 5e+142) tmp = Float64(Float64(sqrt(Float64(2.0 * Float64(F * Float64(Float64(B * B) + Float64(-4.0 * Float64(A * C)))))) * Float64(-sqrt(Float64(A + Float64(C + hypot(B, Float64(A - C))))))) / Float64(Float64(B * B) - Float64(Float64(A * C) * 4.0))); else tmp = Float64(Float64(sqrt(2.0) / B) * Float64(sqrt(Float64(C + hypot(C, B))) * Float64(-sqrt(F)))); end return tmp end
B = abs(B) function tmp_2 = code(A, B, C, F) tmp = 0.0; if ((B ^ 2.0) <= 5e+142) tmp = (sqrt((2.0 * (F * ((B * B) + (-4.0 * (A * C)))))) * -sqrt((A + (C + hypot(B, (A - C)))))) / ((B * B) - ((A * C) * 4.0)); else tmp = (sqrt(2.0) / B) * (sqrt((C + hypot(C, B))) * -sqrt(F)); end tmp_2 = tmp; end
NOTE: B should be positive before calling this function code[A_, B_, C_, F_] := If[LessEqual[N[Power[B, 2.0], $MachinePrecision], 5e+142], N[(N[(N[Sqrt[N[(2.0 * N[(F * N[(N[(B * B), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[N[(A + N[(C + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / N[(N[(B * B), $MachinePrecision] - N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * N[(N[Sqrt[N[(C + N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[F], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
\mathbf{if}\;{B}^{2} \leq 5 \cdot 10^{+142}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right)} \cdot \left(-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)}\right)}{B \cdot B - \left(A \cdot C\right) \cdot 4}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{C + \mathsf{hypot}\left(C, B\right)} \cdot \left(-\sqrt{F}\right)\right)\\
\end{array}
\end{array}
if (pow.f64 B 2) < 5.0000000000000001e142Initial program 23.1%
Simplified23.1%
sqrt-prod24.2%
*-commutative24.2%
cancel-sign-sub-inv24.2%
metadata-eval24.2%
associate-+l+24.8%
unpow224.8%
hypot-udef39.4%
Applied egg-rr39.4%
if 5.0000000000000001e142 < (pow.f64 B 2) Initial program 6.4%
Simplified6.4%
Taylor expanded in A around 0 4.0%
mul-1-neg4.0%
distribute-rgt-neg-in4.0%
+-commutative4.0%
unpow24.0%
unpow24.0%
hypot-def23.9%
Simplified23.9%
sqrt-prod35.5%
Applied egg-rr35.5%
Final simplification37.8%
NOTE: B should be positive before calling this function
(FPCore (A B C F)
:precision binary64
(if (<= B 1.6e+81)
(/
(*
(sqrt (* 2.0 (* F (+ (* B B) (* -4.0 (* A C))))))
(- (sqrt (+ A (+ C (hypot B (- A C)))))))
(- (* B B) (* (* A C) 4.0)))
(* (/ (sqrt 2.0) B) (* (sqrt F) (- (sqrt (+ A (hypot B A))))))))B = abs(B);
double code(double A, double B, double C, double F) {
double tmp;
if (B <= 1.6e+81) {
tmp = (sqrt((2.0 * (F * ((B * B) + (-4.0 * (A * C)))))) * -sqrt((A + (C + hypot(B, (A - C)))))) / ((B * B) - ((A * C) * 4.0));
} else {
tmp = (sqrt(2.0) / B) * (sqrt(F) * -sqrt((A + hypot(B, A))));
}
return tmp;
}
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
double tmp;
if (B <= 1.6e+81) {
tmp = (Math.sqrt((2.0 * (F * ((B * B) + (-4.0 * (A * C)))))) * -Math.sqrt((A + (C + Math.hypot(B, (A - C)))))) / ((B * B) - ((A * C) * 4.0));
} else {
tmp = (Math.sqrt(2.0) / B) * (Math.sqrt(F) * -Math.sqrt((A + Math.hypot(B, A))));
}
return tmp;
}
B = abs(B) def code(A, B, C, F): tmp = 0 if B <= 1.6e+81: tmp = (math.sqrt((2.0 * (F * ((B * B) + (-4.0 * (A * C)))))) * -math.sqrt((A + (C + math.hypot(B, (A - C)))))) / ((B * B) - ((A * C) * 4.0)) else: tmp = (math.sqrt(2.0) / B) * (math.sqrt(F) * -math.sqrt((A + math.hypot(B, A)))) return tmp
B = abs(B) function code(A, B, C, F) tmp = 0.0 if (B <= 1.6e+81) tmp = Float64(Float64(sqrt(Float64(2.0 * Float64(F * Float64(Float64(B * B) + Float64(-4.0 * Float64(A * C)))))) * Float64(-sqrt(Float64(A + Float64(C + hypot(B, Float64(A - C))))))) / Float64(Float64(B * B) - Float64(Float64(A * C) * 4.0))); else tmp = Float64(Float64(sqrt(2.0) / B) * Float64(sqrt(F) * Float64(-sqrt(Float64(A + hypot(B, A)))))); end return tmp end
B = abs(B) function tmp_2 = code(A, B, C, F) tmp = 0.0; if (B <= 1.6e+81) tmp = (sqrt((2.0 * (F * ((B * B) + (-4.0 * (A * C)))))) * -sqrt((A + (C + hypot(B, (A - C)))))) / ((B * B) - ((A * C) * 4.0)); else tmp = (sqrt(2.0) / B) * (sqrt(F) * -sqrt((A + hypot(B, A)))); end tmp_2 = tmp; end
NOTE: B should be positive before calling this function code[A_, B_, C_, F_] := If[LessEqual[B, 1.6e+81], N[(N[(N[Sqrt[N[(2.0 * N[(F * N[(N[(B * B), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[N[(A + N[(C + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / N[(N[(B * B), $MachinePrecision] - N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * N[(N[Sqrt[F], $MachinePrecision] * (-N[Sqrt[N[(A + N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
\mathbf{if}\;B \leq 1.6 \cdot 10^{+81}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right)} \cdot \left(-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)}\right)}{B \cdot B - \left(A \cdot C\right) \cdot 4}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{F} \cdot \left(-\sqrt{A + \mathsf{hypot}\left(B, A\right)}\right)\right)\\
\end{array}
\end{array}
if B < 1.6e81Initial program 20.1%
Simplified20.1%
sqrt-prod21.0%
*-commutative21.0%
cancel-sign-sub-inv21.0%
metadata-eval21.0%
associate-+l+21.3%
unpow221.3%
hypot-udef33.1%
Applied egg-rr33.1%
if 1.6e81 < B Initial program 0.5%
Simplified0.7%
Taylor expanded in C around 0 8.7%
+-commutative8.7%
unpow28.7%
unpow28.7%
Simplified8.7%
sqrt-prod10.8%
hypot-def70.5%
Applied egg-rr70.5%
Final simplification40.1%
NOTE: B should be positive before calling this function
(FPCore (A B C F)
:precision binary64
(if (<= B 7e+139)
(/
(*
(sqrt (* 2.0 (* F (+ (* B B) (* -4.0 (* A C))))))
(- (sqrt (+ A (+ C (hypot B (- A C)))))))
(- (* B B) (* (* A C) 4.0)))
(* (/ (sqrt 2.0) B) (* (sqrt B) (- (sqrt F))))))B = abs(B);
double code(double A, double B, double C, double F) {
double tmp;
if (B <= 7e+139) {
tmp = (sqrt((2.0 * (F * ((B * B) + (-4.0 * (A * C)))))) * -sqrt((A + (C + hypot(B, (A - C)))))) / ((B * B) - ((A * C) * 4.0));
} else {
tmp = (sqrt(2.0) / B) * (sqrt(B) * -sqrt(F));
}
return tmp;
}
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
double tmp;
if (B <= 7e+139) {
tmp = (Math.sqrt((2.0 * (F * ((B * B) + (-4.0 * (A * C)))))) * -Math.sqrt((A + (C + Math.hypot(B, (A - C)))))) / ((B * B) - ((A * C) * 4.0));
} else {
tmp = (Math.sqrt(2.0) / B) * (Math.sqrt(B) * -Math.sqrt(F));
}
return tmp;
}
B = abs(B) def code(A, B, C, F): tmp = 0 if B <= 7e+139: tmp = (math.sqrt((2.0 * (F * ((B * B) + (-4.0 * (A * C)))))) * -math.sqrt((A + (C + math.hypot(B, (A - C)))))) / ((B * B) - ((A * C) * 4.0)) else: tmp = (math.sqrt(2.0) / B) * (math.sqrt(B) * -math.sqrt(F)) return tmp
B = abs(B) function code(A, B, C, F) tmp = 0.0 if (B <= 7e+139) tmp = Float64(Float64(sqrt(Float64(2.0 * Float64(F * Float64(Float64(B * B) + Float64(-4.0 * Float64(A * C)))))) * Float64(-sqrt(Float64(A + Float64(C + hypot(B, Float64(A - C))))))) / Float64(Float64(B * B) - Float64(Float64(A * C) * 4.0))); else tmp = Float64(Float64(sqrt(2.0) / B) * Float64(sqrt(B) * Float64(-sqrt(F)))); end return tmp end
B = abs(B) function tmp_2 = code(A, B, C, F) tmp = 0.0; if (B <= 7e+139) tmp = (sqrt((2.0 * (F * ((B * B) + (-4.0 * (A * C)))))) * -sqrt((A + (C + hypot(B, (A - C)))))) / ((B * B) - ((A * C) * 4.0)); else tmp = (sqrt(2.0) / B) * (sqrt(B) * -sqrt(F)); end tmp_2 = tmp; end
NOTE: B should be positive before calling this function code[A_, B_, C_, F_] := If[LessEqual[B, 7e+139], N[(N[(N[Sqrt[N[(2.0 * N[(F * N[(N[(B * B), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[N[(A + N[(C + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / N[(N[(B * B), $MachinePrecision] - N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * N[(N[Sqrt[B], $MachinePrecision] * (-N[Sqrt[F], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
\mathbf{if}\;B \leq 7 \cdot 10^{+139}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right)} \cdot \left(-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)}\right)}{B \cdot B - \left(A \cdot C\right) \cdot 4}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{B} \cdot \left(-\sqrt{F}\right)\right)\\
\end{array}
\end{array}
if B < 6.99999999999999957e139Initial program 19.2%
Simplified19.2%
sqrt-prod20.9%
*-commutative20.9%
cancel-sign-sub-inv20.9%
metadata-eval20.9%
associate-+l+21.2%
unpow221.2%
hypot-udef32.8%
Applied egg-rr32.8%
if 6.99999999999999957e139 < B Initial program 0.1%
Simplified0.1%
Taylor expanded in C around 0 5.1%
+-commutative5.1%
unpow25.1%
unpow25.1%
Simplified5.1%
sqrt-prod5.1%
hypot-def82.5%
Applied egg-rr82.5%
Taylor expanded in A around 0 79.8%
Final simplification39.6%
NOTE: B should be positive before calling this function
(FPCore (A B C F)
:precision binary64
(let* ((t_0 (+ (* B B) (* -4.0 (* A C)))) (t_1 (+ A (+ C (hypot B (- A C))))))
(if (<= B 1.2e-79)
(/
(* (sqrt t_1) (- (sqrt (* 2.0 (* -4.0 (* F (* A C)))))))
(- (* B B) (* (* A C) 4.0)))
(if (<= B 8.4e+83)
(/ (- (sqrt (* 2.0 (* (* F t_0) t_1)))) t_0)
(* (/ (sqrt 2.0) B) (* (sqrt B) (- (sqrt F))))))))B = abs(B);
double code(double A, double B, double C, double F) {
double t_0 = (B * B) + (-4.0 * (A * C));
double t_1 = A + (C + hypot(B, (A - C)));
double tmp;
if (B <= 1.2e-79) {
tmp = (sqrt(t_1) * -sqrt((2.0 * (-4.0 * (F * (A * C)))))) / ((B * B) - ((A * C) * 4.0));
} else if (B <= 8.4e+83) {
tmp = -sqrt((2.0 * ((F * t_0) * t_1))) / t_0;
} else {
tmp = (sqrt(2.0) / B) * (sqrt(B) * -sqrt(F));
}
return tmp;
}
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
double t_0 = (B * B) + (-4.0 * (A * C));
double t_1 = A + (C + Math.hypot(B, (A - C)));
double tmp;
if (B <= 1.2e-79) {
tmp = (Math.sqrt(t_1) * -Math.sqrt((2.0 * (-4.0 * (F * (A * C)))))) / ((B * B) - ((A * C) * 4.0));
} else if (B <= 8.4e+83) {
tmp = -Math.sqrt((2.0 * ((F * t_0) * t_1))) / t_0;
} else {
tmp = (Math.sqrt(2.0) / B) * (Math.sqrt(B) * -Math.sqrt(F));
}
return tmp;
}
B = abs(B) def code(A, B, C, F): t_0 = (B * B) + (-4.0 * (A * C)) t_1 = A + (C + math.hypot(B, (A - C))) tmp = 0 if B <= 1.2e-79: tmp = (math.sqrt(t_1) * -math.sqrt((2.0 * (-4.0 * (F * (A * C)))))) / ((B * B) - ((A * C) * 4.0)) elif B <= 8.4e+83: tmp = -math.sqrt((2.0 * ((F * t_0) * t_1))) / t_0 else: tmp = (math.sqrt(2.0) / B) * (math.sqrt(B) * -math.sqrt(F)) return tmp
B = abs(B) function code(A, B, C, F) t_0 = Float64(Float64(B * B) + Float64(-4.0 * Float64(A * C))) t_1 = Float64(A + Float64(C + hypot(B, Float64(A - C)))) tmp = 0.0 if (B <= 1.2e-79) tmp = Float64(Float64(sqrt(t_1) * Float64(-sqrt(Float64(2.0 * Float64(-4.0 * Float64(F * Float64(A * C))))))) / Float64(Float64(B * B) - Float64(Float64(A * C) * 4.0))); elseif (B <= 8.4e+83) tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(F * t_0) * t_1)))) / t_0); else tmp = Float64(Float64(sqrt(2.0) / B) * Float64(sqrt(B) * Float64(-sqrt(F)))); end return tmp end
B = abs(B) function tmp_2 = code(A, B, C, F) t_0 = (B * B) + (-4.0 * (A * C)); t_1 = A + (C + hypot(B, (A - C))); tmp = 0.0; if (B <= 1.2e-79) tmp = (sqrt(t_1) * -sqrt((2.0 * (-4.0 * (F * (A * C)))))) / ((B * B) - ((A * C) * 4.0)); elseif (B <= 8.4e+83) tmp = -sqrt((2.0 * ((F * t_0) * t_1))) / t_0; else tmp = (sqrt(2.0) / B) * (sqrt(B) * -sqrt(F)); end tmp_2 = tmp; end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(A + N[(C + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 1.2e-79], N[(N[(N[Sqrt[t$95$1], $MachinePrecision] * (-N[Sqrt[N[(2.0 * N[(-4.0 * N[(F * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / N[(N[(B * B), $MachinePrecision] - N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 8.4e+83], N[((-N[Sqrt[N[(2.0 * N[(N[(F * t$95$0), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * N[(N[Sqrt[B], $MachinePrecision] * (-N[Sqrt[F], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\
t_1 := A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\\
\mathbf{if}\;B \leq 1.2 \cdot 10^{-79}:\\
\;\;\;\;\frac{\sqrt{t_1} \cdot \left(-\sqrt{2 \cdot \left(-4 \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)}\right)}{B \cdot B - \left(A \cdot C\right) \cdot 4}\\
\mathbf{elif}\;B \leq 8.4 \cdot 10^{+83}:\\
\;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot t_1\right)}}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{B} \cdot \left(-\sqrt{F}\right)\right)\\
\end{array}
\end{array}
if B < 1.20000000000000003e-79Initial program 17.8%
Simplified17.8%
sqrt-prod18.8%
*-commutative18.8%
cancel-sign-sub-inv18.8%
metadata-eval18.8%
associate-+l+19.1%
unpow219.1%
hypot-udef31.3%
Applied egg-rr31.3%
Taylor expanded in B around 0 17.4%
associate-*r*18.8%
Simplified18.8%
if 1.20000000000000003e-79 < B < 8.4000000000000001e83Initial program 31.6%
Simplified31.6%
distribute-frac-neg31.6%
Applied egg-rr40.2%
if 8.4000000000000001e83 < B Initial program 0.5%
Simplified0.5%
Taylor expanded in C around 0 8.7%
+-commutative8.7%
unpow28.7%
unpow28.7%
Simplified8.7%
sqrt-prod10.9%
hypot-def71.9%
Applied egg-rr71.9%
Taylor expanded in A around 0 69.9%
Final simplification30.9%
NOTE: B should be positive before calling this function
(FPCore (A B C F)
:precision binary64
(let* ((t_0 (+ (* B B) (* -4.0 (* A C)))))
(if (<= B 6.4e+82)
(*
(sqrt (* 2.0 (* (* F t_0) (+ A (+ C (hypot B (- A C)))))))
(/ -1.0 t_0))
(* (/ (sqrt 2.0) B) (* (sqrt B) (- (sqrt F)))))))B = abs(B);
double code(double A, double B, double C, double F) {
double t_0 = (B * B) + (-4.0 * (A * C));
double tmp;
if (B <= 6.4e+82) {
tmp = sqrt((2.0 * ((F * t_0) * (A + (C + hypot(B, (A - C))))))) * (-1.0 / t_0);
} else {
tmp = (sqrt(2.0) / B) * (sqrt(B) * -sqrt(F));
}
return tmp;
}
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
double t_0 = (B * B) + (-4.0 * (A * C));
double tmp;
if (B <= 6.4e+82) {
tmp = Math.sqrt((2.0 * ((F * t_0) * (A + (C + Math.hypot(B, (A - C))))))) * (-1.0 / t_0);
} else {
tmp = (Math.sqrt(2.0) / B) * (Math.sqrt(B) * -Math.sqrt(F));
}
return tmp;
}
B = abs(B) def code(A, B, C, F): t_0 = (B * B) + (-4.0 * (A * C)) tmp = 0 if B <= 6.4e+82: tmp = math.sqrt((2.0 * ((F * t_0) * (A + (C + math.hypot(B, (A - C))))))) * (-1.0 / t_0) else: tmp = (math.sqrt(2.0) / B) * (math.sqrt(B) * -math.sqrt(F)) return tmp
B = abs(B) function code(A, B, C, F) t_0 = Float64(Float64(B * B) + Float64(-4.0 * Float64(A * C))) tmp = 0.0 if (B <= 6.4e+82) tmp = Float64(sqrt(Float64(2.0 * Float64(Float64(F * t_0) * Float64(A + Float64(C + hypot(B, Float64(A - C))))))) * Float64(-1.0 / t_0)); else tmp = Float64(Float64(sqrt(2.0) / B) * Float64(sqrt(B) * Float64(-sqrt(F)))); end return tmp end
B = abs(B) function tmp_2 = code(A, B, C, F) t_0 = (B * B) + (-4.0 * (A * C)); tmp = 0.0; if (B <= 6.4e+82) tmp = sqrt((2.0 * ((F * t_0) * (A + (C + hypot(B, (A - C))))))) * (-1.0 / t_0); else tmp = (sqrt(2.0) / B) * (sqrt(B) * -sqrt(F)); end tmp_2 = tmp; end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 6.4e+82], N[(N[Sqrt[N[(2.0 * N[(N[(F * t$95$0), $MachinePrecision] * N[(A + N[(C + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-1.0 / t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * N[(N[Sqrt[B], $MachinePrecision] * (-N[Sqrt[F], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\
\mathbf{if}\;B \leq 6.4 \cdot 10^{+82}:\\
\;\;\;\;\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)} \cdot \frac{-1}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{B} \cdot \left(-\sqrt{F}\right)\right)\\
\end{array}
\end{array}
if B < 6.3999999999999995e82Initial program 20.0%
Simplified20.0%
div-inv20.0%
Applied egg-rr27.4%
if 6.3999999999999995e82 < B Initial program 0.5%
Simplified0.5%
Taylor expanded in C around 0 8.7%
+-commutative8.7%
unpow28.7%
unpow28.7%
Simplified8.7%
sqrt-prod10.9%
hypot-def71.9%
Applied egg-rr71.9%
Taylor expanded in A around 0 69.9%
Final simplification35.2%
NOTE: B should be positive before calling this function
(FPCore (A B C F)
:precision binary64
(let* ((t_0 (+ (* B B) (* -4.0 (* A C)))))
(if (<= F 2.6e-295)
(*
(sqrt (* 2.0 (* (* F t_0) (+ A (+ C (hypot B (- A C)))))))
(/ -1.0 t_0))
(if (<= F 0.75)
(* (/ (sqrt 2.0) B) (- (sqrt (* B F))))
(* (sqrt 2.0) (- (sqrt (/ F B))))))))B = abs(B);
double code(double A, double B, double C, double F) {
double t_0 = (B * B) + (-4.0 * (A * C));
double tmp;
if (F <= 2.6e-295) {
tmp = sqrt((2.0 * ((F * t_0) * (A + (C + hypot(B, (A - C))))))) * (-1.0 / t_0);
} else if (F <= 0.75) {
tmp = (sqrt(2.0) / B) * -sqrt((B * F));
} else {
tmp = sqrt(2.0) * -sqrt((F / B));
}
return tmp;
}
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
double t_0 = (B * B) + (-4.0 * (A * C));
double tmp;
if (F <= 2.6e-295) {
tmp = Math.sqrt((2.0 * ((F * t_0) * (A + (C + Math.hypot(B, (A - C))))))) * (-1.0 / t_0);
} else if (F <= 0.75) {
tmp = (Math.sqrt(2.0) / B) * -Math.sqrt((B * F));
} else {
tmp = Math.sqrt(2.0) * -Math.sqrt((F / B));
}
return tmp;
}
B = abs(B) def code(A, B, C, F): t_0 = (B * B) + (-4.0 * (A * C)) tmp = 0 if F <= 2.6e-295: tmp = math.sqrt((2.0 * ((F * t_0) * (A + (C + math.hypot(B, (A - C))))))) * (-1.0 / t_0) elif F <= 0.75: tmp = (math.sqrt(2.0) / B) * -math.sqrt((B * F)) else: tmp = math.sqrt(2.0) * -math.sqrt((F / B)) return tmp
B = abs(B) function code(A, B, C, F) t_0 = Float64(Float64(B * B) + Float64(-4.0 * Float64(A * C))) tmp = 0.0 if (F <= 2.6e-295) tmp = Float64(sqrt(Float64(2.0 * Float64(Float64(F * t_0) * Float64(A + Float64(C + hypot(B, Float64(A - C))))))) * Float64(-1.0 / t_0)); elseif (F <= 0.75) tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(B * F)))); else tmp = Float64(sqrt(2.0) * Float64(-sqrt(Float64(F / B)))); end return tmp end
B = abs(B) function tmp_2 = code(A, B, C, F) t_0 = (B * B) + (-4.0 * (A * C)); tmp = 0.0; if (F <= 2.6e-295) tmp = sqrt((2.0 * ((F * t_0) * (A + (C + hypot(B, (A - C))))))) * (-1.0 / t_0); elseif (F <= 0.75) tmp = (sqrt(2.0) / B) * -sqrt((B * F)); else tmp = sqrt(2.0) * -sqrt((F / B)); end tmp_2 = tmp; end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, 2.6e-295], N[(N[Sqrt[N[(2.0 * N[(N[(F * t$95$0), $MachinePrecision] * N[(A + N[(C + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-1.0 / t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.75], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(B * F), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F / B), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\
\mathbf{if}\;F \leq 2.6 \cdot 10^{-295}:\\
\;\;\;\;\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)} \cdot \frac{-1}{t_0}\\
\mathbf{elif}\;F \leq 0.75:\\
\;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\
\end{array}
\end{array}
if F < 2.59999999999999985e-295Initial program 21.6%
Simplified21.6%
div-inv21.6%
Applied egg-rr39.3%
if 2.59999999999999985e-295 < F < 0.75Initial program 19.3%
Simplified19.3%
Taylor expanded in A around 0 8.7%
mul-1-neg8.7%
distribute-rgt-neg-in8.7%
+-commutative8.7%
unpow28.7%
unpow28.7%
hypot-def24.6%
Simplified24.6%
Taylor expanded in C around 0 23.3%
if 0.75 < F Initial program 11.8%
Simplified11.8%
Taylor expanded in A around 0 5.9%
mul-1-neg5.9%
distribute-rgt-neg-in5.9%
+-commutative5.9%
unpow25.9%
unpow25.9%
hypot-def10.5%
Simplified10.5%
Taylor expanded in C around 0 17.0%
mul-1-neg17.0%
Simplified17.0%
Final simplification23.3%
NOTE: B should be positive before calling this function
(FPCore (A B C F)
:precision binary64
(let* ((t_0 (+ (* B B) (* -4.0 (* A C)))))
(if (<= F 2.9e-294)
(/ (- (sqrt (* 2.0 (* (* F t_0) (+ A (+ C (hypot B (- A C)))))))) t_0)
(if (<= F 6.7)
(* (/ (sqrt 2.0) B) (- (sqrt (* B F))))
(* (sqrt 2.0) (- (sqrt (/ F B))))))))B = abs(B);
double code(double A, double B, double C, double F) {
double t_0 = (B * B) + (-4.0 * (A * C));
double tmp;
if (F <= 2.9e-294) {
tmp = -sqrt((2.0 * ((F * t_0) * (A + (C + hypot(B, (A - C))))))) / t_0;
} else if (F <= 6.7) {
tmp = (sqrt(2.0) / B) * -sqrt((B * F));
} else {
tmp = sqrt(2.0) * -sqrt((F / B));
}
return tmp;
}
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
double t_0 = (B * B) + (-4.0 * (A * C));
double tmp;
if (F <= 2.9e-294) {
tmp = -Math.sqrt((2.0 * ((F * t_0) * (A + (C + Math.hypot(B, (A - C))))))) / t_0;
} else if (F <= 6.7) {
tmp = (Math.sqrt(2.0) / B) * -Math.sqrt((B * F));
} else {
tmp = Math.sqrt(2.0) * -Math.sqrt((F / B));
}
return tmp;
}
B = abs(B) def code(A, B, C, F): t_0 = (B * B) + (-4.0 * (A * C)) tmp = 0 if F <= 2.9e-294: tmp = -math.sqrt((2.0 * ((F * t_0) * (A + (C + math.hypot(B, (A - C))))))) / t_0 elif F <= 6.7: tmp = (math.sqrt(2.0) / B) * -math.sqrt((B * F)) else: tmp = math.sqrt(2.0) * -math.sqrt((F / B)) return tmp
B = abs(B) function code(A, B, C, F) t_0 = Float64(Float64(B * B) + Float64(-4.0 * Float64(A * C))) tmp = 0.0 if (F <= 2.9e-294) tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(Float64(F * t_0) * Float64(A + Float64(C + hypot(B, Float64(A - C)))))))) / t_0); elseif (F <= 6.7) tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(B * F)))); else tmp = Float64(sqrt(2.0) * Float64(-sqrt(Float64(F / B)))); end return tmp end
B = abs(B) function tmp_2 = code(A, B, C, F) t_0 = (B * B) + (-4.0 * (A * C)); tmp = 0.0; if (F <= 2.9e-294) tmp = -sqrt((2.0 * ((F * t_0) * (A + (C + hypot(B, (A - C))))))) / t_0; elseif (F <= 6.7) tmp = (sqrt(2.0) / B) * -sqrt((B * F)); else tmp = sqrt(2.0) * -sqrt((F / B)); end tmp_2 = tmp; end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, 2.9e-294], N[((-N[Sqrt[N[(2.0 * N[(N[(F * t$95$0), $MachinePrecision] * N[(A + N[(C + N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[F, 6.7], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(B * F), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F / B), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\
\mathbf{if}\;F \leq 2.9 \cdot 10^{-294}:\\
\;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)}}{t_0}\\
\mathbf{elif}\;F \leq 6.7:\\
\;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\
\end{array}
\end{array}
if F < 2.9000000000000001e-294Initial program 21.6%
Simplified21.6%
distribute-frac-neg21.6%
Applied egg-rr39.2%
if 2.9000000000000001e-294 < F < 6.70000000000000018Initial program 19.3%
Simplified19.3%
Taylor expanded in A around 0 8.7%
mul-1-neg8.7%
distribute-rgt-neg-in8.7%
+-commutative8.7%
unpow28.7%
unpow28.7%
hypot-def24.6%
Simplified24.6%
Taylor expanded in C around 0 23.3%
if 6.70000000000000018 < F Initial program 11.8%
Simplified11.8%
Taylor expanded in A around 0 5.9%
mul-1-neg5.9%
distribute-rgt-neg-in5.9%
+-commutative5.9%
unpow25.9%
unpow25.9%
hypot-def10.5%
Simplified10.5%
Taylor expanded in C around 0 17.0%
mul-1-neg17.0%
Simplified17.0%
Final simplification23.3%
NOTE: B should be positive before calling this function
(FPCore (A B C F)
:precision binary64
(let* ((t_0 (- (* B B) (* (* A C) 4.0))))
(if (<= F -1.2e-90)
(/ (* (sqrt (* t_0 (* 2.0 F))) (- (sqrt (+ A (+ A C))))) t_0)
(if (<= F -7.5e-298)
(/ (- (sqrt (* (* 2.0 (* F t_0)) (+ (+ A C) (- C A))))) t_0)
(if (<= F 3.0)
(* (/ (sqrt 2.0) B) (- (sqrt (* B F))))
(* (sqrt 2.0) (- (sqrt (/ F B)))))))))B = abs(B);
double code(double A, double B, double C, double F) {
double t_0 = (B * B) - ((A * C) * 4.0);
double tmp;
if (F <= -1.2e-90) {
tmp = (sqrt((t_0 * (2.0 * F))) * -sqrt((A + (A + C)))) / t_0;
} else if (F <= -7.5e-298) {
tmp = -sqrt(((2.0 * (F * t_0)) * ((A + C) + (C - A)))) / t_0;
} else if (F <= 3.0) {
tmp = (sqrt(2.0) / B) * -sqrt((B * F));
} else {
tmp = sqrt(2.0) * -sqrt((F / B));
}
return tmp;
}
NOTE: B should be positive before calling this 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) :: tmp
t_0 = (b * b) - ((a * c) * 4.0d0)
if (f <= (-1.2d-90)) then
tmp = (sqrt((t_0 * (2.0d0 * f))) * -sqrt((a + (a + c)))) / t_0
else if (f <= (-7.5d-298)) then
tmp = -sqrt(((2.0d0 * (f * t_0)) * ((a + c) + (c - a)))) / t_0
else if (f <= 3.0d0) then
tmp = (sqrt(2.0d0) / b) * -sqrt((b * f))
else
tmp = sqrt(2.0d0) * -sqrt((f / b))
end if
code = tmp
end function
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
double t_0 = (B * B) - ((A * C) * 4.0);
double tmp;
if (F <= -1.2e-90) {
tmp = (Math.sqrt((t_0 * (2.0 * F))) * -Math.sqrt((A + (A + C)))) / t_0;
} else if (F <= -7.5e-298) {
tmp = -Math.sqrt(((2.0 * (F * t_0)) * ((A + C) + (C - A)))) / t_0;
} else if (F <= 3.0) {
tmp = (Math.sqrt(2.0) / B) * -Math.sqrt((B * F));
} else {
tmp = Math.sqrt(2.0) * -Math.sqrt((F / B));
}
return tmp;
}
B = abs(B) def code(A, B, C, F): t_0 = (B * B) - ((A * C) * 4.0) tmp = 0 if F <= -1.2e-90: tmp = (math.sqrt((t_0 * (2.0 * F))) * -math.sqrt((A + (A + C)))) / t_0 elif F <= -7.5e-298: tmp = -math.sqrt(((2.0 * (F * t_0)) * ((A + C) + (C - A)))) / t_0 elif F <= 3.0: tmp = (math.sqrt(2.0) / B) * -math.sqrt((B * F)) else: tmp = math.sqrt(2.0) * -math.sqrt((F / B)) return tmp
B = abs(B) function code(A, B, C, F) t_0 = Float64(Float64(B * B) - Float64(Float64(A * C) * 4.0)) tmp = 0.0 if (F <= -1.2e-90) tmp = Float64(Float64(sqrt(Float64(t_0 * Float64(2.0 * F))) * Float64(-sqrt(Float64(A + Float64(A + C))))) / t_0); elseif (F <= -7.5e-298) tmp = Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(F * t_0)) * Float64(Float64(A + C) + Float64(C - A))))) / t_0); elseif (F <= 3.0) tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(B * F)))); else tmp = Float64(sqrt(2.0) * Float64(-sqrt(Float64(F / B)))); end return tmp end
B = abs(B) function tmp_2 = code(A, B, C, F) t_0 = (B * B) - ((A * C) * 4.0); tmp = 0.0; if (F <= -1.2e-90) tmp = (sqrt((t_0 * (2.0 * F))) * -sqrt((A + (A + C)))) / t_0; elseif (F <= -7.5e-298) tmp = -sqrt(((2.0 * (F * t_0)) * ((A + C) + (C - A)))) / t_0; elseif (F <= 3.0) tmp = (sqrt(2.0) / B) * -sqrt((B * F)); else tmp = sqrt(2.0) * -sqrt((F / B)); end tmp_2 = tmp; end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] - N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.2e-90], N[(N[(N[Sqrt[N[(t$95$0 * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[N[(A + N[(A + C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[F, -7.5e-298], N[((-N[Sqrt[N[(N[(2.0 * N[(F * t$95$0), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] + N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[F, 3.0], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(B * F), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F / B), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := B \cdot B - \left(A \cdot C\right) \cdot 4\\
\mathbf{if}\;F \leq -1.2 \cdot 10^{-90}:\\
\;\;\;\;\frac{\sqrt{t_0 \cdot \left(2 \cdot F\right)} \cdot \left(-\sqrt{A + \left(A + C\right)}\right)}{t_0}\\
\mathbf{elif}\;F \leq -7.5 \cdot 10^{-298}:\\
\;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot t_0\right)\right) \cdot \left(\left(A + C\right) + \left(C - A\right)\right)}}{t_0}\\
\mathbf{elif}\;F \leq 3:\\
\;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\
\end{array}
\end{array}
if F < -1.2000000000000001e-90Initial program 18.9%
Simplified18.9%
Taylor expanded in A around inf 15.5%
sqrt-prod28.6%
*-commutative28.6%
*-commutative28.6%
associate-+l+28.6%
Applied egg-rr28.6%
associate-*r*28.6%
Simplified28.6%
if -1.2000000000000001e-90 < F < -7.49999999999999987e-298Initial program 22.6%
Simplified22.6%
Taylor expanded in A around -inf 64.2%
mul-1-neg64.2%
sub-neg64.2%
Simplified64.2%
if -7.49999999999999987e-298 < F < 3Initial program 20.0%
Simplified20.0%
Taylor expanded in A around 0 9.2%
mul-1-neg9.2%
distribute-rgt-neg-in9.2%
+-commutative9.2%
unpow29.2%
unpow29.2%
hypot-def24.1%
Simplified24.1%
Taylor expanded in C around 0 22.6%
if 3 < F Initial program 11.8%
Simplified11.8%
Taylor expanded in A around 0 5.9%
mul-1-neg5.9%
distribute-rgt-neg-in5.9%
+-commutative5.9%
unpow25.9%
unpow25.9%
hypot-def10.5%
Simplified10.5%
Taylor expanded in C around 0 17.0%
mul-1-neg17.0%
Simplified17.0%
Final simplification22.9%
NOTE: B should be positive before calling this function
(FPCore (A B C F)
:precision binary64
(let* ((t_0 (- (* B B) (* (* A C) 4.0))))
(if (<= F -7.5e-298)
(/ (- (sqrt (* (* 2.0 (* F t_0)) (+ (+ A C) (- C A))))) t_0)
(if (<= F 1.0)
(* (/ (sqrt 2.0) B) (- (sqrt (* B F))))
(* (sqrt 2.0) (- (sqrt (/ F B))))))))B = abs(B);
double code(double A, double B, double C, double F) {
double t_0 = (B * B) - ((A * C) * 4.0);
double tmp;
if (F <= -7.5e-298) {
tmp = -sqrt(((2.0 * (F * t_0)) * ((A + C) + (C - A)))) / t_0;
} else if (F <= 1.0) {
tmp = (sqrt(2.0) / B) * -sqrt((B * F));
} else {
tmp = sqrt(2.0) * -sqrt((F / B));
}
return tmp;
}
NOTE: B should be positive before calling this 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) :: tmp
t_0 = (b * b) - ((a * c) * 4.0d0)
if (f <= (-7.5d-298)) then
tmp = -sqrt(((2.0d0 * (f * t_0)) * ((a + c) + (c - a)))) / t_0
else if (f <= 1.0d0) then
tmp = (sqrt(2.0d0) / b) * -sqrt((b * f))
else
tmp = sqrt(2.0d0) * -sqrt((f / b))
end if
code = tmp
end function
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
double t_0 = (B * B) - ((A * C) * 4.0);
double tmp;
if (F <= -7.5e-298) {
tmp = -Math.sqrt(((2.0 * (F * t_0)) * ((A + C) + (C - A)))) / t_0;
} else if (F <= 1.0) {
tmp = (Math.sqrt(2.0) / B) * -Math.sqrt((B * F));
} else {
tmp = Math.sqrt(2.0) * -Math.sqrt((F / B));
}
return tmp;
}
B = abs(B) def code(A, B, C, F): t_0 = (B * B) - ((A * C) * 4.0) tmp = 0 if F <= -7.5e-298: tmp = -math.sqrt(((2.0 * (F * t_0)) * ((A + C) + (C - A)))) / t_0 elif F <= 1.0: tmp = (math.sqrt(2.0) / B) * -math.sqrt((B * F)) else: tmp = math.sqrt(2.0) * -math.sqrt((F / B)) return tmp
B = abs(B) function code(A, B, C, F) t_0 = Float64(Float64(B * B) - Float64(Float64(A * C) * 4.0)) tmp = 0.0 if (F <= -7.5e-298) tmp = Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(F * t_0)) * Float64(Float64(A + C) + Float64(C - A))))) / t_0); elseif (F <= 1.0) tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(B * F)))); else tmp = Float64(sqrt(2.0) * Float64(-sqrt(Float64(F / B)))); end return tmp end
B = abs(B) function tmp_2 = code(A, B, C, F) t_0 = (B * B) - ((A * C) * 4.0); tmp = 0.0; if (F <= -7.5e-298) tmp = -sqrt(((2.0 * (F * t_0)) * ((A + C) + (C - A)))) / t_0; elseif (F <= 1.0) tmp = (sqrt(2.0) / B) * -sqrt((B * F)); else tmp = sqrt(2.0) * -sqrt((F / B)); end tmp_2 = tmp; end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] - N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7.5e-298], N[((-N[Sqrt[N[(N[(2.0 * N[(F * t$95$0), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] + N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[F, 1.0], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(B * F), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F / B), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := B \cdot B - \left(A \cdot C\right) \cdot 4\\
\mathbf{if}\;F \leq -7.5 \cdot 10^{-298}:\\
\;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot t_0\right)\right) \cdot \left(\left(A + C\right) + \left(C - A\right)\right)}}{t_0}\\
\mathbf{elif}\;F \leq 1:\\
\;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\
\end{array}
\end{array}
if F < -7.49999999999999987e-298Initial program 20.2%
Simplified20.2%
Taylor expanded in A around -inf 27.5%
mul-1-neg27.5%
sub-neg27.5%
Simplified27.5%
if -7.49999999999999987e-298 < F < 1Initial program 20.0%
Simplified20.0%
Taylor expanded in A around 0 9.2%
mul-1-neg9.2%
distribute-rgt-neg-in9.2%
+-commutative9.2%
unpow29.2%
unpow29.2%
hypot-def24.1%
Simplified24.1%
Taylor expanded in C around 0 22.6%
if 1 < F Initial program 11.8%
Simplified11.8%
Taylor expanded in A around 0 5.9%
mul-1-neg5.9%
distribute-rgt-neg-in5.9%
+-commutative5.9%
unpow25.9%
unpow25.9%
hypot-def10.5%
Simplified10.5%
Taylor expanded in C around 0 17.0%
mul-1-neg17.0%
Simplified17.0%
Final simplification20.8%
NOTE: B should be positive before calling this function
(FPCore (A B C F)
:precision binary64
(let* ((t_0 (- (* B B) (* (* A C) 4.0))))
(if (<= B 5.4e-69)
(/ (- (sqrt (* (* 2.0 (* F t_0)) (+ (+ A C) (- C A))))) t_0)
(* (sqrt 2.0) (- (sqrt (/ F B)))))))B = abs(B);
double code(double A, double B, double C, double F) {
double t_0 = (B * B) - ((A * C) * 4.0);
double tmp;
if (B <= 5.4e-69) {
tmp = -sqrt(((2.0 * (F * t_0)) * ((A + C) + (C - A)))) / t_0;
} else {
tmp = sqrt(2.0) * -sqrt((F / B));
}
return tmp;
}
NOTE: B should be positive before calling this 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) :: tmp
t_0 = (b * b) - ((a * c) * 4.0d0)
if (b <= 5.4d-69) then
tmp = -sqrt(((2.0d0 * (f * t_0)) * ((a + c) + (c - a)))) / t_0
else
tmp = sqrt(2.0d0) * -sqrt((f / b))
end if
code = tmp
end function
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
double t_0 = (B * B) - ((A * C) * 4.0);
double tmp;
if (B <= 5.4e-69) {
tmp = -Math.sqrt(((2.0 * (F * t_0)) * ((A + C) + (C - A)))) / t_0;
} else {
tmp = Math.sqrt(2.0) * -Math.sqrt((F / B));
}
return tmp;
}
B = abs(B) def code(A, B, C, F): t_0 = (B * B) - ((A * C) * 4.0) tmp = 0 if B <= 5.4e-69: tmp = -math.sqrt(((2.0 * (F * t_0)) * ((A + C) + (C - A)))) / t_0 else: tmp = math.sqrt(2.0) * -math.sqrt((F / B)) return tmp
B = abs(B) function code(A, B, C, F) t_0 = Float64(Float64(B * B) - Float64(Float64(A * C) * 4.0)) tmp = 0.0 if (B <= 5.4e-69) tmp = Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(F * t_0)) * Float64(Float64(A + C) + Float64(C - A))))) / t_0); else tmp = Float64(sqrt(2.0) * Float64(-sqrt(Float64(F / B)))); end return tmp end
B = abs(B) function tmp_2 = code(A, B, C, F) t_0 = (B * B) - ((A * C) * 4.0); tmp = 0.0; if (B <= 5.4e-69) tmp = -sqrt(((2.0 * (F * t_0)) * ((A + C) + (C - A)))) / t_0; else tmp = sqrt(2.0) * -sqrt((F / B)); end tmp_2 = tmp; end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] - N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, 5.4e-69], N[((-N[Sqrt[N[(N[(2.0 * N[(F * t$95$0), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] + N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * (-N[Sqrt[N[(F / B), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := B \cdot B - \left(A \cdot C\right) \cdot 4\\
\mathbf{if}\;B \leq 5.4 \cdot 10^{-69}:\\
\;\;\;\;\frac{-\sqrt{\left(2 \cdot \left(F \cdot t_0\right)\right) \cdot \left(\left(A + C\right) + \left(C - A\right)\right)}}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\
\end{array}
\end{array}
if B < 5.3999999999999995e-69Initial program 18.8%
Simplified18.8%
Taylor expanded in A around -inf 10.9%
mul-1-neg10.9%
sub-neg10.9%
Simplified10.9%
if 5.3999999999999995e-69 < B Initial program 10.5%
Simplified10.5%
Taylor expanded in A around 0 15.2%
mul-1-neg15.2%
distribute-rgt-neg-in15.2%
+-commutative15.2%
unpow215.2%
unpow215.2%
hypot-def42.2%
Simplified42.2%
Taylor expanded in C around 0 44.3%
mul-1-neg44.3%
Simplified44.3%
Final simplification20.4%
NOTE: B should be positive before calling this function
(FPCore (A B C F)
:precision binary64
(let* ((t_0 (- (* B B) (* (* A C) 4.0))) (t_1 (* 2.0 (* F t_0))))
(if (<= C -4.8e+75)
(/ (- (sqrt (* -16.0 (* F (* C (* A A)))))) t_0)
(if (<= C 1.9e-162)
(/ (- (sqrt (* t_1 (+ (- A C) (+ A C))))) t_0)
(/ (- (sqrt (* t_1 (+ (+ A C) (- C A))))) t_0)))))B = abs(B);
double code(double A, double B, double C, double F) {
double t_0 = (B * B) - ((A * C) * 4.0);
double t_1 = 2.0 * (F * t_0);
double tmp;
if (C <= -4.8e+75) {
tmp = -sqrt((-16.0 * (F * (C * (A * A))))) / t_0;
} else if (C <= 1.9e-162) {
tmp = -sqrt((t_1 * ((A - C) + (A + C)))) / t_0;
} else {
tmp = -sqrt((t_1 * ((A + C) + (C - A)))) / t_0;
}
return tmp;
}
NOTE: B should be positive before calling this 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 = (b * b) - ((a * c) * 4.0d0)
t_1 = 2.0d0 * (f * t_0)
if (c <= (-4.8d+75)) then
tmp = -sqrt(((-16.0d0) * (f * (c * (a * a))))) / t_0
else if (c <= 1.9d-162) then
tmp = -sqrt((t_1 * ((a - c) + (a + c)))) / t_0
else
tmp = -sqrt((t_1 * ((a + c) + (c - a)))) / t_0
end if
code = tmp
end function
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
double t_0 = (B * B) - ((A * C) * 4.0);
double t_1 = 2.0 * (F * t_0);
double tmp;
if (C <= -4.8e+75) {
tmp = -Math.sqrt((-16.0 * (F * (C * (A * A))))) / t_0;
} else if (C <= 1.9e-162) {
tmp = -Math.sqrt((t_1 * ((A - C) + (A + C)))) / t_0;
} else {
tmp = -Math.sqrt((t_1 * ((A + C) + (C - A)))) / t_0;
}
return tmp;
}
B = abs(B) def code(A, B, C, F): t_0 = (B * B) - ((A * C) * 4.0) t_1 = 2.0 * (F * t_0) tmp = 0 if C <= -4.8e+75: tmp = -math.sqrt((-16.0 * (F * (C * (A * A))))) / t_0 elif C <= 1.9e-162: tmp = -math.sqrt((t_1 * ((A - C) + (A + C)))) / t_0 else: tmp = -math.sqrt((t_1 * ((A + C) + (C - A)))) / t_0 return tmp
B = abs(B) function code(A, B, C, F) t_0 = Float64(Float64(B * B) - Float64(Float64(A * C) * 4.0)) t_1 = Float64(2.0 * Float64(F * t_0)) tmp = 0.0 if (C <= -4.8e+75) tmp = Float64(Float64(-sqrt(Float64(-16.0 * Float64(F * Float64(C * Float64(A * A)))))) / t_0); elseif (C <= 1.9e-162) tmp = Float64(Float64(-sqrt(Float64(t_1 * Float64(Float64(A - C) + Float64(A + C))))) / t_0); else tmp = Float64(Float64(-sqrt(Float64(t_1 * Float64(Float64(A + C) + Float64(C - A))))) / t_0); end return tmp end
B = abs(B) function tmp_2 = code(A, B, C, F) t_0 = (B * B) - ((A * C) * 4.0); t_1 = 2.0 * (F * t_0); tmp = 0.0; if (C <= -4.8e+75) tmp = -sqrt((-16.0 * (F * (C * (A * A))))) / t_0; elseif (C <= 1.9e-162) tmp = -sqrt((t_1 * ((A - C) + (A + C)))) / t_0; else tmp = -sqrt((t_1 * ((A + C) + (C - A)))) / t_0; end tmp_2 = tmp; end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] - N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(2.0 * N[(F * t$95$0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -4.8e+75], N[((-N[Sqrt[N[(-16.0 * N[(F * N[(C * N[(A * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[C, 1.9e-162], N[((-N[Sqrt[N[(t$95$1 * N[(N[(A - C), $MachinePrecision] + N[(A + C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[((-N[Sqrt[N[(t$95$1 * N[(N[(A + C), $MachinePrecision] + N[(C - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := B \cdot B - \left(A \cdot C\right) \cdot 4\\
t_1 := 2 \cdot \left(F \cdot t_0\right)\\
\mathbf{if}\;C \leq -4.8 \cdot 10^{+75}:\\
\;\;\;\;\frac{-\sqrt{-16 \cdot \left(F \cdot \left(C \cdot \left(A \cdot A\right)\right)\right)}}{t_0}\\
\mathbf{elif}\;C \leq 1.9 \cdot 10^{-162}:\\
\;\;\;\;\frac{-\sqrt{t_1 \cdot \left(\left(A - C\right) + \left(A + C\right)\right)}}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{-\sqrt{t_1 \cdot \left(\left(A + C\right) + \left(C - A\right)\right)}}{t_0}\\
\end{array}
\end{array}
if C < -4.8e75Initial program 1.2%
Simplified1.2%
Taylor expanded in A around inf 0.5%
Taylor expanded in A around inf 19.1%
associate-*r*20.0%
unpow220.0%
Simplified20.0%
if -4.8e75 < C < 1.90000000000000002e-162Initial program 21.8%
Simplified21.8%
Taylor expanded in B around 0 12.9%
if 1.90000000000000002e-162 < C Initial program 18.0%
Simplified18.0%
Taylor expanded in A around -inf 17.4%
mul-1-neg17.4%
sub-neg17.4%
Simplified17.4%
Final simplification16.2%
NOTE: B should be positive before calling this function
(FPCore (A B C F)
:precision binary64
(let* ((t_0 (- (* B B) (* (* A C) 4.0))))
(if (<= C -3.3e+75)
(/ (- (sqrt (* -16.0 (* F (* C (* A A)))))) t_0)
(* (sqrt (* (* t_0 (* 2.0 F)) (+ A (+ A C)))) (/ -1.0 t_0)))))B = abs(B);
double code(double A, double B, double C, double F) {
double t_0 = (B * B) - ((A * C) * 4.0);
double tmp;
if (C <= -3.3e+75) {
tmp = -sqrt((-16.0 * (F * (C * (A * A))))) / t_0;
} else {
tmp = sqrt(((t_0 * (2.0 * F)) * (A + (A + C)))) * (-1.0 / t_0);
}
return tmp;
}
NOTE: B should be positive before calling this 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) :: tmp
t_0 = (b * b) - ((a * c) * 4.0d0)
if (c <= (-3.3d+75)) then
tmp = -sqrt(((-16.0d0) * (f * (c * (a * a))))) / t_0
else
tmp = sqrt(((t_0 * (2.0d0 * f)) * (a + (a + c)))) * ((-1.0d0) / t_0)
end if
code = tmp
end function
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
double t_0 = (B * B) - ((A * C) * 4.0);
double tmp;
if (C <= -3.3e+75) {
tmp = -Math.sqrt((-16.0 * (F * (C * (A * A))))) / t_0;
} else {
tmp = Math.sqrt(((t_0 * (2.0 * F)) * (A + (A + C)))) * (-1.0 / t_0);
}
return tmp;
}
B = abs(B) def code(A, B, C, F): t_0 = (B * B) - ((A * C) * 4.0) tmp = 0 if C <= -3.3e+75: tmp = -math.sqrt((-16.0 * (F * (C * (A * A))))) / t_0 else: tmp = math.sqrt(((t_0 * (2.0 * F)) * (A + (A + C)))) * (-1.0 / t_0) return tmp
B = abs(B) function code(A, B, C, F) t_0 = Float64(Float64(B * B) - Float64(Float64(A * C) * 4.0)) tmp = 0.0 if (C <= -3.3e+75) tmp = Float64(Float64(-sqrt(Float64(-16.0 * Float64(F * Float64(C * Float64(A * A)))))) / t_0); else tmp = Float64(sqrt(Float64(Float64(t_0 * Float64(2.0 * F)) * Float64(A + Float64(A + C)))) * Float64(-1.0 / t_0)); end return tmp end
B = abs(B) function tmp_2 = code(A, B, C, F) t_0 = (B * B) - ((A * C) * 4.0); tmp = 0.0; if (C <= -3.3e+75) tmp = -sqrt((-16.0 * (F * (C * (A * A))))) / t_0; else tmp = sqrt(((t_0 * (2.0 * F)) * (A + (A + C)))) * (-1.0 / t_0); end tmp_2 = tmp; end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] - N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -3.3e+75], N[((-N[Sqrt[N[(-16.0 * N[(F * N[(C * N[(A * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[(N[Sqrt[N[(N[(t$95$0 * N[(2.0 * F), $MachinePrecision]), $MachinePrecision] * N[(A + N[(A + C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-1.0 / t$95$0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := B \cdot B - \left(A \cdot C\right) \cdot 4\\
\mathbf{if}\;C \leq -3.3 \cdot 10^{+75}:\\
\;\;\;\;\frac{-\sqrt{-16 \cdot \left(F \cdot \left(C \cdot \left(A \cdot A\right)\right)\right)}}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(t_0 \cdot \left(2 \cdot F\right)\right) \cdot \left(A + \left(A + C\right)\right)} \cdot \frac{-1}{t_0}\\
\end{array}
\end{array}
if C < -3.29999999999999998e75Initial program 1.2%
Simplified1.2%
Taylor expanded in A around inf 0.5%
Taylor expanded in A around inf 19.1%
associate-*r*20.0%
unpow220.0%
Simplified20.0%
if -3.29999999999999998e75 < C Initial program 19.8%
Simplified19.8%
Taylor expanded in A around inf 10.2%
div-inv10.2%
associate-*l*10.2%
*-commutative10.2%
*-commutative10.2%
associate-+l+10.2%
*-commutative10.2%
Applied egg-rr10.2%
associate-*r*10.2%
associate-*r*10.2%
Simplified10.2%
Final simplification11.9%
NOTE: B should be positive before calling this function
(FPCore (A B C F)
:precision binary64
(let* ((t_0 (- (* B B) (* (* A C) 4.0))))
(if (<= C -3.3e+75)
(/ (- (sqrt (* -16.0 (* F (* C (* A A)))))) t_0)
(/ (- (sqrt (* (+ A (+ A C)) (* 2.0 (* F t_0))))) t_0))))B = abs(B);
double code(double A, double B, double C, double F) {
double t_0 = (B * B) - ((A * C) * 4.0);
double tmp;
if (C <= -3.3e+75) {
tmp = -sqrt((-16.0 * (F * (C * (A * A))))) / t_0;
} else {
tmp = -sqrt(((A + (A + C)) * (2.0 * (F * t_0)))) / t_0;
}
return tmp;
}
NOTE: B should be positive before calling this 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) :: tmp
t_0 = (b * b) - ((a * c) * 4.0d0)
if (c <= (-3.3d+75)) then
tmp = -sqrt(((-16.0d0) * (f * (c * (a * a))))) / t_0
else
tmp = -sqrt(((a + (a + c)) * (2.0d0 * (f * t_0)))) / t_0
end if
code = tmp
end function
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
double t_0 = (B * B) - ((A * C) * 4.0);
double tmp;
if (C <= -3.3e+75) {
tmp = -Math.sqrt((-16.0 * (F * (C * (A * A))))) / t_0;
} else {
tmp = -Math.sqrt(((A + (A + C)) * (2.0 * (F * t_0)))) / t_0;
}
return tmp;
}
B = abs(B) def code(A, B, C, F): t_0 = (B * B) - ((A * C) * 4.0) tmp = 0 if C <= -3.3e+75: tmp = -math.sqrt((-16.0 * (F * (C * (A * A))))) / t_0 else: tmp = -math.sqrt(((A + (A + C)) * (2.0 * (F * t_0)))) / t_0 return tmp
B = abs(B) function code(A, B, C, F) t_0 = Float64(Float64(B * B) - Float64(Float64(A * C) * 4.0)) tmp = 0.0 if (C <= -3.3e+75) tmp = Float64(Float64(-sqrt(Float64(-16.0 * Float64(F * Float64(C * Float64(A * A)))))) / t_0); else tmp = Float64(Float64(-sqrt(Float64(Float64(A + Float64(A + C)) * Float64(2.0 * Float64(F * t_0))))) / t_0); end return tmp end
B = abs(B) function tmp_2 = code(A, B, C, F) t_0 = (B * B) - ((A * C) * 4.0); tmp = 0.0; if (C <= -3.3e+75) tmp = -sqrt((-16.0 * (F * (C * (A * A))))) / t_0; else tmp = -sqrt(((A + (A + C)) * (2.0 * (F * t_0)))) / t_0; end tmp_2 = tmp; end
NOTE: B should be positive before calling this function
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(B * B), $MachinePrecision] - N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -3.3e+75], N[((-N[Sqrt[N[(-16.0 * N[(F * N[(C * N[(A * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[((-N[Sqrt[N[(N[(A + N[(A + C), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(F * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision]]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
t_0 := B \cdot B - \left(A \cdot C\right) \cdot 4\\
\mathbf{if}\;C \leq -3.3 \cdot 10^{+75}:\\
\;\;\;\;\frac{-\sqrt{-16 \cdot \left(F \cdot \left(C \cdot \left(A \cdot A\right)\right)\right)}}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{-\sqrt{\left(A + \left(A + C\right)\right) \cdot \left(2 \cdot \left(F \cdot t_0\right)\right)}}{t_0}\\
\end{array}
\end{array}
if C < -3.29999999999999998e75Initial program 1.2%
Simplified1.2%
Taylor expanded in A around inf 0.5%
Taylor expanded in A around inf 19.1%
associate-*r*20.0%
unpow220.0%
Simplified20.0%
if -3.29999999999999998e75 < C Initial program 19.8%
Simplified19.8%
Taylor expanded in A around inf 10.2%
Final simplification11.9%
NOTE: B should be positive before calling this function (FPCore (A B C F) :precision binary64 (if (<= C 3.55e-252) (/ (- (sqrt (* -16.0 (* F (* C (* A A)))))) (- (* B B) (* (* A C) 4.0))) (* (sqrt (* F C)) (/ (- 2.0) B))))
B = abs(B);
double code(double A, double B, double C, double F) {
double tmp;
if (C <= 3.55e-252) {
tmp = -sqrt((-16.0 * (F * (C * (A * A))))) / ((B * B) - ((A * C) * 4.0));
} else {
tmp = sqrt((F * C)) * (-2.0 / B);
}
return tmp;
}
NOTE: B should be positive before calling this 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) :: tmp
if (c <= 3.55d-252) then
tmp = -sqrt(((-16.0d0) * (f * (c * (a * a))))) / ((b * b) - ((a * c) * 4.0d0))
else
tmp = sqrt((f * c)) * (-2.0d0 / b)
end if
code = tmp
end function
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
double tmp;
if (C <= 3.55e-252) {
tmp = -Math.sqrt((-16.0 * (F * (C * (A * A))))) / ((B * B) - ((A * C) * 4.0));
} else {
tmp = Math.sqrt((F * C)) * (-2.0 / B);
}
return tmp;
}
B = abs(B) def code(A, B, C, F): tmp = 0 if C <= 3.55e-252: tmp = -math.sqrt((-16.0 * (F * (C * (A * A))))) / ((B * B) - ((A * C) * 4.0)) else: tmp = math.sqrt((F * C)) * (-2.0 / B) return tmp
B = abs(B) function code(A, B, C, F) tmp = 0.0 if (C <= 3.55e-252) tmp = Float64(Float64(-sqrt(Float64(-16.0 * Float64(F * Float64(C * Float64(A * A)))))) / Float64(Float64(B * B) - Float64(Float64(A * C) * 4.0))); else tmp = Float64(sqrt(Float64(F * C)) * Float64(Float64(-2.0) / B)); end return tmp end
B = abs(B) function tmp_2 = code(A, B, C, F) tmp = 0.0; if (C <= 3.55e-252) tmp = -sqrt((-16.0 * (F * (C * (A * A))))) / ((B * B) - ((A * C) * 4.0)); else tmp = sqrt((F * C)) * (-2.0 / B); end tmp_2 = tmp; end
NOTE: B should be positive before calling this function code[A_, B_, C_, F_] := If[LessEqual[C, 3.55e-252], N[((-N[Sqrt[N[(-16.0 * N[(F * N[(C * N[(A * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / N[(N[(B * B), $MachinePrecision] - N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(F * C), $MachinePrecision]], $MachinePrecision] * N[((-2.0) / B), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
\mathbf{if}\;C \leq 3.55 \cdot 10^{-252}:\\
\;\;\;\;\frac{-\sqrt{-16 \cdot \left(F \cdot \left(C \cdot \left(A \cdot A\right)\right)\right)}}{B \cdot B - \left(A \cdot C\right) \cdot 4}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{F \cdot C} \cdot \frac{-2}{B}\\
\end{array}
\end{array}
if C < 3.55e-252Initial program 14.3%
Simplified14.3%
Taylor expanded in A around inf 8.4%
Taylor expanded in A around inf 12.6%
associate-*r*13.7%
unpow213.7%
Simplified13.7%
if 3.55e-252 < C Initial program 18.3%
Simplified18.3%
Taylor expanded in A around 0 8.0%
mul-1-neg8.0%
distribute-rgt-neg-in8.0%
+-commutative8.0%
unpow28.0%
unpow28.0%
hypot-def17.8%
Simplified17.8%
Taylor expanded in B around 0 4.9%
mul-1-neg4.9%
unpow24.9%
rem-square-sqrt4.9%
Simplified4.9%
Final simplification9.1%
NOTE: B should be positive before calling this function (FPCore (A B C F) :precision binary64 (if (<= A 1.4e-223) (* (sqrt (* F C)) (/ (- 2.0) B)) (/ (* (pow (* F A) 0.5) (- 2.0)) B)))
B = abs(B);
double code(double A, double B, double C, double F) {
double tmp;
if (A <= 1.4e-223) {
tmp = sqrt((F * C)) * (-2.0 / B);
} else {
tmp = (pow((F * A), 0.5) * -2.0) / B;
}
return tmp;
}
NOTE: B should be positive before calling this 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) :: tmp
if (a <= 1.4d-223) then
tmp = sqrt((f * c)) * (-2.0d0 / b)
else
tmp = (((f * a) ** 0.5d0) * -2.0d0) / b
end if
code = tmp
end function
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
double tmp;
if (A <= 1.4e-223) {
tmp = Math.sqrt((F * C)) * (-2.0 / B);
} else {
tmp = (Math.pow((F * A), 0.5) * -2.0) / B;
}
return tmp;
}
B = abs(B) def code(A, B, C, F): tmp = 0 if A <= 1.4e-223: tmp = math.sqrt((F * C)) * (-2.0 / B) else: tmp = (math.pow((F * A), 0.5) * -2.0) / B return tmp
B = abs(B) function code(A, B, C, F) tmp = 0.0 if (A <= 1.4e-223) tmp = Float64(sqrt(Float64(F * C)) * Float64(Float64(-2.0) / B)); else tmp = Float64(Float64((Float64(F * A) ^ 0.5) * Float64(-2.0)) / B); end return tmp end
B = abs(B) function tmp_2 = code(A, B, C, F) tmp = 0.0; if (A <= 1.4e-223) tmp = sqrt((F * C)) * (-2.0 / B); else tmp = (((F * A) ^ 0.5) * -2.0) / B; end tmp_2 = tmp; end
NOTE: B should be positive before calling this function code[A_, B_, C_, F_] := If[LessEqual[A, 1.4e-223], N[(N[Sqrt[N[(F * C), $MachinePrecision]], $MachinePrecision] * N[((-2.0) / B), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[(F * A), $MachinePrecision], 0.5], $MachinePrecision] * (-2.0)), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
\mathbf{if}\;A \leq 1.4 \cdot 10^{-223}:\\
\;\;\;\;\sqrt{F \cdot C} \cdot \frac{-2}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(F \cdot A\right)}^{0.5} \cdot \left(-2\right)}{B}\\
\end{array}
\end{array}
if A < 1.40000000000000007e-223Initial program 13.3%
Simplified13.3%
Taylor expanded in A around 0 6.5%
mul-1-neg6.5%
distribute-rgt-neg-in6.5%
+-commutative6.5%
unpow26.5%
unpow26.5%
hypot-def17.7%
Simplified17.7%
Taylor expanded in B around 0 4.4%
mul-1-neg4.4%
unpow24.4%
rem-square-sqrt4.4%
Simplified4.4%
if 1.40000000000000007e-223 < A Initial program 20.6%
Simplified20.6%
Taylor expanded in A around inf 16.8%
Taylor expanded in C around 0 2.5%
mul-1-neg2.5%
associate-*r/2.5%
unpow22.5%
rem-square-sqrt2.5%
Simplified2.5%
pow1/22.7%
*-commutative2.7%
Applied egg-rr2.7%
Final simplification3.7%
NOTE: B should be positive before calling this function (FPCore (A B C F) :precision binary64 (if (<= A 1.35e-224) (* (sqrt (* F C)) (/ (- 2.0) B)) (/ (* 2.0 (- (sqrt (* F A)))) B)))
B = abs(B);
double code(double A, double B, double C, double F) {
double tmp;
if (A <= 1.35e-224) {
tmp = sqrt((F * C)) * (-2.0 / B);
} else {
tmp = (2.0 * -sqrt((F * A))) / B;
}
return tmp;
}
NOTE: B should be positive before calling this 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) :: tmp
if (a <= 1.35d-224) then
tmp = sqrt((f * c)) * (-2.0d0 / b)
else
tmp = (2.0d0 * -sqrt((f * a))) / b
end if
code = tmp
end function
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
double tmp;
if (A <= 1.35e-224) {
tmp = Math.sqrt((F * C)) * (-2.0 / B);
} else {
tmp = (2.0 * -Math.sqrt((F * A))) / B;
}
return tmp;
}
B = abs(B) def code(A, B, C, F): tmp = 0 if A <= 1.35e-224: tmp = math.sqrt((F * C)) * (-2.0 / B) else: tmp = (2.0 * -math.sqrt((F * A))) / B return tmp
B = abs(B) function code(A, B, C, F) tmp = 0.0 if (A <= 1.35e-224) tmp = Float64(sqrt(Float64(F * C)) * Float64(Float64(-2.0) / B)); else tmp = Float64(Float64(2.0 * Float64(-sqrt(Float64(F * A)))) / B); end return tmp end
B = abs(B) function tmp_2 = code(A, B, C, F) tmp = 0.0; if (A <= 1.35e-224) tmp = sqrt((F * C)) * (-2.0 / B); else tmp = (2.0 * -sqrt((F * A))) / B; end tmp_2 = tmp; end
NOTE: B should be positive before calling this function code[A_, B_, C_, F_] := If[LessEqual[A, 1.35e-224], N[(N[Sqrt[N[(F * C), $MachinePrecision]], $MachinePrecision] * N[((-2.0) / B), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * (-N[Sqrt[N[(F * A), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
B = |B|\\
\\
\begin{array}{l}
\mathbf{if}\;A \leq 1.35 \cdot 10^{-224}:\\
\;\;\;\;\sqrt{F \cdot C} \cdot \frac{-2}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot \left(-\sqrt{F \cdot A}\right)}{B}\\
\end{array}
\end{array}
if A < 1.34999999999999999e-224Initial program 13.3%
Simplified13.3%
Taylor expanded in A around 0 6.5%
mul-1-neg6.5%
distribute-rgt-neg-in6.5%
+-commutative6.5%
unpow26.5%
unpow26.5%
hypot-def17.7%
Simplified17.7%
Taylor expanded in B around 0 4.4%
mul-1-neg4.4%
unpow24.4%
rem-square-sqrt4.4%
Simplified4.4%
if 1.34999999999999999e-224 < A Initial program 20.6%
Simplified20.6%
Taylor expanded in A around inf 16.8%
Taylor expanded in C around 0 2.5%
mul-1-neg2.5%
associate-*r/2.5%
unpow22.5%
rem-square-sqrt2.5%
Simplified2.5%
Final simplification3.6%
NOTE: B should be positive before calling this function (FPCore (A B C F) :precision binary64 (* (sqrt (* F C)) (/ (- 2.0) B)))
B = abs(B);
double code(double A, double B, double C, double F) {
return sqrt((F * C)) * (-2.0 / B);
}
NOTE: B should be positive before calling this 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
code = sqrt((f * c)) * (-2.0d0 / b)
end function
B = Math.abs(B);
public static double code(double A, double B, double C, double F) {
return Math.sqrt((F * C)) * (-2.0 / B);
}
B = abs(B) def code(A, B, C, F): return math.sqrt((F * C)) * (-2.0 / B)
B = abs(B) function code(A, B, C, F) return Float64(sqrt(Float64(F * C)) * Float64(Float64(-2.0) / B)) end
B = abs(B) function tmp = code(A, B, C, F) tmp = sqrt((F * C)) * (-2.0 / B); end
NOTE: B should be positive before calling this function code[A_, B_, C_, F_] := N[(N[Sqrt[N[(F * C), $MachinePrecision]], $MachinePrecision] * N[((-2.0) / B), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B = |B|\\
\\
\sqrt{F \cdot C} \cdot \frac{-2}{B}
\end{array}
Initial program 16.4%
Simplified16.4%
Taylor expanded in A around 0 6.4%
mul-1-neg6.4%
distribute-rgt-neg-in6.4%
+-commutative6.4%
unpow26.4%
unpow26.4%
hypot-def14.6%
Simplified14.6%
Taylor expanded in B around 0 2.8%
mul-1-neg2.8%
unpow22.8%
rem-square-sqrt2.9%
Simplified2.9%
Final simplification2.9%
herbie shell --seed 2023287
(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))))