
(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 19 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 (* (* 4.0 A) C))
(t_1
(/
(sqrt
(*
(* 2.0 (* (- (pow B_m 2.0) t_0) F))
(- (+ A C) (sqrt (+ (pow B_m 2.0) (pow (- A C) 2.0))))))
(- t_0 (pow B_m 2.0))))
(t_2 (hypot B_m (- A C)))
(t_3 (* (+ (* B_m B_m) (* A (* C -4.0))) (* 2.0 F))))
(if (<= t_1 (- INFINITY))
(*
(sqrt (* F (/ (+ A (- C t_2)) (+ (* B_m B_m) (* -4.0 (* A C))))))
(- 0.0 (sqrt 2.0)))
(if (<= t_1 INFINITY)
(/ (sqrt (+ (* (- A t_2) t_3) (* C t_3))) (- t_0 (* B_m B_m)))
(* (sqrt (* 2.0 (* F (- C (hypot B_m C))))) (/ -1.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 = sqrt(((2.0 * ((pow(B_m, 2.0) - t_0) * F)) * ((A + C) - sqrt((pow(B_m, 2.0) + pow((A - C), 2.0)))))) / (t_0 - pow(B_m, 2.0));
double t_2 = hypot(B_m, (A - C));
double t_3 = ((B_m * B_m) + (A * (C * -4.0))) * (2.0 * F);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = sqrt((F * ((A + (C - t_2)) / ((B_m * B_m) + (-4.0 * (A * C)))))) * (0.0 - sqrt(2.0));
} else if (t_1 <= ((double) INFINITY)) {
tmp = sqrt((((A - t_2) * t_3) + (C * t_3))) / (t_0 - (B_m * B_m));
} else {
tmp = sqrt((2.0 * (F * (C - hypot(B_m, C))))) * (-1.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 = Math.sqrt(((2.0 * ((Math.pow(B_m, 2.0) - t_0) * F)) * ((A + C) - Math.sqrt((Math.pow(B_m, 2.0) + Math.pow((A - C), 2.0)))))) / (t_0 - Math.pow(B_m, 2.0));
double t_2 = Math.hypot(B_m, (A - C));
double t_3 = ((B_m * B_m) + (A * (C * -4.0))) * (2.0 * F);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((F * ((A + (C - t_2)) / ((B_m * B_m) + (-4.0 * (A * C)))))) * (0.0 - Math.sqrt(2.0));
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((((A - t_2) * t_3) + (C * t_3))) / (t_0 - (B_m * B_m));
} else {
tmp = Math.sqrt((2.0 * (F * (C - Math.hypot(B_m, C))))) * (-1.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 = math.sqrt(((2.0 * ((math.pow(B_m, 2.0) - t_0) * F)) * ((A + C) - math.sqrt((math.pow(B_m, 2.0) + math.pow((A - C), 2.0)))))) / (t_0 - math.pow(B_m, 2.0)) t_2 = math.hypot(B_m, (A - C)) t_3 = ((B_m * B_m) + (A * (C * -4.0))) * (2.0 * F) tmp = 0 if t_1 <= -math.inf: tmp = math.sqrt((F * ((A + (C - t_2)) / ((B_m * B_m) + (-4.0 * (A * C)))))) * (0.0 - math.sqrt(2.0)) elif t_1 <= math.inf: tmp = math.sqrt((((A - t_2) * t_3) + (C * t_3))) / (t_0 - (B_m * B_m)) else: tmp = math.sqrt((2.0 * (F * (C - math.hypot(B_m, C))))) * (-1.0 / B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(Float64(4.0 * A) * C) t_1 = Float64(sqrt(Float64(Float64(2.0 * Float64(Float64((B_m ^ 2.0) - t_0) * F)) * Float64(Float64(A + C) - sqrt(Float64((B_m ^ 2.0) + (Float64(A - C) ^ 2.0)))))) / Float64(t_0 - (B_m ^ 2.0))) t_2 = hypot(B_m, Float64(A - C)) t_3 = Float64(Float64(Float64(B_m * B_m) + Float64(A * Float64(C * -4.0))) * Float64(2.0 * F)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(sqrt(Float64(F * Float64(Float64(A + Float64(C - t_2)) / Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C)))))) * Float64(0.0 - sqrt(2.0))); elseif (t_1 <= Inf) tmp = Float64(sqrt(Float64(Float64(Float64(A - t_2) * t_3) + Float64(C * t_3))) / Float64(t_0 - Float64(B_m * B_m))); else tmp = Float64(sqrt(Float64(2.0 * Float64(F * Float64(C - hypot(B_m, C))))) * Float64(-1.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 = sqrt(((2.0 * (((B_m ^ 2.0) - t_0) * F)) * ((A + C) - sqrt(((B_m ^ 2.0) + ((A - C) ^ 2.0)))))) / (t_0 - (B_m ^ 2.0)); t_2 = hypot(B_m, (A - C)); t_3 = ((B_m * B_m) + (A * (C * -4.0))) * (2.0 * F); tmp = 0.0; if (t_1 <= -Inf) tmp = sqrt((F * ((A + (C - t_2)) / ((B_m * B_m) + (-4.0 * (A * C)))))) * (0.0 - sqrt(2.0)); elseif (t_1 <= Inf) tmp = sqrt((((A - t_2) * t_3) + (C * t_3))) / (t_0 - (B_m * B_m)); else tmp = sqrt((2.0 * (F * (C - hypot(B_m, C))))) * (-1.0 / B_m); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sqrt[N[(N[(2.0 * N[(N[(N[Power[B$95$m, 2.0], $MachinePrecision] - t$95$0), $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$0 - N[Power[B$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[Sqrt[N[(F * N[(N[(A + N[(C - t$95$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], If[LessEqual[t$95$1, Infinity], N[(N[Sqrt[N[(N[(N[(A - t$95$2), $MachinePrecision] * t$95$3), $MachinePrecision] + N[(C * t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(t$95$0 - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(2.0 * N[(F * N[(C - N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-1.0 / B$95$m), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := \left(4 \cdot A\right) \cdot C\\
t_1 := \frac{\sqrt{\left(2 \cdot \left(\left({B\_m}^{2} - t\_0\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{B\_m}^{2} + {\left(A - C\right)}^{2}}\right)}}{t\_0 - {B\_m}^{2}}\\
t_2 := \mathsf{hypot}\left(B\_m, A - C\right)\\
t_3 := \left(B\_m \cdot B\_m + A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\sqrt{F \cdot \frac{A + \left(C - t\_2\right)}{B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)}} \cdot \left(0 - \sqrt{2}\right)\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{\sqrt{\left(A - t\_2\right) \cdot t\_3 + C \cdot t\_3}}{t\_0 - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(F \cdot \left(C - \mathsf{hypot}\left(B\_m, C\right)\right)\right)} \cdot \frac{-1}{B\_m}\\
\end{array}
\end{array}
if (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 #s(literal 2 binary64) (*.f64 (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C)) F)) (-.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))))) (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C))) < -inf.0Initial program 3.1%
Taylor expanded in F around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
Simplified53.8%
if -inf.0 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 #s(literal 2 binary64) (*.f64 (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C)) F)) (-.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))))) (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C))) < +inf.0Initial program 56.5%
Simplified59.7%
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
cancel-sign-sub-invN/A
pow2N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
associate--r-N/A
Applied egg-rr61.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%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6419.6%
Simplified19.6%
*-commutativeN/A
mul-1-negN/A
distribute-neg-frac2N/A
div-invN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr19.6%
Final simplification40.2%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (* (+ (* B_m B_m) (* A (* C -4.0))) (* 2.0 F))))
(if (<= B_m 9.6e+93)
(/
(sqrt (+ (* (- A (hypot B_m (- A C))) t_0) (* C t_0)))
(- (* (* 4.0 A) C) (* B_m B_m)))
(/ (sqrt (* 2.0 (fma F C (* (hypot C B_m) (- 0.0 F))))) (- 0.0 B_m)))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = ((B_m * B_m) + (A * (C * -4.0))) * (2.0 * F);
double tmp;
if (B_m <= 9.6e+93) {
tmp = sqrt((((A - hypot(B_m, (A - C))) * t_0) + (C * t_0))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = sqrt((2.0 * fma(F, C, (hypot(C, B_m) * (0.0 - F))))) / (0.0 - B_m);
}
return tmp;
}
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(Float64(Float64(B_m * B_m) + Float64(A * Float64(C * -4.0))) * Float64(2.0 * F)) tmp = 0.0 if (B_m <= 9.6e+93) tmp = Float64(sqrt(Float64(Float64(Float64(A - hypot(B_m, Float64(A - C))) * t_0) + Float64(C * t_0))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); else tmp = Float64(sqrt(Float64(2.0 * fma(F, C, Float64(hypot(C, B_m) * Float64(0.0 - F))))) / Float64(0.0 - B_m)); end return tmp end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 9.6e+93], N[(N[Sqrt[N[(N[(N[(A - N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] + N[(C * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(2.0 * N[(F * C + N[(N[Sqrt[C ^ 2 + B$95$m ^ 2], $MachinePrecision] * N[(0.0 - F), $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(B\_m \cdot B\_m + A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)\\
\mathbf{if}\;B\_m \leq 9.6 \cdot 10^{+93}:\\
\;\;\;\;\frac{\sqrt{\left(A - \mathsf{hypot}\left(B\_m, A - C\right)\right) \cdot t\_0 + C \cdot t\_0}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \mathsf{fma}\left(F, C, \mathsf{hypot}\left(C, B\_m\right) \cdot \left(0 - F\right)\right)}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 9.60000000000000042e93Initial program 20.9%
Simplified26.6%
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
cancel-sign-sub-invN/A
pow2N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
associate--r-N/A
Applied egg-rr26.9%
if 9.60000000000000042e93 < B Initial program 9.1%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6456.2%
Simplified56.2%
mul-1-negN/A
distribute-neg-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr56.4%
sub-negN/A
distribute-lft-inN/A
fma-defineN/A
fma-lowering-fma.f64N/A
*-commutativeN/A
distribute-lft-neg-outN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
hypot-defineN/A
hypot-lowering-hypot.f6456.4%
Applied egg-rr56.4%
Final simplification32.2%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (* (+ (* B_m B_m) (* A (* C -4.0))) (* 2.0 F))))
(if (<= B_m 2.8e+23)
(/
(sqrt (+ (* (- A (hypot B_m (- A C))) t_0) (* C t_0)))
(- (* (* 4.0 A) C) (* B_m B_m)))
(* (sqrt (* 2.0 (* F (- C (hypot B_m C))))) (/ -1.0 B_m)))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = ((B_m * B_m) + (A * (C * -4.0))) * (2.0 * F);
double tmp;
if (B_m <= 2.8e+23) {
tmp = sqrt((((A - hypot(B_m, (A - C))) * t_0) + (C * t_0))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = sqrt((2.0 * (F * (C - hypot(B_m, C))))) * (-1.0 / B_m);
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = ((B_m * B_m) + (A * (C * -4.0))) * (2.0 * F);
double tmp;
if (B_m <= 2.8e+23) {
tmp = Math.sqrt((((A - Math.hypot(B_m, (A - C))) * t_0) + (C * t_0))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = Math.sqrt((2.0 * (F * (C - Math.hypot(B_m, C))))) * (-1.0 / B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = ((B_m * B_m) + (A * (C * -4.0))) * (2.0 * F) tmp = 0 if B_m <= 2.8e+23: tmp = math.sqrt((((A - math.hypot(B_m, (A - C))) * t_0) + (C * t_0))) / (((4.0 * A) * C) - (B_m * B_m)) else: tmp = math.sqrt((2.0 * (F * (C - math.hypot(B_m, C))))) * (-1.0 / B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(Float64(Float64(B_m * B_m) + Float64(A * Float64(C * -4.0))) * Float64(2.0 * F)) tmp = 0.0 if (B_m <= 2.8e+23) tmp = Float64(sqrt(Float64(Float64(Float64(A - hypot(B_m, Float64(A - C))) * t_0) + Float64(C * t_0))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); else tmp = Float64(sqrt(Float64(2.0 * Float64(F * Float64(C - hypot(B_m, C))))) * Float64(-1.0 / B_m)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = ((B_m * B_m) + (A * (C * -4.0))) * (2.0 * F); tmp = 0.0; if (B_m <= 2.8e+23) tmp = sqrt((((A - hypot(B_m, (A - C))) * t_0) + (C * t_0))) / (((4.0 * A) * C) - (B_m * B_m)); else tmp = sqrt((2.0 * (F * (C - hypot(B_m, C))))) * (-1.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[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 2.8e+23], N[(N[Sqrt[N[(N[(N[(A - N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] + N[(C * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(2.0 * N[(F * N[(C - N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-1.0 / B$95$m), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := \left(B\_m \cdot B\_m + A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)\\
\mathbf{if}\;B\_m \leq 2.8 \cdot 10^{+23}:\\
\;\;\;\;\frac{\sqrt{\left(A - \mathsf{hypot}\left(B\_m, A - C\right)\right) \cdot t\_0 + C \cdot t\_0}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(F \cdot \left(C - \mathsf{hypot}\left(B\_m, C\right)\right)\right)} \cdot \frac{-1}{B\_m}\\
\end{array}
\end{array}
if B < 2.8e23Initial program 20.5%
Simplified26.1%
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
cancel-sign-sub-invN/A
pow2N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
associate--r-N/A
Applied egg-rr26.3%
if 2.8e23 < B Initial program 12.8%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6450.3%
Simplified50.3%
*-commutativeN/A
mul-1-negN/A
distribute-neg-frac2N/A
div-invN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr50.4%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 4.8e+25)
(/
(sqrt
(*
(+ (* B_m B_m) (* A (* C -4.0)))
(* (* 2.0 F) (+ A (- C (hypot B_m (- A C)))))))
(- (* (* 4.0 A) C) (* B_m B_m)))
(* (sqrt (* 2.0 (* F (- C (hypot B_m C))))) (/ -1.0 B_m))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 4.8e+25) {
tmp = sqrt((((B_m * B_m) + (A * (C * -4.0))) * ((2.0 * F) * (A + (C - hypot(B_m, (A - C))))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = sqrt((2.0 * (F * (C - hypot(B_m, C))))) * (-1.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 <= 4.8e+25) {
tmp = Math.sqrt((((B_m * B_m) + (A * (C * -4.0))) * ((2.0 * F) * (A + (C - Math.hypot(B_m, (A - C))))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = Math.sqrt((2.0 * (F * (C - Math.hypot(B_m, C))))) * (-1.0 / B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 4.8e+25: tmp = math.sqrt((((B_m * B_m) + (A * (C * -4.0))) * ((2.0 * F) * (A + (C - math.hypot(B_m, (A - C))))))) / (((4.0 * A) * C) - (B_m * B_m)) else: tmp = math.sqrt((2.0 * (F * (C - math.hypot(B_m, C))))) * (-1.0 / B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 4.8e+25) tmp = Float64(sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(A * Float64(C * -4.0))) * Float64(Float64(2.0 * F) * Float64(A + Float64(C - hypot(B_m, Float64(A - C))))))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); else tmp = Float64(sqrt(Float64(2.0 * Float64(F * Float64(C - hypot(B_m, C))))) * Float64(-1.0 / B_m)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 4.8e+25) tmp = sqrt((((B_m * B_m) + (A * (C * -4.0))) * ((2.0 * F) * (A + (C - hypot(B_m, (A - C))))))) / (((4.0 * A) * C) - (B_m * B_m)); else tmp = sqrt((2.0 * (F * (C - hypot(B_m, C))))) * (-1.0 / B_m); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 4.8e+25], N[(N[Sqrt[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * F), $MachinePrecision] * N[(A + N[(C - N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(2.0 * N[(F * N[(C - N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-1.0 / B$95$m), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 4.8 \cdot 10^{+25}:\\
\;\;\;\;\frac{\sqrt{\left(B\_m \cdot B\_m + A \cdot \left(C \cdot -4\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \left(A + \left(C - \mathsf{hypot}\left(B\_m, A - C\right)\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(F \cdot \left(C - \mathsf{hypot}\left(B\_m, C\right)\right)\right)} \cdot \frac{-1}{B\_m}\\
\end{array}
\end{array}
if B < 4.79999999999999992e25Initial program 20.7%
Simplified26.2%
if 4.79999999999999992e25 < B Initial program 11.6%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6451.0%
Simplified51.0%
*-commutativeN/A
mul-1-negN/A
distribute-neg-frac2N/A
div-invN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr51.1%
Final simplification31.6%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (* 4.0 (* A C))))
(if (<= F -8.5e+227)
(/
(sqrt
(*
C
(+
(* (* A -8.0) (* F (+ A A)))
(/
(* 2.0 (* F (+ (* 2.0 (* A (* B_m B_m))) (* (* B_m B_m) (+ A A)))))
C))))
t_0)
(if (<= F -1.55e+178)
(/ (sqrt (* (* A -8.0) (* (* C F) (+ C C)))) t_0)
(if (<= F -2e-311)
(* (sqrt (* 2.0 (* F (- C (hypot B_m C))))) (/ -1.0 B_m))
(*
0.25
(sqrt
(/ (+ (* F -16.0) (/ (* -4.0 (* F (* B_m B_m))) (* A A))) C))))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = 4.0 * (A * C);
double tmp;
if (F <= -8.5e+227) {
tmp = sqrt((C * (((A * -8.0) * (F * (A + A))) + ((2.0 * (F * ((2.0 * (A * (B_m * B_m))) + ((B_m * B_m) * (A + A))))) / C)))) / t_0;
} else if (F <= -1.55e+178) {
tmp = sqrt(((A * -8.0) * ((C * F) * (C + C)))) / t_0;
} else if (F <= -2e-311) {
tmp = sqrt((2.0 * (F * (C - hypot(B_m, C))))) * (-1.0 / B_m);
} else {
tmp = 0.25 * sqrt((((F * -16.0) + ((-4.0 * (F * (B_m * B_m))) / (A * A))) / C));
}
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 tmp;
if (F <= -8.5e+227) {
tmp = Math.sqrt((C * (((A * -8.0) * (F * (A + A))) + ((2.0 * (F * ((2.0 * (A * (B_m * B_m))) + ((B_m * B_m) * (A + A))))) / C)))) / t_0;
} else if (F <= -1.55e+178) {
tmp = Math.sqrt(((A * -8.0) * ((C * F) * (C + C)))) / t_0;
} else if (F <= -2e-311) {
tmp = Math.sqrt((2.0 * (F * (C - Math.hypot(B_m, C))))) * (-1.0 / B_m);
} else {
tmp = 0.25 * Math.sqrt((((F * -16.0) + ((-4.0 * (F * (B_m * B_m))) / (A * A))) / C));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = 4.0 * (A * C) tmp = 0 if F <= -8.5e+227: tmp = math.sqrt((C * (((A * -8.0) * (F * (A + A))) + ((2.0 * (F * ((2.0 * (A * (B_m * B_m))) + ((B_m * B_m) * (A + A))))) / C)))) / t_0 elif F <= -1.55e+178: tmp = math.sqrt(((A * -8.0) * ((C * F) * (C + C)))) / t_0 elif F <= -2e-311: tmp = math.sqrt((2.0 * (F * (C - math.hypot(B_m, C))))) * (-1.0 / B_m) else: tmp = 0.25 * math.sqrt((((F * -16.0) + ((-4.0 * (F * (B_m * B_m))) / (A * A))) / C)) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(4.0 * Float64(A * C)) tmp = 0.0 if (F <= -8.5e+227) tmp = Float64(sqrt(Float64(C * Float64(Float64(Float64(A * -8.0) * Float64(F * Float64(A + A))) + Float64(Float64(2.0 * Float64(F * Float64(Float64(2.0 * Float64(A * Float64(B_m * B_m))) + Float64(Float64(B_m * B_m) * Float64(A + A))))) / C)))) / t_0); elseif (F <= -1.55e+178) tmp = Float64(sqrt(Float64(Float64(A * -8.0) * Float64(Float64(C * F) * Float64(C + C)))) / t_0); elseif (F <= -2e-311) tmp = Float64(sqrt(Float64(2.0 * Float64(F * Float64(C - hypot(B_m, C))))) * Float64(-1.0 / B_m)); else tmp = Float64(0.25 * sqrt(Float64(Float64(Float64(F * -16.0) + Float64(Float64(-4.0 * Float64(F * Float64(B_m * B_m))) / Float64(A * A))) / C))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = 4.0 * (A * C); tmp = 0.0; if (F <= -8.5e+227) tmp = sqrt((C * (((A * -8.0) * (F * (A + A))) + ((2.0 * (F * ((2.0 * (A * (B_m * B_m))) + ((B_m * B_m) * (A + A))))) / C)))) / t_0; elseif (F <= -1.55e+178) tmp = sqrt(((A * -8.0) * ((C * F) * (C + C)))) / t_0; elseif (F <= -2e-311) tmp = sqrt((2.0 * (F * (C - hypot(B_m, C))))) * (-1.0 / B_m); else tmp = 0.25 * sqrt((((F * -16.0) + ((-4.0 * (F * (B_m * B_m))) / (A * A))) / C)); 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]}, If[LessEqual[F, -8.5e+227], N[(N[Sqrt[N[(C * N[(N[(N[(A * -8.0), $MachinePrecision] * N[(F * N[(A + A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(F * N[(N[(2.0 * N[(A * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(B$95$m * B$95$m), $MachinePrecision] * N[(A + A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[F, -1.55e+178], N[(N[Sqrt[N[(N[(A * -8.0), $MachinePrecision] * N[(N[(C * F), $MachinePrecision] * N[(C + C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[F, -2e-311], N[(N[Sqrt[N[(2.0 * N[(F * N[(C - N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-1.0 / B$95$m), $MachinePrecision]), $MachinePrecision], N[(0.25 * N[Sqrt[N[(N[(N[(F * -16.0), $MachinePrecision] + N[(N[(-4.0 * N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(A * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := 4 \cdot \left(A \cdot C\right)\\
\mathbf{if}\;F \leq -8.5 \cdot 10^{+227}:\\
\;\;\;\;\frac{\sqrt{C \cdot \left(\left(A \cdot -8\right) \cdot \left(F \cdot \left(A + A\right)\right) + \frac{2 \cdot \left(F \cdot \left(2 \cdot \left(A \cdot \left(B\_m \cdot B\_m\right)\right) + \left(B\_m \cdot B\_m\right) \cdot \left(A + A\right)\right)\right)}{C}\right)}}{t\_0}\\
\mathbf{elif}\;F \leq -1.55 \cdot 10^{+178}:\\
\;\;\;\;\frac{\sqrt{\left(A \cdot -8\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C + C\right)\right)}}{t\_0}\\
\mathbf{elif}\;F \leq -2 \cdot 10^{-311}:\\
\;\;\;\;\sqrt{2 \cdot \left(F \cdot \left(C - \mathsf{hypot}\left(B\_m, C\right)\right)\right)} \cdot \frac{-1}{B\_m}\\
\mathbf{else}:\\
\;\;\;\;0.25 \cdot \sqrt{\frac{F \cdot -16 + \frac{-4 \cdot \left(F \cdot \left(B\_m \cdot B\_m\right)\right)}{A \cdot A}}{C}}\\
\end{array}
\end{array}
if F < -8.4999999999999995e227Initial program 8.9%
Simplified6.6%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-lowering-*.f646.5%
Simplified6.5%
Taylor expanded in C around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
Simplified19.8%
if -8.4999999999999995e227 < F < -1.54999999999999996e178Initial program 22.8%
Simplified23.3%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-lowering-*.f6423.6%
Simplified23.6%
Taylor expanded in A around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
+-lowering-+.f64N/A
metadata-evalN/A
*-lowering-*.f6439.9%
Simplified39.9%
if -1.54999999999999996e178 < F < -1.9999999999999e-311Initial program 18.5%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6424.8%
Simplified24.8%
*-commutativeN/A
mul-1-negN/A
distribute-neg-frac2N/A
div-invN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr24.9%
if -1.9999999999999e-311 < F Initial program 25.3%
Simplified35.7%
Taylor expanded in A around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified17.8%
Taylor expanded in C around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6459.2%
Simplified59.2%
Final simplification30.4%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (* 4.0 (* A C))))
(if (<= F -8.5e+235)
(/
(sqrt
(*
C
(+
(* (* A -8.0) (* F (+ A A)))
(/
(* 2.0 (* F (+ (* 2.0 (* A (* B_m B_m))) (* (* B_m B_m) (+ A A)))))
C))))
t_0)
(if (<= F -2.9e+178)
(/ (sqrt (* (* A -8.0) (* (* C F) (+ C C)))) t_0)
(if (<= F -2e-311)
(/ (sqrt (* 2.0 (* F (- C (hypot B_m C))))) (- 0.0 B_m))
(*
0.25
(sqrt
(/ (+ (* F -16.0) (/ (* -4.0 (* F (* B_m B_m))) (* A A))) C))))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = 4.0 * (A * C);
double tmp;
if (F <= -8.5e+235) {
tmp = sqrt((C * (((A * -8.0) * (F * (A + A))) + ((2.0 * (F * ((2.0 * (A * (B_m * B_m))) + ((B_m * B_m) * (A + A))))) / C)))) / t_0;
} else if (F <= -2.9e+178) {
tmp = sqrt(((A * -8.0) * ((C * F) * (C + C)))) / t_0;
} else if (F <= -2e-311) {
tmp = sqrt((2.0 * (F * (C - hypot(B_m, C))))) / (0.0 - B_m);
} else {
tmp = 0.25 * sqrt((((F * -16.0) + ((-4.0 * (F * (B_m * B_m))) / (A * A))) / C));
}
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 tmp;
if (F <= -8.5e+235) {
tmp = Math.sqrt((C * (((A * -8.0) * (F * (A + A))) + ((2.0 * (F * ((2.0 * (A * (B_m * B_m))) + ((B_m * B_m) * (A + A))))) / C)))) / t_0;
} else if (F <= -2.9e+178) {
tmp = Math.sqrt(((A * -8.0) * ((C * F) * (C + C)))) / t_0;
} else if (F <= -2e-311) {
tmp = Math.sqrt((2.0 * (F * (C - Math.hypot(B_m, C))))) / (0.0 - B_m);
} else {
tmp = 0.25 * Math.sqrt((((F * -16.0) + ((-4.0 * (F * (B_m * B_m))) / (A * A))) / C));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = 4.0 * (A * C) tmp = 0 if F <= -8.5e+235: tmp = math.sqrt((C * (((A * -8.0) * (F * (A + A))) + ((2.0 * (F * ((2.0 * (A * (B_m * B_m))) + ((B_m * B_m) * (A + A))))) / C)))) / t_0 elif F <= -2.9e+178: tmp = math.sqrt(((A * -8.0) * ((C * F) * (C + C)))) / t_0 elif F <= -2e-311: tmp = math.sqrt((2.0 * (F * (C - math.hypot(B_m, C))))) / (0.0 - B_m) else: tmp = 0.25 * math.sqrt((((F * -16.0) + ((-4.0 * (F * (B_m * B_m))) / (A * A))) / C)) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(4.0 * Float64(A * C)) tmp = 0.0 if (F <= -8.5e+235) tmp = Float64(sqrt(Float64(C * Float64(Float64(Float64(A * -8.0) * Float64(F * Float64(A + A))) + Float64(Float64(2.0 * Float64(F * Float64(Float64(2.0 * Float64(A * Float64(B_m * B_m))) + Float64(Float64(B_m * B_m) * Float64(A + A))))) / C)))) / t_0); elseif (F <= -2.9e+178) tmp = Float64(sqrt(Float64(Float64(A * -8.0) * Float64(Float64(C * F) * Float64(C + C)))) / t_0); elseif (F <= -2e-311) tmp = Float64(sqrt(Float64(2.0 * Float64(F * Float64(C - hypot(B_m, C))))) / Float64(0.0 - B_m)); else tmp = Float64(0.25 * sqrt(Float64(Float64(Float64(F * -16.0) + Float64(Float64(-4.0 * Float64(F * Float64(B_m * B_m))) / Float64(A * A))) / C))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = 4.0 * (A * C); tmp = 0.0; if (F <= -8.5e+235) tmp = sqrt((C * (((A * -8.0) * (F * (A + A))) + ((2.0 * (F * ((2.0 * (A * (B_m * B_m))) + ((B_m * B_m) * (A + A))))) / C)))) / t_0; elseif (F <= -2.9e+178) tmp = sqrt(((A * -8.0) * ((C * F) * (C + C)))) / t_0; elseif (F <= -2e-311) tmp = sqrt((2.0 * (F * (C - hypot(B_m, C))))) / (0.0 - B_m); else tmp = 0.25 * sqrt((((F * -16.0) + ((-4.0 * (F * (B_m * B_m))) / (A * A))) / C)); 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]}, If[LessEqual[F, -8.5e+235], N[(N[Sqrt[N[(C * N[(N[(N[(A * -8.0), $MachinePrecision] * N[(F * N[(A + A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(F * N[(N[(2.0 * N[(A * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(B$95$m * B$95$m), $MachinePrecision] * N[(A + A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[F, -2.9e+178], N[(N[Sqrt[N[(N[(A * -8.0), $MachinePrecision] * N[(N[(C * F), $MachinePrecision] * N[(C + C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[F, -2e-311], N[(N[Sqrt[N[(2.0 * N[(F * N[(C - N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision], N[(0.25 * N[Sqrt[N[(N[(N[(F * -16.0), $MachinePrecision] + N[(N[(-4.0 * N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(A * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := 4 \cdot \left(A \cdot C\right)\\
\mathbf{if}\;F \leq -8.5 \cdot 10^{+235}:\\
\;\;\;\;\frac{\sqrt{C \cdot \left(\left(A \cdot -8\right) \cdot \left(F \cdot \left(A + A\right)\right) + \frac{2 \cdot \left(F \cdot \left(2 \cdot \left(A \cdot \left(B\_m \cdot B\_m\right)\right) + \left(B\_m \cdot B\_m\right) \cdot \left(A + A\right)\right)\right)}{C}\right)}}{t\_0}\\
\mathbf{elif}\;F \leq -2.9 \cdot 10^{+178}:\\
\;\;\;\;\frac{\sqrt{\left(A \cdot -8\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C + C\right)\right)}}{t\_0}\\
\mathbf{elif}\;F \leq -2 \cdot 10^{-311}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(C - \mathsf{hypot}\left(B\_m, C\right)\right)\right)}}{0 - B\_m}\\
\mathbf{else}:\\
\;\;\;\;0.25 \cdot \sqrt{\frac{F \cdot -16 + \frac{-4 \cdot \left(F \cdot \left(B\_m \cdot B\_m\right)\right)}{A \cdot A}}{C}}\\
\end{array}
\end{array}
if F < -8.50000000000000017e235Initial program 8.9%
Simplified6.6%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-lowering-*.f646.5%
Simplified6.5%
Taylor expanded in C around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
Simplified19.8%
if -8.50000000000000017e235 < F < -2.9e178Initial program 22.8%
Simplified23.3%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-lowering-*.f6423.6%
Simplified23.6%
Taylor expanded in A around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
+-lowering-+.f64N/A
metadata-evalN/A
*-lowering-*.f6439.9%
Simplified39.9%
if -2.9e178 < F < -1.9999999999999e-311Initial program 18.5%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6424.8%
Simplified24.8%
mul-1-negN/A
distribute-neg-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr24.9%
if -1.9999999999999e-311 < F Initial program 25.3%
Simplified35.7%
Taylor expanded in A around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified17.8%
Taylor expanded in C around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6459.2%
Simplified59.2%
Final simplification30.4%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= F -2.6e+178)
(/
(* (sqrt (* F -16.0)) (sqrt (* C (* A C))))
(- (* (* 4.0 A) C) (* B_m B_m)))
(if (<= F -2e-311)
(* (sqrt (* 2.0 (* F (- C (hypot B_m C))))) (/ -1.0 B_m))
(*
0.25
(sqrt (/ (+ (* F -16.0) (/ (* -4.0 (* F (* B_m B_m))) (* A A))) C))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (F <= -2.6e+178) {
tmp = (sqrt((F * -16.0)) * sqrt((C * (A * C)))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (F <= -2e-311) {
tmp = sqrt((2.0 * (F * (C - hypot(B_m, C))))) * (-1.0 / B_m);
} else {
tmp = 0.25 * sqrt((((F * -16.0) + ((-4.0 * (F * (B_m * B_m))) / (A * A))) / C));
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (F <= -2.6e+178) {
tmp = (Math.sqrt((F * -16.0)) * Math.sqrt((C * (A * C)))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (F <= -2e-311) {
tmp = Math.sqrt((2.0 * (F * (C - Math.hypot(B_m, C))))) * (-1.0 / B_m);
} else {
tmp = 0.25 * Math.sqrt((((F * -16.0) + ((-4.0 * (F * (B_m * B_m))) / (A * A))) / C));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if F <= -2.6e+178: tmp = (math.sqrt((F * -16.0)) * math.sqrt((C * (A * C)))) / (((4.0 * A) * C) - (B_m * B_m)) elif F <= -2e-311: tmp = math.sqrt((2.0 * (F * (C - math.hypot(B_m, C))))) * (-1.0 / B_m) else: tmp = 0.25 * math.sqrt((((F * -16.0) + ((-4.0 * (F * (B_m * B_m))) / (A * A))) / C)) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (F <= -2.6e+178) tmp = Float64(Float64(sqrt(Float64(F * -16.0)) * sqrt(Float64(C * Float64(A * C)))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); elseif (F <= -2e-311) tmp = Float64(sqrt(Float64(2.0 * Float64(F * Float64(C - hypot(B_m, C))))) * Float64(-1.0 / B_m)); else tmp = Float64(0.25 * sqrt(Float64(Float64(Float64(F * -16.0) + Float64(Float64(-4.0 * Float64(F * Float64(B_m * B_m))) / Float64(A * A))) / C))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (F <= -2.6e+178) tmp = (sqrt((F * -16.0)) * sqrt((C * (A * C)))) / (((4.0 * A) * C) - (B_m * B_m)); elseif (F <= -2e-311) tmp = sqrt((2.0 * (F * (C - hypot(B_m, C))))) * (-1.0 / B_m); else tmp = 0.25 * sqrt((((F * -16.0) + ((-4.0 * (F * (B_m * B_m))) / (A * A))) / C)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[F, -2.6e+178], N[(N[(N[Sqrt[N[(F * -16.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(C * N[(A * C), $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[F, -2e-311], N[(N[Sqrt[N[(2.0 * N[(F * N[(C - N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-1.0 / B$95$m), $MachinePrecision]), $MachinePrecision], N[(0.25 * N[Sqrt[N[(N[(N[(F * -16.0), $MachinePrecision] + N[(N[(-4.0 * N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(A * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.6 \cdot 10^{+178}:\\
\;\;\;\;\frac{\sqrt{F \cdot -16} \cdot \sqrt{C \cdot \left(A \cdot C\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{elif}\;F \leq -2 \cdot 10^{-311}:\\
\;\;\;\;\sqrt{2 \cdot \left(F \cdot \left(C - \mathsf{hypot}\left(B\_m, C\right)\right)\right)} \cdot \frac{-1}{B\_m}\\
\mathbf{else}:\\
\;\;\;\;0.25 \cdot \sqrt{\frac{F \cdot -16 + \frac{-4 \cdot \left(F \cdot \left(B\_m \cdot B\_m\right)\right)}{A \cdot A}}{C}}\\
\end{array}
\end{array}
if F < -2.6000000000000001e178Initial program 14.5%
Simplified13.3%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6414.5%
Simplified14.5%
*-commutativeN/A
associate-*r*N/A
sqrt-prodN/A
*-commutativeN/A
pow1/2N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6424.4%
Applied egg-rr24.4%
if -2.6000000000000001e178 < F < -1.9999999999999e-311Initial program 18.5%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6424.8%
Simplified24.8%
*-commutativeN/A
mul-1-negN/A
distribute-neg-frac2N/A
div-invN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr24.9%
if -1.9999999999999e-311 < F Initial program 25.3%
Simplified35.7%
Taylor expanded in A around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified17.8%
Taylor expanded in C around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6459.2%
Simplified59.2%
Final simplification29.8%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (* 4.0 (* A C))))
(if (<= F -9.2e+234)
(/
(sqrt
(*
C
(+
(* (* A -8.0) (* F (+ A A)))
(/
(* 2.0 (* F (+ (* 2.0 (* A (* B_m B_m))) (* (* B_m B_m) (+ A A)))))
C))))
t_0)
(if (<= F -1.35e+178)
(/ (sqrt (* (* A -8.0) (* (* C F) (+ C C)))) t_0)
(if (<= F -2e-311)
(* (/ -1.0 B_m) (sqrt (* -2.0 (* B_m F))))
(*
0.25
(sqrt
(/ (+ (* F -16.0) (/ (* -4.0 (* F (* B_m B_m))) (* A A))) C))))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = 4.0 * (A * C);
double tmp;
if (F <= -9.2e+234) {
tmp = sqrt((C * (((A * -8.0) * (F * (A + A))) + ((2.0 * (F * ((2.0 * (A * (B_m * B_m))) + ((B_m * B_m) * (A + A))))) / C)))) / t_0;
} else if (F <= -1.35e+178) {
tmp = sqrt(((A * -8.0) * ((C * F) * (C + C)))) / t_0;
} else if (F <= -2e-311) {
tmp = (-1.0 / B_m) * sqrt((-2.0 * (B_m * F)));
} else {
tmp = 0.25 * sqrt((((F * -16.0) + ((-4.0 * (F * (B_m * B_m))) / (A * A))) / C));
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: t_0
real(8) :: tmp
t_0 = 4.0d0 * (a * c)
if (f <= (-9.2d+234)) then
tmp = sqrt((c * (((a * (-8.0d0)) * (f * (a + a))) + ((2.0d0 * (f * ((2.0d0 * (a * (b_m * b_m))) + ((b_m * b_m) * (a + a))))) / c)))) / t_0
else if (f <= (-1.35d+178)) then
tmp = sqrt(((a * (-8.0d0)) * ((c * f) * (c + c)))) / t_0
else if (f <= (-2d-311)) then
tmp = ((-1.0d0) / b_m) * sqrt(((-2.0d0) * (b_m * f)))
else
tmp = 0.25d0 * sqrt((((f * (-16.0d0)) + (((-4.0d0) * (f * (b_m * b_m))) / (a * a))) / c))
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = 4.0 * (A * C);
double tmp;
if (F <= -9.2e+234) {
tmp = Math.sqrt((C * (((A * -8.0) * (F * (A + A))) + ((2.0 * (F * ((2.0 * (A * (B_m * B_m))) + ((B_m * B_m) * (A + A))))) / C)))) / t_0;
} else if (F <= -1.35e+178) {
tmp = Math.sqrt(((A * -8.0) * ((C * F) * (C + C)))) / t_0;
} else if (F <= -2e-311) {
tmp = (-1.0 / B_m) * Math.sqrt((-2.0 * (B_m * F)));
} else {
tmp = 0.25 * Math.sqrt((((F * -16.0) + ((-4.0 * (F * (B_m * B_m))) / (A * A))) / C));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = 4.0 * (A * C) tmp = 0 if F <= -9.2e+234: tmp = math.sqrt((C * (((A * -8.0) * (F * (A + A))) + ((2.0 * (F * ((2.0 * (A * (B_m * B_m))) + ((B_m * B_m) * (A + A))))) / C)))) / t_0 elif F <= -1.35e+178: tmp = math.sqrt(((A * -8.0) * ((C * F) * (C + C)))) / t_0 elif F <= -2e-311: tmp = (-1.0 / B_m) * math.sqrt((-2.0 * (B_m * F))) else: tmp = 0.25 * math.sqrt((((F * -16.0) + ((-4.0 * (F * (B_m * B_m))) / (A * A))) / C)) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(4.0 * Float64(A * C)) tmp = 0.0 if (F <= -9.2e+234) tmp = Float64(sqrt(Float64(C * Float64(Float64(Float64(A * -8.0) * Float64(F * Float64(A + A))) + Float64(Float64(2.0 * Float64(F * Float64(Float64(2.0 * Float64(A * Float64(B_m * B_m))) + Float64(Float64(B_m * B_m) * Float64(A + A))))) / C)))) / t_0); elseif (F <= -1.35e+178) tmp = Float64(sqrt(Float64(Float64(A * -8.0) * Float64(Float64(C * F) * Float64(C + C)))) / t_0); elseif (F <= -2e-311) tmp = Float64(Float64(-1.0 / B_m) * sqrt(Float64(-2.0 * Float64(B_m * F)))); else tmp = Float64(0.25 * sqrt(Float64(Float64(Float64(F * -16.0) + Float64(Float64(-4.0 * Float64(F * Float64(B_m * B_m))) / Float64(A * A))) / C))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = 4.0 * (A * C); tmp = 0.0; if (F <= -9.2e+234) tmp = sqrt((C * (((A * -8.0) * (F * (A + A))) + ((2.0 * (F * ((2.0 * (A * (B_m * B_m))) + ((B_m * B_m) * (A + A))))) / C)))) / t_0; elseif (F <= -1.35e+178) tmp = sqrt(((A * -8.0) * ((C * F) * (C + C)))) / t_0; elseif (F <= -2e-311) tmp = (-1.0 / B_m) * sqrt((-2.0 * (B_m * F))); else tmp = 0.25 * sqrt((((F * -16.0) + ((-4.0 * (F * (B_m * B_m))) / (A * A))) / C)); 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]}, If[LessEqual[F, -9.2e+234], N[(N[Sqrt[N[(C * N[(N[(N[(A * -8.0), $MachinePrecision] * N[(F * N[(A + A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(F * N[(N[(2.0 * N[(A * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(B$95$m * B$95$m), $MachinePrecision] * N[(A + A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[F, -1.35e+178], N[(N[Sqrt[N[(N[(A * -8.0), $MachinePrecision] * N[(N[(C * F), $MachinePrecision] * N[(C + C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[F, -2e-311], N[(N[(-1.0 / B$95$m), $MachinePrecision] * N[Sqrt[N[(-2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(0.25 * N[Sqrt[N[(N[(N[(F * -16.0), $MachinePrecision] + N[(N[(-4.0 * N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(A * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := 4 \cdot \left(A \cdot C\right)\\
\mathbf{if}\;F \leq -9.2 \cdot 10^{+234}:\\
\;\;\;\;\frac{\sqrt{C \cdot \left(\left(A \cdot -8\right) \cdot \left(F \cdot \left(A + A\right)\right) + \frac{2 \cdot \left(F \cdot \left(2 \cdot \left(A \cdot \left(B\_m \cdot B\_m\right)\right) + \left(B\_m \cdot B\_m\right) \cdot \left(A + A\right)\right)\right)}{C}\right)}}{t\_0}\\
\mathbf{elif}\;F \leq -1.35 \cdot 10^{+178}:\\
\;\;\;\;\frac{\sqrt{\left(A \cdot -8\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C + C\right)\right)}}{t\_0}\\
\mathbf{elif}\;F \leq -2 \cdot 10^{-311}:\\
\;\;\;\;\frac{-1}{B\_m} \cdot \sqrt{-2 \cdot \left(B\_m \cdot F\right)}\\
\mathbf{else}:\\
\;\;\;\;0.25 \cdot \sqrt{\frac{F \cdot -16 + \frac{-4 \cdot \left(F \cdot \left(B\_m \cdot B\_m\right)\right)}{A \cdot A}}{C}}\\
\end{array}
\end{array}
if F < -9.2000000000000004e234Initial program 8.9%
Simplified6.6%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-lowering-*.f646.5%
Simplified6.5%
Taylor expanded in C around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
Simplified19.8%
if -9.2000000000000004e234 < F < -1.35000000000000009e178Initial program 22.8%
Simplified23.3%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-lowering-*.f6423.6%
Simplified23.6%
Taylor expanded in A around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
+-lowering-+.f64N/A
metadata-evalN/A
*-lowering-*.f6439.9%
Simplified39.9%
if -1.35000000000000009e178 < F < -1.9999999999999e-311Initial program 18.5%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6424.8%
Simplified24.8%
*-commutativeN/A
mul-1-negN/A
distribute-neg-frac2N/A
div-invN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr24.9%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6422.0%
Simplified22.0%
if -1.9999999999999e-311 < F Initial program 25.3%
Simplified35.7%
Taylor expanded in A around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified17.8%
Taylor expanded in C around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6459.2%
Simplified59.2%
Final simplification28.4%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= F -2.05e+178)
(/ (sqrt (* (* A -8.0) (* (* C F) (+ C C)))) (* 4.0 (* A C)))
(if (<= F -2e-311)
(* (/ -1.0 B_m) (sqrt (* -2.0 (* B_m F))))
(*
0.25
(sqrt (/ (+ (* F -16.0) (/ (* -4.0 (* F (* B_m B_m))) (* A A))) C))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (F <= -2.05e+178) {
tmp = sqrt(((A * -8.0) * ((C * F) * (C + C)))) / (4.0 * (A * C));
} else if (F <= -2e-311) {
tmp = (-1.0 / B_m) * sqrt((-2.0 * (B_m * F)));
} else {
tmp = 0.25 * sqrt((((F * -16.0) + ((-4.0 * (F * (B_m * B_m))) / (A * A))) / C));
}
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.05d+178)) then
tmp = sqrt(((a * (-8.0d0)) * ((c * f) * (c + c)))) / (4.0d0 * (a * c))
else if (f <= (-2d-311)) then
tmp = ((-1.0d0) / b_m) * sqrt(((-2.0d0) * (b_m * f)))
else
tmp = 0.25d0 * sqrt((((f * (-16.0d0)) + (((-4.0d0) * (f * (b_m * b_m))) / (a * a))) / c))
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.05e+178) {
tmp = Math.sqrt(((A * -8.0) * ((C * F) * (C + C)))) / (4.0 * (A * C));
} else if (F <= -2e-311) {
tmp = (-1.0 / B_m) * Math.sqrt((-2.0 * (B_m * F)));
} else {
tmp = 0.25 * Math.sqrt((((F * -16.0) + ((-4.0 * (F * (B_m * B_m))) / (A * A))) / C));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if F <= -2.05e+178: tmp = math.sqrt(((A * -8.0) * ((C * F) * (C + C)))) / (4.0 * (A * C)) elif F <= -2e-311: tmp = (-1.0 / B_m) * math.sqrt((-2.0 * (B_m * F))) else: tmp = 0.25 * math.sqrt((((F * -16.0) + ((-4.0 * (F * (B_m * B_m))) / (A * A))) / C)) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (F <= -2.05e+178) tmp = Float64(sqrt(Float64(Float64(A * -8.0) * Float64(Float64(C * F) * Float64(C + C)))) / Float64(4.0 * Float64(A * C))); elseif (F <= -2e-311) tmp = Float64(Float64(-1.0 / B_m) * sqrt(Float64(-2.0 * Float64(B_m * F)))); else tmp = Float64(0.25 * sqrt(Float64(Float64(Float64(F * -16.0) + Float64(Float64(-4.0 * Float64(F * Float64(B_m * B_m))) / Float64(A * A))) / C))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (F <= -2.05e+178) tmp = sqrt(((A * -8.0) * ((C * F) * (C + C)))) / (4.0 * (A * C)); elseif (F <= -2e-311) tmp = (-1.0 / B_m) * sqrt((-2.0 * (B_m * F))); else tmp = 0.25 * sqrt((((F * -16.0) + ((-4.0 * (F * (B_m * B_m))) / (A * A))) / C)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[F, -2.05e+178], N[(N[Sqrt[N[(N[(A * -8.0), $MachinePrecision] * N[(N[(C * F), $MachinePrecision] * N[(C + C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2e-311], N[(N[(-1.0 / B$95$m), $MachinePrecision] * N[Sqrt[N[(-2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(0.25 * N[Sqrt[N[(N[(N[(F * -16.0), $MachinePrecision] + N[(N[(-4.0 * N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(A * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.05 \cdot 10^{+178}:\\
\;\;\;\;\frac{\sqrt{\left(A \cdot -8\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C + C\right)\right)}}{4 \cdot \left(A \cdot C\right)}\\
\mathbf{elif}\;F \leq -2 \cdot 10^{-311}:\\
\;\;\;\;\frac{-1}{B\_m} \cdot \sqrt{-2 \cdot \left(B\_m \cdot F\right)}\\
\mathbf{else}:\\
\;\;\;\;0.25 \cdot \sqrt{\frac{F \cdot -16 + \frac{-4 \cdot \left(F \cdot \left(B\_m \cdot B\_m\right)\right)}{A \cdot A}}{C}}\\
\end{array}
\end{array}
if F < -2.04999999999999998e178Initial program 14.5%
Simplified13.3%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-lowering-*.f6413.3%
Simplified13.3%
Taylor expanded in A around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
+-lowering-+.f64N/A
metadata-evalN/A
*-lowering-*.f6418.9%
Simplified18.9%
if -2.04999999999999998e178 < F < -1.9999999999999e-311Initial program 18.5%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6424.8%
Simplified24.8%
*-commutativeN/A
mul-1-negN/A
distribute-neg-frac2N/A
div-invN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr24.9%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6422.0%
Simplified22.0%
if -1.9999999999999e-311 < F Initial program 25.3%
Simplified35.7%
Taylor expanded in A around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified17.8%
Taylor expanded in C around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6459.2%
Simplified59.2%
Final simplification26.8%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= F -2e-311)
(* (/ -1.0 B_m) (sqrt (* -2.0 (* B_m F))))
(*
0.25
(sqrt (/ (+ (* F -16.0) (/ (* -4.0 (* F (* B_m B_m))) (* A A))) C)))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (F <= -2e-311) {
tmp = (-1.0 / B_m) * sqrt((-2.0 * (B_m * F)));
} else {
tmp = 0.25 * sqrt((((F * -16.0) + ((-4.0 * (F * (B_m * B_m))) / (A * A))) / C));
}
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 <= (-2d-311)) then
tmp = ((-1.0d0) / b_m) * sqrt(((-2.0d0) * (b_m * f)))
else
tmp = 0.25d0 * sqrt((((f * (-16.0d0)) + (((-4.0d0) * (f * (b_m * b_m))) / (a * a))) / c))
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 <= -2e-311) {
tmp = (-1.0 / B_m) * Math.sqrt((-2.0 * (B_m * F)));
} else {
tmp = 0.25 * Math.sqrt((((F * -16.0) + ((-4.0 * (F * (B_m * B_m))) / (A * A))) / C));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if F <= -2e-311: tmp = (-1.0 / B_m) * math.sqrt((-2.0 * (B_m * F))) else: tmp = 0.25 * math.sqrt((((F * -16.0) + ((-4.0 * (F * (B_m * B_m))) / (A * A))) / C)) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (F <= -2e-311) tmp = Float64(Float64(-1.0 / B_m) * sqrt(Float64(-2.0 * Float64(B_m * F)))); else tmp = Float64(0.25 * sqrt(Float64(Float64(Float64(F * -16.0) + Float64(Float64(-4.0 * Float64(F * Float64(B_m * B_m))) / Float64(A * A))) / C))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (F <= -2e-311) tmp = (-1.0 / B_m) * sqrt((-2.0 * (B_m * F))); else tmp = 0.25 * sqrt((((F * -16.0) + ((-4.0 * (F * (B_m * B_m))) / (A * A))) / C)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[F, -2e-311], N[(N[(-1.0 / B$95$m), $MachinePrecision] * N[Sqrt[N[(-2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(0.25 * N[Sqrt[N[(N[(N[(F * -16.0), $MachinePrecision] + N[(N[(-4.0 * N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(A * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2 \cdot 10^{-311}:\\
\;\;\;\;\frac{-1}{B\_m} \cdot \sqrt{-2 \cdot \left(B\_m \cdot F\right)}\\
\mathbf{else}:\\
\;\;\;\;0.25 \cdot \sqrt{\frac{F \cdot -16 + \frac{-4 \cdot \left(F \cdot \left(B\_m \cdot B\_m\right)\right)}{A \cdot A}}{C}}\\
\end{array}
\end{array}
if F < -1.9999999999999e-311Initial program 17.6%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6420.3%
Simplified20.3%
*-commutativeN/A
mul-1-negN/A
distribute-neg-frac2N/A
div-invN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr20.4%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6418.0%
Simplified18.0%
if -1.9999999999999e-311 < F Initial program 25.3%
Simplified35.7%
Taylor expanded in A around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified17.8%
Taylor expanded in C around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6459.2%
Simplified59.2%
Final simplification24.0%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= B_m 4.4e-60) (/ (sqrt (* (* A -8.0) (* C (* F (+ A A))))) (* 4.0 (* A C))) (* (/ -1.0 B_m) (sqrt (* 2.0 (* F (- C B_m)))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 4.4e-60) {
tmp = sqrt(((A * -8.0) * (C * (F * (A + A))))) / (4.0 * (A * C));
} else {
tmp = (-1.0 / B_m) * sqrt((2.0 * (F * (C - B_m))));
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if (b_m <= 4.4d-60) then
tmp = sqrt(((a * (-8.0d0)) * (c * (f * (a + a))))) / (4.0d0 * (a * c))
else
tmp = ((-1.0d0) / b_m) * sqrt((2.0d0 * (f * (c - b_m))))
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 4.4e-60) {
tmp = Math.sqrt(((A * -8.0) * (C * (F * (A + A))))) / (4.0 * (A * C));
} else {
tmp = (-1.0 / B_m) * Math.sqrt((2.0 * (F * (C - B_m))));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 4.4e-60: tmp = math.sqrt(((A * -8.0) * (C * (F * (A + A))))) / (4.0 * (A * C)) else: tmp = (-1.0 / B_m) * math.sqrt((2.0 * (F * (C - B_m)))) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 4.4e-60) tmp = Float64(sqrt(Float64(Float64(A * -8.0) * Float64(C * Float64(F * Float64(A + A))))) / Float64(4.0 * Float64(A * C))); else tmp = Float64(Float64(-1.0 / B_m) * sqrt(Float64(2.0 * Float64(F * Float64(C - B_m))))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 4.4e-60) tmp = sqrt(((A * -8.0) * (C * (F * (A + A))))) / (4.0 * (A * C)); else tmp = (-1.0 / B_m) * sqrt((2.0 * (F * (C - B_m)))); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 4.4e-60], N[(N[Sqrt[N[(N[(A * -8.0), $MachinePrecision] * N[(C * N[(F * N[(A + A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / B$95$m), $MachinePrecision] * N[Sqrt[N[(2.0 * N[(F * N[(C - B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 4.4 \cdot 10^{-60}:\\
\;\;\;\;\frac{\sqrt{\left(A \cdot -8\right) \cdot \left(C \cdot \left(F \cdot \left(A + A\right)\right)\right)}}{4 \cdot \left(A \cdot C\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B\_m} \cdot \sqrt{2 \cdot \left(F \cdot \left(C - B\_m\right)\right)}\\
\end{array}
\end{array}
if B < 4.3999999999999998e-60Initial program 18.3%
Simplified23.8%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-lowering-*.f6418.0%
Simplified18.0%
Taylor expanded in C around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f6414.4%
Simplified14.4%
if 4.3999999999999998e-60 < B Initial program 19.7%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6448.3%
Simplified48.3%
*-commutativeN/A
mul-1-negN/A
distribute-neg-frac2N/A
div-invN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr48.5%
Taylor expanded in C around 0
--lowering--.f6445.1%
Simplified45.1%
Final simplification23.5%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= B_m 6.2e-61) (/ (sqrt (* -16.0 (* F (* A (* C C))))) (* 4.0 (* A C))) (* (/ -1.0 B_m) (sqrt (* 2.0 (* F (- C B_m)))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 6.2e-61) {
tmp = sqrt((-16.0 * (F * (A * (C * C))))) / (4.0 * (A * C));
} else {
tmp = (-1.0 / B_m) * sqrt((2.0 * (F * (C - 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.2d-61) then
tmp = sqrt(((-16.0d0) * (f * (a * (c * c))))) / (4.0d0 * (a * c))
else
tmp = ((-1.0d0) / b_m) * sqrt((2.0d0 * (f * (c - 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.2e-61) {
tmp = Math.sqrt((-16.0 * (F * (A * (C * C))))) / (4.0 * (A * C));
} else {
tmp = (-1.0 / B_m) * Math.sqrt((2.0 * (F * (C - B_m))));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 6.2e-61: tmp = math.sqrt((-16.0 * (F * (A * (C * C))))) / (4.0 * (A * C)) else: tmp = (-1.0 / B_m) * math.sqrt((2.0 * (F * (C - B_m)))) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 6.2e-61) tmp = Float64(sqrt(Float64(-16.0 * Float64(F * Float64(A * Float64(C * C))))) / Float64(4.0 * Float64(A * C))); else tmp = Float64(Float64(-1.0 / B_m) * sqrt(Float64(2.0 * Float64(F * Float64(C - 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.2e-61) tmp = sqrt((-16.0 * (F * (A * (C * C))))) / (4.0 * (A * C)); else tmp = (-1.0 / B_m) * sqrt((2.0 * (F * (C - 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.2e-61], N[(N[Sqrt[N[(-16.0 * N[(F * N[(A * N[(C * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / B$95$m), $MachinePrecision] * N[Sqrt[N[(2.0 * N[(F * N[(C - B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 6.2 \cdot 10^{-61}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(F \cdot \left(A \cdot \left(C \cdot C\right)\right)\right)}}{4 \cdot \left(A \cdot C\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B\_m} \cdot \sqrt{2 \cdot \left(F \cdot \left(C - B\_m\right)\right)}\\
\end{array}
\end{array}
if B < 6.1999999999999999e-61Initial program 18.3%
Simplified23.8%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-lowering-*.f6418.0%
Simplified18.0%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6412.1%
Simplified12.1%
if 6.1999999999999999e-61 < B Initial program 19.7%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6448.3%
Simplified48.3%
*-commutativeN/A
mul-1-negN/A
distribute-neg-frac2N/A
div-invN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr48.5%
Taylor expanded in C around 0
--lowering--.f6445.1%
Simplified45.1%
Final simplification21.9%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= A -2.45e+122) (/ (sqrt (* (* B_m B_m) (- 0.0 (/ F C)))) (- 0.0 B_m)) (* (/ -1.0 B_m) (sqrt (* -2.0 (* B_m F))))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (A <= -2.45e+122) {
tmp = sqrt(((B_m * B_m) * (0.0 - (F / C)))) / (0.0 - B_m);
} else {
tmp = (-1.0 / B_m) * sqrt((-2.0 * (B_m * 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 <= (-2.45d+122)) then
tmp = sqrt(((b_m * b_m) * (0.0d0 - (f / c)))) / (0.0d0 - b_m)
else
tmp = ((-1.0d0) / b_m) * sqrt(((-2.0d0) * (b_m * 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 <= -2.45e+122) {
tmp = Math.sqrt(((B_m * B_m) * (0.0 - (F / C)))) / (0.0 - B_m);
} else {
tmp = (-1.0 / B_m) * Math.sqrt((-2.0 * (B_m * F)));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if A <= -2.45e+122: tmp = math.sqrt(((B_m * B_m) * (0.0 - (F / C)))) / (0.0 - B_m) else: tmp = (-1.0 / B_m) * math.sqrt((-2.0 * (B_m * F))) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (A <= -2.45e+122) tmp = Float64(sqrt(Float64(Float64(B_m * B_m) * Float64(0.0 - Float64(F / C)))) / Float64(0.0 - B_m)); else tmp = Float64(Float64(-1.0 / B_m) * sqrt(Float64(-2.0 * Float64(B_m * F)))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (A <= -2.45e+122) tmp = sqrt(((B_m * B_m) * (0.0 - (F / C)))) / (0.0 - B_m); else tmp = (-1.0 / B_m) * sqrt((-2.0 * (B_m * F))); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[A, -2.45e+122], N[(N[Sqrt[N[(N[(B$95$m * B$95$m), $MachinePrecision] * N[(0.0 - N[(F / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / B$95$m), $MachinePrecision] * N[Sqrt[N[(-2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2.45 \cdot 10^{+122}:\\
\;\;\;\;\frac{\sqrt{\left(B\_m \cdot B\_m\right) \cdot \left(0 - \frac{F}{C}\right)}}{0 - B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B\_m} \cdot \sqrt{-2 \cdot \left(B\_m \cdot F\right)}\\
\end{array}
\end{array}
if A < -2.4499999999999999e122Initial program 3.7%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f644.5%
Simplified4.5%
mul-1-negN/A
distribute-neg-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr4.5%
Taylor expanded in C around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f6421.8%
Simplified21.8%
if -2.4499999999999999e122 < A Initial program 21.9%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6420.2%
Simplified20.2%
*-commutativeN/A
mul-1-negN/A
distribute-neg-frac2N/A
div-invN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr20.2%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6418.2%
Simplified18.2%
Final simplification18.9%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= C -6.5e-256) (/ (/ (sqrt (* C F)) B_m) -0.5) (/ -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 (C <= -6.5e-256) {
tmp = (sqrt((C * F)) / B_m) / -0.5;
} 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 (c <= (-6.5d-256)) then
tmp = (sqrt((c * f)) / b_m) / (-0.5d0)
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 (C <= -6.5e-256) {
tmp = (Math.sqrt((C * F)) / B_m) / -0.5;
} 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 C <= -6.5e-256: tmp = (math.sqrt((C * F)) / B_m) / -0.5 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 (C <= -6.5e-256) tmp = Float64(Float64(sqrt(Float64(C * F)) / B_m) / -0.5); else tmp = Float64(-2.0 / Float64(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 (C <= -6.5e-256) tmp = (sqrt((C * F)) / B_m) / -0.5; 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[C, -6.5e-256], N[(N[(N[Sqrt[N[(C * F), $MachinePrecision]], $MachinePrecision] / B$95$m), $MachinePrecision] / -0.5), $MachinePrecision], N[(-2.0 / N[(B$95$m / N[Sqrt[N[(A * F), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;C \leq -6.5 \cdot 10^{-256}:\\
\;\;\;\;\frac{\frac{\sqrt{C \cdot F}}{B\_m}}{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{-2}{\frac{B\_m}{\sqrt{A \cdot F}}}\\
\end{array}
\end{array}
if C < -6.50000000000000052e-256Initial program 24.6%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6419.0%
Simplified19.0%
clear-numN/A
un-div-invN/A
associate-*l/N/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f6418.9%
Applied egg-rr18.9%
Taylor expanded in C around -inf
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
rem-square-sqrtN/A
unpow2N/A
rem-square-sqrtN/A
metadata-evalN/A
/-lowering-/.f645.5%
Simplified5.5%
clear-numN/A
un-div-invN/A
div-invN/A
associate-/r*N/A
*-lft-identityN/A
associate-*l/N/A
/-lowering-/.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
metadata-eval5.5%
Applied egg-rr5.5%
if -6.50000000000000052e-256 < C Initial program 12.8%
Simplified16.2%
Taylor expanded in A around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified7.1%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f643.6%
Simplified3.6%
un-div-invN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f643.6%
Applied egg-rr3.6%
Final simplification4.6%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= C -5.2e-256) (* (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 (C <= -5.2e-256) {
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 (c <= (-5.2d-256)) 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 (C <= -5.2e-256) {
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 C <= -5.2e-256: 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 (C <= -5.2e-256) tmp = Float64(sqrt(Float64(C * F)) * Float64(-2.0 / B_m)); else tmp = Float64(-2.0 / Float64(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 (C <= -5.2e-256) 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[C, -5.2e-256], N[(N[Sqrt[N[(C * F), $MachinePrecision]], $MachinePrecision] * N[(-2.0 / B$95$m), $MachinePrecision]), $MachinePrecision], N[(-2.0 / N[(B$95$m / N[Sqrt[N[(A * F), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;C \leq -5.2 \cdot 10^{-256}:\\
\;\;\;\;\sqrt{C \cdot F} \cdot \frac{-2}{B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{-2}{\frac{B\_m}{\sqrt{A \cdot F}}}\\
\end{array}
\end{array}
if C < -5.2000000000000002e-256Initial program 24.6%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6419.0%
Simplified19.0%
clear-numN/A
un-div-invN/A
associate-*l/N/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f6418.9%
Applied egg-rr18.9%
Taylor expanded in C around -inf
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
rem-square-sqrtN/A
unpow2N/A
rem-square-sqrtN/A
metadata-evalN/A
/-lowering-/.f645.5%
Simplified5.5%
if -5.2000000000000002e-256 < C Initial program 12.8%
Simplified16.2%
Taylor expanded in A around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified7.1%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f643.6%
Simplified3.6%
un-div-invN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f643.6%
Applied egg-rr3.6%
Final simplification4.6%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= C -4.6e-256) (* (sqrt (* C F)) (/ -2.0 B_m)) (* (sqrt (* A F)) (/ -2.0 B_m))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (C <= -4.6e-256) {
tmp = sqrt((C * F)) * (-2.0 / B_m);
} else {
tmp = sqrt((A * F)) * (-2.0 / B_m);
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if (c <= (-4.6d-256)) then
tmp = sqrt((c * f)) * ((-2.0d0) / b_m)
else
tmp = sqrt((a * f)) * ((-2.0d0) / b_m)
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (C <= -4.6e-256) {
tmp = Math.sqrt((C * F)) * (-2.0 / B_m);
} else {
tmp = Math.sqrt((A * F)) * (-2.0 / B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if C <= -4.6e-256: tmp = math.sqrt((C * F)) * (-2.0 / B_m) else: tmp = math.sqrt((A * F)) * (-2.0 / B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (C <= -4.6e-256) tmp = Float64(sqrt(Float64(C * F)) * Float64(-2.0 / B_m)); else tmp = Float64(sqrt(Float64(A * F)) * Float64(-2.0 / B_m)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (C <= -4.6e-256) tmp = sqrt((C * F)) * (-2.0 / B_m); else tmp = sqrt((A * F)) * (-2.0 / B_m); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[C, -4.6e-256], N[(N[Sqrt[N[(C * F), $MachinePrecision]], $MachinePrecision] * N[(-2.0 / B$95$m), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(A * F), $MachinePrecision]], $MachinePrecision] * N[(-2.0 / B$95$m), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;C \leq -4.6 \cdot 10^{-256}:\\
\;\;\;\;\sqrt{C \cdot F} \cdot \frac{-2}{B\_m}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{A \cdot F} \cdot \frac{-2}{B\_m}\\
\end{array}
\end{array}
if C < -4.6e-256Initial program 24.6%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6419.0%
Simplified19.0%
clear-numN/A
un-div-invN/A
associate-*l/N/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f6418.9%
Applied egg-rr18.9%
Taylor expanded in C around -inf
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
rem-square-sqrtN/A
unpow2N/A
rem-square-sqrtN/A
metadata-evalN/A
/-lowering-/.f645.5%
Simplified5.5%
if -4.6e-256 < C Initial program 12.8%
Simplified16.2%
Taylor expanded in A around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified7.1%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f643.6%
Simplified3.6%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f643.6%
Applied egg-rr3.6%
Final simplification4.6%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (* (/ -1.0 B_m) (sqrt (* -2.0 (* B_m F)))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
return (-1.0 / B_m) * sqrt((-2.0 * (B_m * F)));
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
code = ((-1.0d0) / b_m) * sqrt(((-2.0d0) * (b_m * f)))
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
return (-1.0 / B_m) * Math.sqrt((-2.0 * (B_m * F)));
}
B_m = math.fabs(B) def code(A, B_m, C, F): return (-1.0 / B_m) * math.sqrt((-2.0 * (B_m * F)))
B_m = abs(B) function code(A, B_m, C, F) return Float64(Float64(-1.0 / B_m) * sqrt(Float64(-2.0 * Float64(B_m * F)))) end
B_m = abs(B); function tmp = code(A, B_m, C, F) tmp = (-1.0 / B_m) * sqrt((-2.0 * (B_m * F))); end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := N[(N[(-1.0 / B$95$m), $MachinePrecision] * N[Sqrt[N[(-2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|
\\
\frac{-1}{B\_m} \cdot \sqrt{-2 \cdot \left(B\_m \cdot F\right)}
\end{array}
Initial program 18.7%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6417.4%
Simplified17.4%
*-commutativeN/A
mul-1-negN/A
distribute-neg-frac2N/A
div-invN/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr17.5%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6416.0%
Simplified16.0%
Final simplification16.0%
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 18.7%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6417.4%
Simplified17.4%
mul-1-negN/A
distribute-neg-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr17.5%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6416.0%
Simplified16.0%
Final simplification16.0%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (* (sqrt (* C F)) (/ -2.0 B_m)))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
return sqrt((C * F)) * (-2.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((c * f)) * ((-2.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((C * F)) * (-2.0 / B_m);
}
B_m = math.fabs(B) def code(A, B_m, C, F): return math.sqrt((C * F)) * (-2.0 / B_m)
B_m = abs(B) function code(A, B_m, C, F) return Float64(sqrt(Float64(C * F)) * Float64(-2.0 / B_m)) end
B_m = abs(B); function tmp = code(A, B_m, C, F) tmp = sqrt((C * F)) * (-2.0 / B_m); end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := N[(N[Sqrt[N[(C * F), $MachinePrecision]], $MachinePrecision] * N[(-2.0 / B$95$m), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|
\\
\sqrt{C \cdot F} \cdot \frac{-2}{B\_m}
\end{array}
Initial program 18.7%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6417.4%
Simplified17.4%
clear-numN/A
un-div-invN/A
associate-*l/N/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f6417.4%
Applied egg-rr17.4%
Taylor expanded in C around -inf
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
rem-square-sqrtN/A
unpow2N/A
rem-square-sqrtN/A
metadata-evalN/A
/-lowering-/.f643.1%
Simplified3.1%
Final simplification3.1%
herbie shell --seed 2024164
(FPCore (A B C F)
:name "ABCF->ab-angle b"
:precision binary64
(/ (- (sqrt (* (* 2.0 (* (- (pow B 2.0) (* (* 4.0 A) C)) F)) (- (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))) (- (pow B 2.0) (* (* 4.0 A) C))))