
(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 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C F)
:precision binary64
(let* ((t_0 (- (pow B 2.0) (* (* 4.0 A) C))))
(/
(-
(sqrt
(*
(* 2.0 (* t_0 F))
(+ (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
t_0)))
double code(double A, double B, double C, double F) {
double t_0 = pow(B, 2.0) - ((4.0 * A) * C);
return -sqrt(((2.0 * (t_0 * F)) * ((A + C) + sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / t_0;
}
real(8) function code(a, b, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: t_0
t_0 = (b ** 2.0d0) - ((4.0d0 * a) * c)
code = -sqrt(((2.0d0 * (t_0 * f)) * ((a + c) + sqrt((((a - c) ** 2.0d0) + (b ** 2.0d0)))))) / t_0
end function
public static double code(double A, double B, double C, double F) {
double t_0 = Math.pow(B, 2.0) - ((4.0 * A) * C);
return -Math.sqrt(((2.0 * (t_0 * F)) * ((A + C) + Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / t_0;
}
def code(A, B, C, F): t_0 = math.pow(B, 2.0) - ((4.0 * A) * C) return -math.sqrt(((2.0 * (t_0 * F)) * ((A + C) + math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / t_0
function code(A, B, C, F) t_0 = Float64((B ^ 2.0) - Float64(Float64(4.0 * A) * C)) return Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(t_0 * F)) * Float64(Float64(A + C) + sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))))) / t_0) end
function tmp = code(A, B, C, F) t_0 = (B ^ 2.0) - ((4.0 * A) * C); tmp = -sqrt(((2.0 * (t_0 * F)) * ((A + C) + sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / t_0; end
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[Power[B, 2.0], $MachinePrecision] - N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]}, N[((-N[Sqrt[N[(N[(2.0 * N[(t$95$0 * F), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] + N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {B}^{2} - \left(4 \cdot A\right) \cdot C\\
\frac{-\sqrt{\left(2 \cdot \left(t\_0 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{t\_0}
\end{array}
\end{array}
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (+ (* B_m B_m) (* -4.0 (* A C))))
(t_1 (sqrt (* 2.0 (* F t_0))))
(t_2 (hypot B_m (- A C)))
(t_3 (sqrt (+ (+ A C) 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))))
(t_6 (- t_4 (* B_m B_m))))
(if (<= t_5 -4e-217)
(*
(/ (* (sqrt (* 2.0 t_0)) (sqrt F)) (- (* 4.0 (* A C)) (* B_m B_m)))
t_3)
(if (<= t_5 0.0)
(/ (* (sqrt (+ (* -0.5 (/ (* B_m B_m) A)) (* 2.0 C))) t_1) t_6)
(if (<= t_5 INFINITY)
(/ (* t_1 (sqrt (+ C (+ A t_2)))) t_6)
(* t_3 (* (sqrt F) (/ (sqrt 2.0) (- 0.0 B_m)))))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = (B_m * B_m) + (-4.0 * (A * C));
double t_1 = sqrt((2.0 * (F * t_0)));
double t_2 = hypot(B_m, (A - C));
double t_3 = sqrt(((A + C) + 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 t_6 = t_4 - (B_m * B_m);
double tmp;
if (t_5 <= -4e-217) {
tmp = ((sqrt((2.0 * t_0)) * sqrt(F)) / ((4.0 * (A * C)) - (B_m * B_m))) * t_3;
} else if (t_5 <= 0.0) {
tmp = (sqrt(((-0.5 * ((B_m * B_m) / A)) + (2.0 * C))) * t_1) / t_6;
} else if (t_5 <= ((double) INFINITY)) {
tmp = (t_1 * sqrt((C + (A + t_2)))) / t_6;
} else {
tmp = t_3 * (sqrt(F) * (sqrt(2.0) / (0.0 - B_m)));
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = (B_m * B_m) + (-4.0 * (A * C));
double t_1 = Math.sqrt((2.0 * (F * t_0)));
double t_2 = Math.hypot(B_m, (A - C));
double t_3 = Math.sqrt(((A + C) + 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 t_6 = t_4 - (B_m * B_m);
double tmp;
if (t_5 <= -4e-217) {
tmp = ((Math.sqrt((2.0 * t_0)) * Math.sqrt(F)) / ((4.0 * (A * C)) - (B_m * B_m))) * t_3;
} else if (t_5 <= 0.0) {
tmp = (Math.sqrt(((-0.5 * ((B_m * B_m) / A)) + (2.0 * C))) * t_1) / t_6;
} else if (t_5 <= Double.POSITIVE_INFINITY) {
tmp = (t_1 * Math.sqrt((C + (A + t_2)))) / t_6;
} else {
tmp = t_3 * (Math.sqrt(F) * (Math.sqrt(2.0) / (0.0 - B_m)));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = (B_m * B_m) + (-4.0 * (A * C)) t_1 = math.sqrt((2.0 * (F * t_0))) t_2 = math.hypot(B_m, (A - C)) t_3 = math.sqrt(((A + C) + 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)) t_6 = t_4 - (B_m * B_m) tmp = 0 if t_5 <= -4e-217: tmp = ((math.sqrt((2.0 * t_0)) * math.sqrt(F)) / ((4.0 * (A * C)) - (B_m * B_m))) * t_3 elif t_5 <= 0.0: tmp = (math.sqrt(((-0.5 * ((B_m * B_m) / A)) + (2.0 * C))) * t_1) / t_6 elif t_5 <= math.inf: tmp = (t_1 * math.sqrt((C + (A + t_2)))) / t_6 else: tmp = t_3 * (math.sqrt(F) * (math.sqrt(2.0) / (0.0 - B_m))) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) t_1 = sqrt(Float64(2.0 * Float64(F * t_0))) t_2 = hypot(B_m, Float64(A - C)) t_3 = sqrt(Float64(Float64(A + C) + 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))) t_6 = Float64(t_4 - Float64(B_m * B_m)) tmp = 0.0 if (t_5 <= -4e-217) tmp = Float64(Float64(Float64(sqrt(Float64(2.0 * t_0)) * sqrt(F)) / Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m))) * t_3); elseif (t_5 <= 0.0) tmp = Float64(Float64(sqrt(Float64(Float64(-0.5 * Float64(Float64(B_m * B_m) / A)) + Float64(2.0 * C))) * t_1) / t_6); elseif (t_5 <= Inf) tmp = Float64(Float64(t_1 * sqrt(Float64(C + Float64(A + t_2)))) / t_6); else tmp = Float64(t_3 * Float64(sqrt(F) * Float64(sqrt(2.0) / Float64(0.0 - B_m)))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = (B_m * B_m) + (-4.0 * (A * C)); t_1 = sqrt((2.0 * (F * t_0))); t_2 = hypot(B_m, (A - C)); t_3 = sqrt(((A + C) + 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)); t_6 = t_4 - (B_m * B_m); tmp = 0.0; if (t_5 <= -4e-217) tmp = ((sqrt((2.0 * t_0)) * sqrt(F)) / ((4.0 * (A * C)) - (B_m * B_m))) * t_3; elseif (t_5 <= 0.0) tmp = (sqrt(((-0.5 * ((B_m * B_m) / A)) + (2.0 * C))) * t_1) / t_6; elseif (t_5 <= Inf) tmp = (t_1 * sqrt((C + (A + t_2)))) / t_6; else tmp = t_3 * (sqrt(F) * (sqrt(2.0) / (0.0 - B_m))); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(2.0 * N[(F * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(N[(A + C), $MachinePrecision] + t$95$2), $MachinePrecision]], $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]}, Block[{t$95$6 = N[(t$95$4 - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, -4e-217], N[(N[(N[(N[Sqrt[N[(2.0 * t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[F], $MachinePrecision]), $MachinePrecision] / N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision], If[LessEqual[t$95$5, 0.0], N[(N[(N[Sqrt[N[(N[(-0.5 * N[(N[(B$95$m * B$95$m), $MachinePrecision] / A), $MachinePrecision]), $MachinePrecision] + N[(2.0 * C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision] / t$95$6), $MachinePrecision], If[LessEqual[t$95$5, Infinity], N[(N[(t$95$1 * N[Sqrt[N[(C + N[(A + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$6), $MachinePrecision], N[(t$95$3 * N[(N[Sqrt[F], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / N[(0.0 - B$95$m), $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)\\
t_1 := \sqrt{2 \cdot \left(F \cdot t\_0\right)}\\
t_2 := \mathsf{hypot}\left(B\_m, A - C\right)\\
t_3 := \sqrt{\left(A + C\right) + 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}}\\
t_6 := t\_4 - B\_m \cdot B\_m\\
\mathbf{if}\;t\_5 \leq -4 \cdot 10^{-217}:\\
\;\;\;\;\frac{\sqrt{2 \cdot t\_0} \cdot \sqrt{F}}{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m} \cdot t\_3\\
\mathbf{elif}\;t\_5 \leq 0:\\
\;\;\;\;\frac{\sqrt{-0.5 \cdot \frac{B\_m \cdot B\_m}{A} + 2 \cdot C} \cdot t\_1}{t\_6}\\
\mathbf{elif}\;t\_5 \leq \infty:\\
\;\;\;\;\frac{t\_1 \cdot \sqrt{C + \left(A + t\_2\right)}}{t\_6}\\
\mathbf{else}:\\
\;\;\;\;t\_3 \cdot \left(\sqrt{F} \cdot \frac{\sqrt{2}}{0 - B\_m}\right)\\
\end{array}
\end{array}
if (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 #s(literal 2 binary64) (*.f64 (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))))) (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C))) < -4.00000000000000033e-217Initial program 49.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified54.3%
pow1/2N/A
*-commutativeN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr66.2%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr65.5%
pow1/2N/A
associate-*r*N/A
unpow-prod-downN/A
*-lowering-*.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f6481.4%
Applied egg-rr81.4%
if -4.00000000000000033e-217 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 #s(literal 2 binary64) (*.f64 (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))))) (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C))) < -0.0Initial program 3.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified3.5%
pow1/2N/A
*-commutativeN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr6.0%
Taylor expanded in A around -inf
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6431.2%
Simplified31.2%
if -0.0 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 #s(literal 2 binary64) (*.f64 (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))))) (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C))) < +inf.0Initial program 32.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified48.6%
pow1/2N/A
*-commutativeN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr60.9%
if +inf.0 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 #s(literal 2 binary64) (*.f64 (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))))) (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C))) Initial program 0.0%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified0.3%
pow1/2N/A
*-commutativeN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr0.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr0.0%
Taylor expanded in B around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6422.3%
Simplified22.3%
Final simplification47.8%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (hypot B_m (- A C))))
(if (<= B_m 2e+70)
(/
(*
(sqrt (* 2.0 (* F (+ (* B_m B_m) (* -4.0 (* A C))))))
(sqrt (+ C (+ A t_0))))
(- (* (* 4.0 A) C) (* B_m B_m)))
(* (sqrt (+ (+ A C) t_0)) (* (sqrt F) (/ (sqrt 2.0) (- 0.0 B_m)))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = hypot(B_m, (A - C));
double tmp;
if (B_m <= 2e+70) {
tmp = (sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C)))))) * sqrt((C + (A + t_0)))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = sqrt(((A + C) + t_0)) * (sqrt(F) * (sqrt(2.0) / (0.0 - B_m)));
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = Math.hypot(B_m, (A - C));
double tmp;
if (B_m <= 2e+70) {
tmp = (Math.sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C)))))) * Math.sqrt((C + (A + t_0)))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = Math.sqrt(((A + C) + t_0)) * (Math.sqrt(F) * (Math.sqrt(2.0) / (0.0 - B_m)));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = math.hypot(B_m, (A - C)) tmp = 0 if B_m <= 2e+70: tmp = (math.sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C)))))) * math.sqrt((C + (A + t_0)))) / (((4.0 * A) * C) - (B_m * B_m)) else: tmp = math.sqrt(((A + C) + t_0)) * (math.sqrt(F) * (math.sqrt(2.0) / (0.0 - B_m))) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = hypot(B_m, Float64(A - C)) tmp = 0.0 if (B_m <= 2e+70) tmp = Float64(Float64(sqrt(Float64(2.0 * Float64(F * Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C)))))) * sqrt(Float64(C + Float64(A + t_0)))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); else tmp = Float64(sqrt(Float64(Float64(A + C) + t_0)) * Float64(sqrt(F) * Float64(sqrt(2.0) / Float64(0.0 - B_m)))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = hypot(B_m, (A - C)); tmp = 0.0; if (B_m <= 2e+70) tmp = (sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C)))))) * sqrt((C + (A + t_0)))) / (((4.0 * A) * C) - (B_m * B_m)); else tmp = sqrt(((A + C) + t_0)) * (sqrt(F) * (sqrt(2.0) / (0.0 - B_m))); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]}, If[LessEqual[B$95$m, 2e+70], 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[(C + N[(A + 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], N[(N[Sqrt[N[(N[(A + C), $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[F], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / N[(0.0 - B$95$m), $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)\\
\mathbf{if}\;B\_m \leq 2 \cdot 10^{+70}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right)\right)} \cdot \sqrt{C + \left(A + t\_0\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(A + C\right) + t\_0} \cdot \left(\sqrt{F} \cdot \frac{\sqrt{2}}{0 - B\_m}\right)\\
\end{array}
\end{array}
if B < 2.00000000000000015e70Initial program 22.9%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified27.1%
pow1/2N/A
*-commutativeN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr33.1%
if 2.00000000000000015e70 < B Initial program 10.1%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified10.5%
pow1/2N/A
*-commutativeN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr14.7%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr14.9%
Taylor expanded in B around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6472.3%
Simplified72.3%
Final simplification39.5%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (hypot B_m (- A C)))
(t_1 (- (* (* 4.0 A) C) (* B_m B_m)))
(t_2 (* 2.0 (* F (+ (* B_m B_m) (* -4.0 (* A C)))))))
(if (<= B_m 3.2e-228)
(/ (* (sqrt t_2) (sqrt (* 2.0 C))) t_1)
(if (<= B_m 9e-121)
(*
(sqrt (+ (+ A C) t_0))
(/ (sqrt (* -8.0 (* A (* C F)))) (- (* 4.0 (* A C)) (* B_m B_m))))
(if (<= B_m 33000000000000.0)
(/ (sqrt (+ (* A t_2) (* t_2 (+ C t_0)))) t_1)
(if (<= B_m 9.2e+150)
(/ (* (* B_m (sqrt F)) (sqrt (* 2.0 (+ C (+ A t_0))))) t_1)
(- 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 = hypot(B_m, (A - C));
double t_1 = ((4.0 * A) * C) - (B_m * B_m);
double t_2 = 2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C))));
double tmp;
if (B_m <= 3.2e-228) {
tmp = (sqrt(t_2) * sqrt((2.0 * C))) / t_1;
} else if (B_m <= 9e-121) {
tmp = sqrt(((A + C) + t_0)) * (sqrt((-8.0 * (A * (C * F)))) / ((4.0 * (A * C)) - (B_m * B_m)));
} else if (B_m <= 33000000000000.0) {
tmp = sqrt(((A * t_2) + (t_2 * (C + t_0)))) / t_1;
} else if (B_m <= 9.2e+150) {
tmp = ((B_m * sqrt(F)) * sqrt((2.0 * (C + (A + t_0))))) / t_1;
} 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 = Math.hypot(B_m, (A - C));
double t_1 = ((4.0 * A) * C) - (B_m * B_m);
double t_2 = 2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C))));
double tmp;
if (B_m <= 3.2e-228) {
tmp = (Math.sqrt(t_2) * Math.sqrt((2.0 * C))) / t_1;
} else if (B_m <= 9e-121) {
tmp = Math.sqrt(((A + C) + t_0)) * (Math.sqrt((-8.0 * (A * (C * F)))) / ((4.0 * (A * C)) - (B_m * B_m)));
} else if (B_m <= 33000000000000.0) {
tmp = Math.sqrt(((A * t_2) + (t_2 * (C + t_0)))) / t_1;
} else if (B_m <= 9.2e+150) {
tmp = ((B_m * Math.sqrt(F)) * Math.sqrt((2.0 * (C + (A + t_0))))) / t_1;
} 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 = math.hypot(B_m, (A - C)) t_1 = ((4.0 * A) * C) - (B_m * B_m) t_2 = 2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C)))) tmp = 0 if B_m <= 3.2e-228: tmp = (math.sqrt(t_2) * math.sqrt((2.0 * C))) / t_1 elif B_m <= 9e-121: tmp = math.sqrt(((A + C) + t_0)) * (math.sqrt((-8.0 * (A * (C * F)))) / ((4.0 * (A * C)) - (B_m * B_m))) elif B_m <= 33000000000000.0: tmp = math.sqrt(((A * t_2) + (t_2 * (C + t_0)))) / t_1 elif B_m <= 9.2e+150: tmp = ((B_m * math.sqrt(F)) * math.sqrt((2.0 * (C + (A + t_0))))) / t_1 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 = hypot(B_m, Float64(A - C)) t_1 = Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m)) t_2 = Float64(2.0 * Float64(F * Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))))) tmp = 0.0 if (B_m <= 3.2e-228) tmp = Float64(Float64(sqrt(t_2) * sqrt(Float64(2.0 * C))) / t_1); elseif (B_m <= 9e-121) tmp = Float64(sqrt(Float64(Float64(A + C) + t_0)) * Float64(sqrt(Float64(-8.0 * Float64(A * Float64(C * F)))) / Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m)))); elseif (B_m <= 33000000000000.0) tmp = Float64(sqrt(Float64(Float64(A * t_2) + Float64(t_2 * Float64(C + t_0)))) / t_1); elseif (B_m <= 9.2e+150) tmp = Float64(Float64(Float64(B_m * sqrt(F)) * sqrt(Float64(2.0 * Float64(C + Float64(A + t_0))))) / t_1); 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 = hypot(B_m, (A - C)); t_1 = ((4.0 * A) * C) - (B_m * B_m); t_2 = 2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C)))); tmp = 0.0; if (B_m <= 3.2e-228) tmp = (sqrt(t_2) * sqrt((2.0 * C))) / t_1; elseif (B_m <= 9e-121) tmp = sqrt(((A + C) + t_0)) * (sqrt((-8.0 * (A * (C * F)))) / ((4.0 * (A * C)) - (B_m * B_m))); elseif (B_m <= 33000000000000.0) tmp = sqrt(((A * t_2) + (t_2 * (C + t_0)))) / t_1; elseif (B_m <= 9.2e+150) tmp = ((B_m * sqrt(F)) * sqrt((2.0 * (C + (A + t_0))))) / t_1; 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[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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]}, If[LessEqual[B$95$m, 3.2e-228], N[(N[(N[Sqrt[t$95$2], $MachinePrecision] * N[Sqrt[N[(2.0 * C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[B$95$m, 9e-121], N[(N[Sqrt[N[(N[(A + C), $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[N[(-8.0 * N[(A * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 33000000000000.0], N[(N[Sqrt[N[(N[(A * t$95$2), $MachinePrecision] + N[(t$95$2 * N[(C + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[B$95$m, 9.2e+150], N[(N[(N[(B$95$m * N[Sqrt[F], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(2.0 * N[(C + N[(A + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$1), $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 := \mathsf{hypot}\left(B\_m, A - C\right)\\
t_1 := \left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\
t_2 := 2 \cdot \left(F \cdot \left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right)\right)\\
\mathbf{if}\;B\_m \leq 3.2 \cdot 10^{-228}:\\
\;\;\;\;\frac{\sqrt{t\_2} \cdot \sqrt{2 \cdot C}}{t\_1}\\
\mathbf{elif}\;B\_m \leq 9 \cdot 10^{-121}:\\
\;\;\;\;\sqrt{\left(A + C\right) + t\_0} \cdot \frac{\sqrt{-8 \cdot \left(A \cdot \left(C \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m}\\
\mathbf{elif}\;B\_m \leq 33000000000000:\\
\;\;\;\;\frac{\sqrt{A \cdot t\_2 + t\_2 \cdot \left(C + t\_0\right)}}{t\_1}\\
\mathbf{elif}\;B\_m \leq 9.2 \cdot 10^{+150}:\\
\;\;\;\;\frac{\left(B\_m \cdot \sqrt{F}\right) \cdot \sqrt{2 \cdot \left(C + \left(A + t\_0\right)\right)}}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;0 - \sqrt{2} \cdot \sqrt{\frac{F}{B\_m}}\\
\end{array}
\end{array}
if B < 3.20000000000000022e-228Initial program 22.1%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified27.5%
pow1/2N/A
*-commutativeN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr32.4%
Taylor expanded in C around inf
*-lowering-*.f6414.9%
Simplified14.9%
if 3.20000000000000022e-228 < B < 9.0000000000000007e-121Initial program 18.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified18.8%
pow1/2N/A
*-commutativeN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr37.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr34.4%
Taylor expanded in B around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6434.6%
Simplified34.6%
if 9.0000000000000007e-121 < B < 3.3e13Initial program 22.1%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified24.9%
associate-+l+N/A
distribute-lft-inN/A
+-lowering-+.f64N/A
Applied egg-rr25.5%
if 3.3e13 < B < 9.20000000000000004e150Initial program 36.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified37.2%
pow2N/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
Applied egg-rr51.1%
Taylor expanded in B around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6453.1%
Simplified53.1%
if 9.20000000000000004e150 < B Initial program 0.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.f6460.7%
Simplified60.7%
Final simplification27.0%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (+ C (+ A (hypot B_m (- A C)))))
(t_1 (- (* (* 4.0 A) C) (* B_m B_m))))
(if (<= B_m 2.6e+70)
(/
(* (sqrt (* 2.0 (* F (+ (* B_m B_m) (* -4.0 (* A C)))))) (sqrt t_0))
t_1)
(if (<= B_m 7.2e+150)
(/ (* (* B_m (sqrt F)) (sqrt (* 2.0 t_0))) t_1)
(- 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 = C + (A + hypot(B_m, (A - C)));
double t_1 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (B_m <= 2.6e+70) {
tmp = (sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C)))))) * sqrt(t_0)) / t_1;
} else if (B_m <= 7.2e+150) {
tmp = ((B_m * sqrt(F)) * sqrt((2.0 * t_0))) / t_1;
} 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 = C + (A + Math.hypot(B_m, (A - C)));
double t_1 = ((4.0 * A) * C) - (B_m * B_m);
double tmp;
if (B_m <= 2.6e+70) {
tmp = (Math.sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C)))))) * Math.sqrt(t_0)) / t_1;
} else if (B_m <= 7.2e+150) {
tmp = ((B_m * Math.sqrt(F)) * Math.sqrt((2.0 * t_0))) / t_1;
} 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 = C + (A + math.hypot(B_m, (A - C))) t_1 = ((4.0 * A) * C) - (B_m * B_m) tmp = 0 if B_m <= 2.6e+70: tmp = (math.sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C)))))) * math.sqrt(t_0)) / t_1 elif B_m <= 7.2e+150: tmp = ((B_m * math.sqrt(F)) * math.sqrt((2.0 * t_0))) / t_1 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(C + Float64(A + hypot(B_m, Float64(A - C)))) t_1 = Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m)) tmp = 0.0 if (B_m <= 2.6e+70) tmp = Float64(Float64(sqrt(Float64(2.0 * Float64(F * Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C)))))) * sqrt(t_0)) / t_1); elseif (B_m <= 7.2e+150) tmp = Float64(Float64(Float64(B_m * sqrt(F)) * sqrt(Float64(2.0 * t_0))) / t_1); 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 = C + (A + hypot(B_m, (A - C))); t_1 = ((4.0 * A) * C) - (B_m * B_m); tmp = 0.0; if (B_m <= 2.6e+70) tmp = (sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C)))))) * sqrt(t_0)) / t_1; elseif (B_m <= 7.2e+150) tmp = ((B_m * sqrt(F)) * sqrt((2.0 * t_0))) / t_1; 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[(C + N[(A + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 2.6e+70], 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[t$95$0], $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[B$95$m, 7.2e+150], N[(N[(N[(B$95$m * N[Sqrt[F], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(2.0 * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$1), $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 := C + \left(A + \mathsf{hypot}\left(B\_m, A - C\right)\right)\\
t_1 := \left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\
\mathbf{if}\;B\_m \leq 2.6 \cdot 10^{+70}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right)\right)} \cdot \sqrt{t\_0}}{t\_1}\\
\mathbf{elif}\;B\_m \leq 7.2 \cdot 10^{+150}:\\
\;\;\;\;\frac{\left(B\_m \cdot \sqrt{F}\right) \cdot \sqrt{2 \cdot t\_0}}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;0 - \sqrt{2} \cdot \sqrt{\frac{F}{B\_m}}\\
\end{array}
\end{array}
if B < 2.6e70Initial program 22.9%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified27.1%
pow1/2N/A
*-commutativeN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr33.1%
if 2.6e70 < B < 7.19999999999999972e150Initial program 32.3%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified33.5%
pow2N/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
Applied egg-rr47.0%
Taylor expanded in B around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6459.8%
Simplified59.8%
if 7.19999999999999972e150 < B Initial program 0.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.f6460.7%
Simplified60.7%
Final simplification37.6%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (+ C (+ A (hypot B_m (- A C))))))
(if (<= B_m 2e+70)
(*
(sqrt (* 2.0 (* F (+ (* B_m B_m) (* -4.0 (* A C))))))
(/ (sqrt t_0) (- (* A (* 4.0 C)) (* B_m B_m))))
(if (<= B_m 1.2e+151)
(/
(* (* B_m (sqrt F)) (sqrt (* 2.0 t_0)))
(- (* (* 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 t_0 = C + (A + hypot(B_m, (A - C)));
double tmp;
if (B_m <= 2e+70) {
tmp = sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C)))))) * (sqrt(t_0) / ((A * (4.0 * C)) - (B_m * B_m)));
} else if (B_m <= 1.2e+151) {
tmp = ((B_m * sqrt(F)) * sqrt((2.0 * t_0))) / (((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 t_0 = C + (A + Math.hypot(B_m, (A - C)));
double tmp;
if (B_m <= 2e+70) {
tmp = Math.sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C)))))) * (Math.sqrt(t_0) / ((A * (4.0 * C)) - (B_m * B_m)));
} else if (B_m <= 1.2e+151) {
tmp = ((B_m * Math.sqrt(F)) * Math.sqrt((2.0 * t_0))) / (((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): t_0 = C + (A + math.hypot(B_m, (A - C))) tmp = 0 if B_m <= 2e+70: tmp = math.sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C)))))) * (math.sqrt(t_0) / ((A * (4.0 * C)) - (B_m * B_m))) elif B_m <= 1.2e+151: tmp = ((B_m * math.sqrt(F)) * math.sqrt((2.0 * t_0))) / (((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) t_0 = Float64(C + Float64(A + hypot(B_m, Float64(A - C)))) tmp = 0.0 if (B_m <= 2e+70) tmp = Float64(sqrt(Float64(2.0 * Float64(F * Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C)))))) * Float64(sqrt(t_0) / Float64(Float64(A * Float64(4.0 * C)) - Float64(B_m * B_m)))); elseif (B_m <= 1.2e+151) tmp = Float64(Float64(Float64(B_m * sqrt(F)) * sqrt(Float64(2.0 * t_0))) / Float64(Float64(Float64(4.0 * 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) t_0 = C + (A + hypot(B_m, (A - C))); tmp = 0.0; if (B_m <= 2e+70) tmp = sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C)))))) * (sqrt(t_0) / ((A * (4.0 * C)) - (B_m * B_m))); elseif (B_m <= 1.2e+151) tmp = ((B_m * sqrt(F)) * sqrt((2.0 * t_0))) / (((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_] := Block[{t$95$0 = N[(C + N[(A + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 2e+70], 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[(N[Sqrt[t$95$0], $MachinePrecision] / N[(N[(A * N[(4.0 * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 1.2e+151], N[(N[(N[(B$95$m * N[Sqrt[F], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(2.0 * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(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 := C + \left(A + \mathsf{hypot}\left(B\_m, A - C\right)\right)\\
\mathbf{if}\;B\_m \leq 2 \cdot 10^{+70}:\\
\;\;\;\;\sqrt{2 \cdot \left(F \cdot \left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right)\right)} \cdot \frac{\sqrt{t\_0}}{A \cdot \left(4 \cdot C\right) - B\_m \cdot B\_m}\\
\mathbf{elif}\;B\_m \leq 1.2 \cdot 10^{+151}:\\
\;\;\;\;\frac{\left(B\_m \cdot \sqrt{F}\right) \cdot \sqrt{2 \cdot t\_0}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;0 - \sqrt{2} \cdot \sqrt{\frac{F}{B\_m}}\\
\end{array}
\end{array}
if B < 2.00000000000000015e70Initial program 22.9%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified27.1%
pow1/2N/A
unpow-prod-downN/A
associate-/l*N/A
*-lowering-*.f64N/A
Applied egg-rr33.0%
if 2.00000000000000015e70 < B < 1.20000000000000005e151Initial program 32.3%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified33.5%
pow2N/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
Applied egg-rr47.0%
Taylor expanded in B around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6459.8%
Simplified59.8%
if 1.20000000000000005e151 < B Initial program 0.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.f6460.7%
Simplified60.7%
Final simplification37.5%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (sqrt (* 2.0 (+ C (+ A (hypot B_m (- A C))))))))
(if (<= B_m 1e-45)
(/ (* t_0 (sqrt (* F (+ (* B_m B_m) (* -4.0 (* A C)))))) (* 4.0 (* A C)))
(if (<= B_m 8.6e+150)
(/ (* (* B_m (sqrt F)) t_0) (- (* (* 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 t_0 = sqrt((2.0 * (C + (A + hypot(B_m, (A - C))))));
double tmp;
if (B_m <= 1e-45) {
tmp = (t_0 * sqrt((F * ((B_m * B_m) + (-4.0 * (A * C)))))) / (4.0 * (A * C));
} else if (B_m <= 8.6e+150) {
tmp = ((B_m * sqrt(F)) * t_0) / (((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 t_0 = Math.sqrt((2.0 * (C + (A + Math.hypot(B_m, (A - C))))));
double tmp;
if (B_m <= 1e-45) {
tmp = (t_0 * Math.sqrt((F * ((B_m * B_m) + (-4.0 * (A * C)))))) / (4.0 * (A * C));
} else if (B_m <= 8.6e+150) {
tmp = ((B_m * Math.sqrt(F)) * t_0) / (((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): t_0 = math.sqrt((2.0 * (C + (A + math.hypot(B_m, (A - C)))))) tmp = 0 if B_m <= 1e-45: tmp = (t_0 * math.sqrt((F * ((B_m * B_m) + (-4.0 * (A * C)))))) / (4.0 * (A * C)) elif B_m <= 8.6e+150: tmp = ((B_m * math.sqrt(F)) * t_0) / (((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) t_0 = sqrt(Float64(2.0 * Float64(C + Float64(A + hypot(B_m, Float64(A - C)))))) tmp = 0.0 if (B_m <= 1e-45) tmp = Float64(Float64(t_0 * sqrt(Float64(F * Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C)))))) / Float64(4.0 * Float64(A * C))); elseif (B_m <= 8.6e+150) tmp = Float64(Float64(Float64(B_m * sqrt(F)) * t_0) / Float64(Float64(Float64(4.0 * 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) t_0 = sqrt((2.0 * (C + (A + hypot(B_m, (A - C)))))); tmp = 0.0; if (B_m <= 1e-45) tmp = (t_0 * sqrt((F * ((B_m * B_m) + (-4.0 * (A * C)))))) / (4.0 * (A * C)); elseif (B_m <= 8.6e+150) tmp = ((B_m * sqrt(F)) * t_0) / (((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_] := Block[{t$95$0 = N[Sqrt[N[(2.0 * N[(C + N[(A + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[B$95$m, 1e-45], N[(N[(t$95$0 * N[Sqrt[N[(F * N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 8.6e+150], N[(N[(N[(B$95$m * N[Sqrt[F], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $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 := \sqrt{2 \cdot \left(C + \left(A + \mathsf{hypot}\left(B\_m, A - C\right)\right)\right)}\\
\mathbf{if}\;B\_m \leq 10^{-45}:\\
\;\;\;\;\frac{t\_0 \cdot \sqrt{F \cdot \left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right)}}{4 \cdot \left(A \cdot C\right)}\\
\mathbf{elif}\;B\_m \leq 8.6 \cdot 10^{+150}:\\
\;\;\;\;\frac{\left(B\_m \cdot \sqrt{F}\right) \cdot t\_0}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;0 - \sqrt{2} \cdot \sqrt{\frac{F}{B\_m}}\\
\end{array}
\end{array}
if B < 9.99999999999999984e-46Initial program 19.4%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified24.1%
pow2N/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
Applied egg-rr29.9%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-lowering-*.f6420.4%
Simplified20.4%
if 9.99999999999999984e-46 < B < 8.59999999999999994e150Initial program 43.6%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified44.2%
pow2N/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
Applied egg-rr53.5%
Taylor expanded in B around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6449.9%
Simplified49.9%
if 8.59999999999999994e150 < B Initial program 0.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.f6460.7%
Simplified60.7%
Final simplification29.4%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (hypot B_m (- A C)))
(t_1 (- (* (* 4.0 A) C) (* B_m B_m)))
(t_2 (* 2.0 (* F (+ (* B_m B_m) (* -4.0 (* A C)))))))
(if (<= B_m 2.2e+14)
(/ (sqrt (+ (* A t_2) (* t_2 (+ C t_0)))) t_1)
(if (<= B_m 6.1e+150)
(/ (* (* B_m (sqrt F)) (sqrt (* 2.0 (+ C (+ A t_0))))) t_1)
(- 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 = hypot(B_m, (A - C));
double t_1 = ((4.0 * A) * C) - (B_m * B_m);
double t_2 = 2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C))));
double tmp;
if (B_m <= 2.2e+14) {
tmp = sqrt(((A * t_2) + (t_2 * (C + t_0)))) / t_1;
} else if (B_m <= 6.1e+150) {
tmp = ((B_m * sqrt(F)) * sqrt((2.0 * (C + (A + t_0))))) / t_1;
} 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 = Math.hypot(B_m, (A - C));
double t_1 = ((4.0 * A) * C) - (B_m * B_m);
double t_2 = 2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C))));
double tmp;
if (B_m <= 2.2e+14) {
tmp = Math.sqrt(((A * t_2) + (t_2 * (C + t_0)))) / t_1;
} else if (B_m <= 6.1e+150) {
tmp = ((B_m * Math.sqrt(F)) * Math.sqrt((2.0 * (C + (A + t_0))))) / t_1;
} 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 = math.hypot(B_m, (A - C)) t_1 = ((4.0 * A) * C) - (B_m * B_m) t_2 = 2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C)))) tmp = 0 if B_m <= 2.2e+14: tmp = math.sqrt(((A * t_2) + (t_2 * (C + t_0)))) / t_1 elif B_m <= 6.1e+150: tmp = ((B_m * math.sqrt(F)) * math.sqrt((2.0 * (C + (A + t_0))))) / t_1 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 = hypot(B_m, Float64(A - C)) t_1 = Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m)) t_2 = Float64(2.0 * Float64(F * Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))))) tmp = 0.0 if (B_m <= 2.2e+14) tmp = Float64(sqrt(Float64(Float64(A * t_2) + Float64(t_2 * Float64(C + t_0)))) / t_1); elseif (B_m <= 6.1e+150) tmp = Float64(Float64(Float64(B_m * sqrt(F)) * sqrt(Float64(2.0 * Float64(C + Float64(A + t_0))))) / t_1); 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 = hypot(B_m, (A - C)); t_1 = ((4.0 * A) * C) - (B_m * B_m); t_2 = 2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C)))); tmp = 0.0; if (B_m <= 2.2e+14) tmp = sqrt(((A * t_2) + (t_2 * (C + t_0)))) / t_1; elseif (B_m <= 6.1e+150) tmp = ((B_m * sqrt(F)) * sqrt((2.0 * (C + (A + t_0))))) / t_1; 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[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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]}, If[LessEqual[B$95$m, 2.2e+14], N[(N[Sqrt[N[(N[(A * t$95$2), $MachinePrecision] + N[(t$95$2 * N[(C + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[B$95$m, 6.1e+150], N[(N[(N[(B$95$m * N[Sqrt[F], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(2.0 * N[(C + N[(A + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$1), $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 := \mathsf{hypot}\left(B\_m, A - C\right)\\
t_1 := \left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\
t_2 := 2 \cdot \left(F \cdot \left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right)\right)\\
\mathbf{if}\;B\_m \leq 2.2 \cdot 10^{+14}:\\
\;\;\;\;\frac{\sqrt{A \cdot t\_2 + t\_2 \cdot \left(C + t\_0\right)}}{t\_1}\\
\mathbf{elif}\;B\_m \leq 6.1 \cdot 10^{+150}:\\
\;\;\;\;\frac{\left(B\_m \cdot \sqrt{F}\right) \cdot \sqrt{2 \cdot \left(C + \left(A + t\_0\right)\right)}}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;0 - \sqrt{2} \cdot \sqrt{\frac{F}{B\_m}}\\
\end{array}
\end{array}
if B < 2.2e14Initial program 21.8%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.2%
associate-+l+N/A
distribute-lft-inN/A
+-lowering-+.f64N/A
Applied egg-rr27.0%
if 2.2e14 < B < 6.10000000000000026e150Initial program 36.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified37.2%
pow2N/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
Applied egg-rr51.1%
Taylor expanded in B around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6453.1%
Simplified53.1%
if 6.10000000000000026e150 < B Initial program 0.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.f6460.7%
Simplified60.7%
Final simplification33.5%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (* (* 4.0 A) C)) (t_1 (- t_0 (* B_m B_m))))
(if (<= B_m 1.9e-169)
(/
(*
(sqrt (* 2.0 (* F (+ (* B_m B_m) (* -4.0 (* A C))))))
(sqrt (* 2.0 C)))
t_1)
(if (<= B_m 1.9e+63)
(/
(sqrt
(* (* (- (* B_m B_m) t_0) (* 2.0 F)) (+ (+ A C) (hypot B_m (- A C)))))
t_1)
(- 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 = (4.0 * A) * C;
double t_1 = t_0 - (B_m * B_m);
double tmp;
if (B_m <= 1.9e-169) {
tmp = (sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C)))))) * sqrt((2.0 * C))) / t_1;
} else if (B_m <= 1.9e+63) {
tmp = sqrt(((((B_m * B_m) - t_0) * (2.0 * F)) * ((A + C) + hypot(B_m, (A - C))))) / t_1;
} 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 = (4.0 * A) * C;
double t_1 = t_0 - (B_m * B_m);
double tmp;
if (B_m <= 1.9e-169) {
tmp = (Math.sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C)))))) * Math.sqrt((2.0 * C))) / t_1;
} else if (B_m <= 1.9e+63) {
tmp = Math.sqrt(((((B_m * B_m) - t_0) * (2.0 * F)) * ((A + C) + Math.hypot(B_m, (A - C))))) / t_1;
} 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 = (4.0 * A) * C t_1 = t_0 - (B_m * B_m) tmp = 0 if B_m <= 1.9e-169: tmp = (math.sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C)))))) * math.sqrt((2.0 * C))) / t_1 elif B_m <= 1.9e+63: tmp = math.sqrt(((((B_m * B_m) - t_0) * (2.0 * F)) * ((A + C) + math.hypot(B_m, (A - C))))) / t_1 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(Float64(4.0 * A) * C) t_1 = Float64(t_0 - Float64(B_m * B_m)) tmp = 0.0 if (B_m <= 1.9e-169) 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))) / t_1); elseif (B_m <= 1.9e+63) tmp = Float64(sqrt(Float64(Float64(Float64(Float64(B_m * B_m) - t_0) * Float64(2.0 * F)) * Float64(Float64(A + C) + hypot(B_m, Float64(A - C))))) / t_1); 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 = (4.0 * A) * C; t_1 = t_0 - (B_m * B_m); tmp = 0.0; if (B_m <= 1.9e-169) tmp = (sqrt((2.0 * (F * ((B_m * B_m) + (-4.0 * (A * C)))))) * sqrt((2.0 * C))) / t_1; elseif (B_m <= 1.9e+63) tmp = sqrt(((((B_m * B_m) - t_0) * (2.0 * F)) * ((A + C) + hypot(B_m, (A - C))))) / t_1; 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[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 1.9e-169], 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] / t$95$1), $MachinePrecision], If[LessEqual[B$95$m, 1.9e+63], N[(N[Sqrt[N[(N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] - t$95$0), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$1), $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 := \left(4 \cdot A\right) \cdot C\\
t_1 := t\_0 - B\_m \cdot B\_m\\
\mathbf{if}\;B\_m \leq 1.9 \cdot 10^{-169}:\\
\;\;\;\;\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}}{t\_1}\\
\mathbf{elif}\;B\_m \leq 1.9 \cdot 10^{+63}:\\
\;\;\;\;\frac{\sqrt{\left(\left(B\_m \cdot B\_m - t\_0\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(B\_m, A - C\right)\right)}}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;0 - \sqrt{2} \cdot \sqrt{\frac{F}{B\_m}}\\
\end{array}
\end{array}
if B < 1.9e-169Initial program 21.0%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.2%
pow1/2N/A
*-commutativeN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr31.2%
Taylor expanded in C around inf
*-lowering-*.f6416.1%
Simplified16.1%
if 1.9e-169 < B < 1.9000000000000001e63Initial program 27.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified29.3%
if 1.9000000000000001e63 < B Initial program 10.1%
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.f6453.0%
Simplified53.0%
Final simplification25.4%
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 (+ (* B_m B_m) (* -4.0 (* A C)))))
(if (<= B_m 1.9e-188)
(/ (* (sqrt (* 2.0 (* F t_1))) (sqrt (* 2.0 C))) t_0)
(if (<= B_m 2.2e+64)
(/ (sqrt (* (* 2.0 F) (* t_1 (+ C (+ A (hypot B_m (- A C))))))) t_0)
(- 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 = ((4.0 * A) * C) - (B_m * B_m);
double t_1 = (B_m * B_m) + (-4.0 * (A * C));
double tmp;
if (B_m <= 1.9e-188) {
tmp = (sqrt((2.0 * (F * t_1))) * sqrt((2.0 * C))) / t_0;
} else if (B_m <= 2.2e+64) {
tmp = sqrt(((2.0 * F) * (t_1 * (C + (A + hypot(B_m, (A - C))))))) / t_0;
} 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 = ((4.0 * A) * C) - (B_m * B_m);
double t_1 = (B_m * B_m) + (-4.0 * (A * C));
double tmp;
if (B_m <= 1.9e-188) {
tmp = (Math.sqrt((2.0 * (F * t_1))) * Math.sqrt((2.0 * C))) / t_0;
} else if (B_m <= 2.2e+64) {
tmp = Math.sqrt(((2.0 * F) * (t_1 * (C + (A + Math.hypot(B_m, (A - C))))))) / t_0;
} 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 = ((4.0 * A) * C) - (B_m * B_m) t_1 = (B_m * B_m) + (-4.0 * (A * C)) tmp = 0 if B_m <= 1.9e-188: tmp = (math.sqrt((2.0 * (F * t_1))) * math.sqrt((2.0 * C))) / t_0 elif B_m <= 2.2e+64: tmp = math.sqrt(((2.0 * F) * (t_1 * (C + (A + math.hypot(B_m, (A - C))))))) / t_0 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(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m)) t_1 = Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) tmp = 0.0 if (B_m <= 1.9e-188) tmp = Float64(Float64(sqrt(Float64(2.0 * Float64(F * t_1))) * sqrt(Float64(2.0 * C))) / t_0); elseif (B_m <= 2.2e+64) tmp = Float64(sqrt(Float64(Float64(2.0 * F) * Float64(t_1 * Float64(C + Float64(A + hypot(B_m, Float64(A - C))))))) / t_0); 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 = ((4.0 * A) * C) - (B_m * B_m); t_1 = (B_m * B_m) + (-4.0 * (A * C)); tmp = 0.0; if (B_m <= 1.9e-188) tmp = (sqrt((2.0 * (F * t_1))) * sqrt((2.0 * C))) / t_0; elseif (B_m <= 2.2e+64) tmp = sqrt(((2.0 * F) * (t_1 * (C + (A + hypot(B_m, (A - C))))))) / t_0; 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[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 1.9e-188], N[(N[(N[Sqrt[N[(2.0 * N[(F * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * C), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[B$95$m, 2.2e+64], N[(N[Sqrt[N[(N[(2.0 * F), $MachinePrecision] * N[(t$95$1 * N[(C + N[(A + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $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 := \left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m\\
t_1 := B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\\
\mathbf{if}\;B\_m \leq 1.9 \cdot 10^{-188}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot t\_1\right)} \cdot \sqrt{2 \cdot C}}{t\_0}\\
\mathbf{elif}\;B\_m \leq 2.2 \cdot 10^{+64}:\\
\;\;\;\;\frac{\sqrt{\left(2 \cdot F\right) \cdot \left(t\_1 \cdot \left(C + \left(A + \mathsf{hypot}\left(B\_m, A - C\right)\right)\right)\right)}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;0 - \sqrt{2} \cdot \sqrt{\frac{F}{B\_m}}\\
\end{array}
\end{array}
if B < 1.9e-188Initial program 21.4%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.7%
pow1/2N/A
*-commutativeN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr31.6%
Taylor expanded in C around inf
*-lowering-*.f6415.7%
Simplified15.7%
if 1.9e-188 < B < 2.20000000000000002e64Initial program 26.4%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified28.1%
*-commutativeN/A
pow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr28.6%
if 2.20000000000000002e64 < B Initial program 10.1%
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.f6453.0%
Simplified53.0%
Final simplification25.1%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 3.2e+63)
(/
(sqrt
(*
(+ (* B_m B_m) (* -4.0 (* A C)))
(* 2.0 (* F (+ C (+ A (hypot B_m (- A C))))))))
(- (* (* 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 <= 3.2e+63) {
tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * (F * (C + (A + hypot(B_m, (A - C)))))))) / (((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 <= 3.2e+63) {
tmp = Math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * (F * (C + (A + Math.hypot(B_m, (A - C)))))))) / (((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 <= 3.2e+63: tmp = math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * (F * (C + (A + math.hypot(B_m, (A - C)))))))) / (((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 <= 3.2e+63) tmp = Float64(sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(2.0 * Float64(F * Float64(C + Float64(A + hypot(B_m, Float64(A - C)))))))) / Float64(Float64(Float64(4.0 * 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 <= 3.2e+63) tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * (2.0 * (F * (C + (A + hypot(B_m, (A - C)))))))) / (((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, 3.2e+63], N[(N[Sqrt[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(F * N[(C + N[(A + N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(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 3.2 \cdot 10^{+63}:\\
\;\;\;\;\frac{\sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(2 \cdot \left(F \cdot \left(C + \left(A + \mathsf{hypot}\left(B\_m, A - C\right)\right)\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;0 - \sqrt{2} \cdot \sqrt{\frac{F}{B\_m}}\\
\end{array}
\end{array}
if B < 3.20000000000000011e63Initial program 22.9%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified27.1%
Applied egg-rr28.1%
if 3.20000000000000011e63 < B Initial program 10.1%
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.f6453.0%
Simplified53.0%
Final simplification32.2%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 1.55e-55)
(/
(* (sqrt (* 2.0 (* F (+ (* B_m B_m) (* -4.0 (* A C)))))) (sqrt (* 2.0 C)))
(- (* (* 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.55e-55) {
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 {
tmp = 0.0 - (sqrt(2.0) * sqrt((F / B_m)));
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if (b_m <= 1.55d-55) then
tmp = (sqrt((2.0d0 * (f * ((b_m * b_m) + ((-4.0d0) * (a * c)))))) * sqrt((2.0d0 * c))) / (((4.0d0 * a) * c) - (b_m * b_m))
else
tmp = 0.0d0 - (sqrt(2.0d0) * sqrt((f / b_m)))
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 1.55e-55) {
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 {
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.55e-55: 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: 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.55e-55) 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))); 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.55e-55) 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 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.55e-55], 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], 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.55 \cdot 10^{-55}:\\
\;\;\;\;\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{else}:\\
\;\;\;\;0 - \sqrt{2} \cdot \sqrt{\frac{F}{B\_m}}\\
\end{array}
\end{array}
if B < 1.54999999999999998e-55Initial program 19.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified24.5%
pow1/2N/A
*-commutativeN/A
unpow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr30.4%
Taylor expanded in C around inf
*-lowering-*.f6417.9%
Simplified17.9%
if 1.54999999999999998e-55 < B Initial program 23.9%
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.f6444.4%
Simplified44.4%
Final simplification25.2%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= B_m 3.25e-55) (/ (sqrt (* -16.0 (* C (* A (* C F))))) (- (* (* 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 <= 3.25e-55) {
tmp = sqrt((-16.0 * (C * (A * (C * F))))) / (((4.0 * A) * C) - (B_m * B_m));
} else {
tmp = 0.0 - (sqrt(2.0) * sqrt((F / B_m)));
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if (b_m <= 3.25d-55) then
tmp = sqrt(((-16.0d0) * (c * (a * (c * f))))) / (((4.0d0 * a) * c) - (b_m * b_m))
else
tmp = 0.0d0 - (sqrt(2.0d0) * sqrt((f / b_m)))
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 3.25e-55) {
tmp = Math.sqrt((-16.0 * (C * (A * (C * F))))) / (((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 <= 3.25e-55: tmp = math.sqrt((-16.0 * (C * (A * (C * F))))) / (((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 <= 3.25e-55) tmp = Float64(sqrt(Float64(-16.0 * Float64(C * Float64(A * Float64(C * F))))) / Float64(Float64(Float64(4.0 * 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 <= 3.25e-55) tmp = sqrt((-16.0 * (C * (A * (C * F))))) / (((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, 3.25e-55], N[(N[Sqrt[N[(-16.0 * N[(C * N[(A * N[(C * F), $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[(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 3.25 \cdot 10^{-55}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(C \cdot \left(A \cdot \left(C \cdot F\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;0 - \sqrt{2} \cdot \sqrt{\frac{F}{B\_m}}\\
\end{array}
\end{array}
if B < 3.25000000000000003e-55Initial program 19.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified24.5%
Taylor expanded in A around -inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6412.1%
Simplified12.1%
*-commutativeN/A
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6416.1%
Applied egg-rr16.1%
if 3.25000000000000003e-55 < B Initial program 23.9%
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.f6444.4%
Simplified44.4%
Final simplification23.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))) (t_1 (* F (+ A C))))
(if (<= A 1.85e-175)
(/ (sqrt (* -16.0 (* C (* A (* C F))))) t_0)
(if (<= A 3.4e-27)
(/ (sqrt (* (* B_m (* B_m B_m)) (+ (* 2.0 F) (* 2.0 (/ t_1 B_m))))) t_0)
(if (<= A 6.7e+136)
(/
(sqrt
(+ (* (* C F) (* -16.0 (* A A))) (* 4.0 (* A (* F (* B_m B_m))))))
t_0)
(*
0.25
(*
(/ 1.0 (* A C))
(sqrt
(+
(* -8.0 (* A (* C t_1)))
(* -8.0 (* A (* C (* F (- A 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 t_1 = F * (A + C);
double tmp;
if (A <= 1.85e-175) {
tmp = sqrt((-16.0 * (C * (A * (C * F))))) / t_0;
} else if (A <= 3.4e-27) {
tmp = sqrt(((B_m * (B_m * B_m)) * ((2.0 * F) + (2.0 * (t_1 / B_m))))) / t_0;
} else if (A <= 6.7e+136) {
tmp = sqrt((((C * F) * (-16.0 * (A * A))) + (4.0 * (A * (F * (B_m * B_m)))))) / t_0;
} else {
tmp = 0.25 * ((1.0 / (A * C)) * sqrt(((-8.0 * (A * (C * t_1))) + (-8.0 * (A * (C * (F * (A - C))))))));
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((4.0d0 * a) * c) - (b_m * b_m)
t_1 = f * (a + c)
if (a <= 1.85d-175) then
tmp = sqrt(((-16.0d0) * (c * (a * (c * f))))) / t_0
else if (a <= 3.4d-27) then
tmp = sqrt(((b_m * (b_m * b_m)) * ((2.0d0 * f) + (2.0d0 * (t_1 / b_m))))) / t_0
else if (a <= 6.7d+136) then
tmp = sqrt((((c * f) * ((-16.0d0) * (a * a))) + (4.0d0 * (a * (f * (b_m * b_m)))))) / t_0
else
tmp = 0.25d0 * ((1.0d0 / (a * c)) * sqrt((((-8.0d0) * (a * (c * t_1))) + ((-8.0d0) * (a * (c * (f * (a - c))))))))
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = ((4.0 * A) * C) - (B_m * B_m);
double t_1 = F * (A + C);
double tmp;
if (A <= 1.85e-175) {
tmp = Math.sqrt((-16.0 * (C * (A * (C * F))))) / t_0;
} else if (A <= 3.4e-27) {
tmp = Math.sqrt(((B_m * (B_m * B_m)) * ((2.0 * F) + (2.0 * (t_1 / B_m))))) / t_0;
} else if (A <= 6.7e+136) {
tmp = Math.sqrt((((C * F) * (-16.0 * (A * A))) + (4.0 * (A * (F * (B_m * B_m)))))) / t_0;
} else {
tmp = 0.25 * ((1.0 / (A * C)) * Math.sqrt(((-8.0 * (A * (C * t_1))) + (-8.0 * (A * (C * (F * (A - 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) t_1 = F * (A + C) tmp = 0 if A <= 1.85e-175: tmp = math.sqrt((-16.0 * (C * (A * (C * F))))) / t_0 elif A <= 3.4e-27: tmp = math.sqrt(((B_m * (B_m * B_m)) * ((2.0 * F) + (2.0 * (t_1 / B_m))))) / t_0 elif A <= 6.7e+136: tmp = math.sqrt((((C * F) * (-16.0 * (A * A))) + (4.0 * (A * (F * (B_m * B_m)))))) / t_0 else: tmp = 0.25 * ((1.0 / (A * C)) * math.sqrt(((-8.0 * (A * (C * t_1))) + (-8.0 * (A * (C * (F * (A - 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)) t_1 = Float64(F * Float64(A + C)) tmp = 0.0 if (A <= 1.85e-175) tmp = Float64(sqrt(Float64(-16.0 * Float64(C * Float64(A * Float64(C * F))))) / t_0); elseif (A <= 3.4e-27) tmp = Float64(sqrt(Float64(Float64(B_m * Float64(B_m * B_m)) * Float64(Float64(2.0 * F) + Float64(2.0 * Float64(t_1 / B_m))))) / t_0); elseif (A <= 6.7e+136) tmp = Float64(sqrt(Float64(Float64(Float64(C * F) * Float64(-16.0 * Float64(A * A))) + Float64(4.0 * Float64(A * Float64(F * Float64(B_m * B_m)))))) / t_0); else tmp = Float64(0.25 * Float64(Float64(1.0 / Float64(A * C)) * sqrt(Float64(Float64(-8.0 * Float64(A * Float64(C * t_1))) + Float64(-8.0 * Float64(A * Float64(C * Float64(F * Float64(A - C))))))))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = ((4.0 * A) * C) - (B_m * B_m); t_1 = F * (A + C); tmp = 0.0; if (A <= 1.85e-175) tmp = sqrt((-16.0 * (C * (A * (C * F))))) / t_0; elseif (A <= 3.4e-27) tmp = sqrt(((B_m * (B_m * B_m)) * ((2.0 * F) + (2.0 * (t_1 / B_m))))) / t_0; elseif (A <= 6.7e+136) tmp = sqrt((((C * F) * (-16.0 * (A * A))) + (4.0 * (A * (F * (B_m * B_m)))))) / t_0; else tmp = 0.25 * ((1.0 / (A * C)) * sqrt(((-8.0 * (A * (C * t_1))) + (-8.0 * (A * (C * (F * (A - C)))))))); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(F * N[(A + C), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, 1.85e-175], N[(N[Sqrt[N[(-16.0 * N[(C * N[(A * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[A, 3.4e-27], N[(N[Sqrt[N[(N[(B$95$m * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * F), $MachinePrecision] + N[(2.0 * N[(t$95$1 / B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[A, 6.7e+136], N[(N[Sqrt[N[(N[(N[(C * F), $MachinePrecision] * N[(-16.0 * N[(A * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(A * N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], N[(0.25 * N[(N[(1.0 / N[(A * C), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(-8.0 * N[(A * N[(C * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-8.0 * N[(A * N[(C * N[(F * N[(A - C), $MachinePrecision]), $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\\
t_1 := F \cdot \left(A + C\right)\\
\mathbf{if}\;A \leq 1.85 \cdot 10^{-175}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(C \cdot \left(A \cdot \left(C \cdot F\right)\right)\right)}}{t\_0}\\
\mathbf{elif}\;A \leq 3.4 \cdot 10^{-27}:\\
\;\;\;\;\frac{\sqrt{\left(B\_m \cdot \left(B\_m \cdot B\_m\right)\right) \cdot \left(2 \cdot F + 2 \cdot \frac{t\_1}{B\_m}\right)}}{t\_0}\\
\mathbf{elif}\;A \leq 6.7 \cdot 10^{+136}:\\
\;\;\;\;\frac{\sqrt{\left(C \cdot F\right) \cdot \left(-16 \cdot \left(A \cdot A\right)\right) + 4 \cdot \left(A \cdot \left(F \cdot \left(B\_m \cdot B\_m\right)\right)\right)}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;0.25 \cdot \left(\frac{1}{A \cdot C} \cdot \sqrt{-8 \cdot \left(A \cdot \left(C \cdot t\_1\right)\right) + -8 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(A - C\right)\right)\right)\right)}\right)\\
\end{array}
\end{array}
if A < 1.84999999999999999e-175Initial program 15.3%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified18.1%
Taylor expanded in A around -inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6414.3%
Simplified14.3%
*-commutativeN/A
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6419.2%
Applied egg-rr19.2%
if 1.84999999999999999e-175 < A < 3.3999999999999997e-27Initial program 46.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified46.7%
distribute-rgt-inN/A
+-lowering-+.f64N/A
Applied egg-rr46.9%
Taylor expanded in B around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f6410.7%
Simplified10.7%
if 3.3999999999999997e-27 < A < 6.7e136Initial program 43.9%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified43.8%
Taylor expanded in B around 0
Simplified30.2%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6430.9%
Simplified30.9%
if 6.7e136 < A Initial program 4.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified17.2%
distribute-rgt-inN/A
+-lowering-+.f64N/A
Applied egg-rr9.5%
Taylor expanded in B around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-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
*-lowering-*.f64N/A
Simplified17.4%
Final simplification19.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 (+ A C))))
(if (<= A 1.4e-186)
(/ (sqrt (* -16.0 (* C (* A (* C F))))) t_0)
(if (<= A 3.7e-34)
(/ (sqrt (* (* B_m (* B_m B_m)) (+ (* 2.0 F) (* 2.0 (/ t_1 B_m))))) t_0)
(if (<= A 1.32e+137)
(/
(sqrt
(+ (* (* C F) (* -16.0 (* A A))) (* 4.0 (* A (* F (* B_m B_m))))))
t_0)
(/ (sqrt (* -8.0 (* (* A C) (+ t_1 (* 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 t_1 = F * (A + C);
double tmp;
if (A <= 1.4e-186) {
tmp = sqrt((-16.0 * (C * (A * (C * F))))) / t_0;
} else if (A <= 3.7e-34) {
tmp = sqrt(((B_m * (B_m * B_m)) * ((2.0 * F) + (2.0 * (t_1 / B_m))))) / t_0;
} else if (A <= 1.32e+137) {
tmp = sqrt((((C * F) * (-16.0 * (A * A))) + (4.0 * (A * (F * (B_m * B_m)))))) / t_0;
} else {
tmp = sqrt((-8.0 * ((A * C) * (t_1 + (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) :: t_1
real(8) :: tmp
t_0 = ((4.0d0 * a) * c) - (b_m * b_m)
t_1 = f * (a + c)
if (a <= 1.4d-186) then
tmp = sqrt(((-16.0d0) * (c * (a * (c * f))))) / t_0
else if (a <= 3.7d-34) then
tmp = sqrt(((b_m * (b_m * b_m)) * ((2.0d0 * f) + (2.0d0 * (t_1 / b_m))))) / t_0
else if (a <= 1.32d+137) then
tmp = sqrt((((c * f) * ((-16.0d0) * (a * a))) + (4.0d0 * (a * (f * (b_m * b_m)))))) / t_0
else
tmp = sqrt(((-8.0d0) * ((a * c) * (t_1 + (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 t_1 = F * (A + C);
double tmp;
if (A <= 1.4e-186) {
tmp = Math.sqrt((-16.0 * (C * (A * (C * F))))) / t_0;
} else if (A <= 3.7e-34) {
tmp = Math.sqrt(((B_m * (B_m * B_m)) * ((2.0 * F) + (2.0 * (t_1 / B_m))))) / t_0;
} else if (A <= 1.32e+137) {
tmp = Math.sqrt((((C * F) * (-16.0 * (A * A))) + (4.0 * (A * (F * (B_m * B_m)))))) / t_0;
} else {
tmp = Math.sqrt((-8.0 * ((A * C) * (t_1 + (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) t_1 = F * (A + C) tmp = 0 if A <= 1.4e-186: tmp = math.sqrt((-16.0 * (C * (A * (C * F))))) / t_0 elif A <= 3.7e-34: tmp = math.sqrt(((B_m * (B_m * B_m)) * ((2.0 * F) + (2.0 * (t_1 / B_m))))) / t_0 elif A <= 1.32e+137: tmp = math.sqrt((((C * F) * (-16.0 * (A * A))) + (4.0 * (A * (F * (B_m * B_m)))))) / t_0 else: tmp = math.sqrt((-8.0 * ((A * C) * (t_1 + (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)) t_1 = Float64(F * Float64(A + C)) tmp = 0.0 if (A <= 1.4e-186) tmp = Float64(sqrt(Float64(-16.0 * Float64(C * Float64(A * Float64(C * F))))) / t_0); elseif (A <= 3.7e-34) tmp = Float64(sqrt(Float64(Float64(B_m * Float64(B_m * B_m)) * Float64(Float64(2.0 * F) + Float64(2.0 * Float64(t_1 / B_m))))) / t_0); elseif (A <= 1.32e+137) tmp = Float64(sqrt(Float64(Float64(Float64(C * F) * Float64(-16.0 * Float64(A * A))) + Float64(4.0 * Float64(A * Float64(F * Float64(B_m * B_m)))))) / t_0); else tmp = Float64(sqrt(Float64(-8.0 * Float64(Float64(A * C) * Float64(t_1 + 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); t_1 = F * (A + C); tmp = 0.0; if (A <= 1.4e-186) tmp = sqrt((-16.0 * (C * (A * (C * F))))) / t_0; elseif (A <= 3.7e-34) tmp = sqrt(((B_m * (B_m * B_m)) * ((2.0 * F) + (2.0 * (t_1 / B_m))))) / t_0; elseif (A <= 1.32e+137) tmp = sqrt((((C * F) * (-16.0 * (A * A))) + (4.0 * (A * (F * (B_m * B_m)))))) / t_0; else tmp = sqrt((-8.0 * ((A * C) * (t_1 + (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]}, Block[{t$95$1 = N[(F * N[(A + C), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[A, 1.4e-186], N[(N[Sqrt[N[(-16.0 * N[(C * N[(A * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[A, 3.7e-34], N[(N[Sqrt[N[(N[(B$95$m * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * F), $MachinePrecision] + N[(2.0 * N[(t$95$1 / B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[A, 1.32e+137], N[(N[Sqrt[N[(N[(N[(C * F), $MachinePrecision] * N[(-16.0 * N[(A * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(A * N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[Sqrt[N[(-8.0 * N[(N[(A * C), $MachinePrecision] * N[(t$95$1 + N[(F * N[(A - C), $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\\
t_1 := F \cdot \left(A + C\right)\\
\mathbf{if}\;A \leq 1.4 \cdot 10^{-186}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(C \cdot \left(A \cdot \left(C \cdot F\right)\right)\right)}}{t\_0}\\
\mathbf{elif}\;A \leq 3.7 \cdot 10^{-34}:\\
\;\;\;\;\frac{\sqrt{\left(B\_m \cdot \left(B\_m \cdot B\_m\right)\right) \cdot \left(2 \cdot F + 2 \cdot \frac{t\_1}{B\_m}\right)}}{t\_0}\\
\mathbf{elif}\;A \leq 1.32 \cdot 10^{+137}:\\
\;\;\;\;\frac{\sqrt{\left(C \cdot F\right) \cdot \left(-16 \cdot \left(A \cdot A\right)\right) + 4 \cdot \left(A \cdot \left(F \cdot \left(B\_m \cdot B\_m\right)\right)\right)}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{-8 \cdot \left(\left(A \cdot C\right) \cdot \left(t\_1 + F \cdot \left(A - C\right)\right)\right)}}{t\_0}\\
\end{array}
\end{array}
if A < 1.39999999999999992e-186Initial program 15.3%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified18.1%
Taylor expanded in A around -inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6414.3%
Simplified14.3%
*-commutativeN/A
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6419.2%
Applied egg-rr19.2%
if 1.39999999999999992e-186 < A < 3.69999999999999988e-34Initial program 46.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified46.7%
distribute-rgt-inN/A
+-lowering-+.f64N/A
Applied egg-rr46.9%
Taylor expanded in B around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f6410.7%
Simplified10.7%
if 3.69999999999999988e-34 < A < 1.31999999999999997e137Initial program 43.9%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified43.8%
Taylor expanded in B around 0
Simplified30.2%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6430.9%
Simplified30.9%
if 1.31999999999999997e137 < A Initial program 4.5%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified17.2%
distribute-rgt-inN/A
+-lowering-+.f64N/A
Applied egg-rr9.5%
Taylor expanded in B around 0
+-lowering-+.f64N/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
*-lowering-*.f64N/A
--lowering--.f6417.3%
Simplified17.3%
distribute-lft-outN/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*r*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f6417.3%
Applied egg-rr17.3%
Final simplification19.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 -1.3e-137)
(/
(sqrt
(+
(* A (* (* C F) (* A -16.0)))
(* (* B_m B_m) (* 2.0 (* -0.5 (/ (* F (* B_m B_m)) C))))))
t_0)
(if (<= C 5.3e-92)
(/ (sqrt (* 2.0 (* F (* B_m (* B_m B_m))))) t_0)
(/ (sqrt (* -16.0 (* C (* A (* C F))))) 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 <= -1.3e-137) {
tmp = sqrt(((A * ((C * F) * (A * -16.0))) + ((B_m * B_m) * (2.0 * (-0.5 * ((F * (B_m * B_m)) / C)))))) / t_0;
} else if (C <= 5.3e-92) {
tmp = sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_0;
} else {
tmp = sqrt((-16.0 * (C * (A * (C * F))))) / 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 <= (-1.3d-137)) then
tmp = sqrt(((a * ((c * f) * (a * (-16.0d0)))) + ((b_m * b_m) * (2.0d0 * ((-0.5d0) * ((f * (b_m * b_m)) / c)))))) / t_0
else if (c <= 5.3d-92) then
tmp = sqrt((2.0d0 * (f * (b_m * (b_m * b_m))))) / t_0
else
tmp = sqrt(((-16.0d0) * (c * (a * (c * f))))) / 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 <= -1.3e-137) {
tmp = Math.sqrt(((A * ((C * F) * (A * -16.0))) + ((B_m * B_m) * (2.0 * (-0.5 * ((F * (B_m * B_m)) / C)))))) / t_0;
} else if (C <= 5.3e-92) {
tmp = Math.sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_0;
} else {
tmp = Math.sqrt((-16.0 * (C * (A * (C * F))))) / 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 <= -1.3e-137: tmp = math.sqrt(((A * ((C * F) * (A * -16.0))) + ((B_m * B_m) * (2.0 * (-0.5 * ((F * (B_m * B_m)) / C)))))) / t_0 elif C <= 5.3e-92: tmp = math.sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_0 else: tmp = math.sqrt((-16.0 * (C * (A * (C * F))))) / 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 <= -1.3e-137) tmp = Float64(sqrt(Float64(Float64(A * Float64(Float64(C * F) * Float64(A * -16.0))) + Float64(Float64(B_m * B_m) * Float64(2.0 * Float64(-0.5 * Float64(Float64(F * Float64(B_m * B_m)) / C)))))) / t_0); elseif (C <= 5.3e-92) tmp = Float64(sqrt(Float64(2.0 * Float64(F * Float64(B_m * Float64(B_m * B_m))))) / t_0); else tmp = Float64(sqrt(Float64(-16.0 * Float64(C * Float64(A * Float64(C * F))))) / 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 <= -1.3e-137) tmp = sqrt(((A * ((C * F) * (A * -16.0))) + ((B_m * B_m) * (2.0 * (-0.5 * ((F * (B_m * B_m)) / C)))))) / t_0; elseif (C <= 5.3e-92) tmp = sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_0; else tmp = sqrt((-16.0 * (C * (A * (C * F))))) / 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, -1.3e-137], N[(N[Sqrt[N[(N[(A * N[(N[(C * F), $MachinePrecision] * N[(A * -16.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(B$95$m * B$95$m), $MachinePrecision] * N[(2.0 * N[(-0.5 * N[(N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[C, 5.3e-92], 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[Sqrt[N[(-16.0 * N[(C * N[(A * N[(C * F), $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 -1.3 \cdot 10^{-137}:\\
\;\;\;\;\frac{\sqrt{A \cdot \left(\left(C \cdot F\right) \cdot \left(A \cdot -16\right)\right) + \left(B\_m \cdot B\_m\right) \cdot \left(2 \cdot \left(-0.5 \cdot \frac{F \cdot \left(B\_m \cdot B\_m\right)}{C}\right)\right)}}{t\_0}\\
\mathbf{elif}\;C \leq 5.3 \cdot 10^{-92}:\\
\;\;\;\;\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{\sqrt{-16 \cdot \left(C \cdot \left(A \cdot \left(C \cdot F\right)\right)\right)}}{t\_0}\\
\end{array}
\end{array}
if C < -1.3e-137Initial program 15.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified18.2%
Taylor expanded in B around 0
Simplified21.2%
Taylor expanded in A around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6421.5%
Simplified21.5%
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6424.8%
Applied egg-rr24.8%
if -1.3e-137 < C < 5.30000000000000029e-92Initial program 26.4%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified28.8%
Taylor expanded in B around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6412.3%
Simplified12.3%
if 5.30000000000000029e-92 < C Initial program 20.8%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.7%
Taylor expanded in A around -inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6415.5%
Simplified15.5%
*-commutativeN/A
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6421.4%
Applied egg-rr21.4%
Final simplification19.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 -9.2e-143)
(/
(sqrt
(+
(* (* B_m B_m) (* 2.0 (* -0.5 (/ (* F (* B_m B_m)) C))))
(* (* C F) (* -16.0 (* A A)))))
t_0)
(if (<= C 5.2e-95)
(/ (sqrt (* 2.0 (* F (* B_m (* B_m B_m))))) t_0)
(/ (sqrt (* -16.0 (* C (* A (* C F))))) 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 <= -9.2e-143) {
tmp = sqrt((((B_m * B_m) * (2.0 * (-0.5 * ((F * (B_m * B_m)) / C)))) + ((C * F) * (-16.0 * (A * A))))) / t_0;
} else if (C <= 5.2e-95) {
tmp = sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_0;
} else {
tmp = sqrt((-16.0 * (C * (A * (C * F))))) / 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 <= (-9.2d-143)) then
tmp = sqrt((((b_m * b_m) * (2.0d0 * ((-0.5d0) * ((f * (b_m * b_m)) / c)))) + ((c * f) * ((-16.0d0) * (a * a))))) / t_0
else if (c <= 5.2d-95) then
tmp = sqrt((2.0d0 * (f * (b_m * (b_m * b_m))))) / t_0
else
tmp = sqrt(((-16.0d0) * (c * (a * (c * f))))) / 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 <= -9.2e-143) {
tmp = Math.sqrt((((B_m * B_m) * (2.0 * (-0.5 * ((F * (B_m * B_m)) / C)))) + ((C * F) * (-16.0 * (A * A))))) / t_0;
} else if (C <= 5.2e-95) {
tmp = Math.sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_0;
} else {
tmp = Math.sqrt((-16.0 * (C * (A * (C * F))))) / 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 <= -9.2e-143: tmp = math.sqrt((((B_m * B_m) * (2.0 * (-0.5 * ((F * (B_m * B_m)) / C)))) + ((C * F) * (-16.0 * (A * A))))) / t_0 elif C <= 5.2e-95: tmp = math.sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_0 else: tmp = math.sqrt((-16.0 * (C * (A * (C * F))))) / 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 <= -9.2e-143) tmp = Float64(sqrt(Float64(Float64(Float64(B_m * B_m) * Float64(2.0 * Float64(-0.5 * Float64(Float64(F * Float64(B_m * B_m)) / C)))) + Float64(Float64(C * F) * Float64(-16.0 * Float64(A * A))))) / t_0); elseif (C <= 5.2e-95) tmp = Float64(sqrt(Float64(2.0 * Float64(F * Float64(B_m * Float64(B_m * B_m))))) / t_0); else tmp = Float64(sqrt(Float64(-16.0 * Float64(C * Float64(A * Float64(C * F))))) / 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 <= -9.2e-143) tmp = sqrt((((B_m * B_m) * (2.0 * (-0.5 * ((F * (B_m * B_m)) / C)))) + ((C * F) * (-16.0 * (A * A))))) / t_0; elseif (C <= 5.2e-95) tmp = sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_0; else tmp = sqrt((-16.0 * (C * (A * (C * F))))) / 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, -9.2e-143], N[(N[Sqrt[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] * N[(2.0 * N[(-0.5 * N[(N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(C * F), $MachinePrecision] * N[(-16.0 * N[(A * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[C, 5.2e-95], 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[Sqrt[N[(-16.0 * N[(C * N[(A * N[(C * F), $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 -9.2 \cdot 10^{-143}:\\
\;\;\;\;\frac{\sqrt{\left(B\_m \cdot B\_m\right) \cdot \left(2 \cdot \left(-0.5 \cdot \frac{F \cdot \left(B\_m \cdot B\_m\right)}{C}\right)\right) + \left(C \cdot F\right) \cdot \left(-16 \cdot \left(A \cdot A\right)\right)}}{t\_0}\\
\mathbf{elif}\;C \leq 5.2 \cdot 10^{-95}:\\
\;\;\;\;\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{\sqrt{-16 \cdot \left(C \cdot \left(A \cdot \left(C \cdot F\right)\right)\right)}}{t\_0}\\
\end{array}
\end{array}
if C < -9.20000000000000045e-143Initial program 15.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified18.2%
Taylor expanded in B around 0
Simplified21.2%
Taylor expanded in A around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6421.5%
Simplified21.5%
if -9.20000000000000045e-143 < C < 5.20000000000000001e-95Initial program 26.4%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified28.8%
Taylor expanded in B around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6412.3%
Simplified12.3%
if 5.20000000000000001e-95 < C Initial program 20.8%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.7%
Taylor expanded in A around -inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6415.5%
Simplified15.5%
*-commutativeN/A
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6421.4%
Applied egg-rr21.4%
Final simplification18.5%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (* (* 4.0 A) C)) (t_1 (- t_0 (* B_m B_m))))
(if (<= C -2.9e-142)
(*
(/ -1.0 (- (* B_m B_m) t_0))
(sqrt
(+
(* (* C F) (* A (* A -16.0)))
(* (* B_m B_m) (/ -1.0 (/ C (* F (* B_m B_m))))))))
(if (<= C 8.2e-95)
(/ (sqrt (* 2.0 (* F (* B_m (* B_m B_m))))) t_1)
(/ (sqrt (* -16.0 (* C (* A (* C F))))) t_1)))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = (4.0 * A) * C;
double t_1 = t_0 - (B_m * B_m);
double tmp;
if (C <= -2.9e-142) {
tmp = (-1.0 / ((B_m * B_m) - t_0)) * sqrt((((C * F) * (A * (A * -16.0))) + ((B_m * B_m) * (-1.0 / (C / (F * (B_m * B_m)))))));
} else if (C <= 8.2e-95) {
tmp = sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_1;
} else {
tmp = sqrt((-16.0 * (C * (A * (C * F))))) / t_1;
}
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
t_1 = t_0 - (b_m * b_m)
if (c <= (-2.9d-142)) then
tmp = ((-1.0d0) / ((b_m * b_m) - t_0)) * sqrt((((c * f) * (a * (a * (-16.0d0)))) + ((b_m * b_m) * ((-1.0d0) / (c / (f * (b_m * b_m)))))))
else if (c <= 8.2d-95) then
tmp = sqrt((2.0d0 * (f * (b_m * (b_m * b_m))))) / t_1
else
tmp = sqrt(((-16.0d0) * (c * (a * (c * f))))) / t_1
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = (4.0 * A) * C;
double t_1 = t_0 - (B_m * B_m);
double tmp;
if (C <= -2.9e-142) {
tmp = (-1.0 / ((B_m * B_m) - t_0)) * Math.sqrt((((C * F) * (A * (A * -16.0))) + ((B_m * B_m) * (-1.0 / (C / (F * (B_m * B_m)))))));
} else if (C <= 8.2e-95) {
tmp = Math.sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_1;
} else {
tmp = Math.sqrt((-16.0 * (C * (A * (C * F))))) / t_1;
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = (4.0 * A) * C t_1 = t_0 - (B_m * B_m) tmp = 0 if C <= -2.9e-142: tmp = (-1.0 / ((B_m * B_m) - t_0)) * math.sqrt((((C * F) * (A * (A * -16.0))) + ((B_m * B_m) * (-1.0 / (C / (F * (B_m * B_m))))))) elif C <= 8.2e-95: tmp = math.sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_1 else: tmp = math.sqrt((-16.0 * (C * (A * (C * F))))) / t_1 return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(Float64(4.0 * A) * C) t_1 = Float64(t_0 - Float64(B_m * B_m)) tmp = 0.0 if (C <= -2.9e-142) tmp = Float64(Float64(-1.0 / Float64(Float64(B_m * B_m) - t_0)) * sqrt(Float64(Float64(Float64(C * F) * Float64(A * Float64(A * -16.0))) + Float64(Float64(B_m * B_m) * Float64(-1.0 / Float64(C / Float64(F * Float64(B_m * B_m)))))))); elseif (C <= 8.2e-95) tmp = Float64(sqrt(Float64(2.0 * Float64(F * Float64(B_m * Float64(B_m * B_m))))) / t_1); else tmp = Float64(sqrt(Float64(-16.0 * Float64(C * Float64(A * Float64(C * F))))) / t_1); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = (4.0 * A) * C; t_1 = t_0 - (B_m * B_m); tmp = 0.0; if (C <= -2.9e-142) tmp = (-1.0 / ((B_m * B_m) - t_0)) * sqrt((((C * F) * (A * (A * -16.0))) + ((B_m * B_m) * (-1.0 / (C / (F * (B_m * B_m))))))); elseif (C <= 8.2e-95) tmp = sqrt((2.0 * (F * (B_m * (B_m * B_m))))) / t_1; else tmp = sqrt((-16.0 * (C * (A * (C * F))))) / t_1; end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, -2.9e-142], N[(N[(-1.0 / N[(N[(B$95$m * B$95$m), $MachinePrecision] - t$95$0), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(N[(C * F), $MachinePrecision] * N[(A * N[(A * -16.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(B$95$m * B$95$m), $MachinePrecision] * N[(-1.0 / N[(C / N[(F * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[C, 8.2e-95], 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$1), $MachinePrecision], N[(N[Sqrt[N[(-16.0 * N[(C * N[(A * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := \left(4 \cdot A\right) \cdot C\\
t_1 := t\_0 - B\_m \cdot B\_m\\
\mathbf{if}\;C \leq -2.9 \cdot 10^{-142}:\\
\;\;\;\;\frac{-1}{B\_m \cdot B\_m - t\_0} \cdot \sqrt{\left(C \cdot F\right) \cdot \left(A \cdot \left(A \cdot -16\right)\right) + \left(B\_m \cdot B\_m\right) \cdot \frac{-1}{\frac{C}{F \cdot \left(B\_m \cdot B\_m\right)}}}\\
\mathbf{elif}\;C \leq 8.2 \cdot 10^{-95}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(B\_m \cdot \left(B\_m \cdot B\_m\right)\right)\right)}}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(C \cdot \left(A \cdot \left(C \cdot F\right)\right)\right)}}{t\_1}\\
\end{array}
\end{array}
if C < -2.8999999999999999e-142Initial program 15.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified18.2%
Taylor expanded in B around 0
Simplified21.2%
Taylor expanded in A around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6421.5%
Simplified21.5%
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
--lowering--.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
Applied egg-rr21.4%
if -2.8999999999999999e-142 < C < 8.1999999999999995e-95Initial program 26.4%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified28.8%
Taylor expanded in B around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6412.3%
Simplified12.3%
if 8.1999999999999995e-95 < C Initial program 20.8%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified26.7%
Taylor expanded in A around -inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6415.5%
Simplified15.5%
*-commutativeN/A
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6421.4%
Applied egg-rr21.4%
Final simplification18.4%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (- (* (* 4.0 A) C) (* B_m B_m))))
(if (<= B_m 2.7e-55)
(/ (sqrt (* -16.0 (* C (* A (* C F))))) t_0)
(/ (sqrt (* 2.0 (* F (* B_m (* 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 (B_m <= 2.7e-55) {
tmp = sqrt((-16.0 * (C * (A * (C * F))))) / t_0;
} else {
tmp = sqrt((2.0 * (F * (B_m * (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 (b_m <= 2.7d-55) then
tmp = sqrt(((-16.0d0) * (c * (a * (c * f))))) / t_0
else
tmp = sqrt((2.0d0 * (f * (b_m * (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 (B_m <= 2.7e-55) {
tmp = Math.sqrt((-16.0 * (C * (A * (C * F))))) / t_0;
} else {
tmp = Math.sqrt((2.0 * (F * (B_m * (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 B_m <= 2.7e-55: tmp = math.sqrt((-16.0 * (C * (A * (C * F))))) / t_0 else: tmp = math.sqrt((2.0 * (F * (B_m * (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 (B_m <= 2.7e-55) tmp = Float64(sqrt(Float64(-16.0 * Float64(C * Float64(A * Float64(C * F))))) / t_0); else tmp = Float64(sqrt(Float64(2.0 * Float64(F * Float64(B_m * 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 (B_m <= 2.7e-55) tmp = sqrt((-16.0 * (C * (A * (C * F))))) / t_0; else tmp = sqrt((2.0 * (F * (B_m * (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[B$95$m, 2.7e-55], N[(N[Sqrt[N[(-16.0 * N[(C * N[(A * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], 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]]]
\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}\;B\_m \leq 2.7 \cdot 10^{-55}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(C \cdot \left(A \cdot \left(C \cdot F\right)\right)\right)}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(B\_m \cdot \left(B\_m \cdot B\_m\right)\right)\right)}}{t\_0}\\
\end{array}
\end{array}
if B < 2.70000000000000004e-55Initial program 19.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified24.5%
Taylor expanded in A around -inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6412.1%
Simplified12.1%
*-commutativeN/A
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6416.1%
Applied egg-rr16.1%
if 2.70000000000000004e-55 < B Initial program 23.9%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified24.2%
Taylor expanded in B around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6414.9%
Simplified14.9%
Final simplification15.8%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= C -1.25e-171) (/ (sqrt (* (* C F) (* -16.0 (* A A)))) (* 4.0 (* A C))) (/ (sqrt (* -16.0 (* C (* A (* C F))))) (- (* (* 4.0 A) C) (* B_m B_m)))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (C <= -1.25e-171) {
tmp = sqrt(((C * F) * (-16.0 * (A * A)))) / (4.0 * (A * C));
} else {
tmp = sqrt((-16.0 * (C * (A * (C * F))))) / (((4.0 * A) * C) - (B_m * B_m));
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if (c <= (-1.25d-171)) then
tmp = sqrt(((c * f) * ((-16.0d0) * (a * a)))) / (4.0d0 * (a * c))
else
tmp = sqrt(((-16.0d0) * (c * (a * (c * f))))) / (((4.0d0 * a) * c) - (b_m * b_m))
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (C <= -1.25e-171) {
tmp = Math.sqrt(((C * F) * (-16.0 * (A * A)))) / (4.0 * (A * C));
} else {
tmp = Math.sqrt((-16.0 * (C * (A * (C * F))))) / (((4.0 * A) * C) - (B_m * B_m));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if C <= -1.25e-171: tmp = math.sqrt(((C * F) * (-16.0 * (A * A)))) / (4.0 * (A * C)) else: tmp = math.sqrt((-16.0 * (C * (A * (C * F))))) / (((4.0 * A) * C) - (B_m * B_m)) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (C <= -1.25e-171) tmp = Float64(sqrt(Float64(Float64(C * F) * Float64(-16.0 * Float64(A * A)))) / Float64(4.0 * Float64(A * C))); else tmp = Float64(sqrt(Float64(-16.0 * Float64(C * Float64(A * Float64(C * F))))) / Float64(Float64(Float64(4.0 * A) * C) - Float64(B_m * B_m))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (C <= -1.25e-171) tmp = sqrt(((C * F) * (-16.0 * (A * A)))) / (4.0 * (A * C)); else tmp = sqrt((-16.0 * (C * (A * (C * F))))) / (((4.0 * A) * C) - (B_m * B_m)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[C, -1.25e-171], N[(N[Sqrt[N[(N[(C * F), $MachinePrecision] * N[(-16.0 * N[(A * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(-16.0 * N[(C * N[(A * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.25 \cdot 10^{-171}:\\
\;\;\;\;\frac{\sqrt{\left(C \cdot F\right) \cdot \left(-16 \cdot \left(A \cdot A\right)\right)}}{4 \cdot \left(A \cdot C\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(C \cdot \left(A \cdot \left(C \cdot F\right)\right)\right)}}{\left(4 \cdot A\right) \cdot C - B\_m \cdot B\_m}\\
\end{array}
\end{array}
if C < -1.24999999999999998e-171Initial program 16.0%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified18.4%
distribute-rgt-inN/A
+-lowering-+.f64N/A
Applied egg-rr14.1%
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
+-commutativeN/A
flip-+N/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr14.8%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-lowering-*.f647.7%
Simplified7.7%
Taylor expanded in A around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6418.1%
Simplified18.1%
if -1.24999999999999998e-171 < C Initial program 23.7%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified28.0%
Taylor expanded in A around -inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6412.0%
Simplified12.0%
*-commutativeN/A
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6416.6%
Applied egg-rr16.6%
Final simplification17.2%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (* 4.0 (* A C))))
(if (<= C 2.6e-256)
(/ (sqrt (* (* C F) (* -16.0 (* A A)))) t_0)
(/ (sqrt (* -16.0 (* A (* F (* C 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);
double tmp;
if (C <= 2.6e-256) {
tmp = sqrt(((C * F) * (-16.0 * (A * A)))) / t_0;
} else {
tmp = sqrt((-16.0 * (A * (F * (C * 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)
if (c <= 2.6d-256) then
tmp = sqrt(((c * f) * ((-16.0d0) * (a * a)))) / t_0
else
tmp = sqrt(((-16.0d0) * (a * (f * (c * 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);
double tmp;
if (C <= 2.6e-256) {
tmp = Math.sqrt(((C * F) * (-16.0 * (A * A)))) / t_0;
} else {
tmp = Math.sqrt((-16.0 * (A * (F * (C * C))))) / t_0;
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = 4.0 * (A * C) tmp = 0 if C <= 2.6e-256: tmp = math.sqrt(((C * F) * (-16.0 * (A * A)))) / t_0 else: tmp = math.sqrt((-16.0 * (A * (F * (C * C))))) / t_0 return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(4.0 * Float64(A * C)) tmp = 0.0 if (C <= 2.6e-256) tmp = Float64(sqrt(Float64(Float64(C * F) * Float64(-16.0 * Float64(A * A)))) / t_0); else tmp = Float64(sqrt(Float64(-16.0 * Float64(A * Float64(F * Float64(C * 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); tmp = 0.0; if (C <= 2.6e-256) tmp = sqrt(((C * F) * (-16.0 * (A * A)))) / t_0; else tmp = sqrt((-16.0 * (A * (F * (C * 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[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[C, 2.6e-256], N[(N[Sqrt[N[(N[(C * F), $MachinePrecision] * N[(-16.0 * N[(A * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[Sqrt[N[(-16.0 * N[(A * N[(F * N[(C * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := 4 \cdot \left(A \cdot C\right)\\
\mathbf{if}\;C \leq 2.6 \cdot 10^{-256}:\\
\;\;\;\;\frac{\sqrt{\left(C \cdot F\right) \cdot \left(-16 \cdot \left(A \cdot A\right)\right)}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(A \cdot \left(F \cdot \left(C \cdot C\right)\right)\right)}}{t\_0}\\
\end{array}
\end{array}
if C < 2.6000000000000001e-256Initial program 17.0%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified20.1%
distribute-rgt-inN/A
+-lowering-+.f64N/A
Applied egg-rr17.0%
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
+-commutativeN/A
flip-+N/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr16.0%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-lowering-*.f646.6%
Simplified6.6%
Taylor expanded in A around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6414.0%
Simplified14.0%
if 2.6000000000000001e-256 < C Initial program 25.1%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified29.1%
distribute-rgt-inN/A
+-lowering-+.f64N/A
Applied egg-rr26.4%
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
+-commutativeN/A
flip-+N/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr24.1%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-lowering-*.f649.6%
Simplified9.6%
Taylor expanded in C around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6416.4%
Simplified16.4%
Final simplification15.1%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (/ (sqrt (* -16.0 (* A (* F (* C C))))) (* 4.0 (* A C))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
return sqrt((-16.0 * (A * (F * (C * C))))) / (4.0 * (A * C));
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
code = sqrt(((-16.0d0) * (a * (f * (c * c))))) / (4.0d0 * (a * c))
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
return Math.sqrt((-16.0 * (A * (F * (C * C))))) / (4.0 * (A * C));
}
B_m = math.fabs(B) def code(A, B_m, C, F): return math.sqrt((-16.0 * (A * (F * (C * C))))) / (4.0 * (A * C))
B_m = abs(B) function code(A, B_m, C, F) return Float64(sqrt(Float64(-16.0 * Float64(A * Float64(F * Float64(C * C))))) / Float64(4.0 * Float64(A * C))) end
B_m = abs(B); function tmp = code(A, B_m, C, F) tmp = sqrt((-16.0 * (A * (F * (C * C))))) / (4.0 * (A * C)); end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := N[(N[Sqrt[N[(-16.0 * N[(A * N[(F * N[(C * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|
\\
\frac{\sqrt{-16 \cdot \left(A \cdot \left(F \cdot \left(C \cdot C\right)\right)\right)}}{4 \cdot \left(A \cdot C\right)}
\end{array}
Initial program 20.8%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified24.4%
distribute-rgt-inN/A
+-lowering-+.f64N/A
Applied egg-rr21.5%
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
+-commutativeN/A
flip-+N/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr19.9%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-lowering-*.f648.1%
Simplified8.1%
Taylor expanded in C around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6411.2%
Simplified11.2%
Final simplification11.2%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 0.0)
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
return 0.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 = 0.0d0
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
return 0.0;
}
B_m = math.fabs(B) def code(A, B_m, C, F): return 0.0
B_m = abs(B) function code(A, B_m, C, F) return 0.0 end
B_m = abs(B); function tmp = code(A, B_m, C, F) tmp = 0.0; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := 0.0
\begin{array}{l}
B_m = \left|B\right|
\\
0
\end{array}
Initial program 20.8%
distribute-frac-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
Simplified24.4%
distribute-rgt-inN/A
+-lowering-+.f64N/A
Applied egg-rr21.5%
Taylor expanded in C around -inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f643.2%
Simplified3.2%
*-commutativeN/A
un-div-invN/A
associate-*r/N/A
pow1/2N/A
distribute-rgt-outN/A
metadata-evalN/A
mul0-rgtN/A
metadata-evalN/A
metadata-evalN/A
/-lowering-/.f643.6%
Applied egg-rr3.6%
div03.6%
Applied egg-rr3.6%
herbie shell --seed 2024161
(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))))