
(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 13 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) (* C (* A -4.0))))
(t_1 (hypot B_m (- A C)))
(t_2 (* (* 4.0 A) C))
(t_3
(/
(sqrt
(*
(* 2.0 (* (- (pow B_m 2.0) t_2) F))
(- (+ A C) (sqrt (+ (pow B_m 2.0) (pow (- A C) 2.0))))))
(- t_2 (pow B_m 2.0))))
(t_4 (- t_2 (* B_m B_m))))
(if (<= t_3 0.0)
(/ (* (sqrt t_0) (sqrt (* 2.0 (* F (- A (- t_1 C)))))) t_4)
(if (<= t_3 INFINITY)
(/ (sqrt (* (* t_0 (* 2.0 F)) (- (+ A C) t_1))) t_4)
(/ (* (sqrt (* F -2.0)) (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) + (C * (A * -4.0));
double t_1 = hypot(B_m, (A - C));
double t_2 = (4.0 * A) * C;
double t_3 = sqrt(((2.0 * ((pow(B_m, 2.0) - t_2) * F)) * ((A + C) - sqrt((pow(B_m, 2.0) + pow((A - C), 2.0)))))) / (t_2 - pow(B_m, 2.0));
double t_4 = t_2 - (B_m * B_m);
double tmp;
if (t_3 <= 0.0) {
tmp = (sqrt(t_0) * sqrt((2.0 * (F * (A - (t_1 - C)))))) / t_4;
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt(((t_0 * (2.0 * F)) * ((A + C) - t_1))) / t_4;
} else {
tmp = (sqrt((F * -2.0)) * 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) + (C * (A * -4.0));
double t_1 = Math.hypot(B_m, (A - C));
double t_2 = (4.0 * A) * C;
double t_3 = Math.sqrt(((2.0 * ((Math.pow(B_m, 2.0) - t_2) * F)) * ((A + C) - Math.sqrt((Math.pow(B_m, 2.0) + Math.pow((A - C), 2.0)))))) / (t_2 - Math.pow(B_m, 2.0));
double t_4 = t_2 - (B_m * B_m);
double tmp;
if (t_3 <= 0.0) {
tmp = (Math.sqrt(t_0) * Math.sqrt((2.0 * (F * (A - (t_1 - C)))))) / t_4;
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((t_0 * (2.0 * F)) * ((A + C) - t_1))) / t_4;
} else {
tmp = (Math.sqrt((F * -2.0)) * 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) + (C * (A * -4.0)) t_1 = math.hypot(B_m, (A - C)) t_2 = (4.0 * A) * C t_3 = math.sqrt(((2.0 * ((math.pow(B_m, 2.0) - t_2) * F)) * ((A + C) - math.sqrt((math.pow(B_m, 2.0) + math.pow((A - C), 2.0)))))) / (t_2 - math.pow(B_m, 2.0)) t_4 = t_2 - (B_m * B_m) tmp = 0 if t_3 <= 0.0: tmp = (math.sqrt(t_0) * math.sqrt((2.0 * (F * (A - (t_1 - C)))))) / t_4 elif t_3 <= math.inf: tmp = math.sqrt(((t_0 * (2.0 * F)) * ((A + C) - t_1))) / t_4 else: tmp = (math.sqrt((F * -2.0)) * 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(C * Float64(A * -4.0))) t_1 = hypot(B_m, Float64(A - C)) t_2 = Float64(Float64(4.0 * A) * C) t_3 = Float64(sqrt(Float64(Float64(2.0 * Float64(Float64((B_m ^ 2.0) - t_2) * F)) * Float64(Float64(A + C) - sqrt(Float64((B_m ^ 2.0) + (Float64(A - C) ^ 2.0)))))) / Float64(t_2 - (B_m ^ 2.0))) t_4 = Float64(t_2 - Float64(B_m * B_m)) tmp = 0.0 if (t_3 <= 0.0) tmp = Float64(Float64(sqrt(t_0) * sqrt(Float64(2.0 * Float64(F * Float64(A - Float64(t_1 - C)))))) / t_4); elseif (t_3 <= Inf) tmp = Float64(sqrt(Float64(Float64(t_0 * Float64(2.0 * F)) * Float64(Float64(A + C) - t_1))) / t_4); else tmp = Float64(Float64(sqrt(Float64(F * -2.0)) * 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) + (C * (A * -4.0)); t_1 = hypot(B_m, (A - C)); t_2 = (4.0 * A) * C; t_3 = sqrt(((2.0 * (((B_m ^ 2.0) - t_2) * F)) * ((A + C) - sqrt(((B_m ^ 2.0) + ((A - C) ^ 2.0)))))) / (t_2 - (B_m ^ 2.0)); t_4 = t_2 - (B_m * B_m); tmp = 0.0; if (t_3 <= 0.0) tmp = (sqrt(t_0) * sqrt((2.0 * (F * (A - (t_1 - C)))))) / t_4; elseif (t_3 <= Inf) tmp = sqrt(((t_0 * (2.0 * F)) * ((A + C) - t_1))) / t_4; else tmp = (sqrt((F * -2.0)) * 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[(C * N[(A * -4.0), $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[(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$4 = N[(t$95$2 - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[(N[Sqrt[t$95$0], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(F * N[(A - N[(t$95$1 - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$4), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(N[Sqrt[N[(N[(t$95$0 * N[(2.0 * F), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$4), $MachinePrecision], N[(N[(N[Sqrt[N[(F * -2.0), $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 + C \cdot \left(A \cdot -4\right)\\
t_1 := \mathsf{hypot}\left(B\_m, A - 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}}\\
t_4 := t\_2 - B\_m \cdot B\_m\\
\mathbf{if}\;t\_3 \leq 0:\\
\;\;\;\;\frac{\sqrt{t\_0} \cdot \sqrt{2 \cdot \left(F \cdot \left(A - \left(t\_1 - C\right)\right)\right)}}{t\_4}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\frac{\sqrt{\left(t\_0 \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) - t\_1\right)}}{t\_4}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{F \cdot -2} \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))) < 0.0Initial program 34.8%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified38.5%
pow1/2N/A
associate-*l*N/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr51.8%
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 46.2%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified57.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.f6414.8%
Simplified14.8%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr14.9%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6413.9%
Simplified13.9%
unpow1/2N/A
*-commutativeN/A
associate-*r*N/A
sqrt-prodN/A
unpow1/2N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
unpow1/2N/A
sqrt-lowering-sqrt.f6421.6%
Applied egg-rr21.6%
Final simplification39.6%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= (pow B_m 2.0) 0.1)
(/
-1.0
(/
(- (* B_m B_m) (* 4.0 (* A C)))
(sqrt
(*
2.0
(*
(+ (* B_m B_m) (* C (* A -4.0)))
(* F (- A (- (hypot B_m (- A C)) C))))))))
(/ (* (sqrt (* F -2.0)) (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 (pow(B_m, 2.0) <= 0.1) {
tmp = -1.0 / (((B_m * B_m) - (4.0 * (A * C))) / sqrt((2.0 * (((B_m * B_m) + (C * (A * -4.0))) * (F * (A - (hypot(B_m, (A - C)) - C)))))));
} else {
tmp = (sqrt((F * -2.0)) * 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 (Math.pow(B_m, 2.0) <= 0.1) {
tmp = -1.0 / (((B_m * B_m) - (4.0 * (A * C))) / Math.sqrt((2.0 * (((B_m * B_m) + (C * (A * -4.0))) * (F * (A - (Math.hypot(B_m, (A - C)) - C)))))));
} else {
tmp = (Math.sqrt((F * -2.0)) * 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 math.pow(B_m, 2.0) <= 0.1: tmp = -1.0 / (((B_m * B_m) - (4.0 * (A * C))) / math.sqrt((2.0 * (((B_m * B_m) + (C * (A * -4.0))) * (F * (A - (math.hypot(B_m, (A - C)) - C))))))) else: tmp = (math.sqrt((F * -2.0)) * 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.0) <= 0.1) tmp = Float64(-1.0 / Float64(Float64(Float64(B_m * B_m) - Float64(4.0 * Float64(A * C))) / sqrt(Float64(2.0 * Float64(Float64(Float64(B_m * B_m) + Float64(C * Float64(A * -4.0))) * Float64(F * Float64(A - Float64(hypot(B_m, Float64(A - C)) - C)))))))); else tmp = Float64(Float64(sqrt(Float64(F * -2.0)) * 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.0) <= 0.1) tmp = -1.0 / (((B_m * B_m) - (4.0 * (A * C))) / sqrt((2.0 * (((B_m * B_m) + (C * (A * -4.0))) * (F * (A - (hypot(B_m, (A - C)) - C))))))); else tmp = (sqrt((F * -2.0)) * 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[N[Power[B$95$m, 2.0], $MachinePrecision], 0.1], N[(-1.0 / N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] - N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(2.0 * N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(C * N[(A * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(F * N[(A - N[(N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision] - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(F * -2.0), $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}^{2} \leq 0.1:\\
\;\;\;\;\frac{-1}{\frac{B\_m \cdot B\_m - 4 \cdot \left(A \cdot C\right)}{\sqrt{2 \cdot \left(\left(B\_m \cdot B\_m + C \cdot \left(A \cdot -4\right)\right) \cdot \left(F \cdot \left(A - \left(\mathsf{hypot}\left(B\_m, A - C\right) - C\right)\right)\right)\right)}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{F \cdot -2} \cdot \sqrt{B\_m}}{0 - B\_m}\\
\end{array}
\end{array}
if (pow.f64 B #s(literal 2 binary64)) < 0.10000000000000001Initial program 26.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified31.3%
Applied egg-rr31.9%
if 0.10000000000000001 < (pow.f64 B #s(literal 2 binary64)) Initial program 14.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.f6422.5%
Simplified22.5%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr22.6%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6421.5%
Simplified21.5%
unpow1/2N/A
*-commutativeN/A
associate-*r*N/A
sqrt-prodN/A
unpow1/2N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
unpow1/2N/A
sqrt-lowering-sqrt.f6430.9%
Applied egg-rr30.9%
Final simplification31.4%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 4500000000.0)
(*
(sqrt
(*
2.0
(*
(+ (* B_m B_m) (* C (* A -4.0)))
(* F (- A (- (hypot B_m (- A C)) C))))))
(/ 1.0 (- (* 4.0 (* A C)) (* B_m B_m))))
(/ (* (sqrt (* F -2.0)) (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 <= 4500000000.0) {
tmp = sqrt((2.0 * (((B_m * B_m) + (C * (A * -4.0))) * (F * (A - (hypot(B_m, (A - C)) - C)))))) * (1.0 / ((4.0 * (A * C)) - (B_m * B_m)));
} else {
tmp = (sqrt((F * -2.0)) * 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 <= 4500000000.0) {
tmp = Math.sqrt((2.0 * (((B_m * B_m) + (C * (A * -4.0))) * (F * (A - (Math.hypot(B_m, (A - C)) - C)))))) * (1.0 / ((4.0 * (A * C)) - (B_m * B_m)));
} else {
tmp = (Math.sqrt((F * -2.0)) * 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 <= 4500000000.0: tmp = math.sqrt((2.0 * (((B_m * B_m) + (C * (A * -4.0))) * (F * (A - (math.hypot(B_m, (A - C)) - C)))))) * (1.0 / ((4.0 * (A * C)) - (B_m * B_m))) else: tmp = (math.sqrt((F * -2.0)) * 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 <= 4500000000.0) tmp = Float64(sqrt(Float64(2.0 * Float64(Float64(Float64(B_m * B_m) + Float64(C * Float64(A * -4.0))) * Float64(F * Float64(A - Float64(hypot(B_m, Float64(A - C)) - C)))))) * Float64(1.0 / Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m)))); else tmp = Float64(Float64(sqrt(Float64(F * -2.0)) * 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 <= 4500000000.0) tmp = sqrt((2.0 * (((B_m * B_m) + (C * (A * -4.0))) * (F * (A - (hypot(B_m, (A - C)) - C)))))) * (1.0 / ((4.0 * (A * C)) - (B_m * B_m))); else tmp = (sqrt((F * -2.0)) * 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, 4500000000.0], N[(N[Sqrt[N[(2.0 * N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(C * N[(A * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(F * N[(A - N[(N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision] - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 / N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(F * -2.0), $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 4500000000:\\
\;\;\;\;\sqrt{2 \cdot \left(\left(B\_m \cdot B\_m + C \cdot \left(A \cdot -4\right)\right) \cdot \left(F \cdot \left(A - \left(\mathsf{hypot}\left(B\_m, A - C\right) - C\right)\right)\right)\right)} \cdot \frac{1}{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{F \cdot -2} \cdot \sqrt{B\_m}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 4.5e9Initial program 22.1%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified25.8%
Applied egg-rr26.3%
if 4.5e9 < B Initial program 17.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.f6446.6%
Simplified46.6%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr46.9%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6447.2%
Simplified47.2%
unpow1/2N/A
*-commutativeN/A
associate-*r*N/A
sqrt-prodN/A
unpow1/2N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
unpow1/2N/A
sqrt-lowering-sqrt.f6468.7%
Applied egg-rr68.7%
Final simplification35.2%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 13200000.0)
(/
(sqrt
(*
(* (+ (* B_m B_m) (* C (* A -4.0))) (* 2.0 F))
(- (+ A C) (hypot B_m (- A C)))))
(- (* (* 4.0 A) C) (* B_m B_m)))
(/ (* (sqrt (* F -2.0)) (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 <= 13200000.0) {
tmp = sqrt(((((B_m * B_m) + (C * (A * -4.0))) * (2.0 * F)) * ((A + C) - hypot(B_m, (A - C))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = (sqrt((F * -2.0)) * 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 <= 13200000.0) {
tmp = Math.sqrt(((((B_m * B_m) + (C * (A * -4.0))) * (2.0 * F)) * ((A + C) - Math.hypot(B_m, (A - C))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = (Math.sqrt((F * -2.0)) * 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 <= 13200000.0: tmp = math.sqrt(((((B_m * B_m) + (C * (A * -4.0))) * (2.0 * F)) * ((A + C) - math.hypot(B_m, (A - C))))) / (((4.0 * A) * C) - (B_m * B_m)) else: tmp = (math.sqrt((F * -2.0)) * 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 <= 13200000.0) tmp = Float64(sqrt(Float64(Float64(Float64(Float64(B_m * B_m) + Float64(C * Float64(A * -4.0))) * Float64(2.0 * F)) * Float64(Float64(A + C) - hypot(B_m, Float64(A - C))))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); else tmp = Float64(Float64(sqrt(Float64(F * -2.0)) * 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 <= 13200000.0) tmp = sqrt(((((B_m * B_m) + (C * (A * -4.0))) * (2.0 * F)) * ((A + C) - hypot(B_m, (A - C))))) / (((4.0 * A) * C) - (B_m * B_m)); else tmp = (sqrt((F * -2.0)) * 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, 13200000.0], N[(N[Sqrt[N[(N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(C * N[(A * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] - N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(F * -2.0), $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 13200000:\\
\;\;\;\;\frac{\sqrt{\left(\left(B\_m \cdot B\_m + C \cdot \left(A \cdot -4\right)\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) - \mathsf{hypot}\left(B\_m, A - C\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{F \cdot -2} \cdot \sqrt{B\_m}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 1.32e7Initial program 22.1%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified25.8%
if 1.32e7 < B Initial program 17.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.f6446.6%
Simplified46.6%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr46.9%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6447.2%
Simplified47.2%
unpow1/2N/A
*-commutativeN/A
associate-*r*N/A
sqrt-prodN/A
unpow1/2N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
unpow1/2N/A
sqrt-lowering-sqrt.f6468.7%
Applied egg-rr68.7%
Final simplification34.8%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 5.4e-89)
(/
(* (pow (* F (* A C)) 0.5) (sqrt (* C -16.0)))
(- (* (* 4.0 A) C) (* B_m B_m)))
(/ (* (sqrt (* F -2.0)) (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 <= 5.4e-89) {
tmp = (pow((F * (A * C)), 0.5) * sqrt((C * -16.0))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = (sqrt((F * -2.0)) * 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 <= 5.4d-89) then
tmp = (((f * (a * c)) ** 0.5d0) * sqrt((c * (-16.0d0)))) / (((4.0d0 * a) * c) - (b_m * b_m))
else
tmp = (sqrt((f * (-2.0d0))) * 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 <= 5.4e-89) {
tmp = (Math.pow((F * (A * C)), 0.5) * Math.sqrt((C * -16.0))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = (Math.sqrt((F * -2.0)) * 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 <= 5.4e-89: tmp = (math.pow((F * (A * C)), 0.5) * math.sqrt((C * -16.0))) / (((4.0 * A) * C) - (B_m * B_m)) else: tmp = (math.sqrt((F * -2.0)) * 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 <= 5.4e-89) tmp = Float64(Float64((Float64(F * Float64(A * C)) ^ 0.5) * sqrt(Float64(C * -16.0))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); else tmp = Float64(Float64(sqrt(Float64(F * -2.0)) * 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 <= 5.4e-89) tmp = (((F * (A * C)) ^ 0.5) * sqrt((C * -16.0))) / (((4.0 * A) * C) - (B_m * B_m)); else tmp = (sqrt((F * -2.0)) * 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, 5.4e-89], N[(N[(N[Power[N[(F * N[(A * C), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] * N[Sqrt[N[(C * -16.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(F * -2.0), $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.4 \cdot 10^{-89}:\\
\;\;\;\;\frac{{\left(F \cdot \left(A \cdot C\right)\right)}^{0.5} \cdot \sqrt{C \cdot -16}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{F \cdot -2} \cdot \sqrt{B\_m}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 5.39999999999999975e-89Initial program 22.2%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified25.6%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6410.6%
Simplified10.6%
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6410.6%
Applied egg-rr10.6%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6414.7%
Applied egg-rr14.7%
if 5.39999999999999975e-89 < B Initial program 18.7%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6438.0%
Simplified38.0%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr38.2%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6438.6%
Simplified38.6%
unpow1/2N/A
*-commutativeN/A
associate-*r*N/A
sqrt-prodN/A
unpow1/2N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
unpow1/2N/A
sqrt-lowering-sqrt.f6454.3%
Applied egg-rr54.3%
Final simplification26.1%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 1e-134)
(/
(* (pow (* C (* A C)) 0.5) (sqrt (* F -16.0)))
(- (* (* 4.0 A) C) (* B_m B_m)))
(/ (* (sqrt (* F -2.0)) (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 <= 1e-134) {
tmp = (pow((C * (A * C)), 0.5) * sqrt((F * -16.0))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = (sqrt((F * -2.0)) * 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 <= 1d-134) then
tmp = (((c * (a * c)) ** 0.5d0) * sqrt((f * (-16.0d0)))) / (((4.0d0 * a) * c) - (b_m * b_m))
else
tmp = (sqrt((f * (-2.0d0))) * 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 <= 1e-134) {
tmp = (Math.pow((C * (A * C)), 0.5) * Math.sqrt((F * -16.0))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = (Math.sqrt((F * -2.0)) * 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 <= 1e-134: tmp = (math.pow((C * (A * C)), 0.5) * math.sqrt((F * -16.0))) / (((4.0 * A) * C) - (B_m * B_m)) else: tmp = (math.sqrt((F * -2.0)) * 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 <= 1e-134) tmp = Float64(Float64((Float64(C * Float64(A * C)) ^ 0.5) * sqrt(Float64(F * -16.0))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); else tmp = Float64(Float64(sqrt(Float64(F * -2.0)) * 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 <= 1e-134) tmp = (((C * (A * C)) ^ 0.5) * sqrt((F * -16.0))) / (((4.0 * A) * C) - (B_m * B_m)); else tmp = (sqrt((F * -2.0)) * 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, 1e-134], N[(N[(N[Power[N[(C * N[(A * C), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] * N[Sqrt[N[(F * -16.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(F * -2.0), $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 10^{-134}:\\
\;\;\;\;\frac{{\left(C \cdot \left(A \cdot C\right)\right)}^{0.5} \cdot \sqrt{F \cdot -16}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{F \cdot -2} \cdot \sqrt{B\_m}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 1.00000000000000004e-134Initial program 22.0%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified25.0%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6411.0%
Simplified11.0%
*-commutativeN/A
associate-*l*N/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6412.6%
Applied egg-rr12.6%
if 1.00000000000000004e-134 < B Initial program 19.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.f6436.7%
Simplified36.7%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr36.8%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6436.7%
Simplified36.7%
unpow1/2N/A
*-commutativeN/A
associate-*r*N/A
sqrt-prodN/A
unpow1/2N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
unpow1/2N/A
sqrt-lowering-sqrt.f6452.0%
Applied egg-rr52.0%
Final simplification25.2%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= B_m 2.3e-112) (/ (sqrt (* (* F (* A C)) (* C -16.0))) (- (* (* 4.0 A) C) (* B_m B_m))) (/ (* (sqrt (* F -2.0)) (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.3e-112) {
tmp = sqrt(((F * (A * C)) * (C * -16.0))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = (sqrt((F * -2.0)) * 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 <= 2.3d-112) then
tmp = sqrt(((f * (a * c)) * (c * (-16.0d0)))) / (((4.0d0 * a) * c) - (b_m * b_m))
else
tmp = (sqrt((f * (-2.0d0))) * 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 <= 2.3e-112) {
tmp = Math.sqrt(((F * (A * C)) * (C * -16.0))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = (Math.sqrt((F * -2.0)) * 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.3e-112: tmp = math.sqrt(((F * (A * C)) * (C * -16.0))) / (((4.0 * A) * C) - (B_m * B_m)) else: tmp = (math.sqrt((F * -2.0)) * 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.3e-112) tmp = Float64(sqrt(Float64(Float64(F * Float64(A * C)) * Float64(C * -16.0))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); else tmp = Float64(Float64(sqrt(Float64(F * -2.0)) * 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.3e-112) tmp = sqrt(((F * (A * C)) * (C * -16.0))) / (((4.0 * A) * C) - (B_m * B_m)); else tmp = (sqrt((F * -2.0)) * 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.3e-112], N[(N[Sqrt[N[(N[(F * N[(A * C), $MachinePrecision]), $MachinePrecision] * N[(C * -16.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(F * -2.0), $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.3 \cdot 10^{-112}:\\
\;\;\;\;\frac{\sqrt{\left(F \cdot \left(A \cdot C\right)\right) \cdot \left(C \cdot -16\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{F \cdot -2} \cdot \sqrt{B\_m}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 2.29999999999999991e-112Initial program 21.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified25.0%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6410.8%
Simplified10.8%
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6410.7%
Applied egg-rr10.7%
*-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-*.f6414.7%
Applied egg-rr14.7%
if 2.29999999999999991e-112 < B Initial program 20.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.f6438.3%
Simplified38.3%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr38.5%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6438.3%
Simplified38.3%
unpow1/2N/A
*-commutativeN/A
associate-*r*N/A
sqrt-prodN/A
unpow1/2N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
unpow1/2N/A
sqrt-lowering-sqrt.f6454.3%
Applied egg-rr54.3%
Final simplification26.8%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= B_m 9.2e-108) (/ (sqrt (* (* F (* A C)) (* C -16.0))) (- (* (* 4.0 A) C) (* B_m B_m))) (/ (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) {
double tmp;
if (B_m <= 9.2e-108) {
tmp = sqrt(((F * (A * C)) * (C * -16.0))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = pow((-2.0 * (B_m * F)), 0.5) / (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 <= 9.2d-108) then
tmp = sqrt(((f * (a * c)) * (c * (-16.0d0)))) / (((4.0d0 * a) * c) - (b_m * b_m))
else
tmp = (((-2.0d0) * (b_m * f)) ** 0.5d0) / (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 <= 9.2e-108) {
tmp = Math.sqrt(((F * (A * C)) * (C * -16.0))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = Math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 9.2e-108: tmp = math.sqrt(((F * (A * C)) * (C * -16.0))) / (((4.0 * A) * C) - (B_m * B_m)) else: tmp = math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 9.2e-108) tmp = Float64(sqrt(Float64(Float64(F * Float64(A * C)) * Float64(C * -16.0))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); else tmp = Float64((Float64(-2.0 * Float64(B_m * F)) ^ 0.5) / 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 <= 9.2e-108) tmp = sqrt(((F * (A * C)) * (C * -16.0))) / (((4.0 * A) * C) - (B_m * B_m)); else tmp = ((-2.0 * (B_m * F)) ^ 0.5) / (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, 9.2e-108], N[(N[Sqrt[N[(N[(F * N[(A * C), $MachinePrecision]), $MachinePrecision] * N[(C * -16.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 9.2 \cdot 10^{-108}:\\
\;\;\;\;\frac{\sqrt{\left(F \cdot \left(A \cdot C\right)\right) \cdot \left(C \cdot -16\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(-2 \cdot \left(B\_m \cdot F\right)\right)}^{0.5}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 9.19999999999999983e-108Initial program 21.4%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified24.9%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6410.7%
Simplified10.7%
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6410.7%
Applied egg-rr10.7%
*-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-*.f6414.6%
Applied egg-rr14.6%
if 9.19999999999999983e-108 < B Initial program 20.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.f6438.7%
Simplified38.7%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr38.9%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6438.7%
Simplified38.7%
Final simplification21.9%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= B_m 4.5e-108) (/ (sqrt (* -16.0 (* C (* F (* A C))))) (- (* (* 4.0 A) C) (* B_m B_m))) (/ (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) {
double tmp;
if (B_m <= 4.5e-108) {
tmp = sqrt((-16.0 * (C * (F * (A * C))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = pow((-2.0 * (B_m * F)), 0.5) / (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 <= 4.5d-108) then
tmp = sqrt(((-16.0d0) * (c * (f * (a * c))))) / (((4.0d0 * a) * c) - (b_m * b_m))
else
tmp = (((-2.0d0) * (b_m * f)) ** 0.5d0) / (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 <= 4.5e-108) {
tmp = Math.sqrt((-16.0 * (C * (F * (A * C))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = Math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 4.5e-108: tmp = math.sqrt((-16.0 * (C * (F * (A * C))))) / (((4.0 * A) * C) - (B_m * B_m)) else: tmp = math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 4.5e-108) tmp = Float64(sqrt(Float64(-16.0 * Float64(C * Float64(F * Float64(A * C))))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); else tmp = Float64((Float64(-2.0 * Float64(B_m * F)) ^ 0.5) / Float64(0.0 - B_m)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 4.5e-108) tmp = sqrt((-16.0 * (C * (F * (A * C))))) / (((4.0 * A) * C) - (B_m * B_m)); else tmp = ((-2.0 * (B_m * F)) ^ 0.5) / (0.0 - B_m); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 4.5e-108], N[(N[Sqrt[N[(-16.0 * N[(C * N[(F * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 4.5 \cdot 10^{-108}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(C \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(-2 \cdot \left(B\_m \cdot F\right)\right)}^{0.5}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 4.4999999999999997e-108Initial program 21.4%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified24.9%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6410.7%
Simplified10.7%
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6414.6%
Applied egg-rr14.6%
if 4.4999999999999997e-108 < B Initial program 20.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.f6438.7%
Simplified38.7%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr38.9%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6438.7%
Simplified38.7%
Final simplification21.9%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= B_m 2.3e-107) (* (/ 0.25 (* A C)) (sqrt (* -16.0 (* F (* C (* A C)))))) (/ (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) {
double tmp;
if (B_m <= 2.3e-107) {
tmp = (0.25 / (A * C)) * sqrt((-16.0 * (F * (C * (A * C)))));
} else {
tmp = pow((-2.0 * (B_m * F)), 0.5) / (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 <= 2.3d-107) then
tmp = (0.25d0 / (a * c)) * sqrt(((-16.0d0) * (f * (c * (a * c)))))
else
tmp = (((-2.0d0) * (b_m * f)) ** 0.5d0) / (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 <= 2.3e-107) {
tmp = (0.25 / (A * C)) * Math.sqrt((-16.0 * (F * (C * (A * C)))));
} else {
tmp = Math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 2.3e-107: tmp = (0.25 / (A * C)) * math.sqrt((-16.0 * (F * (C * (A * C))))) else: tmp = math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 2.3e-107) tmp = Float64(Float64(0.25 / Float64(A * C)) * sqrt(Float64(-16.0 * Float64(F * Float64(C * Float64(A * C)))))); else tmp = Float64((Float64(-2.0 * Float64(B_m * F)) ^ 0.5) / 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.3e-107) tmp = (0.25 / (A * C)) * sqrt((-16.0 * (F * (C * (A * C))))); else tmp = ((-2.0 * (B_m * F)) ^ 0.5) / (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.3e-107], N[(N[(0.25 / N[(A * C), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(-16.0 * N[(F * N[(C * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 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|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 2.3 \cdot 10^{-107}:\\
\;\;\;\;\frac{0.25}{A \cdot C} \cdot \sqrt{-16 \cdot \left(F \cdot \left(C \cdot \left(A \cdot C\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(-2 \cdot \left(B\_m \cdot F\right)\right)}^{0.5}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 2.30000000000000003e-107Initial program 21.4%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified24.9%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6410.7%
Simplified10.7%
clear-numN/A
associate-*r*N/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
Applied egg-rr12.4%
Taylor expanded in C around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6412.1%
Simplified12.1%
if 2.30000000000000003e-107 < B Initial program 20.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.f6438.7%
Simplified38.7%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr38.9%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6438.7%
Simplified38.7%
Final simplification20.1%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= C 410.0) (/ (pow (* -2.0 (* B_m F)) 0.5) (- 0.0 B_m)) (/ (pow (/ (* F (* B_m B_m)) (- 0.0 C)) 0.5) (- 0.0 B_m))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (C <= 410.0) {
tmp = pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
} else {
tmp = pow(((F * (B_m * B_m)) / (0.0 - C)), 0.5) / (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 (c <= 410.0d0) then
tmp = (((-2.0d0) * (b_m * f)) ** 0.5d0) / (0.0d0 - b_m)
else
tmp = (((f * (b_m * b_m)) / (0.0d0 - c)) ** 0.5d0) / (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 (C <= 410.0) {
tmp = Math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
} else {
tmp = Math.pow(((F * (B_m * B_m)) / (0.0 - C)), 0.5) / (0.0 - B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if C <= 410.0: tmp = math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m) else: tmp = math.pow(((F * (B_m * B_m)) / (0.0 - C)), 0.5) / (0.0 - B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (C <= 410.0) tmp = Float64((Float64(-2.0 * Float64(B_m * F)) ^ 0.5) / Float64(0.0 - B_m)); else tmp = Float64((Float64(Float64(F * Float64(B_m * B_m)) / Float64(0.0 - C)) ^ 0.5) / 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 (C <= 410.0) tmp = ((-2.0 * (B_m * F)) ^ 0.5) / (0.0 - B_m); else tmp = (((F * (B_m * B_m)) / (0.0 - C)) ^ 0.5) / (0.0 - B_m); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[C, 410.0], 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[(N[Power[N[(N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] / N[(0.0 - C), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;C \leq 410:\\
\;\;\;\;\frac{{\left(-2 \cdot \left(B\_m \cdot F\right)\right)}^{0.5}}{0 - B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\frac{F \cdot \left(B\_m \cdot B\_m\right)}{0 - C}\right)}^{0.5}}{0 - B\_m}\\
\end{array}
\end{array}
if C < 410Initial program 24.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.f6415.3%
Simplified15.3%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr15.4%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6415.1%
Simplified15.1%
if 410 < C Initial program 7.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.f646.0%
Simplified6.0%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr6.0%
Taylor expanded in C around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6418.6%
Simplified18.6%
Final simplification15.8%
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 21.2%
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.f6413.5%
Simplified13.5%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr13.6%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6413.1%
Simplified13.1%
Final simplification13.1%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (/ (sqrt (* B_m (* F -2.0))) (- 0.0 B_m)))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
return sqrt((B_m * (F * -2.0))) / (0.0 - B_m);
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
code = sqrt((b_m * (f * (-2.0d0)))) / (0.0d0 - b_m)
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
return Math.sqrt((B_m * (F * -2.0))) / (0.0 - B_m);
}
B_m = math.fabs(B) def code(A, B_m, C, F): return math.sqrt((B_m * (F * -2.0))) / (0.0 - B_m)
B_m = abs(B) function code(A, B_m, C, F) return Float64(sqrt(Float64(B_m * Float64(F * -2.0))) / Float64(0.0 - B_m)) end
B_m = abs(B); function tmp = code(A, B_m, C, F) tmp = sqrt((B_m * (F * -2.0))) / (0.0 - B_m); end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := N[(N[Sqrt[N[(B$95$m * N[(F * -2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|
\\
\frac{\sqrt{B\_m \cdot \left(F \cdot -2\right)}}{0 - B\_m}
\end{array}
Initial program 21.2%
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.f6413.5%
Simplified13.5%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr13.6%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6413.1%
Simplified13.1%
/-lowering-/.f64N/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6413.0%
Applied egg-rr13.0%
Final simplification13.0%
herbie shell --seed 2024138
(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))))