
(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 14 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}
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= (pow B_m 2.0) 1e+102)
(/
(*
(sqrt (* 2.0 (* (fma B_m B_m (* C (* A -4.0))) F)))
(- (sqrt (+ A (+ C (hypot (- A C) B_m))))))
(fma B_m B_m (* A (* C -4.0))))
(* (* (sqrt (+ C (hypot B_m C))) (sqrt F)) (/ (- (sqrt 2.0)) B_m))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (pow(B_m, 2.0) <= 1e+102) {
tmp = (sqrt((2.0 * (fma(B_m, B_m, (C * (A * -4.0))) * F))) * -sqrt((A + (C + hypot((A - C), B_m))))) / fma(B_m, B_m, (A * (C * -4.0)));
} else {
tmp = (sqrt((C + hypot(B_m, C))) * sqrt(F)) * (-sqrt(2.0) / B_m);
}
return tmp;
}
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if ((B_m ^ 2.0) <= 1e+102) tmp = Float64(Float64(sqrt(Float64(2.0 * Float64(fma(B_m, B_m, Float64(C * Float64(A * -4.0))) * F))) * Float64(-sqrt(Float64(A + Float64(C + hypot(Float64(A - C), B_m)))))) / fma(B_m, B_m, Float64(A * Float64(C * -4.0)))); else tmp = Float64(Float64(sqrt(Float64(C + hypot(B_m, C))) * sqrt(F)) * Float64(Float64(-sqrt(2.0)) / B_m)); end return tmp end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[N[Power[B$95$m, 2.0], $MachinePrecision], 1e+102], N[(N[(N[Sqrt[N[(2.0 * N[(N[(B$95$m * B$95$m + N[(C * N[(A * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[N[(A + N[(C + N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / N[(B$95$m * B$95$m + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(C + N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[F], $MachinePrecision]), $MachinePrecision] * N[((-N[Sqrt[2.0], $MachinePrecision]) / B$95$m), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;{B_m}^{2} \leq 10^{+102}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(\mathsf{fma}\left(B_m, B_m, C \cdot \left(A \cdot -4\right)\right) \cdot F\right)} \cdot \left(-\sqrt{A + \left(C + \mathsf{hypot}\left(A - C, B_m\right)\right)}\right)}{\mathsf{fma}\left(B_m, B_m, A \cdot \left(C \cdot -4\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt{C + \mathsf{hypot}\left(B_m, C\right)} \cdot \sqrt{F}\right) \cdot \frac{-\sqrt{2}}{B_m}\\
\end{array}
\end{array}
if (pow.f64 B 2) < 9.99999999999999977e101Initial program 22.8%
neg-sub022.8%
div-sub22.8%
associate-*l*22.8%
Applied egg-rr34.5%
div034.5%
neg-sub034.5%
distribute-neg-frac34.5%
Simplified34.0%
pow1/234.0%
associate-*r*34.5%
associate-+r+32.9%
+-commutative32.9%
unpow-prod-down42.7%
associate-*r*42.7%
*-commutative42.7%
associate-*l*42.7%
pow1/242.7%
+-commutative42.7%
associate-+r+43.5%
Applied egg-rr43.5%
unpow1/243.5%
associate-*l*43.5%
Simplified43.5%
if 9.99999999999999977e101 < (pow.f64 B 2) Initial program 8.2%
Taylor expanded in A around 0 7.7%
mul-1-neg7.7%
*-commutative7.7%
distribute-rgt-neg-in7.7%
unpow27.7%
unpow27.7%
hypot-def26.6%
Simplified26.6%
pow1/226.6%
*-commutative26.6%
unpow-prod-down36.0%
pow1/236.0%
pow1/236.0%
Applied egg-rr36.0%
Final simplification40.1%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (fma B_m B_m (* A (* C -4.0)))))
(if (<= (pow B_m 2.0) 1e+84)
(- (/ (sqrt (* (* 2.0 t_0) (* F (+ A (+ C (hypot (- A C) B_m)))))) t_0))
(* (* (sqrt (+ C (hypot B_m C))) (sqrt F)) (/ (- (sqrt 2.0)) B_m)))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = fma(B_m, B_m, (A * (C * -4.0)));
double tmp;
if (pow(B_m, 2.0) <= 1e+84) {
tmp = -(sqrt(((2.0 * t_0) * (F * (A + (C + hypot((A - C), B_m)))))) / t_0);
} else {
tmp = (sqrt((C + hypot(B_m, C))) * sqrt(F)) * (-sqrt(2.0) / B_m);
}
return tmp;
}
B_m = abs(B) function code(A, B_m, C, F) t_0 = fma(B_m, B_m, Float64(A * Float64(C * -4.0))) tmp = 0.0 if ((B_m ^ 2.0) <= 1e+84) tmp = Float64(-Float64(sqrt(Float64(Float64(2.0 * t_0) * Float64(F * Float64(A + Float64(C + hypot(Float64(A - C), B_m)))))) / t_0)); else tmp = Float64(Float64(sqrt(Float64(C + hypot(B_m, C))) * sqrt(F)) * Float64(Float64(-sqrt(2.0)) / B_m)); end return tmp end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(B$95$m * B$95$m + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Power[B$95$m, 2.0], $MachinePrecision], 1e+84], (-N[(N[Sqrt[N[(N[(2.0 * t$95$0), $MachinePrecision] * N[(F * N[(A + N[(C + N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision]), N[(N[(N[Sqrt[N[(C + N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[F], $MachinePrecision]), $MachinePrecision] * N[((-N[Sqrt[2.0], $MachinePrecision]) / B$95$m), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(B_m, B_m, A \cdot \left(C \cdot -4\right)\right)\\
\mathbf{if}\;{B_m}^{2} \leq 10^{+84}:\\
\;\;\;\;-\frac{\sqrt{\left(2 \cdot t_0\right) \cdot \left(F \cdot \left(A + \left(C + \mathsf{hypot}\left(A - C, B_m\right)\right)\right)\right)}}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt{C + \mathsf{hypot}\left(B_m, C\right)} \cdot \sqrt{F}\right) \cdot \frac{-\sqrt{2}}{B_m}\\
\end{array}
\end{array}
if (pow.f64 B 2) < 1.00000000000000006e84Initial program 23.1%
neg-sub023.1%
div-sub23.1%
associate-*l*23.1%
Applied egg-rr35.0%
div035.0%
neg-sub035.0%
distribute-neg-frac35.0%
Simplified34.4%
if 1.00000000000000006e84 < (pow.f64 B 2) Initial program 8.1%
Taylor expanded in A around 0 7.6%
mul-1-neg7.6%
*-commutative7.6%
distribute-rgt-neg-in7.6%
unpow27.6%
unpow27.6%
hypot-def26.2%
Simplified26.2%
pow1/226.2%
*-commutative26.2%
unpow-prod-down35.4%
pow1/235.4%
pow1/235.4%
Applied egg-rr35.4%
Final simplification34.9%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (fma B_m B_m (* A (* C -4.0)))))
(if (<= (pow B_m 2.0) 1e+84)
(/ (- (sqrt (* (* t_0 (* 2.0 F)) (+ A (+ C (hypot B_m (- A C))))))) t_0)
(* (* (sqrt (+ C (hypot B_m C))) (sqrt F)) (/ (- (sqrt 2.0)) B_m)))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = fma(B_m, B_m, (A * (C * -4.0)));
double tmp;
if (pow(B_m, 2.0) <= 1e+84) {
tmp = -sqrt(((t_0 * (2.0 * F)) * (A + (C + hypot(B_m, (A - C)))))) / t_0;
} else {
tmp = (sqrt((C + hypot(B_m, C))) * sqrt(F)) * (-sqrt(2.0) / B_m);
}
return tmp;
}
B_m = abs(B) function code(A, B_m, C, F) t_0 = fma(B_m, B_m, Float64(A * Float64(C * -4.0))) tmp = 0.0 if ((B_m ^ 2.0) <= 1e+84) tmp = Float64(Float64(-sqrt(Float64(Float64(t_0 * Float64(2.0 * F)) * Float64(A + Float64(C + hypot(B_m, Float64(A - C))))))) / t_0); else tmp = Float64(Float64(sqrt(Float64(C + hypot(B_m, C))) * sqrt(F)) * Float64(Float64(-sqrt(2.0)) / B_m)); end return tmp end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(B$95$m * B$95$m + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Power[B$95$m, 2.0], $MachinePrecision], 1e+84], N[((-N[Sqrt[N[(N[(t$95$0 * N[(2.0 * F), $MachinePrecision]), $MachinePrecision] * N[(A + N[(C + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[(N[(N[Sqrt[N[(C + N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[F], $MachinePrecision]), $MachinePrecision] * N[((-N[Sqrt[2.0], $MachinePrecision]) / B$95$m), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(B_m, B_m, A \cdot \left(C \cdot -4\right)\right)\\
\mathbf{if}\;{B_m}^{2} \leq 10^{+84}:\\
\;\;\;\;\frac{-\sqrt{\left(t_0 \cdot \left(2 \cdot F\right)\right) \cdot \left(A + \left(C + \mathsf{hypot}\left(B_m, A - C\right)\right)\right)}}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt{C + \mathsf{hypot}\left(B_m, C\right)} \cdot \sqrt{F}\right) \cdot \frac{-\sqrt{2}}{B_m}\\
\end{array}
\end{array}
if (pow.f64 B 2) < 1.00000000000000006e84Initial program 23.1%
Simplified35.0%
if 1.00000000000000006e84 < (pow.f64 B 2) Initial program 8.1%
Taylor expanded in A around 0 7.6%
mul-1-neg7.6%
*-commutative7.6%
distribute-rgt-neg-in7.6%
unpow27.6%
unpow27.6%
hypot-def26.2%
Simplified26.2%
pow1/226.2%
*-commutative26.2%
unpow-prod-down35.4%
pow1/235.4%
pow1/235.4%
Applied egg-rr35.4%
Final simplification35.2%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (/ (- (sqrt 2.0)) B_m))
(t_1 (+ C (hypot B_m C)))
(t_2 (fma B_m B_m (* A (* C -4.0))))
(t_3 (- (pow B_m 2.0) (* C (* A 4.0)))))
(if (<= B_m 3.8e-264)
(sqrt (/ (- F) A))
(if (<= B_m 1.2e-66)
(/ (- (sqrt (* (* t_2 (* 2.0 F)) (+ A A)))) t_2)
(if (<= B_m 3.1e+33)
(/ (- (sqrt (* t_1 (* 2.0 (* F t_3))))) t_3)
(if (<= B_m 1.6e+79)
(* t_0 (sqrt (* F (+ A (hypot B_m A)))))
(* (* (sqrt t_1) (sqrt F)) t_0)))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = -sqrt(2.0) / B_m;
double t_1 = C + hypot(B_m, C);
double t_2 = fma(B_m, B_m, (A * (C * -4.0)));
double t_3 = pow(B_m, 2.0) - (C * (A * 4.0));
double tmp;
if (B_m <= 3.8e-264) {
tmp = sqrt((-F / A));
} else if (B_m <= 1.2e-66) {
tmp = -sqrt(((t_2 * (2.0 * F)) * (A + A))) / t_2;
} else if (B_m <= 3.1e+33) {
tmp = -sqrt((t_1 * (2.0 * (F * t_3)))) / t_3;
} else if (B_m <= 1.6e+79) {
tmp = t_0 * sqrt((F * (A + hypot(B_m, A))));
} else {
tmp = (sqrt(t_1) * sqrt(F)) * t_0;
}
return tmp;
}
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(Float64(-sqrt(2.0)) / B_m) t_1 = Float64(C + hypot(B_m, C)) t_2 = fma(B_m, B_m, Float64(A * Float64(C * -4.0))) t_3 = Float64((B_m ^ 2.0) - Float64(C * Float64(A * 4.0))) tmp = 0.0 if (B_m <= 3.8e-264) tmp = sqrt(Float64(Float64(-F) / A)); elseif (B_m <= 1.2e-66) tmp = Float64(Float64(-sqrt(Float64(Float64(t_2 * Float64(2.0 * F)) * Float64(A + A)))) / t_2); elseif (B_m <= 3.1e+33) tmp = Float64(Float64(-sqrt(Float64(t_1 * Float64(2.0 * Float64(F * t_3))))) / t_3); elseif (B_m <= 1.6e+79) tmp = Float64(t_0 * sqrt(Float64(F * Float64(A + hypot(B_m, A))))); else tmp = Float64(Float64(sqrt(t_1) * sqrt(F)) * t_0); end return tmp end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[((-N[Sqrt[2.0], $MachinePrecision]) / B$95$m), $MachinePrecision]}, Block[{t$95$1 = N[(C + N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(B$95$m * B$95$m + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Power[B$95$m, 2.0], $MachinePrecision] - N[(C * N[(A * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 3.8e-264], N[Sqrt[N[((-F) / A), $MachinePrecision]], $MachinePrecision], If[LessEqual[B$95$m, 1.2e-66], N[((-N[Sqrt[N[(N[(t$95$2 * N[(2.0 * F), $MachinePrecision]), $MachinePrecision] * N[(A + A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$2), $MachinePrecision], If[LessEqual[B$95$m, 3.1e+33], N[((-N[Sqrt[N[(t$95$1 * N[(2.0 * N[(F * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$3), $MachinePrecision], If[LessEqual[B$95$m, 1.6e+79], N[(t$95$0 * N[Sqrt[N[(F * N[(A + N[Sqrt[B$95$m ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[t$95$1], $MachinePrecision] * N[Sqrt[F], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]]]]]]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := \frac{-\sqrt{2}}{B_m}\\
t_1 := C + \mathsf{hypot}\left(B_m, C\right)\\
t_2 := \mathsf{fma}\left(B_m, B_m, A \cdot \left(C \cdot -4\right)\right)\\
t_3 := {B_m}^{2} - C \cdot \left(A \cdot 4\right)\\
\mathbf{if}\;B_m \leq 3.8 \cdot 10^{-264}:\\
\;\;\;\;\sqrt{\frac{-F}{A}}\\
\mathbf{elif}\;B_m \leq 1.2 \cdot 10^{-66}:\\
\;\;\;\;\frac{-\sqrt{\left(t_2 \cdot \left(2 \cdot F\right)\right) \cdot \left(A + A\right)}}{t_2}\\
\mathbf{elif}\;B_m \leq 3.1 \cdot 10^{+33}:\\
\;\;\;\;\frac{-\sqrt{t_1 \cdot \left(2 \cdot \left(F \cdot t_3\right)\right)}}{t_3}\\
\mathbf{elif}\;B_m \leq 1.6 \cdot 10^{+79}:\\
\;\;\;\;t_0 \cdot \sqrt{F \cdot \left(A + \mathsf{hypot}\left(B_m, A\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt{t_1} \cdot \sqrt{F}\right) \cdot t_0\\
\end{array}
\end{array}
if B < 3.80000000000000013e-264Initial program 12.6%
add-sqr-sqrt2.0%
sqrt-unprod1.7%
frac-times1.3%
Applied egg-rr2.7%
associate-/l*4.1%
associate-*l*4.1%
*-commutative4.1%
unpow24.1%
fma-neg4.1%
distribute-lft-neg-in4.1%
metadata-eval4.1%
*-commutative4.1%
*-commutative4.1%
Simplified3.9%
Taylor expanded in C around inf 12.9%
mul-1-neg12.9%
Simplified12.9%
if 3.80000000000000013e-264 < B < 1.20000000000000013e-66Initial program 23.1%
Simplified33.2%
Taylor expanded in A around inf 38.8%
distribute-rgt1-in38.8%
metadata-eval38.8%
mul0-lft38.8%
Simplified38.8%
if 1.20000000000000013e-66 < B < 3.1e33Initial program 39.6%
Taylor expanded in A around 0 39.9%
unpow239.9%
unpow239.9%
hypot-def43.6%
Simplified43.6%
if 3.1e33 < B < 1.60000000000000001e79Initial program 17.2%
Taylor expanded in C around 0 58.5%
mul-1-neg58.5%
distribute-rgt-neg-in58.5%
+-commutative58.5%
unpow258.5%
unpow258.5%
hypot-def72.3%
Simplified72.3%
if 1.60000000000000001e79 < B Initial program 8.2%
Taylor expanded in A around 0 8.5%
mul-1-neg8.5%
*-commutative8.5%
distribute-rgt-neg-in8.5%
unpow28.5%
unpow28.5%
hypot-def49.7%
Simplified49.7%
pow1/249.7%
*-commutative49.7%
unpow-prod-down70.9%
pow1/270.9%
pow1/270.9%
Applied egg-rr70.9%
Final simplification32.7%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (fma B_m B_m (* A (* C -4.0)))))
(if (<= B_m 5e-264)
(sqrt (/ (- F) A))
(if (<= B_m 8.5e-66)
(/ (- (sqrt (* (* t_0 (* 2.0 F)) (+ A A)))) t_0)
(* (* (sqrt (+ C (hypot B_m C))) (sqrt F)) (/ (- (sqrt 2.0)) B_m))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = fma(B_m, B_m, (A * (C * -4.0)));
double tmp;
if (B_m <= 5e-264) {
tmp = sqrt((-F / A));
} else if (B_m <= 8.5e-66) {
tmp = -sqrt(((t_0 * (2.0 * F)) * (A + A))) / t_0;
} else {
tmp = (sqrt((C + hypot(B_m, C))) * sqrt(F)) * (-sqrt(2.0) / B_m);
}
return tmp;
}
B_m = abs(B) function code(A, B_m, C, F) t_0 = fma(B_m, B_m, Float64(A * Float64(C * -4.0))) tmp = 0.0 if (B_m <= 5e-264) tmp = sqrt(Float64(Float64(-F) / A)); elseif (B_m <= 8.5e-66) tmp = Float64(Float64(-sqrt(Float64(Float64(t_0 * Float64(2.0 * F)) * Float64(A + A)))) / t_0); else tmp = Float64(Float64(sqrt(Float64(C + hypot(B_m, C))) * sqrt(F)) * Float64(Float64(-sqrt(2.0)) / B_m)); end return tmp end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(B$95$m * B$95$m + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 5e-264], N[Sqrt[N[((-F) / A), $MachinePrecision]], $MachinePrecision], If[LessEqual[B$95$m, 8.5e-66], N[((-N[Sqrt[N[(N[(t$95$0 * N[(2.0 * F), $MachinePrecision]), $MachinePrecision] * N[(A + A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[(N[(N[Sqrt[N[(C + N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[F], $MachinePrecision]), $MachinePrecision] * N[((-N[Sqrt[2.0], $MachinePrecision]) / B$95$m), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(B_m, B_m, A \cdot \left(C \cdot -4\right)\right)\\
\mathbf{if}\;B_m \leq 5 \cdot 10^{-264}:\\
\;\;\;\;\sqrt{\frac{-F}{A}}\\
\mathbf{elif}\;B_m \leq 8.5 \cdot 10^{-66}:\\
\;\;\;\;\frac{-\sqrt{\left(t_0 \cdot \left(2 \cdot F\right)\right) \cdot \left(A + A\right)}}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt{C + \mathsf{hypot}\left(B_m, C\right)} \cdot \sqrt{F}\right) \cdot \frac{-\sqrt{2}}{B_m}\\
\end{array}
\end{array}
if B < 5.0000000000000001e-264Initial program 12.6%
add-sqr-sqrt2.0%
sqrt-unprod1.7%
frac-times1.3%
Applied egg-rr2.7%
associate-/l*4.1%
associate-*l*4.1%
*-commutative4.1%
unpow24.1%
fma-neg4.1%
distribute-lft-neg-in4.1%
metadata-eval4.1%
*-commutative4.1%
*-commutative4.1%
Simplified3.9%
Taylor expanded in C around inf 12.9%
mul-1-neg12.9%
Simplified12.9%
if 5.0000000000000001e-264 < B < 8.49999999999999966e-66Initial program 23.1%
Simplified33.2%
Taylor expanded in A around inf 38.8%
distribute-rgt1-in38.8%
metadata-eval38.8%
mul0-lft38.8%
Simplified38.8%
if 8.49999999999999966e-66 < B Initial program 19.1%
Taylor expanded in A around 0 21.9%
mul-1-neg21.9%
*-commutative21.9%
distribute-rgt-neg-in21.9%
unpow221.9%
unpow221.9%
hypot-def46.5%
Simplified46.5%
pow1/246.5%
*-commutative46.5%
unpow-prod-down59.0%
pow1/259.0%
pow1/259.0%
Applied egg-rr59.0%
Final simplification31.6%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (fma B_m B_m (* C (* A -4.0)))))
(if (<= B_m 7.4e-264)
(sqrt (/ (- F) A))
(if (<= B_m 9.2e-67)
(/ 1.0 (/ t_0 (- (sqrt (* 2.0 (* t_0 (* F (* 2.0 A))))))))
(* (/ (- (sqrt 2.0)) B_m) (* (sqrt F) (sqrt B_m)))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = fma(B_m, B_m, (C * (A * -4.0)));
double tmp;
if (B_m <= 7.4e-264) {
tmp = sqrt((-F / A));
} else if (B_m <= 9.2e-67) {
tmp = 1.0 / (t_0 / -sqrt((2.0 * (t_0 * (F * (2.0 * A))))));
} else {
tmp = (-sqrt(2.0) / B_m) * (sqrt(F) * sqrt(B_m));
}
return tmp;
}
B_m = abs(B) function code(A, B_m, C, F) t_0 = fma(B_m, B_m, Float64(C * Float64(A * -4.0))) tmp = 0.0 if (B_m <= 7.4e-264) tmp = sqrt(Float64(Float64(-F) / A)); elseif (B_m <= 9.2e-67) tmp = Float64(1.0 / Float64(t_0 / Float64(-sqrt(Float64(2.0 * Float64(t_0 * Float64(F * Float64(2.0 * A)))))))); else tmp = Float64(Float64(Float64(-sqrt(2.0)) / B_m) * Float64(sqrt(F) * sqrt(B_m))); end return tmp end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(B$95$m * B$95$m + N[(C * N[(A * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 7.4e-264], N[Sqrt[N[((-F) / A), $MachinePrecision]], $MachinePrecision], If[LessEqual[B$95$m, 9.2e-67], N[(1.0 / N[(t$95$0 / (-N[Sqrt[N[(2.0 * N[(t$95$0 * N[(F * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], N[(N[((-N[Sqrt[2.0], $MachinePrecision]) / B$95$m), $MachinePrecision] * N[(N[Sqrt[F], $MachinePrecision] * N[Sqrt[B$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(B_m, B_m, C \cdot \left(A \cdot -4\right)\right)\\
\mathbf{if}\;B_m \leq 7.4 \cdot 10^{-264}:\\
\;\;\;\;\sqrt{\frac{-F}{A}}\\
\mathbf{elif}\;B_m \leq 9.2 \cdot 10^{-67}:\\
\;\;\;\;\frac{1}{\frac{t_0}{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-\sqrt{2}}{B_m} \cdot \left(\sqrt{F} \cdot \sqrt{B_m}\right)\\
\end{array}
\end{array}
if B < 7.39999999999999991e-264Initial program 12.6%
add-sqr-sqrt2.0%
sqrt-unprod1.7%
frac-times1.3%
Applied egg-rr2.7%
associate-/l*4.1%
associate-*l*4.1%
*-commutative4.1%
unpow24.1%
fma-neg4.1%
distribute-lft-neg-in4.1%
metadata-eval4.1%
*-commutative4.1%
*-commutative4.1%
Simplified3.9%
Taylor expanded in C around inf 12.9%
mul-1-neg12.9%
Simplified12.9%
if 7.39999999999999991e-264 < B < 9.2000000000000002e-67Initial program 23.1%
neg-sub023.1%
div-sub23.1%
associate-*l*23.1%
Applied egg-rr33.2%
div033.2%
neg-sub033.2%
distribute-neg-frac33.2%
Simplified33.2%
clear-num33.1%
inv-pow33.1%
Applied egg-rr33.1%
unpow-133.1%
Simplified33.1%
Taylor expanded in A around inf 38.8%
if 9.2000000000000002e-67 < B Initial program 19.1%
Taylor expanded in A around 0 21.9%
mul-1-neg21.9%
*-commutative21.9%
distribute-rgt-neg-in21.9%
unpow221.9%
unpow221.9%
hypot-def46.5%
Simplified46.5%
pow1/246.5%
*-commutative46.5%
unpow-prod-down59.0%
pow1/259.0%
pow1/259.0%
Applied egg-rr59.0%
Taylor expanded in C around 0 53.8%
Final simplification29.9%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (fma B_m B_m (* A (* C -4.0)))))
(if (<= B_m 1.08e-262)
(sqrt (/ (- F) A))
(if (<= B_m 8.2e-66)
(/ (- (sqrt (* (* 2.0 t_0) (* F (* 2.0 A))))) t_0)
(* (/ (- (sqrt 2.0)) B_m) (* (sqrt F) (sqrt B_m)))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = fma(B_m, B_m, (A * (C * -4.0)));
double tmp;
if (B_m <= 1.08e-262) {
tmp = sqrt((-F / A));
} else if (B_m <= 8.2e-66) {
tmp = -sqrt(((2.0 * t_0) * (F * (2.0 * A)))) / t_0;
} else {
tmp = (-sqrt(2.0) / B_m) * (sqrt(F) * sqrt(B_m));
}
return tmp;
}
B_m = abs(B) function code(A, B_m, C, F) t_0 = fma(B_m, B_m, Float64(A * Float64(C * -4.0))) tmp = 0.0 if (B_m <= 1.08e-262) tmp = sqrt(Float64(Float64(-F) / A)); elseif (B_m <= 8.2e-66) tmp = Float64(Float64(-sqrt(Float64(Float64(2.0 * t_0) * Float64(F * Float64(2.0 * A))))) / t_0); else tmp = Float64(Float64(Float64(-sqrt(2.0)) / B_m) * Float64(sqrt(F) * sqrt(B_m))); end return tmp end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(B$95$m * B$95$m + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 1.08e-262], N[Sqrt[N[((-F) / A), $MachinePrecision]], $MachinePrecision], If[LessEqual[B$95$m, 8.2e-66], N[((-N[Sqrt[N[(N[(2.0 * t$95$0), $MachinePrecision] * N[(F * N[(2.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[(N[((-N[Sqrt[2.0], $MachinePrecision]) / B$95$m), $MachinePrecision] * N[(N[Sqrt[F], $MachinePrecision] * N[Sqrt[B$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(B_m, B_m, A \cdot \left(C \cdot -4\right)\right)\\
\mathbf{if}\;B_m \leq 1.08 \cdot 10^{-262}:\\
\;\;\;\;\sqrt{\frac{-F}{A}}\\
\mathbf{elif}\;B_m \leq 8.2 \cdot 10^{-66}:\\
\;\;\;\;\frac{-\sqrt{\left(2 \cdot t_0\right) \cdot \left(F \cdot \left(2 \cdot A\right)\right)}}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{-\sqrt{2}}{B_m} \cdot \left(\sqrt{F} \cdot \sqrt{B_m}\right)\\
\end{array}
\end{array}
if B < 1.08000000000000001e-262Initial program 12.6%
add-sqr-sqrt2.0%
sqrt-unprod1.7%
frac-times1.3%
Applied egg-rr2.7%
associate-/l*4.1%
associate-*l*4.1%
*-commutative4.1%
unpow24.1%
fma-neg4.1%
distribute-lft-neg-in4.1%
metadata-eval4.1%
*-commutative4.1%
*-commutative4.1%
Simplified3.9%
Taylor expanded in C around inf 12.9%
mul-1-neg12.9%
Simplified12.9%
if 1.08000000000000001e-262 < B < 8.19999999999999996e-66Initial program 23.1%
neg-sub023.1%
div-sub23.1%
associate-*l*23.1%
Applied egg-rr33.2%
div033.2%
neg-sub033.2%
distribute-neg-frac33.2%
Simplified33.2%
Taylor expanded in A around inf 38.8%
if 8.19999999999999996e-66 < B Initial program 19.1%
Taylor expanded in A around 0 21.9%
mul-1-neg21.9%
*-commutative21.9%
distribute-rgt-neg-in21.9%
unpow221.9%
unpow221.9%
hypot-def46.5%
Simplified46.5%
pow1/246.5%
*-commutative46.5%
unpow-prod-down59.0%
pow1/259.0%
pow1/259.0%
Applied egg-rr59.0%
Taylor expanded in C around 0 53.8%
Final simplification29.9%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (fma B_m B_m (* A (* C -4.0)))))
(if (<= B_m 3.8e-264)
(sqrt (/ (- F) A))
(if (<= B_m 3.5e-66)
(/ (- (sqrt (* (* t_0 (* 2.0 F)) (+ A A)))) t_0)
(* (/ (- (sqrt 2.0)) B_m) (* (sqrt F) (sqrt B_m)))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = fma(B_m, B_m, (A * (C * -4.0)));
double tmp;
if (B_m <= 3.8e-264) {
tmp = sqrt((-F / A));
} else if (B_m <= 3.5e-66) {
tmp = -sqrt(((t_0 * (2.0 * F)) * (A + A))) / t_0;
} else {
tmp = (-sqrt(2.0) / B_m) * (sqrt(F) * sqrt(B_m));
}
return tmp;
}
B_m = abs(B) function code(A, B_m, C, F) t_0 = fma(B_m, B_m, Float64(A * Float64(C * -4.0))) tmp = 0.0 if (B_m <= 3.8e-264) tmp = sqrt(Float64(Float64(-F) / A)); elseif (B_m <= 3.5e-66) tmp = Float64(Float64(-sqrt(Float64(Float64(t_0 * Float64(2.0 * F)) * Float64(A + A)))) / t_0); else tmp = Float64(Float64(Float64(-sqrt(2.0)) / B_m) * Float64(sqrt(F) * sqrt(B_m))); end return tmp end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(B$95$m * B$95$m + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 3.8e-264], N[Sqrt[N[((-F) / A), $MachinePrecision]], $MachinePrecision], If[LessEqual[B$95$m, 3.5e-66], N[((-N[Sqrt[N[(N[(t$95$0 * N[(2.0 * F), $MachinePrecision]), $MachinePrecision] * N[(A + A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], N[(N[((-N[Sqrt[2.0], $MachinePrecision]) / B$95$m), $MachinePrecision] * N[(N[Sqrt[F], $MachinePrecision] * N[Sqrt[B$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(B_m, B_m, A \cdot \left(C \cdot -4\right)\right)\\
\mathbf{if}\;B_m \leq 3.8 \cdot 10^{-264}:\\
\;\;\;\;\sqrt{\frac{-F}{A}}\\
\mathbf{elif}\;B_m \leq 3.5 \cdot 10^{-66}:\\
\;\;\;\;\frac{-\sqrt{\left(t_0 \cdot \left(2 \cdot F\right)\right) \cdot \left(A + A\right)}}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{-\sqrt{2}}{B_m} \cdot \left(\sqrt{F} \cdot \sqrt{B_m}\right)\\
\end{array}
\end{array}
if B < 3.80000000000000013e-264Initial program 12.6%
add-sqr-sqrt2.0%
sqrt-unprod1.7%
frac-times1.3%
Applied egg-rr2.7%
associate-/l*4.1%
associate-*l*4.1%
*-commutative4.1%
unpow24.1%
fma-neg4.1%
distribute-lft-neg-in4.1%
metadata-eval4.1%
*-commutative4.1%
*-commutative4.1%
Simplified3.9%
Taylor expanded in C around inf 12.9%
mul-1-neg12.9%
Simplified12.9%
if 3.80000000000000013e-264 < B < 3.5e-66Initial program 23.1%
Simplified33.2%
Taylor expanded in A around inf 38.8%
distribute-rgt1-in38.8%
metadata-eval38.8%
mul0-lft38.8%
Simplified38.8%
if 3.5e-66 < B Initial program 19.1%
Taylor expanded in A around 0 21.9%
mul-1-neg21.9%
*-commutative21.9%
distribute-rgt-neg-in21.9%
unpow221.9%
unpow221.9%
hypot-def46.5%
Simplified46.5%
pow1/246.5%
*-commutative46.5%
unpow-prod-down59.0%
pow1/259.0%
pow1/259.0%
Applied egg-rr59.0%
Taylor expanded in C around 0 53.8%
Final simplification29.9%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (/ (sqrt 2.0) B_m)))
(if (<= F -2e-310)
(sqrt (/ (- F) A))
(if (<= F 2.6e+39)
(* t_0 (- (sqrt (* F (+ C (hypot B_m C))))))
(* t_0 (* (sqrt F) (- (sqrt (+ B_m C)))))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = sqrt(2.0) / B_m;
double tmp;
if (F <= -2e-310) {
tmp = sqrt((-F / A));
} else if (F <= 2.6e+39) {
tmp = t_0 * -sqrt((F * (C + hypot(B_m, C))));
} else {
tmp = t_0 * (sqrt(F) * -sqrt((B_m + C)));
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = Math.sqrt(2.0) / B_m;
double tmp;
if (F <= -2e-310) {
tmp = Math.sqrt((-F / A));
} else if (F <= 2.6e+39) {
tmp = t_0 * -Math.sqrt((F * (C + Math.hypot(B_m, C))));
} else {
tmp = t_0 * (Math.sqrt(F) * -Math.sqrt((B_m + C)));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = math.sqrt(2.0) / B_m tmp = 0 if F <= -2e-310: tmp = math.sqrt((-F / A)) elif F <= 2.6e+39: tmp = t_0 * -math.sqrt((F * (C + math.hypot(B_m, C)))) else: tmp = t_0 * (math.sqrt(F) * -math.sqrt((B_m + C))) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(sqrt(2.0) / B_m) tmp = 0.0 if (F <= -2e-310) tmp = sqrt(Float64(Float64(-F) / A)); elseif (F <= 2.6e+39) tmp = Float64(t_0 * Float64(-sqrt(Float64(F * Float64(C + hypot(B_m, C)))))); else tmp = Float64(t_0 * Float64(sqrt(F) * Float64(-sqrt(Float64(B_m + C))))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = sqrt(2.0) / B_m; tmp = 0.0; if (F <= -2e-310) tmp = sqrt((-F / A)); elseif (F <= 2.6e+39) tmp = t_0 * -sqrt((F * (C + hypot(B_m, C)))); else tmp = t_0 * (sqrt(F) * -sqrt((B_m + C))); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[Sqrt[2.0], $MachinePrecision] / B$95$m), $MachinePrecision]}, If[LessEqual[F, -2e-310], N[Sqrt[N[((-F) / A), $MachinePrecision]], $MachinePrecision], If[LessEqual[F, 2.6e+39], N[(t$95$0 * (-N[Sqrt[N[(F * N[(C + N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], N[(t$95$0 * N[(N[Sqrt[F], $MachinePrecision] * (-N[Sqrt[N[(B$95$m + C), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := \frac{\sqrt{2}}{B_m}\\
\mathbf{if}\;F \leq -2 \cdot 10^{-310}:\\
\;\;\;\;\sqrt{\frac{-F}{A}}\\
\mathbf{elif}\;F \leq 2.6 \cdot 10^{+39}:\\
\;\;\;\;t_0 \cdot \left(-\sqrt{F \cdot \left(C + \mathsf{hypot}\left(B_m, C\right)\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left(\sqrt{F} \cdot \left(-\sqrt{B_m + C}\right)\right)\\
\end{array}
\end{array}
if F < -1.999999999999994e-310Initial program 21.6%
add-sqr-sqrt21.6%
sqrt-unprod15.4%
frac-times11.0%
Applied egg-rr14.5%
associate-/l*21.1%
associate-*l*21.1%
*-commutative21.1%
unpow221.1%
fma-neg21.1%
distribute-lft-neg-in21.1%
metadata-eval21.1%
*-commutative21.1%
*-commutative21.1%
Simplified21.1%
Taylor expanded in C around inf 56.0%
mul-1-neg56.0%
Simplified56.0%
if -1.999999999999994e-310 < F < 2.6e39Initial program 20.6%
Taylor expanded in A around 0 11.6%
mul-1-neg11.6%
*-commutative11.6%
distribute-rgt-neg-in11.6%
unpow211.6%
unpow211.6%
hypot-def25.8%
Simplified25.8%
if 2.6e39 < F Initial program 7.2%
Taylor expanded in A around 0 8.7%
mul-1-neg8.7%
*-commutative8.7%
distribute-rgt-neg-in8.7%
unpow28.7%
unpow28.7%
hypot-def12.2%
Simplified12.2%
pow1/212.2%
*-commutative12.2%
unpow-prod-down24.6%
pow1/224.6%
pow1/224.6%
Applied egg-rr24.6%
Taylor expanded in C around 0 22.6%
Final simplification28.3%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= F -2e-310)
(sqrt (/ (- F) A))
(if (<= F 2.6e+39)
(* (/ (- (sqrt 2.0)) B_m) (sqrt (* F (+ A (hypot B_m A)))))
(* (/ (sqrt 2.0) B_m) (* (sqrt F) (- (sqrt (+ B_m C))))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (F <= -2e-310) {
tmp = sqrt((-F / A));
} else if (F <= 2.6e+39) {
tmp = (-sqrt(2.0) / B_m) * sqrt((F * (A + hypot(B_m, A))));
} else {
tmp = (sqrt(2.0) / B_m) * (sqrt(F) * -sqrt((B_m + C)));
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (F <= -2e-310) {
tmp = Math.sqrt((-F / A));
} else if (F <= 2.6e+39) {
tmp = (-Math.sqrt(2.0) / B_m) * Math.sqrt((F * (A + Math.hypot(B_m, A))));
} else {
tmp = (Math.sqrt(2.0) / B_m) * (Math.sqrt(F) * -Math.sqrt((B_m + C)));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if F <= -2e-310: tmp = math.sqrt((-F / A)) elif F <= 2.6e+39: tmp = (-math.sqrt(2.0) / B_m) * math.sqrt((F * (A + math.hypot(B_m, A)))) else: tmp = (math.sqrt(2.0) / B_m) * (math.sqrt(F) * -math.sqrt((B_m + C))) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (F <= -2e-310) tmp = sqrt(Float64(Float64(-F) / A)); elseif (F <= 2.6e+39) tmp = Float64(Float64(Float64(-sqrt(2.0)) / B_m) * sqrt(Float64(F * Float64(A + hypot(B_m, A))))); else tmp = Float64(Float64(sqrt(2.0) / B_m) * Float64(sqrt(F) * Float64(-sqrt(Float64(B_m + C))))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (F <= -2e-310) tmp = sqrt((-F / A)); elseif (F <= 2.6e+39) tmp = (-sqrt(2.0) / B_m) * sqrt((F * (A + hypot(B_m, A)))); else tmp = (sqrt(2.0) / B_m) * (sqrt(F) * -sqrt((B_m + C))); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[F, -2e-310], N[Sqrt[N[((-F) / A), $MachinePrecision]], $MachinePrecision], If[LessEqual[F, 2.6e+39], N[(N[((-N[Sqrt[2.0], $MachinePrecision]) / B$95$m), $MachinePrecision] * N[Sqrt[N[(F * N[(A + N[Sqrt[B$95$m ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B$95$m), $MachinePrecision] * N[(N[Sqrt[F], $MachinePrecision] * (-N[Sqrt[N[(B$95$m + C), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2 \cdot 10^{-310}:\\
\;\;\;\;\sqrt{\frac{-F}{A}}\\
\mathbf{elif}\;F \leq 2.6 \cdot 10^{+39}:\\
\;\;\;\;\frac{-\sqrt{2}}{B_m} \cdot \sqrt{F \cdot \left(A + \mathsf{hypot}\left(B_m, A\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2}}{B_m} \cdot \left(\sqrt{F} \cdot \left(-\sqrt{B_m + C}\right)\right)\\
\end{array}
\end{array}
if F < -1.999999999999994e-310Initial program 21.6%
add-sqr-sqrt21.6%
sqrt-unprod15.4%
frac-times11.0%
Applied egg-rr14.5%
associate-/l*21.1%
associate-*l*21.1%
*-commutative21.1%
unpow221.1%
fma-neg21.1%
distribute-lft-neg-in21.1%
metadata-eval21.1%
*-commutative21.1%
*-commutative21.1%
Simplified21.1%
Taylor expanded in C around inf 56.0%
mul-1-neg56.0%
Simplified56.0%
if -1.999999999999994e-310 < F < 2.6e39Initial program 20.6%
Taylor expanded in C around 0 10.7%
mul-1-neg10.7%
distribute-rgt-neg-in10.7%
+-commutative10.7%
unpow210.7%
unpow210.7%
hypot-def26.3%
Simplified26.3%
if 2.6e39 < F Initial program 7.2%
Taylor expanded in A around 0 8.7%
mul-1-neg8.7%
*-commutative8.7%
distribute-rgt-neg-in8.7%
unpow28.7%
unpow28.7%
hypot-def12.2%
Simplified12.2%
pow1/212.2%
*-commutative12.2%
unpow-prod-down24.6%
pow1/224.6%
pow1/224.6%
Applied egg-rr24.6%
Taylor expanded in C around 0 22.6%
Final simplification28.5%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= F -2e-310) (sqrt (/ (- F) A)) (* (/ (- (sqrt 2.0)) B_m) (* (sqrt F) (sqrt B_m)))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (F <= -2e-310) {
tmp = sqrt((-F / A));
} else {
tmp = (-sqrt(2.0) / B_m) * (sqrt(F) * sqrt(B_m));
}
return tmp;
}
B_m = abs(B)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if (f <= (-2d-310)) then
tmp = sqrt((-f / a))
else
tmp = (-sqrt(2.0d0) / b_m) * (sqrt(f) * sqrt(b_m))
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (F <= -2e-310) {
tmp = Math.sqrt((-F / A));
} else {
tmp = (-Math.sqrt(2.0) / B_m) * (Math.sqrt(F) * Math.sqrt(B_m));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if F <= -2e-310: tmp = math.sqrt((-F / A)) else: tmp = (-math.sqrt(2.0) / B_m) * (math.sqrt(F) * math.sqrt(B_m)) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (F <= -2e-310) tmp = sqrt(Float64(Float64(-F) / A)); else tmp = Float64(Float64(Float64(-sqrt(2.0)) / B_m) * Float64(sqrt(F) * sqrt(B_m))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (F <= -2e-310) tmp = sqrt((-F / A)); else tmp = (-sqrt(2.0) / B_m) * (sqrt(F) * sqrt(B_m)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[F, -2e-310], N[Sqrt[N[((-F) / A), $MachinePrecision]], $MachinePrecision], N[(N[((-N[Sqrt[2.0], $MachinePrecision]) / B$95$m), $MachinePrecision] * N[(N[Sqrt[F], $MachinePrecision] * N[Sqrt[B$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2 \cdot 10^{-310}:\\
\;\;\;\;\sqrt{\frac{-F}{A}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-\sqrt{2}}{B_m} \cdot \left(\sqrt{F} \cdot \sqrt{B_m}\right)\\
\end{array}
\end{array}
if F < -1.999999999999994e-310Initial program 21.6%
add-sqr-sqrt21.6%
sqrt-unprod15.4%
frac-times11.0%
Applied egg-rr14.5%
associate-/l*21.1%
associate-*l*21.1%
*-commutative21.1%
unpow221.1%
fma-neg21.1%
distribute-lft-neg-in21.1%
metadata-eval21.1%
*-commutative21.1%
*-commutative21.1%
Simplified21.1%
Taylor expanded in C around inf 56.0%
mul-1-neg56.0%
Simplified56.0%
if -1.999999999999994e-310 < F Initial program 15.4%
Taylor expanded in A around 0 10.5%
mul-1-neg10.5%
*-commutative10.5%
distribute-rgt-neg-in10.5%
unpow210.5%
unpow210.5%
hypot-def20.5%
Simplified20.5%
pow1/220.5%
*-commutative20.5%
unpow-prod-down25.3%
pow1/225.3%
pow1/225.3%
Applied egg-rr25.3%
Taylor expanded in C around 0 22.0%
Final simplification26.0%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (- (sqrt 2.0))))
(if (<= F -2e-310)
(sqrt (/ (- F) A))
(if (<= F 3.7e+26)
(* (/ t_0 B_m) (sqrt (* B_m F)))
(* (sqrt (/ F B_m)) t_0)))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = -sqrt(2.0);
double tmp;
if (F <= -2e-310) {
tmp = sqrt((-F / A));
} else if (F <= 3.7e+26) {
tmp = (t_0 / B_m) * sqrt((B_m * F));
} else {
tmp = sqrt((F / B_m)) * t_0;
}
return tmp;
}
B_m = abs(B)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: t_0
real(8) :: tmp
t_0 = -sqrt(2.0d0)
if (f <= (-2d-310)) then
tmp = sqrt((-f / a))
else if (f <= 3.7d+26) then
tmp = (t_0 / b_m) * sqrt((b_m * f))
else
tmp = sqrt((f / b_m)) * t_0
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = -Math.sqrt(2.0);
double tmp;
if (F <= -2e-310) {
tmp = Math.sqrt((-F / A));
} else if (F <= 3.7e+26) {
tmp = (t_0 / B_m) * Math.sqrt((B_m * F));
} else {
tmp = Math.sqrt((F / B_m)) * t_0;
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = -math.sqrt(2.0) tmp = 0 if F <= -2e-310: tmp = math.sqrt((-F / A)) elif F <= 3.7e+26: tmp = (t_0 / B_m) * math.sqrt((B_m * F)) else: tmp = math.sqrt((F / B_m)) * t_0 return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(-sqrt(2.0)) tmp = 0.0 if (F <= -2e-310) tmp = sqrt(Float64(Float64(-F) / A)); elseif (F <= 3.7e+26) tmp = Float64(Float64(t_0 / B_m) * sqrt(Float64(B_m * F))); else tmp = Float64(sqrt(Float64(F / B_m)) * t_0); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = -sqrt(2.0); tmp = 0.0; if (F <= -2e-310) tmp = sqrt((-F / A)); elseif (F <= 3.7e+26) tmp = (t_0 / B_m) * sqrt((B_m * F)); else tmp = sqrt((F / B_m)) * t_0; end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = (-N[Sqrt[2.0], $MachinePrecision])}, If[LessEqual[F, -2e-310], N[Sqrt[N[((-F) / A), $MachinePrecision]], $MachinePrecision], If[LessEqual[F, 3.7e+26], N[(N[(t$95$0 / B$95$m), $MachinePrecision] * N[Sqrt[N[(B$95$m * F), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(F / B$95$m), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := -\sqrt{2}\\
\mathbf{if}\;F \leq -2 \cdot 10^{-310}:\\
\;\;\;\;\sqrt{\frac{-F}{A}}\\
\mathbf{elif}\;F \leq 3.7 \cdot 10^{+26}:\\
\;\;\;\;\frac{t_0}{B_m} \cdot \sqrt{B_m \cdot F}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{F}{B_m}} \cdot t_0\\
\end{array}
\end{array}
if F < -1.999999999999994e-310Initial program 21.6%
add-sqr-sqrt21.6%
sqrt-unprod15.4%
frac-times11.0%
Applied egg-rr14.5%
associate-/l*21.1%
associate-*l*21.1%
*-commutative21.1%
unpow221.1%
fma-neg21.1%
distribute-lft-neg-in21.1%
metadata-eval21.1%
*-commutative21.1%
*-commutative21.1%
Simplified21.1%
Taylor expanded in C around inf 56.0%
mul-1-neg56.0%
Simplified56.0%
if -1.999999999999994e-310 < F < 3.69999999999999988e26Initial program 21.6%
Taylor expanded in A around 0 12.0%
mul-1-neg12.0%
*-commutative12.0%
distribute-rgt-neg-in12.0%
unpow212.0%
unpow212.0%
hypot-def25.8%
Simplified25.8%
Taylor expanded in C around 0 22.0%
if 3.69999999999999988e26 < F Initial program 6.8%
Taylor expanded in A around 0 8.2%
mul-1-neg8.2%
*-commutative8.2%
distribute-rgt-neg-in8.2%
unpow28.2%
unpow28.2%
hypot-def13.0%
Simplified13.0%
Taylor expanded in C around 0 22.1%
mul-1-neg22.1%
Simplified22.1%
Final simplification26.0%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= F 2.3e-308) (sqrt (/ (- F) A)) (* (sqrt (/ F B_m)) (- (sqrt 2.0)))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (F <= 2.3e-308) {
tmp = sqrt((-F / A));
} else {
tmp = sqrt((F / B_m)) * -sqrt(2.0);
}
return tmp;
}
B_m = abs(B)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if (f <= 2.3d-308) then
tmp = sqrt((-f / a))
else
tmp = sqrt((f / b_m)) * -sqrt(2.0d0)
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (F <= 2.3e-308) {
tmp = Math.sqrt((-F / A));
} else {
tmp = Math.sqrt((F / B_m)) * -Math.sqrt(2.0);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if F <= 2.3e-308: tmp = math.sqrt((-F / A)) else: tmp = math.sqrt((F / B_m)) * -math.sqrt(2.0) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (F <= 2.3e-308) tmp = sqrt(Float64(Float64(-F) / A)); else tmp = Float64(sqrt(Float64(F / B_m)) * Float64(-sqrt(2.0))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (F <= 2.3e-308) tmp = sqrt((-F / A)); else tmp = sqrt((F / B_m)) * -sqrt(2.0); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[F, 2.3e-308], N[Sqrt[N[((-F) / A), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(F / B$95$m), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;F \leq 2.3 \cdot 10^{-308}:\\
\;\;\;\;\sqrt{\frac{-F}{A}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{F}{B_m}} \cdot \left(-\sqrt{2}\right)\\
\end{array}
\end{array}
if F < 2.2999999999999999e-308Initial program 21.6%
add-sqr-sqrt21.6%
sqrt-unprod15.4%
frac-times11.0%
Applied egg-rr14.5%
associate-/l*21.1%
associate-*l*21.1%
*-commutative21.1%
unpow221.1%
fma-neg21.1%
distribute-lft-neg-in21.1%
metadata-eval21.1%
*-commutative21.1%
*-commutative21.1%
Simplified21.1%
Taylor expanded in C around inf 56.0%
mul-1-neg56.0%
Simplified56.0%
if 2.2999999999999999e-308 < F Initial program 15.4%
Taylor expanded in A around 0 10.5%
mul-1-neg10.5%
*-commutative10.5%
distribute-rgt-neg-in10.5%
unpow210.5%
unpow210.5%
hypot-def20.5%
Simplified20.5%
Taylor expanded in C around 0 17.8%
mul-1-neg17.8%
Simplified17.8%
Final simplification22.3%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (sqrt (/ (- F) A)))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
return sqrt((-F / A));
}
B_m = abs(B)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
code = sqrt((-f / a))
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
return Math.sqrt((-F / A));
}
B_m = math.fabs(B) def code(A, B_m, C, F): return math.sqrt((-F / A))
B_m = abs(B) function code(A, B_m, C, F) return sqrt(Float64(Float64(-F) / A)) end
B_m = abs(B); function tmp = code(A, B_m, C, F) tmp = sqrt((-F / A)); end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := N[Sqrt[N[((-F) / A), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|
\\
\sqrt{\frac{-F}{A}}
\end{array}
Initial program 16.1%
add-sqr-sqrt2.9%
sqrt-unprod2.6%
frac-times1.9%
Applied egg-rr3.0%
associate-/l*3.9%
associate-*l*3.9%
*-commutative3.9%
unpow23.9%
fma-neg3.9%
distribute-lft-neg-in3.9%
metadata-eval3.9%
*-commutative3.9%
*-commutative3.9%
Simplified3.5%
Taylor expanded in C around inf 11.3%
mul-1-neg11.3%
Simplified11.3%
Final simplification11.3%
herbie shell --seed 2023331
(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))))