
(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 15 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) (* A (* C -4.0))))
(t_1 (- A (- (hypot B_m (- A C)) C)))
(t_2 (* (* 4.0 A) C))
(t_3
(/
(sqrt
(*
(* 2.0 (* (- (pow B_m 2.0) t_2) F))
(- (+ A C) (sqrt (+ (pow B_m 2.0) (pow (- A C) 2.0))))))
(- t_2 (pow B_m 2.0)))))
(if (<= t_3 (- INFINITY))
(*
(sqrt (* F (/ t_1 (+ (* B_m B_m) (* -4.0 (* A C))))))
(- 0.0 (sqrt 2.0)))
(if (<= t_3 0.0)
(*
(sqrt t_0)
(/ (sqrt (* t_1 (* 2.0 F))) (- (* A (* 4.0 C)) (* B_m B_m))))
(if (<= t_3 INFINITY)
(/
(* (pow (* 2.0 F) 0.5) (sqrt (* t_1 t_0)))
(- (* 4.0 (* A C)) (* B_m B_m)))
(/ (* (sqrt (- 0.0 (* 2.0 F))) (sqrt B_m)) (- 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) + (A * (C * -4.0));
double t_1 = A - (hypot(B_m, (A - C)) - C);
double t_2 = (4.0 * A) * C;
double t_3 = sqrt(((2.0 * ((pow(B_m, 2.0) - t_2) * F)) * ((A + C) - sqrt((pow(B_m, 2.0) + pow((A - C), 2.0)))))) / (t_2 - pow(B_m, 2.0));
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = sqrt((F * (t_1 / ((B_m * B_m) + (-4.0 * (A * C)))))) * (0.0 - sqrt(2.0));
} else if (t_3 <= 0.0) {
tmp = sqrt(t_0) * (sqrt((t_1 * (2.0 * F))) / ((A * (4.0 * C)) - (B_m * B_m)));
} else if (t_3 <= ((double) INFINITY)) {
tmp = (pow((2.0 * F), 0.5) * sqrt((t_1 * t_0))) / ((4.0 * (A * C)) - (B_m * B_m));
} else {
tmp = (sqrt((0.0 - (2.0 * F))) * sqrt(B_m)) / (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) + (A * (C * -4.0));
double t_1 = A - (Math.hypot(B_m, (A - C)) - C);
double t_2 = (4.0 * A) * C;
double t_3 = Math.sqrt(((2.0 * ((Math.pow(B_m, 2.0) - t_2) * F)) * ((A + C) - Math.sqrt((Math.pow(B_m, 2.0) + Math.pow((A - C), 2.0)))))) / (t_2 - Math.pow(B_m, 2.0));
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((F * (t_1 / ((B_m * B_m) + (-4.0 * (A * C)))))) * (0.0 - Math.sqrt(2.0));
} else if (t_3 <= 0.0) {
tmp = Math.sqrt(t_0) * (Math.sqrt((t_1 * (2.0 * F))) / ((A * (4.0 * C)) - (B_m * B_m)));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = (Math.pow((2.0 * F), 0.5) * Math.sqrt((t_1 * t_0))) / ((4.0 * (A * C)) - (B_m * B_m));
} else {
tmp = (Math.sqrt((0.0 - (2.0 * F))) * Math.sqrt(B_m)) / (0.0 - B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = (B_m * B_m) + (A * (C * -4.0)) t_1 = A - (math.hypot(B_m, (A - C)) - C) t_2 = (4.0 * A) * C t_3 = math.sqrt(((2.0 * ((math.pow(B_m, 2.0) - t_2) * F)) * ((A + C) - math.sqrt((math.pow(B_m, 2.0) + math.pow((A - C), 2.0)))))) / (t_2 - math.pow(B_m, 2.0)) tmp = 0 if t_3 <= -math.inf: tmp = math.sqrt((F * (t_1 / ((B_m * B_m) + (-4.0 * (A * C)))))) * (0.0 - math.sqrt(2.0)) elif t_3 <= 0.0: tmp = math.sqrt(t_0) * (math.sqrt((t_1 * (2.0 * F))) / ((A * (4.0 * C)) - (B_m * B_m))) elif t_3 <= math.inf: tmp = (math.pow((2.0 * F), 0.5) * math.sqrt((t_1 * t_0))) / ((4.0 * (A * C)) - (B_m * B_m)) else: tmp = (math.sqrt((0.0 - (2.0 * F))) * math.sqrt(B_m)) / (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(A * Float64(C * -4.0))) t_1 = Float64(A - Float64(hypot(B_m, Float64(A - C)) - C)) t_2 = Float64(Float64(4.0 * A) * C) t_3 = Float64(sqrt(Float64(Float64(2.0 * Float64(Float64((B_m ^ 2.0) - t_2) * F)) * Float64(Float64(A + C) - sqrt(Float64((B_m ^ 2.0) + (Float64(A - C) ^ 2.0)))))) / Float64(t_2 - (B_m ^ 2.0))) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(sqrt(Float64(F * Float64(t_1 / Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C)))))) * Float64(0.0 - sqrt(2.0))); elseif (t_3 <= 0.0) tmp = Float64(sqrt(t_0) * Float64(sqrt(Float64(t_1 * Float64(2.0 * F))) / Float64(Float64(A * Float64(4.0 * C)) - Float64(B_m * B_m)))); elseif (t_3 <= Inf) tmp = Float64(Float64((Float64(2.0 * F) ^ 0.5) * sqrt(Float64(t_1 * t_0))) / Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m))); else tmp = Float64(Float64(sqrt(Float64(0.0 - Float64(2.0 * F))) * sqrt(B_m)) / 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) + (A * (C * -4.0)); t_1 = A - (hypot(B_m, (A - C)) - C); t_2 = (4.0 * A) * C; t_3 = sqrt(((2.0 * (((B_m ^ 2.0) - t_2) * F)) * ((A + C) - sqrt(((B_m ^ 2.0) + ((A - C) ^ 2.0)))))) / (t_2 - (B_m ^ 2.0)); tmp = 0.0; if (t_3 <= -Inf) tmp = sqrt((F * (t_1 / ((B_m * B_m) + (-4.0 * (A * C)))))) * (0.0 - sqrt(2.0)); elseif (t_3 <= 0.0) tmp = sqrt(t_0) * (sqrt((t_1 * (2.0 * F))) / ((A * (4.0 * C)) - (B_m * B_m))); elseif (t_3 <= Inf) tmp = (((2.0 * F) ^ 0.5) * sqrt((t_1 * t_0))) / ((4.0 * (A * C)) - (B_m * B_m)); else tmp = (sqrt((0.0 - (2.0 * F))) * sqrt(B_m)) / (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[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(A - N[(N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision] - C), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[N[(N[(2.0 * N[(N[(N[Power[B$95$m, 2.0], $MachinePrecision] - t$95$2), $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] - N[Sqrt[N[(N[Power[B$95$m, 2.0], $MachinePrecision] + N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(t$95$2 - N[Power[B$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(N[Sqrt[N[(F * N[(t$95$1 / N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(0.0 - N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[t$95$0], $MachinePrecision] * N[(N[Sqrt[N[(t$95$1 * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(A * N[(4.0 * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(N[(N[Power[N[(2.0 * F), $MachinePrecision], 0.5], $MachinePrecision] * N[Sqrt[N[(t$95$1 * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(0.0 - N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[B$95$m], $MachinePrecision]), $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := B\_m \cdot B\_m + A \cdot \left(C \cdot -4\right)\\
t_1 := A - \left(\mathsf{hypot}\left(B\_m, A - C\right) - C\right)\\
t_2 := \left(4 \cdot A\right) \cdot C\\
t_3 := \frac{\sqrt{\left(2 \cdot \left(\left({B\_m}^{2} - t\_2\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{B\_m}^{2} + {\left(A - C\right)}^{2}}\right)}}{t\_2 - {B\_m}^{2}}\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;\sqrt{F \cdot \frac{t\_1}{B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)}} \cdot \left(0 - \sqrt{2}\right)\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;\sqrt{t\_0} \cdot \frac{\sqrt{t\_1 \cdot \left(2 \cdot F\right)}}{A \cdot \left(4 \cdot C\right) - B\_m \cdot B\_m}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\frac{{\left(2 \cdot F\right)}^{0.5} \cdot \sqrt{t\_1 \cdot t\_0}}{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{0 - 2 \cdot F} \cdot \sqrt{B\_m}}{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))) < -inf.0Initial program 3.1%
Taylor expanded in F around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
Simplified58.1%
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))) < 0.0Initial program 52.2%
Simplified55.1%
Applied egg-rr59.4%
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 41.3%
Simplified54.0%
Applied egg-rr66.0%
if +inf.0 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 #s(literal 2 binary64) (*.f64 (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C)) F)) (-.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))))) (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C))) Initial program 0.0%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6418.8%
Simplified18.8%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6418.0%
Simplified18.0%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
pow1/2N/A
pow1/2N/A
pow-prod-downN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6418.0%
Applied egg-rr18.0%
unpow1/2N/A
*-commutativeN/A
associate-*r*N/A
sqrt-prodN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f6426.8%
Applied egg-rr26.8%
Final simplification45.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 4.3e-181)
(/ (sqrt (* -16.0 (* C (* F (* A C))))) t_0)
(if (<= B_m 3.7e+86)
(/
(sqrt
(*
(+ (* B_m B_m) (* -4.0 (* A C)))
(* (- A (- (hypot B_m (- A C)) C)) (* 2.0 F))))
t_0)
(/ (* (sqrt (- 0.0 (* 2.0 F))) (sqrt B_m)) (- 0.0 B_m))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = (4.0 * (A * C)) - (B_m * B_m);
double tmp;
if (B_m <= 4.3e-181) {
tmp = sqrt((-16.0 * (C * (F * (A * C))))) / t_0;
} else if (B_m <= 3.7e+86) {
tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((A - (hypot(B_m, (A - C)) - C)) * (2.0 * F)))) / t_0;
} else {
tmp = (sqrt((0.0 - (2.0 * F))) * sqrt(B_m)) / (0.0 - B_m);
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = (4.0 * (A * C)) - (B_m * B_m);
double tmp;
if (B_m <= 4.3e-181) {
tmp = Math.sqrt((-16.0 * (C * (F * (A * C))))) / t_0;
} else if (B_m <= 3.7e+86) {
tmp = Math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((A - (Math.hypot(B_m, (A - C)) - C)) * (2.0 * F)))) / t_0;
} else {
tmp = (Math.sqrt((0.0 - (2.0 * F))) * Math.sqrt(B_m)) / (0.0 - B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = (4.0 * (A * C)) - (B_m * B_m) tmp = 0 if B_m <= 4.3e-181: tmp = math.sqrt((-16.0 * (C * (F * (A * C))))) / t_0 elif B_m <= 3.7e+86: tmp = math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((A - (math.hypot(B_m, (A - C)) - C)) * (2.0 * F)))) / t_0 else: tmp = (math.sqrt((0.0 - (2.0 * F))) * math.sqrt(B_m)) / (0.0 - B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m)) tmp = 0.0 if (B_m <= 4.3e-181) tmp = Float64(sqrt(Float64(-16.0 * Float64(C * Float64(F * Float64(A * C))))) / t_0); elseif (B_m <= 3.7e+86) tmp = Float64(sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(Float64(A - Float64(hypot(B_m, Float64(A - C)) - C)) * Float64(2.0 * F)))) / t_0); else tmp = Float64(Float64(sqrt(Float64(0.0 - Float64(2.0 * F))) * sqrt(B_m)) / Float64(0.0 - B_m)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = (4.0 * (A * C)) - (B_m * B_m); tmp = 0.0; if (B_m <= 4.3e-181) tmp = sqrt((-16.0 * (C * (F * (A * C))))) / t_0; elseif (B_m <= 3.7e+86) tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((A - (hypot(B_m, (A - C)) - C)) * (2.0 * F)))) / t_0; else tmp = (sqrt((0.0 - (2.0 * F))) * sqrt(B_m)) / (0.0 - B_m); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 4.3e-181], N[(N[Sqrt[N[(-16.0 * N[(C * N[(F * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[B$95$m, 3.7e+86], N[(N[Sqrt[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(A - N[(N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision] - C), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(N[Sqrt[N[(0.0 - N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[B$95$m], $MachinePrecision]), $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := 4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m\\
\mathbf{if}\;B\_m \leq 4.3 \cdot 10^{-181}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(C \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)}}{t\_0}\\
\mathbf{elif}\;B\_m \leq 3.7 \cdot 10^{+86}:\\
\;\;\;\;\frac{\sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(\left(A - \left(\mathsf{hypot}\left(B\_m, A - C\right) - C\right)\right) \cdot \left(2 \cdot F\right)\right)}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{0 - 2 \cdot F} \cdot \sqrt{B\_m}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 4.3e-181Initial program 16.9%
Simplified23.3%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6411.9%
Simplified11.9%
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6417.1%
Applied egg-rr17.1%
if 4.3e-181 < B < 3.69999999999999992e86Initial program 35.0%
Simplified45.6%
if 3.69999999999999992e86 < B Initial program 7.9%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6453.1%
Simplified53.1%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6451.7%
Simplified51.7%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
pow1/2N/A
pow1/2N/A
pow-prod-downN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6451.6%
Applied egg-rr51.6%
unpow1/2N/A
*-commutativeN/A
associate-*r*N/A
sqrt-prodN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f6471.8%
Applied egg-rr71.8%
Final simplification34.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 5.8e-181)
(/ (sqrt (* -16.0 (* C (* F (* A C))))) t_0)
(if (<= B_m 2.9e+86)
(/
(sqrt
(*
(- A (- (hypot B_m (- A C)) C))
(* (+ (* B_m B_m) (* A (* C -4.0))) (* 2.0 F))))
t_0)
(/ (* (sqrt (- 0.0 (* 2.0 F))) (sqrt B_m)) (- 0.0 B_m))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = (4.0 * (A * C)) - (B_m * B_m);
double tmp;
if (B_m <= 5.8e-181) {
tmp = sqrt((-16.0 * (C * (F * (A * C))))) / t_0;
} else if (B_m <= 2.9e+86) {
tmp = sqrt(((A - (hypot(B_m, (A - C)) - C)) * (((B_m * B_m) + (A * (C * -4.0))) * (2.0 * F)))) / t_0;
} else {
tmp = (sqrt((0.0 - (2.0 * F))) * sqrt(B_m)) / (0.0 - B_m);
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = (4.0 * (A * C)) - (B_m * B_m);
double tmp;
if (B_m <= 5.8e-181) {
tmp = Math.sqrt((-16.0 * (C * (F * (A * C))))) / t_0;
} else if (B_m <= 2.9e+86) {
tmp = Math.sqrt(((A - (Math.hypot(B_m, (A - C)) - C)) * (((B_m * B_m) + (A * (C * -4.0))) * (2.0 * F)))) / t_0;
} else {
tmp = (Math.sqrt((0.0 - (2.0 * F))) * Math.sqrt(B_m)) / (0.0 - B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = (4.0 * (A * C)) - (B_m * B_m) tmp = 0 if B_m <= 5.8e-181: tmp = math.sqrt((-16.0 * (C * (F * (A * C))))) / t_0 elif B_m <= 2.9e+86: tmp = math.sqrt(((A - (math.hypot(B_m, (A - C)) - C)) * (((B_m * B_m) + (A * (C * -4.0))) * (2.0 * F)))) / t_0 else: tmp = (math.sqrt((0.0 - (2.0 * F))) * math.sqrt(B_m)) / (0.0 - B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m)) tmp = 0.0 if (B_m <= 5.8e-181) tmp = Float64(sqrt(Float64(-16.0 * Float64(C * Float64(F * Float64(A * C))))) / t_0); elseif (B_m <= 2.9e+86) tmp = Float64(sqrt(Float64(Float64(A - Float64(hypot(B_m, Float64(A - C)) - C)) * Float64(Float64(Float64(B_m * B_m) + Float64(A * Float64(C * -4.0))) * Float64(2.0 * F)))) / t_0); else tmp = Float64(Float64(sqrt(Float64(0.0 - Float64(2.0 * F))) * sqrt(B_m)) / Float64(0.0 - B_m)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = (4.0 * (A * C)) - (B_m * B_m); tmp = 0.0; if (B_m <= 5.8e-181) tmp = sqrt((-16.0 * (C * (F * (A * C))))) / t_0; elseif (B_m <= 2.9e+86) tmp = sqrt(((A - (hypot(B_m, (A - C)) - C)) * (((B_m * B_m) + (A * (C * -4.0))) * (2.0 * F)))) / t_0; else tmp = (sqrt((0.0 - (2.0 * F))) * sqrt(B_m)) / (0.0 - B_m); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 5.8e-181], N[(N[Sqrt[N[(-16.0 * N[(C * N[(F * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[B$95$m, 2.9e+86], N[(N[Sqrt[N[(N[(A - N[(N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision] - C), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(N[Sqrt[N[(0.0 - N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[B$95$m], $MachinePrecision]), $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := 4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m\\
\mathbf{if}\;B\_m \leq 5.8 \cdot 10^{-181}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(C \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)}}{t\_0}\\
\mathbf{elif}\;B\_m \leq 2.9 \cdot 10^{+86}:\\
\;\;\;\;\frac{\sqrt{\left(A - \left(\mathsf{hypot}\left(B\_m, A - C\right) - C\right)\right) \cdot \left(\left(B\_m \cdot B\_m + A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)\right)}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{0 - 2 \cdot F} \cdot \sqrt{B\_m}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 5.7999999999999996e-181Initial program 16.9%
Simplified23.3%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6411.9%
Simplified11.9%
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6417.1%
Applied egg-rr17.1%
if 5.7999999999999996e-181 < B < 2.8999999999999999e86Initial program 35.0%
Simplified45.6%
Applied egg-rr45.6%
if 2.8999999999999999e86 < B Initial program 7.9%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6453.1%
Simplified53.1%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6451.7%
Simplified51.7%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
pow1/2N/A
pow1/2N/A
pow-prod-downN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6451.6%
Applied egg-rr51.6%
unpow1/2N/A
*-commutativeN/A
associate-*r*N/A
sqrt-prodN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f6471.8%
Applied egg-rr71.8%
Final simplification34.3%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 2.55e-73)
(/ (sqrt (* (* F (* A C)) (* C -16.0))) (- (* 4.0 (* A C)) (* B_m B_m)))
(if (<= B_m 1.6e+32)
(/
(sqrt
(*
(+ (* B_m B_m) (* -4.0 (* A C)))
(* (- A (- (hypot B_m (- A C)) C)) (* 2.0 F))))
(- 0.0 (* B_m B_m)))
(/ (* (sqrt (- 0.0 (* 2.0 F))) (sqrt B_m)) (- 0.0 B_m)))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 2.55e-73) {
tmp = sqrt(((F * (A * C)) * (C * -16.0))) / ((4.0 * (A * C)) - (B_m * B_m));
} else if (B_m <= 1.6e+32) {
tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((A - (hypot(B_m, (A - C)) - C)) * (2.0 * F)))) / (0.0 - (B_m * B_m));
} else {
tmp = (sqrt((0.0 - (2.0 * F))) * sqrt(B_m)) / (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 <= 2.55e-73) {
tmp = Math.sqrt(((F * (A * C)) * (C * -16.0))) / ((4.0 * (A * C)) - (B_m * B_m));
} else if (B_m <= 1.6e+32) {
tmp = Math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((A - (Math.hypot(B_m, (A - C)) - C)) * (2.0 * F)))) / (0.0 - (B_m * B_m));
} else {
tmp = (Math.sqrt((0.0 - (2.0 * F))) * Math.sqrt(B_m)) / (0.0 - B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 2.55e-73: tmp = math.sqrt(((F * (A * C)) * (C * -16.0))) / ((4.0 * (A * C)) - (B_m * B_m)) elif B_m <= 1.6e+32: tmp = math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((A - (math.hypot(B_m, (A - C)) - C)) * (2.0 * F)))) / (0.0 - (B_m * B_m)) else: tmp = (math.sqrt((0.0 - (2.0 * F))) * math.sqrt(B_m)) / (0.0 - B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 2.55e-73) tmp = Float64(sqrt(Float64(Float64(F * Float64(A * C)) * Float64(C * -16.0))) / Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m))); elseif (B_m <= 1.6e+32) tmp = Float64(sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(Float64(A - Float64(hypot(B_m, Float64(A - C)) - C)) * Float64(2.0 * F)))) / Float64(0.0 - Float64(B_m * B_m))); else tmp = Float64(Float64(sqrt(Float64(0.0 - Float64(2.0 * F))) * sqrt(B_m)) / 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 <= 2.55e-73) tmp = sqrt(((F * (A * C)) * (C * -16.0))) / ((4.0 * (A * C)) - (B_m * B_m)); elseif (B_m <= 1.6e+32) tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((A - (hypot(B_m, (A - C)) - C)) * (2.0 * F)))) / (0.0 - (B_m * B_m)); else tmp = (sqrt((0.0 - (2.0 * F))) * sqrt(B_m)) / (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, 2.55e-73], N[(N[Sqrt[N[(N[(F * N[(A * C), $MachinePrecision]), $MachinePrecision] * N[(C * -16.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 1.6e+32], N[(N[Sqrt[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(A - N[(N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision] - C), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(0.0 - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(0.0 - N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[B$95$m], $MachinePrecision]), $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 2.55 \cdot 10^{-73}:\\
\;\;\;\;\frac{\sqrt{\left(F \cdot \left(A \cdot C\right)\right) \cdot \left(C \cdot -16\right)}}{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m}\\
\mathbf{elif}\;B\_m \leq 1.6 \cdot 10^{+32}:\\
\;\;\;\;\frac{\sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(\left(A - \left(\mathsf{hypot}\left(B\_m, A - C\right) - C\right)\right) \cdot \left(2 \cdot F\right)\right)}}{0 - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{0 - 2 \cdot F} \cdot \sqrt{B\_m}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 2.55e-73Initial program 17.4%
Simplified23.2%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6413.6%
Simplified13.6%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6411.6%
Applied egg-rr11.6%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6418.3%
Applied egg-rr18.3%
if 2.55e-73 < B < 1.5999999999999999e32Initial program 48.9%
Simplified68.6%
Taylor expanded in A around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
unpow2N/A
*-lowering-*.f6444.6%
Simplified44.6%
if 1.5999999999999999e32 < B Initial program 11.7%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6449.8%
Simplified49.8%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6448.7%
Simplified48.7%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
pow1/2N/A
pow1/2N/A
pow-prod-downN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6448.6%
Applied egg-rr48.6%
unpow1/2N/A
*-commutativeN/A
associate-*r*N/A
sqrt-prodN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f6467.2%
Applied egg-rr67.2%
Final simplification32.6%
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.6e-74)
(/ (sqrt (* (* F (* A C)) (* C -16.0))) t_0)
(if (<= B_m 1.6e+33)
(/
(sqrt (* (* B_m B_m) (* (- A (- (hypot B_m (- A C)) C)) (* 2.0 F))))
t_0)
(/ (* (sqrt (- 0.0 (* 2.0 F))) (sqrt B_m)) (- 0.0 B_m))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = (4.0 * (A * C)) - (B_m * B_m);
double tmp;
if (B_m <= 5.6e-74) {
tmp = sqrt(((F * (A * C)) * (C * -16.0))) / t_0;
} else if (B_m <= 1.6e+33) {
tmp = sqrt(((B_m * B_m) * ((A - (hypot(B_m, (A - C)) - C)) * (2.0 * F)))) / t_0;
} else {
tmp = (sqrt((0.0 - (2.0 * F))) * sqrt(B_m)) / (0.0 - B_m);
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = (4.0 * (A * C)) - (B_m * B_m);
double tmp;
if (B_m <= 5.6e-74) {
tmp = Math.sqrt(((F * (A * C)) * (C * -16.0))) / t_0;
} else if (B_m <= 1.6e+33) {
tmp = Math.sqrt(((B_m * B_m) * ((A - (Math.hypot(B_m, (A - C)) - C)) * (2.0 * F)))) / t_0;
} else {
tmp = (Math.sqrt((0.0 - (2.0 * F))) * Math.sqrt(B_m)) / (0.0 - B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = (4.0 * (A * C)) - (B_m * B_m) tmp = 0 if B_m <= 5.6e-74: tmp = math.sqrt(((F * (A * C)) * (C * -16.0))) / t_0 elif B_m <= 1.6e+33: tmp = math.sqrt(((B_m * B_m) * ((A - (math.hypot(B_m, (A - C)) - C)) * (2.0 * F)))) / t_0 else: tmp = (math.sqrt((0.0 - (2.0 * F))) * math.sqrt(B_m)) / (0.0 - B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m)) tmp = 0.0 if (B_m <= 5.6e-74) tmp = Float64(sqrt(Float64(Float64(F * Float64(A * C)) * Float64(C * -16.0))) / t_0); elseif (B_m <= 1.6e+33) tmp = Float64(sqrt(Float64(Float64(B_m * B_m) * Float64(Float64(A - Float64(hypot(B_m, Float64(A - C)) - C)) * Float64(2.0 * F)))) / t_0); else tmp = Float64(Float64(sqrt(Float64(0.0 - Float64(2.0 * F))) * sqrt(B_m)) / Float64(0.0 - B_m)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = (4.0 * (A * C)) - (B_m * B_m); tmp = 0.0; if (B_m <= 5.6e-74) tmp = sqrt(((F * (A * C)) * (C * -16.0))) / t_0; elseif (B_m <= 1.6e+33) tmp = sqrt(((B_m * B_m) * ((A - (hypot(B_m, (A - C)) - C)) * (2.0 * F)))) / t_0; else tmp = (sqrt((0.0 - (2.0 * F))) * sqrt(B_m)) / (0.0 - B_m); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 5.6e-74], N[(N[Sqrt[N[(N[(F * N[(A * C), $MachinePrecision]), $MachinePrecision] * N[(C * -16.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[B$95$m, 1.6e+33], N[(N[Sqrt[N[(N[(B$95$m * B$95$m), $MachinePrecision] * N[(N[(A - N[(N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision] - C), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(N[Sqrt[N[(0.0 - N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[B$95$m], $MachinePrecision]), $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := 4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m\\
\mathbf{if}\;B\_m \leq 5.6 \cdot 10^{-74}:\\
\;\;\;\;\frac{\sqrt{\left(F \cdot \left(A \cdot C\right)\right) \cdot \left(C \cdot -16\right)}}{t\_0}\\
\mathbf{elif}\;B\_m \leq 1.6 \cdot 10^{+33}:\\
\;\;\;\;\frac{\sqrt{\left(B\_m \cdot B\_m\right) \cdot \left(\left(A - \left(\mathsf{hypot}\left(B\_m, A - C\right) - C\right)\right) \cdot \left(2 \cdot F\right)\right)}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{0 - 2 \cdot F} \cdot \sqrt{B\_m}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 5.59999999999999976e-74Initial program 17.4%
Simplified23.2%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6413.6%
Simplified13.6%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6411.6%
Applied egg-rr11.6%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6418.3%
Applied egg-rr18.3%
if 5.59999999999999976e-74 < B < 1.60000000000000009e33Initial program 48.9%
Simplified68.6%
Taylor expanded in B around inf
unpow2N/A
*-lowering-*.f6444.5%
Simplified44.5%
if 1.60000000000000009e33 < B Initial program 11.7%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6449.8%
Simplified49.8%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6448.7%
Simplified48.7%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
pow1/2N/A
pow1/2N/A
pow-prod-downN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6448.6%
Applied egg-rr48.6%
unpow1/2N/A
*-commutativeN/A
associate-*r*N/A
sqrt-prodN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f6467.2%
Applied egg-rr67.2%
Final simplification32.6%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 1.05e-73)
(/ (sqrt (* (* F (* A C)) (* C -16.0))) (- (* 4.0 (* A C)) (* B_m B_m)))
(if (<= B_m 2e+118)
(/ (pow (* 2.0 (* F (- C (hypot B_m C)))) 0.5) (- 0.0 B_m))
(/ (* (sqrt (- 0.0 (* 2.0 F))) (sqrt B_m)) (- 0.0 B_m)))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 1.05e-73) {
tmp = sqrt(((F * (A * C)) * (C * -16.0))) / ((4.0 * (A * C)) - (B_m * B_m));
} else if (B_m <= 2e+118) {
tmp = pow((2.0 * (F * (C - hypot(B_m, C)))), 0.5) / (0.0 - B_m);
} else {
tmp = (sqrt((0.0 - (2.0 * F))) * sqrt(B_m)) / (0.0 - B_m);
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 1.05e-73) {
tmp = Math.sqrt(((F * (A * C)) * (C * -16.0))) / ((4.0 * (A * C)) - (B_m * B_m));
} else if (B_m <= 2e+118) {
tmp = Math.pow((2.0 * (F * (C - Math.hypot(B_m, C)))), 0.5) / (0.0 - B_m);
} else {
tmp = (Math.sqrt((0.0 - (2.0 * F))) * Math.sqrt(B_m)) / (0.0 - B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 1.05e-73: tmp = math.sqrt(((F * (A * C)) * (C * -16.0))) / ((4.0 * (A * C)) - (B_m * B_m)) elif B_m <= 2e+118: tmp = math.pow((2.0 * (F * (C - math.hypot(B_m, C)))), 0.5) / (0.0 - B_m) else: tmp = (math.sqrt((0.0 - (2.0 * F))) * math.sqrt(B_m)) / (0.0 - B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 1.05e-73) tmp = Float64(sqrt(Float64(Float64(F * Float64(A * C)) * Float64(C * -16.0))) / Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m))); elseif (B_m <= 2e+118) tmp = Float64((Float64(2.0 * Float64(F * Float64(C - hypot(B_m, C)))) ^ 0.5) / Float64(0.0 - B_m)); else tmp = Float64(Float64(sqrt(Float64(0.0 - Float64(2.0 * F))) * sqrt(B_m)) / Float64(0.0 - B_m)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 1.05e-73) tmp = sqrt(((F * (A * C)) * (C * -16.0))) / ((4.0 * (A * C)) - (B_m * B_m)); elseif (B_m <= 2e+118) tmp = ((2.0 * (F * (C - hypot(B_m, C)))) ^ 0.5) / (0.0 - B_m); else tmp = (sqrt((0.0 - (2.0 * F))) * sqrt(B_m)) / (0.0 - B_m); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 1.05e-73], N[(N[Sqrt[N[(N[(F * N[(A * C), $MachinePrecision]), $MachinePrecision] * N[(C * -16.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 2e+118], N[(N[Power[N[(2.0 * N[(F * N[(C - N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(0.0 - N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[B$95$m], $MachinePrecision]), $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 1.05 \cdot 10^{-73}:\\
\;\;\;\;\frac{\sqrt{\left(F \cdot \left(A \cdot C\right)\right) \cdot \left(C \cdot -16\right)}}{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m}\\
\mathbf{elif}\;B\_m \leq 2 \cdot 10^{+118}:\\
\;\;\;\;\frac{{\left(2 \cdot \left(F \cdot \left(C - \mathsf{hypot}\left(B\_m, C\right)\right)\right)\right)}^{0.5}}{0 - B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{0 - 2 \cdot F} \cdot \sqrt{B\_m}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 1.0499999999999999e-73Initial program 17.4%
Simplified23.2%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6413.6%
Simplified13.6%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6411.6%
Applied egg-rr11.6%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6418.3%
Applied egg-rr18.3%
if 1.0499999999999999e-73 < B < 1.99999999999999993e118Initial program 45.0%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6441.4%
Simplified41.4%
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f6441.4%
Applied egg-rr41.4%
distribute-lft-neg-outN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr41.6%
if 1.99999999999999993e118 < B Initial program 0.4%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6451.3%
Simplified51.3%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6451.4%
Simplified51.4%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
pow1/2N/A
pow1/2N/A
pow-prod-downN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6451.3%
Applied egg-rr51.3%
unpow1/2N/A
*-commutativeN/A
associate-*r*N/A
sqrt-prodN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f6475.0%
Applied egg-rr75.0%
Final simplification32.0%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= B_m 5e-73) (/ (sqrt (* (* F (* A C)) (* C -16.0))) (- (* 4.0 (* A C)) (* B_m B_m))) (/ (* (sqrt (- 0.0 (* 2.0 F))) (sqrt B_m)) (- 0.0 B_m))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 5e-73) {
tmp = sqrt(((F * (A * C)) * (C * -16.0))) / ((4.0 * (A * C)) - (B_m * B_m));
} else {
tmp = (sqrt((0.0 - (2.0 * F))) * sqrt(B_m)) / (0.0 - B_m);
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if (b_m <= 5d-73) then
tmp = sqrt(((f * (a * c)) * (c * (-16.0d0)))) / ((4.0d0 * (a * c)) - (b_m * b_m))
else
tmp = (sqrt((0.0d0 - (2.0d0 * f))) * sqrt(b_m)) / (0.0d0 - b_m)
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 5e-73) {
tmp = Math.sqrt(((F * (A * C)) * (C * -16.0))) / ((4.0 * (A * C)) - (B_m * B_m));
} else {
tmp = (Math.sqrt((0.0 - (2.0 * F))) * Math.sqrt(B_m)) / (0.0 - B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 5e-73: tmp = math.sqrt(((F * (A * C)) * (C * -16.0))) / ((4.0 * (A * C)) - (B_m * B_m)) else: tmp = (math.sqrt((0.0 - (2.0 * F))) * math.sqrt(B_m)) / (0.0 - B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 5e-73) tmp = Float64(sqrt(Float64(Float64(F * Float64(A * C)) * Float64(C * -16.0))) / Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m))); else tmp = Float64(Float64(sqrt(Float64(0.0 - Float64(2.0 * F))) * sqrt(B_m)) / 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 <= 5e-73) tmp = sqrt(((F * (A * C)) * (C * -16.0))) / ((4.0 * (A * C)) - (B_m * B_m)); else tmp = (sqrt((0.0 - (2.0 * F))) * sqrt(B_m)) / (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, 5e-73], N[(N[Sqrt[N[(N[(F * N[(A * C), $MachinePrecision]), $MachinePrecision] * N[(C * -16.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(0.0 - N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[B$95$m], $MachinePrecision]), $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 5 \cdot 10^{-73}:\\
\;\;\;\;\frac{\sqrt{\left(F \cdot \left(A \cdot C\right)\right) \cdot \left(C \cdot -16\right)}}{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{0 - 2 \cdot F} \cdot \sqrt{B\_m}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 4.9999999999999998e-73Initial program 17.4%
Simplified23.2%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6413.6%
Simplified13.6%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6411.6%
Applied egg-rr11.6%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6418.3%
Applied egg-rr18.3%
if 4.9999999999999998e-73 < B Initial program 20.9%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6446.8%
Simplified46.8%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6443.0%
Simplified43.0%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
pow1/2N/A
pow1/2N/A
pow-prod-downN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6443.0%
Applied egg-rr43.0%
unpow1/2N/A
*-commutativeN/A
associate-*r*N/A
sqrt-prodN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f6456.9%
Applied egg-rr56.9%
Final simplification31.1%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 3.8e-74)
(/ (sqrt (* (* F (* A C)) (* C -16.0))) (- (* 4.0 (* A C)) (* B_m B_m)))
(if (<= B_m 2e+162)
(/ (pow (* -2.0 (* B_m F)) 0.5) (- 0.0 B_m))
(- 0.0 (sqrt (/ (+ (* F -2.0) (/ (* 2.0 (* A F)) B_m)) B_m))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 3.8e-74) {
tmp = sqrt(((F * (A * C)) * (C * -16.0))) / ((4.0 * (A * C)) - (B_m * B_m));
} else if (B_m <= 2e+162) {
tmp = pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
} else {
tmp = 0.0 - sqrt((((F * -2.0) + ((2.0 * (A * F)) / B_m)) / B_m));
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if (b_m <= 3.8d-74) then
tmp = sqrt(((f * (a * c)) * (c * (-16.0d0)))) / ((4.0d0 * (a * c)) - (b_m * b_m))
else if (b_m <= 2d+162) then
tmp = (((-2.0d0) * (b_m * f)) ** 0.5d0) / (0.0d0 - b_m)
else
tmp = 0.0d0 - sqrt((((f * (-2.0d0)) + ((2.0d0 * (a * f)) / b_m)) / b_m))
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 3.8e-74) {
tmp = Math.sqrt(((F * (A * C)) * (C * -16.0))) / ((4.0 * (A * C)) - (B_m * B_m));
} else if (B_m <= 2e+162) {
tmp = Math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
} else {
tmp = 0.0 - Math.sqrt((((F * -2.0) + ((2.0 * (A * F)) / B_m)) / B_m));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 3.8e-74: tmp = math.sqrt(((F * (A * C)) * (C * -16.0))) / ((4.0 * (A * C)) - (B_m * B_m)) elif B_m <= 2e+162: tmp = math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m) else: tmp = 0.0 - math.sqrt((((F * -2.0) + ((2.0 * (A * F)) / B_m)) / B_m)) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 3.8e-74) tmp = Float64(sqrt(Float64(Float64(F * Float64(A * C)) * Float64(C * -16.0))) / Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m))); elseif (B_m <= 2e+162) tmp = Float64((Float64(-2.0 * Float64(B_m * F)) ^ 0.5) / Float64(0.0 - B_m)); else tmp = Float64(0.0 - sqrt(Float64(Float64(Float64(F * -2.0) + Float64(Float64(2.0 * Float64(A * F)) / B_m)) / B_m))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 3.8e-74) tmp = sqrt(((F * (A * C)) * (C * -16.0))) / ((4.0 * (A * C)) - (B_m * B_m)); elseif (B_m <= 2e+162) tmp = ((-2.0 * (B_m * F)) ^ 0.5) / (0.0 - B_m); else tmp = 0.0 - sqrt((((F * -2.0) + ((2.0 * (A * F)) / B_m)) / B_m)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 3.8e-74], N[(N[Sqrt[N[(N[(F * N[(A * C), $MachinePrecision]), $MachinePrecision] * N[(C * -16.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 2e+162], N[(N[Power[N[(-2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision], N[(0.0 - N[Sqrt[N[(N[(N[(F * -2.0), $MachinePrecision] + N[(N[(2.0 * N[(A * F), $MachinePrecision]), $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision] / B$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 3.8 \cdot 10^{-74}:\\
\;\;\;\;\frac{\sqrt{\left(F \cdot \left(A \cdot C\right)\right) \cdot \left(C \cdot -16\right)}}{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m}\\
\mathbf{elif}\;B\_m \leq 2 \cdot 10^{+162}:\\
\;\;\;\;\frac{{\left(-2 \cdot \left(B\_m \cdot F\right)\right)}^{0.5}}{0 - B\_m}\\
\mathbf{else}:\\
\;\;\;\;0 - \sqrt{\frac{F \cdot -2 + \frac{2 \cdot \left(A \cdot F\right)}{B\_m}}{B\_m}}\\
\end{array}
\end{array}
if B < 3.7999999999999996e-74Initial program 17.4%
Simplified23.2%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6413.6%
Simplified13.6%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6411.6%
Applied egg-rr11.6%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6418.3%
Applied egg-rr18.3%
if 3.7999999999999996e-74 < B < 1.9999999999999999e162Initial program 35.5%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6446.5%
Simplified46.5%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6440.2%
Simplified40.2%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
pow1/2N/A
pow1/2N/A
pow-prod-downN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6440.2%
Applied egg-rr40.2%
Taylor expanded in B around 0
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6440.2%
Simplified40.2%
if 1.9999999999999999e162 < B Initial program 0.0%
Simplified0.0%
Taylor expanded in B around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f640.0%
Simplified0.0%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6459.1%
Simplified59.1%
Final simplification28.1%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 6.8e-74)
(/ (sqrt (* -16.0 (* C (* F (* A C))))) (- (* 4.0 (* A C)) (* B_m B_m)))
(if (<= B_m 2.3e+162)
(/ (pow (* -2.0 (* B_m F)) 0.5) (- 0.0 B_m))
(- 0.0 (sqrt (/ (+ (* F -2.0) (/ (* 2.0 (* A F)) B_m)) B_m))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 6.8e-74) {
tmp = sqrt((-16.0 * (C * (F * (A * C))))) / ((4.0 * (A * C)) - (B_m * B_m));
} else if (B_m <= 2.3e+162) {
tmp = pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
} else {
tmp = 0.0 - sqrt((((F * -2.0) + ((2.0 * (A * F)) / B_m)) / B_m));
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if (b_m <= 6.8d-74) then
tmp = sqrt(((-16.0d0) * (c * (f * (a * c))))) / ((4.0d0 * (a * c)) - (b_m * b_m))
else if (b_m <= 2.3d+162) then
tmp = (((-2.0d0) * (b_m * f)) ** 0.5d0) / (0.0d0 - b_m)
else
tmp = 0.0d0 - sqrt((((f * (-2.0d0)) + ((2.0d0 * (a * f)) / b_m)) / b_m))
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 6.8e-74) {
tmp = Math.sqrt((-16.0 * (C * (F * (A * C))))) / ((4.0 * (A * C)) - (B_m * B_m));
} else if (B_m <= 2.3e+162) {
tmp = Math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
} else {
tmp = 0.0 - Math.sqrt((((F * -2.0) + ((2.0 * (A * F)) / B_m)) / B_m));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 6.8e-74: tmp = math.sqrt((-16.0 * (C * (F * (A * C))))) / ((4.0 * (A * C)) - (B_m * B_m)) elif B_m <= 2.3e+162: tmp = math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m) else: tmp = 0.0 - math.sqrt((((F * -2.0) + ((2.0 * (A * F)) / B_m)) / B_m)) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 6.8e-74) tmp = Float64(sqrt(Float64(-16.0 * Float64(C * Float64(F * Float64(A * C))))) / Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m))); elseif (B_m <= 2.3e+162) tmp = Float64((Float64(-2.0 * Float64(B_m * F)) ^ 0.5) / Float64(0.0 - B_m)); else tmp = Float64(0.0 - sqrt(Float64(Float64(Float64(F * -2.0) + Float64(Float64(2.0 * Float64(A * F)) / B_m)) / B_m))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 6.8e-74) tmp = sqrt((-16.0 * (C * (F * (A * C))))) / ((4.0 * (A * C)) - (B_m * B_m)); elseif (B_m <= 2.3e+162) tmp = ((-2.0 * (B_m * F)) ^ 0.5) / (0.0 - B_m); else tmp = 0.0 - sqrt((((F * -2.0) + ((2.0 * (A * F)) / B_m)) / B_m)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 6.8e-74], N[(N[Sqrt[N[(-16.0 * N[(C * N[(F * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 2.3e+162], N[(N[Power[N[(-2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision], N[(0.0 - N[Sqrt[N[(N[(N[(F * -2.0), $MachinePrecision] + N[(N[(2.0 * N[(A * F), $MachinePrecision]), $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision] / B$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 6.8 \cdot 10^{-74}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(C \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)}}{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m}\\
\mathbf{elif}\;B\_m \leq 2.3 \cdot 10^{+162}:\\
\;\;\;\;\frac{{\left(-2 \cdot \left(B\_m \cdot F\right)\right)}^{0.5}}{0 - B\_m}\\
\mathbf{else}:\\
\;\;\;\;0 - \sqrt{\frac{F \cdot -2 + \frac{2 \cdot \left(A \cdot F\right)}{B\_m}}{B\_m}}\\
\end{array}
\end{array}
if B < 6.8000000000000001e-74Initial program 17.4%
Simplified23.2%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6413.6%
Simplified13.6%
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6418.3%
Applied egg-rr18.3%
if 6.8000000000000001e-74 < B < 2.29999999999999994e162Initial program 35.5%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6446.5%
Simplified46.5%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6440.2%
Simplified40.2%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
pow1/2N/A
pow1/2N/A
pow-prod-downN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6440.2%
Applied egg-rr40.2%
Taylor expanded in B around 0
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6440.2%
Simplified40.2%
if 2.29999999999999994e162 < B Initial program 0.0%
Simplified0.0%
Taylor expanded in B around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f640.0%
Simplified0.0%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6459.1%
Simplified59.1%
Final simplification28.1%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 7e-73)
(* (/ (/ 0.25 A) C) (sqrt (* (* A -8.0) (* C (* F (+ C C))))))
(if (<= B_m 2.55e+162)
(/ (pow (* -2.0 (* B_m F)) 0.5) (- 0.0 B_m))
(- 0.0 (sqrt (/ (+ (* F -2.0) (/ (* 2.0 (* A F)) B_m)) B_m))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 7e-73) {
tmp = ((0.25 / A) / C) * sqrt(((A * -8.0) * (C * (F * (C + C)))));
} else if (B_m <= 2.55e+162) {
tmp = pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
} else {
tmp = 0.0 - sqrt((((F * -2.0) + ((2.0 * (A * F)) / B_m)) / B_m));
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if (b_m <= 7d-73) then
tmp = ((0.25d0 / a) / c) * sqrt(((a * (-8.0d0)) * (c * (f * (c + c)))))
else if (b_m <= 2.55d+162) then
tmp = (((-2.0d0) * (b_m * f)) ** 0.5d0) / (0.0d0 - b_m)
else
tmp = 0.0d0 - sqrt((((f * (-2.0d0)) + ((2.0d0 * (a * f)) / b_m)) / b_m))
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 7e-73) {
tmp = ((0.25 / A) / C) * Math.sqrt(((A * -8.0) * (C * (F * (C + C)))));
} else if (B_m <= 2.55e+162) {
tmp = Math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
} else {
tmp = 0.0 - Math.sqrt((((F * -2.0) + ((2.0 * (A * F)) / B_m)) / B_m));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 7e-73: tmp = ((0.25 / A) / C) * math.sqrt(((A * -8.0) * (C * (F * (C + C))))) elif B_m <= 2.55e+162: tmp = math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m) else: tmp = 0.0 - math.sqrt((((F * -2.0) + ((2.0 * (A * F)) / B_m)) / B_m)) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 7e-73) tmp = Float64(Float64(Float64(0.25 / A) / C) * sqrt(Float64(Float64(A * -8.0) * Float64(C * Float64(F * Float64(C + C)))))); elseif (B_m <= 2.55e+162) tmp = Float64((Float64(-2.0 * Float64(B_m * F)) ^ 0.5) / Float64(0.0 - B_m)); else tmp = Float64(0.0 - sqrt(Float64(Float64(Float64(F * -2.0) + Float64(Float64(2.0 * Float64(A * F)) / B_m)) / B_m))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 7e-73) tmp = ((0.25 / A) / C) * sqrt(((A * -8.0) * (C * (F * (C + C))))); elseif (B_m <= 2.55e+162) tmp = ((-2.0 * (B_m * F)) ^ 0.5) / (0.0 - B_m); else tmp = 0.0 - sqrt((((F * -2.0) + ((2.0 * (A * F)) / B_m)) / B_m)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 7e-73], N[(N[(N[(0.25 / A), $MachinePrecision] / C), $MachinePrecision] * N[Sqrt[N[(N[(A * -8.0), $MachinePrecision] * N[(C * N[(F * N[(C + C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 2.55e+162], N[(N[Power[N[(-2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision], N[(0.0 - N[Sqrt[N[(N[(N[(F * -2.0), $MachinePrecision] + N[(N[(2.0 * N[(A * F), $MachinePrecision]), $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision] / B$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 7 \cdot 10^{-73}:\\
\;\;\;\;\frac{\frac{0.25}{A}}{C} \cdot \sqrt{\left(A \cdot -8\right) \cdot \left(C \cdot \left(F \cdot \left(C + C\right)\right)\right)}\\
\mathbf{elif}\;B\_m \leq 2.55 \cdot 10^{+162}:\\
\;\;\;\;\frac{{\left(-2 \cdot \left(B\_m \cdot F\right)\right)}^{0.5}}{0 - B\_m}\\
\mathbf{else}:\\
\;\;\;\;0 - \sqrt{\frac{F \cdot -2 + \frac{2 \cdot \left(A \cdot F\right)}{B\_m}}{B\_m}}\\
\end{array}
\end{array}
if B < 6.9999999999999995e-73Initial program 17.4%
Simplified23.2%
Applied egg-rr23.2%
Taylor expanded in C around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6412.7%
Simplified12.7%
Taylor expanded in B around 0
/-lowering-/.f6415.1%
Simplified15.1%
Taylor expanded in A around inf
associate-*r*N/A
rem-square-sqrtN/A
unpow2N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
+-lowering-+.f6417.4%
Simplified17.4%
if 6.9999999999999995e-73 < B < 2.5499999999999999e162Initial program 35.5%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6446.5%
Simplified46.5%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6440.2%
Simplified40.2%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
pow1/2N/A
pow1/2N/A
pow-prod-downN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6440.2%
Applied egg-rr40.2%
Taylor expanded in B around 0
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6440.2%
Simplified40.2%
if 2.5499999999999999e162 < B Initial program 0.0%
Simplified0.0%
Taylor expanded in B around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f640.0%
Simplified0.0%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6459.1%
Simplified59.1%
Final simplification27.5%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 1.1e-73)
(* (/ (/ 0.25 A) C) (sqrt (* (* A -16.0) (* F (* C C)))))
(if (<= B_m 2.5e+162)
(/ (pow (* -2.0 (* B_m F)) 0.5) (- 0.0 B_m))
(- 0.0 (sqrt (/ (+ (* F -2.0) (/ (* 2.0 (* A F)) B_m)) B_m))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 1.1e-73) {
tmp = ((0.25 / A) / C) * sqrt(((A * -16.0) * (F * (C * C))));
} else if (B_m <= 2.5e+162) {
tmp = pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
} else {
tmp = 0.0 - sqrt((((F * -2.0) + ((2.0 * (A * F)) / B_m)) / B_m));
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if (b_m <= 1.1d-73) then
tmp = ((0.25d0 / a) / c) * sqrt(((a * (-16.0d0)) * (f * (c * c))))
else if (b_m <= 2.5d+162) then
tmp = (((-2.0d0) * (b_m * f)) ** 0.5d0) / (0.0d0 - b_m)
else
tmp = 0.0d0 - sqrt((((f * (-2.0d0)) + ((2.0d0 * (a * f)) / b_m)) / b_m))
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 1.1e-73) {
tmp = ((0.25 / A) / C) * Math.sqrt(((A * -16.0) * (F * (C * C))));
} else if (B_m <= 2.5e+162) {
tmp = Math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
} else {
tmp = 0.0 - Math.sqrt((((F * -2.0) + ((2.0 * (A * F)) / B_m)) / B_m));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 1.1e-73: tmp = ((0.25 / A) / C) * math.sqrt(((A * -16.0) * (F * (C * C)))) elif B_m <= 2.5e+162: tmp = math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m) else: tmp = 0.0 - math.sqrt((((F * -2.0) + ((2.0 * (A * F)) / B_m)) / B_m)) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 1.1e-73) tmp = Float64(Float64(Float64(0.25 / A) / C) * sqrt(Float64(Float64(A * -16.0) * Float64(F * Float64(C * C))))); elseif (B_m <= 2.5e+162) tmp = Float64((Float64(-2.0 * Float64(B_m * F)) ^ 0.5) / Float64(0.0 - B_m)); else tmp = Float64(0.0 - sqrt(Float64(Float64(Float64(F * -2.0) + Float64(Float64(2.0 * Float64(A * F)) / B_m)) / B_m))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 1.1e-73) tmp = ((0.25 / A) / C) * sqrt(((A * -16.0) * (F * (C * C)))); elseif (B_m <= 2.5e+162) tmp = ((-2.0 * (B_m * F)) ^ 0.5) / (0.0 - B_m); else tmp = 0.0 - sqrt((((F * -2.0) + ((2.0 * (A * F)) / B_m)) / B_m)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 1.1e-73], N[(N[(N[(0.25 / A), $MachinePrecision] / C), $MachinePrecision] * N[Sqrt[N[(N[(A * -16.0), $MachinePrecision] * N[(F * N[(C * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 2.5e+162], N[(N[Power[N[(-2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision], N[(0.0 - N[Sqrt[N[(N[(N[(F * -2.0), $MachinePrecision] + N[(N[(2.0 * N[(A * F), $MachinePrecision]), $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision] / B$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 1.1 \cdot 10^{-73}:\\
\;\;\;\;\frac{\frac{0.25}{A}}{C} \cdot \sqrt{\left(A \cdot -16\right) \cdot \left(F \cdot \left(C \cdot C\right)\right)}\\
\mathbf{elif}\;B\_m \leq 2.5 \cdot 10^{+162}:\\
\;\;\;\;\frac{{\left(-2 \cdot \left(B\_m \cdot F\right)\right)}^{0.5}}{0 - B\_m}\\
\mathbf{else}:\\
\;\;\;\;0 - \sqrt{\frac{F \cdot -2 + \frac{2 \cdot \left(A \cdot F\right)}{B\_m}}{B\_m}}\\
\end{array}
\end{array}
if B < 1.1e-73Initial program 17.4%
Simplified23.2%
Applied egg-rr23.2%
Taylor expanded in C around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6412.7%
Simplified12.7%
Taylor expanded in B around 0
/-lowering-/.f6415.1%
Simplified15.1%
Taylor expanded in B around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6414.6%
Simplified14.6%
if 1.1e-73 < B < 2.4999999999999998e162Initial program 35.5%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6446.5%
Simplified46.5%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6440.2%
Simplified40.2%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
pow1/2N/A
pow1/2N/A
pow-prod-downN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6440.2%
Applied egg-rr40.2%
Taylor expanded in B around 0
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6440.2%
Simplified40.2%
if 2.4999999999999998e162 < B Initial program 0.0%
Simplified0.0%
Taylor expanded in B around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f640.0%
Simplified0.0%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6459.1%
Simplified59.1%
Final simplification25.7%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= F -2.3e+15)
(- 0.0 (sqrt (/ (+ (* F -2.0) (/ (* 2.0 (* A F)) B_m)) B_m)))
(if (<= F -3.8e-302)
(* (sqrt (* 2.0 (* B_m (- 0.0 F)))) (/ -1.0 B_m))
(* (/ (/ 0.25 A) C) (sqrt (* -16.0 (* F (* C (* A A)))))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (F <= -2.3e+15) {
tmp = 0.0 - sqrt((((F * -2.0) + ((2.0 * (A * F)) / B_m)) / B_m));
} else if (F <= -3.8e-302) {
tmp = sqrt((2.0 * (B_m * (0.0 - F)))) * (-1.0 / B_m);
} else {
tmp = ((0.25 / A) / C) * sqrt((-16.0 * (F * (C * (A * A)))));
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if (f <= (-2.3d+15)) then
tmp = 0.0d0 - sqrt((((f * (-2.0d0)) + ((2.0d0 * (a * f)) / b_m)) / b_m))
else if (f <= (-3.8d-302)) then
tmp = sqrt((2.0d0 * (b_m * (0.0d0 - f)))) * ((-1.0d0) / b_m)
else
tmp = ((0.25d0 / a) / c) * sqrt(((-16.0d0) * (f * (c * (a * a)))))
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (F <= -2.3e+15) {
tmp = 0.0 - Math.sqrt((((F * -2.0) + ((2.0 * (A * F)) / B_m)) / B_m));
} else if (F <= -3.8e-302) {
tmp = Math.sqrt((2.0 * (B_m * (0.0 - F)))) * (-1.0 / B_m);
} else {
tmp = ((0.25 / A) / C) * Math.sqrt((-16.0 * (F * (C * (A * A)))));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if F <= -2.3e+15: tmp = 0.0 - math.sqrt((((F * -2.0) + ((2.0 * (A * F)) / B_m)) / B_m)) elif F <= -3.8e-302: tmp = math.sqrt((2.0 * (B_m * (0.0 - F)))) * (-1.0 / B_m) else: tmp = ((0.25 / A) / C) * math.sqrt((-16.0 * (F * (C * (A * A))))) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (F <= -2.3e+15) tmp = Float64(0.0 - sqrt(Float64(Float64(Float64(F * -2.0) + Float64(Float64(2.0 * Float64(A * F)) / B_m)) / B_m))); elseif (F <= -3.8e-302) tmp = Float64(sqrt(Float64(2.0 * Float64(B_m * Float64(0.0 - F)))) * Float64(-1.0 / B_m)); else tmp = Float64(Float64(Float64(0.25 / A) / C) * sqrt(Float64(-16.0 * Float64(F * Float64(C * Float64(A * A)))))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (F <= -2.3e+15) tmp = 0.0 - sqrt((((F * -2.0) + ((2.0 * (A * F)) / B_m)) / B_m)); elseif (F <= -3.8e-302) tmp = sqrt((2.0 * (B_m * (0.0 - F)))) * (-1.0 / B_m); else tmp = ((0.25 / A) / C) * sqrt((-16.0 * (F * (C * (A * A))))); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[F, -2.3e+15], N[(0.0 - N[Sqrt[N[(N[(N[(F * -2.0), $MachinePrecision] + N[(N[(2.0 * N[(A * F), $MachinePrecision]), $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision] / B$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.8e-302], N[(N[Sqrt[N[(2.0 * N[(B$95$m * N[(0.0 - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-1.0 / B$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.25 / A), $MachinePrecision] / C), $MachinePrecision] * N[Sqrt[N[(-16.0 * N[(F * N[(C * N[(A * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.3 \cdot 10^{+15}:\\
\;\;\;\;0 - \sqrt{\frac{F \cdot -2 + \frac{2 \cdot \left(A \cdot F\right)}{B\_m}}{B\_m}}\\
\mathbf{elif}\;F \leq -3.8 \cdot 10^{-302}:\\
\;\;\;\;\sqrt{2 \cdot \left(B\_m \cdot \left(0 - F\right)\right)} \cdot \frac{-1}{B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{0.25}{A}}{C} \cdot \sqrt{-16 \cdot \left(F \cdot \left(C \cdot \left(A \cdot A\right)\right)\right)}\\
\end{array}
\end{array}
if F < -2.3e15Initial program 15.8%
Simplified17.7%
Taylor expanded in B around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f643.9%
Simplified3.9%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6420.7%
Simplified20.7%
if -2.3e15 < F < -3.8e-302Initial program 18.8%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6426.5%
Simplified26.5%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6424.5%
Simplified24.5%
pow1/2N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
neg-lowering-neg.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f6424.2%
Applied egg-rr24.2%
mul-1-negN/A
distribute-lft-neg-outN/A
associate-*l/N/A
pow1/2N/A
pow1/2N/A
unpow-prod-downN/A
*-commutativeN/A
unpow-prod-downN/A
distribute-neg-frac2N/A
div-invN/A
*-lowering-*.f64N/A
Applied egg-rr24.6%
if -3.8e-302 < F Initial program 26.7%
Simplified34.8%
Applied egg-rr37.3%
Taylor expanded in C around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6434.5%
Simplified34.5%
Taylor expanded in B around 0
/-lowering-/.f6437.3%
Simplified37.3%
Taylor expanded in A around -inf
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6413.9%
Simplified13.9%
Final simplification21.3%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= F -80000000000000.0) (- 0.0 (sqrt (/ (+ (* F -2.0) (/ (* 2.0 (* A F)) B_m)) B_m))) (* (sqrt (* 2.0 (* B_m (- 0.0 F)))) (/ -1.0 B_m))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (F <= -80000000000000.0) {
tmp = 0.0 - sqrt((((F * -2.0) + ((2.0 * (A * F)) / B_m)) / B_m));
} else {
tmp = sqrt((2.0 * (B_m * (0.0 - F)))) * (-1.0 / B_m);
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if (f <= (-80000000000000.0d0)) then
tmp = 0.0d0 - sqrt((((f * (-2.0d0)) + ((2.0d0 * (a * f)) / b_m)) / b_m))
else
tmp = sqrt((2.0d0 * (b_m * (0.0d0 - f)))) * ((-1.0d0) / b_m)
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (F <= -80000000000000.0) {
tmp = 0.0 - Math.sqrt((((F * -2.0) + ((2.0 * (A * F)) / B_m)) / B_m));
} else {
tmp = Math.sqrt((2.0 * (B_m * (0.0 - F)))) * (-1.0 / B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if F <= -80000000000000.0: tmp = 0.0 - math.sqrt((((F * -2.0) + ((2.0 * (A * F)) / B_m)) / B_m)) else: tmp = math.sqrt((2.0 * (B_m * (0.0 - F)))) * (-1.0 / B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (F <= -80000000000000.0) tmp = Float64(0.0 - sqrt(Float64(Float64(Float64(F * -2.0) + Float64(Float64(2.0 * Float64(A * F)) / B_m)) / B_m))); else tmp = Float64(sqrt(Float64(2.0 * Float64(B_m * Float64(0.0 - F)))) * Float64(-1.0 / B_m)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (F <= -80000000000000.0) tmp = 0.0 - sqrt((((F * -2.0) + ((2.0 * (A * F)) / B_m)) / B_m)); else tmp = sqrt((2.0 * (B_m * (0.0 - F)))) * (-1.0 / B_m); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[F, -80000000000000.0], N[(0.0 - N[Sqrt[N[(N[(N[(F * -2.0), $MachinePrecision] + N[(N[(2.0 * N[(A * F), $MachinePrecision]), $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision] / B$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(2.0 * N[(B$95$m * N[(0.0 - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-1.0 / B$95$m), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;F \leq -80000000000000:\\
\;\;\;\;0 - \sqrt{\frac{F \cdot -2 + \frac{2 \cdot \left(A \cdot F\right)}{B\_m}}{B\_m}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(B\_m \cdot \left(0 - F\right)\right)} \cdot \frac{-1}{B\_m}\\
\end{array}
\end{array}
if F < -8e13Initial program 15.8%
Simplified17.7%
Taylor expanded in B around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f643.9%
Simplified3.9%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6420.7%
Simplified20.7%
if -8e13 < F Initial program 20.8%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6419.9%
Simplified19.9%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6419.4%
Simplified19.4%
pow1/2N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
neg-lowering-neg.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f6418.1%
Applied egg-rr18.1%
mul-1-negN/A
distribute-lft-neg-outN/A
associate-*l/N/A
pow1/2N/A
pow1/2N/A
unpow-prod-downN/A
*-commutativeN/A
unpow-prod-downN/A
distribute-neg-frac2N/A
div-invN/A
*-lowering-*.f64N/A
Applied egg-rr19.4%
Final simplification20.0%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (/ (pow (* -2.0 (* B_m F)) 0.5) (- 0.0 B_m)))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
return pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
code = (((-2.0d0) * (b_m * f)) ** 0.5d0) / (0.0d0 - b_m)
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
return Math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
}
B_m = math.fabs(B) def code(A, B_m, C, F): return math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m)
B_m = abs(B) function code(A, B_m, C, F) return Float64((Float64(-2.0 * Float64(B_m * F)) ^ 0.5) / Float64(0.0 - B_m)) end
B_m = abs(B); function tmp = code(A, B_m, C, F) tmp = ((-2.0 * (B_m * F)) ^ 0.5) / (0.0 - B_m); end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := N[(N[Power[N[(-2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|
\\
\frac{{\left(-2 \cdot \left(B\_m \cdot F\right)\right)}^{0.5}}{0 - B\_m}
\end{array}
Initial program 18.6%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6418.3%
Simplified18.3%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6416.4%
Simplified16.4%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
pow1/2N/A
pow1/2N/A
pow-prod-downN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6416.4%
Applied egg-rr16.4%
Taylor expanded in B around 0
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6416.4%
Simplified16.4%
Final simplification16.4%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (sqrt (* 2.0 (/ F B_m))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
return sqrt((2.0 * (F / B_m)));
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
code = sqrt((2.0d0 * (f / b_m)))
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
return Math.sqrt((2.0 * (F / B_m)));
}
B_m = math.fabs(B) def code(A, B_m, C, F): return math.sqrt((2.0 * (F / B_m)))
B_m = abs(B) function code(A, B_m, C, F) return sqrt(Float64(2.0 * Float64(F / B_m))) end
B_m = abs(B); function tmp = code(A, B_m, C, F) tmp = sqrt((2.0 * (F / B_m))); end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := N[Sqrt[N[(2.0 * N[(F / B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|
\\
\sqrt{2 \cdot \frac{F}{B\_m}}
\end{array}
Initial program 18.6%
Taylor expanded in B around -inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f641.7%
Simplified1.7%
*-commutativeN/A
mul-1-negN/A
cancel-sign-subN/A
+-lowering-+.f64N/A
sqrt-unprodN/A
rem-square-sqrtN/A
sqr-negN/A
mul-1-negN/A
mul-1-negN/A
rem-square-sqrtN/A
swap-sqrN/A
*-commutativeN/A
*-commutativeN/A
+-lft-identityN/A
+-commutativeN/A
distribute-rgt-outN/A
Applied egg-rr1.7%
Final simplification1.7%
herbie shell --seed 2024161
(FPCore (A B C F)
:name "ABCF->ab-angle b"
: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))))