
(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 23 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
(let* ((t_0 (* (* 4.0 A) C))
(t_1
(/
(sqrt
(*
(* 2.0 (* (- (pow B_m 2.0) t_0) F))
(+ (+ A C) (sqrt (+ (pow B_m 2.0) (pow (- A C) 2.0))))))
(- t_0 (pow B_m 2.0))))
(t_2 (- t_0 (* B_m B_m)))
(t_3 (sqrt (+ A (+ C (hypot B_m (- A C)))))))
(if (<= t_1 -4e-127)
(/
(* t_3 (* (sqrt (* 2.0 (+ (* B_m B_m) (* A (* C -4.0))))) (sqrt F)))
t_2)
(if (<= t_1 0.0)
(/ (* (pow (* C (* F -16.0)) 0.5) (fabs A)) t_2)
(if (<= t_1 INFINITY)
(/ (* t_3 (sqrt (* 2.0 (* F (+ (* B_m B_m) (* -4.0 (* A C))))))) t_2)
(* (sqrt F) (/ (sqrt (* 2.0 (+ A (hypot B_m A)))) (- 0.0 B_m))))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = (4.0 * A) * C;
double t_1 = sqrt(((2.0 * ((pow(B_m, 2.0) - t_0) * F)) * ((A + C) + sqrt((pow(B_m, 2.0) + pow((A - C), 2.0)))))) / (t_0 - pow(B_m, 2.0));
double t_2 = t_0 - (B_m * B_m);
double t_3 = sqrt((A + (C + hypot(B_m, (A - C)))));
double tmp;
if (t_1 <= -4e-127) {
tmp = (t_3 * (sqrt((2.0 * ((B_m * B_m) + (A * (C * -4.0))))) * sqrt(F))) / t_2;
} else if (t_1 <= 0.0) {
tmp = (pow((C * (F * -16.0)), 0.5) * fabs(A)) / t_2;
} else if (t_1 <= ((double) INFINITY)) {
tmp = (t_3 * sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C))))))) / t_2;
} else {
tmp = sqrt(F) * (sqrt((2.0 * (A + hypot(B_m, A)))) / (0.0 - B_m));
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = (4.0 * A) * C;
double t_1 = Math.sqrt(((2.0 * ((Math.pow(B_m, 2.0) - t_0) * F)) * ((A + C) + Math.sqrt((Math.pow(B_m, 2.0) + Math.pow((A - C), 2.0)))))) / (t_0 - Math.pow(B_m, 2.0));
double t_2 = t_0 - (B_m * B_m);
double t_3 = Math.sqrt((A + (C + Math.hypot(B_m, (A - C)))));
double tmp;
if (t_1 <= -4e-127) {
tmp = (t_3 * (Math.sqrt((2.0 * ((B_m * B_m) + (A * (C * -4.0))))) * Math.sqrt(F))) / t_2;
} else if (t_1 <= 0.0) {
tmp = (Math.pow((C * (F * -16.0)), 0.5) * Math.abs(A)) / t_2;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = (t_3 * Math.sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C))))))) / t_2;
} else {
tmp = Math.sqrt(F) * (Math.sqrt((2.0 * (A + Math.hypot(B_m, A)))) / (0.0 - B_m));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = (4.0 * A) * C t_1 = math.sqrt(((2.0 * ((math.pow(B_m, 2.0) - t_0) * F)) * ((A + C) + math.sqrt((math.pow(B_m, 2.0) + math.pow((A - C), 2.0)))))) / (t_0 - math.pow(B_m, 2.0)) t_2 = t_0 - (B_m * B_m) t_3 = math.sqrt((A + (C + math.hypot(B_m, (A - C))))) tmp = 0 if t_1 <= -4e-127: tmp = (t_3 * (math.sqrt((2.0 * ((B_m * B_m) + (A * (C * -4.0))))) * math.sqrt(F))) / t_2 elif t_1 <= 0.0: tmp = (math.pow((C * (F * -16.0)), 0.5) * math.fabs(A)) / t_2 elif t_1 <= math.inf: tmp = (t_3 * math.sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C))))))) / t_2 else: tmp = math.sqrt(F) * (math.sqrt((2.0 * (A + math.hypot(B_m, A)))) / (0.0 - B_m)) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(Float64(4.0 * A) * C) t_1 = Float64(sqrt(Float64(Float64(2.0 * Float64(Float64((B_m ^ 2.0) - t_0) * F)) * Float64(Float64(A + C) + sqrt(Float64((B_m ^ 2.0) + (Float64(A - C) ^ 2.0)))))) / Float64(t_0 - (B_m ^ 2.0))) t_2 = Float64(t_0 - Float64(B_m * B_m)) t_3 = sqrt(Float64(A + Float64(C + hypot(B_m, Float64(A - C))))) tmp = 0.0 if (t_1 <= -4e-127) tmp = Float64(Float64(t_3 * Float64(sqrt(Float64(2.0 * Float64(Float64(B_m * B_m) + Float64(A * Float64(C * -4.0))))) * sqrt(F))) / t_2); elseif (t_1 <= 0.0) tmp = Float64(Float64((Float64(C * Float64(F * -16.0)) ^ 0.5) * abs(A)) / t_2); elseif (t_1 <= Inf) tmp = Float64(Float64(t_3 * sqrt(Float64(2.0 * Float64(F * Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))))))) / t_2); else tmp = Float64(sqrt(F) * Float64(sqrt(Float64(2.0 * Float64(A + hypot(B_m, A)))) / Float64(0.0 - B_m))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = (4.0 * A) * C; t_1 = sqrt(((2.0 * (((B_m ^ 2.0) - t_0) * F)) * ((A + C) + sqrt(((B_m ^ 2.0) + ((A - C) ^ 2.0)))))) / (t_0 - (B_m ^ 2.0)); t_2 = t_0 - (B_m * B_m); t_3 = sqrt((A + (C + hypot(B_m, (A - C))))); tmp = 0.0; if (t_1 <= -4e-127) tmp = (t_3 * (sqrt((2.0 * ((B_m * B_m) + (A * (C * -4.0))))) * sqrt(F))) / t_2; elseif (t_1 <= 0.0) tmp = (((C * (F * -16.0)) ^ 0.5) * abs(A)) / t_2; elseif (t_1 <= Inf) tmp = (t_3 * sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C))))))) / t_2; else tmp = sqrt(F) * (sqrt((2.0 * (A + hypot(B_m, A)))) / (0.0 - B_m)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sqrt[N[(N[(2.0 * N[(N[(N[Power[B$95$m, 2.0], $MachinePrecision] - t$95$0), $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] + N[Sqrt[N[(N[Power[B$95$m, 2.0], $MachinePrecision] + N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(t$95$0 - N[Power[B$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(A + N[(C + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, -4e-127], N[(N[(t$95$3 * N[(N[Sqrt[N[(2.0 * N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[F], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(N[Power[N[(C * N[(F * -16.0), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] * N[Abs[A], $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(t$95$3 * N[Sqrt[N[(2.0 * N[(F * N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], N[(N[Sqrt[F], $MachinePrecision] * N[(N[Sqrt[N[(2.0 * N[(A + N[Sqrt[B$95$m ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := \left(4 \cdot A\right) \cdot C\\
t_1 := \frac{\sqrt{\left(2 \cdot \left(\left({B\_m}^{2} - t\_0\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{B\_m}^{2} + {\left(A - C\right)}^{2}}\right)}}{t\_0 - {B\_m}^{2}}\\
t_2 := t\_0 - B\_m \cdot B\_m\\
t_3 := \sqrt{A + \left(C + \mathsf{hypot}\left(B\_m, A - C\right)\right)}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{-127}:\\
\;\;\;\;\frac{t\_3 \cdot \left(\sqrt{2 \cdot \left(B\_m \cdot B\_m + A \cdot \left(C \cdot -4\right)\right)} \cdot \sqrt{F}\right)}{t\_2}\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{{\left(C \cdot \left(F \cdot -16\right)\right)}^{0.5} \cdot \left|A\right|}{t\_2}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{t\_3 \cdot \sqrt{2 \cdot \left(F \cdot \left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right)\right)}}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{F} \cdot \frac{\sqrt{2 \cdot \left(A + \mathsf{hypot}\left(B\_m, A\right)\right)}}{0 - B\_m}\\
\end{array}
\end{array}
if (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 #s(literal 2 binary64) (*.f64 (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))))) (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C))) < -4.0000000000000001e-127Initial program 44.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified50.1%
Applied egg-rr63.6%
associate-*r*N/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f6472.2%
Applied egg-rr72.2%
if -4.0000000000000001e-127 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 #s(literal 2 binary64) (*.f64 (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))))) (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C))) < -0.0Initial program 3.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified9.8%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6417.8%
Simplified17.8%
pow1/2N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
unpow-prod-downN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
pow1/2N/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f6440.7%
Applied egg-rr40.7%
if -0.0 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 #s(literal 2 binary64) (*.f64 (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))))) (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C))) < +inf.0Initial program 47.2%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified70.0%
Applied egg-rr86.8%
if +inf.0 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 #s(literal 2 binary64) (*.f64 (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))))) (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C))) Initial program 0.0%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified1.4%
Applied egg-rr0.1%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f641.8%
Simplified1.8%
*-commutativeN/A
+-commutativeN/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f6427.4%
Applied egg-rr27.4%
associate-*r*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
neg-lowering-neg.f64N/A
sqrt-lowering-sqrt.f6427.5%
Applied egg-rr27.5%
Final simplification49.6%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 4.4e+58)
(/
(*
(sqrt (+ A (+ C (hypot B_m (- A C)))))
(sqrt (* 2.0 (* F (+ (* B_m B_m) (* -4.0 (* A C)))))))
(- (* (* 4.0 A) C) (* B_m B_m)))
(* (sqrt F) (/ (sqrt (* 2.0 (+ A (hypot B_m A)))) (- 0.0 B_m)))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 4.4e+58) {
tmp = (sqrt((A + (C + hypot(B_m, (A - C))))) * sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C))))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = sqrt(F) * (sqrt((2.0 * (A + hypot(B_m, A)))) / (0.0 - B_m));
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 4.4e+58) {
tmp = (Math.sqrt((A + (C + Math.hypot(B_m, (A - C))))) * Math.sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C))))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = Math.sqrt(F) * (Math.sqrt((2.0 * (A + Math.hypot(B_m, A)))) / (0.0 - B_m));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 4.4e+58: tmp = (math.sqrt((A + (C + math.hypot(B_m, (A - C))))) * math.sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C))))))) / (((4.0 * A) * C) - (B_m * B_m)) else: tmp = math.sqrt(F) * (math.sqrt((2.0 * (A + math.hypot(B_m, A)))) / (0.0 - B_m)) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 4.4e+58) tmp = Float64(Float64(sqrt(Float64(A + Float64(C + hypot(B_m, Float64(A - C))))) * sqrt(Float64(2.0 * Float64(F * Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))))))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); else tmp = Float64(sqrt(F) * Float64(sqrt(Float64(2.0 * Float64(A + hypot(B_m, A)))) / Float64(0.0 - B_m))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 4.4e+58) tmp = (sqrt((A + (C + hypot(B_m, (A - C))))) * sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C))))))) / (((4.0 * A) * C) - (B_m * B_m)); else tmp = sqrt(F) * (sqrt((2.0 * (A + hypot(B_m, A)))) / (0.0 - B_m)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 4.4e+58], N[(N[(N[Sqrt[N[(A + N[(C + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(F * N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[F], $MachinePrecision] * N[(N[Sqrt[N[(2.0 * N[(A + N[Sqrt[B$95$m ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 4.4 \cdot 10^{+58}:\\
\;\;\;\;\frac{\sqrt{A + \left(C + \mathsf{hypot}\left(B\_m, A - C\right)\right)} \cdot \sqrt{2 \cdot \left(F \cdot \left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{F} \cdot \frac{\sqrt{2 \cdot \left(A + \mathsf{hypot}\left(B\_m, A\right)\right)}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 4.4000000000000001e58Initial program 23.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified30.7%
Applied egg-rr35.3%
if 4.4000000000000001e58 < B Initial program 2.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified2.6%
Applied egg-rr12.2%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6415.1%
Simplified15.1%
*-commutativeN/A
+-commutativeN/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f6474.1%
Applied egg-rr74.1%
associate-*r*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
neg-lowering-neg.f64N/A
sqrt-lowering-sqrt.f6474.4%
Applied egg-rr74.4%
Final simplification42.9%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 1.25e-165)
(/ (* (pow (* C (* F -16.0)) 0.5) (fabs A)) (- (* (* 4.0 A) C) (* B_m B_m)))
(if (<= B_m 7.5e+52)
(/
1.0
(/
(- (* 4.0 (* A C)) (* B_m B_m))
(sqrt
(*
(+ (* B_m B_m) (* -4.0 (* A C)))
(* (+ C (+ A (hypot B_m (- A C)))) (* 2.0 F))))))
(* (sqrt F) (/ (sqrt (* 2.0 (+ A (hypot B_m A)))) (- 0.0 B_m))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 1.25e-165) {
tmp = (pow((C * (F * -16.0)), 0.5) * fabs(A)) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 7.5e+52) {
tmp = 1.0 / (((4.0 * (A * C)) - (B_m * B_m)) / sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((C + (A + hypot(B_m, (A - C)))) * (2.0 * F)))));
} else {
tmp = sqrt(F) * (sqrt((2.0 * (A + hypot(B_m, A)))) / (0.0 - B_m));
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 1.25e-165) {
tmp = (Math.pow((C * (F * -16.0)), 0.5) * Math.abs(A)) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 7.5e+52) {
tmp = 1.0 / (((4.0 * (A * C)) - (B_m * B_m)) / Math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((C + (A + Math.hypot(B_m, (A - C)))) * (2.0 * F)))));
} else {
tmp = Math.sqrt(F) * (Math.sqrt((2.0 * (A + Math.hypot(B_m, A)))) / (0.0 - B_m));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 1.25e-165: tmp = (math.pow((C * (F * -16.0)), 0.5) * math.fabs(A)) / (((4.0 * A) * C) - (B_m * B_m)) elif B_m <= 7.5e+52: tmp = 1.0 / (((4.0 * (A * C)) - (B_m * B_m)) / math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((C + (A + math.hypot(B_m, (A - C)))) * (2.0 * F))))) else: tmp = math.sqrt(F) * (math.sqrt((2.0 * (A + math.hypot(B_m, A)))) / (0.0 - B_m)) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 1.25e-165) tmp = Float64(Float64((Float64(C * Float64(F * -16.0)) ^ 0.5) * abs(A)) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); elseif (B_m <= 7.5e+52) tmp = Float64(1.0 / Float64(Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m)) / sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(Float64(C + Float64(A + hypot(B_m, Float64(A - C)))) * Float64(2.0 * F)))))); else tmp = Float64(sqrt(F) * Float64(sqrt(Float64(2.0 * Float64(A + hypot(B_m, A)))) / Float64(0.0 - B_m))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 1.25e-165) tmp = (((C * (F * -16.0)) ^ 0.5) * abs(A)) / (((4.0 * A) * C) - (B_m * B_m)); elseif (B_m <= 7.5e+52) tmp = 1.0 / (((4.0 * (A * C)) - (B_m * B_m)) / sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((C + (A + hypot(B_m, (A - C)))) * (2.0 * F))))); else tmp = sqrt(F) * (sqrt((2.0 * (A + hypot(B_m, A)))) / (0.0 - B_m)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 1.25e-165], N[(N[(N[Power[N[(C * N[(F * -16.0), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] * N[Abs[A], $MachinePrecision]), $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 7.5e+52], N[(1.0 / N[(N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(C + N[(A + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[F], $MachinePrecision] * N[(N[Sqrt[N[(2.0 * N[(A + N[Sqrt[B$95$m ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 1.25 \cdot 10^{-165}:\\
\;\;\;\;\frac{{\left(C \cdot \left(F \cdot -16\right)\right)}^{0.5} \cdot \left|A\right|}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{elif}\;B\_m \leq 7.5 \cdot 10^{+52}:\\
\;\;\;\;\frac{1}{\frac{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m}{\sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(\left(C + \left(A + \mathsf{hypot}\left(B\_m, A - C\right)\right)\right) \cdot \left(2 \cdot F\right)\right)}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{F} \cdot \frac{\sqrt{2 \cdot \left(A + \mathsf{hypot}\left(B\_m, A\right)\right)}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 1.24999999999999995e-165Initial program 20.4%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.6%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6410.8%
Simplified10.8%
pow1/2N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
unpow-prod-downN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
pow1/2N/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f6417.4%
Applied egg-rr17.4%
if 1.24999999999999995e-165 < B < 7.49999999999999995e52Initial program 33.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified42.8%
Applied egg-rr43.5%
+-commutativeN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f6443.8%
Applied egg-rr43.8%
if 7.49999999999999995e52 < B Initial program 2.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified2.7%
Applied egg-rr13.5%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6414.6%
Simplified14.6%
*-commutativeN/A
+-commutativeN/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f6470.3%
Applied egg-rr70.3%
associate-*r*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
neg-lowering-neg.f64N/A
sqrt-lowering-sqrt.f6470.5%
Applied egg-rr70.5%
Final simplification34.2%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 1.1e-165)
(/ (* (pow (* C (* F -16.0)) 0.5) (fabs A)) (- (* (* 4.0 A) C) (* B_m B_m)))
(if (<= B_m 2.45e+67)
(/
1.0
(/
(- (* 4.0 (* A C)) (* B_m B_m))
(sqrt
(*
(+ (* B_m B_m) (* -4.0 (* A C)))
(* (+ C (+ A (hypot B_m (- A C)))) (* 2.0 F))))))
(* (/ (sqrt (* 2.0 F)) -1.0) (/ (sqrt B_m) B_m)))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 1.1e-165) {
tmp = (pow((C * (F * -16.0)), 0.5) * fabs(A)) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 2.45e+67) {
tmp = 1.0 / (((4.0 * (A * C)) - (B_m * B_m)) / sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((C + (A + hypot(B_m, (A - C)))) * (2.0 * F)))));
} else {
tmp = (sqrt((2.0 * F)) / -1.0) * (sqrt(B_m) / B_m);
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 1.1e-165) {
tmp = (Math.pow((C * (F * -16.0)), 0.5) * Math.abs(A)) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 2.45e+67) {
tmp = 1.0 / (((4.0 * (A * C)) - (B_m * B_m)) / Math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((C + (A + Math.hypot(B_m, (A - C)))) * (2.0 * F)))));
} else {
tmp = (Math.sqrt((2.0 * F)) / -1.0) * (Math.sqrt(B_m) / B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 1.1e-165: tmp = (math.pow((C * (F * -16.0)), 0.5) * math.fabs(A)) / (((4.0 * A) * C) - (B_m * B_m)) elif B_m <= 2.45e+67: tmp = 1.0 / (((4.0 * (A * C)) - (B_m * B_m)) / math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((C + (A + math.hypot(B_m, (A - C)))) * (2.0 * F))))) else: tmp = (math.sqrt((2.0 * F)) / -1.0) * (math.sqrt(B_m) / B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 1.1e-165) tmp = Float64(Float64((Float64(C * Float64(F * -16.0)) ^ 0.5) * abs(A)) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); elseif (B_m <= 2.45e+67) tmp = Float64(1.0 / Float64(Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m)) / sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(Float64(C + Float64(A + hypot(B_m, Float64(A - C)))) * Float64(2.0 * F)))))); else tmp = Float64(Float64(sqrt(Float64(2.0 * F)) / -1.0) * Float64(sqrt(B_m) / B_m)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 1.1e-165) tmp = (((C * (F * -16.0)) ^ 0.5) * abs(A)) / (((4.0 * A) * C) - (B_m * B_m)); elseif (B_m <= 2.45e+67) tmp = 1.0 / (((4.0 * (A * C)) - (B_m * B_m)) / sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((C + (A + hypot(B_m, (A - C)))) * (2.0 * F))))); else tmp = (sqrt((2.0 * F)) / -1.0) * (sqrt(B_m) / B_m); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 1.1e-165], N[(N[(N[Power[N[(C * N[(F * -16.0), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] * N[Abs[A], $MachinePrecision]), $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 2.45e+67], N[(1.0 / N[(N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(C + N[(A + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(2.0 * F), $MachinePrecision]], $MachinePrecision] / -1.0), $MachinePrecision] * N[(N[Sqrt[B$95$m], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 1.1 \cdot 10^{-165}:\\
\;\;\;\;\frac{{\left(C \cdot \left(F \cdot -16\right)\right)}^{0.5} \cdot \left|A\right|}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{elif}\;B\_m \leq 2.45 \cdot 10^{+67}:\\
\;\;\;\;\frac{1}{\frac{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m}{\sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(\left(C + \left(A + \mathsf{hypot}\left(B\_m, A - C\right)\right)\right) \cdot \left(2 \cdot F\right)\right)}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2 \cdot F}}{-1} \cdot \frac{\sqrt{B\_m}}{B\_m}\\
\end{array}
\end{array}
if B < 1.0999999999999999e-165Initial program 20.4%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.6%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6410.8%
Simplified10.8%
pow1/2N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
unpow-prod-downN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
pow1/2N/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f6417.4%
Applied egg-rr17.4%
if 1.0999999999999999e-165 < B < 2.44999999999999995e67Initial program 31.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified40.2%
Applied egg-rr40.9%
+-commutativeN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f6441.2%
Applied egg-rr41.2%
if 2.44999999999999995e67 < B Initial program 2.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified2.6%
Applied egg-rr12.4%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6415.3%
Simplified15.3%
Taylor expanded in A around 0
Simplified51.0%
associate-*l/N/A
distribute-neg-frac2N/A
sqrt-prodN/A
pow1/2N/A
associate-*r*N/A
neg-mul-1N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f6472.2%
Applied egg-rr72.2%
Final simplification33.5%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 7.8e-160)
(/ (* (pow (* C (* F -16.0)) 0.5) (fabs A)) (- (* (* 4.0 A) C) (* B_m B_m)))
(if (<= B_m 3.1e+66)
(/
1.0
(/
(- (* 4.0 (* A C)) (* B_m B_m))
(sqrt
(*
(+ (* B_m B_m) (* -4.0 (* A C)))
(* (+ A (+ C (hypot B_m (- A C)))) (* 2.0 F))))))
(* (/ (sqrt (* 2.0 F)) -1.0) (/ (sqrt B_m) B_m)))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 7.8e-160) {
tmp = (pow((C * (F * -16.0)), 0.5) * fabs(A)) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 3.1e+66) {
tmp = 1.0 / (((4.0 * (A * C)) - (B_m * B_m)) / sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((A + (C + hypot(B_m, (A - C)))) * (2.0 * F)))));
} else {
tmp = (sqrt((2.0 * F)) / -1.0) * (sqrt(B_m) / B_m);
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 7.8e-160) {
tmp = (Math.pow((C * (F * -16.0)), 0.5) * Math.abs(A)) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 3.1e+66) {
tmp = 1.0 / (((4.0 * (A * C)) - (B_m * B_m)) / Math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((A + (C + Math.hypot(B_m, (A - C)))) * (2.0 * F)))));
} else {
tmp = (Math.sqrt((2.0 * F)) / -1.0) * (Math.sqrt(B_m) / B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 7.8e-160: tmp = (math.pow((C * (F * -16.0)), 0.5) * math.fabs(A)) / (((4.0 * A) * C) - (B_m * B_m)) elif B_m <= 3.1e+66: tmp = 1.0 / (((4.0 * (A * C)) - (B_m * B_m)) / math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((A + (C + math.hypot(B_m, (A - C)))) * (2.0 * F))))) else: tmp = (math.sqrt((2.0 * F)) / -1.0) * (math.sqrt(B_m) / B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 7.8e-160) tmp = Float64(Float64((Float64(C * Float64(F * -16.0)) ^ 0.5) * abs(A)) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); elseif (B_m <= 3.1e+66) tmp = Float64(1.0 / Float64(Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m)) / sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(Float64(A + Float64(C + hypot(B_m, Float64(A - C)))) * Float64(2.0 * F)))))); else tmp = Float64(Float64(sqrt(Float64(2.0 * F)) / -1.0) * Float64(sqrt(B_m) / B_m)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 7.8e-160) tmp = (((C * (F * -16.0)) ^ 0.5) * abs(A)) / (((4.0 * A) * C) - (B_m * B_m)); elseif (B_m <= 3.1e+66) tmp = 1.0 / (((4.0 * (A * C)) - (B_m * B_m)) / sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((A + (C + hypot(B_m, (A - C)))) * (2.0 * F))))); else tmp = (sqrt((2.0 * F)) / -1.0) * (sqrt(B_m) / B_m); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 7.8e-160], N[(N[(N[Power[N[(C * N[(F * -16.0), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] * N[Abs[A], $MachinePrecision]), $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 3.1e+66], N[(1.0 / N[(N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(A + N[(C + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(2.0 * F), $MachinePrecision]], $MachinePrecision] / -1.0), $MachinePrecision] * N[(N[Sqrt[B$95$m], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 7.8 \cdot 10^{-160}:\\
\;\;\;\;\frac{{\left(C \cdot \left(F \cdot -16\right)\right)}^{0.5} \cdot \left|A\right|}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{elif}\;B\_m \leq 3.1 \cdot 10^{+66}:\\
\;\;\;\;\frac{1}{\frac{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m}{\sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(\left(A + \left(C + \mathsf{hypot}\left(B\_m, A - C\right)\right)\right) \cdot \left(2 \cdot F\right)\right)}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2 \cdot F}}{-1} \cdot \frac{\sqrt{B\_m}}{B\_m}\\
\end{array}
\end{array}
if B < 7.79999999999999979e-160Initial program 20.4%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.6%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6410.8%
Simplified10.8%
pow1/2N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
unpow-prod-downN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
pow1/2N/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f6417.4%
Applied egg-rr17.4%
if 7.79999999999999979e-160 < B < 3.10000000000000019e66Initial program 31.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified40.2%
Applied egg-rr40.9%
if 3.10000000000000019e66 < B Initial program 2.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified2.6%
Applied egg-rr12.4%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6415.3%
Simplified15.3%
Taylor expanded in A around 0
Simplified51.0%
associate-*l/N/A
distribute-neg-frac2N/A
sqrt-prodN/A
pow1/2N/A
associate-*r*N/A
neg-mul-1N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f6472.2%
Applied egg-rr72.2%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 9.2e-148)
(/ (* (pow (* C (* F -16.0)) 0.5) (fabs A)) (- (* (* 4.0 A) C) (* B_m B_m)))
(if (<= B_m 1.02e+67)
(*
(sqrt
(*
(+ (* B_m B_m) (* -4.0 (* A C)))
(* (+ A (+ C (hypot B_m (- A C)))) (* 2.0 F))))
(/ 1.0 (- (* 4.0 (* A C)) (* B_m B_m))))
(* (/ (sqrt (* 2.0 F)) -1.0) (/ (sqrt B_m) B_m)))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 9.2e-148) {
tmp = (pow((C * (F * -16.0)), 0.5) * fabs(A)) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 1.02e+67) {
tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((A + (C + hypot(B_m, (A - C)))) * (2.0 * F)))) * (1.0 / ((4.0 * (A * C)) - (B_m * B_m)));
} else {
tmp = (sqrt((2.0 * F)) / -1.0) * (sqrt(B_m) / B_m);
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 9.2e-148) {
tmp = (Math.pow((C * (F * -16.0)), 0.5) * Math.abs(A)) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 1.02e+67) {
tmp = Math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((A + (C + Math.hypot(B_m, (A - C)))) * (2.0 * F)))) * (1.0 / ((4.0 * (A * C)) - (B_m * B_m)));
} else {
tmp = (Math.sqrt((2.0 * F)) / -1.0) * (Math.sqrt(B_m) / B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 9.2e-148: tmp = (math.pow((C * (F * -16.0)), 0.5) * math.fabs(A)) / (((4.0 * A) * C) - (B_m * B_m)) elif B_m <= 1.02e+67: tmp = math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((A + (C + math.hypot(B_m, (A - C)))) * (2.0 * F)))) * (1.0 / ((4.0 * (A * C)) - (B_m * B_m))) else: tmp = (math.sqrt((2.0 * F)) / -1.0) * (math.sqrt(B_m) / B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 9.2e-148) tmp = Float64(Float64((Float64(C * Float64(F * -16.0)) ^ 0.5) * abs(A)) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); elseif (B_m <= 1.02e+67) tmp = Float64(sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(Float64(A + Float64(C + hypot(B_m, Float64(A - C)))) * Float64(2.0 * F)))) * Float64(1.0 / Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m)))); else tmp = Float64(Float64(sqrt(Float64(2.0 * F)) / -1.0) * Float64(sqrt(B_m) / B_m)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 9.2e-148) tmp = (((C * (F * -16.0)) ^ 0.5) * abs(A)) / (((4.0 * A) * C) - (B_m * B_m)); elseif (B_m <= 1.02e+67) tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((A + (C + hypot(B_m, (A - C)))) * (2.0 * F)))) * (1.0 / ((4.0 * (A * C)) - (B_m * B_m))); else tmp = (sqrt((2.0 * F)) / -1.0) * (sqrt(B_m) / B_m); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 9.2e-148], N[(N[(N[Power[N[(C * N[(F * -16.0), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] * N[Abs[A], $MachinePrecision]), $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 1.02e+67], N[(N[Sqrt[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(A + N[(C + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(2.0 * F), $MachinePrecision]], $MachinePrecision] / -1.0), $MachinePrecision] * N[(N[Sqrt[B$95$m], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 9.2 \cdot 10^{-148}:\\
\;\;\;\;\frac{{\left(C \cdot \left(F \cdot -16\right)\right)}^{0.5} \cdot \left|A\right|}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{elif}\;B\_m \leq 1.02 \cdot 10^{+67}:\\
\;\;\;\;\sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(\left(A + \left(C + \mathsf{hypot}\left(B\_m, A - C\right)\right)\right) \cdot \left(2 \cdot F\right)\right)} \cdot \frac{1}{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2 \cdot F}}{-1} \cdot \frac{\sqrt{B\_m}}{B\_m}\\
\end{array}
\end{array}
if B < 9.1999999999999999e-148Initial program 20.1%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.2%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6410.7%
Simplified10.7%
pow1/2N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
unpow-prod-downN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
pow1/2N/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f6417.2%
Applied egg-rr17.2%
if 9.1999999999999999e-148 < B < 1.02000000000000002e67Initial program 32.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified41.6%
Applied egg-rr42.2%
if 1.02000000000000002e67 < B Initial program 2.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified2.6%
Applied egg-rr12.4%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6415.3%
Simplified15.3%
Taylor expanded in A around 0
Simplified51.0%
associate-*l/N/A
distribute-neg-frac2N/A
sqrt-prodN/A
pow1/2N/A
associate-*r*N/A
neg-mul-1N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f6472.2%
Applied egg-rr72.2%
Final simplification33.4%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (- (* (* 4.0 A) C) (* B_m B_m))))
(if (<= B_m 1.9e-160)
(/ (* (pow (* C (* F -16.0)) 0.5) (fabs A)) t_0)
(if (<= B_m 3.2e+66)
(/
(sqrt
(*
(+ (* B_m B_m) (* A (* C -4.0)))
(* (* 2.0 F) (+ (+ A C) (hypot B_m (- A C))))))
t_0)
(* (/ (sqrt (* 2.0 F)) -1.0) (/ (sqrt B_m) B_m))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (B_m <= 1.9e-160) {
tmp = (pow((C * (F * -16.0)), 0.5) * fabs(A)) / t_0;
} else if (B_m <= 3.2e+66) {
tmp = sqrt((((B_m * B_m) + (A * (C * -4.0))) * ((2.0 * F) * ((A + C) + hypot(B_m, (A - C)))))) / t_0;
} else {
tmp = (sqrt((2.0 * F)) / -1.0) * (sqrt(B_m) / B_m);
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (B_m <= 1.9e-160) {
tmp = (Math.pow((C * (F * -16.0)), 0.5) * Math.abs(A)) / t_0;
} else if (B_m <= 3.2e+66) {
tmp = Math.sqrt((((B_m * B_m) + (A * (C * -4.0))) * ((2.0 * F) * ((A + C) + Math.hypot(B_m, (A - C)))))) / t_0;
} else {
tmp = (Math.sqrt((2.0 * F)) / -1.0) * (Math.sqrt(B_m) / B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = ((4.0 * A) * C) - (B_m * B_m) tmp = 0 if B_m <= 1.9e-160: tmp = (math.pow((C * (F * -16.0)), 0.5) * math.fabs(A)) / t_0 elif B_m <= 3.2e+66: tmp = math.sqrt((((B_m * B_m) + (A * (C * -4.0))) * ((2.0 * F) * ((A + C) + math.hypot(B_m, (A - C)))))) / t_0 else: tmp = (math.sqrt((2.0 * F)) / -1.0) * (math.sqrt(B_m) / B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m)) tmp = 0.0 if (B_m <= 1.9e-160) tmp = Float64(Float64((Float64(C * Float64(F * -16.0)) ^ 0.5) * abs(A)) / t_0); elseif (B_m <= 3.2e+66) tmp = Float64(sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(A * Float64(C * -4.0))) * Float64(Float64(2.0 * F) * Float64(Float64(A + C) + hypot(B_m, Float64(A - C)))))) / t_0); else tmp = Float64(Float64(sqrt(Float64(2.0 * F)) / -1.0) * Float64(sqrt(B_m) / B_m)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = ((4.0 * A) * C) - (B_m * B_m); tmp = 0.0; if (B_m <= 1.9e-160) tmp = (((C * (F * -16.0)) ^ 0.5) * abs(A)) / t_0; elseif (B_m <= 3.2e+66) tmp = sqrt((((B_m * B_m) + (A * (C * -4.0))) * ((2.0 * F) * ((A + C) + hypot(B_m, (A - C)))))) / t_0; else tmp = (sqrt((2.0 * F)) / -1.0) * (sqrt(B_m) / B_m); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 1.9e-160], N[(N[(N[Power[N[(C * N[(F * -16.0), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] * N[Abs[A], $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[B$95$m, 3.2e+66], N[(N[Sqrt[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * F), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] + 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[(2.0 * F), $MachinePrecision]], $MachinePrecision] / -1.0), $MachinePrecision] * N[(N[Sqrt[B$95$m], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := \left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\
\mathbf{if}\;B\_m \leq 1.9 \cdot 10^{-160}:\\
\;\;\;\;\frac{{\left(C \cdot \left(F \cdot -16\right)\right)}^{0.5} \cdot \left|A\right|}{t\_0}\\
\mathbf{elif}\;B\_m \leq 3.2 \cdot 10^{+66}:\\
\;\;\;\;\frac{\sqrt{\left(B\_m \cdot B\_m + A \cdot \left(C \cdot -4\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(B\_m, A - C\right)\right)\right)}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2 \cdot F}}{-1} \cdot \frac{\sqrt{B\_m}}{B\_m}\\
\end{array}
\end{array}
if B < 1.8999999999999999e-160Initial program 20.4%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.6%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6410.8%
Simplified10.8%
pow1/2N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
unpow-prod-downN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
pow1/2N/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f6417.4%
Applied egg-rr17.4%
if 1.8999999999999999e-160 < B < 3.2e66Initial program 31.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified40.2%
if 3.2e66 < B Initial program 2.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified2.6%
Applied egg-rr12.4%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6415.3%
Simplified15.3%
Taylor expanded in A around 0
Simplified51.0%
associate-*l/N/A
distribute-neg-frac2N/A
sqrt-prodN/A
pow1/2N/A
associate-*r*N/A
neg-mul-1N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f6472.2%
Applied egg-rr72.2%
Final simplification33.2%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (- (* (* 4.0 A) C) (* B_m B_m))))
(if (<= B_m 8.2e-144)
(/ (* (pow (* C (* F -16.0)) 0.5) (fabs A)) t_0)
(if (<= B_m 6.2e-70)
(/
1.0
(/
(- (* 4.0 (* A C)) (* B_m B_m))
(sqrt (* (* 4.0 C) (* F (+ (* B_m B_m) (* A (* C -4.0))))))))
(if (<= B_m 3.1e+66)
(/
(sqrt (* (* B_m B_m) (* (* 2.0 F) (+ (+ A C) (hypot B_m (- A C))))))
t_0)
(* (/ (sqrt (* 2.0 F)) -1.0) (/ (sqrt B_m) B_m)))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (B_m <= 8.2e-144) {
tmp = (pow((C * (F * -16.0)), 0.5) * fabs(A)) / t_0;
} else if (B_m <= 6.2e-70) {
tmp = 1.0 / (((4.0 * (A * C)) - (B_m * B_m)) / sqrt(((4.0 * C) * (F * ((B_m * B_m) + (A * (C * -4.0)))))));
} else if (B_m <= 3.1e+66) {
tmp = sqrt(((B_m * B_m) * ((2.0 * F) * ((A + C) + hypot(B_m, (A - C)))))) / t_0;
} else {
tmp = (sqrt((2.0 * F)) / -1.0) * (sqrt(B_m) / B_m);
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (B_m <= 8.2e-144) {
tmp = (Math.pow((C * (F * -16.0)), 0.5) * Math.abs(A)) / t_0;
} else if (B_m <= 6.2e-70) {
tmp = 1.0 / (((4.0 * (A * C)) - (B_m * B_m)) / Math.sqrt(((4.0 * C) * (F * ((B_m * B_m) + (A * (C * -4.0)))))));
} else if (B_m <= 3.1e+66) {
tmp = Math.sqrt(((B_m * B_m) * ((2.0 * F) * ((A + C) + Math.hypot(B_m, (A - C)))))) / t_0;
} else {
tmp = (Math.sqrt((2.0 * F)) / -1.0) * (Math.sqrt(B_m) / B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = ((4.0 * A) * C) - (B_m * B_m) tmp = 0 if B_m <= 8.2e-144: tmp = (math.pow((C * (F * -16.0)), 0.5) * math.fabs(A)) / t_0 elif B_m <= 6.2e-70: tmp = 1.0 / (((4.0 * (A * C)) - (B_m * B_m)) / math.sqrt(((4.0 * C) * (F * ((B_m * B_m) + (A * (C * -4.0))))))) elif B_m <= 3.1e+66: tmp = math.sqrt(((B_m * B_m) * ((2.0 * F) * ((A + C) + math.hypot(B_m, (A - C)))))) / t_0 else: tmp = (math.sqrt((2.0 * F)) / -1.0) * (math.sqrt(B_m) / B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m)) tmp = 0.0 if (B_m <= 8.2e-144) tmp = Float64(Float64((Float64(C * Float64(F * -16.0)) ^ 0.5) * abs(A)) / t_0); elseif (B_m <= 6.2e-70) tmp = Float64(1.0 / Float64(Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m)) / sqrt(Float64(Float64(4.0 * C) * Float64(F * Float64(Float64(B_m * B_m) + Float64(A * Float64(C * -4.0)))))))); elseif (B_m <= 3.1e+66) tmp = Float64(sqrt(Float64(Float64(B_m * B_m) * Float64(Float64(2.0 * F) * Float64(Float64(A + C) + hypot(B_m, Float64(A - C)))))) / t_0); else tmp = Float64(Float64(sqrt(Float64(2.0 * F)) / -1.0) * Float64(sqrt(B_m) / B_m)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = ((4.0 * A) * C) - (B_m * B_m); tmp = 0.0; if (B_m <= 8.2e-144) tmp = (((C * (F * -16.0)) ^ 0.5) * abs(A)) / t_0; elseif (B_m <= 6.2e-70) tmp = 1.0 / (((4.0 * (A * C)) - (B_m * B_m)) / sqrt(((4.0 * C) * (F * ((B_m * B_m) + (A * (C * -4.0))))))); elseif (B_m <= 3.1e+66) tmp = sqrt(((B_m * B_m) * ((2.0 * F) * ((A + C) + hypot(B_m, (A - C)))))) / t_0; else tmp = (sqrt((2.0 * F)) / -1.0) * (sqrt(B_m) / B_m); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 8.2e-144], N[(N[(N[Power[N[(C * N[(F * -16.0), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] * N[Abs[A], $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[B$95$m, 6.2e-70], N[(1.0 / N[(N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(N[(4.0 * C), $MachinePrecision] * N[(F * N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 3.1e+66], N[(N[Sqrt[N[(N[(B$95$m * B$95$m), $MachinePrecision] * N[(N[(2.0 * F), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] + 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[(2.0 * F), $MachinePrecision]], $MachinePrecision] / -1.0), $MachinePrecision] * N[(N[Sqrt[B$95$m], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := \left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\
\mathbf{if}\;B\_m \leq 8.2 \cdot 10^{-144}:\\
\;\;\;\;\frac{{\left(C \cdot \left(F \cdot -16\right)\right)}^{0.5} \cdot \left|A\right|}{t\_0}\\
\mathbf{elif}\;B\_m \leq 6.2 \cdot 10^{-70}:\\
\;\;\;\;\frac{1}{\frac{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m}{\sqrt{\left(4 \cdot C\right) \cdot \left(F \cdot \left(B\_m \cdot B\_m + A \cdot \left(C \cdot -4\right)\right)\right)}}}\\
\mathbf{elif}\;B\_m \leq 3.1 \cdot 10^{+66}:\\
\;\;\;\;\frac{\sqrt{\left(B\_m \cdot B\_m\right) \cdot \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(B\_m, A - C\right)\right)\right)}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2 \cdot F}}{-1} \cdot \frac{\sqrt{B\_m}}{B\_m}\\
\end{array}
\end{array}
if B < 8.2e-144Initial program 20.1%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.2%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6410.7%
Simplified10.7%
pow1/2N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
unpow-prod-downN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
pow1/2N/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f6417.2%
Applied egg-rr17.2%
if 8.2e-144 < B < 6.2e-70Initial program 20.1%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified33.9%
Applied egg-rr34.8%
Taylor expanded in A around -inf
*-lowering-*.f6429.9%
Simplified29.9%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6434.3%
Applied egg-rr34.3%
if 6.2e-70 < B < 3.10000000000000019e66Initial program 40.2%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified46.2%
Taylor expanded in B around inf
unpow2N/A
*-lowering-*.f6436.2%
Simplified36.2%
if 3.10000000000000019e66 < B Initial program 2.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified2.6%
Applied egg-rr12.4%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6415.3%
Simplified15.3%
Taylor expanded in A around 0
Simplified51.0%
associate-*l/N/A
distribute-neg-frac2N/A
sqrt-prodN/A
pow1/2N/A
associate-*r*N/A
neg-mul-1N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f6472.2%
Applied egg-rr72.2%
Final simplification31.9%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (- (* (* 4.0 A) C) (* B_m B_m))))
(if (<= B_m 6.5e-157)
(/ (* (pow (* C (* F -16.0)) 0.5) (fabs A)) t_0)
(if (<= B_m 12500000000.0)
(/
(*
(sqrt (* 2.0 (* F (+ (* B_m B_m) (* -4.0 (* A C))))))
(sqrt (* 2.0 C)))
t_0)
(* (/ (sqrt (* 2.0 F)) -1.0) (/ (sqrt B_m) B_m))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (B_m <= 6.5e-157) {
tmp = (pow((C * (F * -16.0)), 0.5) * fabs(A)) / t_0;
} else if (B_m <= 12500000000.0) {
tmp = (sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C)))))) * sqrt((2.0 * C))) / t_0;
} else {
tmp = (sqrt((2.0 * F)) / -1.0) * (sqrt(B_m) / 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) :: t_0
real(8) :: tmp
t_0 = ((4.0d0 * a) * c) - (b_m * b_m)
if (b_m <= 6.5d-157) then
tmp = (((c * (f * (-16.0d0))) ** 0.5d0) * abs(a)) / t_0
else if (b_m <= 12500000000.0d0) then
tmp = (sqrt((2.0d0 * (f * ((b_m * b_m) + ((-4.0d0) * (a * c)))))) * sqrt((2.0d0 * c))) / t_0
else
tmp = (sqrt((2.0d0 * f)) / (-1.0d0)) * (sqrt(b_m) / 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 t_0 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (B_m <= 6.5e-157) {
tmp = (Math.pow((C * (F * -16.0)), 0.5) * Math.abs(A)) / t_0;
} else if (B_m <= 12500000000.0) {
tmp = (Math.sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C)))))) * Math.sqrt((2.0 * C))) / t_0;
} else {
tmp = (Math.sqrt((2.0 * F)) / -1.0) * (Math.sqrt(B_m) / B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = ((4.0 * A) * C) - (B_m * B_m) tmp = 0 if B_m <= 6.5e-157: tmp = (math.pow((C * (F * -16.0)), 0.5) * math.fabs(A)) / t_0 elif B_m <= 12500000000.0: tmp = (math.sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C)))))) * math.sqrt((2.0 * C))) / t_0 else: tmp = (math.sqrt((2.0 * F)) / -1.0) * (math.sqrt(B_m) / B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m)) tmp = 0.0 if (B_m <= 6.5e-157) tmp = Float64(Float64((Float64(C * Float64(F * -16.0)) ^ 0.5) * abs(A)) / t_0); elseif (B_m <= 12500000000.0) tmp = Float64(Float64(sqrt(Float64(2.0 * Float64(F * Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C)))))) * sqrt(Float64(2.0 * C))) / t_0); else tmp = Float64(Float64(sqrt(Float64(2.0 * F)) / -1.0) * Float64(sqrt(B_m) / B_m)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = ((4.0 * A) * C) - (B_m * B_m); tmp = 0.0; if (B_m <= 6.5e-157) tmp = (((C * (F * -16.0)) ^ 0.5) * abs(A)) / t_0; elseif (B_m <= 12500000000.0) tmp = (sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C)))))) * sqrt((2.0 * C))) / t_0; else tmp = (sqrt((2.0 * F)) / -1.0) * (sqrt(B_m) / B_m); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 6.5e-157], N[(N[(N[Power[N[(C * N[(F * -16.0), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] * N[Abs[A], $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[B$95$m, 12500000000.0], N[(N[(N[Sqrt[N[(2.0 * N[(F * N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(N[Sqrt[N[(2.0 * F), $MachinePrecision]], $MachinePrecision] / -1.0), $MachinePrecision] * N[(N[Sqrt[B$95$m], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := \left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\
\mathbf{if}\;B\_m \leq 6.5 \cdot 10^{-157}:\\
\;\;\;\;\frac{{\left(C \cdot \left(F \cdot -16\right)\right)}^{0.5} \cdot \left|A\right|}{t\_0}\\
\mathbf{elif}\;B\_m \leq 12500000000:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right)\right)} \cdot \sqrt{2 \cdot C}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2 \cdot F}}{-1} \cdot \frac{\sqrt{B\_m}}{B\_m}\\
\end{array}
\end{array}
if B < 6.5000000000000002e-157Initial program 20.4%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.6%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6410.8%
Simplified10.8%
pow1/2N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
unpow-prod-downN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
pow1/2N/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f6417.4%
Applied egg-rr17.4%
if 6.5000000000000002e-157 < B < 1.25e10Initial program 31.8%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified41.2%
Applied egg-rr43.5%
Taylor expanded in A around -inf
*-lowering-*.f6431.7%
Simplified31.7%
if 1.25e10 < B Initial program 9.9%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified11.6%
Applied egg-rr20.4%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6419.6%
Simplified19.6%
Taylor expanded in A around 0
Simplified46.4%
associate-*l/N/A
distribute-neg-frac2N/A
sqrt-prodN/A
pow1/2N/A
associate-*r*N/A
neg-mul-1N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f6462.2%
Applied egg-rr62.2%
Final simplification31.3%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 3.25e+66)
(/
(sqrt
(*
2.0
(*
(+ A (+ C (hypot B_m (- A C))))
(* F (+ (* B_m B_m) (* -4.0 (* A C)))))))
(- (* (* 4.0 A) C) (* B_m B_m)))
(* (/ (sqrt (* 2.0 F)) -1.0) (/ (sqrt B_m) B_m))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 3.25e+66) {
tmp = sqrt((2.0 * ((A + (C + hypot(B_m, (A - C)))) * (F * ((B_m * B_m) + (-4.0 * (A * C))))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = (sqrt((2.0 * F)) / -1.0) * (sqrt(B_m) / B_m);
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 3.25e+66) {
tmp = Math.sqrt((2.0 * ((A + (C + Math.hypot(B_m, (A - C)))) * (F * ((B_m * B_m) + (-4.0 * (A * C))))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = (Math.sqrt((2.0 * F)) / -1.0) * (Math.sqrt(B_m) / B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 3.25e+66: tmp = math.sqrt((2.0 * ((A + (C + math.hypot(B_m, (A - C)))) * (F * ((B_m * B_m) + (-4.0 * (A * C))))))) / (((4.0 * A) * C) - (B_m * B_m)) else: tmp = (math.sqrt((2.0 * F)) / -1.0) * (math.sqrt(B_m) / B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 3.25e+66) tmp = Float64(sqrt(Float64(2.0 * Float64(Float64(A + Float64(C + hypot(B_m, Float64(A - C)))) * Float64(F * Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))))))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); else tmp = Float64(Float64(sqrt(Float64(2.0 * F)) / -1.0) * Float64(sqrt(B_m) / B_m)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 3.25e+66) tmp = sqrt((2.0 * ((A + (C + hypot(B_m, (A - C)))) * (F * ((B_m * B_m) + (-4.0 * (A * C))))))) / (((4.0 * A) * C) - (B_m * B_m)); else tmp = (sqrt((2.0 * F)) / -1.0) * (sqrt(B_m) / B_m); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 3.25e+66], N[(N[Sqrt[N[(2.0 * N[(N[(A + N[(C + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(F * N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(2.0 * F), $MachinePrecision]], $MachinePrecision] / -1.0), $MachinePrecision] * N[(N[Sqrt[B$95$m], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 3.25 \cdot 10^{+66}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(\left(A + \left(C + \mathsf{hypot}\left(B\_m, A - C\right)\right)\right) \cdot \left(F \cdot \left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2 \cdot F}}{-1} \cdot \frac{\sqrt{B\_m}}{B\_m}\\
\end{array}
\end{array}
if B < 3.2500000000000001e66Initial program 23.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified30.5%
Applied egg-rr30.4%
if 3.2500000000000001e66 < B Initial program 2.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified2.6%
Applied egg-rr12.4%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6415.3%
Simplified15.3%
Taylor expanded in A around 0
Simplified51.0%
associate-*l/N/A
distribute-neg-frac2N/A
sqrt-prodN/A
pow1/2N/A
associate-*r*N/A
neg-mul-1N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f6472.2%
Applied egg-rr72.2%
Final simplification38.4%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 7.6e-147)
(/ (* (pow (* C (* F -16.0)) 0.5) (fabs A)) (- (* (* 4.0 A) C) (* B_m B_m)))
(if (<= B_m 0.0059)
(/
1.0
(/
(- (* 4.0 (* A C)) (* B_m B_m))
(sqrt (* (* 4.0 C) (* F (+ (* B_m B_m) (* A (* C -4.0))))))))
(* (/ (sqrt (* 2.0 F)) -1.0) (/ (sqrt B_m) B_m)))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 7.6e-147) {
tmp = (pow((C * (F * -16.0)), 0.5) * fabs(A)) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 0.0059) {
tmp = 1.0 / (((4.0 * (A * C)) - (B_m * B_m)) / sqrt(((4.0 * C) * (F * ((B_m * B_m) + (A * (C * -4.0)))))));
} else {
tmp = (sqrt((2.0 * F)) / -1.0) * (sqrt(B_m) / 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 (b_m <= 7.6d-147) then
tmp = (((c * (f * (-16.0d0))) ** 0.5d0) * abs(a)) / (((4.0d0 * a) * c) - (b_m * b_m))
else if (b_m <= 0.0059d0) then
tmp = 1.0d0 / (((4.0d0 * (a * c)) - (b_m * b_m)) / sqrt(((4.0d0 * c) * (f * ((b_m * b_m) + (a * (c * (-4.0d0))))))))
else
tmp = (sqrt((2.0d0 * f)) / (-1.0d0)) * (sqrt(b_m) / 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 (B_m <= 7.6e-147) {
tmp = (Math.pow((C * (F * -16.0)), 0.5) * Math.abs(A)) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 0.0059) {
tmp = 1.0 / (((4.0 * (A * C)) - (B_m * B_m)) / Math.sqrt(((4.0 * C) * (F * ((B_m * B_m) + (A * (C * -4.0)))))));
} else {
tmp = (Math.sqrt((2.0 * F)) / -1.0) * (Math.sqrt(B_m) / B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 7.6e-147: tmp = (math.pow((C * (F * -16.0)), 0.5) * math.fabs(A)) / (((4.0 * A) * C) - (B_m * B_m)) elif B_m <= 0.0059: tmp = 1.0 / (((4.0 * (A * C)) - (B_m * B_m)) / math.sqrt(((4.0 * C) * (F * ((B_m * B_m) + (A * (C * -4.0))))))) else: tmp = (math.sqrt((2.0 * F)) / -1.0) * (math.sqrt(B_m) / B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 7.6e-147) tmp = Float64(Float64((Float64(C * Float64(F * -16.0)) ^ 0.5) * abs(A)) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); elseif (B_m <= 0.0059) tmp = Float64(1.0 / Float64(Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m)) / sqrt(Float64(Float64(4.0 * C) * Float64(F * Float64(Float64(B_m * B_m) + Float64(A * Float64(C * -4.0)))))))); else tmp = Float64(Float64(sqrt(Float64(2.0 * F)) / -1.0) * Float64(sqrt(B_m) / B_m)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 7.6e-147) tmp = (((C * (F * -16.0)) ^ 0.5) * abs(A)) / (((4.0 * A) * C) - (B_m * B_m)); elseif (B_m <= 0.0059) tmp = 1.0 / (((4.0 * (A * C)) - (B_m * B_m)) / sqrt(((4.0 * C) * (F * ((B_m * B_m) + (A * (C * -4.0))))))); else tmp = (sqrt((2.0 * F)) / -1.0) * (sqrt(B_m) / B_m); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 7.6e-147], N[(N[(N[Power[N[(C * N[(F * -16.0), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] * N[Abs[A], $MachinePrecision]), $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 0.0059], N[(1.0 / N[(N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(N[(4.0 * C), $MachinePrecision] * N[(F * N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(2.0 * F), $MachinePrecision]], $MachinePrecision] / -1.0), $MachinePrecision] * N[(N[Sqrt[B$95$m], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 7.6 \cdot 10^{-147}:\\
\;\;\;\;\frac{{\left(C \cdot \left(F \cdot -16\right)\right)}^{0.5} \cdot \left|A\right|}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{elif}\;B\_m \leq 0.0059:\\
\;\;\;\;\frac{1}{\frac{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m}{\sqrt{\left(4 \cdot C\right) \cdot \left(F \cdot \left(B\_m \cdot B\_m + A \cdot \left(C \cdot -4\right)\right)\right)}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2 \cdot F}}{-1} \cdot \frac{\sqrt{B\_m}}{B\_m}\\
\end{array}
\end{array}
if B < 7.60000000000000055e-147Initial program 20.1%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.2%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6410.7%
Simplified10.7%
pow1/2N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
unpow-prod-downN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
pow1/2N/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f6417.2%
Applied egg-rr17.2%
if 7.60000000000000055e-147 < B < 0.00589999999999999986Initial program 34.8%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified45.1%
Applied egg-rr45.6%
Taylor expanded in A around -inf
*-lowering-*.f6430.4%
Simplified30.4%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6430.5%
Applied egg-rr30.5%
if 0.00589999999999999986 < B Initial program 9.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified11.4%
Applied egg-rr22.7%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6419.1%
Simplified19.1%
Taylor expanded in A around 0
Simplified45.2%
associate-*l/N/A
distribute-neg-frac2N/A
sqrt-prodN/A
pow1/2N/A
associate-*r*N/A
neg-mul-1N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f6460.6%
Applied egg-rr60.6%
Final simplification30.7%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= F 2.8e-307)
(/
(sqrt (* (+ (* B_m B_m) (* A (* C -4.0))) (* F (* 4.0 C))))
(- (* A (* 4.0 C)) (* B_m B_m)))
(if (<= F 2.9e+28)
(/ -1.0 (/ B_m (sqrt (* 2.0 (* B_m F)))))
(- 0.0 (* (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.8e-307) {
tmp = sqrt((((B_m * B_m) + (A * (C * -4.0))) * (F * (4.0 * C)))) / ((A * (4.0 * C)) - (B_m * B_m));
} else if (F <= 2.9e+28) {
tmp = -1.0 / (B_m / sqrt((2.0 * (B_m * F))));
} else {
tmp = 0.0 - (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.8d-307) then
tmp = sqrt((((b_m * b_m) + (a * (c * (-4.0d0)))) * (f * (4.0d0 * c)))) / ((a * (4.0d0 * c)) - (b_m * b_m))
else if (f <= 2.9d+28) then
tmp = (-1.0d0) / (b_m / sqrt((2.0d0 * (b_m * f))))
else
tmp = 0.0d0 - (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.8e-307) {
tmp = Math.sqrt((((B_m * B_m) + (A * (C * -4.0))) * (F * (4.0 * C)))) / ((A * (4.0 * C)) - (B_m * B_m));
} else if (F <= 2.9e+28) {
tmp = -1.0 / (B_m / Math.sqrt((2.0 * (B_m * F))));
} else {
tmp = 0.0 - (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.8e-307: tmp = math.sqrt((((B_m * B_m) + (A * (C * -4.0))) * (F * (4.0 * C)))) / ((A * (4.0 * C)) - (B_m * B_m)) elif F <= 2.9e+28: tmp = -1.0 / (B_m / math.sqrt((2.0 * (B_m * F)))) else: tmp = 0.0 - (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.8e-307) tmp = Float64(sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(A * Float64(C * -4.0))) * Float64(F * Float64(4.0 * C)))) / Float64(Float64(A * Float64(4.0 * C)) - Float64(B_m * B_m))); elseif (F <= 2.9e+28) tmp = Float64(-1.0 / Float64(B_m / sqrt(Float64(2.0 * Float64(B_m * F))))); else tmp = Float64(0.0 - Float64(sqrt(Float64(F / B_m)) * 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.8e-307) tmp = sqrt((((B_m * B_m) + (A * (C * -4.0))) * (F * (4.0 * C)))) / ((A * (4.0 * C)) - (B_m * B_m)); elseif (F <= 2.9e+28) tmp = -1.0 / (B_m / sqrt((2.0 * (B_m * F)))); else tmp = 0.0 - (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.8e-307], N[(N[Sqrt[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(F * N[(4.0 * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(A * N[(4.0 * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.9e+28], N[(-1.0 / N[(B$95$m / N[Sqrt[N[(2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.0 - N[(N[Sqrt[N[(F / B$95$m), $MachinePrecision]], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;F \leq 2.8 \cdot 10^{-307}:\\
\;\;\;\;\frac{\sqrt{\left(B\_m \cdot B\_m + A \cdot \left(C \cdot -4\right)\right) \cdot \left(F \cdot \left(4 \cdot C\right)\right)}}{A \cdot \left(4 \cdot C\right) - B\_m \cdot B\_m}\\
\mathbf{elif}\;F \leq 2.9 \cdot 10^{+28}:\\
\;\;\;\;\frac{-1}{\frac{B\_m}{\sqrt{2 \cdot \left(B\_m \cdot F\right)}}}\\
\mathbf{else}:\\
\;\;\;\;0 - \sqrt{\frac{F}{B\_m}} \cdot \sqrt{2}\\
\end{array}
\end{array}
if F < 2.8e-307Initial program 34.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified58.4%
Applied egg-rr58.3%
Taylor expanded in A around -inf
*-lowering-*.f6437.2%
Simplified37.2%
clear-numN/A
/-lowering-/.f64N/A
Applied egg-rr37.3%
if 2.8e-307 < F < 2.9000000000000001e28Initial program 16.0%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified19.9%
Applied egg-rr26.3%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6413.2%
Simplified13.2%
Taylor expanded in A around 0
Simplified25.3%
associate-*l/N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6425.5%
Applied egg-rr25.5%
if 2.9000000000000001e28 < F Initial program 17.8%
Taylor expanded in B around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f6418.8%
Simplified18.8%
Final simplification24.8%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 0.00145)
(/
(sqrt (* (+ (* B_m B_m) (* A (* C -4.0))) (* F (* 4.0 C))))
(- (* A (* 4.0 C)) (* B_m B_m)))
(* (/ (sqrt (* 2.0 F)) -1.0) (/ (sqrt B_m) B_m))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 0.00145) {
tmp = sqrt((((B_m * B_m) + (A * (C * -4.0))) * (F * (4.0 * C)))) / ((A * (4.0 * C)) - (B_m * B_m));
} else {
tmp = (sqrt((2.0 * F)) / -1.0) * (sqrt(B_m) / 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 (b_m <= 0.00145d0) then
tmp = sqrt((((b_m * b_m) + (a * (c * (-4.0d0)))) * (f * (4.0d0 * c)))) / ((a * (4.0d0 * c)) - (b_m * b_m))
else
tmp = (sqrt((2.0d0 * f)) / (-1.0d0)) * (sqrt(b_m) / 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 (B_m <= 0.00145) {
tmp = Math.sqrt((((B_m * B_m) + (A * (C * -4.0))) * (F * (4.0 * C)))) / ((A * (4.0 * C)) - (B_m * B_m));
} else {
tmp = (Math.sqrt((2.0 * F)) / -1.0) * (Math.sqrt(B_m) / B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 0.00145: tmp = math.sqrt((((B_m * B_m) + (A * (C * -4.0))) * (F * (4.0 * C)))) / ((A * (4.0 * C)) - (B_m * B_m)) else: tmp = (math.sqrt((2.0 * F)) / -1.0) * (math.sqrt(B_m) / B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 0.00145) tmp = Float64(sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(A * Float64(C * -4.0))) * Float64(F * Float64(4.0 * C)))) / Float64(Float64(A * Float64(4.0 * C)) - Float64(B_m * B_m))); else tmp = Float64(Float64(sqrt(Float64(2.0 * F)) / -1.0) * Float64(sqrt(B_m) / B_m)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 0.00145) tmp = sqrt((((B_m * B_m) + (A * (C * -4.0))) * (F * (4.0 * C)))) / ((A * (4.0 * C)) - (B_m * B_m)); else tmp = (sqrt((2.0 * F)) / -1.0) * (sqrt(B_m) / B_m); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 0.00145], N[(N[Sqrt[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(F * N[(4.0 * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(A * N[(4.0 * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(2.0 * F), $MachinePrecision]], $MachinePrecision] / -1.0), $MachinePrecision] * N[(N[Sqrt[B$95$m], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 0.00145:\\
\;\;\;\;\frac{\sqrt{\left(B\_m \cdot B\_m + A \cdot \left(C \cdot -4\right)\right) \cdot \left(F \cdot \left(4 \cdot C\right)\right)}}{A \cdot \left(4 \cdot C\right) - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2 \cdot F}}{-1} \cdot \frac{\sqrt{B\_m}}{B\_m}\\
\end{array}
\end{array}
if B < 0.00145Initial program 23.2%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified30.2%
Applied egg-rr30.9%
Taylor expanded in A around -inf
*-lowering-*.f6419.7%
Simplified19.7%
clear-numN/A
/-lowering-/.f64N/A
Applied egg-rr19.7%
if 0.00145 < B Initial program 9.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified11.4%
Applied egg-rr22.7%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6419.1%
Simplified19.1%
Taylor expanded in A around 0
Simplified45.2%
associate-*l/N/A
distribute-neg-frac2N/A
sqrt-prodN/A
pow1/2N/A
associate-*r*N/A
neg-mul-1N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f6460.6%
Applied egg-rr60.6%
Final simplification30.5%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (- (* 4.0 (* A C)) (* B_m B_m))) (t_1 (/ (* B_m B_m) A)))
(if (<= A -7.5e+53)
(/
1.0
(/
t_0
(sqrt
(*
(+ (* B_m B_m) (* -4.0 (* A C)))
(* (* 2.0 F) (+ (* 2.0 C) (* -0.5 t_1)))))))
(if (<= A 3.4e-15)
(/ -1.0 (/ B_m (sqrt (* 2.0 (* B_m F)))))
(*
(/ A t_0)
(sqrt
(*
F
(+
(* C -16.0)
(*
2.0
(+ (* -2.0 (/ (* C (* B_m B_m)) (* A A))) (* 2.0 t_1)))))))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = (4.0 * (A * C)) - (B_m * B_m);
double t_1 = (B_m * B_m) / A;
double tmp;
if (A <= -7.5e+53) {
tmp = 1.0 / (t_0 / sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((2.0 * F) * ((2.0 * C) + (-0.5 * t_1))))));
} else if (A <= 3.4e-15) {
tmp = -1.0 / (B_m / sqrt((2.0 * (B_m * F))));
} else {
tmp = (A / t_0) * sqrt((F * ((C * -16.0) + (2.0 * ((-2.0 * ((C * (B_m * B_m)) / (A * A))) + (2.0 * t_1))))));
}
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) :: t_1
real(8) :: tmp
t_0 = (4.0d0 * (a * c)) - (b_m * b_m)
t_1 = (b_m * b_m) / a
if (a <= (-7.5d+53)) then
tmp = 1.0d0 / (t_0 / sqrt((((b_m * b_m) + ((-4.0d0) * (a * c))) * ((2.0d0 * f) * ((2.0d0 * c) + ((-0.5d0) * t_1))))))
else if (a <= 3.4d-15) then
tmp = (-1.0d0) / (b_m / sqrt((2.0d0 * (b_m * f))))
else
tmp = (a / t_0) * sqrt((f * ((c * (-16.0d0)) + (2.0d0 * (((-2.0d0) * ((c * (b_m * b_m)) / (a * a))) + (2.0d0 * t_1))))))
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 = (4.0 * (A * C)) - (B_m * B_m);
double t_1 = (B_m * B_m) / A;
double tmp;
if (A <= -7.5e+53) {
tmp = 1.0 / (t_0 / Math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((2.0 * F) * ((2.0 * C) + (-0.5 * t_1))))));
} else if (A <= 3.4e-15) {
tmp = -1.0 / (B_m / Math.sqrt((2.0 * (B_m * F))));
} else {
tmp = (A / t_0) * Math.sqrt((F * ((C * -16.0) + (2.0 * ((-2.0 * ((C * (B_m * B_m)) / (A * A))) + (2.0 * t_1))))));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = (4.0 * (A * C)) - (B_m * B_m) t_1 = (B_m * B_m) / A tmp = 0 if A <= -7.5e+53: tmp = 1.0 / (t_0 / math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((2.0 * F) * ((2.0 * C) + (-0.5 * t_1)))))) elif A <= 3.4e-15: tmp = -1.0 / (B_m / math.sqrt((2.0 * (B_m * F)))) else: tmp = (A / t_0) * math.sqrt((F * ((C * -16.0) + (2.0 * ((-2.0 * ((C * (B_m * B_m)) / (A * A))) + (2.0 * t_1)))))) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m)) t_1 = Float64(Float64(B_m * B_m) / A) tmp = 0.0 if (A <= -7.5e+53) tmp = Float64(1.0 / Float64(t_0 / sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(Float64(2.0 * F) * Float64(Float64(2.0 * C) + Float64(-0.5 * t_1))))))); elseif (A <= 3.4e-15) tmp = Float64(-1.0 / Float64(B_m / sqrt(Float64(2.0 * Float64(B_m * F))))); else tmp = Float64(Float64(A / t_0) * sqrt(Float64(F * Float64(Float64(C * -16.0) + Float64(2.0 * Float64(Float64(-2.0 * Float64(Float64(C * Float64(B_m * B_m)) / Float64(A * A))) + Float64(2.0 * t_1))))))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = (4.0 * (A * C)) - (B_m * B_m); t_1 = (B_m * B_m) / A; tmp = 0.0; if (A <= -7.5e+53) tmp = 1.0 / (t_0 / sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((2.0 * F) * ((2.0 * C) + (-0.5 * t_1)))))); elseif (A <= 3.4e-15) tmp = -1.0 / (B_m / sqrt((2.0 * (B_m * F)))); else tmp = (A / t_0) * sqrt((F * ((C * -16.0) + (2.0 * ((-2.0 * ((C * (B_m * B_m)) / (A * A))) + (2.0 * t_1)))))); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(B$95$m * B$95$m), $MachinePrecision] / A), $MachinePrecision]}, If[LessEqual[A, -7.5e+53], N[(1.0 / N[(t$95$0 / N[Sqrt[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * F), $MachinePrecision] * N[(N[(2.0 * C), $MachinePrecision] + N[(-0.5 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 3.4e-15], N[(-1.0 / N[(B$95$m / N[Sqrt[N[(2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(A / t$95$0), $MachinePrecision] * N[Sqrt[N[(F * N[(N[(C * -16.0), $MachinePrecision] + N[(2.0 * N[(N[(-2.0 * N[(N[(C * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] / N[(A * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := 4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m\\
t_1 := \frac{B\_m \cdot B\_m}{A}\\
\mathbf{if}\;A \leq -7.5 \cdot 10^{+53}:\\
\;\;\;\;\frac{1}{\frac{t\_0}{\sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \left(2 \cdot C + -0.5 \cdot t\_1\right)\right)}}}\\
\mathbf{elif}\;A \leq 3.4 \cdot 10^{-15}:\\
\;\;\;\;\frac{-1}{\frac{B\_m}{\sqrt{2 \cdot \left(B\_m \cdot F\right)}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{A}{t\_0} \cdot \sqrt{F \cdot \left(C \cdot -16 + 2 \cdot \left(-2 \cdot \frac{C \cdot \left(B\_m \cdot B\_m\right)}{A \cdot A} + 2 \cdot t\_1\right)\right)}\\
\end{array}
\end{array}
if A < -7.4999999999999997e53Initial program 1.2%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified2.3%
Applied egg-rr2.3%
Taylor expanded in A around -inf
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6429.1%
Simplified29.1%
if -7.4999999999999997e53 < A < 3.4e-15Initial program 24.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified30.2%
Applied egg-rr39.9%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6414.7%
Simplified14.7%
Taylor expanded in A around 0
Simplified24.6%
associate-*l/N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6424.8%
Applied egg-rr24.8%
if 3.4e-15 < A Initial program 25.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified35.5%
Taylor expanded in A around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
Simplified19.0%
Taylor expanded in F around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
Simplified31.4%
Final simplification27.3%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= C -6.5e+197)
(/ (sqrt (* (* F -16.0) (* A (* A C)))) (- (* (* 4.0 A) C) (* B_m B_m)))
(if (<= C 1.3e-72)
(/ -1.0 (/ B_m (sqrt (* 2.0 (* B_m F)))))
(/
(/ 1.0 (- (* A (* 4.0 C)) (* B_m B_m)))
(pow (* (+ (* B_m B_m) (* A (* C -4.0))) (* F (* 4.0 C))) -0.5)))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (C <= -6.5e+197) {
tmp = sqrt(((F * -16.0) * (A * (A * C)))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (C <= 1.3e-72) {
tmp = -1.0 / (B_m / sqrt((2.0 * (B_m * F))));
} else {
tmp = (1.0 / ((A * (4.0 * C)) - (B_m * B_m))) / pow((((B_m * B_m) + (A * (C * -4.0))) * (F * (4.0 * C))), -0.5);
}
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 (c <= (-6.5d+197)) then
tmp = sqrt(((f * (-16.0d0)) * (a * (a * c)))) / (((4.0d0 * a) * c) - (b_m * b_m))
else if (c <= 1.3d-72) then
tmp = (-1.0d0) / (b_m / sqrt((2.0d0 * (b_m * f))))
else
tmp = (1.0d0 / ((a * (4.0d0 * c)) - (b_m * b_m))) / ((((b_m * b_m) + (a * (c * (-4.0d0)))) * (f * (4.0d0 * c))) ** (-0.5d0))
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 (C <= -6.5e+197) {
tmp = Math.sqrt(((F * -16.0) * (A * (A * C)))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (C <= 1.3e-72) {
tmp = -1.0 / (B_m / Math.sqrt((2.0 * (B_m * F))));
} else {
tmp = (1.0 / ((A * (4.0 * C)) - (B_m * B_m))) / Math.pow((((B_m * B_m) + (A * (C * -4.0))) * (F * (4.0 * C))), -0.5);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if C <= -6.5e+197: tmp = math.sqrt(((F * -16.0) * (A * (A * C)))) / (((4.0 * A) * C) - (B_m * B_m)) elif C <= 1.3e-72: tmp = -1.0 / (B_m / math.sqrt((2.0 * (B_m * F)))) else: tmp = (1.0 / ((A * (4.0 * C)) - (B_m * B_m))) / math.pow((((B_m * B_m) + (A * (C * -4.0))) * (F * (4.0 * C))), -0.5) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (C <= -6.5e+197) tmp = Float64(sqrt(Float64(Float64(F * -16.0) * Float64(A * Float64(A * C)))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); elseif (C <= 1.3e-72) tmp = Float64(-1.0 / Float64(B_m / sqrt(Float64(2.0 * Float64(B_m * F))))); else tmp = Float64(Float64(1.0 / Float64(Float64(A * Float64(4.0 * C)) - Float64(B_m * B_m))) / (Float64(Float64(Float64(B_m * B_m) + Float64(A * Float64(C * -4.0))) * Float64(F * Float64(4.0 * C))) ^ -0.5)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (C <= -6.5e+197) tmp = sqrt(((F * -16.0) * (A * (A * C)))) / (((4.0 * A) * C) - (B_m * B_m)); elseif (C <= 1.3e-72) tmp = -1.0 / (B_m / sqrt((2.0 * (B_m * F)))); else tmp = (1.0 / ((A * (4.0 * C)) - (B_m * B_m))) / ((((B_m * B_m) + (A * (C * -4.0))) * (F * (4.0 * C))) ^ -0.5); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[C, -6.5e+197], N[(N[Sqrt[N[(N[(F * -16.0), $MachinePrecision] * N[(A * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.3e-72], N[(-1.0 / N[(B$95$m / N[Sqrt[N[(2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[(N[(A * N[(4.0 * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(F * N[(4.0 * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;C \leq -6.5 \cdot 10^{+197}:\\
\;\;\;\;\frac{\sqrt{\left(F \cdot -16\right) \cdot \left(A \cdot \left(A \cdot C\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{elif}\;C \leq 1.3 \cdot 10^{-72}:\\
\;\;\;\;\frac{-1}{\frac{B\_m}{\sqrt{2 \cdot \left(B\_m \cdot F\right)}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{A \cdot \left(4 \cdot C\right) - B\_m \cdot B\_m}}{{\left(\left(B\_m \cdot B\_m + A \cdot \left(C \cdot -4\right)\right) \cdot \left(F \cdot \left(4 \cdot C\right)\right)\right)}^{-0.5}}\\
\end{array}
\end{array}
if C < -6.49999999999999952e197Initial program 0.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified2.1%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6418.3%
Simplified18.3%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6427.5%
Applied egg-rr27.5%
if -6.49999999999999952e197 < C < 1.29999999999999998e-72Initial program 22.1%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified25.5%
Applied egg-rr29.4%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6414.0%
Simplified14.0%
Taylor expanded in A around 0
Simplified21.8%
associate-*l/N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6421.9%
Applied egg-rr21.9%
if 1.29999999999999998e-72 < C Initial program 20.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified31.3%
Applied egg-rr31.3%
Taylor expanded in A around -inf
*-lowering-*.f6437.0%
Simplified37.0%
div-invN/A
associate-/r*N/A
/-lowering-/.f64N/A
Applied egg-rr37.1%
Final simplification27.3%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= C -4e+197)
(/ (sqrt (* (* F -16.0) (* A (* A C)))) (- (* (* 4.0 A) C) (* B_m B_m)))
(if (<= C 9.6e-73)
(/ -1.0 (/ B_m (sqrt (* 2.0 (* B_m F)))))
(*
(sqrt (* (+ (* B_m B_m) (* A (* C -4.0))) (* F (* 4.0 C))))
(/ 1.0 (- (* A (* 4.0 C)) (* B_m B_m)))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (C <= -4e+197) {
tmp = sqrt(((F * -16.0) * (A * (A * C)))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (C <= 9.6e-73) {
tmp = -1.0 / (B_m / sqrt((2.0 * (B_m * F))));
} else {
tmp = sqrt((((B_m * B_m) + (A * (C * -4.0))) * (F * (4.0 * C)))) * (1.0 / ((A * (4.0 * C)) - (B_m * 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 (c <= (-4d+197)) then
tmp = sqrt(((f * (-16.0d0)) * (a * (a * c)))) / (((4.0d0 * a) * c) - (b_m * b_m))
else if (c <= 9.6d-73) then
tmp = (-1.0d0) / (b_m / sqrt((2.0d0 * (b_m * f))))
else
tmp = sqrt((((b_m * b_m) + (a * (c * (-4.0d0)))) * (f * (4.0d0 * c)))) * (1.0d0 / ((a * (4.0d0 * c)) - (b_m * 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 (C <= -4e+197) {
tmp = Math.sqrt(((F * -16.0) * (A * (A * C)))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (C <= 9.6e-73) {
tmp = -1.0 / (B_m / Math.sqrt((2.0 * (B_m * F))));
} else {
tmp = Math.sqrt((((B_m * B_m) + (A * (C * -4.0))) * (F * (4.0 * C)))) * (1.0 / ((A * (4.0 * C)) - (B_m * B_m)));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if C <= -4e+197: tmp = math.sqrt(((F * -16.0) * (A * (A * C)))) / (((4.0 * A) * C) - (B_m * B_m)) elif C <= 9.6e-73: tmp = -1.0 / (B_m / math.sqrt((2.0 * (B_m * F)))) else: tmp = math.sqrt((((B_m * B_m) + (A * (C * -4.0))) * (F * (4.0 * C)))) * (1.0 / ((A * (4.0 * C)) - (B_m * B_m))) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (C <= -4e+197) tmp = Float64(sqrt(Float64(Float64(F * -16.0) * Float64(A * Float64(A * C)))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); elseif (C <= 9.6e-73) tmp = Float64(-1.0 / Float64(B_m / sqrt(Float64(2.0 * Float64(B_m * F))))); else tmp = Float64(sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(A * Float64(C * -4.0))) * Float64(F * Float64(4.0 * C)))) * Float64(1.0 / Float64(Float64(A * Float64(4.0 * C)) - Float64(B_m * B_m)))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (C <= -4e+197) tmp = sqrt(((F * -16.0) * (A * (A * C)))) / (((4.0 * A) * C) - (B_m * B_m)); elseif (C <= 9.6e-73) tmp = -1.0 / (B_m / sqrt((2.0 * (B_m * F)))); else tmp = sqrt((((B_m * B_m) + (A * (C * -4.0))) * (F * (4.0 * C)))) * (1.0 / ((A * (4.0 * C)) - (B_m * B_m))); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[C, -4e+197], N[(N[Sqrt[N[(N[(F * -16.0), $MachinePrecision] * N[(A * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 9.6e-73], N[(-1.0 / N[(B$95$m / N[Sqrt[N[(2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(F * N[(4.0 * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / N[(N[(A * N[(4.0 * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;C \leq -4 \cdot 10^{+197}:\\
\;\;\;\;\frac{\sqrt{\left(F \cdot -16\right) \cdot \left(A \cdot \left(A \cdot C\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{elif}\;C \leq 9.6 \cdot 10^{-73}:\\
\;\;\;\;\frac{-1}{\frac{B\_m}{\sqrt{2 \cdot \left(B\_m \cdot F\right)}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(B\_m \cdot B\_m + A \cdot \left(C \cdot -4\right)\right) \cdot \left(F \cdot \left(4 \cdot C\right)\right)} \cdot \frac{1}{A \cdot \left(4 \cdot C\right) - B\_m \cdot B\_m}\\
\end{array}
\end{array}
if C < -3.9999999999999998e197Initial program 0.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified2.1%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6418.3%
Simplified18.3%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6427.5%
Applied egg-rr27.5%
if -3.9999999999999998e197 < C < 9.60000000000000022e-73Initial program 22.1%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified25.5%
Applied egg-rr29.4%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6414.0%
Simplified14.0%
Taylor expanded in A around 0
Simplified21.8%
associate-*l/N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6421.9%
Applied egg-rr21.9%
if 9.60000000000000022e-73 < C Initial program 20.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified31.3%
Applied egg-rr31.3%
Taylor expanded in A around -inf
*-lowering-*.f6437.0%
Simplified37.0%
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
Applied egg-rr37.0%
Final simplification27.3%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= C -1.26e+207)
(/ (sqrt (* (* F -16.0) (* A (* A C)))) (- (* (* 4.0 A) C) (* B_m B_m)))
(if (<= C 5.5e-72)
(/ -1.0 (/ B_m (sqrt (* 2.0 (* B_m F)))))
(/
(sqrt (* (+ (* B_m B_m) (* A (* C -4.0))) (* F (* 4.0 C))))
(- (* A (* 4.0 C)) (* B_m B_m))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (C <= -1.26e+207) {
tmp = sqrt(((F * -16.0) * (A * (A * C)))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (C <= 5.5e-72) {
tmp = -1.0 / (B_m / sqrt((2.0 * (B_m * F))));
} else {
tmp = sqrt((((B_m * B_m) + (A * (C * -4.0))) * (F * (4.0 * C)))) / ((A * (4.0 * C)) - (B_m * 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 (c <= (-1.26d+207)) then
tmp = sqrt(((f * (-16.0d0)) * (a * (a * c)))) / (((4.0d0 * a) * c) - (b_m * b_m))
else if (c <= 5.5d-72) then
tmp = (-1.0d0) / (b_m / sqrt((2.0d0 * (b_m * f))))
else
tmp = sqrt((((b_m * b_m) + (a * (c * (-4.0d0)))) * (f * (4.0d0 * c)))) / ((a * (4.0d0 * c)) - (b_m * 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 (C <= -1.26e+207) {
tmp = Math.sqrt(((F * -16.0) * (A * (A * C)))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (C <= 5.5e-72) {
tmp = -1.0 / (B_m / Math.sqrt((2.0 * (B_m * F))));
} else {
tmp = Math.sqrt((((B_m * B_m) + (A * (C * -4.0))) * (F * (4.0 * C)))) / ((A * (4.0 * C)) - (B_m * B_m));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if C <= -1.26e+207: tmp = math.sqrt(((F * -16.0) * (A * (A * C)))) / (((4.0 * A) * C) - (B_m * B_m)) elif C <= 5.5e-72: tmp = -1.0 / (B_m / math.sqrt((2.0 * (B_m * F)))) else: tmp = math.sqrt((((B_m * B_m) + (A * (C * -4.0))) * (F * (4.0 * C)))) / ((A * (4.0 * C)) - (B_m * B_m)) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (C <= -1.26e+207) tmp = Float64(sqrt(Float64(Float64(F * -16.0) * Float64(A * Float64(A * C)))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); elseif (C <= 5.5e-72) tmp = Float64(-1.0 / Float64(B_m / sqrt(Float64(2.0 * Float64(B_m * F))))); else tmp = Float64(sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(A * Float64(C * -4.0))) * Float64(F * Float64(4.0 * C)))) / Float64(Float64(A * Float64(4.0 * C)) - Float64(B_m * B_m))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (C <= -1.26e+207) tmp = sqrt(((F * -16.0) * (A * (A * C)))) / (((4.0 * A) * C) - (B_m * B_m)); elseif (C <= 5.5e-72) tmp = -1.0 / (B_m / sqrt((2.0 * (B_m * F)))); else tmp = sqrt((((B_m * B_m) + (A * (C * -4.0))) * (F * (4.0 * C)))) / ((A * (4.0 * C)) - (B_m * B_m)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[C, -1.26e+207], N[(N[Sqrt[N[(N[(F * -16.0), $MachinePrecision] * N[(A * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 5.5e-72], N[(-1.0 / N[(B$95$m / N[Sqrt[N[(2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(F * N[(4.0 * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(A * N[(4.0 * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.26 \cdot 10^{+207}:\\
\;\;\;\;\frac{\sqrt{\left(F \cdot -16\right) \cdot \left(A \cdot \left(A \cdot C\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{elif}\;C \leq 5.5 \cdot 10^{-72}:\\
\;\;\;\;\frac{-1}{\frac{B\_m}{\sqrt{2 \cdot \left(B\_m \cdot F\right)}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{\left(B\_m \cdot B\_m + A \cdot \left(C \cdot -4\right)\right) \cdot \left(F \cdot \left(4 \cdot C\right)\right)}}{A \cdot \left(4 \cdot C\right) - B\_m \cdot B\_m}\\
\end{array}
\end{array}
if C < -1.25999999999999999e207Initial program 0.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified2.1%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6418.3%
Simplified18.3%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6427.5%
Applied egg-rr27.5%
if -1.25999999999999999e207 < C < 5.49999999999999994e-72Initial program 22.1%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified25.5%
Applied egg-rr29.4%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6414.0%
Simplified14.0%
Taylor expanded in A around 0
Simplified21.8%
associate-*l/N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6421.9%
Applied egg-rr21.9%
if 5.49999999999999994e-72 < C Initial program 20.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified31.3%
Applied egg-rr31.3%
Taylor expanded in A around -inf
*-lowering-*.f6437.0%
Simplified37.0%
clear-numN/A
/-lowering-/.f64N/A
Applied egg-rr37.0%
Final simplification27.3%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 4.4e-70)
(*
(sqrt (* (+ (* B_m B_m) (* A (* C -4.0))) (* F (* 4.0 C))))
(/ 0.25 (* A C)))
(/ -1.0 (/ B_m (sqrt (* 2.0 (* B_m F)))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 4.4e-70) {
tmp = sqrt((((B_m * B_m) + (A * (C * -4.0))) * (F * (4.0 * C)))) * (0.25 / (A * C));
} else {
tmp = -1.0 / (B_m / sqrt((2.0 * (B_m * F))));
}
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 (b_m <= 4.4d-70) then
tmp = sqrt((((b_m * b_m) + (a * (c * (-4.0d0)))) * (f * (4.0d0 * c)))) * (0.25d0 / (a * c))
else
tmp = (-1.0d0) / (b_m / sqrt((2.0d0 * (b_m * f))))
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 (B_m <= 4.4e-70) {
tmp = Math.sqrt((((B_m * B_m) + (A * (C * -4.0))) * (F * (4.0 * C)))) * (0.25 / (A * C));
} else {
tmp = -1.0 / (B_m / Math.sqrt((2.0 * (B_m * F))));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 4.4e-70: tmp = math.sqrt((((B_m * B_m) + (A * (C * -4.0))) * (F * (4.0 * C)))) * (0.25 / (A * C)) else: tmp = -1.0 / (B_m / math.sqrt((2.0 * (B_m * F)))) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 4.4e-70) tmp = Float64(sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(A * Float64(C * -4.0))) * Float64(F * Float64(4.0 * C)))) * Float64(0.25 / Float64(A * C))); else tmp = Float64(-1.0 / Float64(B_m / sqrt(Float64(2.0 * Float64(B_m * F))))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 4.4e-70) tmp = sqrt((((B_m * B_m) + (A * (C * -4.0))) * (F * (4.0 * C)))) * (0.25 / (A * C)); else tmp = -1.0 / (B_m / sqrt((2.0 * (B_m * F)))); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 4.4e-70], N[(N[Sqrt[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(F * N[(4.0 * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(0.25 / N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 / N[(B$95$m / N[Sqrt[N[(2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 4.4 \cdot 10^{-70}:\\
\;\;\;\;\sqrt{\left(B\_m \cdot B\_m + A \cdot \left(C \cdot -4\right)\right) \cdot \left(F \cdot \left(4 \cdot C\right)\right)} \cdot \frac{0.25}{A \cdot C}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{B\_m}{\sqrt{2 \cdot \left(B\_m \cdot F\right)}}}\\
\end{array}
\end{array}
if B < 4.3999999999999998e-70Initial program 20.1%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified27.2%
Applied egg-rr28.1%
Taylor expanded in A around -inf
*-lowering-*.f6418.5%
Simplified18.5%
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
Applied egg-rr18.5%
Taylor expanded in A around inf
/-lowering-/.f64N/A
*-lowering-*.f6417.7%
Simplified17.7%
if 4.3999999999999998e-70 < B Initial program 18.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified21.1%
Applied egg-rr28.9%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6421.9%
Simplified21.9%
Taylor expanded in A around 0
Simplified40.8%
associate-*l/N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6441.1%
Applied egg-rr41.1%
Final simplification25.4%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= F -1e-310) (* 0.25 (sqrt (/ (+ (* F -16.0) (* -4.0 (/ (* F (* B_m B_m)) (* A A)))) C))) (/ -1.0 (/ B_m (sqrt (* 2.0 (* B_m F)))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (F <= -1e-310) {
tmp = 0.25 * sqrt((((F * -16.0) + (-4.0 * ((F * (B_m * B_m)) / (A * A)))) / C));
} else {
tmp = -1.0 / (B_m / sqrt((2.0 * (B_m * F))));
}
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 <= (-1d-310)) then
tmp = 0.25d0 * sqrt((((f * (-16.0d0)) + ((-4.0d0) * ((f * (b_m * b_m)) / (a * a)))) / c))
else
tmp = (-1.0d0) / (b_m / sqrt((2.0d0 * (b_m * f))))
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 <= -1e-310) {
tmp = 0.25 * Math.sqrt((((F * -16.0) + (-4.0 * ((F * (B_m * B_m)) / (A * A)))) / C));
} else {
tmp = -1.0 / (B_m / Math.sqrt((2.0 * (B_m * F))));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if F <= -1e-310: tmp = 0.25 * math.sqrt((((F * -16.0) + (-4.0 * ((F * (B_m * B_m)) / (A * A)))) / C)) else: tmp = -1.0 / (B_m / math.sqrt((2.0 * (B_m * F)))) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (F <= -1e-310) tmp = Float64(0.25 * sqrt(Float64(Float64(Float64(F * -16.0) + Float64(-4.0 * Float64(Float64(F * Float64(B_m * B_m)) / Float64(A * A)))) / C))); else tmp = Float64(-1.0 / Float64(B_m / sqrt(Float64(2.0 * Float64(B_m * F))))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (F <= -1e-310) tmp = 0.25 * sqrt((((F * -16.0) + (-4.0 * ((F * (B_m * B_m)) / (A * A)))) / C)); else tmp = -1.0 / (B_m / sqrt((2.0 * (B_m * F)))); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[F, -1e-310], N[(0.25 * N[Sqrt[N[(N[(N[(F * -16.0), $MachinePrecision] + N[(-4.0 * N[(N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] / N[(A * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(-1.0 / N[(B$95$m / N[Sqrt[N[(2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1 \cdot 10^{-310}:\\
\;\;\;\;0.25 \cdot \sqrt{\frac{F \cdot -16 + -4 \cdot \frac{F \cdot \left(B\_m \cdot B\_m\right)}{A \cdot A}}{C}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{B\_m}{\sqrt{2 \cdot \left(B\_m \cdot F\right)}}}\\
\end{array}
\end{array}
if F < -9.999999999999969e-311Initial program 35.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified57.3%
Taylor expanded in A around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
Simplified10.9%
Taylor expanded in C around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6436.5%
Simplified36.5%
if -9.999999999999969e-311 < F Initial program 16.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified19.4%
Applied egg-rr24.7%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6411.3%
Simplified11.3%
Taylor expanded in A around 0
Simplified18.6%
associate-*l/N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6418.7%
Applied egg-rr18.7%
Final simplification21.4%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (/ -1.0 (/ B_m (sqrt (* 2.0 (* B_m F))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
return -1.0 / (B_m / sqrt((2.0 * (B_m * F))));
}
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 = (-1.0d0) / (b_m / sqrt((2.0d0 * (b_m * f))))
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
return -1.0 / (B_m / Math.sqrt((2.0 * (B_m * F))));
}
B_m = math.fabs(B) def code(A, B_m, C, F): return -1.0 / (B_m / math.sqrt((2.0 * (B_m * F))))
B_m = abs(B) function code(A, B_m, C, F) return Float64(-1.0 / Float64(B_m / sqrt(Float64(2.0 * Float64(B_m * F))))) end
B_m = abs(B); function tmp = code(A, B_m, C, F) tmp = -1.0 / (B_m / sqrt((2.0 * (B_m * F)))); end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := N[(-1.0 / N[(B$95$m / N[Sqrt[N[(2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|
\\
\frac{-1}{\frac{B\_m}{\sqrt{2 \cdot \left(B\_m \cdot F\right)}}}
\end{array}
Initial program 19.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified25.2%
Applied egg-rr30.8%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f649.6%
Simplified9.6%
Taylor expanded in A around 0
Simplified16.4%
associate-*l/N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6416.5%
Applied egg-rr16.5%
Final simplification16.5%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (/ (sqrt (* 2.0 (* B_m F))) (- 0.0 B_m)))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
return sqrt((2.0 * (B_m * F))) / (0.0 - B_m);
}
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((2.0d0 * (b_m * f))) / (0.0d0 - b_m)
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
return Math.sqrt((2.0 * (B_m * F))) / (0.0 - B_m);
}
B_m = math.fabs(B) def code(A, B_m, C, F): return math.sqrt((2.0 * (B_m * F))) / (0.0 - B_m)
B_m = abs(B) function code(A, B_m, C, F) return Float64(sqrt(Float64(2.0 * Float64(B_m * F))) / Float64(0.0 - B_m)) end
B_m = abs(B); function tmp = code(A, B_m, C, F) tmp = sqrt((2.0 * (B_m * F))) / (0.0 - B_m); end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := N[(N[Sqrt[N[(2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|
\\
\frac{\sqrt{2 \cdot \left(B\_m \cdot F\right)}}{0 - B\_m}
\end{array}
Initial program 19.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified25.2%
Applied egg-rr30.8%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f649.6%
Simplified9.6%
Taylor expanded in A around 0
Simplified16.4%
associate-*l/N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6416.5%
Applied egg-rr16.5%
Final simplification16.5%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (/ (* -2.0 (sqrt (* A F))) B_m))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
return (-2.0 * sqrt((A * F))) / B_m;
}
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 = ((-2.0d0) * sqrt((a * f))) / b_m
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
return (-2.0 * Math.sqrt((A * F))) / B_m;
}
B_m = math.fabs(B) def code(A, B_m, C, F): return (-2.0 * math.sqrt((A * F))) / B_m
B_m = abs(B) function code(A, B_m, C, F) return Float64(Float64(-2.0 * sqrt(Float64(A * F))) / B_m) end
B_m = abs(B); function tmp = code(A, B_m, C, F) tmp = (-2.0 * sqrt((A * F))) / B_m; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := N[(N[(-2.0 * N[Sqrt[N[(A * F), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / B$95$m), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|
\\
\frac{-2 \cdot \sqrt{A \cdot F}}{B\_m}
\end{array}
Initial program 19.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified25.2%
Taylor expanded in A around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
Simplified7.6%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f642.9%
Simplified2.9%
associate-*r*N/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f642.9%
Applied egg-rr2.9%
Final simplification2.9%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (* (sqrt (* A F)) (/ -2.0 B_m)))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
return sqrt((A * F)) * (-2.0 / B_m);
}
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((a * f)) * ((-2.0d0) / b_m)
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
return Math.sqrt((A * F)) * (-2.0 / B_m);
}
B_m = math.fabs(B) def code(A, B_m, C, F): return math.sqrt((A * F)) * (-2.0 / B_m)
B_m = abs(B) function code(A, B_m, C, F) return Float64(sqrt(Float64(A * F)) * Float64(-2.0 / B_m)) end
B_m = abs(B); function tmp = code(A, B_m, C, F) tmp = sqrt((A * F)) * (-2.0 / B_m); end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := N[(N[Sqrt[N[(A * F), $MachinePrecision]], $MachinePrecision] * N[(-2.0 / B$95$m), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|
\\
\sqrt{A \cdot F} \cdot \frac{-2}{B\_m}
\end{array}
Initial program 19.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified25.2%
Taylor expanded in A around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
Simplified7.6%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f642.9%
Simplified2.9%
associate-*r*N/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f642.9%
Applied egg-rr2.9%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f642.9%
Applied egg-rr2.9%
herbie shell --seed 2024141
(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))))