
(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 28 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 (+ (* B_m B_m) (* -4.0 (* A C))))
(t_1 (hypot B_m (- A C)))
(t_2 (* (* 4.0 A) C))
(t_3 (- t_2 (* B_m B_m)))
(t_4
(/
(sqrt
(*
(* 2.0 (* (- (pow B_m 2.0) t_2) F))
(+ (+ A C) (sqrt (+ (pow B_m 2.0) (pow (- A C) 2.0))))))
(- t_2 (pow B_m 2.0))))
(t_5 (sqrt (+ (+ A C) t_1))))
(if (<= t_4 0.0)
(* (* (sqrt (* 2.0 t_0)) (sqrt F)) (/ (pow (+ A (+ C t_1)) 0.5) t_3))
(if (<= t_4 INFINITY)
(* (/ (sqrt (* t_0 (* 2.0 F))) t_3) t_5)
(* t_5 (/ (sqrt (* 2.0 F)) (- 0.0 B_m)))))))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 t_1 = hypot(B_m, (A - C));
double t_2 = (4.0 * A) * C;
double t_3 = t_2 - (B_m * B_m);
double t_4 = sqrt(((2.0 * ((pow(B_m, 2.0) - t_2) * F)) * ((A + C) + sqrt((pow(B_m, 2.0) + pow((A - C), 2.0)))))) / (t_2 - pow(B_m, 2.0));
double t_5 = sqrt(((A + C) + t_1));
double tmp;
if (t_4 <= 0.0) {
tmp = (sqrt((2.0 * t_0)) * sqrt(F)) * (pow((A + (C + t_1)), 0.5) / t_3);
} else if (t_4 <= ((double) INFINITY)) {
tmp = (sqrt((t_0 * (2.0 * F))) / t_3) * t_5;
} else {
tmp = t_5 * (sqrt((2.0 * F)) / (0.0 - B_m));
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = (B_m * B_m) + (-4.0 * (A * C));
double t_1 = Math.hypot(B_m, (A - C));
double t_2 = (4.0 * A) * C;
double t_3 = t_2 - (B_m * B_m);
double t_4 = Math.sqrt(((2.0 * ((Math.pow(B_m, 2.0) - t_2) * F)) * ((A + C) + Math.sqrt((Math.pow(B_m, 2.0) + Math.pow((A - C), 2.0)))))) / (t_2 - Math.pow(B_m, 2.0));
double t_5 = Math.sqrt(((A + C) + t_1));
double tmp;
if (t_4 <= 0.0) {
tmp = (Math.sqrt((2.0 * t_0)) * Math.sqrt(F)) * (Math.pow((A + (C + t_1)), 0.5) / t_3);
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = (Math.sqrt((t_0 * (2.0 * F))) / t_3) * t_5;
} else {
tmp = t_5 * (Math.sqrt((2.0 * F)) / (0.0 - B_m));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = (B_m * B_m) + (-4.0 * (A * C)) t_1 = math.hypot(B_m, (A - C)) t_2 = (4.0 * A) * C t_3 = t_2 - (B_m * B_m) t_4 = math.sqrt(((2.0 * ((math.pow(B_m, 2.0) - t_2) * F)) * ((A + C) + math.sqrt((math.pow(B_m, 2.0) + math.pow((A - C), 2.0)))))) / (t_2 - math.pow(B_m, 2.0)) t_5 = math.sqrt(((A + C) + t_1)) tmp = 0 if t_4 <= 0.0: tmp = (math.sqrt((2.0 * t_0)) * math.sqrt(F)) * (math.pow((A + (C + t_1)), 0.5) / t_3) elif t_4 <= math.inf: tmp = (math.sqrt((t_0 * (2.0 * F))) / t_3) * t_5 else: tmp = t_5 * (math.sqrt((2.0 * F)) / (0.0 - B_m)) 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))) t_1 = hypot(B_m, Float64(A - C)) t_2 = Float64(Float64(4.0 * A) * C) t_3 = Float64(t_2 - Float64(B_m * B_m)) t_4 = Float64(sqrt(Float64(Float64(2.0 * Float64(Float64((B_m ^ 2.0) - t_2) * F)) * Float64(Float64(A + C) + sqrt(Float64((B_m ^ 2.0) + (Float64(A - C) ^ 2.0)))))) / Float64(t_2 - (B_m ^ 2.0))) t_5 = sqrt(Float64(Float64(A + C) + t_1)) tmp = 0.0 if (t_4 <= 0.0) tmp = Float64(Float64(sqrt(Float64(2.0 * t_0)) * sqrt(F)) * Float64((Float64(A + Float64(C + t_1)) ^ 0.5) / t_3)); elseif (t_4 <= Inf) tmp = Float64(Float64(sqrt(Float64(t_0 * Float64(2.0 * F))) / t_3) * t_5); else tmp = Float64(t_5 * Float64(sqrt(Float64(2.0 * F)) / Float64(0.0 - B_m))); 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)); t_1 = hypot(B_m, (A - C)); t_2 = (4.0 * A) * C; t_3 = t_2 - (B_m * B_m); t_4 = sqrt(((2.0 * (((B_m ^ 2.0) - t_2) * F)) * ((A + C) + sqrt(((B_m ^ 2.0) + ((A - C) ^ 2.0)))))) / (t_2 - (B_m ^ 2.0)); t_5 = sqrt(((A + C) + t_1)); tmp = 0.0; if (t_4 <= 0.0) tmp = (sqrt((2.0 * t_0)) * sqrt(F)) * (((A + (C + t_1)) ^ 0.5) / t_3); elseif (t_4 <= Inf) tmp = (sqrt((t_0 * (2.0 * F))) / t_3) * t_5; else tmp = t_5 * (sqrt((2.0 * F)) / (0.0 - B_m)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]}, Block[{t$95$2 = N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[Sqrt[N[(N[(2.0 * N[(N[(N[Power[B$95$m, 2.0], $MachinePrecision] - t$95$2), $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] + N[Sqrt[N[(N[Power[B$95$m, 2.0], $MachinePrecision] + N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(t$95$2 - N[Power[B$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Sqrt[N[(N[(A + C), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$4, 0.0], N[(N[(N[Sqrt[N[(2.0 * t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[F], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(A + N[(C + t$95$1), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[(N[(N[Sqrt[N[(t$95$0 * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$3), $MachinePrecision] * t$95$5), $MachinePrecision], N[(t$95$5 * N[(N[Sqrt[N[(2.0 * F), $MachinePrecision]], $MachinePrecision] / N[(0.0 - B$95$m), $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)\\
t_1 := \mathsf{hypot}\left(B\_m, A - C\right)\\
t_2 := \left(4 \cdot A\right) \cdot C\\
t_3 := t\_2 - B\_m \cdot B\_m\\
t_4 := \frac{\sqrt{\left(2 \cdot \left(\left({B\_m}^{2} - t\_2\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{B\_m}^{2} + {\left(A - C\right)}^{2}}\right)}}{t\_2 - {B\_m}^{2}}\\
t_5 := \sqrt{\left(A + C\right) + t\_1}\\
\mathbf{if}\;t\_4 \leq 0:\\
\;\;\;\;\left(\sqrt{2 \cdot t\_0} \cdot \sqrt{F}\right) \cdot \frac{{\left(A + \left(C + t\_1\right)\right)}^{0.5}}{t\_3}\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\frac{\sqrt{t\_0 \cdot \left(2 \cdot F\right)}}{t\_3} \cdot t\_5\\
\mathbf{else}:\\
\;\;\;\;t\_5 \cdot \frac{\sqrt{2 \cdot F}}{0 - B\_m}\\
\end{array}
\end{array}
if (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 #s(literal 2 binary64) (*.f64 (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))))) (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C))) < -0.0Initial program 41.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified47.1%
pow1/2N/A
unpow-prod-downN/A
associate-/l*N/A
*-lowering-*.f64N/A
Applied egg-rr60.0%
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.f6468.7%
Applied egg-rr68.7%
if -0.0 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 #s(literal 2 binary64) (*.f64 (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))))) (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C))) < +inf.0Initial program 50.0%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified64.8%
pow1/2N/A
*-commutativeN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr83.6%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr83.8%
if +inf.0 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 #s(literal 2 binary64) (*.f64 (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))))) (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C))) Initial program 0.0%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified0.2%
pow1/2N/A
*-commutativeN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr0.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr0.0%
Taylor expanded in B around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6431.1%
Simplified31.1%
associate-*l/N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6431.2%
Applied egg-rr31.2%
Final simplification54.6%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (hypot B_m (- A C))))
(if (<= B_m 1.75e+25)
(/
(*
(pow (+ A (+ C t_0)) 0.5)
(sqrt (* (+ (* B_m B_m) (* -4.0 (* A C))) (* 2.0 F))))
(- (* (* 4.0 A) C) (* B_m B_m)))
(* (sqrt (+ (+ A C) t_0)) (/ (sqrt (* 2.0 F)) (- 0.0 B_m))))))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 <= 1.75e+25) {
tmp = (pow((A + (C + t_0)), 0.5) * sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F)))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = sqrt(((A + C) + t_0)) * (sqrt((2.0 * F)) / (0.0 - B_m));
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = Math.hypot(B_m, (A - C));
double tmp;
if (B_m <= 1.75e+25) {
tmp = (Math.pow((A + (C + t_0)), 0.5) * Math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F)))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = Math.sqrt(((A + C) + t_0)) * (Math.sqrt((2.0 * F)) / (0.0 - B_m));
}
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 <= 1.75e+25: tmp = (math.pow((A + (C + t_0)), 0.5) * math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F)))) / (((4.0 * A) * C) - (B_m * B_m)) else: tmp = math.sqrt(((A + C) + t_0)) * (math.sqrt((2.0 * F)) / (0.0 - B_m)) 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 <= 1.75e+25) tmp = Float64(Float64((Float64(A + Float64(C + t_0)) ^ 0.5) * sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(2.0 * F)))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); else tmp = Float64(sqrt(Float64(Float64(A + C) + t_0)) * Float64(sqrt(Float64(2.0 * F)) / Float64(0.0 - B_m))); 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 <= 1.75e+25) tmp = (((A + (C + t_0)) ^ 0.5) * sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F)))) / (((4.0 * A) * C) - (B_m * B_m)); else tmp = sqrt(((A + C) + t_0)) * (sqrt((2.0 * F)) / (0.0 - B_m)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]}, If[LessEqual[B$95$m, 1.75e+25], N[(N[(N[Power[N[(A + N[(C + t$95$0), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] * 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]), $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(N[(A + C), $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[N[(2.0 * F), $MachinePrecision]], $MachinePrecision] / N[(0.0 - B$95$m), $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 1.75 \cdot 10^{+25}:\\
\;\;\;\;\frac{{\left(A + \left(C + t\_0\right)\right)}^{0.5} \cdot \sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(2 \cdot F\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(A + C\right) + t\_0} \cdot \frac{\sqrt{2 \cdot F}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 1.75e25Initial program 30.4%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified35.4%
pow1/2N/A
*-commutativeN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr46.4%
if 1.75e25 < B Initial program 12.0%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified13.5%
pow1/2N/A
*-commutativeN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr13.3%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr13.4%
Taylor expanded in B around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6463.8%
Simplified63.8%
associate-*l/N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6464.0%
Applied egg-rr64.0%
Final simplification51.2%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (hypot B_m (- A C))))
(if (<= B_m 1.76e+22)
(*
(/ (pow (+ A (+ C t_0)) 0.5) (- (* (* 4.0 A) C) (* B_m B_m)))
(sqrt (* (+ (* B_m B_m) (* -4.0 (* A C))) (* 2.0 F))))
(* (sqrt (+ (+ A C) t_0)) (/ (sqrt (* 2.0 F)) (- 0.0 B_m))))))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 <= 1.76e+22) {
tmp = (pow((A + (C + t_0)), 0.5) / (((4.0 * A) * C) - (B_m * B_m))) * sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F)));
} else {
tmp = sqrt(((A + C) + t_0)) * (sqrt((2.0 * F)) / (0.0 - B_m));
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = Math.hypot(B_m, (A - C));
double tmp;
if (B_m <= 1.76e+22) {
tmp = (Math.pow((A + (C + t_0)), 0.5) / (((4.0 * A) * C) - (B_m * B_m))) * Math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F)));
} else {
tmp = Math.sqrt(((A + C) + t_0)) * (Math.sqrt((2.0 * F)) / (0.0 - B_m));
}
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 <= 1.76e+22: tmp = (math.pow((A + (C + t_0)), 0.5) / (((4.0 * A) * C) - (B_m * B_m))) * math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) else: tmp = math.sqrt(((A + C) + t_0)) * (math.sqrt((2.0 * F)) / (0.0 - B_m)) 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 <= 1.76e+22) tmp = Float64(Float64((Float64(A + Float64(C + t_0)) ^ 0.5) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))) * sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(2.0 * F)))); else tmp = Float64(sqrt(Float64(Float64(A + C) + t_0)) * Float64(sqrt(Float64(2.0 * F)) / Float64(0.0 - B_m))); 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 <= 1.76e+22) tmp = (((A + (C + t_0)) ^ 0.5) / (((4.0 * A) * C) - (B_m * B_m))) * sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))); else tmp = sqrt(((A + C) + t_0)) * (sqrt((2.0 * F)) / (0.0 - B_m)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]}, If[LessEqual[B$95$m, 1.76e+22], N[(N[(N[Power[N[(A + N[(C + t$95$0), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 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]), $MachinePrecision], N[(N[Sqrt[N[(N[(A + C), $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[N[(2.0 * F), $MachinePrecision]], $MachinePrecision] / N[(0.0 - B$95$m), $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 1.76 \cdot 10^{+22}:\\
\;\;\;\;\frac{{\left(A + \left(C + t\_0\right)\right)}^{0.5}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m} \cdot \sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(2 \cdot F\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(A + C\right) + t\_0} \cdot \frac{\sqrt{2 \cdot F}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 1.76e22Initial program 30.4%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified35.4%
pow1/2N/A
unpow-prod-downN/A
associate-/l*N/A
*-lowering-*.f64N/A
Applied egg-rr46.4%
if 1.76e22 < B Initial program 12.0%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified13.5%
pow1/2N/A
*-commutativeN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr13.3%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr13.4%
Taylor expanded in B around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6463.8%
Simplified63.8%
associate-*l/N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6464.0%
Applied egg-rr64.0%
Final simplification51.1%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (hypot B_m (- A C))))
(if (<= B_m 1.12e+28)
(/
(*
(sqrt (* F (+ (* B_m B_m) (* -4.0 (* A C)))))
(sqrt (* 2.0 (+ A (+ C t_0)))))
(- (* (* 4.0 A) C) (* B_m B_m)))
(* (sqrt (+ (+ A C) t_0)) (/ (sqrt (* 2.0 F)) (- 0.0 B_m))))))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 <= 1.12e+28) {
tmp = (sqrt((F * ((B_m * B_m) + (-4.0 * (A * C))))) * sqrt((2.0 * (A + (C + t_0))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = sqrt(((A + C) + t_0)) * (sqrt((2.0 * F)) / (0.0 - B_m));
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = Math.hypot(B_m, (A - C));
double tmp;
if (B_m <= 1.12e+28) {
tmp = (Math.sqrt((F * ((B_m * B_m) + (-4.0 * (A * C))))) * Math.sqrt((2.0 * (A + (C + t_0))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = Math.sqrt(((A + C) + t_0)) * (Math.sqrt((2.0 * F)) / (0.0 - B_m));
}
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 <= 1.12e+28: tmp = (math.sqrt((F * ((B_m * B_m) + (-4.0 * (A * C))))) * math.sqrt((2.0 * (A + (C + t_0))))) / (((4.0 * A) * C) - (B_m * B_m)) else: tmp = math.sqrt(((A + C) + t_0)) * (math.sqrt((2.0 * F)) / (0.0 - B_m)) 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 <= 1.12e+28) tmp = Float64(Float64(sqrt(Float64(F * Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))))) * sqrt(Float64(2.0 * Float64(A + Float64(C + t_0))))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); else tmp = Float64(sqrt(Float64(Float64(A + C) + t_0)) * Float64(sqrt(Float64(2.0 * F)) / Float64(0.0 - B_m))); 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 <= 1.12e+28) tmp = (sqrt((F * ((B_m * B_m) + (-4.0 * (A * C))))) * sqrt((2.0 * (A + (C + t_0))))) / (((4.0 * A) * C) - (B_m * B_m)); else tmp = sqrt(((A + C) + t_0)) * (sqrt((2.0 * F)) / (0.0 - B_m)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]}, If[LessEqual[B$95$m, 1.12e+28], N[(N[(N[Sqrt[N[(F * N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(A + N[(C + t$95$0), $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[(N[(A + C), $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[N[(2.0 * F), $MachinePrecision]], $MachinePrecision] / N[(0.0 - B$95$m), $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 1.12 \cdot 10^{+28}:\\
\;\;\;\;\frac{\sqrt{F \cdot \left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right)} \cdot \sqrt{2 \cdot \left(A + \left(C + t\_0\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(A + C\right) + t\_0} \cdot \frac{\sqrt{2 \cdot F}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 1.12e28Initial program 30.4%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified35.4%
pow2N/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
Applied egg-rr46.3%
if 1.12e28 < B Initial program 12.0%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified13.5%
pow1/2N/A
*-commutativeN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr13.3%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr13.4%
Taylor expanded in B around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6463.8%
Simplified63.8%
associate-*l/N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6464.0%
Applied egg-rr64.0%
Final simplification51.1%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (sqrt (+ (+ A C) (hypot B_m (- A C))))))
(if (<= B_m 6.2e+27)
(*
(/
(sqrt (* (+ (* B_m B_m) (* -4.0 (* A C))) (* 2.0 F)))
(- (* (* 4.0 A) C) (* B_m B_m)))
t_0)
(* t_0 (/ (sqrt (* 2.0 F)) (- 0.0 B_m))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = sqrt(((A + C) + hypot(B_m, (A - C))));
double tmp;
if (B_m <= 6.2e+27) {
tmp = (sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) / (((4.0 * A) * C) - (B_m * B_m))) * t_0;
} else {
tmp = t_0 * (sqrt((2.0 * F)) / (0.0 - B_m));
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = Math.sqrt(((A + C) + Math.hypot(B_m, (A - C))));
double tmp;
if (B_m <= 6.2e+27) {
tmp = (Math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) / (((4.0 * A) * C) - (B_m * B_m))) * t_0;
} else {
tmp = t_0 * (Math.sqrt((2.0 * F)) / (0.0 - B_m));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = math.sqrt(((A + C) + math.hypot(B_m, (A - C)))) tmp = 0 if B_m <= 6.2e+27: tmp = (math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) / (((4.0 * A) * C) - (B_m * B_m))) * t_0 else: tmp = t_0 * (math.sqrt((2.0 * F)) / (0.0 - B_m)) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = sqrt(Float64(Float64(A + C) + hypot(B_m, Float64(A - C)))) tmp = 0.0 if (B_m <= 6.2e+27) tmp = Float64(Float64(sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(2.0 * F))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))) * t_0); else tmp = Float64(t_0 * Float64(sqrt(Float64(2.0 * F)) / Float64(0.0 - B_m))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = sqrt(((A + C) + hypot(B_m, (A - C)))); tmp = 0.0; if (B_m <= 6.2e+27) tmp = (sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) / (((4.0 * A) * C) - (B_m * B_m))) * t_0; else tmp = t_0 * (sqrt((2.0 * F)) / (0.0 - B_m)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[Sqrt[N[(N[(A + C), $MachinePrecision] + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[B$95$m, 6.2e+27], 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] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], N[(t$95$0 * N[(N[Sqrt[N[(2.0 * F), $MachinePrecision]], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := \sqrt{\left(A + C\right) + \mathsf{hypot}\left(B\_m, A - C\right)}\\
\mathbf{if}\;B\_m \leq 6.2 \cdot 10^{+27}:\\
\;\;\;\;\frac{\sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(2 \cdot F\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m} \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \frac{\sqrt{2 \cdot F}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 6.19999999999999992e27Initial program 30.4%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified35.4%
pow1/2N/A
*-commutativeN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr46.4%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr45.3%
if 6.19999999999999992e27 < B Initial program 12.0%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified13.5%
pow1/2N/A
*-commutativeN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr13.3%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr13.4%
Taylor expanded in B around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6463.8%
Simplified63.8%
associate-*l/N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6464.0%
Applied egg-rr64.0%
Final simplification50.4%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 8.6e-63)
(/
(*
(sqrt (* (+ (* B_m B_m) (* -4.0 (* A C))) (* 2.0 F)))
(pow (* 2.0 A) 0.5))
(- (* (* 4.0 A) C) (* B_m B_m)))
(*
(sqrt (+ (+ A C) (hypot B_m (- A C))))
(/ (sqrt (* 2.0 F)) (- 0.0 B_m)))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 8.6e-63) {
tmp = (sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) * pow((2.0 * A), 0.5)) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = sqrt(((A + C) + hypot(B_m, (A - C)))) * (sqrt((2.0 * F)) / (0.0 - B_m));
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 8.6e-63) {
tmp = (Math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) * Math.pow((2.0 * A), 0.5)) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = Math.sqrt(((A + C) + Math.hypot(B_m, (A - C)))) * (Math.sqrt((2.0 * F)) / (0.0 - B_m));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 8.6e-63: tmp = (math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) * math.pow((2.0 * A), 0.5)) / (((4.0 * A) * C) - (B_m * B_m)) else: tmp = math.sqrt(((A + C) + math.hypot(B_m, (A - C)))) * (math.sqrt((2.0 * F)) / (0.0 - B_m)) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 8.6e-63) tmp = Float64(Float64(sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(2.0 * F))) * (Float64(2.0 * A) ^ 0.5)) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); else tmp = Float64(sqrt(Float64(Float64(A + C) + hypot(B_m, Float64(A - C)))) * Float64(sqrt(Float64(2.0 * F)) / Float64(0.0 - B_m))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 8.6e-63) tmp = (sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) * ((2.0 * A) ^ 0.5)) / (((4.0 * A) * C) - (B_m * B_m)); else tmp = sqrt(((A + C) + hypot(B_m, (A - C)))) * (sqrt((2.0 * F)) / (0.0 - B_m)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 8.6e-63], 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] * N[Power[N[(2.0 * A), $MachinePrecision], 0.5], $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[(N[(A + C), $MachinePrecision] + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[N[(2.0 * F), $MachinePrecision]], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 8.6 \cdot 10^{-63}:\\
\;\;\;\;\frac{\sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(2 \cdot F\right)} \cdot {\left(2 \cdot A\right)}^{0.5}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(A + C\right) + \mathsf{hypot}\left(B\_m, A - C\right)} \cdot \frac{\sqrt{2 \cdot F}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 8.5999999999999997e-63Initial program 26.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified32.2%
pow1/2N/A
*-commutativeN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr43.2%
Taylor expanded in A around inf
*-lowering-*.f6422.7%
Simplified22.7%
if 8.5999999999999997e-63 < B Initial program 22.8%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified24.0%
pow1/2N/A
*-commutativeN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr26.1%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr26.2%
Taylor expanded in B around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6463.7%
Simplified63.7%
associate-*l/N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6463.9%
Applied egg-rr63.9%
Final simplification36.4%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 1.5e+87)
(/
(sqrt
(*
(+ A (+ C (hypot B_m (- A C))))
(* (+ (* B_m B_m) (* -4.0 (* A C))) (* 2.0 F))))
(- (* (* 4.0 A) C) (* B_m B_m)))
(- 0.0 (* (* (sqrt F) (/ (sqrt 2.0) B_m)) (sqrt B_m)))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 1.5e+87) {
tmp = sqrt(((A + (C + 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 = 0.0 - ((sqrt(F) * (sqrt(2.0) / B_m)) * sqrt(B_m));
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 1.5e+87) {
tmp = Math.sqrt(((A + (C + 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 = 0.0 - ((Math.sqrt(F) * (Math.sqrt(2.0) / B_m)) * Math.sqrt(B_m));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 1.5e+87: tmp = math.sqrt(((A + (C + 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 = 0.0 - ((math.sqrt(F) * (math.sqrt(2.0) / B_m)) * math.sqrt(B_m)) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 1.5e+87) tmp = Float64(sqrt(Float64(Float64(A + Float64(C + 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(Float64(4.0 * A) * C) - Float64(B_m * B_m))); else tmp = Float64(0.0 - Float64(Float64(sqrt(F) * Float64(sqrt(2.0) / B_m)) * sqrt(B_m))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 1.5e+87) tmp = sqrt(((A + (C + 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 = 0.0 - ((sqrt(F) * (sqrt(2.0) / B_m)) * sqrt(B_m)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 1.5e+87], N[(N[Sqrt[N[(N[(A + N[(C + 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[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.0 - N[(N[(N[Sqrt[F], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision] * N[Sqrt[B$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 1.5 \cdot 10^{+87}:\\
\;\;\;\;\frac{\sqrt{\left(A + \left(C + \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)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;0 - \left(\sqrt{F} \cdot \frac{\sqrt{2}}{B\_m}\right) \cdot \sqrt{B\_m}\\
\end{array}
\end{array}
if B < 1.4999999999999999e87Initial program 31.8%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified36.5%
*-commutativeN/A
*-lowering-*.f64N/A
associate-+l+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f64N/A
pow2N/A
*-lowering-*.f64N/A
Applied egg-rr37.8%
if 1.4999999999999999e87 < B Initial program 2.1%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified3.8%
pow1/2N/A
*-commutativeN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr3.8%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr3.8%
Taylor expanded in B around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6461.7%
Simplified61.7%
Taylor expanded in B around inf
sqrt-lowering-sqrt.f6453.7%
Simplified53.7%
Final simplification41.2%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (* (* 4.0 A) C)) (t_1 (- t_0 (* B_m B_m))))
(if (<= B_m 6.2e-63)
(/
(*
(sqrt (* (+ (* B_m B_m) (* -4.0 (* A C))) (* 2.0 F)))
(pow (* 2.0 A) 0.5))
t_1)
(if (<= B_m 8.2e+122)
(/
(sqrt
(* (* (* 2.0 F) (- (* B_m B_m) t_0)) (+ (+ A C) (hypot B_m (- A C)))))
t_1)
(* (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 = (4.0 * A) * C;
double t_1 = t_0 - (B_m * B_m);
double tmp;
if (B_m <= 6.2e-63) {
tmp = (sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) * pow((2.0 * A), 0.5)) / t_1;
} else if (B_m <= 8.2e+122) {
tmp = sqrt((((2.0 * F) * ((B_m * B_m) - t_0)) * ((A + C) + hypot(B_m, (A - C))))) / t_1;
} 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 = (4.0 * A) * C;
double t_1 = t_0 - (B_m * B_m);
double tmp;
if (B_m <= 6.2e-63) {
tmp = (Math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) * Math.pow((2.0 * A), 0.5)) / t_1;
} else if (B_m <= 8.2e+122) {
tmp = Math.sqrt((((2.0 * F) * ((B_m * B_m) - t_0)) * ((A + C) + Math.hypot(B_m, (A - C))))) / t_1;
} 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 = (4.0 * A) * C t_1 = t_0 - (B_m * B_m) tmp = 0 if B_m <= 6.2e-63: tmp = (math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) * math.pow((2.0 * A), 0.5)) / t_1 elif B_m <= 8.2e+122: tmp = math.sqrt((((2.0 * F) * ((B_m * B_m) - t_0)) * ((A + C) + math.hypot(B_m, (A - C))))) / t_1 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(4.0 * A) * C) t_1 = Float64(t_0 - Float64(B_m * B_m)) tmp = 0.0 if (B_m <= 6.2e-63) tmp = Float64(Float64(sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(2.0 * F))) * (Float64(2.0 * A) ^ 0.5)) / t_1); elseif (B_m <= 8.2e+122) tmp = Float64(sqrt(Float64(Float64(Float64(2.0 * F) * Float64(Float64(B_m * B_m) - t_0)) * Float64(Float64(A + C) + hypot(B_m, Float64(A - C))))) / t_1); 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 = (4.0 * A) * C; t_1 = t_0 - (B_m * B_m); tmp = 0.0; if (B_m <= 6.2e-63) tmp = (sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) * ((2.0 * A) ^ 0.5)) / t_1; elseif (B_m <= 8.2e+122) tmp = sqrt((((2.0 * F) * ((B_m * B_m) - t_0)) * ((A + C) + hypot(B_m, (A - C))))) / t_1; 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[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 6.2e-63], 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] * N[Power[N[(2.0 * A), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[B$95$m, 8.2e+122], N[(N[Sqrt[N[(N[(N[(2.0 * F), $MachinePrecision] * N[(N[(B$95$m * B$95$m), $MachinePrecision] - t$95$0), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$1), $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(4 \cdot A\right) \cdot C\\
t_1 := t\_0 - B\_m \cdot B\_m\\
\mathbf{if}\;B\_m \leq 6.2 \cdot 10^{-63}:\\
\;\;\;\;\frac{\sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(2 \cdot F\right)} \cdot {\left(2 \cdot A\right)}^{0.5}}{t\_1}\\
\mathbf{elif}\;B\_m \leq 8.2 \cdot 10^{+122}:\\
\;\;\;\;\frac{\sqrt{\left(\left(2 \cdot F\right) \cdot \left(B\_m \cdot B\_m - t\_0\right)\right) \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(B\_m, A - C\right)\right)}}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{F}{B\_m}} \cdot \left(0 - \sqrt{2}\right)\\
\end{array}
\end{array}
if B < 6.19999999999999968e-63Initial program 26.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified32.2%
pow1/2N/A
*-commutativeN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr43.2%
Taylor expanded in A around inf
*-lowering-*.f6422.7%
Simplified22.7%
if 6.19999999999999968e-63 < B < 8.2000000000000004e122Initial program 56.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified59.8%
if 8.2000000000000004e122 < B Initial program 0.1%
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.f6444.8%
Simplified44.8%
Final simplification32.0%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (- (* (* 4.0 A) C) (* B_m B_m)))
(t_1 (+ (* B_m B_m) (* -4.0 (* A C)))))
(if (<= B_m 5.8e-62)
(/ (* (sqrt (* t_1 (* 2.0 F))) (pow (* 2.0 A) 0.5)) t_0)
(if (<= B_m 1.18e+87)
(/ (sqrt (* (* 2.0 F) (* t_1 (+ A (+ C (hypot B_m (- A C))))))) t_0)
(* (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 = ((4.0 * A) * C) - (B_m * B_m);
double t_1 = (B_m * B_m) + (-4.0 * (A * C));
double tmp;
if (B_m <= 5.8e-62) {
tmp = (sqrt((t_1 * (2.0 * F))) * pow((2.0 * A), 0.5)) / t_0;
} else if (B_m <= 1.18e+87) {
tmp = sqrt(((2.0 * F) * (t_1 * (A + (C + hypot(B_m, (A - C))))))) / t_0;
} 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 = ((4.0 * A) * C) - (B_m * B_m);
double t_1 = (B_m * B_m) + (-4.0 * (A * C));
double tmp;
if (B_m <= 5.8e-62) {
tmp = (Math.sqrt((t_1 * (2.0 * F))) * Math.pow((2.0 * A), 0.5)) / t_0;
} else if (B_m <= 1.18e+87) {
tmp = Math.sqrt(((2.0 * F) * (t_1 * (A + (C + Math.hypot(B_m, (A - C))))))) / t_0;
} 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 = ((4.0 * A) * C) - (B_m * B_m) t_1 = (B_m * B_m) + (-4.0 * (A * C)) tmp = 0 if B_m <= 5.8e-62: tmp = (math.sqrt((t_1 * (2.0 * F))) * math.pow((2.0 * A), 0.5)) / t_0 elif B_m <= 1.18e+87: tmp = math.sqrt(((2.0 * F) * (t_1 * (A + (C + math.hypot(B_m, (A - C))))))) / t_0 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(4.0 * A) * C) - Float64(B_m * B_m)) t_1 = Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) tmp = 0.0 if (B_m <= 5.8e-62) tmp = Float64(Float64(sqrt(Float64(t_1 * Float64(2.0 * F))) * (Float64(2.0 * A) ^ 0.5)) / t_0); elseif (B_m <= 1.18e+87) tmp = Float64(sqrt(Float64(Float64(2.0 * F) * Float64(t_1 * Float64(A + Float64(C + hypot(B_m, Float64(A - C))))))) / t_0); 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 = ((4.0 * A) * C) - (B_m * B_m); t_1 = (B_m * B_m) + (-4.0 * (A * C)); tmp = 0.0; if (B_m <= 5.8e-62) tmp = (sqrt((t_1 * (2.0 * F))) * ((2.0 * A) ^ 0.5)) / t_0; elseif (B_m <= 1.18e+87) tmp = sqrt(((2.0 * F) * (t_1 * (A + (C + hypot(B_m, (A - C))))))) / t_0; 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[(4.0 * A), $MachinePrecision] * C), $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]}, If[LessEqual[B$95$m, 5.8e-62], N[(N[(N[Sqrt[N[(t$95$1 * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[(2.0 * A), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[B$95$m, 1.18e+87], N[(N[Sqrt[N[(N[(2.0 * F), $MachinePrecision] * N[(t$95$1 * N[(A + N[(C + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $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(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\
t_1 := B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\\
\mathbf{if}\;B\_m \leq 5.8 \cdot 10^{-62}:\\
\;\;\;\;\frac{\sqrt{t\_1 \cdot \left(2 \cdot F\right)} \cdot {\left(2 \cdot A\right)}^{0.5}}{t\_0}\\
\mathbf{elif}\;B\_m \leq 1.18 \cdot 10^{+87}:\\
\;\;\;\;\frac{\sqrt{\left(2 \cdot F\right) \cdot \left(t\_1 \cdot \left(A + \left(C + \mathsf{hypot}\left(B\_m, A - C\right)\right)\right)\right)}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{F}{B\_m}} \cdot \left(0 - \sqrt{2}\right)\\
\end{array}
\end{array}
if B < 5.79999999999999971e-62Initial program 26.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified32.2%
pow1/2N/A
*-commutativeN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr43.2%
Taylor expanded in A around inf
*-lowering-*.f6422.7%
Simplified22.7%
if 5.79999999999999971e-62 < B < 1.1799999999999999e87Initial program 60.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified61.0%
*-commutativeN/A
pow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr57.6%
if 1.1799999999999999e87 < B Initial program 2.1%
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.f6443.7%
Simplified43.7%
Final simplification31.3%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (* F (* B_m B_m))) (t_1 (- (* (* 4.0 A) C) (* B_m B_m))))
(if (<= B_m 3.4e-188)
(*
(sqrt (* (+ (* B_m B_m) (* -4.0 (* A C))) (* C (* 4.0 F))))
(/ 1.0 (- (* A (* 4.0 C)) (* B_m B_m))))
(if (<= B_m 1.2e-80)
(/
(sqrt (* C (* A (- (* (* A F) (- 0.0 16.0)) (/ (* t_0 -8.0) C)))))
t_1)
(if (<= B_m 1.5e+122)
(/ (sqrt (* (+ (+ A C) (hypot B_m (- A C))) (* 2.0 t_0))) t_1)
(* (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 = F * (B_m * B_m);
double t_1 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (B_m <= 3.4e-188) {
tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (C * (4.0 * F)))) * (1.0 / ((A * (4.0 * C)) - (B_m * B_m)));
} else if (B_m <= 1.2e-80) {
tmp = sqrt((C * (A * (((A * F) * (0.0 - 16.0)) - ((t_0 * -8.0) / C))))) / t_1;
} else if (B_m <= 1.5e+122) {
tmp = sqrt((((A + C) + hypot(B_m, (A - C))) * (2.0 * t_0))) / t_1;
} 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 = F * (B_m * B_m);
double t_1 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (B_m <= 3.4e-188) {
tmp = Math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (C * (4.0 * F)))) * (1.0 / ((A * (4.0 * C)) - (B_m * B_m)));
} else if (B_m <= 1.2e-80) {
tmp = Math.sqrt((C * (A * (((A * F) * (0.0 - 16.0)) - ((t_0 * -8.0) / C))))) / t_1;
} else if (B_m <= 1.5e+122) {
tmp = Math.sqrt((((A + C) + Math.hypot(B_m, (A - C))) * (2.0 * t_0))) / t_1;
} 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 = F * (B_m * B_m) t_1 = ((4.0 * A) * C) - (B_m * B_m) tmp = 0 if B_m <= 3.4e-188: tmp = math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (C * (4.0 * F)))) * (1.0 / ((A * (4.0 * C)) - (B_m * B_m))) elif B_m <= 1.2e-80: tmp = math.sqrt((C * (A * (((A * F) * (0.0 - 16.0)) - ((t_0 * -8.0) / C))))) / t_1 elif B_m <= 1.5e+122: tmp = math.sqrt((((A + C) + math.hypot(B_m, (A - C))) * (2.0 * t_0))) / t_1 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(F * Float64(B_m * B_m)) t_1 = Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m)) tmp = 0.0 if (B_m <= 3.4e-188) tmp = Float64(sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(C * Float64(4.0 * F)))) * Float64(1.0 / Float64(Float64(A * Float64(4.0 * C)) - Float64(B_m * B_m)))); elseif (B_m <= 1.2e-80) tmp = Float64(sqrt(Float64(C * Float64(A * Float64(Float64(Float64(A * F) * Float64(0.0 - 16.0)) - Float64(Float64(t_0 * -8.0) / C))))) / t_1); elseif (B_m <= 1.5e+122) tmp = Float64(sqrt(Float64(Float64(Float64(A + C) + hypot(B_m, Float64(A - C))) * Float64(2.0 * t_0))) / t_1); 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 = F * (B_m * B_m); t_1 = ((4.0 * A) * C) - (B_m * B_m); tmp = 0.0; if (B_m <= 3.4e-188) tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (C * (4.0 * F)))) * (1.0 / ((A * (4.0 * C)) - (B_m * B_m))); elseif (B_m <= 1.2e-80) tmp = sqrt((C * (A * (((A * F) * (0.0 - 16.0)) - ((t_0 * -8.0) / C))))) / t_1; elseif (B_m <= 1.5e+122) tmp = sqrt((((A + C) + hypot(B_m, (A - C))) * (2.0 * t_0))) / t_1; 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[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 3.4e-188], N[(N[Sqrt[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(C * N[(4.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / N[(N[(A * N[(4.0 * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 1.2e-80], N[(N[Sqrt[N[(C * N[(A * N[(N[(N[(A * F), $MachinePrecision] * N[(0.0 - 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$0 * -8.0), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[B$95$m, 1.5e+122], N[(N[Sqrt[N[(N[(N[(A + C), $MachinePrecision] + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] * N[(2.0 * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$1), $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 := F \cdot \left(B\_m \cdot B\_m\right)\\
t_1 := \left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\
\mathbf{if}\;B\_m \leq 3.4 \cdot 10^{-188}:\\
\;\;\;\;\sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(C \cdot \left(4 \cdot F\right)\right)} \cdot \frac{1}{A \cdot \left(4 \cdot C\right) - B\_m \cdot B\_m}\\
\mathbf{elif}\;B\_m \leq 1.2 \cdot 10^{-80}:\\
\;\;\;\;\frac{\sqrt{C \cdot \left(A \cdot \left(\left(A \cdot F\right) \cdot \left(0 - 16\right) - \frac{t\_0 \cdot -8}{C}\right)\right)}}{t\_1}\\
\mathbf{elif}\;B\_m \leq 1.5 \cdot 10^{+122}:\\
\;\;\;\;\frac{\sqrt{\left(\left(A + C\right) + \mathsf{hypot}\left(B\_m, A - C\right)\right) \cdot \left(2 \cdot t\_0\right)}}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{F}{B\_m}} \cdot \left(0 - \sqrt{2}\right)\\
\end{array}
\end{array}
if B < 3.40000000000000027e-188Initial program 27.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified31.9%
Applied egg-rr17.9%
Taylor expanded in A around -inf
*-lowering-*.f645.8%
Simplified5.8%
div-invN/A
associate-*l*N/A
Applied egg-rr15.4%
if 3.40000000000000027e-188 < B < 1.2e-80Initial program 21.2%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified35.2%
Taylor expanded in C around -inf
associate-*r*N/A
mul-1-negN/A
*-lowering-*.f64N/A
neg-lowering-neg.f64N/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-*.f64N/A
unpow2N/A
*-lowering-*.f6426.1%
Simplified26.1%
Taylor expanded in A around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6430.6%
Simplified30.6%
if 1.2e-80 < B < 1.49999999999999993e122Initial program 53.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified56.4%
Taylor expanded in B around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6451.8%
Simplified51.8%
if 1.49999999999999993e122 < B Initial program 0.1%
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.f6444.8%
Simplified44.8%
Final simplification27.9%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 9.2e+122)
(/
(sqrt
(*
(+ A (+ C (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 <= 9.2e+122) {
tmp = sqrt(((A + (C + 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 <= 9.2e+122) {
tmp = Math.sqrt(((A + (C + 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 <= 9.2e+122: tmp = math.sqrt(((A + (C + 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 <= 9.2e+122) tmp = Float64(sqrt(Float64(Float64(A + Float64(C + 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(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 <= 9.2e+122) tmp = sqrt(((A + (C + 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, 9.2e+122], N[(N[Sqrt[N[(N[(A + N[(C + 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[(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 9.2 \cdot 10^{+122}:\\
\;\;\;\;\frac{\sqrt{\left(A + \left(C + \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)}}{\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 < 9.2000000000000002e122Initial program 31.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified36.8%
*-commutativeN/A
*-lowering-*.f64N/A
associate-+l+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
--lowering--.f64N/A
pow2N/A
*-lowering-*.f64N/A
Applied egg-rr38.1%
if 9.2000000000000002e122 < B Initial program 0.1%
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.f6444.8%
Simplified44.8%
Final simplification39.4%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (- (* (* 4.0 A) C) (* B_m B_m))))
(if (<= B_m 3.9e-61)
(/
(*
(sqrt (* (+ (* B_m B_m) (* -4.0 (* A C))) (* 2.0 F)))
(pow (* 2.0 A) 0.5))
t_0)
(if (<= B_m 1.5e+122)
(/
(sqrt (* (+ (+ A C) (hypot B_m (- A C))) (* 2.0 (* F (* B_m B_m)))))
t_0)
(* (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 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (B_m <= 3.9e-61) {
tmp = (sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) * pow((2.0 * A), 0.5)) / t_0;
} else if (B_m <= 1.5e+122) {
tmp = sqrt((((A + C) + hypot(B_m, (A - C))) * (2.0 * (F * (B_m * B_m))))) / t_0;
} 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 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (B_m <= 3.9e-61) {
tmp = (Math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) * Math.pow((2.0 * A), 0.5)) / t_0;
} else if (B_m <= 1.5e+122) {
tmp = Math.sqrt((((A + C) + Math.hypot(B_m, (A - C))) * (2.0 * (F * (B_m * B_m))))) / t_0;
} 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 = ((4.0 * A) * C) - (B_m * B_m) tmp = 0 if B_m <= 3.9e-61: tmp = (math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) * math.pow((2.0 * A), 0.5)) / t_0 elif B_m <= 1.5e+122: tmp = math.sqrt((((A + C) + math.hypot(B_m, (A - C))) * (2.0 * (F * (B_m * B_m))))) / t_0 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(4.0 * A) * C) - Float64(B_m * B_m)) tmp = 0.0 if (B_m <= 3.9e-61) tmp = Float64(Float64(sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(2.0 * F))) * (Float64(2.0 * A) ^ 0.5)) / t_0); elseif (B_m <= 1.5e+122) tmp = Float64(sqrt(Float64(Float64(Float64(A + C) + hypot(B_m, Float64(A - C))) * Float64(2.0 * Float64(F * Float64(B_m * B_m))))) / t_0); 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 = ((4.0 * A) * C) - (B_m * B_m); tmp = 0.0; if (B_m <= 3.9e-61) tmp = (sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) * ((2.0 * A) ^ 0.5)) / t_0; elseif (B_m <= 1.5e+122) tmp = sqrt((((A + C) + hypot(B_m, (A - C))) * (2.0 * (F * (B_m * B_m))))) / t_0; 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[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 3.9e-61], 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] * N[Power[N[(2.0 * A), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[B$95$m, 1.5e+122], N[(N[Sqrt[N[(N[(N[(A + C), $MachinePrecision] + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $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(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\
\mathbf{if}\;B\_m \leq 3.9 \cdot 10^{-61}:\\
\;\;\;\;\frac{\sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(2 \cdot F\right)} \cdot {\left(2 \cdot A\right)}^{0.5}}{t\_0}\\
\mathbf{elif}\;B\_m \leq 1.5 \cdot 10^{+122}:\\
\;\;\;\;\frac{\sqrt{\left(\left(A + C\right) + \mathsf{hypot}\left(B\_m, A - C\right)\right) \cdot \left(2 \cdot \left(F \cdot \left(B\_m \cdot B\_m\right)\right)\right)}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{F}{B\_m}} \cdot \left(0 - \sqrt{2}\right)\\
\end{array}
\end{array}
if B < 3.90000000000000033e-61Initial program 26.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified32.2%
pow1/2N/A
*-commutativeN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr43.2%
Taylor expanded in A around inf
*-lowering-*.f6422.7%
Simplified22.7%
if 3.90000000000000033e-61 < B < 1.49999999999999993e122Initial program 56.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified59.8%
Taylor expanded in B around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6454.5%
Simplified54.5%
if 1.49999999999999993e122 < B Initial program 0.1%
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.f6444.8%
Simplified44.8%
Final simplification31.3%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (- (* (* 4.0 A) C) (* B_m B_m))))
(if (<= B_m 6.8e-62)
(*
(sqrt (* (+ (* B_m B_m) (* -4.0 (* A C))) (* 2.0 F)))
(/ (pow (* 2.0 A) 0.5) t_0))
(if (<= B_m 1.5e+122)
(/
(sqrt (* (+ (+ A C) (hypot B_m (- A C))) (* 2.0 (* F (* B_m B_m)))))
t_0)
(* (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 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (B_m <= 6.8e-62) {
tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) * (pow((2.0 * A), 0.5) / t_0);
} else if (B_m <= 1.5e+122) {
tmp = sqrt((((A + C) + hypot(B_m, (A - C))) * (2.0 * (F * (B_m * B_m))))) / t_0;
} 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 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (B_m <= 6.8e-62) {
tmp = Math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) * (Math.pow((2.0 * A), 0.5) / t_0);
} else if (B_m <= 1.5e+122) {
tmp = Math.sqrt((((A + C) + Math.hypot(B_m, (A - C))) * (2.0 * (F * (B_m * B_m))))) / t_0;
} 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 = ((4.0 * A) * C) - (B_m * B_m) tmp = 0 if B_m <= 6.8e-62: tmp = math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) * (math.pow((2.0 * A), 0.5) / t_0) elif B_m <= 1.5e+122: tmp = math.sqrt((((A + C) + math.hypot(B_m, (A - C))) * (2.0 * (F * (B_m * B_m))))) / t_0 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(4.0 * A) * C) - Float64(B_m * B_m)) tmp = 0.0 if (B_m <= 6.8e-62) tmp = Float64(sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(2.0 * F))) * Float64((Float64(2.0 * A) ^ 0.5) / t_0)); elseif (B_m <= 1.5e+122) tmp = Float64(sqrt(Float64(Float64(Float64(A + C) + hypot(B_m, Float64(A - C))) * Float64(2.0 * Float64(F * Float64(B_m * B_m))))) / t_0); 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 = ((4.0 * A) * C) - (B_m * B_m); tmp = 0.0; if (B_m <= 6.8e-62) tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * F))) * (((2.0 * A) ^ 0.5) / t_0); elseif (B_m <= 1.5e+122) tmp = sqrt((((A + C) + hypot(B_m, (A - C))) * (2.0 * (F * (B_m * B_m))))) / t_0; 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[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 6.8e-62], 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[Power[N[(2.0 * A), $MachinePrecision], 0.5], $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 1.5e+122], N[(N[Sqrt[N[(N[(N[(A + C), $MachinePrecision] + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $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(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\
\mathbf{if}\;B\_m \leq 6.8 \cdot 10^{-62}:\\
\;\;\;\;\sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(2 \cdot F\right)} \cdot \frac{{\left(2 \cdot A\right)}^{0.5}}{t\_0}\\
\mathbf{elif}\;B\_m \leq 1.5 \cdot 10^{+122}:\\
\;\;\;\;\frac{\sqrt{\left(\left(A + C\right) + \mathsf{hypot}\left(B\_m, A - C\right)\right) \cdot \left(2 \cdot \left(F \cdot \left(B\_m \cdot B\_m\right)\right)\right)}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{F}{B\_m}} \cdot \left(0 - \sqrt{2}\right)\\
\end{array}
\end{array}
if B < 6.79999999999999975e-62Initial program 26.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified32.2%
pow1/2N/A
unpow-prod-downN/A
associate-/l*N/A
*-lowering-*.f64N/A
Applied egg-rr43.2%
Taylor expanded in A around inf
*-lowering-*.f6422.6%
Simplified22.6%
if 6.79999999999999975e-62 < B < 1.49999999999999993e122Initial program 56.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified59.8%
Taylor expanded in B around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6454.5%
Simplified54.5%
if 1.49999999999999993e122 < B Initial program 0.1%
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.f6444.8%
Simplified44.8%
Final simplification31.3%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (- (* (* 4.0 A) C) (* B_m B_m))))
(if (<= B_m 5e-186)
(*
(sqrt (* (+ (* B_m B_m) (* -4.0 (* A C))) (* C (* 4.0 F))))
(/ 1.0 (- (* A (* 4.0 C)) (* B_m B_m))))
(if (<= B_m 1.02e-82)
(/
(sqrt
(*
C
(* A (- (* (* A F) (- 0.0 16.0)) (/ (* (* F (* B_m B_m)) -8.0) C)))))
t_0)
(if (<= B_m 4.7e+138)
(/ (* B_m (sqrt (* 2.0 (* F (+ C (hypot B_m C)))))) t_0)
(* (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 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (B_m <= 5e-186) {
tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (C * (4.0 * F)))) * (1.0 / ((A * (4.0 * C)) - (B_m * B_m)));
} else if (B_m <= 1.02e-82) {
tmp = sqrt((C * (A * (((A * F) * (0.0 - 16.0)) - (((F * (B_m * B_m)) * -8.0) / C))))) / t_0;
} else if (B_m <= 4.7e+138) {
tmp = (B_m * sqrt((2.0 * (F * (C + hypot(B_m, C)))))) / t_0;
} 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 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (B_m <= 5e-186) {
tmp = Math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (C * (4.0 * F)))) * (1.0 / ((A * (4.0 * C)) - (B_m * B_m)));
} else if (B_m <= 1.02e-82) {
tmp = Math.sqrt((C * (A * (((A * F) * (0.0 - 16.0)) - (((F * (B_m * B_m)) * -8.0) / C))))) / t_0;
} else if (B_m <= 4.7e+138) {
tmp = (B_m * Math.sqrt((2.0 * (F * (C + Math.hypot(B_m, C)))))) / t_0;
} 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 = ((4.0 * A) * C) - (B_m * B_m) tmp = 0 if B_m <= 5e-186: tmp = math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (C * (4.0 * F)))) * (1.0 / ((A * (4.0 * C)) - (B_m * B_m))) elif B_m <= 1.02e-82: tmp = math.sqrt((C * (A * (((A * F) * (0.0 - 16.0)) - (((F * (B_m * B_m)) * -8.0) / C))))) / t_0 elif B_m <= 4.7e+138: tmp = (B_m * math.sqrt((2.0 * (F * (C + math.hypot(B_m, C)))))) / t_0 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(4.0 * A) * C) - Float64(B_m * B_m)) tmp = 0.0 if (B_m <= 5e-186) tmp = Float64(sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(C * Float64(4.0 * F)))) * Float64(1.0 / Float64(Float64(A * Float64(4.0 * C)) - Float64(B_m * B_m)))); elseif (B_m <= 1.02e-82) tmp = Float64(sqrt(Float64(C * Float64(A * Float64(Float64(Float64(A * F) * Float64(0.0 - 16.0)) - Float64(Float64(Float64(F * Float64(B_m * B_m)) * -8.0) / C))))) / t_0); elseif (B_m <= 4.7e+138) tmp = Float64(Float64(B_m * sqrt(Float64(2.0 * Float64(F * Float64(C + hypot(B_m, C)))))) / t_0); 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 = ((4.0 * A) * C) - (B_m * B_m); tmp = 0.0; if (B_m <= 5e-186) tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (C * (4.0 * F)))) * (1.0 / ((A * (4.0 * C)) - (B_m * B_m))); elseif (B_m <= 1.02e-82) tmp = sqrt((C * (A * (((A * F) * (0.0 - 16.0)) - (((F * (B_m * B_m)) * -8.0) / C))))) / t_0; elseif (B_m <= 4.7e+138) tmp = (B_m * sqrt((2.0 * (F * (C + hypot(B_m, C)))))) / t_0; 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[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 5e-186], N[(N[Sqrt[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(C * N[(4.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / N[(N[(A * N[(4.0 * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 1.02e-82], N[(N[Sqrt[N[(C * N[(A * N[(N[(N[(A * F), $MachinePrecision] * N[(0.0 - 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] * -8.0), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[B$95$m, 4.7e+138], N[(N[(B$95$m * N[Sqrt[N[(2.0 * N[(F * N[(C + N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$0), $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(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\
\mathbf{if}\;B\_m \leq 5 \cdot 10^{-186}:\\
\;\;\;\;\sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(C \cdot \left(4 \cdot F\right)\right)} \cdot \frac{1}{A \cdot \left(4 \cdot C\right) - B\_m \cdot B\_m}\\
\mathbf{elif}\;B\_m \leq 1.02 \cdot 10^{-82}:\\
\;\;\;\;\frac{\sqrt{C \cdot \left(A \cdot \left(\left(A \cdot F\right) \cdot \left(0 - 16\right) - \frac{\left(F \cdot \left(B\_m \cdot B\_m\right)\right) \cdot -8}{C}\right)\right)}}{t\_0}\\
\mathbf{elif}\;B\_m \leq 4.7 \cdot 10^{+138}:\\
\;\;\;\;\frac{B\_m \cdot \sqrt{2 \cdot \left(F \cdot \left(C + \mathsf{hypot}\left(B\_m, C\right)\right)\right)}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{F}{B\_m}} \cdot \left(0 - \sqrt{2}\right)\\
\end{array}
\end{array}
if B < 5e-186Initial program 27.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified31.9%
Applied egg-rr17.9%
Taylor expanded in A around -inf
*-lowering-*.f645.8%
Simplified5.8%
div-invN/A
associate-*l*N/A
Applied egg-rr15.4%
if 5e-186 < B < 1.02000000000000007e-82Initial program 21.2%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified35.2%
Taylor expanded in C around -inf
associate-*r*N/A
mul-1-negN/A
*-lowering-*.f64N/A
neg-lowering-neg.f64N/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-*.f64N/A
unpow2N/A
*-lowering-*.f6426.1%
Simplified26.1%
Taylor expanded in A around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6430.6%
Simplified30.6%
if 1.02000000000000007e-82 < B < 4.6999999999999998e138Initial program 52.3%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified55.0%
Taylor expanded in A around 0
*-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.f6446.4%
Simplified46.4%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
hypot-defineN/A
hypot-lowering-hypot.f6446.6%
Applied egg-rr46.6%
if 4.6999999999999998e138 < B Initial program 0.1%
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.f6443.7%
Simplified43.7%
Final simplification26.9%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (- (* A (* 4.0 C)) (* B_m B_m))))
(if (<= B_m 2.35e-185)
(*
(sqrt (* (+ (* B_m B_m) (* -4.0 (* A C))) (* C (* 4.0 F))))
(/ 1.0 t_0))
(if (<= B_m 8.5e-83)
(/
(sqrt
(*
C
(* A (- (* (* A F) (- 0.0 16.0)) (/ (* (* F (* B_m B_m)) -8.0) C)))))
(- (* (* 4.0 A) C) (* B_m B_m)))
(if (<= B_m 6.8e+123)
(* B_m (/ (sqrt (* 2.0 (* F (+ C (hypot B_m C))))) t_0))
(* (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 tmp;
if (B_m <= 2.35e-185) {
tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (C * (4.0 * F)))) * (1.0 / t_0);
} else if (B_m <= 8.5e-83) {
tmp = sqrt((C * (A * (((A * F) * (0.0 - 16.0)) - (((F * (B_m * B_m)) * -8.0) / C))))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 6.8e+123) {
tmp = B_m * (sqrt((2.0 * (F * (C + hypot(B_m, C))))) / t_0);
} 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 tmp;
if (B_m <= 2.35e-185) {
tmp = Math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (C * (4.0 * F)))) * (1.0 / t_0);
} else if (B_m <= 8.5e-83) {
tmp = Math.sqrt((C * (A * (((A * F) * (0.0 - 16.0)) - (((F * (B_m * B_m)) * -8.0) / C))))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 6.8e+123) {
tmp = B_m * (Math.sqrt((2.0 * (F * (C + Math.hypot(B_m, C))))) / t_0);
} 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) tmp = 0 if B_m <= 2.35e-185: tmp = math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (C * (4.0 * F)))) * (1.0 / t_0) elif B_m <= 8.5e-83: tmp = math.sqrt((C * (A * (((A * F) * (0.0 - 16.0)) - (((F * (B_m * B_m)) * -8.0) / C))))) / (((4.0 * A) * C) - (B_m * B_m)) elif B_m <= 6.8e+123: tmp = B_m * (math.sqrt((2.0 * (F * (C + math.hypot(B_m, C))))) / t_0) 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)) tmp = 0.0 if (B_m <= 2.35e-185) tmp = Float64(sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(C * Float64(4.0 * F)))) * Float64(1.0 / t_0)); elseif (B_m <= 8.5e-83) tmp = Float64(sqrt(Float64(C * Float64(A * Float64(Float64(Float64(A * F) * Float64(0.0 - 16.0)) - Float64(Float64(Float64(F * Float64(B_m * B_m)) * -8.0) / C))))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); elseif (B_m <= 6.8e+123) tmp = Float64(B_m * Float64(sqrt(Float64(2.0 * Float64(F * Float64(C + hypot(B_m, C))))) / t_0)); 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); tmp = 0.0; if (B_m <= 2.35e-185) tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (C * (4.0 * F)))) * (1.0 / t_0); elseif (B_m <= 8.5e-83) tmp = sqrt((C * (A * (((A * F) * (0.0 - 16.0)) - (((F * (B_m * B_m)) * -8.0) / C))))) / (((4.0 * A) * C) - (B_m * B_m)); elseif (B_m <= 6.8e+123) tmp = B_m * (sqrt((2.0 * (F * (C + hypot(B_m, C))))) / t_0); 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]}, If[LessEqual[B$95$m, 2.35e-185], N[(N[Sqrt[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(C * N[(4.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 8.5e-83], N[(N[Sqrt[N[(C * N[(A * N[(N[(N[(A * F), $MachinePrecision] * N[(0.0 - 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] * -8.0), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 6.8e+123], N[(B$95$m * N[(N[Sqrt[N[(2.0 * N[(F * N[(C + N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $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\\
\mathbf{if}\;B\_m \leq 2.35 \cdot 10^{-185}:\\
\;\;\;\;\sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(C \cdot \left(4 \cdot F\right)\right)} \cdot \frac{1}{t\_0}\\
\mathbf{elif}\;B\_m \leq 8.5 \cdot 10^{-83}:\\
\;\;\;\;\frac{\sqrt{C \cdot \left(A \cdot \left(\left(A \cdot F\right) \cdot \left(0 - 16\right) - \frac{\left(F \cdot \left(B\_m \cdot B\_m\right)\right) \cdot -8}{C}\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{elif}\;B\_m \leq 6.8 \cdot 10^{+123}:\\
\;\;\;\;B\_m \cdot \frac{\sqrt{2 \cdot \left(F \cdot \left(C + \mathsf{hypot}\left(B\_m, C\right)\right)\right)}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{F}{B\_m}} \cdot \left(0 - \sqrt{2}\right)\\
\end{array}
\end{array}
if B < 2.3500000000000001e-185Initial program 27.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified31.9%
Applied egg-rr17.9%
Taylor expanded in A around -inf
*-lowering-*.f645.8%
Simplified5.8%
div-invN/A
associate-*l*N/A
Applied egg-rr15.4%
if 2.3500000000000001e-185 < B < 8.49999999999999938e-83Initial program 21.2%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified35.2%
Taylor expanded in C around -inf
associate-*r*N/A
mul-1-negN/A
*-lowering-*.f64N/A
neg-lowering-neg.f64N/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-*.f64N/A
unpow2N/A
*-lowering-*.f6426.1%
Simplified26.1%
Taylor expanded in A around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6430.6%
Simplified30.6%
if 8.49999999999999938e-83 < B < 6.80000000000000002e123Initial program 53.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified56.4%
Taylor expanded in A around 0
*-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.f6447.5%
Simplified47.5%
associate-*l*N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr47.9%
if 6.80000000000000002e123 < B Initial program 0.1%
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.f6444.8%
Simplified44.8%
Final simplification27.3%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 3.2e-185)
(*
(sqrt (* (+ (* B_m B_m) (* -4.0 (* A C))) (* C (* 4.0 F))))
(/ 1.0 (- (* A (* 4.0 C)) (* B_m B_m))))
(if (<= B_m 1.6e-82)
(/
(sqrt
(*
C
(* A (- (* (* A F) (- 0.0 16.0)) (/ (* (* F (* B_m B_m)) -8.0) 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 <= 3.2e-185) {
tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (C * (4.0 * F)))) * (1.0 / ((A * (4.0 * C)) - (B_m * B_m)));
} else if (B_m <= 1.6e-82) {
tmp = sqrt((C * (A * (((A * F) * (0.0 - 16.0)) - (((F * (B_m * B_m)) * -8.0) / 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 <= 3.2d-185) then
tmp = sqrt((((b_m * b_m) + ((-4.0d0) * (a * c))) * (c * (4.0d0 * f)))) * (1.0d0 / ((a * (4.0d0 * c)) - (b_m * b_m)))
else if (b_m <= 1.6d-82) then
tmp = sqrt((c * (a * (((a * f) * (0.0d0 - 16.0d0)) - (((f * (b_m * b_m)) * (-8.0d0)) / 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 <= 3.2e-185) {
tmp = Math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (C * (4.0 * F)))) * (1.0 / ((A * (4.0 * C)) - (B_m * B_m)));
} else if (B_m <= 1.6e-82) {
tmp = Math.sqrt((C * (A * (((A * F) * (0.0 - 16.0)) - (((F * (B_m * B_m)) * -8.0) / 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 <= 3.2e-185: tmp = math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (C * (4.0 * F)))) * (1.0 / ((A * (4.0 * C)) - (B_m * B_m))) elif B_m <= 1.6e-82: tmp = math.sqrt((C * (A * (((A * F) * (0.0 - 16.0)) - (((F * (B_m * B_m)) * -8.0) / 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 <= 3.2e-185) tmp = Float64(sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(C * Float64(4.0 * F)))) * Float64(1.0 / Float64(Float64(A * Float64(4.0 * C)) - Float64(B_m * B_m)))); elseif (B_m <= 1.6e-82) tmp = Float64(sqrt(Float64(C * Float64(A * Float64(Float64(Float64(A * F) * Float64(0.0 - 16.0)) - Float64(Float64(Float64(F * Float64(B_m * B_m)) * -8.0) / 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 <= 3.2e-185) tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (C * (4.0 * F)))) * (1.0 / ((A * (4.0 * C)) - (B_m * B_m))); elseif (B_m <= 1.6e-82) tmp = sqrt((C * (A * (((A * F) * (0.0 - 16.0)) - (((F * (B_m * B_m)) * -8.0) / 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, 3.2e-185], N[(N[Sqrt[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(C * N[(4.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / N[(N[(A * N[(4.0 * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 1.6e-82], N[(N[Sqrt[N[(C * N[(A * N[(N[(N[(A * F), $MachinePrecision] * N[(0.0 - 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] * -8.0), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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 3.2 \cdot 10^{-185}:\\
\;\;\;\;\sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(C \cdot \left(4 \cdot F\right)\right)} \cdot \frac{1}{A \cdot \left(4 \cdot C\right) - B\_m \cdot B\_m}\\
\mathbf{elif}\;B\_m \leq 1.6 \cdot 10^{-82}:\\
\;\;\;\;\frac{\sqrt{C \cdot \left(A \cdot \left(\left(A \cdot F\right) \cdot \left(0 - 16\right) - \frac{\left(F \cdot \left(B\_m \cdot B\_m\right)\right) \cdot -8}{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 < 3.1999999999999997e-185Initial program 27.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified31.9%
Applied egg-rr17.9%
Taylor expanded in A around -inf
*-lowering-*.f645.8%
Simplified5.8%
div-invN/A
associate-*l*N/A
Applied egg-rr15.4%
if 3.1999999999999997e-185 < B < 1.6000000000000001e-82Initial program 21.2%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified35.2%
Taylor expanded in C around -inf
associate-*r*N/A
mul-1-negN/A
*-lowering-*.f64N/A
neg-lowering-neg.f64N/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-*.f64N/A
unpow2N/A
*-lowering-*.f6426.1%
Simplified26.1%
Taylor expanded in A around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6430.6%
Simplified30.6%
if 1.6000000000000001e-82 < B Initial program 23.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.f6444.2%
Simplified44.2%
Final simplification26.7%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (* B_m (* B_m F))) (t_1 (- (* (* 4.0 A) C) (* B_m B_m))))
(if (<= C -2.1e+69)
(/
1.0
(/
t_1
(sqrt
(* C (- (* A (* (* A F) (- 0.0 16.0))) (/ -8.0 (/ (/ C A) t_0)))))))
(if (<= C 6.6e-146)
(/ (sqrt (* t_0 (* 2.0 B_m))) t_1)
(*
(sqrt (* (+ (* B_m B_m) (* -4.0 (* A C))) (* C (* 4.0 F))))
(/ 1.0 (- (* A (* 4.0 C)) (* B_m B_m))))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = B_m * (B_m * F);
double t_1 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (C <= -2.1e+69) {
tmp = 1.0 / (t_1 / sqrt((C * ((A * ((A * F) * (0.0 - 16.0))) - (-8.0 / ((C / A) / t_0))))));
} else if (C <= 6.6e-146) {
tmp = sqrt((t_0 * (2.0 * B_m))) / t_1;
} else {
tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (C * (4.0 * F)))) * (1.0 / ((A * (4.0 * C)) - (B_m * B_m)));
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = b_m * (b_m * f)
t_1 = ((4.0d0 * a) * c) - (b_m * b_m)
if (c <= (-2.1d+69)) then
tmp = 1.0d0 / (t_1 / sqrt((c * ((a * ((a * f) * (0.0d0 - 16.0d0))) - ((-8.0d0) / ((c / a) / t_0))))))
else if (c <= 6.6d-146) then
tmp = sqrt((t_0 * (2.0d0 * b_m))) / t_1
else
tmp = sqrt((((b_m * b_m) + ((-4.0d0) * (a * c))) * (c * (4.0d0 * f)))) * (1.0d0 / ((a * (4.0d0 * c)) - (b_m * b_m)))
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = B_m * (B_m * F);
double t_1 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (C <= -2.1e+69) {
tmp = 1.0 / (t_1 / Math.sqrt((C * ((A * ((A * F) * (0.0 - 16.0))) - (-8.0 / ((C / A) / t_0))))));
} else if (C <= 6.6e-146) {
tmp = Math.sqrt((t_0 * (2.0 * B_m))) / t_1;
} else {
tmp = Math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (C * (4.0 * F)))) * (1.0 / ((A * (4.0 * C)) - (B_m * B_m)));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = B_m * (B_m * F) t_1 = ((4.0 * A) * C) - (B_m * B_m) tmp = 0 if C <= -2.1e+69: tmp = 1.0 / (t_1 / math.sqrt((C * ((A * ((A * F) * (0.0 - 16.0))) - (-8.0 / ((C / A) / t_0)))))) elif C <= 6.6e-146: tmp = math.sqrt((t_0 * (2.0 * B_m))) / t_1 else: tmp = math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (C * (4.0 * F)))) * (1.0 / ((A * (4.0 * C)) - (B_m * B_m))) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(B_m * Float64(B_m * F)) t_1 = Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m)) tmp = 0.0 if (C <= -2.1e+69) tmp = Float64(1.0 / Float64(t_1 / sqrt(Float64(C * Float64(Float64(A * Float64(Float64(A * F) * Float64(0.0 - 16.0))) - Float64(-8.0 / Float64(Float64(C / A) / t_0))))))); elseif (C <= 6.6e-146) tmp = Float64(sqrt(Float64(t_0 * Float64(2.0 * B_m))) / t_1); else tmp = Float64(sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(C * Float64(4.0 * F)))) * Float64(1.0 / Float64(Float64(A * Float64(4.0 * C)) - Float64(B_m * B_m)))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = B_m * (B_m * F); t_1 = ((4.0 * A) * C) - (B_m * B_m); tmp = 0.0; if (C <= -2.1e+69) tmp = 1.0 / (t_1 / sqrt((C * ((A * ((A * F) * (0.0 - 16.0))) - (-8.0 / ((C / A) / t_0)))))); elseif (C <= 6.6e-146) tmp = sqrt((t_0 * (2.0 * B_m))) / t_1; else tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (C * (4.0 * F)))) * (1.0 / ((A * (4.0 * C)) - (B_m * B_m))); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(B$95$m * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -2.1e+69], N[(1.0 / N[(t$95$1 / N[Sqrt[N[(C * N[(N[(A * N[(N[(A * F), $MachinePrecision] * N[(0.0 - 16.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-8.0 / N[(N[(C / A), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 6.6e-146], N[(N[Sqrt[N[(t$95$0 * N[(2.0 * B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$1), $MachinePrecision], N[(N[Sqrt[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(C * N[(4.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / N[(N[(A * N[(4.0 * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := B\_m \cdot \left(B\_m \cdot F\right)\\
t_1 := \left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\
\mathbf{if}\;C \leq -2.1 \cdot 10^{+69}:\\
\;\;\;\;\frac{1}{\frac{t\_1}{\sqrt{C \cdot \left(A \cdot \left(\left(A \cdot F\right) \cdot \left(0 - 16\right)\right) - \frac{-8}{\frac{\frac{C}{A}}{t\_0}}\right)}}}\\
\mathbf{elif}\;C \leq 6.6 \cdot 10^{-146}:\\
\;\;\;\;\frac{\sqrt{t\_0 \cdot \left(2 \cdot B\_m\right)}}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(C \cdot \left(4 \cdot F\right)\right)} \cdot \frac{1}{A \cdot \left(4 \cdot C\right) - B\_m \cdot B\_m}\\
\end{array}
\end{array}
if C < -2.10000000000000015e69Initial program 0.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified1.1%
Taylor expanded in C around -inf
associate-*r*N/A
mul-1-negN/A
*-lowering-*.f64N/A
neg-lowering-neg.f64N/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-*.f64N/A
unpow2N/A
*-lowering-*.f6411.9%
Simplified11.9%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
distribute-lft-neg-outN/A
neg-sub0N/A
Applied egg-rr17.5%
if -2.10000000000000015e69 < C < 6.6e-146Initial program 33.2%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified36.8%
Taylor expanded in B around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6410.0%
Simplified10.0%
associate-*l*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6411.1%
Applied egg-rr11.1%
if 6.6e-146 < C Initial program 30.0%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified37.0%
Applied egg-rr18.7%
Taylor expanded in A around -inf
*-lowering-*.f6413.3%
Simplified13.3%
div-invN/A
associate-*l*N/A
Applied egg-rr30.1%
Final simplification18.7%
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 (<= C -2.1e+69)
(/
(sqrt
(*
C
(* A (- (* (* A F) (- 0.0 16.0)) (/ (* (* F (* B_m B_m)) -8.0) C)))))
t_0)
(if (<= C 2.3e-145)
(/ (sqrt (* (* B_m (* B_m F)) (* 2.0 B_m))) t_0)
(*
(sqrt (* (+ (* B_m B_m) (* -4.0 (* A C))) (* C (* 4.0 F))))
(/ 1.0 (- (* A (* 4.0 C)) (* B_m B_m))))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (C <= -2.1e+69) {
tmp = sqrt((C * (A * (((A * F) * (0.0 - 16.0)) - (((F * (B_m * B_m)) * -8.0) / C))))) / t_0;
} else if (C <= 2.3e-145) {
tmp = sqrt(((B_m * (B_m * F)) * (2.0 * B_m))) / t_0;
} else {
tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (C * (4.0 * F)))) * (1.0 / ((A * (4.0 * C)) - (B_m * B_m)));
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: t_0
real(8) :: tmp
t_0 = ((4.0d0 * a) * c) - (b_m * b_m)
if (c <= (-2.1d+69)) then
tmp = sqrt((c * (a * (((a * f) * (0.0d0 - 16.0d0)) - (((f * (b_m * b_m)) * (-8.0d0)) / c))))) / t_0
else if (c <= 2.3d-145) then
tmp = sqrt(((b_m * (b_m * f)) * (2.0d0 * b_m))) / t_0
else
tmp = sqrt((((b_m * b_m) + ((-4.0d0) * (a * c))) * (c * (4.0d0 * f)))) * (1.0d0 / ((a * (4.0d0 * c)) - (b_m * b_m)))
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (C <= -2.1e+69) {
tmp = Math.sqrt((C * (A * (((A * F) * (0.0 - 16.0)) - (((F * (B_m * B_m)) * -8.0) / C))))) / t_0;
} else if (C <= 2.3e-145) {
tmp = Math.sqrt(((B_m * (B_m * F)) * (2.0 * B_m))) / t_0;
} else {
tmp = Math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (C * (4.0 * F)))) * (1.0 / ((A * (4.0 * C)) - (B_m * B_m)));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = ((4.0 * A) * C) - (B_m * B_m) tmp = 0 if C <= -2.1e+69: tmp = math.sqrt((C * (A * (((A * F) * (0.0 - 16.0)) - (((F * (B_m * B_m)) * -8.0) / C))))) / t_0 elif C <= 2.3e-145: tmp = math.sqrt(((B_m * (B_m * F)) * (2.0 * B_m))) / t_0 else: tmp = math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (C * (4.0 * F)))) * (1.0 / ((A * (4.0 * C)) - (B_m * B_m))) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m)) tmp = 0.0 if (C <= -2.1e+69) tmp = Float64(sqrt(Float64(C * Float64(A * Float64(Float64(Float64(A * F) * Float64(0.0 - 16.0)) - Float64(Float64(Float64(F * Float64(B_m * B_m)) * -8.0) / C))))) / t_0); elseif (C <= 2.3e-145) tmp = Float64(sqrt(Float64(Float64(B_m * Float64(B_m * F)) * Float64(2.0 * B_m))) / t_0); else tmp = Float64(sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(C * Float64(4.0 * F)))) * Float64(1.0 / Float64(Float64(A * Float64(4.0 * C)) - Float64(B_m * B_m)))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = ((4.0 * A) * C) - (B_m * B_m); tmp = 0.0; if (C <= -2.1e+69) tmp = sqrt((C * (A * (((A * F) * (0.0 - 16.0)) - (((F * (B_m * B_m)) * -8.0) / C))))) / t_0; elseif (C <= 2.3e-145) tmp = sqrt(((B_m * (B_m * F)) * (2.0 * B_m))) / t_0; else tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (C * (4.0 * F)))) * (1.0 / ((A * (4.0 * C)) - (B_m * B_m))); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -2.1e+69], N[(N[Sqrt[N[(C * N[(A * N[(N[(N[(A * F), $MachinePrecision] * N[(0.0 - 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] * -8.0), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[C, 2.3e-145], N[(N[Sqrt[N[(N[(B$95$m * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision] * N[(2.0 * B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[Sqrt[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(C * N[(4.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / N[(N[(A * N[(4.0 * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := \left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\
\mathbf{if}\;C \leq -2.1 \cdot 10^{+69}:\\
\;\;\;\;\frac{\sqrt{C \cdot \left(A \cdot \left(\left(A \cdot F\right) \cdot \left(0 - 16\right) - \frac{\left(F \cdot \left(B\_m \cdot B\_m\right)\right) \cdot -8}{C}\right)\right)}}{t\_0}\\
\mathbf{elif}\;C \leq 2.3 \cdot 10^{-145}:\\
\;\;\;\;\frac{\sqrt{\left(B\_m \cdot \left(B\_m \cdot F\right)\right) \cdot \left(2 \cdot B\_m\right)}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(C \cdot \left(4 \cdot F\right)\right)} \cdot \frac{1}{A \cdot \left(4 \cdot C\right) - B\_m \cdot B\_m}\\
\end{array}
\end{array}
if C < -2.10000000000000015e69Initial program 0.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified1.1%
Taylor expanded in C around -inf
associate-*r*N/A
mul-1-negN/A
*-lowering-*.f64N/A
neg-lowering-neg.f64N/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-*.f64N/A
unpow2N/A
*-lowering-*.f6411.9%
Simplified11.9%
Taylor expanded in A around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6417.4%
Simplified17.4%
if -2.10000000000000015e69 < C < 2.30000000000000007e-145Initial program 33.2%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified36.8%
Taylor expanded in B around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6410.0%
Simplified10.0%
associate-*l*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6411.1%
Applied egg-rr11.1%
if 2.30000000000000007e-145 < C Initial program 30.0%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified37.0%
Applied egg-rr18.7%
Taylor expanded in A around -inf
*-lowering-*.f6413.3%
Simplified13.3%
div-invN/A
associate-*l*N/A
Applied egg-rr30.1%
Final simplification18.7%
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 (<= C -7.5e+69)
(/ (sqrt (* (- 0.0 C) (* 16.0 (* F (* A A))))) t_0)
(if (<= C 6.2e-146)
(/ (sqrt (* (* B_m (* B_m F)) (* 2.0 B_m))) t_0)
(*
(sqrt (* (+ (* B_m B_m) (* -4.0 (* A C))) (* C (* 4.0 F))))
(/ 1.0 (- (* A (* 4.0 C)) (* B_m B_m))))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (C <= -7.5e+69) {
tmp = sqrt(((0.0 - C) * (16.0 * (F * (A * A))))) / t_0;
} else if (C <= 6.2e-146) {
tmp = sqrt(((B_m * (B_m * F)) * (2.0 * B_m))) / t_0;
} else {
tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (C * (4.0 * F)))) * (1.0 / ((A * (4.0 * C)) - (B_m * B_m)));
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: t_0
real(8) :: tmp
t_0 = ((4.0d0 * a) * c) - (b_m * b_m)
if (c <= (-7.5d+69)) then
tmp = sqrt(((0.0d0 - c) * (16.0d0 * (f * (a * a))))) / t_0
else if (c <= 6.2d-146) then
tmp = sqrt(((b_m * (b_m * f)) * (2.0d0 * b_m))) / t_0
else
tmp = sqrt((((b_m * b_m) + ((-4.0d0) * (a * c))) * (c * (4.0d0 * f)))) * (1.0d0 / ((a * (4.0d0 * c)) - (b_m * b_m)))
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (C <= -7.5e+69) {
tmp = Math.sqrt(((0.0 - C) * (16.0 * (F * (A * A))))) / t_0;
} else if (C <= 6.2e-146) {
tmp = Math.sqrt(((B_m * (B_m * F)) * (2.0 * B_m))) / t_0;
} else {
tmp = Math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (C * (4.0 * F)))) * (1.0 / ((A * (4.0 * C)) - (B_m * B_m)));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = ((4.0 * A) * C) - (B_m * B_m) tmp = 0 if C <= -7.5e+69: tmp = math.sqrt(((0.0 - C) * (16.0 * (F * (A * A))))) / t_0 elif C <= 6.2e-146: tmp = math.sqrt(((B_m * (B_m * F)) * (2.0 * B_m))) / t_0 else: tmp = math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (C * (4.0 * F)))) * (1.0 / ((A * (4.0 * C)) - (B_m * B_m))) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m)) tmp = 0.0 if (C <= -7.5e+69) tmp = Float64(sqrt(Float64(Float64(0.0 - C) * Float64(16.0 * Float64(F * Float64(A * A))))) / t_0); elseif (C <= 6.2e-146) tmp = Float64(sqrt(Float64(Float64(B_m * Float64(B_m * F)) * Float64(2.0 * B_m))) / t_0); else tmp = Float64(sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(C * Float64(4.0 * F)))) * Float64(1.0 / Float64(Float64(A * Float64(4.0 * C)) - Float64(B_m * B_m)))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = ((4.0 * A) * C) - (B_m * B_m); tmp = 0.0; if (C <= -7.5e+69) tmp = sqrt(((0.0 - C) * (16.0 * (F * (A * A))))) / t_0; elseif (C <= 6.2e-146) tmp = sqrt(((B_m * (B_m * F)) * (2.0 * B_m))) / t_0; else tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (C * (4.0 * F)))) * (1.0 / ((A * (4.0 * C)) - (B_m * B_m))); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -7.5e+69], N[(N[Sqrt[N[(N[(0.0 - C), $MachinePrecision] * N[(16.0 * N[(F * N[(A * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[C, 6.2e-146], N[(N[Sqrt[N[(N[(B$95$m * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision] * N[(2.0 * B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[Sqrt[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(C * N[(4.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / N[(N[(A * N[(4.0 * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := \left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\
\mathbf{if}\;C \leq -7.5 \cdot 10^{+69}:\\
\;\;\;\;\frac{\sqrt{\left(0 - C\right) \cdot \left(16 \cdot \left(F \cdot \left(A \cdot A\right)\right)\right)}}{t\_0}\\
\mathbf{elif}\;C \leq 6.2 \cdot 10^{-146}:\\
\;\;\;\;\frac{\sqrt{\left(B\_m \cdot \left(B\_m \cdot F\right)\right) \cdot \left(2 \cdot B\_m\right)}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(C \cdot \left(4 \cdot F\right)\right)} \cdot \frac{1}{A \cdot \left(4 \cdot C\right) - B\_m \cdot B\_m}\\
\end{array}
\end{array}
if C < -7.49999999999999939e69Initial program 0.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified1.1%
Taylor expanded in C around -inf
associate-*r*N/A
mul-1-negN/A
*-lowering-*.f64N/A
neg-lowering-neg.f64N/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-*.f64N/A
unpow2N/A
*-lowering-*.f6411.9%
Simplified11.9%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6413.1%
Simplified13.1%
if -7.49999999999999939e69 < C < 6.1999999999999997e-146Initial program 33.2%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified36.8%
Taylor expanded in B around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6410.0%
Simplified10.0%
associate-*l*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6411.1%
Applied egg-rr11.1%
if 6.1999999999999997e-146 < C Initial program 30.0%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified37.0%
Applied egg-rr18.7%
Taylor expanded in A around -inf
*-lowering-*.f6413.3%
Simplified13.3%
div-invN/A
associate-*l*N/A
Applied egg-rr30.1%
Final simplification17.8%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (- (* (* 4.0 A) C) (* B_m B_m))))
(if (<= A -4.9e-14)
(/ (sqrt (* (* A -16.0) (* F (* C C)))) t_0)
(if (<= A 1.8e-49)
(/ (sqrt (* (* B_m (* B_m F)) (* 2.0 B_m))) t_0)
(/ (sqrt (* (- 0.0 C) (* 16.0 (* F (* A A))))) 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 <= -4.9e-14) {
tmp = sqrt(((A * -16.0) * (F * (C * C)))) / t_0;
} else if (A <= 1.8e-49) {
tmp = sqrt(((B_m * (B_m * F)) * (2.0 * B_m))) / t_0;
} else {
tmp = sqrt(((0.0 - C) * (16.0 * (F * (A * A))))) / t_0;
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: t_0
real(8) :: tmp
t_0 = ((4.0d0 * a) * c) - (b_m * b_m)
if (a <= (-4.9d-14)) then
tmp = sqrt(((a * (-16.0d0)) * (f * (c * c)))) / t_0
else if (a <= 1.8d-49) then
tmp = sqrt(((b_m * (b_m * f)) * (2.0d0 * b_m))) / t_0
else
tmp = sqrt(((0.0d0 - c) * (16.0d0 * (f * (a * a))))) / t_0
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (A <= -4.9e-14) {
tmp = Math.sqrt(((A * -16.0) * (F * (C * C)))) / t_0;
} else if (A <= 1.8e-49) {
tmp = Math.sqrt(((B_m * (B_m * F)) * (2.0 * B_m))) / t_0;
} else {
tmp = Math.sqrt(((0.0 - C) * (16.0 * (F * (A * A))))) / 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 <= -4.9e-14: tmp = math.sqrt(((A * -16.0) * (F * (C * C)))) / t_0 elif A <= 1.8e-49: tmp = math.sqrt(((B_m * (B_m * F)) * (2.0 * B_m))) / t_0 else: tmp = math.sqrt(((0.0 - C) * (16.0 * (F * (A * A))))) / 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 <= -4.9e-14) tmp = Float64(sqrt(Float64(Float64(A * -16.0) * Float64(F * Float64(C * C)))) / t_0); elseif (A <= 1.8e-49) tmp = Float64(sqrt(Float64(Float64(B_m * Float64(B_m * F)) * Float64(2.0 * B_m))) / t_0); else tmp = Float64(sqrt(Float64(Float64(0.0 - C) * Float64(16.0 * Float64(F * Float64(A * A))))) / 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 <= -4.9e-14) tmp = sqrt(((A * -16.0) * (F * (C * C)))) / t_0; elseif (A <= 1.8e-49) tmp = sqrt(((B_m * (B_m * F)) * (2.0 * B_m))) / t_0; else tmp = sqrt(((0.0 - C) * (16.0 * (F * (A * A))))) / t_0; end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, -4.9e-14], N[(N[Sqrt[N[(N[(A * -16.0), $MachinePrecision] * N[(F * N[(C * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[A, 1.8e-49], N[(N[Sqrt[N[(N[(B$95$m * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision] * N[(2.0 * B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[Sqrt[N[(N[(0.0 - C), $MachinePrecision] * N[(16.0 * N[(F * N[(A * A), $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 -4.9 \cdot 10^{-14}:\\
\;\;\;\;\frac{\sqrt{\left(A \cdot -16\right) \cdot \left(F \cdot \left(C \cdot C\right)\right)}}{t\_0}\\
\mathbf{elif}\;A \leq 1.8 \cdot 10^{-49}:\\
\;\;\;\;\frac{\sqrt{\left(B\_m \cdot \left(B\_m \cdot F\right)\right) \cdot \left(2 \cdot B\_m\right)}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{\left(0 - C\right) \cdot \left(16 \cdot \left(F \cdot \left(A \cdot A\right)\right)\right)}}{t\_0}\\
\end{array}
\end{array}
if A < -4.89999999999999995e-14Initial program 7.8%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified11.7%
Taylor expanded in A around -inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6419.4%
Simplified19.4%
if -4.89999999999999995e-14 < A < 1.79999999999999985e-49Initial program 39.0%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified40.8%
Taylor expanded in B around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6410.6%
Simplified10.6%
associate-*l*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6411.8%
Applied egg-rr11.8%
if 1.79999999999999985e-49 < A Initial program 20.4%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified27.3%
Taylor expanded in C around -inf
associate-*r*N/A
mul-1-negN/A
*-lowering-*.f64N/A
neg-lowering-neg.f64N/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-*.f64N/A
unpow2N/A
*-lowering-*.f6413.6%
Simplified13.6%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6413.2%
Simplified13.2%
Final simplification14.1%
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 5.3e-82)
(/ (sqrt (* (* A -16.0) (* F (* C C)))) t_0)
(/ (sqrt (* (* B_m (* B_m F)) (* 2.0 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 <= 5.3e-82) {
tmp = sqrt(((A * -16.0) * (F * (C * C)))) / t_0;
} else {
tmp = sqrt(((B_m * (B_m * F)) * (2.0 * 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 <= 5.3d-82) then
tmp = sqrt(((a * (-16.0d0)) * (f * (c * c)))) / t_0
else
tmp = sqrt(((b_m * (b_m * f)) * (2.0d0 * 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 <= 5.3e-82) {
tmp = Math.sqrt(((A * -16.0) * (F * (C * C)))) / t_0;
} else {
tmp = Math.sqrt(((B_m * (B_m * F)) * (2.0 * 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 <= 5.3e-82: tmp = math.sqrt(((A * -16.0) * (F * (C * C)))) / t_0 else: tmp = math.sqrt(((B_m * (B_m * F)) * (2.0 * 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 <= 5.3e-82) tmp = Float64(sqrt(Float64(Float64(A * -16.0) * Float64(F * Float64(C * C)))) / t_0); else tmp = Float64(sqrt(Float64(Float64(B_m * Float64(B_m * F)) * Float64(2.0 * 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 <= 5.3e-82) tmp = sqrt(((A * -16.0) * (F * (C * C)))) / t_0; else tmp = sqrt(((B_m * (B_m * F)) * (2.0 * 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, 5.3e-82], 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[(N[(B$95$m * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision] * N[(2.0 * B$95$m), $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 5.3 \cdot 10^{-82}:\\
\;\;\;\;\frac{\sqrt{\left(A \cdot -16\right) \cdot \left(F \cdot \left(C \cdot C\right)\right)}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{\left(B\_m \cdot \left(B\_m \cdot F\right)\right) \cdot \left(2 \cdot B\_m\right)}}{t\_0}\\
\end{array}
\end{array}
if B < 5.29999999999999956e-82Initial program 26.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified32.3%
Taylor expanded in A around -inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6412.1%
Simplified12.1%
if 5.29999999999999956e-82 < B Initial program 23.0%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified24.1%
Taylor expanded in B around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6415.4%
Simplified15.4%
associate-*l*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6416.7%
Applied egg-rr16.7%
Final simplification13.7%
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 3.1e-82)
(/ (sqrt (* (* A -16.0) (* F (* C C)))) t_0)
(/ (sqrt (* 2.0 (* (* B_m B_m) (* B_m F)))) t_0))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (B_m <= 3.1e-82) {
tmp = sqrt(((A * -16.0) * (F * (C * C)))) / t_0;
} else {
tmp = sqrt((2.0 * ((B_m * B_m) * (B_m * F)))) / t_0;
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: t_0
real(8) :: tmp
t_0 = ((4.0d0 * a) * c) - (b_m * b_m)
if (b_m <= 3.1d-82) then
tmp = sqrt(((a * (-16.0d0)) * (f * (c * c)))) / t_0
else
tmp = sqrt((2.0d0 * ((b_m * b_m) * (b_m * f)))) / t_0
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (B_m <= 3.1e-82) {
tmp = Math.sqrt(((A * -16.0) * (F * (C * C)))) / t_0;
} else {
tmp = Math.sqrt((2.0 * ((B_m * B_m) * (B_m * F)))) / t_0;
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = ((4.0 * A) * C) - (B_m * B_m) tmp = 0 if B_m <= 3.1e-82: tmp = math.sqrt(((A * -16.0) * (F * (C * C)))) / t_0 else: tmp = math.sqrt((2.0 * ((B_m * B_m) * (B_m * F)))) / t_0 return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m)) tmp = 0.0 if (B_m <= 3.1e-82) tmp = Float64(sqrt(Float64(Float64(A * -16.0) * Float64(F * Float64(C * C)))) / t_0); else tmp = Float64(sqrt(Float64(2.0 * Float64(Float64(B_m * B_m) * Float64(B_m * F)))) / t_0); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = ((4.0 * A) * C) - (B_m * B_m); tmp = 0.0; if (B_m <= 3.1e-82) tmp = sqrt(((A * -16.0) * (F * (C * C)))) / t_0; else tmp = sqrt((2.0 * ((B_m * B_m) * (B_m * F)))) / t_0; end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 3.1e-82], 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[(N[(B$95$m * B$95$m), $MachinePrecision] * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := \left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\
\mathbf{if}\;B\_m \leq 3.1 \cdot 10^{-82}:\\
\;\;\;\;\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(\left(B\_m \cdot B\_m\right) \cdot \left(B\_m \cdot F\right)\right)}}{t\_0}\\
\end{array}
\end{array}
if B < 3.1e-82Initial program 26.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified32.3%
Taylor expanded in A around -inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6412.1%
Simplified12.1%
if 3.1e-82 < B Initial program 23.0%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified24.1%
Taylor expanded in B around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6415.4%
Simplified15.4%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6416.5%
Applied egg-rr16.5%
Final simplification13.7%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= C 3900.0) (/ (sqrt (* 2.0 (* (* B_m B_m) (* B_m F)))) (- (* (* 4.0 A) C) (* B_m B_m))) (* (* -2.0 (/ 1.0 B_m)) (pow (* C F) 0.5))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (C <= 3900.0) {
tmp = sqrt((2.0 * ((B_m * B_m) * (B_m * F)))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = (-2.0 * (1.0 / B_m)) * pow((C * F), 0.5);
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if (c <= 3900.0d0) then
tmp = sqrt((2.0d0 * ((b_m * b_m) * (b_m * f)))) / (((4.0d0 * a) * c) - (b_m * b_m))
else
tmp = ((-2.0d0) * (1.0d0 / b_m)) * ((c * f) ** 0.5d0)
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (C <= 3900.0) {
tmp = Math.sqrt((2.0 * ((B_m * B_m) * (B_m * F)))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = (-2.0 * (1.0 / B_m)) * Math.pow((C * F), 0.5);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if C <= 3900.0: tmp = math.sqrt((2.0 * ((B_m * B_m) * (B_m * F)))) / (((4.0 * A) * C) - (B_m * B_m)) else: tmp = (-2.0 * (1.0 / B_m)) * math.pow((C * F), 0.5) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (C <= 3900.0) tmp = Float64(sqrt(Float64(2.0 * Float64(Float64(B_m * B_m) * Float64(B_m * F)))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); else tmp = Float64(Float64(-2.0 * Float64(1.0 / B_m)) * (Float64(C * F) ^ 0.5)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (C <= 3900.0) tmp = sqrt((2.0 * ((B_m * B_m) * (B_m * F)))) / (((4.0 * A) * C) - (B_m * B_m)); else tmp = (-2.0 * (1.0 / B_m)) * ((C * F) ^ 0.5); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[C, 3900.0], N[(N[Sqrt[N[(2.0 * N[(N[(B$95$m * B$95$m), $MachinePrecision] * N[(B$95$m * F), $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[(-2.0 * N[(1.0 / B$95$m), $MachinePrecision]), $MachinePrecision] * N[Power[N[(C * F), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;C \leq 3900:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(\left(B\_m \cdot B\_m\right) \cdot \left(B\_m \cdot F\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\left(-2 \cdot \frac{1}{B\_m}\right) \cdot {\left(C \cdot F\right)}^{0.5}\\
\end{array}
\end{array}
if C < 3900Initial program 24.9%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified28.1%
Taylor expanded in B around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f647.6%
Simplified7.6%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f648.2%
Applied egg-rr8.2%
if 3900 < C Initial program 27.4%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified34.8%
Applied egg-rr12.2%
Taylor expanded in A around -inf
*-lowering-*.f6412.2%
Simplified12.2%
Taylor expanded in B around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f648.1%
Simplified8.1%
pow1/2N/A
pow-lowering-pow.f64N/A
*-commutativeN/A
*-lowering-*.f648.3%
Applied egg-rr8.3%
Final simplification8.2%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= C 1600000000.0) (/ (sqrt (* 2.0 (* F (* B_m (* B_m B_m))))) (- (* (* 4.0 A) C) (* B_m B_m))) (* (* -2.0 (/ 1.0 B_m)) (pow (* C F) 0.5))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (C <= 1600000000.0) {
tmp = sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = (-2.0 * (1.0 / B_m)) * pow((C * F), 0.5);
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if (c <= 1600000000.0d0) then
tmp = sqrt((2.0d0 * (f * (b_m * (b_m * b_m))))) / (((4.0d0 * a) * c) - (b_m * b_m))
else
tmp = ((-2.0d0) * (1.0d0 / b_m)) * ((c * f) ** 0.5d0)
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (C <= 1600000000.0) {
tmp = Math.sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = (-2.0 * (1.0 / B_m)) * Math.pow((C * F), 0.5);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if C <= 1600000000.0: tmp = math.sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / (((4.0 * A) * C) - (B_m * B_m)) else: tmp = (-2.0 * (1.0 / B_m)) * math.pow((C * F), 0.5) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (C <= 1600000000.0) tmp = 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))); else tmp = Float64(Float64(-2.0 * Float64(1.0 / B_m)) * (Float64(C * F) ^ 0.5)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (C <= 1600000000.0) tmp = sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / (((4.0 * A) * C) - (B_m * B_m)); else tmp = (-2.0 * (1.0 / B_m)) * ((C * F) ^ 0.5); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[C, 1600000000.0], 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], N[(N[(-2.0 * N[(1.0 / B$95$m), $MachinePrecision]), $MachinePrecision] * N[Power[N[(C * F), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;C \leq 1600000000:\\
\;\;\;\;\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}\\
\mathbf{else}:\\
\;\;\;\;\left(-2 \cdot \frac{1}{B\_m}\right) \cdot {\left(C \cdot F\right)}^{0.5}\\
\end{array}
\end{array}
if C < 1.6e9Initial program 24.9%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified28.1%
Taylor expanded in B around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f647.6%
Simplified7.6%
if 1.6e9 < C Initial program 27.4%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified34.8%
Applied egg-rr12.2%
Taylor expanded in A around -inf
*-lowering-*.f6412.2%
Simplified12.2%
Taylor expanded in B around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f648.1%
Simplified8.1%
pow1/2N/A
pow-lowering-pow.f64N/A
*-commutativeN/A
*-lowering-*.f648.3%
Applied egg-rr8.3%
Final simplification7.7%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= C 5000000000000.0) (/ (sqrt (* 2.0 (* F (* B_m (* B_m B_m))))) (- 0.0 (* B_m B_m))) (* (* -2.0 (/ 1.0 B_m)) (pow (* C F) 0.5))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (C <= 5000000000000.0) {
tmp = sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / (0.0 - (B_m * B_m));
} else {
tmp = (-2.0 * (1.0 / B_m)) * pow((C * F), 0.5);
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if (c <= 5000000000000.0d0) then
tmp = sqrt((2.0d0 * (f * (b_m * (b_m * b_m))))) / (0.0d0 - (b_m * b_m))
else
tmp = ((-2.0d0) * (1.0d0 / b_m)) * ((c * f) ** 0.5d0)
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (C <= 5000000000000.0) {
tmp = Math.sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / (0.0 - (B_m * B_m));
} else {
tmp = (-2.0 * (1.0 / B_m)) * Math.pow((C * F), 0.5);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if C <= 5000000000000.0: tmp = math.sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / (0.0 - (B_m * B_m)) else: tmp = (-2.0 * (1.0 / B_m)) * math.pow((C * F), 0.5) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (C <= 5000000000000.0) tmp = Float64(sqrt(Float64(2.0 * Float64(F * Float64(B_m * Float64(B_m * B_m))))) / Float64(0.0 - Float64(B_m * B_m))); else tmp = Float64(Float64(-2.0 * Float64(1.0 / B_m)) * (Float64(C * F) ^ 0.5)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (C <= 5000000000000.0) tmp = sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / (0.0 - (B_m * B_m)); else tmp = (-2.0 * (1.0 / B_m)) * ((C * F) ^ 0.5); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[C, 5000000000000.0], 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[(0.0 - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-2.0 * N[(1.0 / B$95$m), $MachinePrecision]), $MachinePrecision] * N[Power[N[(C * F), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;C \leq 5000000000000:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(B\_m \cdot \left(B\_m \cdot B\_m\right)\right)\right)}}{0 - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\left(-2 \cdot \frac{1}{B\_m}\right) \cdot {\left(C \cdot F\right)}^{0.5}\\
\end{array}
\end{array}
if C < 5e12Initial program 24.9%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified28.1%
Taylor expanded in B around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f647.6%
Simplified7.6%
Taylor expanded in A around 0
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f647.0%
Simplified7.0%
if 5e12 < C Initial program 27.4%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified34.8%
Applied egg-rr12.2%
Taylor expanded in A around -inf
*-lowering-*.f6412.2%
Simplified12.2%
Taylor expanded in B around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f648.1%
Simplified8.1%
pow1/2N/A
pow-lowering-pow.f64N/A
*-commutativeN/A
*-lowering-*.f648.3%
Applied egg-rr8.3%
Final simplification7.3%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (* (* -2.0 (/ 1.0 B_m)) (pow (* (* C F) (* C F)) 0.25)))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
return (-2.0 * (1.0 / B_m)) * pow(((C * F) * (C * 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 = ((-2.0d0) * (1.0d0 / b_m)) * (((c * f) * (c * f)) ** 0.25d0)
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
return (-2.0 * (1.0 / B_m)) * Math.pow(((C * F) * (C * F)), 0.25);
}
B_m = math.fabs(B) def code(A, B_m, C, F): return (-2.0 * (1.0 / B_m)) * math.pow(((C * F) * (C * F)), 0.25)
B_m = abs(B) function code(A, B_m, C, F) return Float64(Float64(-2.0 * Float64(1.0 / B_m)) * (Float64(Float64(C * F) * Float64(C * F)) ^ 0.25)) end
B_m = abs(B); function tmp = code(A, B_m, C, F) tmp = (-2.0 * (1.0 / B_m)) * (((C * F) * (C * F)) ^ 0.25); end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := N[(N[(-2.0 * N[(1.0 / B$95$m), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(C * F), $MachinePrecision] * N[(C * F), $MachinePrecision]), $MachinePrecision], 0.25], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|
\\
\left(-2 \cdot \frac{1}{B\_m}\right) \cdot {\left(\left(C \cdot F\right) \cdot \left(C \cdot F\right)\right)}^{0.25}
\end{array}
Initial program 25.4%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified29.5%
Applied egg-rr16.9%
Taylor expanded in A around -inf
*-lowering-*.f645.2%
Simplified5.2%
Taylor expanded in B around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f643.2%
Simplified3.2%
pow1/2N/A
metadata-evalN/A
pow-prod-upN/A
pow-prod-downN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f644.8%
Applied egg-rr4.8%
Final simplification4.8%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (* (* -2.0 (/ 1.0 B_m)) (pow (* C F) 0.5)))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
return (-2.0 * (1.0 / B_m)) * pow((C * F), 0.5);
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
code = ((-2.0d0) * (1.0d0 / b_m)) * ((c * f) ** 0.5d0)
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
return (-2.0 * (1.0 / B_m)) * Math.pow((C * F), 0.5);
}
B_m = math.fabs(B) def code(A, B_m, C, F): return (-2.0 * (1.0 / B_m)) * math.pow((C * F), 0.5)
B_m = abs(B) function code(A, B_m, C, F) return Float64(Float64(-2.0 * Float64(1.0 / B_m)) * (Float64(C * F) ^ 0.5)) end
B_m = abs(B); function tmp = code(A, B_m, C, F) tmp = (-2.0 * (1.0 / B_m)) * ((C * F) ^ 0.5); end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := N[(N[(-2.0 * N[(1.0 / B$95$m), $MachinePrecision]), $MachinePrecision] * N[Power[N[(C * F), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|
\\
\left(-2 \cdot \frac{1}{B\_m}\right) \cdot {\left(C \cdot F\right)}^{0.5}
\end{array}
Initial program 25.4%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified29.5%
Applied egg-rr16.9%
Taylor expanded in A around -inf
*-lowering-*.f645.2%
Simplified5.2%
Taylor expanded in B around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f643.2%
Simplified3.2%
pow1/2N/A
pow-lowering-pow.f64N/A
*-commutativeN/A
*-lowering-*.f643.4%
Applied egg-rr3.4%
Final simplification3.4%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (* (/ -2.0 B_m) (sqrt (* C F))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
return (-2.0 / B_m) * sqrt((C * F));
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
code = ((-2.0d0) / b_m) * sqrt((c * f))
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
return (-2.0 / B_m) * Math.sqrt((C * F));
}
B_m = math.fabs(B) def code(A, B_m, C, F): return (-2.0 / B_m) * math.sqrt((C * F))
B_m = abs(B) function code(A, B_m, C, F) return Float64(Float64(-2.0 / B_m) * sqrt(Float64(C * F))) end
B_m = abs(B); function tmp = code(A, B_m, C, F) tmp = (-2.0 / B_m) * sqrt((C * F)); end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := N[(N[(-2.0 / B$95$m), $MachinePrecision] * N[Sqrt[N[(C * F), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|
\\
\frac{-2}{B\_m} \cdot \sqrt{C \cdot F}
\end{array}
Initial program 25.4%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified29.5%
Applied egg-rr16.9%
Taylor expanded in A around -inf
*-lowering-*.f645.2%
Simplified5.2%
Taylor expanded in B around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f643.2%
Simplified3.2%
*-lowering-*.f64N/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f643.2%
Applied egg-rr3.2%
Final simplification3.2%
herbie shell --seed 2024158
(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))))