
(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 24 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C F)
:precision binary64
(let* ((t_0 (- (pow B 2.0) (* (* 4.0 A) C))))
(/
(-
(sqrt
(*
(* 2.0 (* t_0 F))
(+ (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
t_0)))
double code(double A, double B, double C, double F) {
double t_0 = pow(B, 2.0) - ((4.0 * A) * C);
return -sqrt(((2.0 * (t_0 * F)) * ((A + C) + sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / t_0;
}
real(8) function code(a, b, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: t_0
t_0 = (b ** 2.0d0) - ((4.0d0 * a) * c)
code = -sqrt(((2.0d0 * (t_0 * f)) * ((a + c) + sqrt((((a - c) ** 2.0d0) + (b ** 2.0d0)))))) / t_0
end function
public static double code(double A, double B, double C, double F) {
double t_0 = Math.pow(B, 2.0) - ((4.0 * A) * C);
return -Math.sqrt(((2.0 * (t_0 * F)) * ((A + C) + Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / t_0;
}
def code(A, B, C, F): t_0 = math.pow(B, 2.0) - ((4.0 * A) * C) return -math.sqrt(((2.0 * (t_0 * F)) * ((A + C) + math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / t_0
function code(A, B, C, F) t_0 = Float64((B ^ 2.0) - Float64(Float64(4.0 * A) * C)) return Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(t_0 * F)) * Float64(Float64(A + C) + sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))))) / t_0) end
function tmp = code(A, B, C, F) t_0 = (B ^ 2.0) - ((4.0 * A) * C); tmp = -sqrt(((2.0 * (t_0 * F)) * ((A + C) + sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / t_0; end
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[Power[B, 2.0], $MachinePrecision] - N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]}, N[((-N[Sqrt[N[(N[(2.0 * N[(t$95$0 * F), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] + N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {B}^{2} - \left(4 \cdot A\right) \cdot C\\
\frac{-\sqrt{\left(2 \cdot \left(t\_0 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{t\_0}
\end{array}
\end{array}
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (hypot B_m (- A C)))
(t_1 (+ (* B_m B_m) (* A A)))
(t_2 (sqrt (/ 1.0 t_1)))
(t_3 (- 1.0 (* A t_2)))
(t_4 (+ (* B_m B_m) (* -4.0 (* A C))))
(t_5 (+ A (hypot B_m A)))
(t_6 (* (* 4.0 A) C))
(t_7
(/
(sqrt
(*
(* 2.0 (* (- (pow B_m 2.0) t_6) F))
(+ (+ A C) (sqrt (+ (pow B_m 2.0) (pow (- A C) 2.0))))))
(- t_6 (pow B_m 2.0))))
(t_8 (- t_6 (* B_m B_m))))
(if (<= t_7 -4e-87)
(* (sqrt (* F (/ (+ (+ A C) t_0) t_4))) (- 0.0 (sqrt 2.0)))
(if (<= t_7 0.0)
(/
(sqrt
(+
(* (* 2.0 (* B_m B_m)) (* F t_5))
(*
C
(*
2.0
(+
(*
(* C F)
(+
(* (* A -4.0) t_3)
(* 0.5 (* (* B_m B_m) (* t_2 (- 1.0 (/ (* A A) t_1)))))))
(* F (+ (* -4.0 (* A t_5)) (* (* B_m B_m) t_3))))))))
t_8)
(if (<= t_7 INFINITY)
(/ (* (sqrt (+ A (+ C t_0))) (sqrt (* 2.0 (* F t_4)))) t_8)
(*
(/ (sqrt 2.0) (- 0.0 B_m))
(* (pow (+ C (hypot B_m C)) 0.5) (sqrt F))))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = hypot(B_m, (A - C));
double t_1 = (B_m * B_m) + (A * A);
double t_2 = sqrt((1.0 / t_1));
double t_3 = 1.0 - (A * t_2);
double t_4 = (B_m * B_m) + (-4.0 * (A * C));
double t_5 = A + hypot(B_m, A);
double t_6 = (4.0 * A) * C;
double t_7 = sqrt(((2.0 * ((pow(B_m, 2.0) - t_6) * F)) * ((A + C) + sqrt((pow(B_m, 2.0) + pow((A - C), 2.0)))))) / (t_6 - pow(B_m, 2.0));
double t_8 = t_6 - (B_m * B_m);
double tmp;
if (t_7 <= -4e-87) {
tmp = sqrt((F * (((A + C) + t_0) / t_4))) * (0.0 - sqrt(2.0));
} else if (t_7 <= 0.0) {
tmp = sqrt((((2.0 * (B_m * B_m)) * (F * t_5)) + (C * (2.0 * (((C * F) * (((A * -4.0) * t_3) + (0.5 * ((B_m * B_m) * (t_2 * (1.0 - ((A * A) / t_1))))))) + (F * ((-4.0 * (A * t_5)) + ((B_m * B_m) * t_3)))))))) / t_8;
} else if (t_7 <= ((double) INFINITY)) {
tmp = (sqrt((A + (C + t_0))) * sqrt((2.0 * (F * t_4)))) / t_8;
} else {
tmp = (sqrt(2.0) / (0.0 - B_m)) * (pow((C + hypot(B_m, C)), 0.5) * sqrt(F));
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = Math.hypot(B_m, (A - C));
double t_1 = (B_m * B_m) + (A * A);
double t_2 = Math.sqrt((1.0 / t_1));
double t_3 = 1.0 - (A * t_2);
double t_4 = (B_m * B_m) + (-4.0 * (A * C));
double t_5 = A + Math.hypot(B_m, A);
double t_6 = (4.0 * A) * C;
double t_7 = Math.sqrt(((2.0 * ((Math.pow(B_m, 2.0) - t_6) * F)) * ((A + C) + Math.sqrt((Math.pow(B_m, 2.0) + Math.pow((A - C), 2.0)))))) / (t_6 - Math.pow(B_m, 2.0));
double t_8 = t_6 - (B_m * B_m);
double tmp;
if (t_7 <= -4e-87) {
tmp = Math.sqrt((F * (((A + C) + t_0) / t_4))) * (0.0 - Math.sqrt(2.0));
} else if (t_7 <= 0.0) {
tmp = Math.sqrt((((2.0 * (B_m * B_m)) * (F * t_5)) + (C * (2.0 * (((C * F) * (((A * -4.0) * t_3) + (0.5 * ((B_m * B_m) * (t_2 * (1.0 - ((A * A) / t_1))))))) + (F * ((-4.0 * (A * t_5)) + ((B_m * B_m) * t_3)))))))) / t_8;
} else if (t_7 <= Double.POSITIVE_INFINITY) {
tmp = (Math.sqrt((A + (C + t_0))) * Math.sqrt((2.0 * (F * t_4)))) / t_8;
} else {
tmp = (Math.sqrt(2.0) / (0.0 - B_m)) * (Math.pow((C + Math.hypot(B_m, C)), 0.5) * Math.sqrt(F));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = math.hypot(B_m, (A - C)) t_1 = (B_m * B_m) + (A * A) t_2 = math.sqrt((1.0 / t_1)) t_3 = 1.0 - (A * t_2) t_4 = (B_m * B_m) + (-4.0 * (A * C)) t_5 = A + math.hypot(B_m, A) t_6 = (4.0 * A) * C t_7 = math.sqrt(((2.0 * ((math.pow(B_m, 2.0) - t_6) * F)) * ((A + C) + math.sqrt((math.pow(B_m, 2.0) + math.pow((A - C), 2.0)))))) / (t_6 - math.pow(B_m, 2.0)) t_8 = t_6 - (B_m * B_m) tmp = 0 if t_7 <= -4e-87: tmp = math.sqrt((F * (((A + C) + t_0) / t_4))) * (0.0 - math.sqrt(2.0)) elif t_7 <= 0.0: tmp = math.sqrt((((2.0 * (B_m * B_m)) * (F * t_5)) + (C * (2.0 * (((C * F) * (((A * -4.0) * t_3) + (0.5 * ((B_m * B_m) * (t_2 * (1.0 - ((A * A) / t_1))))))) + (F * ((-4.0 * (A * t_5)) + ((B_m * B_m) * t_3)))))))) / t_8 elif t_7 <= math.inf: tmp = (math.sqrt((A + (C + t_0))) * math.sqrt((2.0 * (F * t_4)))) / t_8 else: tmp = (math.sqrt(2.0) / (0.0 - B_m)) * (math.pow((C + math.hypot(B_m, C)), 0.5) * math.sqrt(F)) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = hypot(B_m, Float64(A - C)) t_1 = Float64(Float64(B_m * B_m) + Float64(A * A)) t_2 = sqrt(Float64(1.0 / t_1)) t_3 = Float64(1.0 - Float64(A * t_2)) t_4 = Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) t_5 = Float64(A + hypot(B_m, A)) t_6 = Float64(Float64(4.0 * A) * C) t_7 = Float64(sqrt(Float64(Float64(2.0 * Float64(Float64((B_m ^ 2.0) - t_6) * F)) * Float64(Float64(A + C) + sqrt(Float64((B_m ^ 2.0) + (Float64(A - C) ^ 2.0)))))) / Float64(t_6 - (B_m ^ 2.0))) t_8 = Float64(t_6 - Float64(B_m * B_m)) tmp = 0.0 if (t_7 <= -4e-87) tmp = Float64(sqrt(Float64(F * Float64(Float64(Float64(A + C) + t_0) / t_4))) * Float64(0.0 - sqrt(2.0))); elseif (t_7 <= 0.0) tmp = Float64(sqrt(Float64(Float64(Float64(2.0 * Float64(B_m * B_m)) * Float64(F * t_5)) + Float64(C * Float64(2.0 * Float64(Float64(Float64(C * F) * Float64(Float64(Float64(A * -4.0) * t_3) + Float64(0.5 * Float64(Float64(B_m * B_m) * Float64(t_2 * Float64(1.0 - Float64(Float64(A * A) / t_1))))))) + Float64(F * Float64(Float64(-4.0 * Float64(A * t_5)) + Float64(Float64(B_m * B_m) * t_3)))))))) / t_8); elseif (t_7 <= Inf) tmp = Float64(Float64(sqrt(Float64(A + Float64(C + t_0))) * sqrt(Float64(2.0 * Float64(F * t_4)))) / t_8); else tmp = Float64(Float64(sqrt(2.0) / Float64(0.0 - B_m)) * Float64((Float64(C + hypot(B_m, C)) ^ 0.5) * sqrt(F))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = hypot(B_m, (A - C)); t_1 = (B_m * B_m) + (A * A); t_2 = sqrt((1.0 / t_1)); t_3 = 1.0 - (A * t_2); t_4 = (B_m * B_m) + (-4.0 * (A * C)); t_5 = A + hypot(B_m, A); t_6 = (4.0 * A) * C; t_7 = sqrt(((2.0 * (((B_m ^ 2.0) - t_6) * F)) * ((A + C) + sqrt(((B_m ^ 2.0) + ((A - C) ^ 2.0)))))) / (t_6 - (B_m ^ 2.0)); t_8 = t_6 - (B_m * B_m); tmp = 0.0; if (t_7 <= -4e-87) tmp = sqrt((F * (((A + C) + t_0) / t_4))) * (0.0 - sqrt(2.0)); elseif (t_7 <= 0.0) tmp = sqrt((((2.0 * (B_m * B_m)) * (F * t_5)) + (C * (2.0 * (((C * F) * (((A * -4.0) * t_3) + (0.5 * ((B_m * B_m) * (t_2 * (1.0 - ((A * A) / t_1))))))) + (F * ((-4.0 * (A * t_5)) + ((B_m * B_m) * t_3)))))))) / t_8; elseif (t_7 <= Inf) tmp = (sqrt((A + (C + t_0))) * sqrt((2.0 * (F * t_4)))) / t_8; else tmp = (sqrt(2.0) / (0.0 - B_m)) * (((C + hypot(B_m, C)) ^ 0.5) * sqrt(F)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]}, Block[{t$95$1 = N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(A * A), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(1.0 / t$95$1), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(1.0 - N[(A * t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(A + N[Sqrt[B$95$m ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]}, Block[{t$95$7 = N[(N[Sqrt[N[(N[(2.0 * N[(N[(N[Power[B$95$m, 2.0], $MachinePrecision] - t$95$6), $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$6 - N[Power[B$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(t$95$6 - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$7, -4e-87], N[(N[Sqrt[N[(F * N[(N[(N[(A + C), $MachinePrecision] + t$95$0), $MachinePrecision] / t$95$4), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(0.0 - N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$7, 0.0], N[(N[Sqrt[N[(N[(N[(2.0 * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] * N[(F * t$95$5), $MachinePrecision]), $MachinePrecision] + N[(C * N[(2.0 * N[(N[(N[(C * F), $MachinePrecision] * N[(N[(N[(A * -4.0), $MachinePrecision] * t$95$3), $MachinePrecision] + N[(0.5 * N[(N[(B$95$m * B$95$m), $MachinePrecision] * N[(t$95$2 * N[(1.0 - N[(N[(A * A), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F * N[(N[(-4.0 * N[(A * t$95$5), $MachinePrecision]), $MachinePrecision] + N[(N[(B$95$m * B$95$m), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$8), $MachinePrecision], If[LessEqual[t$95$7, Infinity], N[(N[(N[Sqrt[N[(A + N[(C + t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(F * t$95$4), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$8), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(C + N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] * N[Sqrt[F], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := \mathsf{hypot}\left(B\_m, A - C\right)\\
t_1 := B\_m \cdot B\_m + A \cdot A\\
t_2 := \sqrt{\frac{1}{t\_1}}\\
t_3 := 1 - A \cdot t\_2\\
t_4 := B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\\
t_5 := A + \mathsf{hypot}\left(B\_m, A\right)\\
t_6 := \left(4 \cdot A\right) \cdot C\\
t_7 := \frac{\sqrt{\left(2 \cdot \left(\left({B\_m}^{2} - t\_6\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{B\_m}^{2} + {\left(A - C\right)}^{2}}\right)}}{t\_6 - {B\_m}^{2}}\\
t_8 := t\_6 - B\_m \cdot B\_m\\
\mathbf{if}\;t\_7 \leq -4 \cdot 10^{-87}:\\
\;\;\;\;\sqrt{F \cdot \frac{\left(A + C\right) + t\_0}{t\_4}} \cdot \left(0 - \sqrt{2}\right)\\
\mathbf{elif}\;t\_7 \leq 0:\\
\;\;\;\;\frac{\sqrt{\left(2 \cdot \left(B\_m \cdot B\_m\right)\right) \cdot \left(F \cdot t\_5\right) + C \cdot \left(2 \cdot \left(\left(C \cdot F\right) \cdot \left(\left(A \cdot -4\right) \cdot t\_3 + 0.5 \cdot \left(\left(B\_m \cdot B\_m\right) \cdot \left(t\_2 \cdot \left(1 - \frac{A \cdot A}{t\_1}\right)\right)\right)\right) + F \cdot \left(-4 \cdot \left(A \cdot t\_5\right) + \left(B\_m \cdot B\_m\right) \cdot t\_3\right)\right)\right)}}{t\_8}\\
\mathbf{elif}\;t\_7 \leq \infty:\\
\;\;\;\;\frac{\sqrt{A + \left(C + t\_0\right)} \cdot \sqrt{2 \cdot \left(F \cdot t\_4\right)}}{t\_8}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2}}{0 - B\_m} \cdot \left({\left(C + \mathsf{hypot}\left(B\_m, C\right)\right)}^{0.5} \cdot \sqrt{F}\right)\\
\end{array}
\end{array}
if (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 #s(literal 2 binary64) (*.f64 (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))))) (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C))) < -4.00000000000000007e-87Initial program 35.7%
Taylor expanded in F around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
Simplified69.8%
if -4.00000000000000007e-87 < (/.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.1%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified34.2%
Taylor expanded in C around 0
Simplified56.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 30.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified35.8%
Applied egg-rr83.7%
if +inf.0 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 #s(literal 2 binary64) (*.f64 (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))))) (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C))) Initial program 0.0%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified0.6%
Taylor expanded in A around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f642.3%
Simplified2.3%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
rem-square-sqrtN/A
unpow2N/A
associate-/l*N/A
/-lowering-/.f64N/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
rem-square-sqrtN/A
unpow2N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
rem-square-sqrtN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
unpow2N/A
Simplified20.2%
*-commutativeN/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
+-lowering-+.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sqrt-lowering-sqrt.f6430.6%
Applied egg-rr30.6%
Final simplification51.4%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= (pow B_m 2.0) 5e+112)
(/
(*
(sqrt (+ A (+ C (hypot B_m (- A C)))))
(sqrt (* 2.0 (* F (+ (* B_m B_m) (* -4.0 (* A C)))))))
(- (* (* 4.0 A) C) (* B_m B_m)))
(* (/ (sqrt 2.0) (- 0.0 B_m)) (* (pow (+ C (hypot B_m C)) 0.5) (sqrt F)))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (pow(B_m, 2.0) <= 5e+112) {
tmp = (sqrt((A + (C + hypot(B_m, (A - C))))) * sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C))))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = (sqrt(2.0) / (0.0 - B_m)) * (pow((C + hypot(B_m, C)), 0.5) * sqrt(F));
}
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) <= 5e+112) {
tmp = (Math.sqrt((A + (C + Math.hypot(B_m, (A - C))))) * Math.sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C))))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = (Math.sqrt(2.0) / (0.0 - B_m)) * (Math.pow((C + Math.hypot(B_m, C)), 0.5) * Math.sqrt(F));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if math.pow(B_m, 2.0) <= 5e+112: tmp = (math.sqrt((A + (C + math.hypot(B_m, (A - C))))) * math.sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C))))))) / (((4.0 * A) * C) - (B_m * B_m)) else: tmp = (math.sqrt(2.0) / (0.0 - B_m)) * (math.pow((C + math.hypot(B_m, C)), 0.5) * math.sqrt(F)) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if ((B_m ^ 2.0) <= 5e+112) tmp = Float64(Float64(sqrt(Float64(A + Float64(C + hypot(B_m, Float64(A - C))))) * sqrt(Float64(2.0 * Float64(F * Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))))))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); else tmp = Float64(Float64(sqrt(2.0) / Float64(0.0 - B_m)) * Float64((Float64(C + hypot(B_m, C)) ^ 0.5) * sqrt(F))); 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) <= 5e+112) tmp = (sqrt((A + (C + hypot(B_m, (A - C))))) * sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C))))))) / (((4.0 * A) * C) - (B_m * B_m)); else tmp = (sqrt(2.0) / (0.0 - B_m)) * (((C + hypot(B_m, C)) ^ 0.5) * sqrt(F)); 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], 5e+112], N[(N[(N[Sqrt[N[(A + N[(C + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(F * N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(C + N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] * N[Sqrt[F], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;{B\_m}^{2} \leq 5 \cdot 10^{+112}:\\
\;\;\;\;\frac{\sqrt{A + \left(C + \mathsf{hypot}\left(B\_m, A - C\right)\right)} \cdot \sqrt{2 \cdot \left(F \cdot \left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2}}{0 - B\_m} \cdot \left({\left(C + \mathsf{hypot}\left(B\_m, C\right)\right)}^{0.5} \cdot \sqrt{F}\right)\\
\end{array}
\end{array}
if (pow.f64 B #s(literal 2 binary64)) < 5e112Initial program 25.4%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified30.7%
Applied egg-rr41.8%
if 5e112 < (pow.f64 B #s(literal 2 binary64)) Initial program 11.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified11.8%
Taylor expanded in A around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6410.2%
Simplified10.2%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
rem-square-sqrtN/A
unpow2N/A
associate-/l*N/A
/-lowering-/.f64N/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
rem-square-sqrtN/A
unpow2N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
rem-square-sqrtN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
unpow2N/A
Simplified27.4%
*-commutativeN/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
+-lowering-+.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sqrt-lowering-sqrt.f6439.7%
Applied egg-rr39.7%
Final simplification40.9%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 1.55e+60)
(/
(*
(sqrt (+ A (+ C (hypot B_m (- A C)))))
(sqrt (* 2.0 (* F (+ (* B_m B_m) (* -4.0 (* A C)))))))
(- (* (* 4.0 A) C) (* B_m B_m)))
(/ (* (sqrt F) (sqrt (* 2.0 (+ A (hypot A 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.55e+60) {
tmp = (sqrt((A + (C + hypot(B_m, (A - C))))) * sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C))))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = (sqrt(F) * sqrt((2.0 * (A + hypot(A, 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.55e+60) {
tmp = (Math.sqrt((A + (C + Math.hypot(B_m, (A - C))))) * Math.sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C))))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = (Math.sqrt(F) * Math.sqrt((2.0 * (A + Math.hypot(A, 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.55e+60: tmp = (math.sqrt((A + (C + math.hypot(B_m, (A - C))))) * math.sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C))))))) / (((4.0 * A) * C) - (B_m * B_m)) else: tmp = (math.sqrt(F) * math.sqrt((2.0 * (A + math.hypot(A, 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.55e+60) tmp = Float64(Float64(sqrt(Float64(A + Float64(C + hypot(B_m, Float64(A - C))))) * sqrt(Float64(2.0 * Float64(F * Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))))))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); else tmp = Float64(Float64(sqrt(F) * sqrt(Float64(2.0 * Float64(A + hypot(A, 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.55e+60) tmp = (sqrt((A + (C + hypot(B_m, (A - C))))) * sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C))))))) / (((4.0 * A) * C) - (B_m * B_m)); else tmp = (sqrt(F) * sqrt((2.0 * (A + hypot(A, 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.55e+60], N[(N[(N[Sqrt[N[(A + N[(C + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(F * N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[F], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(A + N[Sqrt[A ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $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.55 \cdot 10^{+60}:\\
\;\;\;\;\frac{\sqrt{A + \left(C + \mathsf{hypot}\left(B\_m, A - C\right)\right)} \cdot \sqrt{2 \cdot \left(F \cdot \left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{F} \cdot \sqrt{2 \cdot \left(A + \mathsf{hypot}\left(A, B\_m\right)\right)}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 1.55e60Initial program 22.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.4%
Applied egg-rr36.1%
if 1.55e60 < B Initial program 9.3%
Taylor expanded in C around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6454.4%
Simplified54.4%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr54.6%
unpow1/2N/A
*-commutativeN/A
associate-*r*N/A
sqrt-prodN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sqrt-lowering-sqrt.f6475.8%
Applied egg-rr75.8%
Final simplification44.9%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 5e+57)
(/
(*
(sqrt (* F (+ (* B_m B_m) (* -4.0 (* A C)))))
(sqrt (* 2.0 (+ A (+ C (hypot B_m (- A C)))))))
(- (* (* 4.0 A) C) (* B_m B_m)))
(/ (* (sqrt F) (sqrt (* 2.0 (+ A (hypot A 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+57) {
tmp = (sqrt((F * ((B_m * B_m) + (-4.0 * (A * C))))) * sqrt((2.0 * (A + (C + hypot(B_m, (A - C))))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = (sqrt(F) * sqrt((2.0 * (A + hypot(A, 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 <= 5e+57) {
tmp = (Math.sqrt((F * ((B_m * B_m) + (-4.0 * (A * C))))) * Math.sqrt((2.0 * (A + (C + Math.hypot(B_m, (A - C))))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = (Math.sqrt(F) * Math.sqrt((2.0 * (A + Math.hypot(A, 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+57: tmp = (math.sqrt((F * ((B_m * B_m) + (-4.0 * (A * C))))) * math.sqrt((2.0 * (A + (C + math.hypot(B_m, (A - C))))))) / (((4.0 * A) * C) - (B_m * B_m)) else: tmp = (math.sqrt(F) * math.sqrt((2.0 * (A + math.hypot(A, 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+57) tmp = Float64(Float64(sqrt(Float64(F * Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))))) * sqrt(Float64(2.0 * Float64(A + Float64(C + hypot(B_m, Float64(A - C))))))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); else tmp = Float64(Float64(sqrt(F) * sqrt(Float64(2.0 * Float64(A + hypot(A, 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+57) tmp = (sqrt((F * ((B_m * B_m) + (-4.0 * (A * C))))) * sqrt((2.0 * (A + (C + hypot(B_m, (A - C))))))) / (((4.0 * A) * C) - (B_m * B_m)); else tmp = (sqrt(F) * sqrt((2.0 * (A + hypot(A, 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+57], N[(N[(N[Sqrt[N[(F * N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(A + N[(C + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[F], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(A + N[Sqrt[A ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $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^{+57}:\\
\;\;\;\;\frac{\sqrt{F \cdot \left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right)} \cdot \sqrt{2 \cdot \left(A + \left(C + \mathsf{hypot}\left(B\_m, A - C\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{F} \cdot \sqrt{2 \cdot \left(A + \mathsf{hypot}\left(A, B\_m\right)\right)}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 4.99999999999999972e57Initial program 22.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.4%
Applied egg-rr36.0%
if 4.99999999999999972e57 < B Initial program 9.3%
Taylor expanded in C around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6454.4%
Simplified54.4%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr54.6%
unpow1/2N/A
*-commutativeN/A
associate-*r*N/A
sqrt-prodN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sqrt-lowering-sqrt.f6475.8%
Applied egg-rr75.8%
Final simplification44.9%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (+ (+ A C) (hypot B_m (- A C)))) (t_1 (* -4.0 (* A C))))
(if (<= B_m 9.5e-138)
(/
(* (pow (* t_1 (* 2.0 F)) 0.5) (sqrt t_0))
(- (* (* 4.0 A) C) (* B_m B_m)))
(if (<= B_m 3.3e+62)
(* (sqrt (* F (/ t_0 (+ (* B_m B_m) t_1)))) (- 0.0 (sqrt 2.0)))
(/ (* (sqrt F) (sqrt (* 2.0 (+ A (hypot A B_m))))) (- 0.0 B_m))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = (A + C) + hypot(B_m, (A - C));
double t_1 = -4.0 * (A * C);
double tmp;
if (B_m <= 9.5e-138) {
tmp = (pow((t_1 * (2.0 * F)), 0.5) * sqrt(t_0)) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 3.3e+62) {
tmp = sqrt((F * (t_0 / ((B_m * B_m) + t_1)))) * (0.0 - sqrt(2.0));
} else {
tmp = (sqrt(F) * sqrt((2.0 * (A + hypot(A, 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 = (A + C) + Math.hypot(B_m, (A - C));
double t_1 = -4.0 * (A * C);
double tmp;
if (B_m <= 9.5e-138) {
tmp = (Math.pow((t_1 * (2.0 * F)), 0.5) * Math.sqrt(t_0)) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 3.3e+62) {
tmp = Math.sqrt((F * (t_0 / ((B_m * B_m) + t_1)))) * (0.0 - Math.sqrt(2.0));
} else {
tmp = (Math.sqrt(F) * Math.sqrt((2.0 * (A + Math.hypot(A, B_m))))) / (0.0 - B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = (A + C) + math.hypot(B_m, (A - C)) t_1 = -4.0 * (A * C) tmp = 0 if B_m <= 9.5e-138: tmp = (math.pow((t_1 * (2.0 * F)), 0.5) * math.sqrt(t_0)) / (((4.0 * A) * C) - (B_m * B_m)) elif B_m <= 3.3e+62: tmp = math.sqrt((F * (t_0 / ((B_m * B_m) + t_1)))) * (0.0 - math.sqrt(2.0)) else: tmp = (math.sqrt(F) * math.sqrt((2.0 * (A + math.hypot(A, B_m))))) / (0.0 - B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(Float64(A + C) + hypot(B_m, Float64(A - C))) t_1 = Float64(-4.0 * Float64(A * C)) tmp = 0.0 if (B_m <= 9.5e-138) tmp = Float64(Float64((Float64(t_1 * Float64(2.0 * F)) ^ 0.5) * sqrt(t_0)) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); elseif (B_m <= 3.3e+62) tmp = Float64(sqrt(Float64(F * Float64(t_0 / Float64(Float64(B_m * B_m) + t_1)))) * Float64(0.0 - sqrt(2.0))); else tmp = Float64(Float64(sqrt(F) * sqrt(Float64(2.0 * Float64(A + hypot(A, 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 = (A + C) + hypot(B_m, (A - C)); t_1 = -4.0 * (A * C); tmp = 0.0; if (B_m <= 9.5e-138) tmp = (((t_1 * (2.0 * F)) ^ 0.5) * sqrt(t_0)) / (((4.0 * A) * C) - (B_m * B_m)); elseif (B_m <= 3.3e+62) tmp = sqrt((F * (t_0 / ((B_m * B_m) + t_1)))) * (0.0 - sqrt(2.0)); else tmp = (sqrt(F) * sqrt((2.0 * (A + hypot(A, 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[(A + C), $MachinePrecision] + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 9.5e-138], N[(N[(N[Power[N[(t$95$1 * N[(2.0 * F), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 3.3e+62], N[(N[Sqrt[N[(F * N[(t$95$0 / N[(N[(B$95$m * B$95$m), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(0.0 - N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[F], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(A + N[Sqrt[A ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := \left(A + C\right) + \mathsf{hypot}\left(B\_m, A - C\right)\\
t_1 := -4 \cdot \left(A \cdot C\right)\\
\mathbf{if}\;B\_m \leq 9.5 \cdot 10^{-138}:\\
\;\;\;\;\frac{{\left(t\_1 \cdot \left(2 \cdot F\right)\right)}^{0.5} \cdot \sqrt{t\_0}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{elif}\;B\_m \leq 3.3 \cdot 10^{+62}:\\
\;\;\;\;\sqrt{F \cdot \frac{t\_0}{B\_m \cdot B\_m + t\_1}} \cdot \left(0 - \sqrt{2}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{F} \cdot \sqrt{2 \cdot \left(A + \mathsf{hypot}\left(A, B\_m\right)\right)}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 9.49999999999999997e-138Initial program 20.4%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified25.2%
Taylor expanded in B around 0
*-lowering-*.f64N/A
*-lowering-*.f6414.6%
Simplified14.6%
pow1/2N/A
associate-+r+N/A
*-commutativeN/A
associate-*r*N/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr21.0%
if 9.49999999999999997e-138 < B < 3.3e62Initial program 29.6%
Taylor expanded in F around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
Simplified39.2%
if 3.3e62 < B Initial program 9.4%
Taylor expanded in C around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6455.3%
Simplified55.3%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr55.5%
unpow1/2N/A
*-commutativeN/A
associate-*r*N/A
sqrt-prodN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sqrt-lowering-sqrt.f6477.1%
Applied egg-rr77.1%
Final simplification36.3%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (* -4.0 (* A C))) (t_1 (+ (+ A C) (hypot B_m (- A C)))))
(if (<= B_m 3.8e-137)
(/
(* (sqrt (* 2.0 t_1)) (pow (* F t_0) 0.5))
(- (* (* 4.0 A) C) (* B_m B_m)))
(if (<= B_m 1.9e+61)
(* (sqrt (* F (/ t_1 (+ (* B_m B_m) t_0)))) (- 0.0 (sqrt 2.0)))
(/ (* (sqrt F) (sqrt (* 2.0 (+ A (hypot A 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);
double t_1 = (A + C) + hypot(B_m, (A - C));
double tmp;
if (B_m <= 3.8e-137) {
tmp = (sqrt((2.0 * t_1)) * pow((F * t_0), 0.5)) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 1.9e+61) {
tmp = sqrt((F * (t_1 / ((B_m * B_m) + t_0)))) * (0.0 - sqrt(2.0));
} else {
tmp = (sqrt(F) * sqrt((2.0 * (A + hypot(A, 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);
double t_1 = (A + C) + Math.hypot(B_m, (A - C));
double tmp;
if (B_m <= 3.8e-137) {
tmp = (Math.sqrt((2.0 * t_1)) * Math.pow((F * t_0), 0.5)) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 1.9e+61) {
tmp = Math.sqrt((F * (t_1 / ((B_m * B_m) + t_0)))) * (0.0 - Math.sqrt(2.0));
} else {
tmp = (Math.sqrt(F) * Math.sqrt((2.0 * (A + Math.hypot(A, 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) t_1 = (A + C) + math.hypot(B_m, (A - C)) tmp = 0 if B_m <= 3.8e-137: tmp = (math.sqrt((2.0 * t_1)) * math.pow((F * t_0), 0.5)) / (((4.0 * A) * C) - (B_m * B_m)) elif B_m <= 1.9e+61: tmp = math.sqrt((F * (t_1 / ((B_m * B_m) + t_0)))) * (0.0 - math.sqrt(2.0)) else: tmp = (math.sqrt(F) * math.sqrt((2.0 * (A + math.hypot(A, B_m))))) / (0.0 - B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(-4.0 * Float64(A * C)) t_1 = Float64(Float64(A + C) + hypot(B_m, Float64(A - C))) tmp = 0.0 if (B_m <= 3.8e-137) tmp = Float64(Float64(sqrt(Float64(2.0 * t_1)) * (Float64(F * t_0) ^ 0.5)) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); elseif (B_m <= 1.9e+61) tmp = Float64(sqrt(Float64(F * Float64(t_1 / Float64(Float64(B_m * B_m) + t_0)))) * Float64(0.0 - sqrt(2.0))); else tmp = Float64(Float64(sqrt(F) * sqrt(Float64(2.0 * Float64(A + hypot(A, 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); t_1 = (A + C) + hypot(B_m, (A - C)); tmp = 0.0; if (B_m <= 3.8e-137) tmp = (sqrt((2.0 * t_1)) * ((F * t_0) ^ 0.5)) / (((4.0 * A) * C) - (B_m * B_m)); elseif (B_m <= 1.9e+61) tmp = sqrt((F * (t_1 / ((B_m * B_m) + t_0)))) * (0.0 - sqrt(2.0)); else tmp = (sqrt(F) * sqrt((2.0 * (A + hypot(A, 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[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(A + C), $MachinePrecision] + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 3.8e-137], N[(N[(N[Sqrt[N[(2.0 * t$95$1), $MachinePrecision]], $MachinePrecision] * N[Power[N[(F * t$95$0), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 1.9e+61], N[(N[Sqrt[N[(F * N[(t$95$1 / N[(N[(B$95$m * B$95$m), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(0.0 - N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[F], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(A + N[Sqrt[A ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $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)\\
t_1 := \left(A + C\right) + \mathsf{hypot}\left(B\_m, A - C\right)\\
\mathbf{if}\;B\_m \leq 3.8 \cdot 10^{-137}:\\
\;\;\;\;\frac{\sqrt{2 \cdot t\_1} \cdot {\left(F \cdot t\_0\right)}^{0.5}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{elif}\;B\_m \leq 1.9 \cdot 10^{+61}:\\
\;\;\;\;\sqrt{F \cdot \frac{t\_1}{B\_m \cdot B\_m + t\_0}} \cdot \left(0 - \sqrt{2}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{F} \cdot \sqrt{2 \cdot \left(A + \mathsf{hypot}\left(A, B\_m\right)\right)}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 3.79999999999999999e-137Initial program 20.4%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified25.2%
Taylor expanded in B around 0
*-lowering-*.f64N/A
*-lowering-*.f6414.6%
Simplified14.6%
pow1/2N/A
*-commutativeN/A
associate-+r+N/A
associate-*r*N/A
associate-*l*N/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr21.0%
if 3.79999999999999999e-137 < B < 1.89999999999999998e61Initial program 29.6%
Taylor expanded in F around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
Simplified39.2%
if 1.89999999999999998e61 < B Initial program 9.4%
Taylor expanded in C around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6455.3%
Simplified55.3%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr55.5%
unpow1/2N/A
*-commutativeN/A
associate-*r*N/A
sqrt-prodN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sqrt-lowering-sqrt.f6477.1%
Applied egg-rr77.1%
Final simplification36.3%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 2.6e-132)
(/
(sqrt (* C (+ (* -16.0 (* A (* C F))) (* 4.0 (* F (* B_m B_m))))))
(- (* (* 4.0 A) C) (* B_m B_m)))
(if (<= B_m 1.9e+62)
(*
(sqrt
(*
F
(/ (+ (+ A C) (hypot B_m (- A C))) (+ (* B_m B_m) (* -4.0 (* A C))))))
(- 0.0 (sqrt 2.0)))
(/ (* (sqrt F) (sqrt (* 2.0 (+ A (hypot A 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.6e-132) {
tmp = sqrt((C * ((-16.0 * (A * (C * F))) + (4.0 * (F * (B_m * B_m)))))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 1.9e+62) {
tmp = sqrt((F * (((A + C) + hypot(B_m, (A - C))) / ((B_m * B_m) + (-4.0 * (A * C)))))) * (0.0 - sqrt(2.0));
} else {
tmp = (sqrt(F) * sqrt((2.0 * (A + hypot(A, 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.6e-132) {
tmp = Math.sqrt((C * ((-16.0 * (A * (C * F))) + (4.0 * (F * (B_m * B_m)))))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 1.9e+62) {
tmp = Math.sqrt((F * (((A + C) + Math.hypot(B_m, (A - C))) / ((B_m * B_m) + (-4.0 * (A * C)))))) * (0.0 - Math.sqrt(2.0));
} else {
tmp = (Math.sqrt(F) * Math.sqrt((2.0 * (A + Math.hypot(A, 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.6e-132: tmp = math.sqrt((C * ((-16.0 * (A * (C * F))) + (4.0 * (F * (B_m * B_m)))))) / (((4.0 * A) * C) - (B_m * B_m)) elif B_m <= 1.9e+62: tmp = math.sqrt((F * (((A + C) + math.hypot(B_m, (A - C))) / ((B_m * B_m) + (-4.0 * (A * C)))))) * (0.0 - math.sqrt(2.0)) else: tmp = (math.sqrt(F) * math.sqrt((2.0 * (A + math.hypot(A, 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.6e-132) tmp = Float64(sqrt(Float64(C * Float64(Float64(-16.0 * Float64(A * Float64(C * F))) + Float64(4.0 * Float64(F * Float64(B_m * B_m)))))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); elseif (B_m <= 1.9e+62) tmp = Float64(sqrt(Float64(F * Float64(Float64(Float64(A + C) + hypot(B_m, Float64(A - C))) / Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C)))))) * Float64(0.0 - sqrt(2.0))); else tmp = Float64(Float64(sqrt(F) * sqrt(Float64(2.0 * Float64(A + hypot(A, 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.6e-132) tmp = sqrt((C * ((-16.0 * (A * (C * F))) + (4.0 * (F * (B_m * B_m)))))) / (((4.0 * A) * C) - (B_m * B_m)); elseif (B_m <= 1.9e+62) tmp = sqrt((F * (((A + C) + hypot(B_m, (A - C))) / ((B_m * B_m) + (-4.0 * (A * C)))))) * (0.0 - sqrt(2.0)); else tmp = (sqrt(F) * sqrt((2.0 * (A + hypot(A, 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.6e-132], N[(N[Sqrt[N[(C * N[(N[(-16.0 * N[(A * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 1.9e+62], N[(N[Sqrt[N[(F * N[(N[(N[(A + C), $MachinePrecision] + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(0.0 - N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[F], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(A + N[Sqrt[A ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $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.6 \cdot 10^{-132}:\\
\;\;\;\;\frac{\sqrt{C \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 4 \cdot \left(F \cdot \left(B\_m \cdot B\_m\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{elif}\;B\_m \leq 1.9 \cdot 10^{+62}:\\
\;\;\;\;\sqrt{F \cdot \frac{\left(A + C\right) + \mathsf{hypot}\left(B\_m, A - C\right)}{B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)}} \cdot \left(0 - \sqrt{2}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{F} \cdot \sqrt{2 \cdot \left(A + \mathsf{hypot}\left(A, B\_m\right)\right)}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 2.6000000000000001e-132Initial program 20.3%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified25.0%
Taylor expanded in B around 0
*-lowering-*.f64N/A
*-lowering-*.f6414.6%
Simplified14.6%
Taylor expanded in A around -inf
associate-*r*N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6414.3%
Simplified14.3%
Taylor expanded in C around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6416.7%
Simplified16.7%
if 2.6000000000000001e-132 < B < 1.89999999999999992e62Initial program 30.3%
Taylor expanded in F around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
Simplified40.1%
if 1.89999999999999992e62 < B Initial program 9.4%
Taylor expanded in C around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6455.3%
Simplified55.3%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr55.5%
unpow1/2N/A
*-commutativeN/A
associate-*r*N/A
sqrt-prodN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sqrt-lowering-sqrt.f6477.1%
Applied egg-rr77.1%
Final simplification33.7%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 7e-82)
(*
(/ -1.0 (- (* B_m B_m) (* 4.0 (* A C))))
(sqrt
(*
(+ (* B_m B_m) (* -4.0 (* A C)))
(* (+ A (+ C (hypot B_m (- A C)))) (* 2.0 F)))))
(/ (* (sqrt F) (sqrt (* 2.0 (+ A (hypot A 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 <= 7e-82) {
tmp = (-1.0 / ((B_m * B_m) - (4.0 * (A * C)))) * sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((A + (C + hypot(B_m, (A - C)))) * (2.0 * F))));
} else {
tmp = (sqrt(F) * sqrt((2.0 * (A + hypot(A, 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 <= 7e-82) {
tmp = (-1.0 / ((B_m * B_m) - (4.0 * (A * C)))) * Math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((A + (C + Math.hypot(B_m, (A - C)))) * (2.0 * F))));
} else {
tmp = (Math.sqrt(F) * Math.sqrt((2.0 * (A + Math.hypot(A, 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 <= 7e-82: tmp = (-1.0 / ((B_m * B_m) - (4.0 * (A * C)))) * math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((A + (C + math.hypot(B_m, (A - C)))) * (2.0 * F)))) else: tmp = (math.sqrt(F) * math.sqrt((2.0 * (A + math.hypot(A, 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 <= 7e-82) tmp = Float64(Float64(-1.0 / Float64(Float64(B_m * B_m) - Float64(4.0 * Float64(A * C)))) * sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(Float64(A + Float64(C + hypot(B_m, Float64(A - C)))) * Float64(2.0 * F))))); else tmp = Float64(Float64(sqrt(F) * sqrt(Float64(2.0 * Float64(A + hypot(A, 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 <= 7e-82) tmp = (-1.0 / ((B_m * B_m) - (4.0 * (A * C)))) * sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((A + (C + hypot(B_m, (A - C)))) * (2.0 * F)))); else tmp = (sqrt(F) * sqrt((2.0 * (A + hypot(A, 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, 7e-82], N[(N[(-1.0 / N[(N[(B$95$m * B$95$m), $MachinePrecision] - N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(A + N[(C + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[F], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(A + N[Sqrt[A ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $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 7 \cdot 10^{-82}:\\
\;\;\;\;\frac{-1}{B\_m \cdot B\_m - 4 \cdot \left(A \cdot C\right)} \cdot \sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(\left(A + \left(C + \mathsf{hypot}\left(B\_m, A - C\right)\right)\right) \cdot \left(2 \cdot F\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{F} \cdot \sqrt{2 \cdot \left(A + \mathsf{hypot}\left(A, B\_m\right)\right)}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 6.9999999999999997e-82Initial program 19.9%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified24.4%
Applied egg-rr25.2%
if 6.9999999999999997e-82 < B Initial program 19.0%
Taylor expanded in C around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6446.8%
Simplified46.8%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr47.0%
unpow1/2N/A
*-commutativeN/A
associate-*r*N/A
sqrt-prodN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sqrt-lowering-sqrt.f6461.7%
Applied egg-rr61.7%
Final simplification37.9%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 2.9e-82)
(*
(/ -1.0 (- (* B_m B_m) (* 4.0 (* A C))))
(sqrt
(*
(+ (* B_m B_m) (* -4.0 (* A C)))
(* (+ A (+ C (hypot B_m (- A C)))) (* 2.0 F)))))
(* (sqrt F) (/ (sqrt (* 2.0 (+ A (hypot A 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.9e-82) {
tmp = (-1.0 / ((B_m * B_m) - (4.0 * (A * C)))) * sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((A + (C + hypot(B_m, (A - C)))) * (2.0 * F))));
} else {
tmp = sqrt(F) * (sqrt((2.0 * (A + hypot(A, 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.9e-82) {
tmp = (-1.0 / ((B_m * B_m) - (4.0 * (A * C)))) * Math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((A + (C + Math.hypot(B_m, (A - C)))) * (2.0 * F))));
} else {
tmp = Math.sqrt(F) * (Math.sqrt((2.0 * (A + Math.hypot(A, 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.9e-82: tmp = (-1.0 / ((B_m * B_m) - (4.0 * (A * C)))) * math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((A + (C + math.hypot(B_m, (A - C)))) * (2.0 * F)))) else: tmp = math.sqrt(F) * (math.sqrt((2.0 * (A + math.hypot(A, 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.9e-82) tmp = Float64(Float64(-1.0 / Float64(Float64(B_m * B_m) - Float64(4.0 * Float64(A * C)))) * sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(Float64(A + Float64(C + hypot(B_m, Float64(A - C)))) * Float64(2.0 * F))))); else tmp = Float64(sqrt(F) * Float64(sqrt(Float64(2.0 * Float64(A + hypot(A, 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.9e-82) tmp = (-1.0 / ((B_m * B_m) - (4.0 * (A * C)))) * sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((A + (C + hypot(B_m, (A - C)))) * (2.0 * F)))); else tmp = sqrt(F) * (sqrt((2.0 * (A + hypot(A, 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.9e-82], N[(N[(-1.0 / N[(N[(B$95$m * B$95$m), $MachinePrecision] - N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(A + N[(C + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[F], $MachinePrecision] * N[(N[Sqrt[N[(2.0 * N[(A + N[Sqrt[A ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 2.9 \cdot 10^{-82}:\\
\;\;\;\;\frac{-1}{B\_m \cdot B\_m - 4 \cdot \left(A \cdot C\right)} \cdot \sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(\left(A + \left(C + \mathsf{hypot}\left(B\_m, A - C\right)\right)\right) \cdot \left(2 \cdot F\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{F} \cdot \frac{\sqrt{2 \cdot \left(A + \mathsf{hypot}\left(A, B\_m\right)\right)}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 2.89999999999999977e-82Initial program 19.9%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified24.4%
Applied egg-rr25.2%
if 2.89999999999999977e-82 < B Initial program 19.0%
Taylor expanded in C around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6446.8%
Simplified46.8%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr47.0%
unpow1/2N/A
*-commutativeN/A
associate-*r*N/A
sqrt-prodN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sqrt-lowering-sqrt.f6461.7%
Applied egg-rr61.7%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f6461.6%
Applied egg-rr61.6%
Final simplification37.9%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 1.25e+46)
(*
(/ -1.0 (- (* B_m B_m) (* 4.0 (* A C))))
(sqrt
(*
(+ (* B_m B_m) (* -4.0 (* A C)))
(* (+ A (+ C (hypot B_m (- A C)))) (* 2.0 F)))))
(/ (* (sqrt F) (sqrt (* 2.0 (+ B_m A)))) (- 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.25e+46) {
tmp = (-1.0 / ((B_m * B_m) - (4.0 * (A * C)))) * sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((A + (C + hypot(B_m, (A - C)))) * (2.0 * F))));
} else {
tmp = (sqrt(F) * sqrt((2.0 * (B_m + A)))) / (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.25e+46) {
tmp = (-1.0 / ((B_m * B_m) - (4.0 * (A * C)))) * Math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((A + (C + Math.hypot(B_m, (A - C)))) * (2.0 * F))));
} else {
tmp = (Math.sqrt(F) * Math.sqrt((2.0 * (B_m + A)))) / (0.0 - B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 1.25e+46: tmp = (-1.0 / ((B_m * B_m) - (4.0 * (A * C)))) * math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((A + (C + math.hypot(B_m, (A - C)))) * (2.0 * F)))) else: tmp = (math.sqrt(F) * math.sqrt((2.0 * (B_m + A)))) / (0.0 - B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 1.25e+46) tmp = Float64(Float64(-1.0 / Float64(Float64(B_m * B_m) - Float64(4.0 * Float64(A * C)))) * sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(Float64(A + Float64(C + hypot(B_m, Float64(A - C)))) * Float64(2.0 * F))))); else tmp = Float64(Float64(sqrt(F) * sqrt(Float64(2.0 * Float64(B_m + A)))) / 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.25e+46) tmp = (-1.0 / ((B_m * B_m) - (4.0 * (A * C)))) * sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((A + (C + hypot(B_m, (A - C)))) * (2.0 * F)))); else tmp = (sqrt(F) * sqrt((2.0 * (B_m + A)))) / (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.25e+46], N[(N[(-1.0 / N[(N[(B$95$m * B$95$m), $MachinePrecision] - N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(A + N[(C + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[F], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(B$95$m + A), $MachinePrecision]), $MachinePrecision]], $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.25 \cdot 10^{+46}:\\
\;\;\;\;\frac{-1}{B\_m \cdot B\_m - 4 \cdot \left(A \cdot C\right)} \cdot \sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(\left(A + \left(C + \mathsf{hypot}\left(B\_m, A - C\right)\right)\right) \cdot \left(2 \cdot F\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{F} \cdot \sqrt{2 \cdot \left(B\_m + A\right)}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 1.2500000000000001e46Initial program 22.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.4%
Applied egg-rr27.3%
if 1.2500000000000001e46 < B Initial program 9.3%
Taylor expanded in C around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6454.4%
Simplified54.4%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr54.6%
unpow1/2N/A
*-commutativeN/A
associate-*r*N/A
sqrt-prodN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sqrt-lowering-sqrt.f6475.8%
Applied egg-rr75.8%
Taylor expanded in A around 0
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6471.6%
Simplified71.6%
Final simplification37.2%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 3e+48)
(/
(sqrt
(*
(+ A (+ C (hypot B_m (- A C))))
(* 2.0 (* F (+ (* B_m B_m) (* -4.0 (* A C)))))))
(- (* (* 4.0 A) C) (* B_m B_m)))
(/ (* (sqrt F) (sqrt (* 2.0 (+ B_m A)))) (- 0.0 B_m))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 3e+48) {
tmp = sqrt(((A + (C + hypot(B_m, (A - C)))) * (2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C))))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = (sqrt(F) * sqrt((2.0 * (B_m + A)))) / (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 <= 3e+48) {
tmp = Math.sqrt(((A + (C + Math.hypot(B_m, (A - C)))) * (2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C))))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = (Math.sqrt(F) * Math.sqrt((2.0 * (B_m + A)))) / (0.0 - B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 3e+48: tmp = math.sqrt(((A + (C + math.hypot(B_m, (A - C)))) * (2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C))))))) / (((4.0 * A) * C) - (B_m * B_m)) else: tmp = (math.sqrt(F) * math.sqrt((2.0 * (B_m + A)))) / (0.0 - B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 3e+48) tmp = Float64(sqrt(Float64(Float64(A + Float64(C + hypot(B_m, Float64(A - C)))) * Float64(2.0 * Float64(F * Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))))))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); else tmp = Float64(Float64(sqrt(F) * sqrt(Float64(2.0 * Float64(B_m + A)))) / 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 <= 3e+48) tmp = sqrt(((A + (C + hypot(B_m, (A - C)))) * (2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C))))))) / (((4.0 * A) * C) - (B_m * B_m)); else tmp = (sqrt(F) * sqrt((2.0 * (B_m + A)))) / (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, 3e+48], N[(N[Sqrt[N[(N[(A + N[(C + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(F * N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[F], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(B$95$m + A), $MachinePrecision]), $MachinePrecision]], $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 3 \cdot 10^{+48}:\\
\;\;\;\;\frac{\sqrt{\left(A + \left(C + \mathsf{hypot}\left(B\_m, A - C\right)\right)\right) \cdot \left(2 \cdot \left(F \cdot \left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{F} \cdot \sqrt{2 \cdot \left(B\_m + A\right)}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 3e48Initial program 22.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.4%
Applied egg-rr27.0%
if 3e48 < B Initial program 9.3%
Taylor expanded in C around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6454.4%
Simplified54.4%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr54.6%
unpow1/2N/A
*-commutativeN/A
associate-*r*N/A
sqrt-prodN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sqrt-lowering-sqrt.f6475.8%
Applied egg-rr75.8%
Taylor expanded in A around 0
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6471.6%
Simplified71.6%
Final simplification36.9%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 6.5e-40)
(/
(sqrt (* C (+ (* -16.0 (* A (* C F))) (* 4.0 (* F (* B_m B_m))))))
(- (* (* 4.0 A) C) (* B_m B_m)))
(/ (* (sqrt F) (sqrt (* 2.0 (+ B_m A)))) (- 0.0 B_m))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 6.5e-40) {
tmp = sqrt((C * ((-16.0 * (A * (C * F))) + (4.0 * (F * (B_m * B_m)))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = (sqrt(F) * sqrt((2.0 * (B_m + A)))) / (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 <= 6.5d-40) then
tmp = sqrt((c * (((-16.0d0) * (a * (c * f))) + (4.0d0 * (f * (b_m * b_m)))))) / (((4.0d0 * a) * c) - (b_m * b_m))
else
tmp = (sqrt(f) * sqrt((2.0d0 * (b_m + a)))) / (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 <= 6.5e-40) {
tmp = Math.sqrt((C * ((-16.0 * (A * (C * F))) + (4.0 * (F * (B_m * B_m)))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = (Math.sqrt(F) * Math.sqrt((2.0 * (B_m + A)))) / (0.0 - B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 6.5e-40: tmp = math.sqrt((C * ((-16.0 * (A * (C * F))) + (4.0 * (F * (B_m * B_m)))))) / (((4.0 * A) * C) - (B_m * B_m)) else: tmp = (math.sqrt(F) * math.sqrt((2.0 * (B_m + A)))) / (0.0 - B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 6.5e-40) tmp = Float64(sqrt(Float64(C * Float64(Float64(-16.0 * Float64(A * Float64(C * F))) + Float64(4.0 * Float64(F * Float64(B_m * B_m)))))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); else tmp = Float64(Float64(sqrt(F) * sqrt(Float64(2.0 * Float64(B_m + A)))) / 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 <= 6.5e-40) tmp = sqrt((C * ((-16.0 * (A * (C * F))) + (4.0 * (F * (B_m * B_m)))))) / (((4.0 * A) * C) - (B_m * B_m)); else tmp = (sqrt(F) * sqrt((2.0 * (B_m + A)))) / (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, 6.5e-40], N[(N[Sqrt[N[(C * N[(N[(-16.0 * N[(A * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[F], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(B$95$m + A), $MachinePrecision]), $MachinePrecision]], $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 6.5 \cdot 10^{-40}:\\
\;\;\;\;\frac{\sqrt{C \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 4 \cdot \left(F \cdot \left(B\_m \cdot B\_m\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{F} \cdot \sqrt{2 \cdot \left(B\_m + A\right)}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 6.4999999999999999e-40Initial program 20.1%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified24.4%
Taylor expanded in B around 0
*-lowering-*.f64N/A
*-lowering-*.f6413.6%
Simplified13.6%
Taylor expanded in A around -inf
associate-*r*N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6415.0%
Simplified15.0%
Taylor expanded in C around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6417.1%
Simplified17.1%
if 6.4999999999999999e-40 < B Initial program 18.2%
Taylor expanded in C around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6453.5%
Simplified53.5%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr53.8%
unpow1/2N/A
*-commutativeN/A
associate-*r*N/A
sqrt-prodN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sqrt-lowering-sqrt.f6469.9%
Applied egg-rr69.9%
Taylor expanded in A around 0
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6466.6%
Simplified66.6%
Final simplification31.6%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 1.9e-40)
(/
(sqrt (* C (+ (* -16.0 (* A (* C F))) (* 4.0 (* F (* B_m B_m))))))
(- (* (* 4.0 A) C) (* B_m B_m)))
(/ (* (sqrt F) (sqrt (* 2.0 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.9e-40) {
tmp = sqrt((C * ((-16.0 * (A * (C * F))) + (4.0 * (F * (B_m * B_m)))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = (sqrt(F) * sqrt((2.0 * 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 <= 1.9d-40) then
tmp = sqrt((c * (((-16.0d0) * (a * (c * f))) + (4.0d0 * (f * (b_m * b_m)))))) / (((4.0d0 * a) * c) - (b_m * b_m))
else
tmp = (sqrt(f) * sqrt((2.0d0 * 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 <= 1.9e-40) {
tmp = Math.sqrt((C * ((-16.0 * (A * (C * F))) + (4.0 * (F * (B_m * B_m)))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = (Math.sqrt(F) * Math.sqrt((2.0 * 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.9e-40: tmp = math.sqrt((C * ((-16.0 * (A * (C * F))) + (4.0 * (F * (B_m * B_m)))))) / (((4.0 * A) * C) - (B_m * B_m)) else: tmp = (math.sqrt(F) * math.sqrt((2.0 * 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.9e-40) tmp = Float64(sqrt(Float64(C * Float64(Float64(-16.0 * Float64(A * Float64(C * F))) + Float64(4.0 * Float64(F * Float64(B_m * B_m)))))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); else tmp = Float64(Float64(sqrt(F) * sqrt(Float64(2.0 * 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.9e-40) tmp = sqrt((C * ((-16.0 * (A * (C * F))) + (4.0 * (F * (B_m * B_m)))))) / (((4.0 * A) * C) - (B_m * B_m)); else tmp = (sqrt(F) * sqrt((2.0 * 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.9e-40], N[(N[Sqrt[N[(C * N[(N[(-16.0 * N[(A * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[F], $MachinePrecision] * N[Sqrt[N[(2.0 * B$95$m), $MachinePrecision]], $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.9 \cdot 10^{-40}:\\
\;\;\;\;\frac{\sqrt{C \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 4 \cdot \left(F \cdot \left(B\_m \cdot B\_m\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{F} \cdot \sqrt{2 \cdot B\_m}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 1.8999999999999999e-40Initial program 20.1%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified24.4%
Taylor expanded in B around 0
*-lowering-*.f64N/A
*-lowering-*.f6413.6%
Simplified13.6%
Taylor expanded in A around -inf
associate-*r*N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6415.0%
Simplified15.0%
Taylor expanded in C around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6417.1%
Simplified17.1%
if 1.8999999999999999e-40 < B Initial program 18.2%
Taylor expanded in C around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6453.5%
Simplified53.5%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr53.8%
unpow1/2N/A
*-commutativeN/A
associate-*r*N/A
sqrt-prodN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sqrt-lowering-sqrt.f6469.9%
Applied egg-rr69.9%
Taylor expanded in A around 0
*-commutativeN/A
*-lowering-*.f6466.1%
Simplified66.1%
Final simplification31.4%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= F 2.4e-33)
(/
(pow (+ (* 2.0 (* B_m F)) (* A (+ (* 2.0 F) (/ (* A F) B_m)))) 0.5)
(- 0.0 B_m))
(* (- 0.0 (sqrt 2.0)) (sqrt (/ F B_m)))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (F <= 2.4e-33) {
tmp = pow(((2.0 * (B_m * F)) + (A * ((2.0 * F) + ((A * F) / B_m)))), 0.5) / (0.0 - B_m);
} else {
tmp = (0.0 - sqrt(2.0)) * sqrt((F / 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 <= 2.4d-33) then
tmp = (((2.0d0 * (b_m * f)) + (a * ((2.0d0 * f) + ((a * f) / b_m)))) ** 0.5d0) / (0.0d0 - b_m)
else
tmp = (0.0d0 - sqrt(2.0d0)) * sqrt((f / 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 <= 2.4e-33) {
tmp = Math.pow(((2.0 * (B_m * F)) + (A * ((2.0 * F) + ((A * F) / B_m)))), 0.5) / (0.0 - B_m);
} else {
tmp = (0.0 - Math.sqrt(2.0)) * Math.sqrt((F / B_m));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if F <= 2.4e-33: tmp = math.pow(((2.0 * (B_m * F)) + (A * ((2.0 * F) + ((A * F) / B_m)))), 0.5) / (0.0 - B_m) else: tmp = (0.0 - math.sqrt(2.0)) * math.sqrt((F / B_m)) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (F <= 2.4e-33) tmp = Float64((Float64(Float64(2.0 * Float64(B_m * F)) + Float64(A * Float64(Float64(2.0 * F) + Float64(Float64(A * F) / B_m)))) ^ 0.5) / Float64(0.0 - B_m)); else tmp = Float64(Float64(0.0 - sqrt(2.0)) * sqrt(Float64(F / B_m))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (F <= 2.4e-33) tmp = (((2.0 * (B_m * F)) + (A * ((2.0 * F) + ((A * F) / B_m)))) ^ 0.5) / (0.0 - B_m); else tmp = (0.0 - sqrt(2.0)) * sqrt((F / B_m)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[F, 2.4e-33], N[(N[Power[N[(N[(2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision] + N[(A * N[(N[(2.0 * F), $MachinePrecision] + N[(N[(A * F), $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(0.0 - N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(F / B$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;F \leq 2.4 \cdot 10^{-33}:\\
\;\;\;\;\frac{{\left(2 \cdot \left(B\_m \cdot F\right) + A \cdot \left(2 \cdot F + \frac{A \cdot F}{B\_m}\right)\right)}^{0.5}}{0 - B\_m}\\
\mathbf{else}:\\
\;\;\;\;\left(0 - \sqrt{2}\right) \cdot \sqrt{\frac{F}{B\_m}}\\
\end{array}
\end{array}
if F < 2.4e-33Initial program 23.3%
Taylor expanded in C around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6425.9%
Simplified25.9%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr26.1%
Taylor expanded in A around 0
+-lowering-+.f64N/A
rem-square-sqrtN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
rem-square-sqrtN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
rem-square-sqrtN/A
/-lowering-/.f64N/A
*-lowering-*.f6422.6%
Simplified22.6%
if 2.4e-33 < F Initial program 15.8%
Taylor expanded in B around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f6419.3%
Simplified19.3%
Final simplification20.9%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 1.5e-40)
(/
(sqrt (* C (+ (* -16.0 (* A (* C F))) (* 4.0 (* F (* B_m B_m))))))
(- (* (* 4.0 A) C) (* B_m B_m)))
(/
(pow (+ (* 2.0 (* B_m F)) (* A (+ (* 2.0 F) (/ (* A F) B_m)))) 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 <= 1.5e-40) {
tmp = sqrt((C * ((-16.0 * (A * (C * F))) + (4.0 * (F * (B_m * B_m)))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = pow(((2.0 * (B_m * F)) + (A * ((2.0 * F) + ((A * F) / B_m)))), 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 <= 1.5d-40) then
tmp = sqrt((c * (((-16.0d0) * (a * (c * f))) + (4.0d0 * (f * (b_m * b_m)))))) / (((4.0d0 * a) * c) - (b_m * b_m))
else
tmp = (((2.0d0 * (b_m * f)) + (a * ((2.0d0 * f) + ((a * f) / b_m)))) ** 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 <= 1.5e-40) {
tmp = Math.sqrt((C * ((-16.0 * (A * (C * F))) + (4.0 * (F * (B_m * B_m)))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = Math.pow(((2.0 * (B_m * F)) + (A * ((2.0 * F) + ((A * F) / B_m)))), 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 <= 1.5e-40: tmp = math.sqrt((C * ((-16.0 * (A * (C * F))) + (4.0 * (F * (B_m * B_m)))))) / (((4.0 * A) * C) - (B_m * B_m)) else: tmp = math.pow(((2.0 * (B_m * F)) + (A * ((2.0 * F) + ((A * F) / B_m)))), 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 <= 1.5e-40) tmp = Float64(sqrt(Float64(C * Float64(Float64(-16.0 * Float64(A * Float64(C * F))) + Float64(4.0 * Float64(F * Float64(B_m * B_m)))))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); else tmp = Float64((Float64(Float64(2.0 * Float64(B_m * F)) + Float64(A * Float64(Float64(2.0 * F) + Float64(Float64(A * F) / B_m)))) ^ 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 <= 1.5e-40) tmp = sqrt((C * ((-16.0 * (A * (C * F))) + (4.0 * (F * (B_m * B_m)))))) / (((4.0 * A) * C) - (B_m * B_m)); else tmp = (((2.0 * (B_m * F)) + (A * ((2.0 * F) + ((A * F) / B_m)))) ^ 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, 1.5e-40], N[(N[Sqrt[N[(C * N[(N[(-16.0 * N[(A * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(N[(2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision] + N[(A * N[(N[(2.0 * F), $MachinePrecision] + N[(N[(A * F), $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision]), $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 1.5 \cdot 10^{-40}:\\
\;\;\;\;\frac{\sqrt{C \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 4 \cdot \left(F \cdot \left(B\_m \cdot B\_m\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) + A \cdot \left(2 \cdot F + \frac{A \cdot F}{B\_m}\right)\right)}^{0.5}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 1.5000000000000001e-40Initial program 20.1%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified24.4%
Taylor expanded in B around 0
*-lowering-*.f64N/A
*-lowering-*.f6413.6%
Simplified13.6%
Taylor expanded in A around -inf
associate-*r*N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6415.0%
Simplified15.0%
Taylor expanded in C around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6417.1%
Simplified17.1%
if 1.5000000000000001e-40 < B Initial program 18.2%
Taylor expanded in C around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6453.5%
Simplified53.5%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr53.8%
Taylor expanded in A around 0
+-lowering-+.f64N/A
rem-square-sqrtN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
rem-square-sqrtN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
rem-square-sqrtN/A
/-lowering-/.f64N/A
*-lowering-*.f6450.7%
Simplified50.7%
Final simplification26.9%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 1.15e-44)
(/ (sqrt (* -16.0 (* F (* A (* C C))))) (- (* (* 4.0 A) C) (* B_m B_m)))
(/
(pow (+ (* 2.0 (* B_m F)) (* A (+ (* 2.0 F) (/ (* A F) B_m)))) 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 <= 1.15e-44) {
tmp = sqrt((-16.0 * (F * (A * (C * C))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = pow(((2.0 * (B_m * F)) + (A * ((2.0 * F) + ((A * F) / B_m)))), 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 <= 1.15d-44) then
tmp = sqrt(((-16.0d0) * (f * (a * (c * c))))) / (((4.0d0 * a) * c) - (b_m * b_m))
else
tmp = (((2.0d0 * (b_m * f)) + (a * ((2.0d0 * f) + ((a * f) / b_m)))) ** 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 <= 1.15e-44) {
tmp = Math.sqrt((-16.0 * (F * (A * (C * C))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = Math.pow(((2.0 * (B_m * F)) + (A * ((2.0 * F) + ((A * F) / B_m)))), 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 <= 1.15e-44: tmp = math.sqrt((-16.0 * (F * (A * (C * C))))) / (((4.0 * A) * C) - (B_m * B_m)) else: tmp = math.pow(((2.0 * (B_m * F)) + (A * ((2.0 * F) + ((A * F) / B_m)))), 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 <= 1.15e-44) tmp = Float64(sqrt(Float64(-16.0 * Float64(F * Float64(A * Float64(C * C))))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); else tmp = Float64((Float64(Float64(2.0 * Float64(B_m * F)) + Float64(A * Float64(Float64(2.0 * F) + Float64(Float64(A * F) / B_m)))) ^ 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 <= 1.15e-44) tmp = sqrt((-16.0 * (F * (A * (C * C))))) / (((4.0 * A) * C) - (B_m * B_m)); else tmp = (((2.0 * (B_m * F)) + (A * ((2.0 * F) + ((A * F) / B_m)))) ^ 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, 1.15e-44], N[(N[Sqrt[N[(-16.0 * N[(F * N[(A * N[(C * 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[(N[(2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision] + N[(A * N[(N[(2.0 * F), $MachinePrecision] + N[(N[(A * F), $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision]), $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 1.15 \cdot 10^{-44}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(F \cdot \left(A \cdot \left(C \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) + A \cdot \left(2 \cdot F + \frac{A \cdot F}{B\_m}\right)\right)}^{0.5}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 1.14999999999999999e-44Initial program 19.8%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified24.1%
Taylor expanded in B around 0
*-lowering-*.f64N/A
*-lowering-*.f6413.7%
Simplified13.7%
Taylor expanded in A around -inf
associate-*r*N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6414.5%
Simplified14.5%
Taylor expanded in A around inf
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6415.2%
Simplified15.2%
if 1.14999999999999999e-44 < B Initial program 19.0%
Taylor expanded in C around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6452.3%
Simplified52.3%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr52.6%
Taylor expanded in A around 0
+-lowering-+.f64N/A
rem-square-sqrtN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
rem-square-sqrtN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
rem-square-sqrtN/A
/-lowering-/.f64N/A
*-lowering-*.f6449.6%
Simplified49.6%
Final simplification25.5%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= B_m 8.5e-42) (/ (sqrt (* -16.0 (* F (* A (* C C))))) (- (* (* 4.0 A) C) (* B_m B_m))) (/ (pow (* 2.0 (* F (+ B_m A))) 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 <= 8.5e-42) {
tmp = sqrt((-16.0 * (F * (A * (C * C))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = pow((2.0 * (F * (B_m + A))), 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 <= 8.5d-42) then
tmp = sqrt(((-16.0d0) * (f * (a * (c * c))))) / (((4.0d0 * a) * c) - (b_m * b_m))
else
tmp = ((2.0d0 * (f * (b_m + a))) ** 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 <= 8.5e-42) {
tmp = Math.sqrt((-16.0 * (F * (A * (C * C))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = Math.pow((2.0 * (F * (B_m + A))), 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 <= 8.5e-42: tmp = math.sqrt((-16.0 * (F * (A * (C * C))))) / (((4.0 * A) * C) - (B_m * B_m)) else: tmp = math.pow((2.0 * (F * (B_m + A))), 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 <= 8.5e-42) tmp = Float64(sqrt(Float64(-16.0 * Float64(F * Float64(A * Float64(C * C))))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); else tmp = Float64((Float64(2.0 * Float64(F * Float64(B_m + A))) ^ 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 <= 8.5e-42) tmp = sqrt((-16.0 * (F * (A * (C * C))))) / (((4.0 * A) * C) - (B_m * B_m)); else tmp = ((2.0 * (F * (B_m + A))) ^ 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, 8.5e-42], N[(N[Sqrt[N[(-16.0 * N[(F * N[(A * N[(C * 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[(F * N[(B$95$m + A), $MachinePrecision]), $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 8.5 \cdot 10^{-42}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(F \cdot \left(A \cdot \left(C \cdot C\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(2 \cdot \left(F \cdot \left(B\_m + A\right)\right)\right)}^{0.5}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 8.4999999999999996e-42Initial program 19.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified24.0%
Taylor expanded in B around 0
*-lowering-*.f64N/A
*-lowering-*.f6413.7%
Simplified13.7%
Taylor expanded in A around -inf
associate-*r*N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6414.5%
Simplified14.5%
Taylor expanded in A around inf
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6415.1%
Simplified15.1%
if 8.4999999999999996e-42 < B Initial program 19.3%
Taylor expanded in C around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6453.0%
Simplified53.0%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr53.2%
Taylor expanded in A around 0
distribute-lft-outN/A
rem-square-sqrtN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
rem-square-sqrtN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6449.9%
Simplified49.9%
Final simplification25.4%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= B_m 1.52e-40) (/ (sqrt (* -16.0 (* A (* F (* A C))))) (- (* (* 4.0 A) C) (* B_m B_m))) (/ (pow (* B_m (* 2.0 (+ F (/ (* A F) B_m)))) 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 <= 1.52e-40) {
tmp = sqrt((-16.0 * (A * (F * (A * C))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = pow((B_m * (2.0 * (F + ((A * F) / B_m)))), 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 <= 1.52d-40) then
tmp = sqrt(((-16.0d0) * (a * (f * (a * c))))) / (((4.0d0 * a) * c) - (b_m * b_m))
else
tmp = ((b_m * (2.0d0 * (f + ((a * f) / b_m)))) ** 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 <= 1.52e-40) {
tmp = Math.sqrt((-16.0 * (A * (F * (A * C))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = Math.pow((B_m * (2.0 * (F + ((A * F) / B_m)))), 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 <= 1.52e-40: tmp = math.sqrt((-16.0 * (A * (F * (A * C))))) / (((4.0 * A) * C) - (B_m * B_m)) else: tmp = math.pow((B_m * (2.0 * (F + ((A * F) / B_m)))), 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 <= 1.52e-40) tmp = Float64(sqrt(Float64(-16.0 * Float64(A * Float64(F * Float64(A * C))))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); else tmp = Float64((Float64(B_m * Float64(2.0 * Float64(F + Float64(Float64(A * F) / B_m)))) ^ 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 <= 1.52e-40) tmp = sqrt((-16.0 * (A * (F * (A * C))))) / (((4.0 * A) * C) - (B_m * B_m)); else tmp = ((B_m * (2.0 * (F + ((A * F) / B_m)))) ^ 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, 1.52e-40], N[(N[Sqrt[N[(-16.0 * N[(A * N[(F * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(B$95$m * N[(2.0 * N[(F + N[(N[(A * F), $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision]), $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 1.52 \cdot 10^{-40}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(A \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(B\_m \cdot \left(2 \cdot \left(F + \frac{A \cdot F}{B\_m}\right)\right)\right)}^{0.5}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 1.51999999999999992e-40Initial program 20.1%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified24.4%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f648.0%
Simplified8.0%
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6413.8%
Applied egg-rr13.8%
if 1.51999999999999992e-40 < B Initial program 18.2%
Taylor expanded in C around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6453.5%
Simplified53.5%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr53.8%
Taylor expanded in B around inf
*-lowering-*.f64N/A
distribute-lft-outN/A
rem-square-sqrtN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
rem-square-sqrtN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6450.5%
Simplified50.5%
Final simplification24.6%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= B_m 1.25e-42) (/ (pow (/ (* F (* B_m B_m)) (- 0.0 A)) 0.5) (- 0.0 B_m)) (/ (pow (* 2.0 (* F (+ B_m A))) 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 <= 1.25e-42) {
tmp = pow(((F * (B_m * B_m)) / (0.0 - A)), 0.5) / (0.0 - B_m);
} else {
tmp = pow((2.0 * (F * (B_m + A))), 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 <= 1.25d-42) then
tmp = (((f * (b_m * b_m)) / (0.0d0 - a)) ** 0.5d0) / (0.0d0 - b_m)
else
tmp = ((2.0d0 * (f * (b_m + a))) ** 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 <= 1.25e-42) {
tmp = Math.pow(((F * (B_m * B_m)) / (0.0 - A)), 0.5) / (0.0 - B_m);
} else {
tmp = Math.pow((2.0 * (F * (B_m + A))), 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 <= 1.25e-42: tmp = math.pow(((F * (B_m * B_m)) / (0.0 - A)), 0.5) / (0.0 - B_m) else: tmp = math.pow((2.0 * (F * (B_m + A))), 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 <= 1.25e-42) tmp = Float64((Float64(Float64(F * Float64(B_m * B_m)) / Float64(0.0 - A)) ^ 0.5) / Float64(0.0 - B_m)); else tmp = Float64((Float64(2.0 * Float64(F * Float64(B_m + A))) ^ 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 <= 1.25e-42) tmp = (((F * (B_m * B_m)) / (0.0 - A)) ^ 0.5) / (0.0 - B_m); else tmp = ((2.0 * (F * (B_m + A))) ^ 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, 1.25e-42], N[(N[Power[N[(N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] / N[(0.0 - A), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(2.0 * N[(F * N[(B$95$m + A), $MachinePrecision]), $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 1.25 \cdot 10^{-42}:\\
\;\;\;\;\frac{{\left(\frac{F \cdot \left(B\_m \cdot B\_m\right)}{0 - A}\right)}^{0.5}}{0 - B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(2 \cdot \left(F \cdot \left(B\_m + A\right)\right)\right)}^{0.5}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 1.25000000000000001e-42Initial program 19.7%
Taylor expanded in C around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f644.1%
Simplified4.1%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr4.1%
Taylor expanded in A around -inf
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f645.1%
Simplified5.1%
if 1.25000000000000001e-42 < B Initial program 19.3%
Taylor expanded in C around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6453.0%
Simplified53.0%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr53.2%
Taylor expanded in A around 0
distribute-lft-outN/A
rem-square-sqrtN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
rem-square-sqrtN/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
+-lowering-+.f6449.9%
Simplified49.9%
Final simplification18.4%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= A 3.4e-307) (* (sqrt (* C F)) (/ -2.0 B_m)) (* (/ -2.0 B_m) (sqrt (* A F)))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (A <= 3.4e-307) {
tmp = sqrt((C * F)) * (-2.0 / B_m);
} else {
tmp = (-2.0 / B_m) * sqrt((A * F));
}
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 (a <= 3.4d-307) then
tmp = sqrt((c * f)) * ((-2.0d0) / b_m)
else
tmp = ((-2.0d0) / b_m) * sqrt((a * f))
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 (A <= 3.4e-307) {
tmp = Math.sqrt((C * F)) * (-2.0 / B_m);
} else {
tmp = (-2.0 / B_m) * Math.sqrt((A * F));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if A <= 3.4e-307: tmp = math.sqrt((C * F)) * (-2.0 / B_m) else: tmp = (-2.0 / B_m) * math.sqrt((A * F)) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (A <= 3.4e-307) tmp = Float64(sqrt(Float64(C * F)) * Float64(-2.0 / B_m)); else tmp = Float64(Float64(-2.0 / B_m) * sqrt(Float64(A * F))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (A <= 3.4e-307) tmp = sqrt((C * F)) * (-2.0 / B_m); else tmp = (-2.0 / B_m) * sqrt((A * F)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[A, 3.4e-307], N[(N[Sqrt[N[(C * F), $MachinePrecision]], $MachinePrecision] * N[(-2.0 / B$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(-2.0 / B$95$m), $MachinePrecision] * N[Sqrt[N[(A * F), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;A \leq 3.4 \cdot 10^{-307}:\\
\;\;\;\;\sqrt{C \cdot F} \cdot \frac{-2}{B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{-2}{B\_m} \cdot \sqrt{A \cdot F}\\
\end{array}
\end{array}
if A < 3.39999999999999989e-307Initial program 15.1%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified17.3%
Taylor expanded in A around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f648.2%
Simplified8.2%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
rem-square-sqrtN/A
unpow2N/A
associate-/l*N/A
/-lowering-/.f64N/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
rem-square-sqrtN/A
unpow2N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
rem-square-sqrtN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
unpow2N/A
Simplified16.2%
Taylor expanded in B around 0
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
rem-square-sqrtN/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f642.9%
Simplified2.9%
if 3.39999999999999989e-307 < A Initial program 24.1%
Taylor expanded in C around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6421.6%
Simplified21.6%
*-commutativeN/A
pow1/2N/A
unpow-prod-downN/A
associate-*l*N/A
*-lowering-*.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f6425.8%
Applied egg-rr25.8%
Taylor expanded in A around inf
mul-1-negN/A
associate-*r/N/A
neg-lowering-neg.f64N/A
associate-*r/N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
rem-square-sqrt5.8%
Simplified5.8%
*-commutativeN/A
distribute-lft-neg-inN/A
*-lowering-*.f64N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
metadata-evalN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f645.8%
Applied egg-rr5.8%
Final simplification4.4%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= A 2.2e-305) (* (sqrt (* C F)) (/ -2.0 B_m)) (* -2.0 (/ (sqrt (* A F)) B_m))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (A <= 2.2e-305) {
tmp = sqrt((C * F)) * (-2.0 / B_m);
} else {
tmp = -2.0 * (sqrt((A * F)) / 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 (a <= 2.2d-305) then
tmp = sqrt((c * f)) * ((-2.0d0) / b_m)
else
tmp = (-2.0d0) * (sqrt((a * f)) / 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 (A <= 2.2e-305) {
tmp = Math.sqrt((C * F)) * (-2.0 / B_m);
} else {
tmp = -2.0 * (Math.sqrt((A * F)) / B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if A <= 2.2e-305: tmp = math.sqrt((C * F)) * (-2.0 / B_m) else: tmp = -2.0 * (math.sqrt((A * F)) / B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (A <= 2.2e-305) tmp = Float64(sqrt(Float64(C * F)) * Float64(-2.0 / B_m)); else tmp = Float64(-2.0 * Float64(sqrt(Float64(A * F)) / B_m)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (A <= 2.2e-305) tmp = sqrt((C * F)) * (-2.0 / B_m); else tmp = -2.0 * (sqrt((A * F)) / B_m); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[A, 2.2e-305], N[(N[Sqrt[N[(C * F), $MachinePrecision]], $MachinePrecision] * N[(-2.0 / B$95$m), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(N[Sqrt[N[(A * F), $MachinePrecision]], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;A \leq 2.2 \cdot 10^{-305}:\\
\;\;\;\;\sqrt{C \cdot F} \cdot \frac{-2}{B\_m}\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \frac{\sqrt{A \cdot F}}{B\_m}\\
\end{array}
\end{array}
if A < 2.19999999999999997e-305Initial program 15.1%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified17.3%
Taylor expanded in A around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f648.2%
Simplified8.2%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
rem-square-sqrtN/A
unpow2N/A
associate-/l*N/A
/-lowering-/.f64N/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
rem-square-sqrtN/A
unpow2N/A
sqrt-lowering-sqrt.f64N/A
unpow2N/A
rem-square-sqrtN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
unpow2N/A
Simplified16.2%
Taylor expanded in B around 0
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
rem-square-sqrtN/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f642.9%
Simplified2.9%
if 2.19999999999999997e-305 < A Initial program 24.1%
Taylor expanded in C around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6421.6%
Simplified21.6%
*-commutativeN/A
pow1/2N/A
unpow-prod-downN/A
associate-*l*N/A
*-lowering-*.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f6425.8%
Applied egg-rr25.8%
Taylor expanded in A around inf
mul-1-negN/A
associate-*r/N/A
neg-lowering-neg.f64N/A
associate-*r/N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
rem-square-sqrt5.8%
Simplified5.8%
associate-*r/N/A
distribute-neg-frac2N/A
*-commutativeN/A
neg-mul-1N/A
times-fracN/A
metadata-evalN/A
metadata-evalN/A
*-lowering-*.f64N/A
metadata-evalN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f645.8%
Applied egg-rr5.8%
Final simplification4.4%
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 19.6%
Taylor expanded in C around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6418.6%
Simplified18.6%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr18.7%
Taylor expanded in A around 0
rem-square-sqrtN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
rem-square-sqrtN/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 (* B_m F))) (- 0.0 B_m)))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
return sqrt((2.0 * (B_m * F))) / (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((2.0d0 * (b_m * f))) / (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((2.0 * (B_m * F))) / (0.0 - B_m);
}
B_m = math.fabs(B) def code(A, B_m, C, F): return math.sqrt((2.0 * (B_m * F))) / (0.0 - B_m)
B_m = abs(B) function code(A, B_m, C, F) return Float64(sqrt(Float64(2.0 * Float64(B_m * F))) / Float64(0.0 - B_m)) end
B_m = abs(B); function tmp = code(A, B_m, C, F) tmp = sqrt((2.0 * (B_m * F))) / (0.0 - B_m); end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := N[(N[Sqrt[N[(2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|
\\
\frac{\sqrt{2 \cdot \left(B\_m \cdot F\right)}}{0 - B\_m}
\end{array}
Initial program 19.6%
Taylor expanded in C around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6418.6%
Simplified18.6%
Taylor expanded in A around 0
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6416.3%
Simplified16.3%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6416.3%
Applied egg-rr16.3%
Final simplification16.3%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (* -2.0 (/ (sqrt (* A F)) B_m)))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
return -2.0 * (sqrt((A * 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 = (-2.0d0) * (sqrt((a * f)) / b_m)
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
return -2.0 * (Math.sqrt((A * F)) / B_m);
}
B_m = math.fabs(B) def code(A, B_m, C, F): return -2.0 * (math.sqrt((A * F)) / B_m)
B_m = abs(B) function code(A, B_m, C, F) return Float64(-2.0 * Float64(sqrt(Float64(A * F)) / B_m)) end
B_m = abs(B); function tmp = code(A, B_m, C, F) tmp = -2.0 * (sqrt((A * F)) / B_m); end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := N[(-2.0 * N[(N[Sqrt[N[(A * F), $MachinePrecision]], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|
\\
-2 \cdot \frac{\sqrt{A \cdot F}}{B\_m}
\end{array}
Initial program 19.6%
Taylor expanded in C around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6418.6%
Simplified18.6%
*-commutativeN/A
pow1/2N/A
unpow-prod-downN/A
associate-*l*N/A
*-lowering-*.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f6423.7%
Applied egg-rr23.7%
Taylor expanded in A around inf
mul-1-negN/A
associate-*r/N/A
neg-lowering-neg.f64N/A
associate-*r/N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
rem-square-sqrt3.2%
Simplified3.2%
associate-*r/N/A
distribute-neg-frac2N/A
*-commutativeN/A
neg-mul-1N/A
times-fracN/A
metadata-evalN/A
metadata-evalN/A
*-lowering-*.f64N/A
metadata-evalN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f643.2%
Applied egg-rr3.2%
herbie shell --seed 2024150
(FPCore (A B C F)
:name "ABCF->ab-angle a"
:precision binary64
(/ (- (sqrt (* (* 2.0 (* (- (pow B 2.0) (* (* 4.0 A) C)) F)) (+ (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))) (- (pow B 2.0) (* (* 4.0 A) C))))