
(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 26 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 (hypot B_m (- A C)))
(t_1 (* (* 4.0 A) C))
(t_2
(/
(sqrt
(*
(* 2.0 (* (- (pow B_m 2.0) t_1) F))
(+ (+ A C) (sqrt (+ (pow B_m 2.0) (pow (- A C) 2.0))))))
(- t_1 (pow B_m 2.0)))))
(if (<= t_2 0.0)
(/
(* (sqrt (* 2.0 (+ (* B_m B_m) (* -4.0 (* A C))))) (sqrt F))
(* (pow (+ C (+ A t_0)) -0.5) (- (* 4.0 (* A C)) (* B_m B_m))))
(if (<= t_2 INFINITY)
(/
(*
(* (pow (* F -4.0) 0.5) (sqrt (* A C)))
(sqrt (* 2.0 (+ A (+ C t_0)))))
(- t_1 (* 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 t_0 = hypot(B_m, (A - C));
double t_1 = (4.0 * A) * C;
double t_2 = sqrt(((2.0 * ((pow(B_m, 2.0) - t_1) * F)) * ((A + C) + sqrt((pow(B_m, 2.0) + pow((A - C), 2.0)))))) / (t_1 - pow(B_m, 2.0));
double tmp;
if (t_2 <= 0.0) {
tmp = (sqrt((2.0 * ((B_m * B_m) + (-4.0 * (A * C))))) * sqrt(F)) / (pow((C + (A + t_0)), -0.5) * ((4.0 * (A * C)) - (B_m * B_m)));
} else if (t_2 <= ((double) INFINITY)) {
tmp = ((pow((F * -4.0), 0.5) * sqrt((A * C))) * sqrt((2.0 * (A + (C + t_0))))) / (t_1 - (B_m * B_m));
} 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 t_0 = Math.hypot(B_m, (A - C));
double t_1 = (4.0 * A) * C;
double t_2 = Math.sqrt(((2.0 * ((Math.pow(B_m, 2.0) - t_1) * F)) * ((A + C) + Math.sqrt((Math.pow(B_m, 2.0) + Math.pow((A - C), 2.0)))))) / (t_1 - Math.pow(B_m, 2.0));
double tmp;
if (t_2 <= 0.0) {
tmp = (Math.sqrt((2.0 * ((B_m * B_m) + (-4.0 * (A * C))))) * Math.sqrt(F)) / (Math.pow((C + (A + t_0)), -0.5) * ((4.0 * (A * C)) - (B_m * B_m)));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = ((Math.pow((F * -4.0), 0.5) * Math.sqrt((A * C))) * Math.sqrt((2.0 * (A + (C + t_0))))) / (t_1 - (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): t_0 = math.hypot(B_m, (A - C)) t_1 = (4.0 * A) * C t_2 = math.sqrt(((2.0 * ((math.pow(B_m, 2.0) - t_1) * F)) * ((A + C) + math.sqrt((math.pow(B_m, 2.0) + math.pow((A - C), 2.0)))))) / (t_1 - math.pow(B_m, 2.0)) tmp = 0 if t_2 <= 0.0: tmp = (math.sqrt((2.0 * ((B_m * B_m) + (-4.0 * (A * C))))) * math.sqrt(F)) / (math.pow((C + (A + t_0)), -0.5) * ((4.0 * (A * C)) - (B_m * B_m))) elif t_2 <= math.inf: tmp = ((math.pow((F * -4.0), 0.5) * math.sqrt((A * C))) * math.sqrt((2.0 * (A + (C + t_0))))) / (t_1 - (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) t_0 = hypot(B_m, Float64(A - C)) t_1 = Float64(Float64(4.0 * A) * C) t_2 = Float64(sqrt(Float64(Float64(2.0 * Float64(Float64((B_m ^ 2.0) - t_1) * F)) * Float64(Float64(A + C) + sqrt(Float64((B_m ^ 2.0) + (Float64(A - C) ^ 2.0)))))) / Float64(t_1 - (B_m ^ 2.0))) tmp = 0.0 if (t_2 <= 0.0) tmp = Float64(Float64(sqrt(Float64(2.0 * Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))))) * sqrt(F)) / Float64((Float64(C + Float64(A + t_0)) ^ -0.5) * Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m)))); elseif (t_2 <= Inf) tmp = Float64(Float64(Float64((Float64(F * -4.0) ^ 0.5) * sqrt(Float64(A * C))) * sqrt(Float64(2.0 * Float64(A + Float64(C + t_0))))) / Float64(t_1 - 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) t_0 = hypot(B_m, (A - C)); t_1 = (4.0 * A) * C; t_2 = sqrt(((2.0 * (((B_m ^ 2.0) - t_1) * F)) * ((A + C) + sqrt(((B_m ^ 2.0) + ((A - C) ^ 2.0)))))) / (t_1 - (B_m ^ 2.0)); tmp = 0.0; if (t_2 <= 0.0) tmp = (sqrt((2.0 * ((B_m * B_m) + (-4.0 * (A * C))))) * sqrt(F)) / (((C + (A + t_0)) ^ -0.5) * ((4.0 * (A * C)) - (B_m * B_m))); elseif (t_2 <= Inf) tmp = ((((F * -4.0) ^ 0.5) * sqrt((A * C))) * sqrt((2.0 * (A + (C + t_0))))) / (t_1 - (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_] := Block[{t$95$0 = N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]}, Block[{t$95$1 = N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[N[(N[(2.0 * N[(N[(N[Power[B$95$m, 2.0], $MachinePrecision] - t$95$1), $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$1 - N[Power[B$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[(N[(N[Sqrt[N[(2.0 * N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[F], $MachinePrecision]), $MachinePrecision] / N[(N[Power[N[(C + N[(A + t$95$0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(N[(N[(N[Power[N[(F * -4.0), $MachinePrecision], 0.5], $MachinePrecision] * N[Sqrt[N[(A * C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(2.0 * N[(A + N[(C + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(t$95$1 - 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}
t_0 := \mathsf{hypot}\left(B\_m, A - C\right)\\
t_1 := \left(4 \cdot A\right) \cdot C\\
t_2 := \frac{\sqrt{\left(2 \cdot \left(\left({B\_m}^{2} - t\_1\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{B\_m}^{2} + {\left(A - C\right)}^{2}}\right)}}{t\_1 - {B\_m}^{2}}\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right)} \cdot \sqrt{F}}{{\left(C + \left(A + t\_0\right)\right)}^{-0.5} \cdot \left(4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m\right)}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\frac{\left({\left(F \cdot -4\right)}^{0.5} \cdot \sqrt{A \cdot C}\right) \cdot \sqrt{2 \cdot \left(A + \left(C + t\_0\right)\right)}}{t\_1 - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{F}{B\_m}} \cdot \left(0 - \sqrt{2}\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))) < -0.0Initial program 29.2%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified37.7%
pow1/2N/A
unpow-prod-downN/A
associate-/l*N/A
*-lowering-*.f64N/A
Applied egg-rr50.4%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr50.4%
pow1/2N/A
associate-*r*N/A
unpow-prod-downN/A
*-lowering-*.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f6462.9%
Applied egg-rr62.9%
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
Applied egg-rr63.2%
if -0.0 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 #s(literal 2 binary64) (*.f64 (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))))) (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C))) < +inf.0Initial program 33.2%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified53.9%
pow2N/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
Applied egg-rr74.7%
Taylor expanded in B around 0
*-lowering-*.f64N/A
*-lowering-*.f6474.7%
Simplified74.7%
pow1/2N/A
*-commutativeN/A
associate-*r*N/A
unpow-prod-downN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6482.6%
Applied egg-rr82.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 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.f6415.6%
Simplified15.6%
Final simplification45.0%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0
(/
(- (* A (* 4.0 C)) (* B_m B_m))
(sqrt (+ A (+ C (hypot B_m (- A C)))))))
(t_1 (+ (* B_m B_m) (* -4.0 (* A C)))))
(if (<= B_m 8.5e-100)
(/ (sqrt (* t_1 (* 2.0 F))) t_0)
(if (<= B_m 1.05e+153)
(/ (* (sqrt (* 2.0 t_1)) (sqrt F)) t_0)
(if (<= B_m 2.2e+224)
(* (- 0.0 (/ (sqrt 2.0) B_m)) (sqrt (* F (+ C (hypot C 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 t_0 = ((A * (4.0 * C)) - (B_m * B_m)) / sqrt((A + (C + hypot(B_m, (A - C)))));
double t_1 = (B_m * B_m) + (-4.0 * (A * C));
double tmp;
if (B_m <= 8.5e-100) {
tmp = sqrt((t_1 * (2.0 * F))) / t_0;
} else if (B_m <= 1.05e+153) {
tmp = (sqrt((2.0 * t_1)) * sqrt(F)) / t_0;
} else if (B_m <= 2.2e+224) {
tmp = (0.0 - (sqrt(2.0) / B_m)) * sqrt((F * (C + hypot(C, B_m))));
} 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 t_0 = ((A * (4.0 * C)) - (B_m * B_m)) / Math.sqrt((A + (C + Math.hypot(B_m, (A - C)))));
double t_1 = (B_m * B_m) + (-4.0 * (A * C));
double tmp;
if (B_m <= 8.5e-100) {
tmp = Math.sqrt((t_1 * (2.0 * F))) / t_0;
} else if (B_m <= 1.05e+153) {
tmp = (Math.sqrt((2.0 * t_1)) * Math.sqrt(F)) / t_0;
} else if (B_m <= 2.2e+224) {
tmp = (0.0 - (Math.sqrt(2.0) / B_m)) * Math.sqrt((F * (C + Math.hypot(C, 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): t_0 = ((A * (4.0 * C)) - (B_m * B_m)) / math.sqrt((A + (C + math.hypot(B_m, (A - C))))) t_1 = (B_m * B_m) + (-4.0 * (A * C)) tmp = 0 if B_m <= 8.5e-100: tmp = math.sqrt((t_1 * (2.0 * F))) / t_0 elif B_m <= 1.05e+153: tmp = (math.sqrt((2.0 * t_1)) * math.sqrt(F)) / t_0 elif B_m <= 2.2e+224: tmp = (0.0 - (math.sqrt(2.0) / B_m)) * math.sqrt((F * (C + math.hypot(C, 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) t_0 = Float64(Float64(Float64(A * Float64(4.0 * C)) - Float64(B_m * B_m)) / sqrt(Float64(A + Float64(C + hypot(B_m, Float64(A - C)))))) t_1 = Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) tmp = 0.0 if (B_m <= 8.5e-100) tmp = Float64(sqrt(Float64(t_1 * Float64(2.0 * F))) / t_0); elseif (B_m <= 1.05e+153) tmp = Float64(Float64(sqrt(Float64(2.0 * t_1)) * sqrt(F)) / t_0); elseif (B_m <= 2.2e+224) tmp = Float64(Float64(0.0 - Float64(sqrt(2.0) / B_m)) * sqrt(Float64(F * Float64(C + hypot(C, 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) t_0 = ((A * (4.0 * C)) - (B_m * B_m)) / sqrt((A + (C + hypot(B_m, (A - C))))); t_1 = (B_m * B_m) + (-4.0 * (A * C)); tmp = 0.0; if (B_m <= 8.5e-100) tmp = sqrt((t_1 * (2.0 * F))) / t_0; elseif (B_m <= 1.05e+153) tmp = (sqrt((2.0 * t_1)) * sqrt(F)) / t_0; elseif (B_m <= 2.2e+224) tmp = (0.0 - (sqrt(2.0) / B_m)) * sqrt((F * (C + hypot(C, 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_] := Block[{t$95$0 = N[(N[(N[(A * N[(4.0 * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(A + N[(C + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 8.5e-100], N[(N[Sqrt[N[(t$95$1 * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[B$95$m, 1.05e+153], N[(N[(N[Sqrt[N[(2.0 * t$95$1), $MachinePrecision]], $MachinePrecision] * N[Sqrt[F], $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[B$95$m, 2.2e+224], N[(N[(0.0 - N[(N[Sqrt[2.0], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(F * N[(C + N[Sqrt[C ^ 2 + B$95$m ^ 2], $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}
t_0 := \frac{A \cdot \left(4 \cdot C\right) - B\_m \cdot B\_m}{\sqrt{A + \left(C + \mathsf{hypot}\left(B\_m, A - C\right)\right)}}\\
t_1 := B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\\
\mathbf{if}\;B\_m \leq 8.5 \cdot 10^{-100}:\\
\;\;\;\;\frac{\sqrt{t\_1 \cdot \left(2 \cdot F\right)}}{t\_0}\\
\mathbf{elif}\;B\_m \leq 1.05 \cdot 10^{+153}:\\
\;\;\;\;\frac{\sqrt{2 \cdot t\_1} \cdot \sqrt{F}}{t\_0}\\
\mathbf{elif}\;B\_m \leq 2.2 \cdot 10^{+224}:\\
\;\;\;\;\left(0 - \frac{\sqrt{2}}{B\_m}\right) \cdot \sqrt{F \cdot \left(C + \mathsf{hypot}\left(C, B\_m\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{F}{B\_m}} \cdot \left(0 - \sqrt{2}\right)\\
\end{array}
\end{array}
if B < 8.50000000000000017e-100Initial program 18.3%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.3%
pow1/2N/A
unpow-prod-downN/A
associate-/l*N/A
*-lowering-*.f64N/A
Applied egg-rr33.8%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr33.9%
if 8.50000000000000017e-100 < B < 1.05000000000000008e153Initial program 22.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.4%
pow1/2N/A
unpow-prod-downN/A
associate-/l*N/A
*-lowering-*.f64N/A
Applied egg-rr40.6%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr40.6%
pow1/2N/A
associate-*r*N/A
unpow-prod-downN/A
*-lowering-*.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f6449.5%
Applied egg-rr49.5%
if 1.05000000000000008e153 < B < 2.2e224Initial program 8.9%
Taylor expanded in A 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.7%
Simplified55.7%
if 2.2e224 < 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.f6467.0%
Simplified67.0%
Final simplification40.6%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (- (* A (* 4.0 C)) (* B_m B_m)))
(t_1 (+ (* B_m B_m) (* -4.0 (* A C))))
(t_2 (+ A (+ C (hypot B_m (- A C))))))
(if (<= B_m 2.1e-99)
(/ (sqrt (* t_1 (* 2.0 F))) (/ t_0 (sqrt t_2)))
(if (<= B_m 4.5e+152)
(* (sqrt t_1) (* (sqrt F) (/ (sqrt (* 2.0 t_2)) t_0)))
(if (<= B_m 1.12e+223)
(* (- 0.0 (/ (sqrt 2.0) B_m)) (sqrt (* F (+ C (hypot C 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 t_0 = (A * (4.0 * C)) - (B_m * B_m);
double t_1 = (B_m * B_m) + (-4.0 * (A * C));
double t_2 = A + (C + hypot(B_m, (A - C)));
double tmp;
if (B_m <= 2.1e-99) {
tmp = sqrt((t_1 * (2.0 * F))) / (t_0 / sqrt(t_2));
} else if (B_m <= 4.5e+152) {
tmp = sqrt(t_1) * (sqrt(F) * (sqrt((2.0 * t_2)) / t_0));
} else if (B_m <= 1.12e+223) {
tmp = (0.0 - (sqrt(2.0) / B_m)) * sqrt((F * (C + hypot(C, B_m))));
} 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 t_0 = (A * (4.0 * C)) - (B_m * B_m);
double t_1 = (B_m * B_m) + (-4.0 * (A * C));
double t_2 = A + (C + Math.hypot(B_m, (A - C)));
double tmp;
if (B_m <= 2.1e-99) {
tmp = Math.sqrt((t_1 * (2.0 * F))) / (t_0 / Math.sqrt(t_2));
} else if (B_m <= 4.5e+152) {
tmp = Math.sqrt(t_1) * (Math.sqrt(F) * (Math.sqrt((2.0 * t_2)) / t_0));
} else if (B_m <= 1.12e+223) {
tmp = (0.0 - (Math.sqrt(2.0) / B_m)) * Math.sqrt((F * (C + Math.hypot(C, 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): t_0 = (A * (4.0 * C)) - (B_m * B_m) t_1 = (B_m * B_m) + (-4.0 * (A * C)) t_2 = A + (C + math.hypot(B_m, (A - C))) tmp = 0 if B_m <= 2.1e-99: tmp = math.sqrt((t_1 * (2.0 * F))) / (t_0 / math.sqrt(t_2)) elif B_m <= 4.5e+152: tmp = math.sqrt(t_1) * (math.sqrt(F) * (math.sqrt((2.0 * t_2)) / t_0)) elif B_m <= 1.12e+223: tmp = (0.0 - (math.sqrt(2.0) / B_m)) * math.sqrt((F * (C + math.hypot(C, 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) t_0 = Float64(Float64(A * Float64(4.0 * C)) - Float64(B_m * B_m)) t_1 = Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) t_2 = Float64(A + Float64(C + hypot(B_m, Float64(A - C)))) tmp = 0.0 if (B_m <= 2.1e-99) tmp = Float64(sqrt(Float64(t_1 * Float64(2.0 * F))) / Float64(t_0 / sqrt(t_2))); elseif (B_m <= 4.5e+152) tmp = Float64(sqrt(t_1) * Float64(sqrt(F) * Float64(sqrt(Float64(2.0 * t_2)) / t_0))); elseif (B_m <= 1.12e+223) tmp = Float64(Float64(0.0 - Float64(sqrt(2.0) / B_m)) * sqrt(Float64(F * Float64(C + hypot(C, 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) t_0 = (A * (4.0 * C)) - (B_m * B_m); t_1 = (B_m * B_m) + (-4.0 * (A * C)); t_2 = A + (C + hypot(B_m, (A - C))); tmp = 0.0; if (B_m <= 2.1e-99) tmp = sqrt((t_1 * (2.0 * F))) / (t_0 / sqrt(t_2)); elseif (B_m <= 4.5e+152) tmp = sqrt(t_1) * (sqrt(F) * (sqrt((2.0 * t_2)) / t_0)); elseif (B_m <= 1.12e+223) tmp = (0.0 - (sqrt(2.0) / B_m)) * sqrt((F * (C + hypot(C, 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_] := Block[{t$95$0 = N[(N[(A * N[(4.0 * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(A + N[(C + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 2.1e-99], N[(N[Sqrt[N[(t$95$1 * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(t$95$0 / N[Sqrt[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 4.5e+152], N[(N[Sqrt[t$95$1], $MachinePrecision] * N[(N[Sqrt[F], $MachinePrecision] * N[(N[Sqrt[N[(2.0 * t$95$2), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 1.12e+223], N[(N[(0.0 - N[(N[Sqrt[2.0], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(F * N[(C + N[Sqrt[C ^ 2 + B$95$m ^ 2], $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}
t_0 := A \cdot \left(4 \cdot C\right) - B\_m \cdot B\_m\\
t_1 := B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\\
t_2 := A + \left(C + \mathsf{hypot}\left(B\_m, A - C\right)\right)\\
\mathbf{if}\;B\_m \leq 2.1 \cdot 10^{-99}:\\
\;\;\;\;\frac{\sqrt{t\_1 \cdot \left(2 \cdot F\right)}}{\frac{t\_0}{\sqrt{t\_2}}}\\
\mathbf{elif}\;B\_m \leq 4.5 \cdot 10^{+152}:\\
\;\;\;\;\sqrt{t\_1} \cdot \left(\sqrt{F} \cdot \frac{\sqrt{2 \cdot t\_2}}{t\_0}\right)\\
\mathbf{elif}\;B\_m \leq 1.12 \cdot 10^{+223}:\\
\;\;\;\;\left(0 - \frac{\sqrt{2}}{B\_m}\right) \cdot \sqrt{F \cdot \left(C + \mathsf{hypot}\left(C, B\_m\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{F}{B\_m}} \cdot \left(0 - \sqrt{2}\right)\\
\end{array}
\end{array}
if B < 2.09999999999999984e-99Initial program 18.3%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.3%
pow1/2N/A
unpow-prod-downN/A
associate-/l*N/A
*-lowering-*.f64N/A
Applied egg-rr33.8%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr33.9%
if 2.09999999999999984e-99 < B < 4.5000000000000001e152Initial program 22.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.4%
pow1/2N/A
unpow-prod-downN/A
associate-/l*N/A
*-lowering-*.f64N/A
Applied egg-rr40.6%
Applied egg-rr49.6%
if 4.5000000000000001e152 < B < 1.1200000000000001e223Initial program 8.9%
Taylor expanded in A 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.7%
Simplified55.7%
if 1.1200000000000001e223 < 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.f6467.0%
Simplified67.0%
Final simplification40.6%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0
(/
(- (* A (* 4.0 C)) (* B_m B_m))
(sqrt (+ A (+ C (hypot B_m (- A C))))))))
(if (<= B_m 3.6e+43)
(/ (sqrt (* (+ (* B_m B_m) (* -4.0 (* A C))) (* 2.0 F))) t_0)
(if (<= B_m 1.05e+153)
(/ (* (sqrt F) (* B_m (sqrt 2.0))) t_0)
(if (<= B_m 1.2e+224)
(* (- 0.0 (/ (sqrt 2.0) B_m)) (sqrt (* F (+ C (hypot C 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 t_0 = ((A * (4.0 * C)) - (B_m * B_m)) / sqrt((A + (C + hypot(B_m, (A - C)))));
double tmp;
if (B_m <= 3.6e+43) {
tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) / t_0;
} else if (B_m <= 1.05e+153) {
tmp = (sqrt(F) * (B_m * sqrt(2.0))) / t_0;
} else if (B_m <= 1.2e+224) {
tmp = (0.0 - (sqrt(2.0) / B_m)) * sqrt((F * (C + hypot(C, B_m))));
} 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 t_0 = ((A * (4.0 * C)) - (B_m * B_m)) / Math.sqrt((A + (C + Math.hypot(B_m, (A - C)))));
double tmp;
if (B_m <= 3.6e+43) {
tmp = Math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) / t_0;
} else if (B_m <= 1.05e+153) {
tmp = (Math.sqrt(F) * (B_m * Math.sqrt(2.0))) / t_0;
} else if (B_m <= 1.2e+224) {
tmp = (0.0 - (Math.sqrt(2.0) / B_m)) * Math.sqrt((F * (C + Math.hypot(C, 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): t_0 = ((A * (4.0 * C)) - (B_m * B_m)) / math.sqrt((A + (C + math.hypot(B_m, (A - C))))) tmp = 0 if B_m <= 3.6e+43: tmp = math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) / t_0 elif B_m <= 1.05e+153: tmp = (math.sqrt(F) * (B_m * math.sqrt(2.0))) / t_0 elif B_m <= 1.2e+224: tmp = (0.0 - (math.sqrt(2.0) / B_m)) * math.sqrt((F * (C + math.hypot(C, 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) t_0 = Float64(Float64(Float64(A * Float64(4.0 * C)) - Float64(B_m * B_m)) / sqrt(Float64(A + Float64(C + hypot(B_m, Float64(A - C)))))) tmp = 0.0 if (B_m <= 3.6e+43) tmp = Float64(sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(2.0 * F))) / t_0); elseif (B_m <= 1.05e+153) tmp = Float64(Float64(sqrt(F) * Float64(B_m * sqrt(2.0))) / t_0); elseif (B_m <= 1.2e+224) tmp = Float64(Float64(0.0 - Float64(sqrt(2.0) / B_m)) * sqrt(Float64(F * Float64(C + hypot(C, 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) t_0 = ((A * (4.0 * C)) - (B_m * B_m)) / sqrt((A + (C + hypot(B_m, (A - C))))); tmp = 0.0; if (B_m <= 3.6e+43) tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) / t_0; elseif (B_m <= 1.05e+153) tmp = (sqrt(F) * (B_m * sqrt(2.0))) / t_0; elseif (B_m <= 1.2e+224) tmp = (0.0 - (sqrt(2.0) / B_m)) * sqrt((F * (C + hypot(C, 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_] := Block[{t$95$0 = N[(N[(N[(A * N[(4.0 * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(A + N[(C + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 3.6e+43], N[(N[Sqrt[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[B$95$m, 1.05e+153], N[(N[(N[Sqrt[F], $MachinePrecision] * N[(B$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[B$95$m, 1.2e+224], N[(N[(0.0 - N[(N[Sqrt[2.0], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(F * N[(C + N[Sqrt[C ^ 2 + B$95$m ^ 2], $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}
t_0 := \frac{A \cdot \left(4 \cdot C\right) - B\_m \cdot B\_m}{\sqrt{A + \left(C + \mathsf{hypot}\left(B\_m, A - C\right)\right)}}\\
\mathbf{if}\;B\_m \leq 3.6 \cdot 10^{+43}:\\
\;\;\;\;\frac{\sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(2 \cdot F\right)}}{t\_0}\\
\mathbf{elif}\;B\_m \leq 1.05 \cdot 10^{+153}:\\
\;\;\;\;\frac{\sqrt{F} \cdot \left(B\_m \cdot \sqrt{2}\right)}{t\_0}\\
\mathbf{elif}\;B\_m \leq 1.2 \cdot 10^{+224}:\\
\;\;\;\;\left(0 - \frac{\sqrt{2}}{B\_m}\right) \cdot \sqrt{F \cdot \left(C + \mathsf{hypot}\left(C, B\_m\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{F}{B\_m}} \cdot \left(0 - \sqrt{2}\right)\\
\end{array}
\end{array}
if B < 3.6000000000000001e43Initial program 17.9%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified24.8%
pow1/2N/A
unpow-prod-downN/A
associate-/l*N/A
*-lowering-*.f64N/A
Applied egg-rr33.6%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr33.6%
if 3.6000000000000001e43 < B < 1.05000000000000008e153Initial program 30.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified38.9%
pow1/2N/A
unpow-prod-downN/A
associate-/l*N/A
*-lowering-*.f64N/A
Applied egg-rr50.4%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr50.4%
Taylor expanded in B around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6466.3%
Simplified66.3%
if 1.05000000000000008e153 < B < 1.2e224Initial program 8.9%
Taylor expanded in A 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.7%
Simplified55.7%
if 1.2e224 < 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.f6467.0%
Simplified67.0%
Final simplification40.3%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (hypot B_m (- A C))))
(if (<= B_m 6.5e-192)
(*
(sqrt (* -8.0 (* A (* C F))))
(* 0.25 (* (/ (sqrt 2.0) A) (sqrt (/ 1.0 C)))))
(if (<= B_m 1.95e-92)
(/
(sqrt
(* (+ C (+ A t_0)) (* (+ (* B_m B_m) (* -4.0 (* A C))) (* 2.0 F))))
(- (* 4.0 (* A C)) (* B_m B_m)))
(if (<= B_m 7e+152)
(/
(* (sqrt (* 2.0 (+ A (+ C t_0)))) (* B_m (sqrt F)))
(- (* (* 4.0 A) C) (* B_m B_m)))
(if (<= B_m 7.5e+222)
(* (- 0.0 (/ (sqrt 2.0) B_m)) (sqrt (* F (+ C (hypot C 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 t_0 = hypot(B_m, (A - C));
double tmp;
if (B_m <= 6.5e-192) {
tmp = sqrt((-8.0 * (A * (C * F)))) * (0.25 * ((sqrt(2.0) / A) * sqrt((1.0 / C))));
} else if (B_m <= 1.95e-92) {
tmp = sqrt(((C + (A + t_0)) * (((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F)))) / ((4.0 * (A * C)) - (B_m * B_m));
} else if (B_m <= 7e+152) {
tmp = (sqrt((2.0 * (A + (C + t_0)))) * (B_m * sqrt(F))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 7.5e+222) {
tmp = (0.0 - (sqrt(2.0) / B_m)) * sqrt((F * (C + hypot(C, B_m))));
} 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 t_0 = Math.hypot(B_m, (A - C));
double tmp;
if (B_m <= 6.5e-192) {
tmp = Math.sqrt((-8.0 * (A * (C * F)))) * (0.25 * ((Math.sqrt(2.0) / A) * Math.sqrt((1.0 / C))));
} else if (B_m <= 1.95e-92) {
tmp = Math.sqrt(((C + (A + t_0)) * (((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F)))) / ((4.0 * (A * C)) - (B_m * B_m));
} else if (B_m <= 7e+152) {
tmp = (Math.sqrt((2.0 * (A + (C + t_0)))) * (B_m * Math.sqrt(F))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 7.5e+222) {
tmp = (0.0 - (Math.sqrt(2.0) / B_m)) * Math.sqrt((F * (C + Math.hypot(C, 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): t_0 = math.hypot(B_m, (A - C)) tmp = 0 if B_m <= 6.5e-192: tmp = math.sqrt((-8.0 * (A * (C * F)))) * (0.25 * ((math.sqrt(2.0) / A) * math.sqrt((1.0 / C)))) elif B_m <= 1.95e-92: tmp = math.sqrt(((C + (A + t_0)) * (((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F)))) / ((4.0 * (A * C)) - (B_m * B_m)) elif B_m <= 7e+152: tmp = (math.sqrt((2.0 * (A + (C + t_0)))) * (B_m * math.sqrt(F))) / (((4.0 * A) * C) - (B_m * B_m)) elif B_m <= 7.5e+222: tmp = (0.0 - (math.sqrt(2.0) / B_m)) * math.sqrt((F * (C + math.hypot(C, 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) t_0 = hypot(B_m, Float64(A - C)) tmp = 0.0 if (B_m <= 6.5e-192) tmp = Float64(sqrt(Float64(-8.0 * Float64(A * Float64(C * F)))) * Float64(0.25 * Float64(Float64(sqrt(2.0) / A) * sqrt(Float64(1.0 / C))))); elseif (B_m <= 1.95e-92) tmp = Float64(sqrt(Float64(Float64(C + Float64(A + t_0)) * Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(2.0 * F)))) / Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m))); elseif (B_m <= 7e+152) tmp = Float64(Float64(sqrt(Float64(2.0 * Float64(A + Float64(C + t_0)))) * Float64(B_m * sqrt(F))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); elseif (B_m <= 7.5e+222) tmp = Float64(Float64(0.0 - Float64(sqrt(2.0) / B_m)) * sqrt(Float64(F * Float64(C + hypot(C, 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) t_0 = hypot(B_m, (A - C)); tmp = 0.0; if (B_m <= 6.5e-192) tmp = sqrt((-8.0 * (A * (C * F)))) * (0.25 * ((sqrt(2.0) / A) * sqrt((1.0 / C)))); elseif (B_m <= 1.95e-92) tmp = sqrt(((C + (A + t_0)) * (((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F)))) / ((4.0 * (A * C)) - (B_m * B_m)); elseif (B_m <= 7e+152) tmp = (sqrt((2.0 * (A + (C + t_0)))) * (B_m * sqrt(F))) / (((4.0 * A) * C) - (B_m * B_m)); elseif (B_m <= 7.5e+222) tmp = (0.0 - (sqrt(2.0) / B_m)) * sqrt((F * (C + hypot(C, 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_] := Block[{t$95$0 = N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]}, If[LessEqual[B$95$m, 6.5e-192], N[(N[Sqrt[N[(-8.0 * N[(A * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(0.25 * N[(N[(N[Sqrt[2.0], $MachinePrecision] / A), $MachinePrecision] * N[Sqrt[N[(1.0 / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 1.95e-92], N[(N[Sqrt[N[(N[(C + N[(A + t$95$0), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 7e+152], N[(N[(N[Sqrt[N[(2.0 * N[(A + N[(C + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(B$95$m * N[Sqrt[F], $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, 7.5e+222], N[(N[(0.0 - N[(N[Sqrt[2.0], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(F * N[(C + N[Sqrt[C ^ 2 + B$95$m ^ 2], $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}
t_0 := \mathsf{hypot}\left(B\_m, A - C\right)\\
\mathbf{if}\;B\_m \leq 6.5 \cdot 10^{-192}:\\
\;\;\;\;\sqrt{-8 \cdot \left(A \cdot \left(C \cdot F\right)\right)} \cdot \left(0.25 \cdot \left(\frac{\sqrt{2}}{A} \cdot \sqrt{\frac{1}{C}}\right)\right)\\
\mathbf{elif}\;B\_m \leq 1.95 \cdot 10^{-92}:\\
\;\;\;\;\frac{\sqrt{\left(C + \left(A + t\_0\right)\right) \cdot \left(\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(2 \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m}\\
\mathbf{elif}\;B\_m \leq 7 \cdot 10^{+152}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(A + \left(C + t\_0\right)\right)} \cdot \left(B\_m \cdot \sqrt{F}\right)}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{elif}\;B\_m \leq 7.5 \cdot 10^{+222}:\\
\;\;\;\;\left(0 - \frac{\sqrt{2}}{B\_m}\right) \cdot \sqrt{F \cdot \left(C + \mathsf{hypot}\left(C, B\_m\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{F}{B\_m}} \cdot \left(0 - \sqrt{2}\right)\\
\end{array}
\end{array}
if B < 6.49999999999999966e-192Initial program 16.9%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified23.9%
pow1/2N/A
unpow-prod-downN/A
associate-/l*N/A
*-lowering-*.f64N/A
Applied egg-rr32.1%
Taylor expanded in A around -inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f6413.7%
Simplified13.7%
Taylor expanded in B around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6415.9%
Simplified15.9%
if 6.49999999999999966e-192 < B < 1.9499999999999998e-92Initial program 29.2%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified45.3%
pow1/2N/A
unpow-prod-downN/A
associate-/l*N/A
*-lowering-*.f64N/A
Applied egg-rr46.9%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr47.1%
pow1/2N/A
associate-*r*N/A
unpow-prod-downN/A
*-lowering-*.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f6424.7%
Applied egg-rr24.7%
associate-/r/N/A
sqrt-unprodN/A
associate-*r*N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr45.2%
if 1.9499999999999998e-92 < B < 6.99999999999999963e152Initial program 22.9%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.9%
pow2N/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
Applied egg-rr41.3%
Taylor expanded in B around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6445.2%
Simplified45.2%
if 6.99999999999999963e152 < B < 7.50000000000000003e222Initial program 8.9%
Taylor expanded in A 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.7%
Simplified55.7%
if 7.50000000000000003e222 < 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.f6467.0%
Simplified67.0%
Final simplification29.6%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 8.5e+140)
(/
(sqrt (* (+ (* B_m B_m) (* -4.0 (* A C))) (* 2.0 F)))
(/ (- (* A (* 4.0 C)) (* B_m B_m)) (sqrt (+ A (+ C (hypot B_m (- A C)))))))
(if (<= B_m 2.3e+222)
(* (- 0.0 (/ (sqrt 2.0) B_m)) (sqrt (* F (+ C (hypot C 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 <= 8.5e+140) {
tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) / (((A * (4.0 * C)) - (B_m * B_m)) / sqrt((A + (C + hypot(B_m, (A - C))))));
} else if (B_m <= 2.3e+222) {
tmp = (0.0 - (sqrt(2.0) / B_m)) * sqrt((F * (C + hypot(C, B_m))));
} 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 <= 8.5e+140) {
tmp = Math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) / (((A * (4.0 * C)) - (B_m * B_m)) / Math.sqrt((A + (C + Math.hypot(B_m, (A - C))))));
} else if (B_m <= 2.3e+222) {
tmp = (0.0 - (Math.sqrt(2.0) / B_m)) * Math.sqrt((F * (C + Math.hypot(C, 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 <= 8.5e+140: tmp = math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) / (((A * (4.0 * C)) - (B_m * B_m)) / math.sqrt((A + (C + math.hypot(B_m, (A - C)))))) elif B_m <= 2.3e+222: tmp = (0.0 - (math.sqrt(2.0) / B_m)) * math.sqrt((F * (C + math.hypot(C, 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 <= 8.5e+140) tmp = Float64(sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(2.0 * F))) / Float64(Float64(Float64(A * Float64(4.0 * C)) - Float64(B_m * B_m)) / sqrt(Float64(A + Float64(C + hypot(B_m, Float64(A - C))))))); elseif (B_m <= 2.3e+222) tmp = Float64(Float64(0.0 - Float64(sqrt(2.0) / B_m)) * sqrt(Float64(F * Float64(C + hypot(C, 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 <= 8.5e+140) tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) / (((A * (4.0 * C)) - (B_m * B_m)) / sqrt((A + (C + hypot(B_m, (A - C)))))); elseif (B_m <= 2.3e+222) tmp = (0.0 - (sqrt(2.0) / B_m)) * sqrt((F * (C + hypot(C, 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, 8.5e+140], N[(N[Sqrt[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(A * N[(4.0 * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(A + N[(C + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 2.3e+222], N[(N[(0.0 - N[(N[Sqrt[2.0], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(F * N[(C + N[Sqrt[C ^ 2 + B$95$m ^ 2], $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 8.5 \cdot 10^{+140}:\\
\;\;\;\;\frac{\sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(2 \cdot F\right)}}{\frac{A \cdot \left(4 \cdot C\right) - B\_m \cdot B\_m}{\sqrt{A + \left(C + \mathsf{hypot}\left(B\_m, A - C\right)\right)}}}\\
\mathbf{elif}\;B\_m \leq 2.3 \cdot 10^{+222}:\\
\;\;\;\;\left(0 - \frac{\sqrt{2}}{B\_m}\right) \cdot \sqrt{F \cdot \left(C + \mathsf{hypot}\left(C, B\_m\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{F}{B\_m}} \cdot \left(0 - \sqrt{2}\right)\\
\end{array}
\end{array}
if B < 8.4999999999999996e140Initial program 19.4%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.4%
pow1/2N/A
unpow-prod-downN/A
associate-/l*N/A
*-lowering-*.f64N/A
Applied egg-rr35.1%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr35.2%
if 8.4999999999999996e140 < B < 2.30000000000000011e222Initial program 8.4%
Taylor expanded in A 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.f6459.2%
Simplified59.2%
if 2.30000000000000011e222 < 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.f6467.0%
Simplified67.0%
Final simplification38.8%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (+ A (+ C (hypot B_m (- A C))))))
(if (<= B_m 1.55e-99)
(/
(sqrt (* (* -4.0 (* A C)) (* 2.0 F)))
(/ (- (* A (* 4.0 C)) (* B_m B_m)) (sqrt t_0)))
(if (<= B_m 1.05e+153)
(/
(* (sqrt (* 2.0 t_0)) (* B_m (sqrt F)))
(- (* (* 4.0 A) C) (* B_m B_m)))
(if (<= B_m 8.2e+222)
(* (- 0.0 (/ (sqrt 2.0) B_m)) (sqrt (* F (+ C (hypot C 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 t_0 = A + (C + hypot(B_m, (A - C)));
double tmp;
if (B_m <= 1.55e-99) {
tmp = sqrt(((-4.0 * (A * C)) * (2.0 * F))) / (((A * (4.0 * C)) - (B_m * B_m)) / sqrt(t_0));
} else if (B_m <= 1.05e+153) {
tmp = (sqrt((2.0 * t_0)) * (B_m * sqrt(F))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 8.2e+222) {
tmp = (0.0 - (sqrt(2.0) / B_m)) * sqrt((F * (C + hypot(C, B_m))));
} 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 t_0 = A + (C + Math.hypot(B_m, (A - C)));
double tmp;
if (B_m <= 1.55e-99) {
tmp = Math.sqrt(((-4.0 * (A * C)) * (2.0 * F))) / (((A * (4.0 * C)) - (B_m * B_m)) / Math.sqrt(t_0));
} else if (B_m <= 1.05e+153) {
tmp = (Math.sqrt((2.0 * t_0)) * (B_m * Math.sqrt(F))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 8.2e+222) {
tmp = (0.0 - (Math.sqrt(2.0) / B_m)) * Math.sqrt((F * (C + Math.hypot(C, 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): t_0 = A + (C + math.hypot(B_m, (A - C))) tmp = 0 if B_m <= 1.55e-99: tmp = math.sqrt(((-4.0 * (A * C)) * (2.0 * F))) / (((A * (4.0 * C)) - (B_m * B_m)) / math.sqrt(t_0)) elif B_m <= 1.05e+153: tmp = (math.sqrt((2.0 * t_0)) * (B_m * math.sqrt(F))) / (((4.0 * A) * C) - (B_m * B_m)) elif B_m <= 8.2e+222: tmp = (0.0 - (math.sqrt(2.0) / B_m)) * math.sqrt((F * (C + math.hypot(C, 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) t_0 = Float64(A + Float64(C + hypot(B_m, Float64(A - C)))) tmp = 0.0 if (B_m <= 1.55e-99) tmp = Float64(sqrt(Float64(Float64(-4.0 * Float64(A * C)) * Float64(2.0 * F))) / Float64(Float64(Float64(A * Float64(4.0 * C)) - Float64(B_m * B_m)) / sqrt(t_0))); elseif (B_m <= 1.05e+153) tmp = Float64(Float64(sqrt(Float64(2.0 * t_0)) * Float64(B_m * sqrt(F))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); elseif (B_m <= 8.2e+222) tmp = Float64(Float64(0.0 - Float64(sqrt(2.0) / B_m)) * sqrt(Float64(F * Float64(C + hypot(C, 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) t_0 = A + (C + hypot(B_m, (A - C))); tmp = 0.0; if (B_m <= 1.55e-99) tmp = sqrt(((-4.0 * (A * C)) * (2.0 * F))) / (((A * (4.0 * C)) - (B_m * B_m)) / sqrt(t_0)); elseif (B_m <= 1.05e+153) tmp = (sqrt((2.0 * t_0)) * (B_m * sqrt(F))) / (((4.0 * A) * C) - (B_m * B_m)); elseif (B_m <= 8.2e+222) tmp = (0.0 - (sqrt(2.0) / B_m)) * sqrt((F * (C + hypot(C, 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_] := Block[{t$95$0 = N[(A + N[(C + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 1.55e-99], N[(N[Sqrt[N[(N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(A * N[(4.0 * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] / N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 1.05e+153], N[(N[(N[Sqrt[N[(2.0 * t$95$0), $MachinePrecision]], $MachinePrecision] * N[(B$95$m * N[Sqrt[F], $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, 8.2e+222], N[(N[(0.0 - N[(N[Sqrt[2.0], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(F * N[(C + N[Sqrt[C ^ 2 + B$95$m ^ 2], $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}
t_0 := A + \left(C + \mathsf{hypot}\left(B\_m, A - C\right)\right)\\
\mathbf{if}\;B\_m \leq 1.55 \cdot 10^{-99}:\\
\;\;\;\;\frac{\sqrt{\left(-4 \cdot \left(A \cdot C\right)\right) \cdot \left(2 \cdot F\right)}}{\frac{A \cdot \left(4 \cdot C\right) - B\_m \cdot B\_m}{\sqrt{t\_0}}}\\
\mathbf{elif}\;B\_m \leq 1.05 \cdot 10^{+153}:\\
\;\;\;\;\frac{\sqrt{2 \cdot t\_0} \cdot \left(B\_m \cdot \sqrt{F}\right)}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{elif}\;B\_m \leq 8.2 \cdot 10^{+222}:\\
\;\;\;\;\left(0 - \frac{\sqrt{2}}{B\_m}\right) \cdot \sqrt{F \cdot \left(C + \mathsf{hypot}\left(C, B\_m\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{F}{B\_m}} \cdot \left(0 - \sqrt{2}\right)\\
\end{array}
\end{array}
if B < 1.5499999999999999e-99Initial program 18.3%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.3%
pow1/2N/A
unpow-prod-downN/A
associate-/l*N/A
*-lowering-*.f64N/A
Applied egg-rr33.8%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr33.9%
Taylor expanded in B around 0
*-lowering-*.f64N/A
*-lowering-*.f6421.8%
Simplified21.8%
if 1.5499999999999999e-99 < B < 1.05000000000000008e153Initial program 22.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.4%
pow2N/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
Applied egg-rr40.6%
Taylor expanded in B around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6444.4%
Simplified44.4%
if 1.05000000000000008e153 < B < 8.19999999999999974e222Initial program 8.9%
Taylor expanded in A 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.7%
Simplified55.7%
if 8.19999999999999974e222 < 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.f6467.0%
Simplified67.0%
Final simplification31.5%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (+ A (+ C (hypot B_m (- A C))))))
(if (<= B_m 1.05e-108)
(/
(sqrt (* -8.0 (* A (* C F))))
(/ (- (* A (* 4.0 C)) (* B_m B_m)) (sqrt t_0)))
(if (<= B_m 3.65e+152)
(/
(* (sqrt (* 2.0 t_0)) (* B_m (sqrt F)))
(- (* (* 4.0 A) C) (* B_m B_m)))
(if (<= B_m 3.6e+224)
(* (- 0.0 (/ (sqrt 2.0) B_m)) (sqrt (* F (+ C (hypot C 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 t_0 = A + (C + hypot(B_m, (A - C)));
double tmp;
if (B_m <= 1.05e-108) {
tmp = sqrt((-8.0 * (A * (C * F)))) / (((A * (4.0 * C)) - (B_m * B_m)) / sqrt(t_0));
} else if (B_m <= 3.65e+152) {
tmp = (sqrt((2.0 * t_0)) * (B_m * sqrt(F))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 3.6e+224) {
tmp = (0.0 - (sqrt(2.0) / B_m)) * sqrt((F * (C + hypot(C, B_m))));
} 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 t_0 = A + (C + Math.hypot(B_m, (A - C)));
double tmp;
if (B_m <= 1.05e-108) {
tmp = Math.sqrt((-8.0 * (A * (C * F)))) / (((A * (4.0 * C)) - (B_m * B_m)) / Math.sqrt(t_0));
} else if (B_m <= 3.65e+152) {
tmp = (Math.sqrt((2.0 * t_0)) * (B_m * Math.sqrt(F))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 3.6e+224) {
tmp = (0.0 - (Math.sqrt(2.0) / B_m)) * Math.sqrt((F * (C + Math.hypot(C, 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): t_0 = A + (C + math.hypot(B_m, (A - C))) tmp = 0 if B_m <= 1.05e-108: tmp = math.sqrt((-8.0 * (A * (C * F)))) / (((A * (4.0 * C)) - (B_m * B_m)) / math.sqrt(t_0)) elif B_m <= 3.65e+152: tmp = (math.sqrt((2.0 * t_0)) * (B_m * math.sqrt(F))) / (((4.0 * A) * C) - (B_m * B_m)) elif B_m <= 3.6e+224: tmp = (0.0 - (math.sqrt(2.0) / B_m)) * math.sqrt((F * (C + math.hypot(C, 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) t_0 = Float64(A + Float64(C + hypot(B_m, Float64(A - C)))) tmp = 0.0 if (B_m <= 1.05e-108) tmp = Float64(sqrt(Float64(-8.0 * Float64(A * Float64(C * F)))) / Float64(Float64(Float64(A * Float64(4.0 * C)) - Float64(B_m * B_m)) / sqrt(t_0))); elseif (B_m <= 3.65e+152) tmp = Float64(Float64(sqrt(Float64(2.0 * t_0)) * Float64(B_m * sqrt(F))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); elseif (B_m <= 3.6e+224) tmp = Float64(Float64(0.0 - Float64(sqrt(2.0) / B_m)) * sqrt(Float64(F * Float64(C + hypot(C, 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) t_0 = A + (C + hypot(B_m, (A - C))); tmp = 0.0; if (B_m <= 1.05e-108) tmp = sqrt((-8.0 * (A * (C * F)))) / (((A * (4.0 * C)) - (B_m * B_m)) / sqrt(t_0)); elseif (B_m <= 3.65e+152) tmp = (sqrt((2.0 * t_0)) * (B_m * sqrt(F))) / (((4.0 * A) * C) - (B_m * B_m)); elseif (B_m <= 3.6e+224) tmp = (0.0 - (sqrt(2.0) / B_m)) * sqrt((F * (C + hypot(C, 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_] := Block[{t$95$0 = N[(A + N[(C + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 1.05e-108], N[(N[Sqrt[N[(-8.0 * N[(A * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(A * N[(4.0 * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] / N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 3.65e+152], N[(N[(N[Sqrt[N[(2.0 * t$95$0), $MachinePrecision]], $MachinePrecision] * N[(B$95$m * N[Sqrt[F], $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, 3.6e+224], N[(N[(0.0 - N[(N[Sqrt[2.0], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(F * N[(C + N[Sqrt[C ^ 2 + B$95$m ^ 2], $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}
t_0 := A + \left(C + \mathsf{hypot}\left(B\_m, A - C\right)\right)\\
\mathbf{if}\;B\_m \leq 1.05 \cdot 10^{-108}:\\
\;\;\;\;\frac{\sqrt{-8 \cdot \left(A \cdot \left(C \cdot F\right)\right)}}{\frac{A \cdot \left(4 \cdot C\right) - B\_m \cdot B\_m}{\sqrt{t\_0}}}\\
\mathbf{elif}\;B\_m \leq 3.65 \cdot 10^{+152}:\\
\;\;\;\;\frac{\sqrt{2 \cdot t\_0} \cdot \left(B\_m \cdot \sqrt{F}\right)}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{elif}\;B\_m \leq 3.6 \cdot 10^{+224}:\\
\;\;\;\;\left(0 - \frac{\sqrt{2}}{B\_m}\right) \cdot \sqrt{F \cdot \left(C + \mathsf{hypot}\left(C, B\_m\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{F}{B\_m}} \cdot \left(0 - \sqrt{2}\right)\\
\end{array}
\end{array}
if B < 1.05e-108Initial program 17.9%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified25.4%
pow1/2N/A
unpow-prod-downN/A
associate-/l*N/A
*-lowering-*.f64N/A
Applied egg-rr33.1%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr33.1%
Taylor expanded in B around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6418.6%
Simplified18.6%
if 1.05e-108 < B < 3.6500000000000002e152Initial program 23.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified29.0%
pow2N/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
Applied egg-rr42.7%
Taylor expanded in B around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6442.9%
Simplified42.9%
if 3.6500000000000002e152 < B < 3.6e224Initial program 8.9%
Taylor expanded in A 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.7%
Simplified55.7%
if 3.6e224 < 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.f6467.0%
Simplified67.0%
Final simplification29.2%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= F 4.45e-305)
(/
(sqrt
(*
(+ C (+ A (hypot B_m (- A C))))
(* (+ (* B_m B_m) (* -4.0 (* A C))) (* 2.0 F))))
(- (* 4.0 (* A C)) (* B_m B_m)))
(if (<= F 2300000.0)
(* (- 0.0 (/ (sqrt 2.0) B_m)) (sqrt (* F (+ C (hypot C 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 (F <= 4.45e-305) {
tmp = sqrt(((C + (A + hypot(B_m, (A - C)))) * (((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F)))) / ((4.0 * (A * C)) - (B_m * B_m));
} else if (F <= 2300000.0) {
tmp = (0.0 - (sqrt(2.0) / B_m)) * sqrt((F * (C + hypot(C, B_m))));
} 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 (F <= 4.45e-305) {
tmp = Math.sqrt(((C + (A + Math.hypot(B_m, (A - C)))) * (((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F)))) / ((4.0 * (A * C)) - (B_m * B_m));
} else if (F <= 2300000.0) {
tmp = (0.0 - (Math.sqrt(2.0) / B_m)) * Math.sqrt((F * (C + Math.hypot(C, 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 F <= 4.45e-305: tmp = math.sqrt(((C + (A + math.hypot(B_m, (A - C)))) * (((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F)))) / ((4.0 * (A * C)) - (B_m * B_m)) elif F <= 2300000.0: tmp = (0.0 - (math.sqrt(2.0) / B_m)) * math.sqrt((F * (C + math.hypot(C, 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 (F <= 4.45e-305) tmp = Float64(sqrt(Float64(Float64(C + Float64(A + hypot(B_m, Float64(A - C)))) * Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(2.0 * F)))) / Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m))); elseif (F <= 2300000.0) tmp = Float64(Float64(0.0 - Float64(sqrt(2.0) / B_m)) * sqrt(Float64(F * Float64(C + hypot(C, 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 (F <= 4.45e-305) tmp = sqrt(((C + (A + hypot(B_m, (A - C)))) * (((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F)))) / ((4.0 * (A * C)) - (B_m * B_m)); elseif (F <= 2300000.0) tmp = (0.0 - (sqrt(2.0) / B_m)) * sqrt((F * (C + hypot(C, 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[F, 4.45e-305], N[(N[Sqrt[N[(N[(C + N[(A + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2300000.0], N[(N[(0.0 - N[(N[Sqrt[2.0], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(F * N[(C + N[Sqrt[C ^ 2 + B$95$m ^ 2], $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}\;F \leq 4.45 \cdot 10^{-305}:\\
\;\;\;\;\frac{\sqrt{\left(C + \left(A + \mathsf{hypot}\left(B\_m, A - C\right)\right)\right) \cdot \left(\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(2 \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m}\\
\mathbf{elif}\;F \leq 2300000:\\
\;\;\;\;\left(0 - \frac{\sqrt{2}}{B\_m}\right) \cdot \sqrt{F \cdot \left(C + \mathsf{hypot}\left(C, B\_m\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{F}{B\_m}} \cdot \left(0 - \sqrt{2}\right)\\
\end{array}
\end{array}
if F < 4.4499999999999998e-305Initial program 24.3%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified37.5%
pow1/2N/A
unpow-prod-downN/A
associate-/l*N/A
*-lowering-*.f64N/A
Applied egg-rr53.4%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr53.4%
pow1/2N/A
associate-*r*N/A
unpow-prod-downN/A
*-lowering-*.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f643.3%
Applied egg-rr3.3%
associate-/r/N/A
sqrt-unprodN/A
associate-*r*N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr37.5%
if 4.4499999999999998e-305 < F < 2.3e6Initial program 18.7%
Taylor expanded in A 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.f6420.8%
Simplified20.8%
if 2.3e6 < F Initial program 13.5%
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.f6421.0%
Simplified21.0%
Final simplification23.2%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= F 4.4e-305)
(/
(sqrt
(*
(+ C (+ A (hypot B_m (- A C))))
(* (+ (* B_m B_m) (* -4.0 (* A C))) (* 2.0 F))))
(- (* 4.0 (* A C)) (* B_m B_m)))
(if (<= F 9.8e-11)
(* (- 0.0 (/ (sqrt 2.0) B_m)) (sqrt (* F (+ A (hypot B_m A)))))
(* (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 (F <= 4.4e-305) {
tmp = sqrt(((C + (A + hypot(B_m, (A - C)))) * (((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F)))) / ((4.0 * (A * C)) - (B_m * B_m));
} else if (F <= 9.8e-11) {
tmp = (0.0 - (sqrt(2.0) / B_m)) * sqrt((F * (A + hypot(B_m, A))));
} 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 (F <= 4.4e-305) {
tmp = Math.sqrt(((C + (A + Math.hypot(B_m, (A - C)))) * (((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F)))) / ((4.0 * (A * C)) - (B_m * B_m));
} else if (F <= 9.8e-11) {
tmp = (0.0 - (Math.sqrt(2.0) / B_m)) * Math.sqrt((F * (A + Math.hypot(B_m, A))));
} 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 F <= 4.4e-305: tmp = math.sqrt(((C + (A + math.hypot(B_m, (A - C)))) * (((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F)))) / ((4.0 * (A * C)) - (B_m * B_m)) elif F <= 9.8e-11: tmp = (0.0 - (math.sqrt(2.0) / B_m)) * math.sqrt((F * (A + math.hypot(B_m, A)))) 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 (F <= 4.4e-305) tmp = Float64(sqrt(Float64(Float64(C + Float64(A + hypot(B_m, Float64(A - C)))) * Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(2.0 * F)))) / Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m))); elseif (F <= 9.8e-11) tmp = Float64(Float64(0.0 - Float64(sqrt(2.0) / B_m)) * sqrt(Float64(F * Float64(A + hypot(B_m, A))))); 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 (F <= 4.4e-305) tmp = sqrt(((C + (A + hypot(B_m, (A - C)))) * (((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F)))) / ((4.0 * (A * C)) - (B_m * B_m)); elseif (F <= 9.8e-11) tmp = (0.0 - (sqrt(2.0) / B_m)) * sqrt((F * (A + hypot(B_m, A)))); 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[F, 4.4e-305], N[(N[Sqrt[N[(N[(C + N[(A + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9.8e-11], N[(N[(0.0 - N[(N[Sqrt[2.0], $MachinePrecision] / B$95$m), $MachinePrecision]), $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] * N[(0.0 - N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;F \leq 4.4 \cdot 10^{-305}:\\
\;\;\;\;\frac{\sqrt{\left(C + \left(A + \mathsf{hypot}\left(B\_m, A - C\right)\right)\right) \cdot \left(\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(2 \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m}\\
\mathbf{elif}\;F \leq 9.8 \cdot 10^{-11}:\\
\;\;\;\;\left(0 - \frac{\sqrt{2}}{B\_m}\right) \cdot \sqrt{F \cdot \left(A + \mathsf{hypot}\left(B\_m, A\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{F}{B\_m}} \cdot \left(0 - \sqrt{2}\right)\\
\end{array}
\end{array}
if F < 4.39999999999999993e-305Initial program 24.3%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified37.5%
pow1/2N/A
unpow-prod-downN/A
associate-/l*N/A
*-lowering-*.f64N/A
Applied egg-rr53.4%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr53.4%
pow1/2N/A
associate-*r*N/A
unpow-prod-downN/A
*-lowering-*.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f643.3%
Applied egg-rr3.3%
associate-/r/N/A
sqrt-unprodN/A
associate-*r*N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr37.5%
if 4.39999999999999993e-305 < F < 9.7999999999999998e-11Initial program 18.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.f6423.5%
Simplified23.5%
if 9.7999999999999998e-11 < F Initial program 14.4%
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.f6419.7%
Simplified19.7%
Final simplification23.8%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (+ (* B_m B_m) (* -4.0 (* A C)))))
(if (<= B_m 1.95e-178)
(/ (* (* (sqrt (* t_0 (* 2.0 F))) 0.25) (sqrt (/ 2.0 C))) A)
(if (<= B_m 1e+71)
(/
(sqrt (* (* 2.0 F) (* t_0 (+ A (+ C (hypot B_m (- A C)))))))
(- (* (* 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 t_0 = (B_m * B_m) + (-4.0 * (A * C));
double tmp;
if (B_m <= 1.95e-178) {
tmp = ((sqrt((t_0 * (2.0 * F))) * 0.25) * sqrt((2.0 / C))) / A;
} else if (B_m <= 1e+71) {
tmp = sqrt(((2.0 * F) * (t_0 * (A + (C + hypot(B_m, (A - C))))))) / (((4.0 * A) * C) - (B_m * B_m));
} 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 t_0 = (B_m * B_m) + (-4.0 * (A * C));
double tmp;
if (B_m <= 1.95e-178) {
tmp = ((Math.sqrt((t_0 * (2.0 * F))) * 0.25) * Math.sqrt((2.0 / C))) / A;
} else if (B_m <= 1e+71) {
tmp = Math.sqrt(((2.0 * F) * (t_0 * (A + (C + Math.hypot(B_m, (A - C))))))) / (((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): t_0 = (B_m * B_m) + (-4.0 * (A * C)) tmp = 0 if B_m <= 1.95e-178: tmp = ((math.sqrt((t_0 * (2.0 * F))) * 0.25) * math.sqrt((2.0 / C))) / A elif B_m <= 1e+71: tmp = math.sqrt(((2.0 * F) * (t_0 * (A + (C + math.hypot(B_m, (A - C))))))) / (((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) t_0 = Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) tmp = 0.0 if (B_m <= 1.95e-178) tmp = Float64(Float64(Float64(sqrt(Float64(t_0 * Float64(2.0 * F))) * 0.25) * sqrt(Float64(2.0 / C))) / A); elseif (B_m <= 1e+71) tmp = Float64(sqrt(Float64(Float64(2.0 * F) * Float64(t_0 * Float64(A + Float64(C + hypot(B_m, Float64(A - C))))))) / 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) t_0 = (B_m * B_m) + (-4.0 * (A * C)); tmp = 0.0; if (B_m <= 1.95e-178) tmp = ((sqrt((t_0 * (2.0 * F))) * 0.25) * sqrt((2.0 / C))) / A; elseif (B_m <= 1e+71) tmp = sqrt(((2.0 * F) * (t_0 * (A + (C + hypot(B_m, (A - C))))))) / (((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_] := Block[{t$95$0 = N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 1.95e-178], N[(N[(N[(N[Sqrt[N[(t$95$0 * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 0.25), $MachinePrecision] * N[Sqrt[N[(2.0 / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision], If[LessEqual[B$95$m, 1e+71], N[(N[Sqrt[N[(N[(2.0 * F), $MachinePrecision] * N[(t$95$0 * N[(A + N[(C + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[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}
t_0 := B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\\
\mathbf{if}\;B\_m \leq 1.95 \cdot 10^{-178}:\\
\;\;\;\;\frac{\left(\sqrt{t\_0 \cdot \left(2 \cdot F\right)} \cdot 0.25\right) \cdot \sqrt{\frac{2}{C}}}{A}\\
\mathbf{elif}\;B\_m \leq 10^{+71}:\\
\;\;\;\;\frac{\sqrt{\left(2 \cdot F\right) \cdot \left(t\_0 \cdot \left(A + \left(C + \mathsf{hypot}\left(B\_m, A - C\right)\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.95000000000000013e-178Initial program 16.8%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified23.8%
pow1/2N/A
unpow-prod-downN/A
associate-/l*N/A
*-lowering-*.f64N/A
Applied egg-rr31.9%
Taylor expanded in A around -inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f6413.6%
Simplified13.6%
associate-*r*N/A
associate-*l/N/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr13.7%
if 1.95000000000000013e-178 < B < 1e71Initial program 26.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified34.2%
*-commutativeN/A
pow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr33.3%
if 1e71 < B Initial program 9.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.f6452.0%
Simplified52.0%
Final simplification24.8%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (hypot B_m (- A C))) (t_1 (- (* B_m B_m) (* (* 4.0 A) C))))
(if (<= B_m 1.45e-76)
(/ -1.0 (/ t_1 (sqrt (* (* -4.0 (* A C)) (* (+ A (+ C t_0)) (* 2.0 F))))))
(if (<= B_m 5.2e+70)
(/ (sqrt (* (* (* 2.0 F) t_1) (+ (+ A C) t_0))) (- 0.0 (* 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 t_0 = hypot(B_m, (A - C));
double t_1 = (B_m * B_m) - ((4.0 * A) * C);
double tmp;
if (B_m <= 1.45e-76) {
tmp = -1.0 / (t_1 / sqrt(((-4.0 * (A * C)) * ((A + (C + t_0)) * (2.0 * F)))));
} else if (B_m <= 5.2e+70) {
tmp = sqrt((((2.0 * F) * t_1) * ((A + C) + t_0))) / (0.0 - (B_m * B_m));
} 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 t_0 = Math.hypot(B_m, (A - C));
double t_1 = (B_m * B_m) - ((4.0 * A) * C);
double tmp;
if (B_m <= 1.45e-76) {
tmp = -1.0 / (t_1 / Math.sqrt(((-4.0 * (A * C)) * ((A + (C + t_0)) * (2.0 * F)))));
} else if (B_m <= 5.2e+70) {
tmp = Math.sqrt((((2.0 * F) * t_1) * ((A + C) + t_0))) / (0.0 - (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): t_0 = math.hypot(B_m, (A - C)) t_1 = (B_m * B_m) - ((4.0 * A) * C) tmp = 0 if B_m <= 1.45e-76: tmp = -1.0 / (t_1 / math.sqrt(((-4.0 * (A * C)) * ((A + (C + t_0)) * (2.0 * F))))) elif B_m <= 5.2e+70: tmp = math.sqrt((((2.0 * F) * t_1) * ((A + C) + t_0))) / (0.0 - (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) t_0 = hypot(B_m, Float64(A - C)) t_1 = Float64(Float64(B_m * B_m) - Float64(Float64(4.0 * A) * C)) tmp = 0.0 if (B_m <= 1.45e-76) tmp = Float64(-1.0 / Float64(t_1 / sqrt(Float64(Float64(-4.0 * Float64(A * C)) * Float64(Float64(A + Float64(C + t_0)) * Float64(2.0 * F)))))); elseif (B_m <= 5.2e+70) tmp = Float64(sqrt(Float64(Float64(Float64(2.0 * F) * t_1) * Float64(Float64(A + C) + t_0))) / Float64(0.0 - 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) t_0 = hypot(B_m, (A - C)); t_1 = (B_m * B_m) - ((4.0 * A) * C); tmp = 0.0; if (B_m <= 1.45e-76) tmp = -1.0 / (t_1 / sqrt(((-4.0 * (A * C)) * ((A + (C + t_0)) * (2.0 * F))))); elseif (B_m <= 5.2e+70) tmp = sqrt((((2.0 * F) * t_1) * ((A + C) + t_0))) / (0.0 - (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_] := Block[{t$95$0 = N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]}, Block[{t$95$1 = N[(N[(B$95$m * B$95$m), $MachinePrecision] - N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 1.45e-76], N[(-1.0 / N[(t$95$1 / N[Sqrt[N[(N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] * N[(N[(A + N[(C + t$95$0), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 5.2e+70], N[(N[Sqrt[N[(N[(N[(2.0 * F), $MachinePrecision] * t$95$1), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(0.0 - 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}
t_0 := \mathsf{hypot}\left(B\_m, A - C\right)\\
t_1 := B\_m \cdot B\_m - \left(4 \cdot A\right) \cdot C\\
\mathbf{if}\;B\_m \leq 1.45 \cdot 10^{-76}:\\
\;\;\;\;\frac{-1}{\frac{t\_1}{\sqrt{\left(-4 \cdot \left(A \cdot C\right)\right) \cdot \left(\left(A + \left(C + t\_0\right)\right) \cdot \left(2 \cdot F\right)\right)}}}\\
\mathbf{elif}\;B\_m \leq 5.2 \cdot 10^{+70}:\\
\;\;\;\;\frac{\sqrt{\left(\left(2 \cdot F\right) \cdot t\_1\right) \cdot \left(\left(A + C\right) + t\_0\right)}}{0 - 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.4500000000000001e-76Initial program 18.0%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified25.9%
Applied egg-rr26.0%
Taylor expanded in B around 0
*-lowering-*.f64N/A
*-lowering-*.f6416.4%
Simplified16.4%
if 1.4500000000000001e-76 < B < 5.2000000000000001e70Initial program 25.9%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified29.1%
Taylor expanded in A around 0
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6428.8%
Simplified28.8%
if 5.2000000000000001e70 < B Initial program 9.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.f6452.0%
Simplified52.0%
Final simplification24.7%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0
(sqrt
(*
(* (* 2.0 F) (- (* B_m B_m) (* (* 4.0 A) C)))
(+ (+ A C) (hypot B_m (- A C)))))))
(if (<= B_m 6.2e-76)
(/ t_0 (* 4.0 (* A C)))
(if (<= B_m 4.1e+71)
(/ t_0 (- 0.0 (* 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 t_0 = sqrt((((2.0 * F) * ((B_m * B_m) - ((4.0 * A) * C))) * ((A + C) + hypot(B_m, (A - C)))));
double tmp;
if (B_m <= 6.2e-76) {
tmp = t_0 / (4.0 * (A * C));
} else if (B_m <= 4.1e+71) {
tmp = t_0 / (0.0 - (B_m * B_m));
} 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 t_0 = Math.sqrt((((2.0 * F) * ((B_m * B_m) - ((4.0 * A) * C))) * ((A + C) + Math.hypot(B_m, (A - C)))));
double tmp;
if (B_m <= 6.2e-76) {
tmp = t_0 / (4.0 * (A * C));
} else if (B_m <= 4.1e+71) {
tmp = t_0 / (0.0 - (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): t_0 = math.sqrt((((2.0 * F) * ((B_m * B_m) - ((4.0 * A) * C))) * ((A + C) + math.hypot(B_m, (A - C))))) tmp = 0 if B_m <= 6.2e-76: tmp = t_0 / (4.0 * (A * C)) elif B_m <= 4.1e+71: tmp = t_0 / (0.0 - (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) t_0 = sqrt(Float64(Float64(Float64(2.0 * F) * Float64(Float64(B_m * B_m) - Float64(Float64(4.0 * A) * C))) * Float64(Float64(A + C) + hypot(B_m, Float64(A - C))))) tmp = 0.0 if (B_m <= 6.2e-76) tmp = Float64(t_0 / Float64(4.0 * Float64(A * C))); elseif (B_m <= 4.1e+71) tmp = Float64(t_0 / Float64(0.0 - 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) t_0 = sqrt((((2.0 * F) * ((B_m * B_m) - ((4.0 * A) * C))) * ((A + C) + hypot(B_m, (A - C))))); tmp = 0.0; if (B_m <= 6.2e-76) tmp = t_0 / (4.0 * (A * C)); elseif (B_m <= 4.1e+71) tmp = t_0 / (0.0 - (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_] := Block[{t$95$0 = N[Sqrt[N[(N[(N[(2.0 * F), $MachinePrecision] * N[(N[(B$95$m * B$95$m), $MachinePrecision] - N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[B$95$m, 6.2e-76], N[(t$95$0 / N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 4.1e+71], N[(t$95$0 / N[(0.0 - 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}
t_0 := \sqrt{\left(\left(2 \cdot F\right) \cdot \left(B\_m \cdot B\_m - \left(4 \cdot A\right) \cdot C\right)\right) \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(B\_m, A - C\right)\right)}\\
\mathbf{if}\;B\_m \leq 6.2 \cdot 10^{-76}:\\
\;\;\;\;\frac{t\_0}{4 \cdot \left(A \cdot C\right)}\\
\mathbf{elif}\;B\_m \leq 4.1 \cdot 10^{+71}:\\
\;\;\;\;\frac{t\_0}{0 - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{F}{B\_m}} \cdot \left(0 - \sqrt{2}\right)\\
\end{array}
\end{array}
if B < 6.19999999999999939e-76Initial program 18.0%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified25.9%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-lowering-*.f6415.5%
Simplified15.5%
if 6.19999999999999939e-76 < B < 4.1000000000000002e71Initial program 25.9%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified29.1%
Taylor expanded in A around 0
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6428.8%
Simplified28.8%
if 4.1000000000000002e71 < B Initial program 9.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.f6452.0%
Simplified52.0%
Final simplification24.1%
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 (* (* 4.0 A) C)))
(if (<= B_m 1.95e-76)
(/ (sqrt (* (* -4.0 (* A C)) (* (* 2.0 F) t_0))) (- t_1 (* B_m B_m)))
(if (<= B_m 2.9e+70)
(/ (sqrt (* (* (* 2.0 F) (- (* B_m B_m) t_1)) t_0)) (- 0.0 (* 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 t_0 = (A + C) + hypot(B_m, (A - C));
double t_1 = (4.0 * A) * C;
double tmp;
if (B_m <= 1.95e-76) {
tmp = sqrt(((-4.0 * (A * C)) * ((2.0 * F) * t_0))) / (t_1 - (B_m * B_m));
} else if (B_m <= 2.9e+70) {
tmp = sqrt((((2.0 * F) * ((B_m * B_m) - t_1)) * t_0)) / (0.0 - (B_m * B_m));
} 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 t_0 = (A + C) + Math.hypot(B_m, (A - C));
double t_1 = (4.0 * A) * C;
double tmp;
if (B_m <= 1.95e-76) {
tmp = Math.sqrt(((-4.0 * (A * C)) * ((2.0 * F) * t_0))) / (t_1 - (B_m * B_m));
} else if (B_m <= 2.9e+70) {
tmp = Math.sqrt((((2.0 * F) * ((B_m * B_m) - t_1)) * t_0)) / (0.0 - (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): t_0 = (A + C) + math.hypot(B_m, (A - C)) t_1 = (4.0 * A) * C tmp = 0 if B_m <= 1.95e-76: tmp = math.sqrt(((-4.0 * (A * C)) * ((2.0 * F) * t_0))) / (t_1 - (B_m * B_m)) elif B_m <= 2.9e+70: tmp = math.sqrt((((2.0 * F) * ((B_m * B_m) - t_1)) * t_0)) / (0.0 - (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) t_0 = Float64(Float64(A + C) + hypot(B_m, Float64(A - C))) t_1 = Float64(Float64(4.0 * A) * C) tmp = 0.0 if (B_m <= 1.95e-76) tmp = Float64(sqrt(Float64(Float64(-4.0 * Float64(A * C)) * Float64(Float64(2.0 * F) * t_0))) / Float64(t_1 - Float64(B_m * B_m))); elseif (B_m <= 2.9e+70) tmp = Float64(sqrt(Float64(Float64(Float64(2.0 * F) * Float64(Float64(B_m * B_m) - t_1)) * t_0)) / Float64(0.0 - 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) t_0 = (A + C) + hypot(B_m, (A - C)); t_1 = (4.0 * A) * C; tmp = 0.0; if (B_m <= 1.95e-76) tmp = sqrt(((-4.0 * (A * C)) * ((2.0 * F) * t_0))) / (t_1 - (B_m * B_m)); elseif (B_m <= 2.9e+70) tmp = sqrt((((2.0 * F) * ((B_m * B_m) - t_1)) * t_0)) / (0.0 - (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_] := 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[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]}, If[LessEqual[B$95$m, 1.95e-76], N[(N[Sqrt[N[(N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * F), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(t$95$1 - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 2.9e+70], N[(N[Sqrt[N[(N[(N[(2.0 * F), $MachinePrecision] * N[(N[(B$95$m * B$95$m), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]], $MachinePrecision] / N[(0.0 - 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}
t_0 := \left(A + C\right) + \mathsf{hypot}\left(B\_m, A - C\right)\\
t_1 := \left(4 \cdot A\right) \cdot C\\
\mathbf{if}\;B\_m \leq 1.95 \cdot 10^{-76}:\\
\;\;\;\;\frac{\sqrt{\left(-4 \cdot \left(A \cdot C\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot t\_0\right)}}{t\_1 - B\_m \cdot B\_m}\\
\mathbf{elif}\;B\_m \leq 2.9 \cdot 10^{+70}:\\
\;\;\;\;\frac{\sqrt{\left(\left(2 \cdot F\right) \cdot \left(B\_m \cdot B\_m - t\_1\right)\right) \cdot t\_0}}{0 - 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.95000000000000013e-76Initial program 18.0%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified25.9%
pow2N/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
Applied egg-rr33.2%
Taylor expanded in B around 0
*-lowering-*.f64N/A
*-lowering-*.f6421.4%
Simplified21.4%
sqrt-unprodN/A
associate-*l*N/A
associate-*l*N/A
*-commutativeN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
Applied egg-rr15.3%
if 1.95000000000000013e-76 < B < 2.8999999999999998e70Initial program 25.9%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified29.1%
Taylor expanded in A around 0
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6428.8%
Simplified28.8%
if 2.8999999999999998e70 < B Initial program 9.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.f6452.0%
Simplified52.0%
Final simplification23.9%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 1.95e+70)
(/
(sqrt
(*
(+ C (+ A (hypot B_m (- A C))))
(* (+ (* B_m B_m) (* -4.0 (* A C))) (* 2.0 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.95e+70) {
tmp = sqrt(((C + (A + hypot(B_m, (A - C)))) * (((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F)))) / ((4.0 * (A * C)) - (B_m * B_m));
} 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 <= 1.95e+70) {
tmp = Math.sqrt(((C + (A + Math.hypot(B_m, (A - C)))) * (((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * 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.95e+70: tmp = math.sqrt(((C + (A + math.hypot(B_m, (A - C)))) * (((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * 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.95e+70) tmp = Float64(sqrt(Float64(Float64(C + Float64(A + hypot(B_m, Float64(A - C)))) * Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(2.0 * F)))) / Float64(Float64(4.0 * Float64(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.95e+70) tmp = sqrt(((C + (A + hypot(B_m, (A - C)))) * (((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * 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.95e+70], N[(N[Sqrt[N[(N[(C + N[(A + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(4.0 * N[(A * C), $MachinePrecision]), $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.95 \cdot 10^{+70}:\\
\;\;\;\;\frac{\sqrt{\left(C + \left(A + \mathsf{hypot}\left(B\_m, A - C\right)\right)\right) \cdot \left(\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(2 \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - 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.94999999999999987e70Initial program 19.3%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.4%
pow1/2N/A
unpow-prod-downN/A
associate-/l*N/A
*-lowering-*.f64N/A
Applied egg-rr34.9%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr34.9%
pow1/2N/A
associate-*r*N/A
unpow-prod-downN/A
*-lowering-*.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f6432.3%
Applied egg-rr32.3%
associate-/r/N/A
sqrt-unprodN/A
associate-*r*N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr27.5%
if 1.94999999999999987e70 < B Initial program 9.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.f6452.0%
Simplified52.0%
Final simplification32.1%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 2.1e-76)
(/
(sqrt (* (* -4.0 (* A C)) (* (* 2.0 F) (+ (+ A C) (hypot B_m (- A C))))))
(- (* (* 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 <= 2.1e-76) {
tmp = sqrt(((-4.0 * (A * C)) * ((2.0 * F) * ((A + C) + hypot(B_m, (A - C)))))) / (((4.0 * A) * C) - (B_m * B_m));
} 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 <= 2.1e-76) {
tmp = Math.sqrt(((-4.0 * (A * C)) * ((2.0 * F) * ((A + C) + Math.hypot(B_m, (A - C)))))) / (((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 <= 2.1e-76: tmp = math.sqrt(((-4.0 * (A * C)) * ((2.0 * F) * ((A + C) + math.hypot(B_m, (A - C)))))) / (((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 <= 2.1e-76) tmp = Float64(sqrt(Float64(Float64(-4.0 * Float64(A * C)) * Float64(Float64(2.0 * F) * Float64(Float64(A + C) + hypot(B_m, Float64(A - C)))))) / 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 <= 2.1e-76) tmp = sqrt(((-4.0 * (A * C)) * ((2.0 * F) * ((A + C) + hypot(B_m, (A - C)))))) / (((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, 2.1e-76], N[(N[Sqrt[N[(N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * F), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / 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 2.1 \cdot 10^{-76}:\\
\;\;\;\;\frac{\sqrt{\left(-4 \cdot \left(A \cdot C\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(B\_m, A - C\right)\right)\right)}}{\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 < 2.09999999999999992e-76Initial program 18.0%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified25.9%
pow2N/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
Applied egg-rr33.2%
Taylor expanded in B around 0
*-lowering-*.f64N/A
*-lowering-*.f6421.4%
Simplified21.4%
sqrt-unprodN/A
associate-*l*N/A
associate-*l*N/A
*-commutativeN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
Applied egg-rr15.3%
if 2.09999999999999992e-76 < B Initial program 15.9%
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.f6439.9%
Simplified39.9%
Final simplification23.1%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 1.15e-108)
(/
(*
(* (sqrt (* (+ (* B_m B_m) (* -4.0 (* A C))) (* 2.0 F))) 0.25)
(sqrt (/ 2.0 C)))
A)
(* (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.15e-108) {
tmp = ((sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) * 0.25) * sqrt((2.0 / C))) / A;
} 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.15d-108) then
tmp = ((sqrt((((b_m * b_m) + ((-4.0d0) * (a * c))) * (2.0d0 * f))) * 0.25d0) * sqrt((2.0d0 / c))) / a
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.15e-108) {
tmp = ((Math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) * 0.25) * Math.sqrt((2.0 / C))) / A;
} 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.15e-108: tmp = ((math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) * 0.25) * math.sqrt((2.0 / C))) / A 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.15e-108) tmp = Float64(Float64(Float64(sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(2.0 * F))) * 0.25) * sqrt(Float64(2.0 / C))) / A); 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.15e-108) tmp = ((sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) * 0.25) * sqrt((2.0 / C))) / A; 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.15e-108], N[(N[(N[(N[Sqrt[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 0.25), $MachinePrecision] * N[Sqrt[N[(2.0 / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / A), $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.15 \cdot 10^{-108}:\\
\;\;\;\;\frac{\left(\sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(2 \cdot F\right)} \cdot 0.25\right) \cdot \sqrt{\frac{2}{C}}}{A}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{F}{B\_m}} \cdot \left(0 - \sqrt{2}\right)\\
\end{array}
\end{array}
if B < 1.14999999999999998e-108Initial program 17.9%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified25.4%
pow1/2N/A
unpow-prod-downN/A
associate-/l*N/A
*-lowering-*.f64N/A
Applied egg-rr33.1%
Taylor expanded in A around -inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f6414.3%
Simplified14.3%
associate-*r*N/A
associate-*l/N/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr14.4%
if 1.14999999999999998e-108 < B Initial program 16.2%
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.f6437.9%
Simplified37.9%
Final simplification22.3%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 1.8e-108)
(*
(sqrt (* (+ (* B_m B_m) (* -4.0 (* A C))) (* 2.0 F)))
(/ (* 0.25 (sqrt (/ 2.0 C))) A))
(* (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.8e-108) {
tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) * ((0.25 * sqrt((2.0 / C))) / A);
} 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.8d-108) then
tmp = sqrt((((b_m * b_m) + ((-4.0d0) * (a * c))) * (2.0d0 * f))) * ((0.25d0 * sqrt((2.0d0 / c))) / a)
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.8e-108) {
tmp = Math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) * ((0.25 * Math.sqrt((2.0 / C))) / A);
} 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.8e-108: tmp = math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) * ((0.25 * math.sqrt((2.0 / C))) / A) 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.8e-108) tmp = Float64(sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(2.0 * F))) * Float64(Float64(0.25 * sqrt(Float64(2.0 / C))) / A)); 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.8e-108) tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) * ((0.25 * sqrt((2.0 / C))) / A); 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.8e-108], N[(N[Sqrt[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(0.25 * N[Sqrt[N[(2.0 / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / A), $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.8 \cdot 10^{-108}:\\
\;\;\;\;\sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(2 \cdot F\right)} \cdot \frac{0.25 \cdot \sqrt{\frac{2}{C}}}{A}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{F}{B\_m}} \cdot \left(0 - \sqrt{2}\right)\\
\end{array}
\end{array}
if B < 1.8e-108Initial program 17.9%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified25.4%
pow1/2N/A
unpow-prod-downN/A
associate-/l*N/A
*-lowering-*.f64N/A
Applied egg-rr33.1%
Taylor expanded in A around -inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f6414.3%
Simplified14.3%
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l/N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
sqrt-undivN/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
Applied egg-rr14.4%
if 1.8e-108 < B Initial program 16.2%
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.f6437.9%
Simplified37.9%
Final simplification22.3%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= B_m 2.8e-100) (/ (sqrt (* (* A -16.0) (* F (* C C)))) (- (* (* 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 <= 2.8e-100) {
tmp = sqrt(((A * -16.0) * (F * (C * C)))) / (((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 <= 2.8d-100) then
tmp = sqrt(((a * (-16.0d0)) * (f * (c * c)))) / (((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 <= 2.8e-100) {
tmp = Math.sqrt(((A * -16.0) * (F * (C * C)))) / (((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 <= 2.8e-100: tmp = math.sqrt(((A * -16.0) * (F * (C * C)))) / (((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 <= 2.8e-100) tmp = Float64(sqrt(Float64(Float64(A * -16.0) * Float64(F * Float64(C * C)))) / 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 <= 2.8e-100) tmp = sqrt(((A * -16.0) * (F * (C * C)))) / (((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, 2.8e-100], N[(N[Sqrt[N[(N[(A * -16.0), $MachinePrecision] * N[(F * N[(C * C), $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 2.8 \cdot 10^{-100}:\\
\;\;\;\;\frac{\sqrt{\left(A \cdot -16\right) \cdot \left(F \cdot \left(C \cdot C\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 < 2.79999999999999995e-100Initial program 18.3%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.3%
Taylor expanded in A around -inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6413.2%
Simplified13.2%
if 2.79999999999999995e-100 < B Initial program 15.4%
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.f6438.7%
Simplified38.7%
Final simplification21.6%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (* F (* C C))))
(if (<= B_m 1.35e-99)
(/ (sqrt (* (* A -16.0) t_0)) (- (* (* 4.0 A) C) (* B_m B_m)))
(-
0.0
(sqrt (/ (+ (* 2.0 (+ F (/ (* C F) B_m))) (/ t_0 (* B_m B_m))) B_m))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = F * (C * C);
double tmp;
if (B_m <= 1.35e-99) {
tmp = sqrt(((A * -16.0) * t_0)) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = 0.0 - sqrt((((2.0 * (F + ((C * F) / B_m))) + (t_0 / (B_m * B_m))) / B_m));
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: t_0
real(8) :: tmp
t_0 = f * (c * c)
if (b_m <= 1.35d-99) then
tmp = sqrt(((a * (-16.0d0)) * t_0)) / (((4.0d0 * a) * c) - (b_m * b_m))
else
tmp = 0.0d0 - sqrt((((2.0d0 * (f + ((c * f) / b_m))) + (t_0 / (b_m * b_m))) / b_m))
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = F * (C * C);
double tmp;
if (B_m <= 1.35e-99) {
tmp = Math.sqrt(((A * -16.0) * t_0)) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = 0.0 - Math.sqrt((((2.0 * (F + ((C * F) / B_m))) + (t_0 / (B_m * B_m))) / B_m));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = F * (C * C) tmp = 0 if B_m <= 1.35e-99: tmp = math.sqrt(((A * -16.0) * t_0)) / (((4.0 * A) * C) - (B_m * B_m)) else: tmp = 0.0 - math.sqrt((((2.0 * (F + ((C * F) / B_m))) + (t_0 / (B_m * B_m))) / B_m)) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(F * Float64(C * C)) tmp = 0.0 if (B_m <= 1.35e-99) tmp = Float64(sqrt(Float64(Float64(A * -16.0) * t_0)) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); else tmp = Float64(0.0 - sqrt(Float64(Float64(Float64(2.0 * Float64(F + Float64(Float64(C * F) / B_m))) + Float64(t_0 / Float64(B_m * B_m))) / B_m))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = F * (C * C); tmp = 0.0; if (B_m <= 1.35e-99) tmp = sqrt(((A * -16.0) * t_0)) / (((4.0 * A) * C) - (B_m * B_m)); else tmp = 0.0 - sqrt((((2.0 * (F + ((C * F) / B_m))) + (t_0 / (B_m * B_m))) / B_m)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(F * N[(C * C), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 1.35e-99], N[(N[Sqrt[N[(N[(A * -16.0), $MachinePrecision] * t$95$0), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.0 - N[Sqrt[N[(N[(N[(2.0 * N[(F + N[(N[(C * F), $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 / N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := F \cdot \left(C \cdot C\right)\\
\mathbf{if}\;B\_m \leq 1.35 \cdot 10^{-99}:\\
\;\;\;\;\frac{\sqrt{\left(A \cdot -16\right) \cdot t\_0}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;0 - \sqrt{\frac{2 \cdot \left(F + \frac{C \cdot F}{B\_m}\right) + \frac{t\_0}{B\_m \cdot B\_m}}{B\_m}}\\
\end{array}
\end{array}
if B < 1.35e-99Initial program 18.3%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.3%
Taylor expanded in A around -inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6413.2%
Simplified13.2%
if 1.35e-99 < B Initial program 15.4%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified17.8%
Taylor expanded in B around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-+r+N/A
+-lowering-+.f64N/A
Simplified6.6%
Taylor expanded in A around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
Simplified33.3%
Final simplification19.8%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 2.35e-92)
(/ (sqrt (* (* A -16.0) (* F (* C C)))) (- (* (* 4.0 A) C) (* B_m B_m)))
(-
0.0
(sqrt
(/
(+ (* 2.0 (+ F (/ (* A F) B_m))) (/ (* F (* A A)) (* B_m B_m)))
B_m)))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 2.35e-92) {
tmp = sqrt(((A * -16.0) * (F * (C * C)))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = 0.0 - sqrt((((2.0 * (F + ((A * F) / B_m))) + ((F * (A * A)) / (B_m * B_m))) / B_m));
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if (b_m <= 2.35d-92) then
tmp = sqrt(((a * (-16.0d0)) * (f * (c * c)))) / (((4.0d0 * a) * c) - (b_m * b_m))
else
tmp = 0.0d0 - sqrt((((2.0d0 * (f + ((a * f) / b_m))) + ((f * (a * a)) / (b_m * b_m))) / b_m))
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 2.35e-92) {
tmp = Math.sqrt(((A * -16.0) * (F * (C * C)))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = 0.0 - Math.sqrt((((2.0 * (F + ((A * F) / B_m))) + ((F * (A * A)) / (B_m * B_m))) / B_m));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 2.35e-92: tmp = math.sqrt(((A * -16.0) * (F * (C * C)))) / (((4.0 * A) * C) - (B_m * B_m)) else: tmp = 0.0 - math.sqrt((((2.0 * (F + ((A * F) / B_m))) + ((F * (A * A)) / (B_m * B_m))) / B_m)) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 2.35e-92) tmp = Float64(sqrt(Float64(Float64(A * -16.0) * Float64(F * Float64(C * C)))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); else tmp = Float64(0.0 - sqrt(Float64(Float64(Float64(2.0 * Float64(F + Float64(Float64(A * F) / B_m))) + Float64(Float64(F * Float64(A * A)) / Float64(B_m * B_m))) / B_m))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 2.35e-92) tmp = sqrt(((A * -16.0) * (F * (C * C)))) / (((4.0 * A) * C) - (B_m * B_m)); else tmp = 0.0 - sqrt((((2.0 * (F + ((A * F) / B_m))) + ((F * (A * A)) / (B_m * B_m))) / B_m)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 2.35e-92], N[(N[Sqrt[N[(N[(A * -16.0), $MachinePrecision] * N[(F * N[(C * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.0 - N[Sqrt[N[(N[(N[(2.0 * N[(F + N[(N[(A * F), $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F * N[(A * A), $MachinePrecision]), $MachinePrecision] / N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 2.35 \cdot 10^{-92}:\\
\;\;\;\;\frac{\sqrt{\left(A \cdot -16\right) \cdot \left(F \cdot \left(C \cdot C\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;0 - \sqrt{\frac{2 \cdot \left(F + \frac{A \cdot F}{B\_m}\right) + \frac{F \cdot \left(A \cdot A\right)}{B\_m \cdot B\_m}}{B\_m}}\\
\end{array}
\end{array}
if B < 2.34999999999999996e-92Initial program 18.2%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.2%
Taylor expanded in A around -inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6413.1%
Simplified13.1%
if 2.34999999999999996e-92 < B Initial program 15.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified18.0%
Taylor expanded in B around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-+r+N/A
+-lowering-+.f64N/A
Simplified6.7%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
Simplified30.5%
Final simplification18.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 (<= B_m 4.5e-56)
(/ (sqrt (* (* A -16.0) (* F (* C C)))) 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 <= 4.5e-56) {
tmp = sqrt(((A * -16.0) * (F * (C * C)))) / 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 <= 4.5d-56) then
tmp = sqrt(((a * (-16.0d0)) * (f * (c * c)))) / 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 <= 4.5e-56) {
tmp = Math.sqrt(((A * -16.0) * (F * (C * C)))) / 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 <= 4.5e-56: tmp = math.sqrt(((A * -16.0) * (F * (C * C)))) / 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 <= 4.5e-56) tmp = Float64(sqrt(Float64(Float64(A * -16.0) * Float64(F * Float64(C * C)))) / 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 <= 4.5e-56) tmp = sqrt(((A * -16.0) * (F * (C * C)))) / 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, 4.5e-56], N[(N[Sqrt[N[(N[(A * -16.0), $MachinePrecision] * N[(F * N[(C * C), $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 4.5 \cdot 10^{-56}:\\
\;\;\;\;\frac{\sqrt{\left(A \cdot -16\right) \cdot \left(F \cdot \left(C \cdot C\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 < 4.5000000000000001e-56Initial program 18.0%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified25.7%
Taylor expanded in A around -inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6412.7%
Simplified12.7%
if 4.5000000000000001e-56 < B Initial program 15.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified18.4%
Taylor expanded in B around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f647.7%
Simplified7.7%
Final simplification11.2%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (- (* (* 4.0 A) C) (* B_m B_m))))
(if (<= A 2.65e-48)
(/ (sqrt (* 2.0 (* F (* B_m (* B_m B_m))))) t_0)
(/ (sqrt (* 4.0 (* A (* F (* 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 (A <= 2.65e-48) {
tmp = sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_0;
} else {
tmp = sqrt((4.0 * (A * (F * (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 (a <= 2.65d-48) then
tmp = sqrt((2.0d0 * (f * (b_m * (b_m * b_m))))) / t_0
else
tmp = sqrt((4.0d0 * (a * (f * (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 (A <= 2.65e-48) {
tmp = Math.sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_0;
} else {
tmp = Math.sqrt((4.0 * (A * (F * (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 A <= 2.65e-48: tmp = math.sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_0 else: tmp = math.sqrt((4.0 * (A * (F * (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 (A <= 2.65e-48) tmp = Float64(sqrt(Float64(2.0 * Float64(F * Float64(B_m * Float64(B_m * B_m))))) / t_0); else tmp = Float64(sqrt(Float64(4.0 * Float64(A * Float64(F * 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 (A <= 2.65e-48) tmp = sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_0; else tmp = sqrt((4.0 * (A * (F * (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[A, 2.65e-48], 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[(4.0 * N[(A * N[(F * 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}\;A \leq 2.65 \cdot 10^{-48}:\\
\;\;\;\;\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{4 \cdot \left(A \cdot \left(F \cdot \left(B\_m \cdot B\_m\right)\right)\right)}}{t\_0}\\
\end{array}
\end{array}
if A < 2.65e-48Initial program 18.2%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified21.2%
Taylor expanded in B around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f644.5%
Simplified4.5%
if 2.65e-48 < A Initial program 15.3%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified28.7%
Taylor expanded in B around 0
Simplified8.7%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f649.4%
Simplified9.4%
Taylor expanded in B around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f649.8%
Simplified9.8%
Final simplification6.1%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (/ (sqrt (* 2.0 (* F (* B_m (* B_m B_m))))) (- (* (* 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((2.0 * (F * (B_m * (B_m * B_m))))) / (((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((2.0d0 * (f * (b_m * (b_m * b_m))))) / (((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((2.0 * (F * (B_m * (B_m * B_m))))) / (((4.0 * A) * C) - (B_m * B_m));
}
B_m = math.fabs(B) def code(A, B_m, C, F): return math.sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / (((4.0 * A) * C) - (B_m * B_m))
B_m = abs(B) function code(A, B_m, C, F) return Float64(sqrt(Float64(2.0 * Float64(F * Float64(B_m * Float64(B_m * B_m))))) / 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((2.0 * (F * (B_m * (B_m * B_m))))) / (((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[(2.0 * N[(F * N[(B$95$m * N[(B$95$m * B$95$m), $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{2 \cdot \left(F \cdot \left(B\_m \cdot \left(B\_m \cdot B\_m\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}
\end{array}
Initial program 17.3%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified23.5%
Taylor expanded in B around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f643.7%
Simplified3.7%
Final simplification3.7%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (* -0.25 (* (/ 1.0 C) (pow (* (* B_m F) (* B_m F)) 0.25))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
return -0.25 * ((1.0 / C) * pow(((B_m * F) * (B_m * F)), 0.25));
}
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 = (-0.25d0) * ((1.0d0 / c) * (((b_m * f) * (b_m * f)) ** 0.25d0))
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
return -0.25 * ((1.0 / C) * Math.pow(((B_m * F) * (B_m * F)), 0.25));
}
B_m = math.fabs(B) def code(A, B_m, C, F): return -0.25 * ((1.0 / C) * math.pow(((B_m * F) * (B_m * F)), 0.25))
B_m = abs(B) function code(A, B_m, C, F) return Float64(-0.25 * Float64(Float64(1.0 / C) * (Float64(Float64(B_m * F) * Float64(B_m * F)) ^ 0.25))) end
B_m = abs(B); function tmp = code(A, B_m, C, F) tmp = -0.25 * ((1.0 / C) * (((B_m * F) * (B_m * F)) ^ 0.25)); end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := N[(-0.25 * N[(N[(1.0 / C), $MachinePrecision] * N[Power[N[(N[(B$95$m * F), $MachinePrecision] * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision], 0.25], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|
\\
-0.25 \cdot \left(\frac{1}{C} \cdot {\left(\left(B\_m \cdot F\right) \cdot \left(B\_m \cdot F\right)\right)}^{0.25}\right)
\end{array}
Initial program 17.3%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified23.5%
Taylor expanded in B around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-+r+N/A
+-lowering-+.f64N/A
Simplified2.5%
Taylor expanded in A around -inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f641.7%
Simplified1.7%
pow1/2N/A
metadata-evalN/A
pow-prod-upN/A
pow-prod-downN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f643.3%
Applied egg-rr3.3%
Final simplification3.3%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (/ (* -0.25 (pow (* B_m F) 0.5)) C))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
return (-0.25 * pow((B_m * F), 0.5)) / C;
}
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 = ((-0.25d0) * ((b_m * f) ** 0.5d0)) / c
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
return (-0.25 * Math.pow((B_m * F), 0.5)) / C;
}
B_m = math.fabs(B) def code(A, B_m, C, F): return (-0.25 * math.pow((B_m * F), 0.5)) / C
B_m = abs(B) function code(A, B_m, C, F) return Float64(Float64(-0.25 * (Float64(B_m * F) ^ 0.5)) / C) end
B_m = abs(B); function tmp = code(A, B_m, C, F) tmp = (-0.25 * ((B_m * F) ^ 0.5)) / C; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := N[(N[(-0.25 * N[Power[N[(B$95$m * F), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|
\\
\frac{-0.25 \cdot {\left(B\_m \cdot F\right)}^{0.5}}{C}
\end{array}
Initial program 17.3%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified23.5%
Taylor expanded in B around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-+r+N/A
+-lowering-+.f64N/A
Simplified2.5%
Taylor expanded in A around -inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f641.7%
Simplified1.7%
associate-*r*N/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
*-lowering-*.f641.9%
Applied egg-rr1.9%
herbie shell --seed 2024155
(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))))