
(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 21 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 (+ (+ A C) t_0))
(t_2 (+ (* B_m B_m) (* -4.0 (* A C))))
(t_3 (* F t_2))
(t_4 (* (* 4.0 A) C))
(t_5
(/
(sqrt
(*
(* 2.0 (* (- (pow B_m 2.0) t_4) F))
(+ (+ A C) (sqrt (+ (pow B_m 2.0) (pow (- A C) 2.0))))))
(- t_4 (pow B_m 2.0)))))
(if (<= t_5 -2e-154)
(* (sqrt (* F (/ t_1 t_2))) (- 0.0 (sqrt 2.0)))
(if (<= t_5 5e-32)
(/
(sqrt
(/
(* (- (* C (+ (* 2.0 A) (* 2.0 A))) (* B_m B_m)) (* 2.0 t_3))
(- A (- t_0 C))))
(- t_4 (* B_m B_m)))
(if (<= t_5 INFINITY)
(* (sqrt (* 2.0 t_1)) (/ (sqrt t_3) (- (* A (* 4.0 C)) (* B_m B_m))))
(* (- 0.0 (/ (sqrt 2.0) B_m)) (sqrt (* F (+ A (hypot B_m A))))))))))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 = (A + C) + t_0;
double t_2 = (B_m * B_m) + (-4.0 * (A * C));
double t_3 = F * t_2;
double t_4 = (4.0 * A) * C;
double t_5 = sqrt(((2.0 * ((pow(B_m, 2.0) - t_4) * F)) * ((A + C) + sqrt((pow(B_m, 2.0) + pow((A - C), 2.0)))))) / (t_4 - pow(B_m, 2.0));
double tmp;
if (t_5 <= -2e-154) {
tmp = sqrt((F * (t_1 / t_2))) * (0.0 - sqrt(2.0));
} else if (t_5 <= 5e-32) {
tmp = sqrt(((((C * ((2.0 * A) + (2.0 * A))) - (B_m * B_m)) * (2.0 * t_3)) / (A - (t_0 - C)))) / (t_4 - (B_m * B_m));
} else if (t_5 <= ((double) INFINITY)) {
tmp = sqrt((2.0 * t_1)) * (sqrt(t_3) / ((A * (4.0 * C)) - (B_m * B_m)));
} else {
tmp = (0.0 - (sqrt(2.0) / B_m)) * sqrt((F * (A + hypot(B_m, A))));
}
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 = (A + C) + t_0;
double t_2 = (B_m * B_m) + (-4.0 * (A * C));
double t_3 = F * t_2;
double t_4 = (4.0 * A) * C;
double t_5 = Math.sqrt(((2.0 * ((Math.pow(B_m, 2.0) - t_4) * F)) * ((A + C) + Math.sqrt((Math.pow(B_m, 2.0) + Math.pow((A - C), 2.0)))))) / (t_4 - Math.pow(B_m, 2.0));
double tmp;
if (t_5 <= -2e-154) {
tmp = Math.sqrt((F * (t_1 / t_2))) * (0.0 - Math.sqrt(2.0));
} else if (t_5 <= 5e-32) {
tmp = Math.sqrt(((((C * ((2.0 * A) + (2.0 * A))) - (B_m * B_m)) * (2.0 * t_3)) / (A - (t_0 - C)))) / (t_4 - (B_m * B_m));
} else if (t_5 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((2.0 * t_1)) * (Math.sqrt(t_3) / ((A * (4.0 * C)) - (B_m * B_m)));
} else {
tmp = (0.0 - (Math.sqrt(2.0) / B_m)) * Math.sqrt((F * (A + Math.hypot(B_m, A))));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = math.hypot(B_m, (A - C)) t_1 = (A + C) + t_0 t_2 = (B_m * B_m) + (-4.0 * (A * C)) t_3 = F * t_2 t_4 = (4.0 * A) * C t_5 = math.sqrt(((2.0 * ((math.pow(B_m, 2.0) - t_4) * F)) * ((A + C) + math.sqrt((math.pow(B_m, 2.0) + math.pow((A - C), 2.0)))))) / (t_4 - math.pow(B_m, 2.0)) tmp = 0 if t_5 <= -2e-154: tmp = math.sqrt((F * (t_1 / t_2))) * (0.0 - math.sqrt(2.0)) elif t_5 <= 5e-32: tmp = math.sqrt(((((C * ((2.0 * A) + (2.0 * A))) - (B_m * B_m)) * (2.0 * t_3)) / (A - (t_0 - C)))) / (t_4 - (B_m * B_m)) elif t_5 <= math.inf: tmp = math.sqrt((2.0 * t_1)) * (math.sqrt(t_3) / ((A * (4.0 * C)) - (B_m * B_m))) else: tmp = (0.0 - (math.sqrt(2.0) / B_m)) * math.sqrt((F * (A + math.hypot(B_m, A)))) 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(A + C) + t_0) t_2 = Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) t_3 = Float64(F * t_2) t_4 = Float64(Float64(4.0 * A) * C) t_5 = Float64(sqrt(Float64(Float64(2.0 * Float64(Float64((B_m ^ 2.0) - t_4) * F)) * Float64(Float64(A + C) + sqrt(Float64((B_m ^ 2.0) + (Float64(A - C) ^ 2.0)))))) / Float64(t_4 - (B_m ^ 2.0))) tmp = 0.0 if (t_5 <= -2e-154) tmp = Float64(sqrt(Float64(F * Float64(t_1 / t_2))) * Float64(0.0 - sqrt(2.0))); elseif (t_5 <= 5e-32) tmp = Float64(sqrt(Float64(Float64(Float64(Float64(C * Float64(Float64(2.0 * A) + Float64(2.0 * A))) - Float64(B_m * B_m)) * Float64(2.0 * t_3)) / Float64(A - Float64(t_0 - C)))) / Float64(t_4 - Float64(B_m * B_m))); elseif (t_5 <= Inf) tmp = Float64(sqrt(Float64(2.0 * t_1)) * Float64(sqrt(t_3) / Float64(Float64(A * Float64(4.0 * C)) - Float64(B_m * B_m)))); else tmp = Float64(Float64(0.0 - Float64(sqrt(2.0) / B_m)) * sqrt(Float64(F * Float64(A + hypot(B_m, A))))); 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 = (A + C) + t_0; t_2 = (B_m * B_m) + (-4.0 * (A * C)); t_3 = F * t_2; t_4 = (4.0 * A) * C; t_5 = sqrt(((2.0 * (((B_m ^ 2.0) - t_4) * F)) * ((A + C) + sqrt(((B_m ^ 2.0) + ((A - C) ^ 2.0)))))) / (t_4 - (B_m ^ 2.0)); tmp = 0.0; if (t_5 <= -2e-154) tmp = sqrt((F * (t_1 / t_2))) * (0.0 - sqrt(2.0)); elseif (t_5 <= 5e-32) tmp = sqrt(((((C * ((2.0 * A) + (2.0 * A))) - (B_m * B_m)) * (2.0 * t_3)) / (A - (t_0 - C)))) / (t_4 - (B_m * B_m)); elseif (t_5 <= Inf) tmp = sqrt((2.0 * t_1)) * (sqrt(t_3) / ((A * (4.0 * C)) - (B_m * B_m))); else tmp = (0.0 - (sqrt(2.0) / B_m)) * sqrt((F * (A + hypot(B_m, A)))); 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[(A + C), $MachinePrecision] + t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(F * t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]}, Block[{t$95$5 = N[(N[Sqrt[N[(N[(2.0 * N[(N[(N[Power[B$95$m, 2.0], $MachinePrecision] - t$95$4), $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$4 - N[Power[B$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, -2e-154], N[(N[Sqrt[N[(F * N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(0.0 - N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, 5e-32], N[(N[Sqrt[N[(N[(N[(N[(C * N[(N[(2.0 * A), $MachinePrecision] + N[(2.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] * N[(2.0 * t$95$3), $MachinePrecision]), $MachinePrecision] / N[(A - N[(t$95$0 - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(t$95$4 - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, Infinity], N[(N[Sqrt[N[(2.0 * t$95$1), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[t$95$3], $MachinePrecision] / N[(N[(A * N[(4.0 * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.0 - N[(N[Sqrt[2.0], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(F * N[(A + N[Sqrt[B$95$m ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $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 := \left(A + C\right) + t\_0\\
t_2 := B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\\
t_3 := F \cdot t\_2\\
t_4 := \left(4 \cdot A\right) \cdot C\\
t_5 := \frac{\sqrt{\left(2 \cdot \left(\left({B\_m}^{2} - t\_4\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{B\_m}^{2} + {\left(A - C\right)}^{2}}\right)}}{t\_4 - {B\_m}^{2}}\\
\mathbf{if}\;t\_5 \leq -2 \cdot 10^{-154}:\\
\;\;\;\;\sqrt{F \cdot \frac{t\_1}{t\_2}} \cdot \left(0 - \sqrt{2}\right)\\
\mathbf{elif}\;t\_5 \leq 5 \cdot 10^{-32}:\\
\;\;\;\;\frac{\sqrt{\frac{\left(C \cdot \left(2 \cdot A + 2 \cdot A\right) - B\_m \cdot B\_m\right) \cdot \left(2 \cdot t\_3\right)}{A - \left(t\_0 - C\right)}}}{t\_4 - B\_m \cdot B\_m}\\
\mathbf{elif}\;t\_5 \leq \infty:\\
\;\;\;\;\sqrt{2 \cdot t\_1} \cdot \frac{\sqrt{t\_3}}{A \cdot \left(4 \cdot C\right) - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\left(0 - \frac{\sqrt{2}}{B\_m}\right) \cdot \sqrt{F \cdot \left(A + \mathsf{hypot}\left(B\_m, A\right)\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))) < -1.9999999999999999e-154Initial program 31.5%
Taylor expanded in F around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
Simplified67.3%
if -1.9999999999999999e-154 < (/.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))) < 5e-32Initial program 14.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified16.5%
Applied egg-rr10.5%
Taylor expanded in C around 0
--lowering--.f64N/A
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6450.6%
Simplified50.6%
if 5e-32 < (/.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 18.9%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified44.2%
Applied egg-rr94.1%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
Applied egg-rr94.3%
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 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.0%
Simplified18.0%
Final simplification46.6%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (+ (* B_m B_m) (* -4.0 (* A C)))))
(if (<= B_m 3.7e-62)
(/
(*
(sqrt (+ (/ (* (* B_m B_m) -0.5) A) (* 2.0 C)))
(sqrt (* 2.0 (* F t_0))))
(- (* (* 4.0 A) C) (* B_m B_m)))
(if (<= B_m 1.1e+153)
(*
(sqrt (* F (/ (+ (+ A C) (hypot B_m (- A C))) t_0)))
(- 0.0 (sqrt 2.0)))
(* (- 0.0 (/ (sqrt 2.0) B_m)) (sqrt (* F (+ A (hypot B_m A)))))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = (B_m * B_m) + (-4.0 * (A * C));
double tmp;
if (B_m <= 3.7e-62) {
tmp = (sqrt(((((B_m * B_m) * -0.5) / A) + (2.0 * C))) * sqrt((2.0 * (F * t_0)))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 1.1e+153) {
tmp = sqrt((F * (((A + C) + hypot(B_m, (A - C))) / t_0))) * (0.0 - sqrt(2.0));
} else {
tmp = (0.0 - (sqrt(2.0) / B_m)) * sqrt((F * (A + hypot(B_m, A))));
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = (B_m * B_m) + (-4.0 * (A * C));
double tmp;
if (B_m <= 3.7e-62) {
tmp = (Math.sqrt(((((B_m * B_m) * -0.5) / A) + (2.0 * C))) * Math.sqrt((2.0 * (F * t_0)))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 1.1e+153) {
tmp = Math.sqrt((F * (((A + C) + Math.hypot(B_m, (A - C))) / t_0))) * (0.0 - Math.sqrt(2.0));
} else {
tmp = (0.0 - (Math.sqrt(2.0) / B_m)) * Math.sqrt((F * (A + Math.hypot(B_m, A))));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = (B_m * B_m) + (-4.0 * (A * C)) tmp = 0 if B_m <= 3.7e-62: tmp = (math.sqrt(((((B_m * B_m) * -0.5) / A) + (2.0 * C))) * math.sqrt((2.0 * (F * t_0)))) / (((4.0 * A) * C) - (B_m * B_m)) elif B_m <= 1.1e+153: tmp = math.sqrt((F * (((A + C) + math.hypot(B_m, (A - C))) / t_0))) * (0.0 - math.sqrt(2.0)) else: tmp = (0.0 - (math.sqrt(2.0) / B_m)) * math.sqrt((F * (A + math.hypot(B_m, A)))) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) tmp = 0.0 if (B_m <= 3.7e-62) tmp = Float64(Float64(sqrt(Float64(Float64(Float64(Float64(B_m * B_m) * -0.5) / A) + Float64(2.0 * C))) * sqrt(Float64(2.0 * Float64(F * t_0)))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); elseif (B_m <= 1.1e+153) tmp = Float64(sqrt(Float64(F * Float64(Float64(Float64(A + C) + hypot(B_m, Float64(A - C))) / t_0))) * Float64(0.0 - sqrt(2.0))); else tmp = Float64(Float64(0.0 - Float64(sqrt(2.0) / B_m)) * sqrt(Float64(F * Float64(A + hypot(B_m, A))))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = (B_m * B_m) + (-4.0 * (A * C)); tmp = 0.0; if (B_m <= 3.7e-62) tmp = (sqrt(((((B_m * B_m) * -0.5) / A) + (2.0 * C))) * sqrt((2.0 * (F * t_0)))) / (((4.0 * A) * C) - (B_m * B_m)); elseif (B_m <= 1.1e+153) tmp = sqrt((F * (((A + C) + hypot(B_m, (A - C))) / t_0))) * (0.0 - sqrt(2.0)); else tmp = (0.0 - (sqrt(2.0) / B_m)) * sqrt((F * (A + hypot(B_m, A)))); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 3.7e-62], N[(N[(N[Sqrt[N[(N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] * -0.5), $MachinePrecision] / A), $MachinePrecision] + N[(2.0 * C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(F * t$95$0), $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.1e+153], N[(N[Sqrt[N[(F * N[(N[(N[(A + C), $MachinePrecision] + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(0.0 - N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.0 - N[(N[Sqrt[2.0], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(F * N[(A + N[Sqrt[B$95$m ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\\
\mathbf{if}\;B\_m \leq 3.7 \cdot 10^{-62}:\\
\;\;\;\;\frac{\sqrt{\frac{\left(B\_m \cdot B\_m\right) \cdot -0.5}{A} + 2 \cdot C} \cdot \sqrt{2 \cdot \left(F \cdot t\_0\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{elif}\;B\_m \leq 1.1 \cdot 10^{+153}:\\
\;\;\;\;\sqrt{F \cdot \frac{\left(A + C\right) + \mathsf{hypot}\left(B\_m, A - C\right)}{t\_0}} \cdot \left(0 - \sqrt{2}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0 - \frac{\sqrt{2}}{B\_m}\right) \cdot \sqrt{F \cdot \left(A + \mathsf{hypot}\left(B\_m, A\right)\right)}\\
\end{array}
\end{array}
if B < 3.6999999999999998e-62Initial program 15.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified24.2%
Applied egg-rr33.1%
Taylor expanded in A around -inf
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6420.2%
Simplified20.2%
if 3.6999999999999998e-62 < B < 1.1e153Initial program 21.0%
Taylor expanded in F around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
Simplified39.2%
if 1.1e153 < B Initial program 3.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.7%
Simplified53.7%
Final simplification27.1%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (* F (+ (* B_m B_m) (* -4.0 (* A C))))))
(if (<= B_m 7.2e-129)
(/
(* (sqrt (* 2.0 t_0)) (sqrt (* 2.0 C)))
(- (* (* 4.0 A) C) (* B_m B_m)))
(if (<= B_m 1.15e+98)
(/
(sqrt (* t_0 (* 2.0 (+ C (+ A (hypot B_m (- A C)))))))
(- (* A (* 4.0 C)) (* B_m B_m)))
(* (- 0.0 (/ (sqrt 2.0) B_m)) (sqrt (* F (+ A (hypot B_m A)))))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = F * ((B_m * B_m) + (-4.0 * (A * C)));
double tmp;
if (B_m <= 7.2e-129) {
tmp = (sqrt((2.0 * t_0)) * sqrt((2.0 * C))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 1.15e+98) {
tmp = sqrt((t_0 * (2.0 * (C + (A + hypot(B_m, (A - C))))))) / ((A * (4.0 * C)) - (B_m * B_m));
} else {
tmp = (0.0 - (sqrt(2.0) / B_m)) * sqrt((F * (A + hypot(B_m, A))));
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = F * ((B_m * B_m) + (-4.0 * (A * C)));
double tmp;
if (B_m <= 7.2e-129) {
tmp = (Math.sqrt((2.0 * t_0)) * Math.sqrt((2.0 * C))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 1.15e+98) {
tmp = Math.sqrt((t_0 * (2.0 * (C + (A + Math.hypot(B_m, (A - C))))))) / ((A * (4.0 * C)) - (B_m * B_m));
} else {
tmp = (0.0 - (Math.sqrt(2.0) / B_m)) * Math.sqrt((F * (A + Math.hypot(B_m, A))));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = F * ((B_m * B_m) + (-4.0 * (A * C))) tmp = 0 if B_m <= 7.2e-129: tmp = (math.sqrt((2.0 * t_0)) * math.sqrt((2.0 * C))) / (((4.0 * A) * C) - (B_m * B_m)) elif B_m <= 1.15e+98: tmp = math.sqrt((t_0 * (2.0 * (C + (A + math.hypot(B_m, (A - C))))))) / ((A * (4.0 * C)) - (B_m * B_m)) else: tmp = (0.0 - (math.sqrt(2.0) / B_m)) * math.sqrt((F * (A + math.hypot(B_m, A)))) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(F * Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C)))) tmp = 0.0 if (B_m <= 7.2e-129) tmp = Float64(Float64(sqrt(Float64(2.0 * t_0)) * sqrt(Float64(2.0 * C))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); elseif (B_m <= 1.15e+98) tmp = Float64(sqrt(Float64(t_0 * Float64(2.0 * Float64(C + Float64(A + hypot(B_m, Float64(A - C))))))) / Float64(Float64(A * Float64(4.0 * C)) - Float64(B_m * B_m))); else tmp = Float64(Float64(0.0 - Float64(sqrt(2.0) / B_m)) * sqrt(Float64(F * Float64(A + hypot(B_m, A))))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = F * ((B_m * B_m) + (-4.0 * (A * C))); tmp = 0.0; if (B_m <= 7.2e-129) tmp = (sqrt((2.0 * t_0)) * sqrt((2.0 * C))) / (((4.0 * A) * C) - (B_m * B_m)); elseif (B_m <= 1.15e+98) tmp = sqrt((t_0 * (2.0 * (C + (A + hypot(B_m, (A - C))))))) / ((A * (4.0 * C)) - (B_m * B_m)); else tmp = (0.0 - (sqrt(2.0) / B_m)) * sqrt((F * (A + hypot(B_m, A)))); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(F * N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 7.2e-129], N[(N[(N[Sqrt[N[(2.0 * t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * C), $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.15e+98], N[(N[Sqrt[N[(t$95$0 * N[(2.0 * N[(C + N[(A + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(A * N[(4.0 * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.0 - N[(N[Sqrt[2.0], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(F * N[(A + N[Sqrt[B$95$m ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := F \cdot \left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right)\\
\mathbf{if}\;B\_m \leq 7.2 \cdot 10^{-129}:\\
\;\;\;\;\frac{\sqrt{2 \cdot t\_0} \cdot \sqrt{2 \cdot C}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{elif}\;B\_m \leq 1.15 \cdot 10^{+98}:\\
\;\;\;\;\frac{\sqrt{t\_0 \cdot \left(2 \cdot \left(C + \left(A + \mathsf{hypot}\left(B\_m, A - C\right)\right)\right)\right)}}{A \cdot \left(4 \cdot C\right) - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\left(0 - \frac{\sqrt{2}}{B\_m}\right) \cdot \sqrt{F \cdot \left(A + \mathsf{hypot}\left(B\_m, A\right)\right)}\\
\end{array}
\end{array}
if B < 7.2e-129Initial program 15.3%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified23.7%
Applied egg-rr30.4%
Taylor expanded in A around -inf
*-lowering-*.f6421.0%
Simplified21.0%
if 7.2e-129 < B < 1.15000000000000007e98Initial program 22.0%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified29.2%
Applied egg-rr45.5%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
Applied egg-rr44.9%
associate-*r/N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
/-lowering-/.f64N/A
Applied egg-rr34.4%
if 1.15000000000000007e98 < B Initial program 5.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.f6448.9%
Simplified48.9%
Final simplification28.1%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (* F (+ (* B_m B_m) (* -4.0 (* A C))))))
(if (<= B_m 4.2e-129)
(/
(* (sqrt (* 2.0 t_0)) (sqrt (* 2.0 C)))
(- (* (* 4.0 A) C) (* B_m B_m)))
(if (<= B_m 1.6e+89)
(/
(sqrt (* t_0 (* 2.0 (+ C (+ A (hypot B_m (- A C)))))))
(- (* A (* 4.0 C)) (* B_m 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 t_0 = F * ((B_m * B_m) + (-4.0 * (A * C)));
double tmp;
if (B_m <= 4.2e-129) {
tmp = (sqrt((2.0 * t_0)) * sqrt((2.0 * C))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 1.6e+89) {
tmp = sqrt((t_0 * (2.0 * (C + (A + hypot(B_m, (A - C))))))) / ((A * (4.0 * C)) - (B_m * B_m));
} else {
tmp = 0.0 - (sqrt(2.0) * sqrt((F / 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 = F * ((B_m * B_m) + (-4.0 * (A * C)));
double tmp;
if (B_m <= 4.2e-129) {
tmp = (Math.sqrt((2.0 * t_0)) * Math.sqrt((2.0 * C))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 1.6e+89) {
tmp = Math.sqrt((t_0 * (2.0 * (C + (A + Math.hypot(B_m, (A - C))))))) / ((A * (4.0 * C)) - (B_m * 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): t_0 = F * ((B_m * B_m) + (-4.0 * (A * C))) tmp = 0 if B_m <= 4.2e-129: tmp = (math.sqrt((2.0 * t_0)) * math.sqrt((2.0 * C))) / (((4.0 * A) * C) - (B_m * B_m)) elif B_m <= 1.6e+89: tmp = math.sqrt((t_0 * (2.0 * (C + (A + math.hypot(B_m, (A - C))))))) / ((A * (4.0 * C)) - (B_m * 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) t_0 = Float64(F * Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C)))) tmp = 0.0 if (B_m <= 4.2e-129) tmp = Float64(Float64(sqrt(Float64(2.0 * t_0)) * sqrt(Float64(2.0 * C))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); elseif (B_m <= 1.6e+89) tmp = Float64(sqrt(Float64(t_0 * Float64(2.0 * Float64(C + Float64(A + hypot(B_m, Float64(A - C))))))) / Float64(Float64(A * Float64(4.0 * C)) - Float64(B_m * B_m))); else tmp = Float64(0.0 - Float64(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) t_0 = F * ((B_m * B_m) + (-4.0 * (A * C))); tmp = 0.0; if (B_m <= 4.2e-129) tmp = (sqrt((2.0 * t_0)) * sqrt((2.0 * C))) / (((4.0 * A) * C) - (B_m * B_m)); elseif (B_m <= 1.6e+89) tmp = sqrt((t_0 * (2.0 * (C + (A + hypot(B_m, (A - C))))))) / ((A * (4.0 * C)) - (B_m * 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_] := Block[{t$95$0 = N[(F * N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 4.2e-129], N[(N[(N[Sqrt[N[(2.0 * t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * C), $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.6e+89], N[(N[Sqrt[N[(t$95$0 * N[(2.0 * N[(C + N[(A + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(A * N[(4.0 * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.0 - N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(F / B$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := F \cdot \left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right)\\
\mathbf{if}\;B\_m \leq 4.2 \cdot 10^{-129}:\\
\;\;\;\;\frac{\sqrt{2 \cdot t\_0} \cdot \sqrt{2 \cdot C}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{elif}\;B\_m \leq 1.6 \cdot 10^{+89}:\\
\;\;\;\;\frac{\sqrt{t\_0 \cdot \left(2 \cdot \left(C + \left(A + \mathsf{hypot}\left(B\_m, A - C\right)\right)\right)\right)}}{A \cdot \left(4 \cdot C\right) - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;0 - \sqrt{2} \cdot \sqrt{\frac{F}{B\_m}}\\
\end{array}
\end{array}
if B < 4.2e-129Initial program 15.3%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified23.7%
Applied egg-rr30.4%
Taylor expanded in A around -inf
*-lowering-*.f6421.0%
Simplified21.0%
if 4.2e-129 < B < 1.59999999999999994e89Initial program 21.2%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified28.7%
Applied egg-rr46.3%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
Applied egg-rr45.6%
associate-*r/N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
/-lowering-/.f64N/A
Applied egg-rr34.0%
if 1.59999999999999994e89 < B Initial program 7.2%
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.f6445.0%
Simplified45.0%
Final simplification27.5%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 1.2e-65)
(/
(sqrt (* C (+ (* -16.0 (* A (* C F))) (* 8.0 (* F (* B_m B_m))))))
(- (* (* 4.0 A) C) (* B_m B_m)))
(if (<= B_m 4.5e+130)
(/
-1.0
(/
(/ (- (* B_m B_m) (* 4.0 (* A C))) B_m)
(sqrt (* 2.0 (* F (+ C (hypot C 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 (B_m <= 1.2e-65) {
tmp = sqrt((C * ((-16.0 * (A * (C * F))) + (8.0 * (F * (B_m * B_m)))))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 4.5e+130) {
tmp = -1.0 / ((((B_m * B_m) - (4.0 * (A * C))) / B_m) / sqrt((2.0 * (F * (C + hypot(C, B_m))))));
} else {
tmp = 0.0 - (sqrt(2.0) * sqrt((F / 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.2e-65) {
tmp = Math.sqrt((C * ((-16.0 * (A * (C * F))) + (8.0 * (F * (B_m * B_m)))))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 4.5e+130) {
tmp = -1.0 / ((((B_m * B_m) - (4.0 * (A * C))) / B_m) / Math.sqrt((2.0 * (F * (C + Math.hypot(C, 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 B_m <= 1.2e-65: tmp = math.sqrt((C * ((-16.0 * (A * (C * F))) + (8.0 * (F * (B_m * B_m)))))) / (((4.0 * A) * C) - (B_m * B_m)) elif B_m <= 4.5e+130: tmp = -1.0 / ((((B_m * B_m) - (4.0 * (A * C))) / B_m) / math.sqrt((2.0 * (F * (C + math.hypot(C, 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 (B_m <= 1.2e-65) tmp = Float64(sqrt(Float64(C * Float64(Float64(-16.0 * Float64(A * Float64(C * F))) + Float64(8.0 * Float64(F * Float64(B_m * B_m)))))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); elseif (B_m <= 4.5e+130) tmp = Float64(-1.0 / Float64(Float64(Float64(Float64(B_m * B_m) - Float64(4.0 * Float64(A * C))) / B_m) / sqrt(Float64(2.0 * Float64(F * Float64(C + hypot(C, B_m))))))); else tmp = Float64(0.0 - Float64(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 (B_m <= 1.2e-65) tmp = sqrt((C * ((-16.0 * (A * (C * F))) + (8.0 * (F * (B_m * B_m)))))) / (((4.0 * A) * C) - (B_m * B_m)); elseif (B_m <= 4.5e+130) tmp = -1.0 / ((((B_m * B_m) - (4.0 * (A * C))) / B_m) / sqrt((2.0 * (F * (C + hypot(C, 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[B$95$m, 1.2e-65], N[(N[Sqrt[N[(C * N[(N[(-16.0 * N[(A * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(8.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, 4.5e+130], N[(-1.0 / N[(N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] - N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B$95$m), $MachinePrecision] / N[Sqrt[N[(2.0 * N[(F * N[(C + N[Sqrt[C ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.0 - N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(F / B$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 1.2 \cdot 10^{-65}:\\
\;\;\;\;\frac{\sqrt{C \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 8 \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 4.5 \cdot 10^{+130}:\\
\;\;\;\;\frac{-1}{\frac{\frac{B\_m \cdot B\_m - 4 \cdot \left(A \cdot C\right)}{B\_m}}{\sqrt{2 \cdot \left(F \cdot \left(C + \mathsf{hypot}\left(C, B\_m\right)\right)\right)}}}\\
\mathbf{else}:\\
\;\;\;\;0 - \sqrt{2} \cdot \sqrt{\frac{F}{B\_m}}\\
\end{array}
\end{array}
if B < 1.2000000000000001e-65Initial program 15.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified24.2%
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
associate-/l*N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6412.0%
Simplified12.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-*.f6418.8%
Simplified18.8%
if 1.2000000000000001e-65 < B < 4.50000000000000039e130Initial program 23.8%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified30.4%
Taylor expanded in A around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6428.3%
Simplified28.3%
clear-numN/A
/-lowering-/.f64N/A
associate-*l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
Applied egg-rr28.4%
if 4.50000000000000039e130 < B Initial program 3.2%
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.f6447.9%
Simplified47.9%
Final simplification24.1%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 7.5e-56)
(/
(* (sqrt (* 2.0 (* F (+ (* B_m B_m) (* -4.0 (* A C)))))) (sqrt (* 2.0 C)))
(- (* (* 4.0 A) C) (* B_m B_m)))
(if (<= B_m 2.95e+128)
(*
B_m
(/
(sqrt (* 2.0 (* F (+ C (hypot C B_m)))))
(- (* 4.0 (* A C)) (* B_m 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 (B_m <= 7.5e-56) {
tmp = (sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C)))))) * sqrt((2.0 * C))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 2.95e+128) {
tmp = B_m * (sqrt((2.0 * (F * (C + hypot(C, B_m))))) / ((4.0 * (A * C)) - (B_m * B_m)));
} else {
tmp = 0.0 - (sqrt(2.0) * sqrt((F / 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 <= 7.5e-56) {
tmp = (Math.sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C)))))) * Math.sqrt((2.0 * C))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 2.95e+128) {
tmp = B_m * (Math.sqrt((2.0 * (F * (C + Math.hypot(C, B_m))))) / ((4.0 * (A * C)) - (B_m * 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 B_m <= 7.5e-56: tmp = (math.sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C)))))) * math.sqrt((2.0 * C))) / (((4.0 * A) * C) - (B_m * B_m)) elif B_m <= 2.95e+128: tmp = B_m * (math.sqrt((2.0 * (F * (C + math.hypot(C, B_m))))) / ((4.0 * (A * C)) - (B_m * 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 (B_m <= 7.5e-56) tmp = Float64(Float64(sqrt(Float64(2.0 * Float64(F * Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C)))))) * sqrt(Float64(2.0 * C))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); elseif (B_m <= 2.95e+128) tmp = Float64(B_m * Float64(sqrt(Float64(2.0 * Float64(F * Float64(C + hypot(C, B_m))))) / Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m)))); else tmp = Float64(0.0 - Float64(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 (B_m <= 7.5e-56) tmp = (sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C)))))) * sqrt((2.0 * C))) / (((4.0 * A) * C) - (B_m * B_m)); elseif (B_m <= 2.95e+128) tmp = B_m * (sqrt((2.0 * (F * (C + hypot(C, B_m))))) / ((4.0 * (A * C)) - (B_m * 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[B$95$m, 7.5e-56], N[(N[(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] * N[Sqrt[N[(2.0 * C), $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, 2.95e+128], N[(B$95$m * N[(N[Sqrt[N[(2.0 * N[(F * N[(C + N[Sqrt[C ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.0 - N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(F / B$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 7.5 \cdot 10^{-56}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right)\right)} \cdot \sqrt{2 \cdot C}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{elif}\;B\_m \leq 2.95 \cdot 10^{+128}:\\
\;\;\;\;B\_m \cdot \frac{\sqrt{2 \cdot \left(F \cdot \left(C + \mathsf{hypot}\left(C, B\_m\right)\right)\right)}}{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;0 - \sqrt{2} \cdot \sqrt{\frac{F}{B\_m}}\\
\end{array}
\end{array}
if B < 7.50000000000000041e-56Initial program 15.9%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified24.5%
Applied egg-rr33.3%
Taylor expanded in A around -inf
*-lowering-*.f6422.3%
Simplified22.3%
if 7.50000000000000041e-56 < B < 2.94999999999999993e128Initial program 22.0%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified29.0%
Taylor expanded in A around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6427.3%
Simplified27.3%
associate-*l*N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr27.4%
if 2.94999999999999993e128 < B Initial program 3.2%
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.f6447.9%
Simplified47.9%
Final simplification26.5%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 1.2e-56)
(*
(/
(sqrt (* F (+ (* B_m B_m) (* -4.0 (* A C)))))
(- (* A (* 4.0 C)) (* B_m B_m)))
(sqrt (* 4.0 C)))
(if (<= B_m 2.25e+127)
(*
B_m
(/
(sqrt (* 2.0 (* F (+ C (hypot C B_m)))))
(- (* 4.0 (* A C)) (* B_m 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 (B_m <= 1.2e-56) {
tmp = (sqrt((F * ((B_m * B_m) + (-4.0 * (A * C))))) / ((A * (4.0 * C)) - (B_m * B_m))) * sqrt((4.0 * C));
} else if (B_m <= 2.25e+127) {
tmp = B_m * (sqrt((2.0 * (F * (C + hypot(C, B_m))))) / ((4.0 * (A * C)) - (B_m * B_m)));
} else {
tmp = 0.0 - (sqrt(2.0) * sqrt((F / 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.2e-56) {
tmp = (Math.sqrt((F * ((B_m * B_m) + (-4.0 * (A * C))))) / ((A * (4.0 * C)) - (B_m * B_m))) * Math.sqrt((4.0 * C));
} else if (B_m <= 2.25e+127) {
tmp = B_m * (Math.sqrt((2.0 * (F * (C + Math.hypot(C, B_m))))) / ((4.0 * (A * C)) - (B_m * 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 B_m <= 1.2e-56: tmp = (math.sqrt((F * ((B_m * B_m) + (-4.0 * (A * C))))) / ((A * (4.0 * C)) - (B_m * B_m))) * math.sqrt((4.0 * C)) elif B_m <= 2.25e+127: tmp = B_m * (math.sqrt((2.0 * (F * (C + math.hypot(C, B_m))))) / ((4.0 * (A * C)) - (B_m * 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 (B_m <= 1.2e-56) tmp = Float64(Float64(sqrt(Float64(F * Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))))) / Float64(Float64(A * Float64(4.0 * C)) - Float64(B_m * B_m))) * sqrt(Float64(4.0 * C))); elseif (B_m <= 2.25e+127) tmp = Float64(B_m * Float64(sqrt(Float64(2.0 * Float64(F * Float64(C + hypot(C, B_m))))) / Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m)))); else tmp = Float64(0.0 - Float64(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 (B_m <= 1.2e-56) tmp = (sqrt((F * ((B_m * B_m) + (-4.0 * (A * C))))) / ((A * (4.0 * C)) - (B_m * B_m))) * sqrt((4.0 * C)); elseif (B_m <= 2.25e+127) tmp = B_m * (sqrt((2.0 * (F * (C + hypot(C, B_m))))) / ((4.0 * (A * C)) - (B_m * 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[B$95$m, 1.2e-56], 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[(N[(A * N[(4.0 * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(4.0 * C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 2.25e+127], N[(B$95$m * N[(N[Sqrt[N[(2.0 * N[(F * N[(C + N[Sqrt[C ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.0 - N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(F / B$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 1.2 \cdot 10^{-56}:\\
\;\;\;\;\frac{\sqrt{F \cdot \left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right)}}{A \cdot \left(4 \cdot C\right) - B\_m \cdot B\_m} \cdot \sqrt{4 \cdot C}\\
\mathbf{elif}\;B\_m \leq 2.25 \cdot 10^{+127}:\\
\;\;\;\;B\_m \cdot \frac{\sqrt{2 \cdot \left(F \cdot \left(C + \mathsf{hypot}\left(C, B\_m\right)\right)\right)}}{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;0 - \sqrt{2} \cdot \sqrt{\frac{F}{B\_m}}\\
\end{array}
\end{array}
if B < 1.2e-56Initial program 15.9%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified24.5%
Applied egg-rr33.3%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
Applied egg-rr32.9%
Taylor expanded in A around -inf
*-lowering-*.f6422.3%
Simplified22.3%
if 1.2e-56 < B < 2.25000000000000017e127Initial program 22.0%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified29.0%
Taylor expanded in A around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6427.3%
Simplified27.3%
associate-*l*N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr27.4%
if 2.25000000000000017e127 < B Initial program 3.2%
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.f6447.9%
Simplified47.9%
Final simplification26.5%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 1.15e-65)
(/
(sqrt (* C (+ (* -16.0 (* A (* C F))) (* 8.0 (* F (* B_m B_m))))))
(- (* (* 4.0 A) C) (* B_m B_m)))
(if (<= B_m 4.5e+128)
(*
B_m
(/
(sqrt (* 2.0 (* F (+ C (hypot C B_m)))))
(- (* 4.0 (* A C)) (* B_m 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 (B_m <= 1.15e-65) {
tmp = sqrt((C * ((-16.0 * (A * (C * F))) + (8.0 * (F * (B_m * B_m)))))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 4.5e+128) {
tmp = B_m * (sqrt((2.0 * (F * (C + hypot(C, B_m))))) / ((4.0 * (A * C)) - (B_m * B_m)));
} else {
tmp = 0.0 - (sqrt(2.0) * sqrt((F / 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.15e-65) {
tmp = Math.sqrt((C * ((-16.0 * (A * (C * F))) + (8.0 * (F * (B_m * B_m)))))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (B_m <= 4.5e+128) {
tmp = B_m * (Math.sqrt((2.0 * (F * (C + Math.hypot(C, B_m))))) / ((4.0 * (A * C)) - (B_m * 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 B_m <= 1.15e-65: tmp = math.sqrt((C * ((-16.0 * (A * (C * F))) + (8.0 * (F * (B_m * B_m)))))) / (((4.0 * A) * C) - (B_m * B_m)) elif B_m <= 4.5e+128: tmp = B_m * (math.sqrt((2.0 * (F * (C + math.hypot(C, B_m))))) / ((4.0 * (A * C)) - (B_m * 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 (B_m <= 1.15e-65) tmp = Float64(sqrt(Float64(C * Float64(Float64(-16.0 * Float64(A * Float64(C * F))) + Float64(8.0 * Float64(F * Float64(B_m * B_m)))))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); elseif (B_m <= 4.5e+128) tmp = Float64(B_m * Float64(sqrt(Float64(2.0 * Float64(F * Float64(C + hypot(C, B_m))))) / Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m)))); else tmp = Float64(0.0 - Float64(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 (B_m <= 1.15e-65) tmp = sqrt((C * ((-16.0 * (A * (C * F))) + (8.0 * (F * (B_m * B_m)))))) / (((4.0 * A) * C) - (B_m * B_m)); elseif (B_m <= 4.5e+128) tmp = B_m * (sqrt((2.0 * (F * (C + hypot(C, B_m))))) / ((4.0 * (A * C)) - (B_m * 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[B$95$m, 1.15e-65], N[(N[Sqrt[N[(C * N[(N[(-16.0 * N[(A * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(8.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, 4.5e+128], N[(B$95$m * N[(N[Sqrt[N[(2.0 * N[(F * N[(C + N[Sqrt[C ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.0 - N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(F / B$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 1.15 \cdot 10^{-65}:\\
\;\;\;\;\frac{\sqrt{C \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 8 \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 4.5 \cdot 10^{+128}:\\
\;\;\;\;B\_m \cdot \frac{\sqrt{2 \cdot \left(F \cdot \left(C + \mathsf{hypot}\left(C, B\_m\right)\right)\right)}}{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;0 - \sqrt{2} \cdot \sqrt{\frac{F}{B\_m}}\\
\end{array}
\end{array}
if B < 1.15e-65Initial program 15.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified24.2%
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
associate-/l*N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6412.0%
Simplified12.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-*.f6418.8%
Simplified18.8%
if 1.15e-65 < B < 4.5000000000000001e128Initial program 23.8%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified30.4%
Taylor expanded in A around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6428.3%
Simplified28.3%
associate-*l*N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr28.3%
if 4.5000000000000001e128 < B Initial program 3.2%
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.f6447.9%
Simplified47.9%
Final simplification24.1%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= C -4e+30)
(/
(sqrt
(+
(* -16.0 (* F (* C (* A A))))
(*
(* B_m B_m)
(*
2.0
(+
(* F (+ (* 2.0 A) (/ (* (* A C) -2.0) (- A C))))
(*
(* F (* B_m B_m))
(*
0.5
(+
(/ (* A C) (* (- A C) (* (- A C) (- A C))))
(/ 1.0 (- A C))))))))))
(- (* (* 4.0 A) C) (* B_m B_m)))
(if (<= C 5.2e-75)
(- 0.0 (* (sqrt 2.0) (sqrt (/ F B_m))))
(*
(/ C (- (* 4.0 (* A C)) (* B_m B_m)))
(sqrt
(*
F
(+
(* A -16.0)
(*
2.0
(+
(* -2.0 (/ (* A (* B_m B_m)) (* C C)))
(* 2.0 (/ (* B_m B_m) C)))))))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (C <= -4e+30) {
tmp = sqrt(((-16.0 * (F * (C * (A * A)))) + ((B_m * B_m) * (2.0 * ((F * ((2.0 * A) + (((A * C) * -2.0) / (A - C)))) + ((F * (B_m * B_m)) * (0.5 * (((A * C) / ((A - C) * ((A - C) * (A - C)))) + (1.0 / (A - C)))))))))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (C <= 5.2e-75) {
tmp = 0.0 - (sqrt(2.0) * sqrt((F / B_m)));
} else {
tmp = (C / ((4.0 * (A * C)) - (B_m * B_m))) * sqrt((F * ((A * -16.0) + (2.0 * ((-2.0 * ((A * (B_m * B_m)) / (C * C))) + (2.0 * ((B_m * B_m) / 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 (c <= (-4d+30)) then
tmp = sqrt((((-16.0d0) * (f * (c * (a * a)))) + ((b_m * b_m) * (2.0d0 * ((f * ((2.0d0 * a) + (((a * c) * (-2.0d0)) / (a - c)))) + ((f * (b_m * b_m)) * (0.5d0 * (((a * c) / ((a - c) * ((a - c) * (a - c)))) + (1.0d0 / (a - c)))))))))) / (((4.0d0 * a) * c) - (b_m * b_m))
else if (c <= 5.2d-75) then
tmp = 0.0d0 - (sqrt(2.0d0) * sqrt((f / b_m)))
else
tmp = (c / ((4.0d0 * (a * c)) - (b_m * b_m))) * sqrt((f * ((a * (-16.0d0)) + (2.0d0 * (((-2.0d0) * ((a * (b_m * b_m)) / (c * c))) + (2.0d0 * ((b_m * b_m) / 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 (C <= -4e+30) {
tmp = Math.sqrt(((-16.0 * (F * (C * (A * A)))) + ((B_m * B_m) * (2.0 * ((F * ((2.0 * A) + (((A * C) * -2.0) / (A - C)))) + ((F * (B_m * B_m)) * (0.5 * (((A * C) / ((A - C) * ((A - C) * (A - C)))) + (1.0 / (A - C)))))))))) / (((4.0 * A) * C) - (B_m * B_m));
} else if (C <= 5.2e-75) {
tmp = 0.0 - (Math.sqrt(2.0) * Math.sqrt((F / B_m)));
} else {
tmp = (C / ((4.0 * (A * C)) - (B_m * B_m))) * Math.sqrt((F * ((A * -16.0) + (2.0 * ((-2.0 * ((A * (B_m * B_m)) / (C * C))) + (2.0 * ((B_m * B_m) / C)))))));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if C <= -4e+30: tmp = math.sqrt(((-16.0 * (F * (C * (A * A)))) + ((B_m * B_m) * (2.0 * ((F * ((2.0 * A) + (((A * C) * -2.0) / (A - C)))) + ((F * (B_m * B_m)) * (0.5 * (((A * C) / ((A - C) * ((A - C) * (A - C)))) + (1.0 / (A - C)))))))))) / (((4.0 * A) * C) - (B_m * B_m)) elif C <= 5.2e-75: tmp = 0.0 - (math.sqrt(2.0) * math.sqrt((F / B_m))) else: tmp = (C / ((4.0 * (A * C)) - (B_m * B_m))) * math.sqrt((F * ((A * -16.0) + (2.0 * ((-2.0 * ((A * (B_m * B_m)) / (C * C))) + (2.0 * ((B_m * B_m) / C))))))) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (C <= -4e+30) tmp = Float64(sqrt(Float64(Float64(-16.0 * Float64(F * Float64(C * Float64(A * A)))) + Float64(Float64(B_m * B_m) * Float64(2.0 * Float64(Float64(F * Float64(Float64(2.0 * A) + Float64(Float64(Float64(A * C) * -2.0) / Float64(A - C)))) + Float64(Float64(F * Float64(B_m * B_m)) * Float64(0.5 * Float64(Float64(Float64(A * C) / Float64(Float64(A - C) * Float64(Float64(A - C) * Float64(A - C)))) + Float64(1.0 / Float64(A - C)))))))))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); elseif (C <= 5.2e-75) tmp = Float64(0.0 - Float64(sqrt(2.0) * sqrt(Float64(F / B_m)))); else tmp = Float64(Float64(C / Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m))) * sqrt(Float64(F * Float64(Float64(A * -16.0) + Float64(2.0 * Float64(Float64(-2.0 * Float64(Float64(A * Float64(B_m * B_m)) / Float64(C * C))) + Float64(2.0 * Float64(Float64(B_m * B_m) / C)))))))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (C <= -4e+30) tmp = sqrt(((-16.0 * (F * (C * (A * A)))) + ((B_m * B_m) * (2.0 * ((F * ((2.0 * A) + (((A * C) * -2.0) / (A - C)))) + ((F * (B_m * B_m)) * (0.5 * (((A * C) / ((A - C) * ((A - C) * (A - C)))) + (1.0 / (A - C)))))))))) / (((4.0 * A) * C) - (B_m * B_m)); elseif (C <= 5.2e-75) tmp = 0.0 - (sqrt(2.0) * sqrt((F / B_m))); else tmp = (C / ((4.0 * (A * C)) - (B_m * B_m))) * sqrt((F * ((A * -16.0) + (2.0 * ((-2.0 * ((A * (B_m * B_m)) / (C * C))) + (2.0 * ((B_m * B_m) / C))))))); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[C, -4e+30], N[(N[Sqrt[N[(N[(-16.0 * N[(F * N[(C * N[(A * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(B$95$m * B$95$m), $MachinePrecision] * N[(2.0 * N[(N[(F * N[(N[(2.0 * A), $MachinePrecision] + N[(N[(N[(A * C), $MachinePrecision] * -2.0), $MachinePrecision] / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] * N[(0.5 * N[(N[(N[(A * C), $MachinePrecision] / N[(N[(A - C), $MachinePrecision] * N[(N[(A - C), $MachinePrecision] * N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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], If[LessEqual[C, 5.2e-75], N[(0.0 - N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(F / B$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(C / N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(F * N[(N[(A * -16.0), $MachinePrecision] + N[(2.0 * N[(N[(-2.0 * N[(N[(A * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] / N[(C * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(B$95$m * B$95$m), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;C \leq -4 \cdot 10^{+30}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(F \cdot \left(C \cdot \left(A \cdot A\right)\right)\right) + \left(B\_m \cdot B\_m\right) \cdot \left(2 \cdot \left(F \cdot \left(2 \cdot A + \frac{\left(A \cdot C\right) \cdot -2}{A - C}\right) + \left(F \cdot \left(B\_m \cdot B\_m\right)\right) \cdot \left(0.5 \cdot \left(\frac{A \cdot C}{\left(A - C\right) \cdot \left(\left(A - C\right) \cdot \left(A - C\right)\right)} + \frac{1}{A - C}\right)\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{elif}\;C \leq 5.2 \cdot 10^{-75}:\\
\;\;\;\;0 - \sqrt{2} \cdot \sqrt{\frac{F}{B\_m}}\\
\mathbf{else}:\\
\;\;\;\;\frac{C}{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m} \cdot \sqrt{F \cdot \left(A \cdot -16 + 2 \cdot \left(-2 \cdot \frac{A \cdot \left(B\_m \cdot B\_m\right)}{C \cdot C} + 2 \cdot \frac{B\_m \cdot B\_m}{C}\right)\right)}\\
\end{array}
\end{array}
if C < -4.0000000000000001e30Initial program 6.2%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified7.3%
Taylor expanded in B around 0
Simplified29.4%
if -4.0000000000000001e30 < C < 5.2e-75Initial program 14.3%
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.f6413.7%
Simplified13.7%
if 5.2e-75 < C Initial program 22.2%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified37.4%
Taylor expanded in C around inf
Simplified22.5%
Taylor expanded in F around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
Simplified42.2%
Final simplification25.8%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (- (* (* 4.0 A) C) (* B_m B_m))))
(if (<= C -1.35e-101)
(/
(sqrt
(+
(* -16.0 (* F (* C (* A A))))
(*
(* B_m B_m)
(*
2.0
(+
(* F (+ (* 2.0 A) (/ (* (* A C) -2.0) (- A C))))
(*
(* F (* B_m B_m))
(*
0.5
(+
(/ (* A C) (* (- A C) (* (- A C) (- A C))))
(/ 1.0 (- A C))))))))))
t_0)
(if (<= C 5.8e-168)
(/ (sqrt (* 2.0 (* F (* B_m (* B_m B_m))))) t_0)
(*
(/ C (- (* 4.0 (* A C)) (* B_m B_m)))
(sqrt
(*
F
(+
(* A -16.0)
(*
2.0
(+
(* -2.0 (/ (* A (* B_m B_m)) (* C C)))
(* 2.0 (/ (* B_m B_m) C))))))))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (C <= -1.35e-101) {
tmp = sqrt(((-16.0 * (F * (C * (A * A)))) + ((B_m * B_m) * (2.0 * ((F * ((2.0 * A) + (((A * C) * -2.0) / (A - C)))) + ((F * (B_m * B_m)) * (0.5 * (((A * C) / ((A - C) * ((A - C) * (A - C)))) + (1.0 / (A - C)))))))))) / t_0;
} else if (C <= 5.8e-168) {
tmp = sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_0;
} else {
tmp = (C / ((4.0 * (A * C)) - (B_m * B_m))) * sqrt((F * ((A * -16.0) + (2.0 * ((-2.0 * ((A * (B_m * B_m)) / (C * C))) + (2.0 * ((B_m * B_m) / 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) - (b_m * b_m)
if (c <= (-1.35d-101)) then
tmp = sqrt((((-16.0d0) * (f * (c * (a * a)))) + ((b_m * b_m) * (2.0d0 * ((f * ((2.0d0 * a) + (((a * c) * (-2.0d0)) / (a - c)))) + ((f * (b_m * b_m)) * (0.5d0 * (((a * c) / ((a - c) * ((a - c) * (a - c)))) + (1.0d0 / (a - c)))))))))) / t_0
else if (c <= 5.8d-168) then
tmp = sqrt((2.0d0 * (f * (b_m * (b_m * b_m))))) / t_0
else
tmp = (c / ((4.0d0 * (a * c)) - (b_m * b_m))) * sqrt((f * ((a * (-16.0d0)) + (2.0d0 * (((-2.0d0) * ((a * (b_m * b_m)) / (c * c))) + (2.0d0 * ((b_m * b_m) / 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) - (B_m * B_m);
double tmp;
if (C <= -1.35e-101) {
tmp = Math.sqrt(((-16.0 * (F * (C * (A * A)))) + ((B_m * B_m) * (2.0 * ((F * ((2.0 * A) + (((A * C) * -2.0) / (A - C)))) + ((F * (B_m * B_m)) * (0.5 * (((A * C) / ((A - C) * ((A - C) * (A - C)))) + (1.0 / (A - C)))))))))) / t_0;
} else if (C <= 5.8e-168) {
tmp = Math.sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_0;
} else {
tmp = (C / ((4.0 * (A * C)) - (B_m * B_m))) * Math.sqrt((F * ((A * -16.0) + (2.0 * ((-2.0 * ((A * (B_m * B_m)) / (C * C))) + (2.0 * ((B_m * B_m) / C)))))));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = ((4.0 * A) * C) - (B_m * B_m) tmp = 0 if C <= -1.35e-101: tmp = math.sqrt(((-16.0 * (F * (C * (A * A)))) + ((B_m * B_m) * (2.0 * ((F * ((2.0 * A) + (((A * C) * -2.0) / (A - C)))) + ((F * (B_m * B_m)) * (0.5 * (((A * C) / ((A - C) * ((A - C) * (A - C)))) + (1.0 / (A - C)))))))))) / t_0 elif C <= 5.8e-168: tmp = math.sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_0 else: tmp = (C / ((4.0 * (A * C)) - (B_m * B_m))) * math.sqrt((F * ((A * -16.0) + (2.0 * ((-2.0 * ((A * (B_m * B_m)) / (C * C))) + (2.0 * ((B_m * B_m) / C))))))) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m)) tmp = 0.0 if (C <= -1.35e-101) tmp = Float64(sqrt(Float64(Float64(-16.0 * Float64(F * Float64(C * Float64(A * A)))) + Float64(Float64(B_m * B_m) * Float64(2.0 * Float64(Float64(F * Float64(Float64(2.0 * A) + Float64(Float64(Float64(A * C) * -2.0) / Float64(A - C)))) + Float64(Float64(F * Float64(B_m * B_m)) * Float64(0.5 * Float64(Float64(Float64(A * C) / Float64(Float64(A - C) * Float64(Float64(A - C) * Float64(A - C)))) + Float64(1.0 / Float64(A - C)))))))))) / t_0); elseif (C <= 5.8e-168) tmp = Float64(sqrt(Float64(2.0 * Float64(F * Float64(B_m * Float64(B_m * B_m))))) / t_0); else tmp = Float64(Float64(C / Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m))) * sqrt(Float64(F * Float64(Float64(A * -16.0) + Float64(2.0 * Float64(Float64(-2.0 * Float64(Float64(A * Float64(B_m * B_m)) / Float64(C * C))) + Float64(2.0 * Float64(Float64(B_m * B_m) / C)))))))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = ((4.0 * A) * C) - (B_m * B_m); tmp = 0.0; if (C <= -1.35e-101) tmp = sqrt(((-16.0 * (F * (C * (A * A)))) + ((B_m * B_m) * (2.0 * ((F * ((2.0 * A) + (((A * C) * -2.0) / (A - C)))) + ((F * (B_m * B_m)) * (0.5 * (((A * C) / ((A - C) * ((A - C) * (A - C)))) + (1.0 / (A - C)))))))))) / t_0; elseif (C <= 5.8e-168) tmp = sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_0; else tmp = (C / ((4.0 * (A * C)) - (B_m * B_m))) * sqrt((F * ((A * -16.0) + (2.0 * ((-2.0 * ((A * (B_m * B_m)) / (C * C))) + (2.0 * ((B_m * B_m) / C))))))); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -1.35e-101], N[(N[Sqrt[N[(N[(-16.0 * N[(F * N[(C * N[(A * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(B$95$m * B$95$m), $MachinePrecision] * N[(2.0 * N[(N[(F * N[(N[(2.0 * A), $MachinePrecision] + N[(N[(N[(A * C), $MachinePrecision] * -2.0), $MachinePrecision] / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] * N[(0.5 * N[(N[(N[(A * C), $MachinePrecision] / N[(N[(A - C), $MachinePrecision] * N[(N[(A - C), $MachinePrecision] * N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(A - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[C, 5.8e-168], N[(N[Sqrt[N[(2.0 * N[(F * N[(B$95$m * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(C / N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(F * N[(N[(A * -16.0), $MachinePrecision] + N[(2.0 * N[(N[(-2.0 * N[(N[(A * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] / N[(C * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(B$95$m * B$95$m), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := \left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\
\mathbf{if}\;C \leq -1.35 \cdot 10^{-101}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(F \cdot \left(C \cdot \left(A \cdot A\right)\right)\right) + \left(B\_m \cdot B\_m\right) \cdot \left(2 \cdot \left(F \cdot \left(2 \cdot A + \frac{\left(A \cdot C\right) \cdot -2}{A - C}\right) + \left(F \cdot \left(B\_m \cdot B\_m\right)\right) \cdot \left(0.5 \cdot \left(\frac{A \cdot C}{\left(A - C\right) \cdot \left(\left(A - C\right) \cdot \left(A - C\right)\right)} + \frac{1}{A - C}\right)\right)\right)\right)}}{t\_0}\\
\mathbf{elif}\;C \leq 5.8 \cdot 10^{-168}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(B\_m \cdot \left(B\_m \cdot B\_m\right)\right)\right)}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{C}{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m} \cdot \sqrt{F \cdot \left(A \cdot -16 + 2 \cdot \left(-2 \cdot \frac{A \cdot \left(B\_m \cdot B\_m\right)}{C \cdot C} + 2 \cdot \frac{B\_m \cdot B\_m}{C}\right)\right)}\\
\end{array}
\end{array}
if C < -1.3500000000000001e-101Initial program 9.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified10.4%
Taylor expanded in B around 0
Simplified29.2%
if -1.3500000000000001e-101 < C < 5.7999999999999997e-168Initial program 15.0%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified21.0%
Taylor expanded in B around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f643.4%
Simplified3.4%
if 5.7999999999999997e-168 < C Initial program 19.0%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified32.2%
Taylor expanded in C around inf
Simplified19.0%
Taylor expanded in F around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
Simplified35.2%
Final simplification24.6%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= C 4e-158)
(/ (sqrt (* -16.0 (* A (* F (* A C))))) (- (* (* 4.0 A) C) (* B_m B_m)))
(*
(/ C (- (* 4.0 (* A C)) (* B_m B_m)))
(sqrt
(*
F
(+
(* A -16.0)
(*
2.0
(+
(* -2.0 (/ (* A (* B_m B_m)) (* C C)))
(* 2.0 (/ (* B_m B_m) C))))))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (C <= 4e-158) {
tmp = sqrt((-16.0 * (A * (F * (A * C))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = (C / ((4.0 * (A * C)) - (B_m * B_m))) * sqrt((F * ((A * -16.0) + (2.0 * ((-2.0 * ((A * (B_m * B_m)) / (C * C))) + (2.0 * ((B_m * B_m) / 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 (c <= 4d-158) then
tmp = sqrt(((-16.0d0) * (a * (f * (a * c))))) / (((4.0d0 * a) * c) - (b_m * b_m))
else
tmp = (c / ((4.0d0 * (a * c)) - (b_m * b_m))) * sqrt((f * ((a * (-16.0d0)) + (2.0d0 * (((-2.0d0) * ((a * (b_m * b_m)) / (c * c))) + (2.0d0 * ((b_m * b_m) / 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 (C <= 4e-158) {
tmp = Math.sqrt((-16.0 * (A * (F * (A * C))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = (C / ((4.0 * (A * C)) - (B_m * B_m))) * Math.sqrt((F * ((A * -16.0) + (2.0 * ((-2.0 * ((A * (B_m * B_m)) / (C * C))) + (2.0 * ((B_m * B_m) / C)))))));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if C <= 4e-158: tmp = math.sqrt((-16.0 * (A * (F * (A * C))))) / (((4.0 * A) * C) - (B_m * B_m)) else: tmp = (C / ((4.0 * (A * C)) - (B_m * B_m))) * math.sqrt((F * ((A * -16.0) + (2.0 * ((-2.0 * ((A * (B_m * B_m)) / (C * C))) + (2.0 * ((B_m * B_m) / C))))))) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (C <= 4e-158) 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(C / Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m))) * sqrt(Float64(F * Float64(Float64(A * -16.0) + Float64(2.0 * Float64(Float64(-2.0 * Float64(Float64(A * Float64(B_m * B_m)) / Float64(C * C))) + Float64(2.0 * Float64(Float64(B_m * B_m) / C)))))))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (C <= 4e-158) tmp = sqrt((-16.0 * (A * (F * (A * C))))) / (((4.0 * A) * C) - (B_m * B_m)); else tmp = (C / ((4.0 * (A * C)) - (B_m * B_m))) * sqrt((F * ((A * -16.0) + (2.0 * ((-2.0 * ((A * (B_m * B_m)) / (C * C))) + (2.0 * ((B_m * B_m) / C))))))); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[C, 4e-158], 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[(C / N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(F * N[(N[(A * -16.0), $MachinePrecision] + N[(2.0 * N[(N[(-2.0 * N[(N[(A * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] / N[(C * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(B$95$m * B$95$m), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;C \leq 4 \cdot 10^{-158}:\\
\;\;\;\;\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{C}{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m} \cdot \sqrt{F \cdot \left(A \cdot -16 + 2 \cdot \left(-2 \cdot \frac{A \cdot \left(B\_m \cdot B\_m\right)}{C \cdot C} + 2 \cdot \frac{B\_m \cdot B\_m}{C}\right)\right)}\\
\end{array}
\end{array}
if C < 4.00000000000000026e-158Initial program 11.9%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified15.0%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6410.4%
Simplified10.4%
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6414.0%
Applied egg-rr14.0%
if 4.00000000000000026e-158 < C Initial program 19.4%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified33.1%
Taylor expanded in C around inf
Simplified19.6%
Taylor expanded in F around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
Simplified36.2%
Final simplification22.7%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (- (* (* 4.0 A) C) (* B_m B_m))) (t_1 (* F (* B_m B_m))))
(if (<= C 1.15e-273)
(/ (sqrt (* -16.0 (* A (* F (* A C))))) t_0)
(/
(sqrt
(+ (* -4.0 (* A t_1)) (* C (+ (* -16.0 (* A (* C F))) (* 4.0 t_1)))))
t_0))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = ((4.0 * A) * C) - (B_m * B_m);
double t_1 = F * (B_m * B_m);
double tmp;
if (C <= 1.15e-273) {
tmp = sqrt((-16.0 * (A * (F * (A * C))))) / t_0;
} else {
tmp = sqrt(((-4.0 * (A * t_1)) + (C * ((-16.0 * (A * (C * F))) + (4.0 * t_1))))) / t_0;
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((4.0d0 * a) * c) - (b_m * b_m)
t_1 = f * (b_m * b_m)
if (c <= 1.15d-273) then
tmp = sqrt(((-16.0d0) * (a * (f * (a * c))))) / t_0
else
tmp = sqrt((((-4.0d0) * (a * t_1)) + (c * (((-16.0d0) * (a * (c * f))) + (4.0d0 * t_1))))) / t_0
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = ((4.0 * A) * C) - (B_m * B_m);
double t_1 = F * (B_m * B_m);
double tmp;
if (C <= 1.15e-273) {
tmp = Math.sqrt((-16.0 * (A * (F * (A * C))))) / t_0;
} else {
tmp = Math.sqrt(((-4.0 * (A * t_1)) + (C * ((-16.0 * (A * (C * F))) + (4.0 * t_1))))) / t_0;
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = ((4.0 * A) * C) - (B_m * B_m) t_1 = F * (B_m * B_m) tmp = 0 if C <= 1.15e-273: tmp = math.sqrt((-16.0 * (A * (F * (A * C))))) / t_0 else: tmp = math.sqrt(((-4.0 * (A * t_1)) + (C * ((-16.0 * (A * (C * F))) + (4.0 * t_1))))) / t_0 return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m)) t_1 = Float64(F * Float64(B_m * B_m)) tmp = 0.0 if (C <= 1.15e-273) tmp = Float64(sqrt(Float64(-16.0 * Float64(A * Float64(F * Float64(A * C))))) / t_0); else tmp = Float64(sqrt(Float64(Float64(-4.0 * Float64(A * t_1)) + Float64(C * Float64(Float64(-16.0 * Float64(A * Float64(C * F))) + Float64(4.0 * t_1))))) / t_0); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = ((4.0 * A) * C) - (B_m * B_m); t_1 = F * (B_m * B_m); tmp = 0.0; if (C <= 1.15e-273) tmp = sqrt((-16.0 * (A * (F * (A * C))))) / t_0; else tmp = sqrt(((-4.0 * (A * t_1)) + (C * ((-16.0 * (A * (C * F))) + (4.0 * t_1))))) / t_0; end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, 1.15e-273], N[(N[Sqrt[N[(-16.0 * N[(A * N[(F * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[Sqrt[N[(N[(-4.0 * N[(A * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(C * N[(N[(-16.0 * N[(A * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := \left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\
t_1 := F \cdot \left(B\_m \cdot B\_m\right)\\
\mathbf{if}\;C \leq 1.15 \cdot 10^{-273}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(A \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{-4 \cdot \left(A \cdot t\_1\right) + C \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 4 \cdot t\_1\right)}}{t\_0}\\
\end{array}
\end{array}
if C < 1.1499999999999999e-273Initial program 10.9%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified14.6%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6412.2%
Simplified12.2%
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6416.5%
Applied egg-rr16.5%
if 1.1499999999999999e-273 < C Initial program 18.9%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified29.8%
Taylor expanded in C around inf
Simplified15.6%
Taylor expanded in C around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6426.6%
Simplified26.6%
Final simplification21.5%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (- (* (* 4.0 A) C) (* B_m B_m))))
(if (<= C 4.1e-274)
(/ (sqrt (* -16.0 (* A (* F (* A C))))) t_0)
(/
(sqrt (* C (+ (* -16.0 (* A (* C F))) (* 8.0 (* F (* B_m B_m))))))
t_0))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (C <= 4.1e-274) {
tmp = sqrt((-16.0 * (A * (F * (A * C))))) / t_0;
} else {
tmp = sqrt((C * ((-16.0 * (A * (C * F))) + (8.0 * (F * (B_m * B_m)))))) / t_0;
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: t_0
real(8) :: tmp
t_0 = ((4.0d0 * a) * c) - (b_m * b_m)
if (c <= 4.1d-274) then
tmp = sqrt(((-16.0d0) * (a * (f * (a * c))))) / t_0
else
tmp = sqrt((c * (((-16.0d0) * (a * (c * f))) + (8.0d0 * (f * (b_m * b_m)))))) / t_0
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (C <= 4.1e-274) {
tmp = Math.sqrt((-16.0 * (A * (F * (A * C))))) / t_0;
} else {
tmp = Math.sqrt((C * ((-16.0 * (A * (C * F))) + (8.0 * (F * (B_m * B_m)))))) / t_0;
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = ((4.0 * A) * C) - (B_m * B_m) tmp = 0 if C <= 4.1e-274: tmp = math.sqrt((-16.0 * (A * (F * (A * C))))) / t_0 else: tmp = math.sqrt((C * ((-16.0 * (A * (C * F))) + (8.0 * (F * (B_m * B_m)))))) / t_0 return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m)) tmp = 0.0 if (C <= 4.1e-274) tmp = Float64(sqrt(Float64(-16.0 * Float64(A * Float64(F * Float64(A * C))))) / t_0); else tmp = Float64(sqrt(Float64(C * Float64(Float64(-16.0 * Float64(A * Float64(C * F))) + Float64(8.0 * Float64(F * Float64(B_m * B_m)))))) / t_0); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = ((4.0 * A) * C) - (B_m * B_m); tmp = 0.0; if (C <= 4.1e-274) tmp = sqrt((-16.0 * (A * (F * (A * C))))) / t_0; else tmp = sqrt((C * ((-16.0 * (A * (C * F))) + (8.0 * (F * (B_m * B_m)))))) / t_0; end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, 4.1e-274], N[(N[Sqrt[N[(-16.0 * N[(A * N[(F * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[Sqrt[N[(C * N[(N[(-16.0 * N[(A * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(8.0 * N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := \left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\
\mathbf{if}\;C \leq 4.1 \cdot 10^{-274}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(A \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{C \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right) + 8 \cdot \left(F \cdot \left(B\_m \cdot B\_m\right)\right)\right)}}{t\_0}\\
\end{array}
\end{array}
if C < 4.09999999999999987e-274Initial program 10.9%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified14.6%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6412.2%
Simplified12.2%
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6416.5%
Applied egg-rr16.5%
if 4.09999999999999987e-274 < C Initial program 18.9%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified29.8%
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
associate-/l*N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6413.5%
Simplified13.5%
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-*.f6423.3%
Simplified23.3%
Final simplification19.9%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (- (* (* 4.0 A) C) (* B_m B_m))))
(if (<= A 9.6e-195)
(/ (sqrt (* 4.0 (* A (* C (* F (+ (* C -2.0) (* C -2.0))))))) t_0)
(if (<= A 2.8e-45)
(*
0.25
(sqrt (/ (+ (* F -16.0) (* -4.0 (/ (* F (* B_m B_m)) (* C C)))) A)))
(/ (sqrt (* -16.0 (* A (* F (* A C))))) t_0)))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (A <= 9.6e-195) {
tmp = sqrt((4.0 * (A * (C * (F * ((C * -2.0) + (C * -2.0))))))) / t_0;
} else if (A <= 2.8e-45) {
tmp = 0.25 * sqrt((((F * -16.0) + (-4.0 * ((F * (B_m * B_m)) / (C * C)))) / A));
} else {
tmp = sqrt((-16.0 * (A * (F * (A * C))))) / t_0;
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: t_0
real(8) :: tmp
t_0 = ((4.0d0 * a) * c) - (b_m * b_m)
if (a <= 9.6d-195) then
tmp = sqrt((4.0d0 * (a * (c * (f * ((c * (-2.0d0)) + (c * (-2.0d0)))))))) / t_0
else if (a <= 2.8d-45) then
tmp = 0.25d0 * sqrt((((f * (-16.0d0)) + ((-4.0d0) * ((f * (b_m * b_m)) / (c * c)))) / a))
else
tmp = sqrt(((-16.0d0) * (a * (f * (a * c))))) / t_0
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (A <= 9.6e-195) {
tmp = Math.sqrt((4.0 * (A * (C * (F * ((C * -2.0) + (C * -2.0))))))) / t_0;
} else if (A <= 2.8e-45) {
tmp = 0.25 * Math.sqrt((((F * -16.0) + (-4.0 * ((F * (B_m * B_m)) / (C * C)))) / A));
} else {
tmp = Math.sqrt((-16.0 * (A * (F * (A * C))))) / t_0;
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = ((4.0 * A) * C) - (B_m * B_m) tmp = 0 if A <= 9.6e-195: tmp = math.sqrt((4.0 * (A * (C * (F * ((C * -2.0) + (C * -2.0))))))) / t_0 elif A <= 2.8e-45: tmp = 0.25 * math.sqrt((((F * -16.0) + (-4.0 * ((F * (B_m * B_m)) / (C * C)))) / A)) else: tmp = math.sqrt((-16.0 * (A * (F * (A * C))))) / t_0 return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m)) tmp = 0.0 if (A <= 9.6e-195) tmp = Float64(sqrt(Float64(4.0 * Float64(A * Float64(C * Float64(F * Float64(Float64(C * -2.0) + Float64(C * -2.0))))))) / t_0); elseif (A <= 2.8e-45) tmp = Float64(0.25 * sqrt(Float64(Float64(Float64(F * -16.0) + Float64(-4.0 * Float64(Float64(F * Float64(B_m * B_m)) / Float64(C * C)))) / A))); else tmp = Float64(sqrt(Float64(-16.0 * Float64(A * Float64(F * Float64(A * C))))) / t_0); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = ((4.0 * A) * C) - (B_m * B_m); tmp = 0.0; if (A <= 9.6e-195) tmp = sqrt((4.0 * (A * (C * (F * ((C * -2.0) + (C * -2.0))))))) / t_0; elseif (A <= 2.8e-45) tmp = 0.25 * sqrt((((F * -16.0) + (-4.0 * ((F * (B_m * B_m)) / (C * C)))) / A)); else tmp = sqrt((-16.0 * (A * (F * (A * C))))) / t_0; end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, 9.6e-195], N[(N[Sqrt[N[(4.0 * N[(A * N[(C * N[(F * N[(N[(C * -2.0), $MachinePrecision] + N[(C * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[A, 2.8e-45], N[(0.25 * N[Sqrt[N[(N[(N[(F * -16.0), $MachinePrecision] + N[(-4.0 * N[(N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] / N[(C * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(-16.0 * N[(A * N[(F * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := \left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\
\mathbf{if}\;A \leq 9.6 \cdot 10^{-195}:\\
\;\;\;\;\frac{\sqrt{4 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(C \cdot -2 + C \cdot -2\right)\right)\right)\right)}}{t\_0}\\
\mathbf{elif}\;A \leq 2.8 \cdot 10^{-45}:\\
\;\;\;\;0.25 \cdot \sqrt{\frac{F \cdot -16 + -4 \cdot \frac{F \cdot \left(B\_m \cdot B\_m\right)}{C \cdot C}}{A}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(A \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)}}{t\_0}\\
\end{array}
\end{array}
if A < 9.6e-195Initial program 16.0%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified20.9%
Applied egg-rr6.3%
Taylor expanded in A around -inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6419.8%
Simplified19.8%
if 9.6e-195 < A < 2.8000000000000001e-45Initial program 9.1%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified23.0%
Taylor expanded in C around inf
Simplified8.5%
Taylor expanded in A around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6429.0%
Simplified29.0%
if 2.8000000000000001e-45 < A Initial program 14.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified24.2%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f644.9%
Simplified4.9%
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6418.8%
Applied egg-rr18.8%
Final simplification20.6%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (- (* (* 4.0 A) C) (* B_m B_m))))
(if (<= C 4.1e-274)
(/ (sqrt (* -16.0 (* A (* F (* A C))))) t_0)
(if (<= C 1.95e+83)
(/ (sqrt (* (* A -16.0) (* F (* C C)))) t_0)
(/ (pow (* C F) 0.5) (/ B_m -2.0))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (C <= 4.1e-274) {
tmp = sqrt((-16.0 * (A * (F * (A * C))))) / t_0;
} else if (C <= 1.95e+83) {
tmp = sqrt(((A * -16.0) * (F * (C * C)))) / t_0;
} else {
tmp = pow((C * F), 0.5) / (B_m / -2.0);
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: t_0
real(8) :: tmp
t_0 = ((4.0d0 * a) * c) - (b_m * b_m)
if (c <= 4.1d-274) then
tmp = sqrt(((-16.0d0) * (a * (f * (a * c))))) / t_0
else if (c <= 1.95d+83) then
tmp = sqrt(((a * (-16.0d0)) * (f * (c * c)))) / t_0
else
tmp = ((c * f) ** 0.5d0) / (b_m / (-2.0d0))
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (C <= 4.1e-274) {
tmp = Math.sqrt((-16.0 * (A * (F * (A * C))))) / t_0;
} else if (C <= 1.95e+83) {
tmp = Math.sqrt(((A * -16.0) * (F * (C * C)))) / t_0;
} else {
tmp = Math.pow((C * F), 0.5) / (B_m / -2.0);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = ((4.0 * A) * C) - (B_m * B_m) tmp = 0 if C <= 4.1e-274: tmp = math.sqrt((-16.0 * (A * (F * (A * C))))) / t_0 elif C <= 1.95e+83: tmp = math.sqrt(((A * -16.0) * (F * (C * C)))) / t_0 else: tmp = math.pow((C * F), 0.5) / (B_m / -2.0) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m)) tmp = 0.0 if (C <= 4.1e-274) tmp = Float64(sqrt(Float64(-16.0 * Float64(A * Float64(F * Float64(A * C))))) / t_0); elseif (C <= 1.95e+83) tmp = Float64(sqrt(Float64(Float64(A * -16.0) * Float64(F * Float64(C * C)))) / t_0); else tmp = Float64((Float64(C * F) ^ 0.5) / Float64(B_m / -2.0)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = ((4.0 * A) * C) - (B_m * B_m); tmp = 0.0; if (C <= 4.1e-274) tmp = sqrt((-16.0 * (A * (F * (A * C))))) / t_0; elseif (C <= 1.95e+83) tmp = sqrt(((A * -16.0) * (F * (C * C)))) / t_0; else tmp = ((C * F) ^ 0.5) / (B_m / -2.0); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, 4.1e-274], N[(N[Sqrt[N[(-16.0 * N[(A * N[(F * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[C, 1.95e+83], N[(N[Sqrt[N[(N[(A * -16.0), $MachinePrecision] * N[(F * N[(C * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[Power[N[(C * F), $MachinePrecision], 0.5], $MachinePrecision] / N[(B$95$m / -2.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := \left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\
\mathbf{if}\;C \leq 4.1 \cdot 10^{-274}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(A \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)}}{t\_0}\\
\mathbf{elif}\;C \leq 1.95 \cdot 10^{+83}:\\
\;\;\;\;\frac{\sqrt{\left(A \cdot -16\right) \cdot \left(F \cdot \left(C \cdot C\right)\right)}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(C \cdot F\right)}^{0.5}}{\frac{B\_m}{-2}}\\
\end{array}
\end{array}
if C < 4.09999999999999987e-274Initial program 10.9%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified14.6%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6412.2%
Simplified12.2%
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6416.5%
Applied egg-rr16.5%
if 4.09999999999999987e-274 < C < 1.9500000000000001e83Initial program 19.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified23.2%
Taylor expanded in A around -inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6418.8%
Simplified18.8%
if 1.9500000000000001e83 < C Initial program 17.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified42.5%
Taylor expanded in C around inf
Simplified10.6%
Taylor expanded in A around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f648.4%
Simplified8.4%
associate-*r*N/A
*-lowering-*.f64N/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f648.4%
Applied egg-rr8.4%
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f648.5%
Applied egg-rr8.5%
Final simplification15.9%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= C 1.6e-124) (/ (sqrt (* -16.0 (* A (* F (* A C))))) (- (* (* 4.0 A) C) (* B_m B_m))) (/ (pow (* C F) 0.5) (/ B_m -2.0))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (C <= 1.6e-124) {
tmp = sqrt((-16.0 * (A * (F * (A * C))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = pow((C * F), 0.5) / (B_m / -2.0);
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if (c <= 1.6d-124) then
tmp = sqrt(((-16.0d0) * (a * (f * (a * c))))) / (((4.0d0 * a) * c) - (b_m * b_m))
else
tmp = ((c * f) ** 0.5d0) / (b_m / (-2.0d0))
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (C <= 1.6e-124) {
tmp = Math.sqrt((-16.0 * (A * (F * (A * C))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = Math.pow((C * F), 0.5) / (B_m / -2.0);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if C <= 1.6e-124: tmp = math.sqrt((-16.0 * (A * (F * (A * C))))) / (((4.0 * A) * C) - (B_m * B_m)) else: tmp = math.pow((C * F), 0.5) / (B_m / -2.0) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (C <= 1.6e-124) 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(C * F) ^ 0.5) / Float64(B_m / -2.0)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (C <= 1.6e-124) tmp = sqrt((-16.0 * (A * (F * (A * C))))) / (((4.0 * A) * C) - (B_m * B_m)); else tmp = ((C * F) ^ 0.5) / (B_m / -2.0); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[C, 1.6e-124], 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[(C * F), $MachinePrecision], 0.5], $MachinePrecision] / N[(B$95$m / -2.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;C \leq 1.6 \cdot 10^{-124}:\\
\;\;\;\;\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(C \cdot F\right)}^{0.5}}{\frac{B\_m}{-2}}\\
\end{array}
\end{array}
if C < 1.60000000000000002e-124Initial program 11.2%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified15.3%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f649.8%
Simplified9.8%
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6414.4%
Applied egg-rr14.4%
if 1.60000000000000002e-124 < C Initial program 21.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified34.7%
Taylor expanded in C around inf
Simplified19.8%
Taylor expanded in A around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f647.6%
Simplified7.6%
associate-*r*N/A
*-lowering-*.f64N/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f647.6%
Applied egg-rr7.6%
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f647.7%
Applied egg-rr7.7%
Final simplification12.0%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= B_m 3.7e-37) (* 0.25 (sqrt (/ (+ (* F -16.0) (* -4.0 (/ (* F (* B_m B_m)) (* C C)))) A))) (* (/ -2.0 B_m) (pow (* (* C F) (* C F)) 0.25))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 3.7e-37) {
tmp = 0.25 * sqrt((((F * -16.0) + (-4.0 * ((F * (B_m * B_m)) / (C * C)))) / A));
} else {
tmp = (-2.0 / B_m) * pow(((C * F) * (C * F)), 0.25);
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if (b_m <= 3.7d-37) then
tmp = 0.25d0 * sqrt((((f * (-16.0d0)) + ((-4.0d0) * ((f * (b_m * b_m)) / (c * c)))) / a))
else
tmp = ((-2.0d0) / b_m) * (((c * f) * (c * f)) ** 0.25d0)
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 3.7e-37) {
tmp = 0.25 * Math.sqrt((((F * -16.0) + (-4.0 * ((F * (B_m * B_m)) / (C * C)))) / A));
} else {
tmp = (-2.0 / B_m) * Math.pow(((C * F) * (C * F)), 0.25);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 3.7e-37: tmp = 0.25 * math.sqrt((((F * -16.0) + (-4.0 * ((F * (B_m * B_m)) / (C * C)))) / A)) else: tmp = (-2.0 / B_m) * math.pow(((C * F) * (C * F)), 0.25) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 3.7e-37) tmp = Float64(0.25 * sqrt(Float64(Float64(Float64(F * -16.0) + Float64(-4.0 * Float64(Float64(F * Float64(B_m * B_m)) / Float64(C * C)))) / A))); else tmp = Float64(Float64(-2.0 / B_m) * (Float64(Float64(C * F) * Float64(C * F)) ^ 0.25)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 3.7e-37) tmp = 0.25 * sqrt((((F * -16.0) + (-4.0 * ((F * (B_m * B_m)) / (C * C)))) / A)); else tmp = (-2.0 / B_m) * (((C * F) * (C * F)) ^ 0.25); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 3.7e-37], N[(0.25 * N[Sqrt[N[(N[(N[(F * -16.0), $MachinePrecision] + N[(-4.0 * N[(N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] / N[(C * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(-2.0 / B$95$m), $MachinePrecision] * N[Power[N[(N[(C * F), $MachinePrecision] * N[(C * F), $MachinePrecision]), $MachinePrecision], 0.25], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 3.7 \cdot 10^{-37}:\\
\;\;\;\;0.25 \cdot \sqrt{\frac{F \cdot -16 + -4 \cdot \frac{F \cdot \left(B\_m \cdot B\_m\right)}{C \cdot C}}{A}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-2}{B\_m} \cdot {\left(\left(C \cdot F\right) \cdot \left(C \cdot F\right)\right)}^{0.25}\\
\end{array}
\end{array}
if B < 3.7e-37Initial program 15.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified24.1%
Taylor expanded in C around inf
Simplified13.0%
Taylor expanded in A around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6410.3%
Simplified10.3%
if 3.7e-37 < B Initial program 12.3%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified15.8%
Taylor expanded in C around inf
Simplified0.8%
Taylor expanded in A around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f646.0%
Simplified6.0%
associate-*r*N/A
*-lowering-*.f64N/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f646.0%
Applied egg-rr6.0%
pow1/2N/A
sqr-powN/A
pow-prod-downN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-eval8.0%
Applied egg-rr8.0%
Final simplification9.7%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (* (/ -2.0 B_m) (pow (* (* C F) (* C F)) 0.25)))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
return (-2.0 / B_m) * pow(((C * F) * (C * F)), 0.25);
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
code = ((-2.0d0) / b_m) * (((c * f) * (c * f)) ** 0.25d0)
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
return (-2.0 / B_m) * Math.pow(((C * F) * (C * F)), 0.25);
}
B_m = math.fabs(B) def code(A, B_m, C, F): return (-2.0 / B_m) * math.pow(((C * F) * (C * F)), 0.25)
B_m = abs(B) function code(A, B_m, C, F) return Float64(Float64(-2.0 / B_m) * (Float64(Float64(C * F) * Float64(C * F)) ^ 0.25)) end
B_m = abs(B); function tmp = code(A, B_m, C, F) tmp = (-2.0 / B_m) * (((C * F) * (C * F)) ^ 0.25); end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := N[(N[(-2.0 / B$95$m), $MachinePrecision] * N[Power[N[(N[(C * F), $MachinePrecision] * N[(C * F), $MachinePrecision]), $MachinePrecision], 0.25], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|
\\
\frac{-2}{B\_m} \cdot {\left(\left(C \cdot F\right) \cdot \left(C \cdot F\right)\right)}^{0.25}
\end{array}
Initial program 14.8%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified22.0%
Taylor expanded in C around inf
Simplified10.0%
Taylor expanded in A around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f643.4%
Simplified3.4%
associate-*r*N/A
*-lowering-*.f64N/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f643.4%
Applied egg-rr3.4%
pow1/2N/A
sqr-powN/A
pow-prod-downN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-eval4.8%
Applied egg-rr4.8%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (/ (pow (* C F) 0.5) (/ B_m -2.0)))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
return pow((C * F), 0.5) / (B_m / -2.0);
}
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 = ((c * f) ** 0.5d0) / (b_m / (-2.0d0))
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
return Math.pow((C * F), 0.5) / (B_m / -2.0);
}
B_m = math.fabs(B) def code(A, B_m, C, F): return math.pow((C * F), 0.5) / (B_m / -2.0)
B_m = abs(B) function code(A, B_m, C, F) return Float64((Float64(C * F) ^ 0.5) / Float64(B_m / -2.0)) end
B_m = abs(B); function tmp = code(A, B_m, C, F) tmp = ((C * F) ^ 0.5) / (B_m / -2.0); end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := N[(N[Power[N[(C * F), $MachinePrecision], 0.5], $MachinePrecision] / N[(B$95$m / -2.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|
\\
\frac{{\left(C \cdot F\right)}^{0.5}}{\frac{B\_m}{-2}}
\end{array}
Initial program 14.8%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified22.0%
Taylor expanded in C around inf
Simplified10.0%
Taylor expanded in A around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f643.4%
Simplified3.4%
associate-*r*N/A
*-lowering-*.f64N/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f643.4%
Applied egg-rr3.4%
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f643.6%
Applied egg-rr3.6%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (/ (* -2.0 (sqrt (* C F))) B_m))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
return (-2.0 * sqrt((C * 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((c * 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((C * F))) / B_m;
}
B_m = math.fabs(B) def code(A, B_m, C, F): return (-2.0 * math.sqrt((C * F))) / B_m
B_m = abs(B) function code(A, B_m, C, F) return Float64(Float64(-2.0 * sqrt(Float64(C * F))) / B_m) end
B_m = abs(B); function tmp = code(A, B_m, C, F) tmp = (-2.0 * sqrt((C * F))) / B_m; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := N[(N[(-2.0 * N[Sqrt[N[(C * F), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / B$95$m), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|
\\
\frac{-2 \cdot \sqrt{C \cdot F}}{B\_m}
\end{array}
Initial program 14.8%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified22.0%
Taylor expanded in C around inf
Simplified10.0%
Taylor expanded in A around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f643.4%
Simplified3.4%
*-commutativeN/A
*-commutativeN/A
un-div-invN/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f643.4%
Applied egg-rr3.4%
Final simplification3.4%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (* (/ -2.0 B_m) (sqrt (* C F))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
return (-2.0 / B_m) * sqrt((C * F));
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
code = ((-2.0d0) / b_m) * sqrt((c * f))
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
return (-2.0 / B_m) * Math.sqrt((C * F));
}
B_m = math.fabs(B) def code(A, B_m, C, F): return (-2.0 / B_m) * math.sqrt((C * F))
B_m = abs(B) function code(A, B_m, C, F) return Float64(Float64(-2.0 / B_m) * sqrt(Float64(C * F))) end
B_m = abs(B); function tmp = code(A, B_m, C, F) tmp = (-2.0 / B_m) * sqrt((C * F)); end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := N[(N[(-2.0 / B$95$m), $MachinePrecision] * N[Sqrt[N[(C * F), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|
\\
\frac{-2}{B\_m} \cdot \sqrt{C \cdot F}
\end{array}
Initial program 14.8%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified22.0%
Taylor expanded in C around inf
Simplified10.0%
Taylor expanded in A around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f643.4%
Simplified3.4%
associate-*r*N/A
*-lowering-*.f64N/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f643.4%
Applied egg-rr3.4%
herbie shell --seed 2024139
(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))))