
(FPCore (A B C F)
:precision binary64
(let* ((t_0 (- (pow B 2.0) (* (* 4.0 A) C))))
(/
(-
(sqrt
(*
(* 2.0 (* t_0 F))
(+ (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
t_0)))
double code(double A, double B, double C, double F) {
double t_0 = pow(B, 2.0) - ((4.0 * A) * C);
return -sqrt(((2.0 * (t_0 * F)) * ((A + C) + sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / t_0;
}
real(8) function code(a, b, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: t_0
t_0 = (b ** 2.0d0) - ((4.0d0 * a) * c)
code = -sqrt(((2.0d0 * (t_0 * f)) * ((a + c) + sqrt((((a - c) ** 2.0d0) + (b ** 2.0d0)))))) / t_0
end function
public static double code(double A, double B, double C, double F) {
double t_0 = Math.pow(B, 2.0) - ((4.0 * A) * C);
return -Math.sqrt(((2.0 * (t_0 * F)) * ((A + C) + Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / t_0;
}
def code(A, B, C, F): t_0 = math.pow(B, 2.0) - ((4.0 * A) * C) return -math.sqrt(((2.0 * (t_0 * F)) * ((A + C) + math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / t_0
function code(A, B, C, F) t_0 = Float64((B ^ 2.0) - Float64(Float64(4.0 * A) * C)) return Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(t_0 * F)) * Float64(Float64(A + C) + sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))))) / t_0) end
function tmp = code(A, B, C, F) t_0 = (B ^ 2.0) - ((4.0 * A) * C); tmp = -sqrt(((2.0 * (t_0 * F)) * ((A + C) + sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / t_0; end
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[Power[B, 2.0], $MachinePrecision] - N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]}, N[((-N[Sqrt[N[(N[(2.0 * N[(t$95$0 * F), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] + N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {B}^{2} - \left(4 \cdot A\right) \cdot C\\
\frac{-\sqrt{\left(2 \cdot \left(t\_0 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{t\_0}
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C F)
:precision binary64
(let* ((t_0 (- (pow B 2.0) (* (* 4.0 A) C))))
(/
(-
(sqrt
(*
(* 2.0 (* t_0 F))
(+ (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
t_0)))
double code(double A, double B, double C, double F) {
double t_0 = pow(B, 2.0) - ((4.0 * A) * C);
return -sqrt(((2.0 * (t_0 * F)) * ((A + C) + sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / t_0;
}
real(8) function code(a, b, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: t_0
t_0 = (b ** 2.0d0) - ((4.0d0 * a) * c)
code = -sqrt(((2.0d0 * (t_0 * f)) * ((a + c) + sqrt((((a - c) ** 2.0d0) + (b ** 2.0d0)))))) / t_0
end function
public static double code(double A, double B, double C, double F) {
double t_0 = Math.pow(B, 2.0) - ((4.0 * A) * C);
return -Math.sqrt(((2.0 * (t_0 * F)) * ((A + C) + Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / t_0;
}
def code(A, B, C, F): t_0 = math.pow(B, 2.0) - ((4.0 * A) * C) return -math.sqrt(((2.0 * (t_0 * F)) * ((A + C) + math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / t_0
function code(A, B, C, F) t_0 = Float64((B ^ 2.0) - Float64(Float64(4.0 * A) * C)) return Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(t_0 * F)) * Float64(Float64(A + C) + sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))))) / t_0) end
function tmp = code(A, B, C, F) t_0 = (B ^ 2.0) - ((4.0 * A) * C); tmp = -sqrt(((2.0 * (t_0 * F)) * ((A + C) + sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / t_0; end
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[Power[B, 2.0], $MachinePrecision] - N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]}, N[((-N[Sqrt[N[(N[(2.0 * N[(t$95$0 * F), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] + N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {B}^{2} - \left(4 \cdot A\right) \cdot C\\
\frac{-\sqrt{\left(2 \cdot \left(t\_0 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{t\_0}
\end{array}
\end{array}
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (+ (+ A C) (hypot B_m (- A C))))
(t_1 (+ (* B_m B_m) (* -4.0 (* A C))))
(t_2 (* (* 4.0 A) C))
(t_3
(/
(sqrt
(*
(* 2.0 (* (- (pow B_m 2.0) t_2) F))
(+ (+ A C) (sqrt (+ (pow B_m 2.0) (pow (- A C) 2.0))))))
(- t_2 (pow B_m 2.0)))))
(if (<= t_3 5e-72)
(* (sqrt (/ t_0 t_1)) (- 0.0 (pow (* 2.0 F) 0.5)))
(if (<= t_3 INFINITY)
(/
(sqrt (* F t_1))
(/ (- (* A (* 4.0 C)) (* B_m B_m)) (sqrt (* 2.0 t_0))))
(* (/ (- 0.0 (sqrt 2.0)) B_m) (sqrt (* F (+ A (hypot B_m A)))))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = (A + C) + hypot(B_m, (A - C));
double t_1 = (B_m * B_m) + (-4.0 * (A * C));
double t_2 = (4.0 * A) * C;
double t_3 = sqrt(((2.0 * ((pow(B_m, 2.0) - t_2) * F)) * ((A + C) + sqrt((pow(B_m, 2.0) + pow((A - C), 2.0)))))) / (t_2 - pow(B_m, 2.0));
double tmp;
if (t_3 <= 5e-72) {
tmp = sqrt((t_0 / t_1)) * (0.0 - pow((2.0 * F), 0.5));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((F * t_1)) / (((A * (4.0 * C)) - (B_m * B_m)) / sqrt((2.0 * t_0)));
} else {
tmp = ((0.0 - sqrt(2.0)) / B_m) * sqrt((F * (A + hypot(B_m, A))));
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = (A + C) + Math.hypot(B_m, (A - C));
double t_1 = (B_m * B_m) + (-4.0 * (A * C));
double t_2 = (4.0 * A) * C;
double t_3 = Math.sqrt(((2.0 * ((Math.pow(B_m, 2.0) - t_2) * F)) * ((A + C) + Math.sqrt((Math.pow(B_m, 2.0) + Math.pow((A - C), 2.0)))))) / (t_2 - Math.pow(B_m, 2.0));
double tmp;
if (t_3 <= 5e-72) {
tmp = Math.sqrt((t_0 / t_1)) * (0.0 - Math.pow((2.0 * F), 0.5));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((F * t_1)) / (((A * (4.0 * C)) - (B_m * B_m)) / Math.sqrt((2.0 * t_0)));
} else {
tmp = ((0.0 - Math.sqrt(2.0)) / B_m) * Math.sqrt((F * (A + Math.hypot(B_m, A))));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = (A + C) + math.hypot(B_m, (A - C)) t_1 = (B_m * B_m) + (-4.0 * (A * C)) t_2 = (4.0 * A) * C t_3 = math.sqrt(((2.0 * ((math.pow(B_m, 2.0) - t_2) * F)) * ((A + C) + math.sqrt((math.pow(B_m, 2.0) + math.pow((A - C), 2.0)))))) / (t_2 - math.pow(B_m, 2.0)) tmp = 0 if t_3 <= 5e-72: tmp = math.sqrt((t_0 / t_1)) * (0.0 - math.pow((2.0 * F), 0.5)) elif t_3 <= math.inf: tmp = math.sqrt((F * t_1)) / (((A * (4.0 * C)) - (B_m * B_m)) / math.sqrt((2.0 * t_0))) else: tmp = ((0.0 - math.sqrt(2.0)) / B_m) * math.sqrt((F * (A + math.hypot(B_m, A)))) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(Float64(A + C) + hypot(B_m, Float64(A - C))) t_1 = Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) t_2 = Float64(Float64(4.0 * A) * C) t_3 = Float64(sqrt(Float64(Float64(2.0 * Float64(Float64((B_m ^ 2.0) - t_2) * F)) * Float64(Float64(A + C) + sqrt(Float64((B_m ^ 2.0) + (Float64(A - C) ^ 2.0)))))) / Float64(t_2 - (B_m ^ 2.0))) tmp = 0.0 if (t_3 <= 5e-72) tmp = Float64(sqrt(Float64(t_0 / t_1)) * Float64(0.0 - (Float64(2.0 * F) ^ 0.5))); elseif (t_3 <= Inf) tmp = Float64(sqrt(Float64(F * t_1)) / Float64(Float64(Float64(A * Float64(4.0 * C)) - Float64(B_m * B_m)) / sqrt(Float64(2.0 * t_0)))); else tmp = Float64(Float64(Float64(0.0 - sqrt(2.0)) / B_m) * sqrt(Float64(F * Float64(A + hypot(B_m, A))))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = (A + C) + hypot(B_m, (A - C)); t_1 = (B_m * B_m) + (-4.0 * (A * C)); t_2 = (4.0 * A) * C; t_3 = sqrt(((2.0 * (((B_m ^ 2.0) - t_2) * F)) * ((A + C) + sqrt(((B_m ^ 2.0) + ((A - C) ^ 2.0)))))) / (t_2 - (B_m ^ 2.0)); tmp = 0.0; if (t_3 <= 5e-72) tmp = sqrt((t_0 / t_1)) * (0.0 - ((2.0 * F) ^ 0.5)); elseif (t_3 <= Inf) tmp = sqrt((F * t_1)) / (((A * (4.0 * C)) - (B_m * B_m)) / sqrt((2.0 * t_0))); else tmp = ((0.0 - sqrt(2.0)) / B_m) * sqrt((F * (A + hypot(B_m, A)))); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(A + C), $MachinePrecision] + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[N[(N[(2.0 * N[(N[(N[Power[B$95$m, 2.0], $MachinePrecision] - t$95$2), $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$2 - N[Power[B$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 5e-72], N[(N[Sqrt[N[(t$95$0 / t$95$1), $MachinePrecision]], $MachinePrecision] * N[(0.0 - N[Power[N[(2.0 * F), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(N[Sqrt[N[(F * t$95$1), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(A * N[(4.0 * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(2.0 * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.0 - N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / B$95$m), $MachinePrecision] * N[Sqrt[N[(F * N[(A + N[Sqrt[B$95$m ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := \left(A + C\right) + \mathsf{hypot}\left(B\_m, A - C\right)\\
t_1 := B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\\
t_2 := \left(4 \cdot A\right) \cdot C\\
t_3 := \frac{\sqrt{\left(2 \cdot \left(\left({B\_m}^{2} - t\_2\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{B\_m}^{2} + {\left(A - C\right)}^{2}}\right)}}{t\_2 - {B\_m}^{2}}\\
\mathbf{if}\;t\_3 \leq 5 \cdot 10^{-72}:\\
\;\;\;\;\sqrt{\frac{t\_0}{t\_1}} \cdot \left(0 - {\left(2 \cdot F\right)}^{0.5}\right)\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\frac{\sqrt{F \cdot t\_1}}{\frac{A \cdot \left(4 \cdot C\right) - B\_m \cdot B\_m}{\sqrt{2 \cdot t\_0}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{0 - \sqrt{2}}{B\_m} \cdot \sqrt{F \cdot \left(A + \mathsf{hypot}\left(B\_m, A\right)\right)}\\
\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.9999999999999996e-72Initial program 32.7%
Taylor expanded in F around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
Simplified57.7%
*-commutativeN/A
sqrt-prodN/A
pow1/2N/A
associate-*r*N/A
pow1/2N/A
pow1/2N/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr68.6%
if 4.9999999999999996e-72 < (/.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 39.8%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified60.9%
Applied egg-rr72.5%
associate-/l*N/A
pow1/2N/A
unpow-prod-downN/A
associate-*l*N/A
*-lowering-*.f64N/A
Applied egg-rr0.0%
Applied egg-rr72.6%
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%
Taylor expanded in C around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6419.8%
Simplified19.8%
Final simplification49.6%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (- 0.0 (sqrt 2.0)))
(t_1 (hypot B_m (- A C)))
(t_2 (* -4.0 (* A C))))
(if (<= B_m 2e-153)
(/
(* (sqrt (* F t_2)) (sqrt (* 2.0 (+ A (+ C t_1)))))
(- (* (* 4.0 A) C) (* B_m B_m)))
(if (<= B_m 1.35e+154)
(*
(sqrt (/ (+ (+ A C) t_1) (+ (* B_m B_m) t_2)))
(- 0.0 (pow (* 2.0 F) 0.5)))
(if (<= B_m 7.2e+272)
(* (/ t_0 B_m) (sqrt (* F (+ A (hypot B_m A)))))
(* (sqrt (/ F B_m)) t_0))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = 0.0 - sqrt(2.0);
double t_1 = hypot(B_m, (A - C));
double t_2 = -4.0 * (A * C);
double tmp;
if (B_m <= 2e-153) {
tmp = (sqrt((F * t_2)) * sqrt((2.0 * (A + (C + t_1))))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 1.35e+154) {
tmp = sqrt((((A + C) + t_1) / ((B_m * B_m) + t_2))) * (0.0 - pow((2.0 * F), 0.5));
} else if (B_m <= 7.2e+272) {
tmp = (t_0 / B_m) * sqrt((F * (A + hypot(B_m, A))));
} else {
tmp = sqrt((F / B_m)) * t_0;
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = 0.0 - Math.sqrt(2.0);
double t_1 = Math.hypot(B_m, (A - C));
double t_2 = -4.0 * (A * C);
double tmp;
if (B_m <= 2e-153) {
tmp = (Math.sqrt((F * t_2)) * Math.sqrt((2.0 * (A + (C + t_1))))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 1.35e+154) {
tmp = Math.sqrt((((A + C) + t_1) / ((B_m * B_m) + t_2))) * (0.0 - Math.pow((2.0 * F), 0.5));
} else if (B_m <= 7.2e+272) {
tmp = (t_0 / B_m) * Math.sqrt((F * (A + Math.hypot(B_m, A))));
} else {
tmp = Math.sqrt((F / B_m)) * t_0;
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = 0.0 - math.sqrt(2.0) t_1 = math.hypot(B_m, (A - C)) t_2 = -4.0 * (A * C) tmp = 0 if B_m <= 2e-153: tmp = (math.sqrt((F * t_2)) * math.sqrt((2.0 * (A + (C + t_1))))) / (((4.0 * A) * C) - (B_m * B_m)) elif B_m <= 1.35e+154: tmp = math.sqrt((((A + C) + t_1) / ((B_m * B_m) + t_2))) * (0.0 - math.pow((2.0 * F), 0.5)) elif B_m <= 7.2e+272: tmp = (t_0 / B_m) * math.sqrt((F * (A + math.hypot(B_m, A)))) else: tmp = math.sqrt((F / B_m)) * t_0 return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(0.0 - sqrt(2.0)) t_1 = hypot(B_m, Float64(A - C)) t_2 = Float64(-4.0 * Float64(A * C)) tmp = 0.0 if (B_m <= 2e-153) tmp = Float64(Float64(sqrt(Float64(F * t_2)) * sqrt(Float64(2.0 * Float64(A + Float64(C + t_1))))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); elseif (B_m <= 1.35e+154) tmp = Float64(sqrt(Float64(Float64(Float64(A + C) + t_1) / Float64(Float64(B_m * B_m) + t_2))) * Float64(0.0 - (Float64(2.0 * F) ^ 0.5))); elseif (B_m <= 7.2e+272) tmp = Float64(Float64(t_0 / B_m) * sqrt(Float64(F * Float64(A + hypot(B_m, A))))); else tmp = Float64(sqrt(Float64(F / B_m)) * t_0); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = 0.0 - sqrt(2.0); t_1 = hypot(B_m, (A - C)); t_2 = -4.0 * (A * C); tmp = 0.0; if (B_m <= 2e-153) tmp = (sqrt((F * t_2)) * sqrt((2.0 * (A + (C + t_1))))) / (((4.0 * A) * C) - (B_m * B_m)); elseif (B_m <= 1.35e+154) tmp = sqrt((((A + C) + t_1) / ((B_m * B_m) + t_2))) * (0.0 - ((2.0 * F) ^ 0.5)); elseif (B_m <= 7.2e+272) tmp = (t_0 / B_m) * sqrt((F * (A + hypot(B_m, A)))); else tmp = sqrt((F / B_m)) * t_0; end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(0.0 - N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 2e-153], N[(N[(N[Sqrt[N[(F * t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(A + N[(C + t$95$1), $MachinePrecision]), $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[B$95$m, 1.35e+154], N[(N[Sqrt[N[(N[(N[(A + C), $MachinePrecision] + t$95$1), $MachinePrecision] / N[(N[(B$95$m * B$95$m), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(0.0 - N[Power[N[(2.0 * F), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 7.2e+272], N[(N[(t$95$0 / B$95$m), $MachinePrecision] * N[Sqrt[N[(F * N[(A + N[Sqrt[B$95$m ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(F / B$95$m), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]]]]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := 0 - \sqrt{2}\\
t_1 := \mathsf{hypot}\left(B\_m, A - C\right)\\
t_2 := -4 \cdot \left(A \cdot C\right)\\
\mathbf{if}\;B\_m \leq 2 \cdot 10^{-153}:\\
\;\;\;\;\frac{\sqrt{F \cdot t\_2} \cdot \sqrt{2 \cdot \left(A + \left(C + t\_1\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{elif}\;B\_m \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\sqrt{\frac{\left(A + C\right) + t\_1}{B\_m \cdot B\_m + t\_2}} \cdot \left(0 - {\left(2 \cdot F\right)}^{0.5}\right)\\
\mathbf{elif}\;B\_m \leq 7.2 \cdot 10^{+272}:\\
\;\;\;\;\frac{t\_0}{B\_m} \cdot \sqrt{F \cdot \left(A + \mathsf{hypot}\left(B\_m, A\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{F}{B\_m}} \cdot t\_0\\
\end{array}
\end{array}
if B < 2.00000000000000008e-153Initial program 21.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified28.7%
Applied egg-rr38.6%
Taylor expanded in B around 0
*-lowering-*.f64N/A
*-lowering-*.f6425.5%
Simplified25.5%
if 2.00000000000000008e-153 < B < 1.35000000000000003e154Initial program 29.0%
Taylor expanded in F around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
Simplified54.7%
*-commutativeN/A
sqrt-prodN/A
pow1/2N/A
associate-*r*N/A
pow1/2N/A
pow1/2N/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr59.2%
if 1.35000000000000003e154 < B < 7.1999999999999995e272Initial program 0.0%
Taylor expanded in C around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6454.5%
Simplified54.5%
if 7.1999999999999995e272 < B Initial program 0.0%
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.f6477.0%
Simplified77.0%
Final simplification38.6%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (- 0.0 (sqrt 2.0))))
(if (<= B_m 4.1e-176)
(*
0.25
(*
(/ 1.0 C)
(sqrt (+ (* -16.0 (* C F)) (* 4.0 (/ (* F (* B_m B_m)) C))))))
(if (<= B_m 1.35e+154)
(*
(sqrt
(/ (+ (+ A C) (hypot B_m (- A C))) (+ (* B_m B_m) (* -4.0 (* A C)))))
(- 0.0 (pow (* 2.0 F) 0.5)))
(if (<= B_m 2.55e+272)
(* (/ t_0 B_m) (sqrt (* F (+ A (hypot B_m A)))))
(* (sqrt (/ F B_m)) t_0))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = 0.0 - sqrt(2.0);
double tmp;
if (B_m <= 4.1e-176) {
tmp = 0.25 * ((1.0 / C) * sqrt(((-16.0 * (C * F)) + (4.0 * ((F * (B_m * B_m)) / C)))));
} else if (B_m <= 1.35e+154) {
tmp = sqrt((((A + C) + hypot(B_m, (A - C))) / ((B_m * B_m) + (-4.0 * (A * C))))) * (0.0 - pow((2.0 * F), 0.5));
} else if (B_m <= 2.55e+272) {
tmp = (t_0 / B_m) * sqrt((F * (A + hypot(B_m, A))));
} else {
tmp = sqrt((F / B_m)) * t_0;
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = 0.0 - Math.sqrt(2.0);
double tmp;
if (B_m <= 4.1e-176) {
tmp = 0.25 * ((1.0 / C) * Math.sqrt(((-16.0 * (C * F)) + (4.0 * ((F * (B_m * B_m)) / C)))));
} else if (B_m <= 1.35e+154) {
tmp = Math.sqrt((((A + C) + Math.hypot(B_m, (A - C))) / ((B_m * B_m) + (-4.0 * (A * C))))) * (0.0 - Math.pow((2.0 * F), 0.5));
} else if (B_m <= 2.55e+272) {
tmp = (t_0 / B_m) * Math.sqrt((F * (A + Math.hypot(B_m, A))));
} else {
tmp = Math.sqrt((F / B_m)) * t_0;
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = 0.0 - math.sqrt(2.0) tmp = 0 if B_m <= 4.1e-176: tmp = 0.25 * ((1.0 / C) * math.sqrt(((-16.0 * (C * F)) + (4.0 * ((F * (B_m * B_m)) / C))))) elif B_m <= 1.35e+154: tmp = math.sqrt((((A + C) + math.hypot(B_m, (A - C))) / ((B_m * B_m) + (-4.0 * (A * C))))) * (0.0 - math.pow((2.0 * F), 0.5)) elif B_m <= 2.55e+272: tmp = (t_0 / B_m) * math.sqrt((F * (A + math.hypot(B_m, A)))) else: tmp = math.sqrt((F / B_m)) * t_0 return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(0.0 - sqrt(2.0)) tmp = 0.0 if (B_m <= 4.1e-176) tmp = Float64(0.25 * Float64(Float64(1.0 / C) * sqrt(Float64(Float64(-16.0 * Float64(C * F)) + Float64(4.0 * Float64(Float64(F * Float64(B_m * B_m)) / C)))))); elseif (B_m <= 1.35e+154) tmp = Float64(sqrt(Float64(Float64(Float64(A + C) + hypot(B_m, Float64(A - C))) / Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))))) * Float64(0.0 - (Float64(2.0 * F) ^ 0.5))); elseif (B_m <= 2.55e+272) tmp = Float64(Float64(t_0 / B_m) * sqrt(Float64(F * Float64(A + hypot(B_m, A))))); else tmp = Float64(sqrt(Float64(F / B_m)) * t_0); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = 0.0 - sqrt(2.0); tmp = 0.0; if (B_m <= 4.1e-176) tmp = 0.25 * ((1.0 / C) * sqrt(((-16.0 * (C * F)) + (4.0 * ((F * (B_m * B_m)) / C))))); elseif (B_m <= 1.35e+154) tmp = sqrt((((A + C) + hypot(B_m, (A - C))) / ((B_m * B_m) + (-4.0 * (A * C))))) * (0.0 - ((2.0 * F) ^ 0.5)); elseif (B_m <= 2.55e+272) tmp = (t_0 / B_m) * sqrt((F * (A + hypot(B_m, A)))); else tmp = sqrt((F / B_m)) * t_0; end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(0.0 - N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 4.1e-176], N[(0.25 * N[(N[(1.0 / C), $MachinePrecision] * N[Sqrt[N[(N[(-16.0 * N[(C * F), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 1.35e+154], N[(N[Sqrt[N[(N[(N[(A + C), $MachinePrecision] + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(0.0 - N[Power[N[(2.0 * F), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 2.55e+272], N[(N[(t$95$0 / B$95$m), $MachinePrecision] * N[Sqrt[N[(F * N[(A + N[Sqrt[B$95$m ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(F / B$95$m), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := 0 - \sqrt{2}\\
\mathbf{if}\;B\_m \leq 4.1 \cdot 10^{-176}:\\
\;\;\;\;0.25 \cdot \left(\frac{1}{C} \cdot \sqrt{-16 \cdot \left(C \cdot F\right) + 4 \cdot \frac{F \cdot \left(B\_m \cdot B\_m\right)}{C}}\right)\\
\mathbf{elif}\;B\_m \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\sqrt{\frac{\left(A + C\right) + \mathsf{hypot}\left(B\_m, A - C\right)}{B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)}} \cdot \left(0 - {\left(2 \cdot F\right)}^{0.5}\right)\\
\mathbf{elif}\;B\_m \leq 2.55 \cdot 10^{+272}:\\
\;\;\;\;\frac{t\_0}{B\_m} \cdot \sqrt{F \cdot \left(A + \mathsf{hypot}\left(B\_m, A\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{F}{B\_m}} \cdot t\_0\\
\end{array}
\end{array}
if B < 4.1000000000000003e-176Initial program 22.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified29.1%
Taylor expanded in B around 0
Simplified15.6%
Taylor expanded in C around inf
+-lowering-+.f64N/A
Simplified10.4%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-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-*.f6420.0%
Simplified20.0%
if 4.1000000000000003e-176 < B < 1.35000000000000003e154Initial program 26.6%
Taylor expanded in F around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
Simplified51.6%
*-commutativeN/A
sqrt-prodN/A
pow1/2N/A
associate-*r*N/A
pow1/2N/A
pow1/2N/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr55.6%
if 1.35000000000000003e154 < B < 2.54999999999999993e272Initial program 0.0%
Taylor expanded in C around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6454.5%
Simplified54.5%
if 2.54999999999999993e272 < B Initial program 0.0%
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.f6477.0%
Simplified77.0%
Final simplification35.1%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (- 0.0 (sqrt 2.0))))
(if (<= B_m 9e-176)
(*
0.25
(*
(/ 1.0 C)
(sqrt (+ (* -16.0 (* C F)) (* 4.0 (/ (* F (* B_m B_m)) C))))))
(if (<= B_m 8e+150)
(*
(pow
(*
2.0
(/ (+ (+ A C) (hypot B_m (- A C))) (+ (* B_m B_m) (* -4.0 (* A C)))))
0.5)
(- 0.0 (sqrt F)))
(if (<= B_m 1.3e+273)
(* (/ t_0 B_m) (sqrt (* F (+ A (hypot B_m A)))))
(* (sqrt (/ F B_m)) t_0))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = 0.0 - sqrt(2.0);
double tmp;
if (B_m <= 9e-176) {
tmp = 0.25 * ((1.0 / C) * sqrt(((-16.0 * (C * F)) + (4.0 * ((F * (B_m * B_m)) / C)))));
} else if (B_m <= 8e+150) {
tmp = pow((2.0 * (((A + C) + hypot(B_m, (A - C))) / ((B_m * B_m) + (-4.0 * (A * C))))), 0.5) * (0.0 - sqrt(F));
} else if (B_m <= 1.3e+273) {
tmp = (t_0 / B_m) * sqrt((F * (A + hypot(B_m, A))));
} else {
tmp = sqrt((F / B_m)) * t_0;
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = 0.0 - Math.sqrt(2.0);
double tmp;
if (B_m <= 9e-176) {
tmp = 0.25 * ((1.0 / C) * Math.sqrt(((-16.0 * (C * F)) + (4.0 * ((F * (B_m * B_m)) / C)))));
} else if (B_m <= 8e+150) {
tmp = Math.pow((2.0 * (((A + C) + Math.hypot(B_m, (A - C))) / ((B_m * B_m) + (-4.0 * (A * C))))), 0.5) * (0.0 - Math.sqrt(F));
} else if (B_m <= 1.3e+273) {
tmp = (t_0 / B_m) * Math.sqrt((F * (A + Math.hypot(B_m, A))));
} else {
tmp = Math.sqrt((F / B_m)) * t_0;
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = 0.0 - math.sqrt(2.0) tmp = 0 if B_m <= 9e-176: tmp = 0.25 * ((1.0 / C) * math.sqrt(((-16.0 * (C * F)) + (4.0 * ((F * (B_m * B_m)) / C))))) elif B_m <= 8e+150: tmp = math.pow((2.0 * (((A + C) + math.hypot(B_m, (A - C))) / ((B_m * B_m) + (-4.0 * (A * C))))), 0.5) * (0.0 - math.sqrt(F)) elif B_m <= 1.3e+273: tmp = (t_0 / B_m) * math.sqrt((F * (A + math.hypot(B_m, A)))) else: tmp = math.sqrt((F / B_m)) * t_0 return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(0.0 - sqrt(2.0)) tmp = 0.0 if (B_m <= 9e-176) tmp = Float64(0.25 * Float64(Float64(1.0 / C) * sqrt(Float64(Float64(-16.0 * Float64(C * F)) + Float64(4.0 * Float64(Float64(F * Float64(B_m * B_m)) / C)))))); elseif (B_m <= 8e+150) tmp = Float64((Float64(2.0 * Float64(Float64(Float64(A + C) + hypot(B_m, Float64(A - C))) / Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))))) ^ 0.5) * Float64(0.0 - sqrt(F))); elseif (B_m <= 1.3e+273) tmp = Float64(Float64(t_0 / B_m) * sqrt(Float64(F * Float64(A + hypot(B_m, A))))); else tmp = Float64(sqrt(Float64(F / B_m)) * t_0); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = 0.0 - sqrt(2.0); tmp = 0.0; if (B_m <= 9e-176) tmp = 0.25 * ((1.0 / C) * sqrt(((-16.0 * (C * F)) + (4.0 * ((F * (B_m * B_m)) / C))))); elseif (B_m <= 8e+150) tmp = ((2.0 * (((A + C) + hypot(B_m, (A - C))) / ((B_m * B_m) + (-4.0 * (A * C))))) ^ 0.5) * (0.0 - sqrt(F)); elseif (B_m <= 1.3e+273) tmp = (t_0 / B_m) * sqrt((F * (A + hypot(B_m, A)))); else tmp = sqrt((F / B_m)) * t_0; end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(0.0 - N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 9e-176], N[(0.25 * N[(N[(1.0 / C), $MachinePrecision] * N[Sqrt[N[(N[(-16.0 * N[(C * F), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 8e+150], N[(N[Power[N[(2.0 * N[(N[(N[(A + C), $MachinePrecision] + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] * N[(0.0 - N[Sqrt[F], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 1.3e+273], N[(N[(t$95$0 / B$95$m), $MachinePrecision] * N[Sqrt[N[(F * N[(A + N[Sqrt[B$95$m ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(F / B$95$m), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := 0 - \sqrt{2}\\
\mathbf{if}\;B\_m \leq 9 \cdot 10^{-176}:\\
\;\;\;\;0.25 \cdot \left(\frac{1}{C} \cdot \sqrt{-16 \cdot \left(C \cdot F\right) + 4 \cdot \frac{F \cdot \left(B\_m \cdot B\_m\right)}{C}}\right)\\
\mathbf{elif}\;B\_m \leq 8 \cdot 10^{+150}:\\
\;\;\;\;{\left(2 \cdot \frac{\left(A + C\right) + \mathsf{hypot}\left(B\_m, A - C\right)}{B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)}\right)}^{0.5} \cdot \left(0 - \sqrt{F}\right)\\
\mathbf{elif}\;B\_m \leq 1.3 \cdot 10^{+273}:\\
\;\;\;\;\frac{t\_0}{B\_m} \cdot \sqrt{F \cdot \left(A + \mathsf{hypot}\left(B\_m, A\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{F}{B\_m}} \cdot t\_0\\
\end{array}
\end{array}
if B < 9e-176Initial program 22.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified29.1%
Taylor expanded in B around 0
Simplified15.6%
Taylor expanded in C around inf
+-lowering-+.f64N/A
Simplified10.4%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-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-*.f6420.0%
Simplified20.0%
if 9e-176 < B < 7.99999999999999985e150Initial program 27.0%
Taylor expanded in F around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
Simplified50.9%
sqrt-unprodN/A
pow1/2N/A
associate-*l*N/A
unpow-prod-downN/A
pow1/2N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
pow-lowering-pow.f64N/A
Applied egg-rr55.0%
if 7.99999999999999985e150 < B < 1.29999999999999997e273Initial program 0.1%
Taylor expanded in C around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6455.9%
Simplified55.9%
if 1.29999999999999997e273 < B Initial program 0.0%
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.f6477.0%
Simplified77.0%
Final simplification35.1%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (- 0.0 (sqrt 2.0))))
(if (<= B_m 1.5e-146)
(*
0.25
(*
(/ 1.0 C)
(sqrt (+ (* -16.0 (* C F)) (* 4.0 (/ (* F (* B_m B_m)) C))))))
(if (<= B_m 3.7e+146)
(*
(sqrt
(*
F
(/
(+ (+ A C) (hypot B_m (- A C)))
(+ (* B_m B_m) (* -4.0 (* A C))))))
t_0)
(if (<= B_m 5.1e+272)
(* (/ t_0 B_m) (sqrt (* F (+ A (hypot B_m A)))))
(* (sqrt (/ F B_m)) t_0))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = 0.0 - sqrt(2.0);
double tmp;
if (B_m <= 1.5e-146) {
tmp = 0.25 * ((1.0 / C) * sqrt(((-16.0 * (C * F)) + (4.0 * ((F * (B_m * B_m)) / C)))));
} else if (B_m <= 3.7e+146) {
tmp = sqrt((F * (((A + C) + hypot(B_m, (A - C))) / ((B_m * B_m) + (-4.0 * (A * C)))))) * t_0;
} else if (B_m <= 5.1e+272) {
tmp = (t_0 / B_m) * sqrt((F * (A + hypot(B_m, A))));
} else {
tmp = sqrt((F / B_m)) * t_0;
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = 0.0 - Math.sqrt(2.0);
double tmp;
if (B_m <= 1.5e-146) {
tmp = 0.25 * ((1.0 / C) * Math.sqrt(((-16.0 * (C * F)) + (4.0 * ((F * (B_m * B_m)) / C)))));
} else if (B_m <= 3.7e+146) {
tmp = Math.sqrt((F * (((A + C) + Math.hypot(B_m, (A - C))) / ((B_m * B_m) + (-4.0 * (A * C)))))) * t_0;
} else if (B_m <= 5.1e+272) {
tmp = (t_0 / B_m) * Math.sqrt((F * (A + Math.hypot(B_m, A))));
} else {
tmp = Math.sqrt((F / B_m)) * t_0;
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = 0.0 - math.sqrt(2.0) tmp = 0 if B_m <= 1.5e-146: tmp = 0.25 * ((1.0 / C) * math.sqrt(((-16.0 * (C * F)) + (4.0 * ((F * (B_m * B_m)) / C))))) elif B_m <= 3.7e+146: tmp = math.sqrt((F * (((A + C) + math.hypot(B_m, (A - C))) / ((B_m * B_m) + (-4.0 * (A * C)))))) * t_0 elif B_m <= 5.1e+272: tmp = (t_0 / B_m) * math.sqrt((F * (A + math.hypot(B_m, A)))) else: tmp = math.sqrt((F / B_m)) * t_0 return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(0.0 - sqrt(2.0)) tmp = 0.0 if (B_m <= 1.5e-146) tmp = Float64(0.25 * Float64(Float64(1.0 / C) * sqrt(Float64(Float64(-16.0 * Float64(C * F)) + Float64(4.0 * Float64(Float64(F * Float64(B_m * B_m)) / C)))))); elseif (B_m <= 3.7e+146) tmp = Float64(sqrt(Float64(F * Float64(Float64(Float64(A + C) + hypot(B_m, Float64(A - C))) / Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C)))))) * t_0); elseif (B_m <= 5.1e+272) tmp = Float64(Float64(t_0 / B_m) * sqrt(Float64(F * Float64(A + hypot(B_m, A))))); else tmp = Float64(sqrt(Float64(F / B_m)) * t_0); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = 0.0 - sqrt(2.0); tmp = 0.0; if (B_m <= 1.5e-146) tmp = 0.25 * ((1.0 / C) * sqrt(((-16.0 * (C * F)) + (4.0 * ((F * (B_m * B_m)) / C))))); elseif (B_m <= 3.7e+146) tmp = sqrt((F * (((A + C) + hypot(B_m, (A - C))) / ((B_m * B_m) + (-4.0 * (A * C)))))) * t_0; elseif (B_m <= 5.1e+272) tmp = (t_0 / B_m) * sqrt((F * (A + hypot(B_m, A)))); else tmp = sqrt((F / B_m)) * t_0; end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(0.0 - N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 1.5e-146], N[(0.25 * N[(N[(1.0 / C), $MachinePrecision] * N[Sqrt[N[(N[(-16.0 * N[(C * F), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 3.7e+146], N[(N[Sqrt[N[(F * N[(N[(N[(A + C), $MachinePrecision] + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[B$95$m, 5.1e+272], N[(N[(t$95$0 / B$95$m), $MachinePrecision] * N[Sqrt[N[(F * N[(A + N[Sqrt[B$95$m ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(F / B$95$m), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := 0 - \sqrt{2}\\
\mathbf{if}\;B\_m \leq 1.5 \cdot 10^{-146}:\\
\;\;\;\;0.25 \cdot \left(\frac{1}{C} \cdot \sqrt{-16 \cdot \left(C \cdot F\right) + 4 \cdot \frac{F \cdot \left(B\_m \cdot B\_m\right)}{C}}\right)\\
\mathbf{elif}\;B\_m \leq 3.7 \cdot 10^{+146}:\\
\;\;\;\;\sqrt{F \cdot \frac{\left(A + C\right) + \mathsf{hypot}\left(B\_m, A - C\right)}{B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)}} \cdot t\_0\\
\mathbf{elif}\;B\_m \leq 5.1 \cdot 10^{+272}:\\
\;\;\;\;\frac{t\_0}{B\_m} \cdot \sqrt{F \cdot \left(A + \mathsf{hypot}\left(B\_m, A\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{F}{B\_m}} \cdot t\_0\\
\end{array}
\end{array}
if B < 1.50000000000000009e-146Initial program 21.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified28.7%
Taylor expanded in B around 0
Simplified15.2%
Taylor expanded in C around inf
+-lowering-+.f64N/A
Simplified10.1%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-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-*.f6419.3%
Simplified19.3%
if 1.50000000000000009e-146 < B < 3.70000000000000004e146Initial program 29.4%
Taylor expanded in F around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
Simplified54.0%
if 3.70000000000000004e146 < B < 5.09999999999999985e272Initial program 0.1%
Taylor expanded in C around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6455.9%
Simplified55.9%
if 5.09999999999999985e272 < B Initial program 0.0%
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.f6477.0%
Simplified77.0%
Final simplification33.7%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (- 0.0 (sqrt 2.0))))
(if (<= B_m 8e-147)
(*
0.25
(*
(/ 1.0 C)
(sqrt (+ (* -16.0 (* C F)) (* 4.0 (/ (* F (* B_m B_m)) C))))))
(if (<= B_m 7.1e+103)
(-
0.0
(sqrt
(/
(* 2.0 (* F (+ (+ A C) (hypot B_m (- A C)))))
(+ (* B_m B_m) (* -4.0 (* A C))))))
(if (<= B_m 2.4e+273)
(* (/ t_0 B_m) (sqrt (* F (+ A (hypot B_m A)))))
(* (sqrt (/ F B_m)) t_0))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = 0.0 - sqrt(2.0);
double tmp;
if (B_m <= 8e-147) {
tmp = 0.25 * ((1.0 / C) * sqrt(((-16.0 * (C * F)) + (4.0 * ((F * (B_m * B_m)) / C)))));
} else if (B_m <= 7.1e+103) {
tmp = 0.0 - sqrt(((2.0 * (F * ((A + C) + hypot(B_m, (A - C))))) / ((B_m * B_m) + (-4.0 * (A * C)))));
} else if (B_m <= 2.4e+273) {
tmp = (t_0 / B_m) * sqrt((F * (A + hypot(B_m, A))));
} else {
tmp = sqrt((F / B_m)) * t_0;
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = 0.0 - Math.sqrt(2.0);
double tmp;
if (B_m <= 8e-147) {
tmp = 0.25 * ((1.0 / C) * Math.sqrt(((-16.0 * (C * F)) + (4.0 * ((F * (B_m * B_m)) / C)))));
} else if (B_m <= 7.1e+103) {
tmp = 0.0 - Math.sqrt(((2.0 * (F * ((A + C) + Math.hypot(B_m, (A - C))))) / ((B_m * B_m) + (-4.0 * (A * C)))));
} else if (B_m <= 2.4e+273) {
tmp = (t_0 / B_m) * Math.sqrt((F * (A + Math.hypot(B_m, A))));
} else {
tmp = Math.sqrt((F / B_m)) * t_0;
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = 0.0 - math.sqrt(2.0) tmp = 0 if B_m <= 8e-147: tmp = 0.25 * ((1.0 / C) * math.sqrt(((-16.0 * (C * F)) + (4.0 * ((F * (B_m * B_m)) / C))))) elif B_m <= 7.1e+103: tmp = 0.0 - math.sqrt(((2.0 * (F * ((A + C) + math.hypot(B_m, (A - C))))) / ((B_m * B_m) + (-4.0 * (A * C))))) elif B_m <= 2.4e+273: tmp = (t_0 / B_m) * math.sqrt((F * (A + math.hypot(B_m, A)))) else: tmp = math.sqrt((F / B_m)) * t_0 return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(0.0 - sqrt(2.0)) tmp = 0.0 if (B_m <= 8e-147) tmp = Float64(0.25 * Float64(Float64(1.0 / C) * sqrt(Float64(Float64(-16.0 * Float64(C * F)) + Float64(4.0 * Float64(Float64(F * Float64(B_m * B_m)) / C)))))); elseif (B_m <= 7.1e+103) tmp = Float64(0.0 - sqrt(Float64(Float64(2.0 * Float64(F * Float64(Float64(A + C) + hypot(B_m, Float64(A - C))))) / Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C)))))); elseif (B_m <= 2.4e+273) tmp = Float64(Float64(t_0 / B_m) * sqrt(Float64(F * Float64(A + hypot(B_m, A))))); else tmp = Float64(sqrt(Float64(F / B_m)) * t_0); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = 0.0 - sqrt(2.0); tmp = 0.0; if (B_m <= 8e-147) tmp = 0.25 * ((1.0 / C) * sqrt(((-16.0 * (C * F)) + (4.0 * ((F * (B_m * B_m)) / C))))); elseif (B_m <= 7.1e+103) tmp = 0.0 - sqrt(((2.0 * (F * ((A + C) + hypot(B_m, (A - C))))) / ((B_m * B_m) + (-4.0 * (A * C))))); elseif (B_m <= 2.4e+273) tmp = (t_0 / B_m) * sqrt((F * (A + hypot(B_m, A)))); else tmp = sqrt((F / B_m)) * t_0; end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(0.0 - N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 8e-147], N[(0.25 * N[(N[(1.0 / C), $MachinePrecision] * N[Sqrt[N[(N[(-16.0 * N[(C * F), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 7.1e+103], N[(0.0 - N[Sqrt[N[(N[(2.0 * N[(F * N[(N[(A + C), $MachinePrecision] + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 2.4e+273], N[(N[(t$95$0 / B$95$m), $MachinePrecision] * N[Sqrt[N[(F * N[(A + N[Sqrt[B$95$m ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(F / B$95$m), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := 0 - \sqrt{2}\\
\mathbf{if}\;B\_m \leq 8 \cdot 10^{-147}:\\
\;\;\;\;0.25 \cdot \left(\frac{1}{C} \cdot \sqrt{-16 \cdot \left(C \cdot F\right) + 4 \cdot \frac{F \cdot \left(B\_m \cdot B\_m\right)}{C}}\right)\\
\mathbf{elif}\;B\_m \leq 7.1 \cdot 10^{+103}:\\
\;\;\;\;0 - \sqrt{\frac{2 \cdot \left(F \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(B\_m, A - C\right)\right)\right)}{B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)}}\\
\mathbf{elif}\;B\_m \leq 2.4 \cdot 10^{+273}:\\
\;\;\;\;\frac{t\_0}{B\_m} \cdot \sqrt{F \cdot \left(A + \mathsf{hypot}\left(B\_m, A\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{F}{B\_m}} \cdot t\_0\\
\end{array}
\end{array}
if B < 7.9999999999999998e-147Initial program 21.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified28.7%
Taylor expanded in B around 0
Simplified15.2%
Taylor expanded in C around inf
+-lowering-+.f64N/A
Simplified10.1%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-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-*.f6419.3%
Simplified19.3%
if 7.9999999999999998e-147 < B < 7.1000000000000002e103Initial program 32.7%
Taylor expanded in F around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
Simplified50.6%
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
associate-*r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr45.2%
if 7.1000000000000002e103 < B < 2.4000000000000002e273Initial program 3.2%
Taylor expanded in C around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6452.8%
Simplified52.8%
if 2.4000000000000002e273 < B Initial program 0.0%
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.f6477.0%
Simplified77.0%
Final simplification31.5%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 9.6e-147)
(*
0.25
(* (/ 1.0 C) (sqrt (+ (* -16.0 (* C F)) (* 4.0 (/ (* F (* B_m B_m)) C))))))
(if (<= B_m 4.1e+104)
(-
0.0
(sqrt
(/
(* 2.0 (* F (+ (+ A C) (hypot B_m (- A C)))))
(+ (* B_m B_m) (* -4.0 (* A C))))))
(* (sqrt (/ F B_m)) (- 0.0 (sqrt 2.0))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 9.6e-147) {
tmp = 0.25 * ((1.0 / C) * sqrt(((-16.0 * (C * F)) + (4.0 * ((F * (B_m * B_m)) / C)))));
} else if (B_m <= 4.1e+104) {
tmp = 0.0 - sqrt(((2.0 * (F * ((A + C) + hypot(B_m, (A - C))))) / ((B_m * B_m) + (-4.0 * (A * C)))));
} else {
tmp = sqrt((F / B_m)) * (0.0 - sqrt(2.0));
}
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.6e-147) {
tmp = 0.25 * ((1.0 / C) * Math.sqrt(((-16.0 * (C * F)) + (4.0 * ((F * (B_m * B_m)) / C)))));
} else if (B_m <= 4.1e+104) {
tmp = 0.0 - Math.sqrt(((2.0 * (F * ((A + C) + Math.hypot(B_m, (A - C))))) / ((B_m * B_m) + (-4.0 * (A * C)))));
} else {
tmp = Math.sqrt((F / B_m)) * (0.0 - Math.sqrt(2.0));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 9.6e-147: tmp = 0.25 * ((1.0 / C) * math.sqrt(((-16.0 * (C * F)) + (4.0 * ((F * (B_m * B_m)) / C))))) elif B_m <= 4.1e+104: tmp = 0.0 - math.sqrt(((2.0 * (F * ((A + C) + math.hypot(B_m, (A - C))))) / ((B_m * B_m) + (-4.0 * (A * C))))) else: tmp = math.sqrt((F / B_m)) * (0.0 - math.sqrt(2.0)) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 9.6e-147) tmp = Float64(0.25 * Float64(Float64(1.0 / C) * sqrt(Float64(Float64(-16.0 * Float64(C * F)) + Float64(4.0 * Float64(Float64(F * Float64(B_m * B_m)) / C)))))); elseif (B_m <= 4.1e+104) tmp = Float64(0.0 - sqrt(Float64(Float64(2.0 * Float64(F * Float64(Float64(A + C) + hypot(B_m, Float64(A - C))))) / Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C)))))); else tmp = Float64(sqrt(Float64(F / B_m)) * Float64(0.0 - sqrt(2.0))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 9.6e-147) tmp = 0.25 * ((1.0 / C) * sqrt(((-16.0 * (C * F)) + (4.0 * ((F * (B_m * B_m)) / C))))); elseif (B_m <= 4.1e+104) tmp = 0.0 - sqrt(((2.0 * (F * ((A + C) + hypot(B_m, (A - C))))) / ((B_m * B_m) + (-4.0 * (A * C))))); else tmp = sqrt((F / B_m)) * (0.0 - sqrt(2.0)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 9.6e-147], N[(0.25 * N[(N[(1.0 / C), $MachinePrecision] * N[Sqrt[N[(N[(-16.0 * N[(C * F), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 4.1e+104], N[(0.0 - N[Sqrt[N[(N[(2.0 * N[(F * N[(N[(A + C), $MachinePrecision] + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(F / B$95$m), $MachinePrecision]], $MachinePrecision] * N[(0.0 - N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 9.6 \cdot 10^{-147}:\\
\;\;\;\;0.25 \cdot \left(\frac{1}{C} \cdot \sqrt{-16 \cdot \left(C \cdot F\right) + 4 \cdot \frac{F \cdot \left(B\_m \cdot B\_m\right)}{C}}\right)\\
\mathbf{elif}\;B\_m \leq 4.1 \cdot 10^{+104}:\\
\;\;\;\;0 - \sqrt{\frac{2 \cdot \left(F \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(B\_m, A - C\right)\right)\right)}{B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{F}{B\_m}} \cdot \left(0 - \sqrt{2}\right)\\
\end{array}
\end{array}
if B < 9.59999999999999994e-147Initial program 21.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified28.7%
Taylor expanded in B around 0
Simplified15.2%
Taylor expanded in C around inf
+-lowering-+.f64N/A
Simplified10.1%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-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-*.f6419.3%
Simplified19.3%
if 9.59999999999999994e-147 < B < 4.09999999999999985e104Initial program 32.7%
Taylor expanded in F around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
Simplified50.6%
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
associate-*r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr45.2%
if 4.09999999999999985e104 < B Initial program 2.7%
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.f6459.8%
Simplified59.8%
Final simplification32.1%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (- 0.0 (sqrt 2.0))))
(if (<= C -1.25e-62)
(- 0.0 (* (sqrt 2.0) (sqrt (* F (/ -0.5 C)))))
(if (<= C 7.8e-11)
(* (sqrt (* F (/ (+ (+ (/ A B_m) (/ C B_m)) 1.0) B_m))) t_0)
(* (sqrt (* F (/ -0.5 A))) t_0)))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = 0.0 - sqrt(2.0);
double tmp;
if (C <= -1.25e-62) {
tmp = 0.0 - (sqrt(2.0) * sqrt((F * (-0.5 / C))));
} else if (C <= 7.8e-11) {
tmp = sqrt((F * ((((A / B_m) + (C / B_m)) + 1.0) / B_m))) * t_0;
} else {
tmp = sqrt((F * (-0.5 / A))) * t_0;
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: t_0
real(8) :: tmp
t_0 = 0.0d0 - sqrt(2.0d0)
if (c <= (-1.25d-62)) then
tmp = 0.0d0 - (sqrt(2.0d0) * sqrt((f * ((-0.5d0) / c))))
else if (c <= 7.8d-11) then
tmp = sqrt((f * ((((a / b_m) + (c / b_m)) + 1.0d0) / b_m))) * t_0
else
tmp = sqrt((f * ((-0.5d0) / a))) * t_0
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = 0.0 - Math.sqrt(2.0);
double tmp;
if (C <= -1.25e-62) {
tmp = 0.0 - (Math.sqrt(2.0) * Math.sqrt((F * (-0.5 / C))));
} else if (C <= 7.8e-11) {
tmp = Math.sqrt((F * ((((A / B_m) + (C / B_m)) + 1.0) / B_m))) * t_0;
} else {
tmp = Math.sqrt((F * (-0.5 / A))) * t_0;
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = 0.0 - math.sqrt(2.0) tmp = 0 if C <= -1.25e-62: tmp = 0.0 - (math.sqrt(2.0) * math.sqrt((F * (-0.5 / C)))) elif C <= 7.8e-11: tmp = math.sqrt((F * ((((A / B_m) + (C / B_m)) + 1.0) / B_m))) * t_0 else: tmp = math.sqrt((F * (-0.5 / A))) * t_0 return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(0.0 - sqrt(2.0)) tmp = 0.0 if (C <= -1.25e-62) tmp = Float64(0.0 - Float64(sqrt(2.0) * sqrt(Float64(F * Float64(-0.5 / C))))); elseif (C <= 7.8e-11) tmp = Float64(sqrt(Float64(F * Float64(Float64(Float64(Float64(A / B_m) + Float64(C / B_m)) + 1.0) / B_m))) * t_0); else tmp = Float64(sqrt(Float64(F * Float64(-0.5 / A))) * t_0); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = 0.0 - sqrt(2.0); tmp = 0.0; if (C <= -1.25e-62) tmp = 0.0 - (sqrt(2.0) * sqrt((F * (-0.5 / C)))); elseif (C <= 7.8e-11) tmp = sqrt((F * ((((A / B_m) + (C / B_m)) + 1.0) / B_m))) * t_0; else tmp = sqrt((F * (-0.5 / A))) * t_0; end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(0.0 - N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -1.25e-62], N[(0.0 - N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(F * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 7.8e-11], N[(N[Sqrt[N[(F * N[(N[(N[(N[(A / B$95$m), $MachinePrecision] + N[(C / B$95$m), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[Sqrt[N[(F * N[(-0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := 0 - \sqrt{2}\\
\mathbf{if}\;C \leq -1.25 \cdot 10^{-62}:\\
\;\;\;\;0 - \sqrt{2} \cdot \sqrt{F \cdot \frac{-0.5}{C}}\\
\mathbf{elif}\;C \leq 7.8 \cdot 10^{-11}:\\
\;\;\;\;\sqrt{F \cdot \frac{\left(\frac{A}{B\_m} + \frac{C}{B\_m}\right) + 1}{B\_m}} \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;\sqrt{F \cdot \frac{-0.5}{A}} \cdot t\_0\\
\end{array}
\end{array}
if C < -1.25e-62Initial program 11.5%
Taylor expanded in F around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
Simplified19.2%
Taylor expanded in C around -inf
/-lowering-/.f6447.5%
Simplified47.5%
if -1.25e-62 < C < 7.80000000000000021e-11Initial program 25.6%
Taylor expanded in F around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
Simplified36.7%
Taylor expanded in B around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6428.1%
Simplified28.1%
if 7.80000000000000021e-11 < C Initial program 19.8%
Taylor expanded in F around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
Simplified40.0%
Taylor expanded in C around inf
/-lowering-/.f6432.5%
Simplified32.5%
Final simplification34.6%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (- 0.0 (sqrt 2.0))))
(if (<= C -9.2e-60)
(- 0.0 (* (sqrt 2.0) (sqrt (* F (/ -0.5 C)))))
(if (<= C 1.4e-12)
(* (sqrt (/ F B_m)) t_0)
(* (sqrt (* F (/ -0.5 A))) t_0)))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = 0.0 - sqrt(2.0);
double tmp;
if (C <= -9.2e-60) {
tmp = 0.0 - (sqrt(2.0) * sqrt((F * (-0.5 / C))));
} else if (C <= 1.4e-12) {
tmp = sqrt((F / B_m)) * t_0;
} else {
tmp = sqrt((F * (-0.5 / A))) * t_0;
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: t_0
real(8) :: tmp
t_0 = 0.0d0 - sqrt(2.0d0)
if (c <= (-9.2d-60)) then
tmp = 0.0d0 - (sqrt(2.0d0) * sqrt((f * ((-0.5d0) / c))))
else if (c <= 1.4d-12) then
tmp = sqrt((f / b_m)) * t_0
else
tmp = sqrt((f * ((-0.5d0) / a))) * t_0
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = 0.0 - Math.sqrt(2.0);
double tmp;
if (C <= -9.2e-60) {
tmp = 0.0 - (Math.sqrt(2.0) * Math.sqrt((F * (-0.5 / C))));
} else if (C <= 1.4e-12) {
tmp = Math.sqrt((F / B_m)) * t_0;
} else {
tmp = Math.sqrt((F * (-0.5 / A))) * t_0;
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = 0.0 - math.sqrt(2.0) tmp = 0 if C <= -9.2e-60: tmp = 0.0 - (math.sqrt(2.0) * math.sqrt((F * (-0.5 / C)))) elif C <= 1.4e-12: tmp = math.sqrt((F / B_m)) * t_0 else: tmp = math.sqrt((F * (-0.5 / A))) * t_0 return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(0.0 - sqrt(2.0)) tmp = 0.0 if (C <= -9.2e-60) tmp = Float64(0.0 - Float64(sqrt(2.0) * sqrt(Float64(F * Float64(-0.5 / C))))); elseif (C <= 1.4e-12) tmp = Float64(sqrt(Float64(F / B_m)) * t_0); else tmp = Float64(sqrt(Float64(F * Float64(-0.5 / A))) * t_0); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = 0.0 - sqrt(2.0); tmp = 0.0; if (C <= -9.2e-60) tmp = 0.0 - (sqrt(2.0) * sqrt((F * (-0.5 / C)))); elseif (C <= 1.4e-12) tmp = sqrt((F / B_m)) * t_0; else tmp = sqrt((F * (-0.5 / A))) * t_0; end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(0.0 - N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -9.2e-60], N[(0.0 - N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(F * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 1.4e-12], N[(N[Sqrt[N[(F / B$95$m), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[Sqrt[N[(F * N[(-0.5 / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := 0 - \sqrt{2}\\
\mathbf{if}\;C \leq -9.2 \cdot 10^{-60}:\\
\;\;\;\;0 - \sqrt{2} \cdot \sqrt{F \cdot \frac{-0.5}{C}}\\
\mathbf{elif}\;C \leq 1.4 \cdot 10^{-12}:\\
\;\;\;\;\sqrt{\frac{F}{B\_m}} \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;\sqrt{F \cdot \frac{-0.5}{A}} \cdot t\_0\\
\end{array}
\end{array}
if C < -9.2000000000000005e-60Initial program 11.5%
Taylor expanded in F around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
Simplified19.2%
Taylor expanded in C around -inf
/-lowering-/.f6447.5%
Simplified47.5%
if -9.2000000000000005e-60 < C < 1.4000000000000001e-12Initial program 25.6%
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.f6426.7%
Simplified26.7%
if 1.4000000000000001e-12 < C Initial program 19.8%
Taylor expanded in F around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
Simplified40.0%
Taylor expanded in C around inf
/-lowering-/.f6432.5%
Simplified32.5%
Final simplification33.9%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (- 0.0 (sqrt 2.0))))
(if (<= B_m 1.3e-145)
(*
0.25
(*
(/ 1.0 C)
(sqrt (+ (* -16.0 (* C F)) (* 4.0 (/ (* F (* B_m B_m)) C))))))
(if (<= B_m 1.18e-48)
(* (sqrt (* -0.5 (/ F A))) t_0)
(* (sqrt (/ F B_m)) t_0)))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = 0.0 - sqrt(2.0);
double tmp;
if (B_m <= 1.3e-145) {
tmp = 0.25 * ((1.0 / C) * sqrt(((-16.0 * (C * F)) + (4.0 * ((F * (B_m * B_m)) / C)))));
} else if (B_m <= 1.18e-48) {
tmp = sqrt((-0.5 * (F / A))) * t_0;
} else {
tmp = sqrt((F / B_m)) * t_0;
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: t_0
real(8) :: tmp
t_0 = 0.0d0 - sqrt(2.0d0)
if (b_m <= 1.3d-145) then
tmp = 0.25d0 * ((1.0d0 / c) * sqrt((((-16.0d0) * (c * f)) + (4.0d0 * ((f * (b_m * b_m)) / c)))))
else if (b_m <= 1.18d-48) then
tmp = sqrt(((-0.5d0) * (f / a))) * t_0
else
tmp = sqrt((f / b_m)) * t_0
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = 0.0 - Math.sqrt(2.0);
double tmp;
if (B_m <= 1.3e-145) {
tmp = 0.25 * ((1.0 / C) * Math.sqrt(((-16.0 * (C * F)) + (4.0 * ((F * (B_m * B_m)) / C)))));
} else if (B_m <= 1.18e-48) {
tmp = Math.sqrt((-0.5 * (F / A))) * t_0;
} else {
tmp = Math.sqrt((F / B_m)) * t_0;
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = 0.0 - math.sqrt(2.0) tmp = 0 if B_m <= 1.3e-145: tmp = 0.25 * ((1.0 / C) * math.sqrt(((-16.0 * (C * F)) + (4.0 * ((F * (B_m * B_m)) / C))))) elif B_m <= 1.18e-48: tmp = math.sqrt((-0.5 * (F / A))) * t_0 else: tmp = math.sqrt((F / B_m)) * t_0 return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(0.0 - sqrt(2.0)) tmp = 0.0 if (B_m <= 1.3e-145) tmp = Float64(0.25 * Float64(Float64(1.0 / C) * sqrt(Float64(Float64(-16.0 * Float64(C * F)) + Float64(4.0 * Float64(Float64(F * Float64(B_m * B_m)) / C)))))); elseif (B_m <= 1.18e-48) tmp = Float64(sqrt(Float64(-0.5 * Float64(F / A))) * t_0); else tmp = Float64(sqrt(Float64(F / B_m)) * t_0); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = 0.0 - sqrt(2.0); tmp = 0.0; if (B_m <= 1.3e-145) tmp = 0.25 * ((1.0 / C) * sqrt(((-16.0 * (C * F)) + (4.0 * ((F * (B_m * B_m)) / C))))); elseif (B_m <= 1.18e-48) tmp = sqrt((-0.5 * (F / A))) * t_0; else tmp = sqrt((F / B_m)) * t_0; end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(0.0 - N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 1.3e-145], N[(0.25 * N[(N[(1.0 / C), $MachinePrecision] * N[Sqrt[N[(N[(-16.0 * N[(C * F), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 1.18e-48], N[(N[Sqrt[N[(-0.5 * N[(F / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[Sqrt[N[(F / B$95$m), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := 0 - \sqrt{2}\\
\mathbf{if}\;B\_m \leq 1.3 \cdot 10^{-145}:\\
\;\;\;\;0.25 \cdot \left(\frac{1}{C} \cdot \sqrt{-16 \cdot \left(C \cdot F\right) + 4 \cdot \frac{F \cdot \left(B\_m \cdot B\_m\right)}{C}}\right)\\
\mathbf{elif}\;B\_m \leq 1.18 \cdot 10^{-48}:\\
\;\;\;\;\sqrt{-0.5 \cdot \frac{F}{A}} \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{F}{B\_m}} \cdot t\_0\\
\end{array}
\end{array}
if B < 1.3e-145Initial program 21.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified28.7%
Taylor expanded in B around 0
Simplified15.2%
Taylor expanded in C around inf
+-lowering-+.f64N/A
Simplified10.1%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-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-*.f6419.3%
Simplified19.3%
if 1.3e-145 < B < 1.18000000000000007e-48Initial program 19.5%
Taylor expanded in F around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
Simplified41.5%
Taylor expanded in C around inf
*-lowering-*.f64N/A
/-lowering-/.f6426.9%
Simplified26.9%
if 1.18000000000000007e-48 < B Initial program 17.6%
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.f6455.4%
Simplified55.4%
Final simplification30.2%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 1.35e-145)
(*
0.25
(* (/ 1.0 C) (sqrt (+ (* -16.0 (* C F)) (* 4.0 (/ (* F (* B_m B_m)) C))))))
(if (<= B_m 4.9e-51)
(/ (sqrt (* -16.0 (* A (* C (* C F))))) (- (* (* 4.0 A) C) (* B_m B_m)))
(* (sqrt (/ F B_m)) (- 0.0 (sqrt 2.0))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 1.35e-145) {
tmp = 0.25 * ((1.0 / C) * sqrt(((-16.0 * (C * F)) + (4.0 * ((F * (B_m * B_m)) / C)))));
} else if (B_m <= 4.9e-51) {
tmp = sqrt((-16.0 * (A * (C * (C * F))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = sqrt((F / B_m)) * (0.0 - 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 (b_m <= 1.35d-145) then
tmp = 0.25d0 * ((1.0d0 / c) * sqrt((((-16.0d0) * (c * f)) + (4.0d0 * ((f * (b_m * b_m)) / c)))))
else if (b_m <= 4.9d-51) then
tmp = sqrt(((-16.0d0) * (a * (c * (c * f))))) / (((4.0d0 * a) * c) - (b_m * b_m))
else
tmp = sqrt((f / b_m)) * (0.0d0 - 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 (B_m <= 1.35e-145) {
tmp = 0.25 * ((1.0 / C) * Math.sqrt(((-16.0 * (C * F)) + (4.0 * ((F * (B_m * B_m)) / C)))));
} else if (B_m <= 4.9e-51) {
tmp = Math.sqrt((-16.0 * (A * (C * (C * F))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = Math.sqrt((F / B_m)) * (0.0 - Math.sqrt(2.0));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 1.35e-145: tmp = 0.25 * ((1.0 / C) * math.sqrt(((-16.0 * (C * F)) + (4.0 * ((F * (B_m * B_m)) / C))))) elif B_m <= 4.9e-51: tmp = math.sqrt((-16.0 * (A * (C * (C * F))))) / (((4.0 * A) * C) - (B_m * B_m)) else: tmp = math.sqrt((F / B_m)) * (0.0 - math.sqrt(2.0)) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 1.35e-145) tmp = Float64(0.25 * Float64(Float64(1.0 / C) * sqrt(Float64(Float64(-16.0 * Float64(C * F)) + Float64(4.0 * Float64(Float64(F * Float64(B_m * B_m)) / C)))))); elseif (B_m <= 4.9e-51) tmp = Float64(sqrt(Float64(-16.0 * Float64(A * Float64(C * Float64(C * F))))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); else tmp = Float64(sqrt(Float64(F / B_m)) * Float64(0.0 - sqrt(2.0))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 1.35e-145) tmp = 0.25 * ((1.0 / C) * sqrt(((-16.0 * (C * F)) + (4.0 * ((F * (B_m * B_m)) / C))))); elseif (B_m <= 4.9e-51) tmp = sqrt((-16.0 * (A * (C * (C * F))))) / (((4.0 * A) * C) - (B_m * B_m)); else tmp = sqrt((F / B_m)) * (0.0 - sqrt(2.0)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 1.35e-145], N[(0.25 * N[(N[(1.0 / C), $MachinePrecision] * N[Sqrt[N[(N[(-16.0 * N[(C * F), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 4.9e-51], N[(N[Sqrt[N[(-16.0 * N[(A * N[(C * N[(C * F), $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[N[(F / B$95$m), $MachinePrecision]], $MachinePrecision] * N[(0.0 - N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 1.35 \cdot 10^{-145}:\\
\;\;\;\;0.25 \cdot \left(\frac{1}{C} \cdot \sqrt{-16 \cdot \left(C \cdot F\right) + 4 \cdot \frac{F \cdot \left(B\_m \cdot B\_m\right)}{C}}\right)\\
\mathbf{elif}\;B\_m \leq 4.9 \cdot 10^{-51}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(A \cdot \left(C \cdot \left(C \cdot F\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{F}{B\_m}} \cdot \left(0 - \sqrt{2}\right)\\
\end{array}
\end{array}
if B < 1.35e-145Initial program 21.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified28.7%
Taylor expanded in B around 0
Simplified15.2%
Taylor expanded in C around inf
+-lowering-+.f64N/A
Simplified10.1%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-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-*.f6419.3%
Simplified19.3%
if 1.35e-145 < B < 4.89999999999999974e-51Initial program 19.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.6%
Applied egg-rr23.2%
Taylor expanded in A around -inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6419.8%
Simplified19.8%
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6423.3%
Applied egg-rr23.3%
if 4.89999999999999974e-51 < B Initial program 17.6%
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.f6455.4%
Simplified55.4%
Final simplification29.8%
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 (<= A -3.9e-106)
(/ (sqrt (* -16.0 (* A (* C (* C F))))) t_0)
(if (<= A 4e-295)
(/ (sqrt (* 2.0 (* F (* B_m (* B_m B_m))))) t_0)
(*
0.25
(*
(/ 1.0 C)
(sqrt (+ (* -16.0 (* C F)) (* 4.0 (/ (* F (* B_m B_m)) C))))))))))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 (A <= -3.9e-106) {
tmp = sqrt((-16.0 * (A * (C * (C * F))))) / t_0;
} else if (A <= 4e-295) {
tmp = sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_0;
} else {
tmp = 0.25 * ((1.0 / C) * sqrt(((-16.0 * (C * F)) + (4.0 * ((F * (B_m * B_m)) / C)))));
}
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 (a <= (-3.9d-106)) then
tmp = sqrt(((-16.0d0) * (a * (c * (c * f))))) / t_0
else if (a <= 4d-295) then
tmp = sqrt((2.0d0 * (f * (b_m * (b_m * b_m))))) / t_0
else
tmp = 0.25d0 * ((1.0d0 / c) * sqrt((((-16.0d0) * (c * f)) + (4.0d0 * ((f * (b_m * b_m)) / c)))))
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 (A <= -3.9e-106) {
tmp = Math.sqrt((-16.0 * (A * (C * (C * F))))) / t_0;
} else if (A <= 4e-295) {
tmp = Math.sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_0;
} else {
tmp = 0.25 * ((1.0 / C) * Math.sqrt(((-16.0 * (C * F)) + (4.0 * ((F * (B_m * B_m)) / C)))));
}
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 A <= -3.9e-106: tmp = math.sqrt((-16.0 * (A * (C * (C * F))))) / t_0 elif A <= 4e-295: tmp = math.sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_0 else: tmp = 0.25 * ((1.0 / C) * math.sqrt(((-16.0 * (C * F)) + (4.0 * ((F * (B_m * B_m)) / C))))) 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 (A <= -3.9e-106) tmp = Float64(sqrt(Float64(-16.0 * Float64(A * Float64(C * Float64(C * F))))) / t_0); elseif (A <= 4e-295) tmp = Float64(sqrt(Float64(2.0 * Float64(F * Float64(B_m * Float64(B_m * B_m))))) / t_0); else tmp = Float64(0.25 * Float64(Float64(1.0 / C) * sqrt(Float64(Float64(-16.0 * Float64(C * F)) + Float64(4.0 * Float64(Float64(F * Float64(B_m * B_m)) / C)))))); 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 (A <= -3.9e-106) tmp = sqrt((-16.0 * (A * (C * (C * F))))) / t_0; elseif (A <= 4e-295) tmp = sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_0; else tmp = 0.25 * ((1.0 / C) * sqrt(((-16.0 * (C * F)) + (4.0 * ((F * (B_m * B_m)) / C))))); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -3.9e-106], N[(N[Sqrt[N[(-16.0 * N[(A * N[(C * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[A, 4e-295], N[(N[Sqrt[N[(2.0 * N[(F * N[(B$95$m * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], N[(0.25 * N[(N[(1.0 / C), $MachinePrecision] * N[Sqrt[N[(N[(-16.0 * N[(C * F), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $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}\;A \leq -3.9 \cdot 10^{-106}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(A \cdot \left(C \cdot \left(C \cdot F\right)\right)\right)}}{t\_0}\\
\mathbf{elif}\;A \leq 4 \cdot 10^{-295}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(B\_m \cdot \left(B\_m \cdot B\_m\right)\right)\right)}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;0.25 \cdot \left(\frac{1}{C} \cdot \sqrt{-16 \cdot \left(C \cdot F\right) + 4 \cdot \frac{F \cdot \left(B\_m \cdot B\_m\right)}{C}}\right)\\
\end{array}
\end{array}
if A < -3.9000000000000001e-106Initial program 13.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified14.4%
Applied egg-rr11.4%
Taylor expanded in A around -inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6421.9%
Simplified21.9%
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6426.3%
Applied egg-rr26.3%
if -3.9000000000000001e-106 < A < 4.00000000000000024e-295Initial program 33.9%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified39.9%
Taylor expanded in B around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6419.2%
Simplified19.2%
if 4.00000000000000024e-295 < A Initial program 19.3%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified28.8%
Taylor expanded in B around 0
Simplified18.5%
Taylor expanded in C around inf
+-lowering-+.f64N/A
Simplified11.6%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-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-*.f6429.0%
Simplified29.0%
Final simplification26.3%
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 (<= A -2.3e-107)
(/ (sqrt (* -16.0 (* A (* C (* C F))))) t_0)
(if (<= A 4.5e-294)
(/ (sqrt (* 2.0 (* F (* B_m (* B_m B_m))))) t_0)
(/ (sqrt (* -16.0 (* (* A C) (* A F)))) t_0)))))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 (A <= -2.3e-107) {
tmp = sqrt((-16.0 * (A * (C * (C * F))))) / t_0;
} else if (A <= 4.5e-294) {
tmp = sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_0;
} else {
tmp = sqrt((-16.0 * ((A * C) * (A * F)))) / t_0;
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: t_0
real(8) :: tmp
t_0 = ((4.0d0 * a) * c) - (b_m * b_m)
if (a <= (-2.3d-107)) then
tmp = sqrt(((-16.0d0) * (a * (c * (c * f))))) / t_0
else if (a <= 4.5d-294) then
tmp = sqrt((2.0d0 * (f * (b_m * (b_m * b_m))))) / t_0
else
tmp = sqrt(((-16.0d0) * ((a * c) * (a * f)))) / t_0
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (A <= -2.3e-107) {
tmp = Math.sqrt((-16.0 * (A * (C * (C * F))))) / t_0;
} else if (A <= 4.5e-294) {
tmp = Math.sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_0;
} else {
tmp = Math.sqrt((-16.0 * ((A * C) * (A * F)))) / t_0;
}
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 A <= -2.3e-107: tmp = math.sqrt((-16.0 * (A * (C * (C * F))))) / t_0 elif A <= 4.5e-294: tmp = math.sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_0 else: tmp = math.sqrt((-16.0 * ((A * C) * (A * F)))) / t_0 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 (A <= -2.3e-107) tmp = Float64(sqrt(Float64(-16.0 * Float64(A * Float64(C * Float64(C * F))))) / t_0); elseif (A <= 4.5e-294) tmp = Float64(sqrt(Float64(2.0 * Float64(F * Float64(B_m * Float64(B_m * B_m))))) / t_0); else tmp = Float64(sqrt(Float64(-16.0 * Float64(Float64(A * C) * Float64(A * F)))) / t_0); 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 (A <= -2.3e-107) tmp = sqrt((-16.0 * (A * (C * (C * F))))) / t_0; elseif (A <= 4.5e-294) tmp = sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_0; else tmp = sqrt((-16.0 * ((A * C) * (A * F)))) / t_0; end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -2.3e-107], N[(N[Sqrt[N[(-16.0 * N[(A * N[(C * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[A, 4.5e-294], N[(N[Sqrt[N[(2.0 * N[(F * N[(B$95$m * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[Sqrt[N[(-16.0 * N[(N[(A * C), $MachinePrecision] * N[(A * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $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}\;A \leq -2.3 \cdot 10^{-107}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(A \cdot \left(C \cdot \left(C \cdot F\right)\right)\right)}}{t\_0}\\
\mathbf{elif}\;A \leq 4.5 \cdot 10^{-294}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(B\_m \cdot \left(B\_m \cdot B\_m\right)\right)\right)}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(\left(A \cdot C\right) \cdot \left(A \cdot F\right)\right)}}{t\_0}\\
\end{array}
\end{array}
if A < -2.30000000000000003e-107Initial program 13.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified14.4%
Applied egg-rr11.4%
Taylor expanded in A around -inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6421.9%
Simplified21.9%
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6426.3%
Applied egg-rr26.3%
if -2.30000000000000003e-107 < A < 4.49999999999999981e-294Initial program 33.3%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified39.1%
Taylor expanded in B around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6419.0%
Simplified19.0%
if 4.49999999999999981e-294 < A Initial program 19.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified29.0%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6414.4%
Simplified14.4%
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6420.0%
Applied egg-rr20.0%
Final simplification21.8%
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 (<= A -3.5e-106)
(/ (sqrt (* (* A -16.0) (* F (* C C)))) t_0)
(if (<= A 2.6e-294)
(/ (sqrt (* 2.0 (* F (* B_m (* B_m B_m))))) t_0)
(/ (sqrt (* -16.0 (* (* A C) (* A F)))) t_0)))))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 (A <= -3.5e-106) {
tmp = sqrt(((A * -16.0) * (F * (C * C)))) / t_0;
} else if (A <= 2.6e-294) {
tmp = sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_0;
} else {
tmp = sqrt((-16.0 * ((A * C) * (A * F)))) / t_0;
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: t_0
real(8) :: tmp
t_0 = ((4.0d0 * a) * c) - (b_m * b_m)
if (a <= (-3.5d-106)) then
tmp = sqrt(((a * (-16.0d0)) * (f * (c * c)))) / t_0
else if (a <= 2.6d-294) then
tmp = sqrt((2.0d0 * (f * (b_m * (b_m * b_m))))) / t_0
else
tmp = sqrt(((-16.0d0) * ((a * c) * (a * f)))) / t_0
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (A <= -3.5e-106) {
tmp = Math.sqrt(((A * -16.0) * (F * (C * C)))) / t_0;
} else if (A <= 2.6e-294) {
tmp = Math.sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_0;
} else {
tmp = Math.sqrt((-16.0 * ((A * C) * (A * F)))) / t_0;
}
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 A <= -3.5e-106: tmp = math.sqrt(((A * -16.0) * (F * (C * C)))) / t_0 elif A <= 2.6e-294: tmp = math.sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_0 else: tmp = math.sqrt((-16.0 * ((A * C) * (A * F)))) / t_0 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 (A <= -3.5e-106) tmp = Float64(sqrt(Float64(Float64(A * -16.0) * Float64(F * Float64(C * C)))) / t_0); elseif (A <= 2.6e-294) tmp = Float64(sqrt(Float64(2.0 * Float64(F * Float64(B_m * Float64(B_m * B_m))))) / t_0); else tmp = Float64(sqrt(Float64(-16.0 * Float64(Float64(A * C) * Float64(A * F)))) / t_0); 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 (A <= -3.5e-106) tmp = sqrt(((A * -16.0) * (F * (C * C)))) / t_0; elseif (A <= 2.6e-294) tmp = sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_0; else tmp = sqrt((-16.0 * ((A * C) * (A * F)))) / t_0; end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -3.5e-106], N[(N[Sqrt[N[(N[(A * -16.0), $MachinePrecision] * N[(F * N[(C * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[A, 2.6e-294], N[(N[Sqrt[N[(2.0 * N[(F * N[(B$95$m * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[Sqrt[N[(-16.0 * N[(N[(A * C), $MachinePrecision] * N[(A * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $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}\;A \leq -3.5 \cdot 10^{-106}:\\
\;\;\;\;\frac{\sqrt{\left(A \cdot -16\right) \cdot \left(F \cdot \left(C \cdot C\right)\right)}}{t\_0}\\
\mathbf{elif}\;A \leq 2.6 \cdot 10^{-294}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(B\_m \cdot \left(B\_m \cdot B\_m\right)\right)\right)}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(\left(A \cdot C\right) \cdot \left(A \cdot F\right)\right)}}{t\_0}\\
\end{array}
\end{array}
if A < -3.5e-106Initial program 13.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified14.4%
Taylor expanded in A around -inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6422.0%
Simplified22.0%
if -3.5e-106 < A < 2.5999999999999999e-294Initial program 33.3%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified39.1%
Taylor expanded in B around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6419.0%
Simplified19.0%
if 2.5999999999999999e-294 < A Initial program 19.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified29.0%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6414.4%
Simplified14.4%
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6420.0%
Applied egg-rr20.0%
Final simplification20.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-60)
(/ (sqrt (* -16.0 (* (* A C) (* A F)))) t_0)
(/ (sqrt (* 2.0 (* F (* B_m (* B_m B_m))))) t_0))))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-60) {
tmp = sqrt((-16.0 * ((A * C) * (A * F)))) / t_0;
} else {
tmp = sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_0;
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: t_0
real(8) :: tmp
t_0 = ((4.0d0 * a) * c) - (b_m * b_m)
if (b_m <= 1.9d-60) then
tmp = sqrt(((-16.0d0) * ((a * c) * (a * f)))) / t_0
else
tmp = sqrt((2.0d0 * (f * (b_m * (b_m * b_m))))) / t_0
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (B_m <= 1.9e-60) {
tmp = Math.sqrt((-16.0 * ((A * C) * (A * F)))) / t_0;
} else {
tmp = Math.sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_0;
}
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-60: tmp = math.sqrt((-16.0 * ((A * C) * (A * F)))) / t_0 else: tmp = math.sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_0 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-60) tmp = Float64(sqrt(Float64(-16.0 * Float64(Float64(A * C) * Float64(A * F)))) / t_0); else tmp = Float64(sqrt(Float64(2.0 * Float64(F * Float64(B_m * Float64(B_m * B_m))))) / t_0); 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-60) tmp = sqrt((-16.0 * ((A * C) * (A * F)))) / t_0; else tmp = sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_0; end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 1.9e-60], N[(N[Sqrt[N[(-16.0 * N[(N[(A * C), $MachinePrecision] * N[(A * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[Sqrt[N[(2.0 * N[(F * N[(B$95$m * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $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^{-60}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(\left(A \cdot C\right) \cdot \left(A \cdot F\right)\right)}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(B\_m \cdot \left(B\_m \cdot B\_m\right)\right)\right)}}{t\_0}\\
\end{array}
\end{array}
if B < 1.89999999999999997e-60Initial program 21.4%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified28.2%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6412.3%
Simplified12.3%
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6416.1%
Applied egg-rr16.1%
if 1.89999999999999997e-60 < B Initial program 17.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified21.8%
Taylor expanded in B around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6416.0%
Simplified16.0%
Final simplification16.1%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (/ (sqrt (* -16.0 (* (* A C) (* A F)))) (- (* (* 4.0 A) C) (* B_m B_m))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
return sqrt((-16.0 * ((A * C) * (A * F)))) / (((4.0 * A) * C) - (B_m * 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(((-16.0d0) * ((a * c) * (a * f)))) / (((4.0d0 * a) * c) - (b_m * 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((-16.0 * ((A * C) * (A * F)))) / (((4.0 * A) * C) - (B_m * B_m));
}
B_m = math.fabs(B) def code(A, B_m, C, F): return math.sqrt((-16.0 * ((A * C) * (A * F)))) / (((4.0 * A) * C) - (B_m * B_m))
B_m = abs(B) function code(A, B_m, C, F) return Float64(sqrt(Float64(-16.0 * Float64(Float64(A * C) * Float64(A * F)))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))) end
B_m = abs(B); function tmp = code(A, B_m, C, F) tmp = sqrt((-16.0 * ((A * C) * (A * F)))) / (((4.0 * A) * C) - (B_m * B_m)); end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := N[(N[Sqrt[N[(-16.0 * N[(N[(A * C), $MachinePrecision] * N[(A * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|
\\
\frac{\sqrt{-16 \cdot \left(\left(A \cdot C\right) \cdot \left(A \cdot F\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}
\end{array}
Initial program 20.3%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.3%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f649.7%
Simplified9.7%
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6412.8%
Applied egg-rr12.8%
Final simplification12.8%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (/ (sqrt (* -16.0 (* A (* F (* A C))))) (- (* (* 4.0 A) C) (* B_m B_m))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
return sqrt((-16.0 * (A * (F * (A * C))))) / (((4.0 * A) * C) - (B_m * 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(((-16.0d0) * (a * (f * (a * c))))) / (((4.0d0 * a) * c) - (b_m * 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((-16.0 * (A * (F * (A * C))))) / (((4.0 * A) * C) - (B_m * B_m));
}
B_m = math.fabs(B) def code(A, B_m, C, F): return math.sqrt((-16.0 * (A * (F * (A * C))))) / (((4.0 * A) * C) - (B_m * B_m))
B_m = abs(B) function code(A, B_m, C, F) return Float64(sqrt(Float64(-16.0 * Float64(A * Float64(F * Float64(A * C))))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))) end
B_m = abs(B); function tmp = code(A, B_m, C, F) tmp = sqrt((-16.0 * (A * (F * (A * C))))) / (((4.0 * A) * C) - (B_m * B_m)); end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := N[(N[Sqrt[N[(-16.0 * N[(A * N[(F * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|
\\
\frac{\sqrt{-16 \cdot \left(A \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}
\end{array}
Initial program 20.3%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.3%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f649.7%
Simplified9.7%
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6412.3%
Applied egg-rr12.3%
Final simplification12.3%
herbie shell --seed 2024138
(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))))