
(FPCore (A B C F)
:precision binary64
(let* ((t_0 (- (pow B 2.0) (* (* 4.0 A) C))))
(/
(-
(sqrt
(*
(* 2.0 (* t_0 F))
(- (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
t_0)))
double code(double A, double B, double C, double F) {
double t_0 = pow(B, 2.0) - ((4.0 * A) * C);
return -sqrt(((2.0 * (t_0 * F)) * ((A + C) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / t_0;
}
real(8) function code(a, b, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: t_0
t_0 = (b ** 2.0d0) - ((4.0d0 * a) * c)
code = -sqrt(((2.0d0 * (t_0 * f)) * ((a + c) - sqrt((((a - c) ** 2.0d0) + (b ** 2.0d0)))))) / t_0
end function
public static double code(double A, double B, double C, double F) {
double t_0 = Math.pow(B, 2.0) - ((4.0 * A) * C);
return -Math.sqrt(((2.0 * (t_0 * F)) * ((A + C) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / t_0;
}
def code(A, B, C, F): t_0 = math.pow(B, 2.0) - ((4.0 * A) * C) return -math.sqrt(((2.0 * (t_0 * F)) * ((A + C) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / t_0
function code(A, B, C, F) t_0 = Float64((B ^ 2.0) - Float64(Float64(4.0 * A) * C)) return Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(t_0 * F)) * Float64(Float64(A + C) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))))) / t_0) end
function tmp = code(A, B, C, F) t_0 = (B ^ 2.0) - ((4.0 * A) * C); tmp = -sqrt(((2.0 * (t_0 * F)) * ((A + C) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / t_0; end
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[Power[B, 2.0], $MachinePrecision] - N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]}, N[((-N[Sqrt[N[(N[(2.0 * N[(t$95$0 * F), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {B}^{2} - \left(4 \cdot A\right) \cdot C\\
\frac{-\sqrt{\left(2 \cdot \left(t\_0 \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{t\_0}
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (A B C F)
:precision binary64
(let* ((t_0 (- (pow B 2.0) (* (* 4.0 A) C))))
(/
(-
(sqrt
(*
(* 2.0 (* t_0 F))
(- (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
t_0)))
double code(double A, double B, double C, double F) {
double t_0 = pow(B, 2.0) - ((4.0 * A) * C);
return -sqrt(((2.0 * (t_0 * F)) * ((A + C) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / t_0;
}
real(8) function code(a, b, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: t_0
t_0 = (b ** 2.0d0) - ((4.0d0 * a) * c)
code = -sqrt(((2.0d0 * (t_0 * f)) * ((a + c) - sqrt((((a - c) ** 2.0d0) + (b ** 2.0d0)))))) / t_0
end function
public static double code(double A, double B, double C, double F) {
double t_0 = Math.pow(B, 2.0) - ((4.0 * A) * C);
return -Math.sqrt(((2.0 * (t_0 * F)) * ((A + C) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / t_0;
}
def code(A, B, C, F): t_0 = math.pow(B, 2.0) - ((4.0 * A) * C) return -math.sqrt(((2.0 * (t_0 * F)) * ((A + C) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / t_0
function code(A, B, C, F) t_0 = Float64((B ^ 2.0) - Float64(Float64(4.0 * A) * C)) return Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(t_0 * F)) * Float64(Float64(A + C) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))))) / t_0) end
function tmp = code(A, B, C, F) t_0 = (B ^ 2.0) - ((4.0 * A) * C); tmp = -sqrt(((2.0 * (t_0 * F)) * ((A + C) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / t_0; end
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[Power[B, 2.0], $MachinePrecision] - N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]}, N[((-N[Sqrt[N[(N[(2.0 * N[(t$95$0 * F), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {B}^{2} - \left(4 \cdot A\right) \cdot C\\
\frac{-\sqrt{\left(2 \cdot \left(t\_0 \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{t\_0}
\end{array}
\end{array}
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (- (* 4.0 (* A C)) (* B_m B_m)))
(t_1 (* (* 4.0 A) C))
(t_2
(/
(sqrt
(*
(* 2.0 (* (- (pow B_m 2.0) t_1) F))
(- (+ A C) (sqrt (+ (pow B_m 2.0) (pow (- A C) 2.0))))))
(- t_1 (pow B_m 2.0)))))
(if (<= t_2 0.0)
(/
(*
(sqrt (* 2.0 (+ (* B_m B_m) (* A (* C -4.0)))))
(sqrt (* F (+ C (- A (hypot B_m (- A C)))))))
t_0)
(if (<= t_2 INFINITY)
(/ (* (pow (* F (* A C)) 0.5) (sqrt (* C -16.0))) t_0)
(/
-1.0
(* B_m (pow (/ (* 2.0 F) (/ -1.0 (- (hypot B_m C) C))) -0.5)))))))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 = (4.0 * A) * C;
double t_2 = sqrt(((2.0 * ((pow(B_m, 2.0) - t_1) * F)) * ((A + C) - sqrt((pow(B_m, 2.0) + pow((A - C), 2.0)))))) / (t_1 - pow(B_m, 2.0));
double tmp;
if (t_2 <= 0.0) {
tmp = (sqrt((2.0 * ((B_m * B_m) + (A * (C * -4.0))))) * sqrt((F * (C + (A - hypot(B_m, (A - C))))))) / t_0;
} else if (t_2 <= ((double) INFINITY)) {
tmp = (pow((F * (A * C)), 0.5) * sqrt((C * -16.0))) / t_0;
} else {
tmp = -1.0 / (B_m * pow(((2.0 * F) / (-1.0 / (hypot(B_m, C) - C))), -0.5));
}
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 = (4.0 * A) * C;
double t_2 = Math.sqrt(((2.0 * ((Math.pow(B_m, 2.0) - t_1) * F)) * ((A + C) - Math.sqrt((Math.pow(B_m, 2.0) + Math.pow((A - C), 2.0)))))) / (t_1 - Math.pow(B_m, 2.0));
double tmp;
if (t_2 <= 0.0) {
tmp = (Math.sqrt((2.0 * ((B_m * B_m) + (A * (C * -4.0))))) * Math.sqrt((F * (C + (A - Math.hypot(B_m, (A - C))))))) / t_0;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = (Math.pow((F * (A * C)), 0.5) * Math.sqrt((C * -16.0))) / t_0;
} else {
tmp = -1.0 / (B_m * Math.pow(((2.0 * F) / (-1.0 / (Math.hypot(B_m, C) - C))), -0.5));
}
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 = (4.0 * A) * C t_2 = math.sqrt(((2.0 * ((math.pow(B_m, 2.0) - t_1) * F)) * ((A + C) - math.sqrt((math.pow(B_m, 2.0) + math.pow((A - C), 2.0)))))) / (t_1 - math.pow(B_m, 2.0)) tmp = 0 if t_2 <= 0.0: tmp = (math.sqrt((2.0 * ((B_m * B_m) + (A * (C * -4.0))))) * math.sqrt((F * (C + (A - math.hypot(B_m, (A - C))))))) / t_0 elif t_2 <= math.inf: tmp = (math.pow((F * (A * C)), 0.5) * math.sqrt((C * -16.0))) / t_0 else: tmp = -1.0 / (B_m * math.pow(((2.0 * F) / (-1.0 / (math.hypot(B_m, C) - C))), -0.5)) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m)) t_1 = Float64(Float64(4.0 * A) * C) t_2 = Float64(sqrt(Float64(Float64(2.0 * Float64(Float64((B_m ^ 2.0) - t_1) * F)) * Float64(Float64(A + C) - sqrt(Float64((B_m ^ 2.0) + (Float64(A - C) ^ 2.0)))))) / Float64(t_1 - (B_m ^ 2.0))) tmp = 0.0 if (t_2 <= 0.0) tmp = Float64(Float64(sqrt(Float64(2.0 * Float64(Float64(B_m * B_m) + Float64(A * Float64(C * -4.0))))) * sqrt(Float64(F * Float64(C + Float64(A - hypot(B_m, Float64(A - C))))))) / t_0); elseif (t_2 <= Inf) tmp = Float64(Float64((Float64(F * Float64(A * C)) ^ 0.5) * sqrt(Float64(C * -16.0))) / t_0); else tmp = Float64(-1.0 / Float64(B_m * (Float64(Float64(2.0 * F) / Float64(-1.0 / Float64(hypot(B_m, C) - C))) ^ -0.5))); 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 = (4.0 * A) * C; t_2 = sqrt(((2.0 * (((B_m ^ 2.0) - t_1) * F)) * ((A + C) - sqrt(((B_m ^ 2.0) + ((A - C) ^ 2.0)))))) / (t_1 - (B_m ^ 2.0)); tmp = 0.0; if (t_2 <= 0.0) tmp = (sqrt((2.0 * ((B_m * B_m) + (A * (C * -4.0))))) * sqrt((F * (C + (A - hypot(B_m, (A - C))))))) / t_0; elseif (t_2 <= Inf) tmp = (((F * (A * C)) ^ 0.5) * sqrt((C * -16.0))) / t_0; else tmp = -1.0 / (B_m * (((2.0 * F) / (-1.0 / (hypot(B_m, C) - C))) ^ -0.5)); 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 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[N[(N[(2.0 * N[(N[(N[Power[B$95$m, 2.0], $MachinePrecision] - t$95$1), $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$1 - N[Power[B$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[(N[(N[Sqrt[N[(2.0 * N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(F * 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], If[LessEqual[t$95$2, Infinity], N[(N[(N[Power[N[(F * N[(A * C), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] * N[Sqrt[N[(C * -16.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], N[(-1.0 / N[(B$95$m * N[Power[N[(N[(2.0 * F), $MachinePrecision] / N[(-1.0 / N[(N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision] - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := 4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m\\
t_1 := \left(4 \cdot A\right) \cdot C\\
t_2 := \frac{\sqrt{\left(2 \cdot \left(\left({B\_m}^{2} - t\_1\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{B\_m}^{2} + {\left(A - C\right)}^{2}}\right)}}{t\_1 - {B\_m}^{2}}\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\frac{\sqrt{2 \cdot \left(B\_m \cdot B\_m + A \cdot \left(C \cdot -4\right)\right)} \cdot \sqrt{F \cdot \left(C + \left(A - \mathsf{hypot}\left(B\_m, A - C\right)\right)\right)}}{t\_0}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\frac{{\left(F \cdot \left(A \cdot C\right)\right)}^{0.5} \cdot \sqrt{C \cdot -16}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B\_m \cdot {\left(\frac{2 \cdot F}{\frac{-1}{\mathsf{hypot}\left(B\_m, C\right) - C}}\right)}^{-0.5}}\\
\end{array}
\end{array}
if (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 #s(literal 2 binary64) (*.f64 (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C)) F)) (-.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))))) (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C))) < 0.0Initial program 33.4%
Simplified38.1%
Applied egg-rr52.3%
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 24.5%
Simplified49.9%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6412.1%
Simplified12.1%
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6433.7%
Applied egg-rr33.7%
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
Applied egg-rr59.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%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6417.6%
Simplified17.6%
mul-1-negN/A
distribute-neg-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr17.6%
sub0-negN/A
distribute-lft-neg-inN/A
sqrt-prodN/A
unpow1/2N/A
distribute-neg-fracN/A
clear-numN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
div-invN/A
Applied egg-rr17.7%
*-commutativeN/A
associate-*r*N/A
flip--N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
clear-numN/A
flip--N/A
/-lowering-/.f64N/A
Applied egg-rr17.7%
Final simplification39.5%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (+ (* B_m B_m) (* A (* C -4.0))))
(t_1 (+ C (- A (hypot B_m (- A C))))))
(if (<= B_m 4e-54)
(/ (sqrt (* t_1 (* t_0 (* 2.0 F)))) (- (* 4.0 (* A C)) (* B_m B_m)))
(if (<= B_m 2.15e+137)
(*
(sqrt t_0)
(/ (sqrt (* 2.0 (* F t_1))) (- (* A (* 4.0 C)) (* B_m B_m))))
(/
-1.0
(* B_m (* (sqrt 0.5) (sqrt (/ (/ 1.0 F) (- C (hypot C B_m)))))))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = (B_m * B_m) + (A * (C * -4.0));
double t_1 = C + (A - hypot(B_m, (A - C)));
double tmp;
if (B_m <= 4e-54) {
tmp = sqrt((t_1 * (t_0 * (2.0 * F)))) / ((4.0 * (A * C)) - (B_m * B_m));
} else if (B_m <= 2.15e+137) {
tmp = sqrt(t_0) * (sqrt((2.0 * (F * t_1))) / ((A * (4.0 * C)) - (B_m * B_m)));
} else {
tmp = -1.0 / (B_m * (sqrt(0.5) * sqrt(((1.0 / F) / (C - hypot(C, B_m))))));
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = (B_m * B_m) + (A * (C * -4.0));
double t_1 = C + (A - Math.hypot(B_m, (A - C)));
double tmp;
if (B_m <= 4e-54) {
tmp = Math.sqrt((t_1 * (t_0 * (2.0 * F)))) / ((4.0 * (A * C)) - (B_m * B_m));
} else if (B_m <= 2.15e+137) {
tmp = Math.sqrt(t_0) * (Math.sqrt((2.0 * (F * t_1))) / ((A * (4.0 * C)) - (B_m * B_m)));
} else {
tmp = -1.0 / (B_m * (Math.sqrt(0.5) * Math.sqrt(((1.0 / F) / (C - Math.hypot(C, B_m))))));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = (B_m * B_m) + (A * (C * -4.0)) t_1 = C + (A - math.hypot(B_m, (A - C))) tmp = 0 if B_m <= 4e-54: tmp = math.sqrt((t_1 * (t_0 * (2.0 * F)))) / ((4.0 * (A * C)) - (B_m * B_m)) elif B_m <= 2.15e+137: tmp = math.sqrt(t_0) * (math.sqrt((2.0 * (F * t_1))) / ((A * (4.0 * C)) - (B_m * B_m))) else: tmp = -1.0 / (B_m * (math.sqrt(0.5) * math.sqrt(((1.0 / F) / (C - math.hypot(C, B_m)))))) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(Float64(B_m * B_m) + Float64(A * Float64(C * -4.0))) t_1 = Float64(C + Float64(A - hypot(B_m, Float64(A - C)))) tmp = 0.0 if (B_m <= 4e-54) tmp = Float64(sqrt(Float64(t_1 * Float64(t_0 * Float64(2.0 * F)))) / Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m))); elseif (B_m <= 2.15e+137) tmp = Float64(sqrt(t_0) * Float64(sqrt(Float64(2.0 * Float64(F * t_1))) / Float64(Float64(A * Float64(4.0 * C)) - Float64(B_m * B_m)))); else tmp = Float64(-1.0 / Float64(B_m * Float64(sqrt(0.5) * sqrt(Float64(Float64(1.0 / F) / Float64(C - hypot(C, B_m))))))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = (B_m * B_m) + (A * (C * -4.0)); t_1 = C + (A - hypot(B_m, (A - C))); tmp = 0.0; if (B_m <= 4e-54) tmp = sqrt((t_1 * (t_0 * (2.0 * F)))) / ((4.0 * (A * C)) - (B_m * B_m)); elseif (B_m <= 2.15e+137) tmp = sqrt(t_0) * (sqrt((2.0 * (F * t_1))) / ((A * (4.0 * C)) - (B_m * B_m))); else tmp = -1.0 / (B_m * (sqrt(0.5) * sqrt(((1.0 / F) / (C - hypot(C, 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[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(C + N[(A - N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 4e-54], N[(N[Sqrt[N[(t$95$1 * N[(t$95$0 * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 2.15e+137], N[(N[Sqrt[t$95$0], $MachinePrecision] * N[(N[Sqrt[N[(2.0 * N[(F * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(A * N[(4.0 * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 / N[(B$95$m * N[(N[Sqrt[0.5], $MachinePrecision] * N[Sqrt[N[(N[(1.0 / F), $MachinePrecision] / N[(C - N[Sqrt[C ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := B\_m \cdot B\_m + A \cdot \left(C \cdot -4\right)\\
t_1 := C + \left(A - \mathsf{hypot}\left(B\_m, A - C\right)\right)\\
\mathbf{if}\;B\_m \leq 4 \cdot 10^{-54}:\\
\;\;\;\;\frac{\sqrt{t\_1 \cdot \left(t\_0 \cdot \left(2 \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m}\\
\mathbf{elif}\;B\_m \leq 2.15 \cdot 10^{+137}:\\
\;\;\;\;\sqrt{t\_0} \cdot \frac{\sqrt{2 \cdot \left(F \cdot t\_1\right)}}{A \cdot \left(4 \cdot C\right) - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B\_m \cdot \left(\sqrt{0.5} \cdot \sqrt{\frac{\frac{1}{F}}{C - \mathsf{hypot}\left(C, B\_m\right)}}\right)}\\
\end{array}
\end{array}
if B < 4.0000000000000001e-54Initial program 17.9%
Simplified24.1%
*-commutativeN/A
*-commutativeN/A
metadata-evalN/A
cancel-sign-sub-invN/A
pow2N/A
associate-*r*N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr24.7%
if 4.0000000000000001e-54 < B < 2.14999999999999982e137Initial program 41.6%
Simplified45.0%
Applied egg-rr64.4%
if 2.14999999999999982e137 < B Initial program 3.6%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6458.5%
Simplified58.5%
mul-1-negN/A
distribute-neg-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr58.6%
sub0-negN/A
distribute-lft-neg-inN/A
sqrt-prodN/A
unpow1/2N/A
distribute-neg-fracN/A
clear-numN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
div-invN/A
Applied egg-rr58.7%
Taylor expanded in F around 0
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6458.1%
Simplified58.1%
Final simplification33.7%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (hypot B_m (- A C))))
(if (<= B_m 3.4e-52)
(/
(sqrt (* (+ C (- A t_0)) (* (+ (* B_m B_m) (* A (* C -4.0))) (* 2.0 F))))
(- (* 4.0 (* A C)) (* B_m B_m)))
(if (<= B_m 1.1e+137)
(*
(sqrt (/ (* F (- (+ A C) t_0)) (+ (* B_m B_m) (* -4.0 (* A C)))))
(- 0.0 (sqrt 2.0)))
(/
-1.0
(* B_m (* (sqrt 0.5) (sqrt (/ (/ 1.0 F) (- C (hypot C 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 <= 3.4e-52) {
tmp = sqrt(((C + (A - t_0)) * (((B_m * B_m) + (A * (C * -4.0))) * (2.0 * F)))) / ((4.0 * (A * C)) - (B_m * B_m));
} else if (B_m <= 1.1e+137) {
tmp = sqrt(((F * ((A + C) - t_0)) / ((B_m * B_m) + (-4.0 * (A * C))))) * (0.0 - sqrt(2.0));
} else {
tmp = -1.0 / (B_m * (sqrt(0.5) * sqrt(((1.0 / F) / (C - hypot(C, 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 <= 3.4e-52) {
tmp = Math.sqrt(((C + (A - t_0)) * (((B_m * B_m) + (A * (C * -4.0))) * (2.0 * F)))) / ((4.0 * (A * C)) - (B_m * B_m));
} else if (B_m <= 1.1e+137) {
tmp = Math.sqrt(((F * ((A + C) - t_0)) / ((B_m * B_m) + (-4.0 * (A * C))))) * (0.0 - Math.sqrt(2.0));
} else {
tmp = -1.0 / (B_m * (Math.sqrt(0.5) * Math.sqrt(((1.0 / F) / (C - Math.hypot(C, 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 <= 3.4e-52: tmp = math.sqrt(((C + (A - t_0)) * (((B_m * B_m) + (A * (C * -4.0))) * (2.0 * F)))) / ((4.0 * (A * C)) - (B_m * B_m)) elif B_m <= 1.1e+137: tmp = math.sqrt(((F * ((A + C) - t_0)) / ((B_m * B_m) + (-4.0 * (A * C))))) * (0.0 - math.sqrt(2.0)) else: tmp = -1.0 / (B_m * (math.sqrt(0.5) * math.sqrt(((1.0 / F) / (C - math.hypot(C, 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 <= 3.4e-52) tmp = Float64(sqrt(Float64(Float64(C + Float64(A - t_0)) * Float64(Float64(Float64(B_m * B_m) + Float64(A * Float64(C * -4.0))) * Float64(2.0 * F)))) / Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m))); elseif (B_m <= 1.1e+137) tmp = Float64(sqrt(Float64(Float64(F * Float64(Float64(A + C) - t_0)) / Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))))) * Float64(0.0 - sqrt(2.0))); else tmp = Float64(-1.0 / Float64(B_m * Float64(sqrt(0.5) * sqrt(Float64(Float64(1.0 / F) / Float64(C - hypot(C, 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 <= 3.4e-52) tmp = sqrt(((C + (A - t_0)) * (((B_m * B_m) + (A * (C * -4.0))) * (2.0 * F)))) / ((4.0 * (A * C)) - (B_m * B_m)); elseif (B_m <= 1.1e+137) tmp = sqrt(((F * ((A + C) - t_0)) / ((B_m * B_m) + (-4.0 * (A * C))))) * (0.0 - sqrt(2.0)); else tmp = -1.0 / (B_m * (sqrt(0.5) * sqrt(((1.0 / F) / (C - hypot(C, 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, 3.4e-52], N[(N[Sqrt[N[(N[(C + N[(A - t$95$0), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B$95$m, 1.1e+137], N[(N[Sqrt[N[(N[(F * N[(N[(A + C), $MachinePrecision] - t$95$0), $MachinePrecision]), $MachinePrecision] / N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(0.0 - N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 / N[(B$95$m * N[(N[Sqrt[0.5], $MachinePrecision] * N[Sqrt[N[(N[(1.0 / F), $MachinePrecision] / N[(C - N[Sqrt[C ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := \mathsf{hypot}\left(B\_m, A - C\right)\\
\mathbf{if}\;B\_m \leq 3.4 \cdot 10^{-52}:\\
\;\;\;\;\frac{\sqrt{\left(C + \left(A - t\_0\right)\right) \cdot \left(\left(B\_m \cdot B\_m + A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m}\\
\mathbf{elif}\;B\_m \leq 1.1 \cdot 10^{+137}:\\
\;\;\;\;\sqrt{\frac{F \cdot \left(\left(A + C\right) - t\_0\right)}{B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)}} \cdot \left(0 - \sqrt{2}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B\_m \cdot \left(\sqrt{0.5} \cdot \sqrt{\frac{\frac{1}{F}}{C - \mathsf{hypot}\left(C, B\_m\right)}}\right)}\\
\end{array}
\end{array}
if B < 3.40000000000000017e-52Initial program 17.8%
Simplified24.0%
*-commutativeN/A
*-commutativeN/A
metadata-evalN/A
cancel-sign-sub-invN/A
pow2N/A
associate-*r*N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr24.6%
if 3.40000000000000017e-52 < B < 1.10000000000000008e137Initial program 42.7%
Taylor expanded in F around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
Simplified65.4%
if 1.10000000000000008e137 < B Initial program 3.6%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6458.5%
Simplified58.5%
mul-1-negN/A
distribute-neg-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr58.6%
sub0-negN/A
distribute-lft-neg-inN/A
sqrt-prodN/A
unpow1/2N/A
distribute-neg-fracN/A
clear-numN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
div-invN/A
Applied egg-rr58.7%
Taylor expanded in F around 0
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6458.1%
Simplified58.1%
Final simplification33.7%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 1.65e+58)
(/
(sqrt
(*
(+ C (- A (hypot B_m (- A C))))
(* (+ (* B_m B_m) (* A (* C -4.0))) (* 2.0 F))))
(- (* 4.0 (* A C)) (* B_m B_m)))
(/ -1.0 (* B_m (* (sqrt 0.5) (sqrt (/ (/ 1.0 F) (- C (hypot C B_m)))))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 1.65e+58) {
tmp = sqrt(((C + (A - hypot(B_m, (A - C)))) * (((B_m * B_m) + (A * (C * -4.0))) * (2.0 * F)))) / ((4.0 * (A * C)) - (B_m * B_m));
} else {
tmp = -1.0 / (B_m * (sqrt(0.5) * sqrt(((1.0 / F) / (C - hypot(C, B_m))))));
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 1.65e+58) {
tmp = Math.sqrt(((C + (A - Math.hypot(B_m, (A - C)))) * (((B_m * B_m) + (A * (C * -4.0))) * (2.0 * F)))) / ((4.0 * (A * C)) - (B_m * B_m));
} else {
tmp = -1.0 / (B_m * (Math.sqrt(0.5) * Math.sqrt(((1.0 / F) / (C - Math.hypot(C, B_m))))));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 1.65e+58: tmp = math.sqrt(((C + (A - math.hypot(B_m, (A - C)))) * (((B_m * B_m) + (A * (C * -4.0))) * (2.0 * F)))) / ((4.0 * (A * C)) - (B_m * B_m)) else: tmp = -1.0 / (B_m * (math.sqrt(0.5) * math.sqrt(((1.0 / F) / (C - math.hypot(C, B_m)))))) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 1.65e+58) tmp = Float64(sqrt(Float64(Float64(C + Float64(A - hypot(B_m, Float64(A - C)))) * Float64(Float64(Float64(B_m * B_m) + Float64(A * Float64(C * -4.0))) * Float64(2.0 * F)))) / Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m))); else tmp = Float64(-1.0 / Float64(B_m * Float64(sqrt(0.5) * sqrt(Float64(Float64(1.0 / F) / Float64(C - hypot(C, B_m))))))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 1.65e+58) tmp = sqrt(((C + (A - hypot(B_m, (A - C)))) * (((B_m * B_m) + (A * (C * -4.0))) * (2.0 * F)))) / ((4.0 * (A * C)) - (B_m * B_m)); else tmp = -1.0 / (B_m * (sqrt(0.5) * sqrt(((1.0 / F) / (C - hypot(C, B_m)))))); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 1.65e+58], N[(N[Sqrt[N[(N[(C + N[(A - N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 / N[(B$95$m * N[(N[Sqrt[0.5], $MachinePrecision] * N[Sqrt[N[(N[(1.0 / F), $MachinePrecision] / N[(C - N[Sqrt[C ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 1.65 \cdot 10^{+58}:\\
\;\;\;\;\frac{\sqrt{\left(C + \left(A - \mathsf{hypot}\left(B\_m, A - C\right)\right)\right) \cdot \left(\left(B\_m \cdot B\_m + A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B\_m \cdot \left(\sqrt{0.5} \cdot \sqrt{\frac{\frac{1}{F}}{C - \mathsf{hypot}\left(C, B\_m\right)}}\right)}\\
\end{array}
\end{array}
if B < 1.64999999999999991e58Initial program 20.2%
Simplified25.9%
*-commutativeN/A
*-commutativeN/A
metadata-evalN/A
cancel-sign-sub-invN/A
pow2N/A
associate-*r*N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr26.6%
if 1.64999999999999991e58 < B Initial program 16.5%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6461.0%
Simplified61.0%
mul-1-negN/A
distribute-neg-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr61.1%
sub0-negN/A
distribute-lft-neg-inN/A
sqrt-prodN/A
unpow1/2N/A
distribute-neg-fracN/A
clear-numN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
div-invN/A
Applied egg-rr61.2%
Taylor expanded in F around 0
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6460.5%
Simplified60.5%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 6e+58)
(/
(sqrt
(*
(+ C (- A (hypot B_m (- A C))))
(* (+ (* B_m B_m) (* A (* C -4.0))) (* 2.0 F))))
(- (* 4.0 (* A C)) (* B_m B_m)))
(/ -1.0 (* B_m (pow (/ (* 2.0 F) (/ -1.0 (- (hypot B_m C) C))) -0.5)))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 6e+58) {
tmp = sqrt(((C + (A - hypot(B_m, (A - C)))) * (((B_m * B_m) + (A * (C * -4.0))) * (2.0 * F)))) / ((4.0 * (A * C)) - (B_m * B_m));
} else {
tmp = -1.0 / (B_m * pow(((2.0 * F) / (-1.0 / (hypot(B_m, C) - C))), -0.5));
}
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 <= 6e+58) {
tmp = Math.sqrt(((C + (A - Math.hypot(B_m, (A - C)))) * (((B_m * B_m) + (A * (C * -4.0))) * (2.0 * F)))) / ((4.0 * (A * C)) - (B_m * B_m));
} else {
tmp = -1.0 / (B_m * Math.pow(((2.0 * F) / (-1.0 / (Math.hypot(B_m, C) - C))), -0.5));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 6e+58: tmp = math.sqrt(((C + (A - math.hypot(B_m, (A - C)))) * (((B_m * B_m) + (A * (C * -4.0))) * (2.0 * F)))) / ((4.0 * (A * C)) - (B_m * B_m)) else: tmp = -1.0 / (B_m * math.pow(((2.0 * F) / (-1.0 / (math.hypot(B_m, C) - C))), -0.5)) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 6e+58) tmp = Float64(sqrt(Float64(Float64(C + Float64(A - hypot(B_m, Float64(A - C)))) * Float64(Float64(Float64(B_m * B_m) + Float64(A * Float64(C * -4.0))) * Float64(2.0 * F)))) / Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m))); else tmp = Float64(-1.0 / Float64(B_m * (Float64(Float64(2.0 * F) / Float64(-1.0 / Float64(hypot(B_m, C) - C))) ^ -0.5))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 6e+58) tmp = sqrt(((C + (A - hypot(B_m, (A - C)))) * (((B_m * B_m) + (A * (C * -4.0))) * (2.0 * F)))) / ((4.0 * (A * C)) - (B_m * B_m)); else tmp = -1.0 / (B_m * (((2.0 * F) / (-1.0 / (hypot(B_m, C) - C))) ^ -0.5)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 6e+58], N[(N[Sqrt[N[(N[(C + N[(A - N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 / N[(B$95$m * N[Power[N[(N[(2.0 * F), $MachinePrecision] / N[(-1.0 / N[(N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision] - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 6 \cdot 10^{+58}:\\
\;\;\;\;\frac{\sqrt{\left(C + \left(A - \mathsf{hypot}\left(B\_m, A - C\right)\right)\right) \cdot \left(\left(B\_m \cdot B\_m + A \cdot \left(C \cdot -4\right)\right) \cdot \left(2 \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B\_m \cdot {\left(\frac{2 \cdot F}{\frac{-1}{\mathsf{hypot}\left(B\_m, C\right) - C}}\right)}^{-0.5}}\\
\end{array}
\end{array}
if B < 6.0000000000000005e58Initial program 20.2%
Simplified25.9%
*-commutativeN/A
*-commutativeN/A
metadata-evalN/A
cancel-sign-sub-invN/A
pow2N/A
associate-*r*N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr26.6%
if 6.0000000000000005e58 < B Initial program 16.5%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6461.0%
Simplified61.0%
mul-1-negN/A
distribute-neg-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr61.1%
sub0-negN/A
distribute-lft-neg-inN/A
sqrt-prodN/A
unpow1/2N/A
distribute-neg-fracN/A
clear-numN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
div-invN/A
Applied egg-rr61.2%
*-commutativeN/A
associate-*r*N/A
flip--N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
clear-numN/A
flip--N/A
/-lowering-/.f64N/A
Applied egg-rr61.2%
Final simplification32.5%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 1.2e+46)
(/
(sqrt
(*
(* 2.0 F)
(* (+ (* B_m B_m) (* A (* C -4.0))) (+ C (- A (hypot B_m (- A C)))))))
(- (* 4.0 (* A C)) (* B_m B_m)))
(/ -1.0 (* B_m (pow (/ (* 2.0 F) (/ -1.0 (- (hypot B_m C) C))) -0.5)))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 1.2e+46) {
tmp = sqrt(((2.0 * F) * (((B_m * B_m) + (A * (C * -4.0))) * (C + (A - hypot(B_m, (A - C))))))) / ((4.0 * (A * C)) - (B_m * B_m));
} else {
tmp = -1.0 / (B_m * pow(((2.0 * F) / (-1.0 / (hypot(B_m, C) - C))), -0.5));
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 1.2e+46) {
tmp = Math.sqrt(((2.0 * F) * (((B_m * B_m) + (A * (C * -4.0))) * (C + (A - Math.hypot(B_m, (A - C))))))) / ((4.0 * (A * C)) - (B_m * B_m));
} else {
tmp = -1.0 / (B_m * Math.pow(((2.0 * F) / (-1.0 / (Math.hypot(B_m, C) - C))), -0.5));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 1.2e+46: tmp = math.sqrt(((2.0 * F) * (((B_m * B_m) + (A * (C * -4.0))) * (C + (A - math.hypot(B_m, (A - C))))))) / ((4.0 * (A * C)) - (B_m * B_m)) else: tmp = -1.0 / (B_m * math.pow(((2.0 * F) / (-1.0 / (math.hypot(B_m, C) - C))), -0.5)) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 1.2e+46) tmp = Float64(sqrt(Float64(Float64(2.0 * F) * Float64(Float64(Float64(B_m * B_m) + Float64(A * Float64(C * -4.0))) * Float64(C + Float64(A - hypot(B_m, Float64(A - C))))))) / Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m))); else tmp = Float64(-1.0 / Float64(B_m * (Float64(Float64(2.0 * F) / Float64(-1.0 / Float64(hypot(B_m, C) - C))) ^ -0.5))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 1.2e+46) tmp = sqrt(((2.0 * F) * (((B_m * B_m) + (A * (C * -4.0))) * (C + (A - hypot(B_m, (A - C))))))) / ((4.0 * (A * C)) - (B_m * B_m)); else tmp = -1.0 / (B_m * (((2.0 * F) / (-1.0 / (hypot(B_m, C) - C))) ^ -0.5)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 1.2e+46], N[(N[Sqrt[N[(N[(2.0 * F), $MachinePrecision] * N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(C + N[(A - N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 / N[(B$95$m * N[Power[N[(N[(2.0 * F), $MachinePrecision] / N[(-1.0 / N[(N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision] - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 1.2 \cdot 10^{+46}:\\
\;\;\;\;\frac{\sqrt{\left(2 \cdot F\right) \cdot \left(\left(B\_m \cdot B\_m + A \cdot \left(C \cdot -4\right)\right) \cdot \left(C + \left(A - \mathsf{hypot}\left(B\_m, A - C\right)\right)\right)\right)}}{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B\_m \cdot {\left(\frac{2 \cdot F}{\frac{-1}{\mathsf{hypot}\left(B\_m, C\right) - C}}\right)}^{-0.5}}\\
\end{array}
\end{array}
if B < 1.20000000000000004e46Initial program 19.9%
Simplified25.7%
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr23.7%
if 1.20000000000000004e46 < B Initial program 18.0%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6460.5%
Simplified60.5%
mul-1-negN/A
distribute-neg-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr60.6%
sub0-negN/A
distribute-lft-neg-inN/A
sqrt-prodN/A
unpow1/2N/A
distribute-neg-fracN/A
clear-numN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
div-invN/A
Applied egg-rr60.7%
*-commutativeN/A
associate-*r*N/A
flip--N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
clear-numN/A
flip--N/A
/-lowering-/.f64N/A
Applied egg-rr60.7%
Final simplification30.3%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 8.5e-46)
(/
(sqrt
(*
(+ (* B_m B_m) (* -4.0 (* A C)))
(* (* 2.0 F) (- A (- (hypot B_m (- A C)) C)))))
(* 4.0 (* A C)))
(/ -1.0 (* B_m (pow (/ (* 2.0 F) (/ -1.0 (- (hypot B_m C) C))) -0.5)))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 8.5e-46) {
tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((2.0 * F) * (A - (hypot(B_m, (A - C)) - C))))) / (4.0 * (A * C));
} else {
tmp = -1.0 / (B_m * pow(((2.0 * F) / (-1.0 / (hypot(B_m, C) - C))), -0.5));
}
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 <= 8.5e-46) {
tmp = Math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((2.0 * F) * (A - (Math.hypot(B_m, (A - C)) - C))))) / (4.0 * (A * C));
} else {
tmp = -1.0 / (B_m * Math.pow(((2.0 * F) / (-1.0 / (Math.hypot(B_m, C) - C))), -0.5));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 8.5e-46: tmp = math.sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((2.0 * F) * (A - (math.hypot(B_m, (A - C)) - C))))) / (4.0 * (A * C)) else: tmp = -1.0 / (B_m * math.pow(((2.0 * F) / (-1.0 / (math.hypot(B_m, C) - C))), -0.5)) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 8.5e-46) tmp = Float64(sqrt(Float64(Float64(Float64(B_m * B_m) + Float64(-4.0 * Float64(A * C))) * Float64(Float64(2.0 * F) * Float64(A - Float64(hypot(B_m, Float64(A - C)) - C))))) / Float64(4.0 * Float64(A * C))); else tmp = Float64(-1.0 / Float64(B_m * (Float64(Float64(2.0 * F) / Float64(-1.0 / Float64(hypot(B_m, C) - C))) ^ -0.5))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 8.5e-46) tmp = sqrt((((B_m * B_m) + (-4.0 * (A * C))) * ((2.0 * F) * (A - (hypot(B_m, (A - C)) - C))))) / (4.0 * (A * C)); else tmp = -1.0 / (B_m * (((2.0 * F) / (-1.0 / (hypot(B_m, C) - C))) ^ -0.5)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 8.5e-46], N[(N[Sqrt[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * F), $MachinePrecision] * N[(A - N[(N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision] - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 / N[(B$95$m * N[Power[N[(N[(2.0 * F), $MachinePrecision] / N[(-1.0 / N[(N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision] - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 8.5 \cdot 10^{-46}:\\
\;\;\;\;\frac{\sqrt{\left(B\_m \cdot B\_m + -4 \cdot \left(A \cdot C\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \left(A - \left(\mathsf{hypot}\left(B\_m, A - C\right) - C\right)\right)\right)}}{4 \cdot \left(A \cdot C\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B\_m \cdot {\left(\frac{2 \cdot F}{\frac{-1}{\mathsf{hypot}\left(B\_m, C\right) - C}}\right)}^{-0.5}}\\
\end{array}
\end{array}
if B < 8.5000000000000001e-46Initial program 17.8%
Simplified24.0%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-lowering-*.f6417.3%
Simplified17.3%
if 8.5000000000000001e-46 < B Initial program 25.1%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6457.0%
Simplified57.0%
mul-1-negN/A
distribute-neg-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr57.1%
sub0-negN/A
distribute-lft-neg-inN/A
sqrt-prodN/A
unpow1/2N/A
distribute-neg-fracN/A
clear-numN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
div-invN/A
Applied egg-rr57.2%
*-commutativeN/A
associate-*r*N/A
flip--N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
clear-numN/A
flip--N/A
/-lowering-/.f64N/A
Applied egg-rr57.1%
Final simplification26.9%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 4.8e-46)
(/
(sqrt (* (* -4.0 (* A C)) (* (* 2.0 F) (- A (- (hypot B_m (- A C)) C)))))
(- (* 4.0 (* A C)) (* B_m B_m)))
(/ -1.0 (* B_m (pow (/ (* 2.0 F) (/ -1.0 (- (hypot B_m C) C))) -0.5)))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 4.8e-46) {
tmp = sqrt(((-4.0 * (A * C)) * ((2.0 * F) * (A - (hypot(B_m, (A - C)) - C))))) / ((4.0 * (A * C)) - (B_m * B_m));
} else {
tmp = -1.0 / (B_m * pow(((2.0 * F) / (-1.0 / (hypot(B_m, C) - C))), -0.5));
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 4.8e-46) {
tmp = Math.sqrt(((-4.0 * (A * C)) * ((2.0 * F) * (A - (Math.hypot(B_m, (A - C)) - C))))) / ((4.0 * (A * C)) - (B_m * B_m));
} else {
tmp = -1.0 / (B_m * Math.pow(((2.0 * F) / (-1.0 / (Math.hypot(B_m, C) - C))), -0.5));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 4.8e-46: tmp = math.sqrt(((-4.0 * (A * C)) * ((2.0 * F) * (A - (math.hypot(B_m, (A - C)) - C))))) / ((4.0 * (A * C)) - (B_m * B_m)) else: tmp = -1.0 / (B_m * math.pow(((2.0 * F) / (-1.0 / (math.hypot(B_m, C) - C))), -0.5)) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 4.8e-46) tmp = Float64(sqrt(Float64(Float64(-4.0 * Float64(A * C)) * Float64(Float64(2.0 * F) * Float64(A - Float64(hypot(B_m, Float64(A - C)) - C))))) / Float64(Float64(4.0 * Float64(A * C)) - Float64(B_m * B_m))); else tmp = Float64(-1.0 / Float64(B_m * (Float64(Float64(2.0 * F) / Float64(-1.0 / Float64(hypot(B_m, C) - C))) ^ -0.5))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 4.8e-46) tmp = sqrt(((-4.0 * (A * C)) * ((2.0 * F) * (A - (hypot(B_m, (A - C)) - C))))) / ((4.0 * (A * C)) - (B_m * B_m)); else tmp = -1.0 / (B_m * (((2.0 * F) / (-1.0 / (hypot(B_m, C) - C))) ^ -0.5)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 4.8e-46], N[(N[Sqrt[N[(N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * F), $MachinePrecision] * N[(A - N[(N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision] - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 / N[(B$95$m * N[Power[N[(N[(2.0 * F), $MachinePrecision] / N[(-1.0 / N[(N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision] - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 4.8 \cdot 10^{-46}:\\
\;\;\;\;\frac{\sqrt{\left(-4 \cdot \left(A \cdot C\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \left(A - \left(\mathsf{hypot}\left(B\_m, A - C\right) - C\right)\right)\right)}}{4 \cdot \left(A \cdot C\right) - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B\_m \cdot {\left(\frac{2 \cdot F}{\frac{-1}{\mathsf{hypot}\left(B\_m, C\right) - C}}\right)}^{-0.5}}\\
\end{array}
\end{array}
if B < 4.80000000000000027e-46Initial program 17.8%
Simplified24.0%
Taylor expanded in B around 0
*-lowering-*.f64N/A
*-lowering-*.f6417.6%
Simplified17.6%
if 4.80000000000000027e-46 < B Initial program 25.1%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6457.0%
Simplified57.0%
mul-1-negN/A
distribute-neg-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr57.1%
sub0-negN/A
distribute-lft-neg-inN/A
sqrt-prodN/A
unpow1/2N/A
distribute-neg-fracN/A
clear-numN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
div-invN/A
Applied egg-rr57.2%
*-commutativeN/A
associate-*r*N/A
flip--N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
clear-numN/A
flip--N/A
/-lowering-/.f64N/A
Applied egg-rr57.1%
Final simplification27.1%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (* 4.0 (* A C))))
(if (<= B_m 4e-266)
(/ (sqrt (* -16.0 (* (* A C) (* C F)))) t_0)
(if (<= B_m 3.15e-51)
(/ (sqrt (* (* A -8.0) (* C (* F (+ A A))))) (- t_0 (* B_m B_m)))
(/
-1.0
(* B_m (pow (/ (* 2.0 F) (/ -1.0 (- (hypot B_m C) C))) -0.5)))))))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 (B_m <= 4e-266) {
tmp = sqrt((-16.0 * ((A * C) * (C * F)))) / t_0;
} else if (B_m <= 3.15e-51) {
tmp = sqrt(((A * -8.0) * (C * (F * (A + A))))) / (t_0 - (B_m * B_m));
} else {
tmp = -1.0 / (B_m * pow(((2.0 * F) / (-1.0 / (hypot(B_m, C) - C))), -0.5));
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = 4.0 * (A * C);
double tmp;
if (B_m <= 4e-266) {
tmp = Math.sqrt((-16.0 * ((A * C) * (C * F)))) / t_0;
} else if (B_m <= 3.15e-51) {
tmp = Math.sqrt(((A * -8.0) * (C * (F * (A + A))))) / (t_0 - (B_m * B_m));
} else {
tmp = -1.0 / (B_m * Math.pow(((2.0 * F) / (-1.0 / (Math.hypot(B_m, C) - C))), -0.5));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = 4.0 * (A * C) tmp = 0 if B_m <= 4e-266: tmp = math.sqrt((-16.0 * ((A * C) * (C * F)))) / t_0 elif B_m <= 3.15e-51: tmp = math.sqrt(((A * -8.0) * (C * (F * (A + A))))) / (t_0 - (B_m * B_m)) else: tmp = -1.0 / (B_m * math.pow(((2.0 * F) / (-1.0 / (math.hypot(B_m, C) - C))), -0.5)) 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 (B_m <= 4e-266) tmp = Float64(sqrt(Float64(-16.0 * Float64(Float64(A * C) * Float64(C * F)))) / t_0); elseif (B_m <= 3.15e-51) tmp = Float64(sqrt(Float64(Float64(A * -8.0) * Float64(C * Float64(F * Float64(A + A))))) / Float64(t_0 - Float64(B_m * B_m))); else tmp = Float64(-1.0 / Float64(B_m * (Float64(Float64(2.0 * F) / Float64(-1.0 / Float64(hypot(B_m, C) - C))) ^ -0.5))); 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 (B_m <= 4e-266) tmp = sqrt((-16.0 * ((A * C) * (C * F)))) / t_0; elseif (B_m <= 3.15e-51) tmp = sqrt(((A * -8.0) * (C * (F * (A + A))))) / (t_0 - (B_m * B_m)); else tmp = -1.0 / (B_m * (((2.0 * F) / (-1.0 / (hypot(B_m, C) - C))) ^ -0.5)); 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[B$95$m, 4e-266], N[(N[Sqrt[N[(-16.0 * N[(N[(A * C), $MachinePrecision] * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[B$95$m, 3.15e-51], N[(N[Sqrt[N[(N[(A * -8.0), $MachinePrecision] * N[(C * N[(F * N[(A + A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(t$95$0 - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 / N[(B$95$m * N[Power[N[(N[(2.0 * F), $MachinePrecision] / N[(-1.0 / N[(N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision] - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := 4 \cdot \left(A \cdot C\right)\\
\mathbf{if}\;B\_m \leq 4 \cdot 10^{-266}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(\left(A \cdot C\right) \cdot \left(C \cdot F\right)\right)}}{t\_0}\\
\mathbf{elif}\;B\_m \leq 3.15 \cdot 10^{-51}:\\
\;\;\;\;\frac{\sqrt{\left(A \cdot -8\right) \cdot \left(C \cdot \left(F \cdot \left(A + A\right)\right)\right)}}{t\_0 - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B\_m \cdot {\left(\frac{2 \cdot F}{\frac{-1}{\mathsf{hypot}\left(B\_m, C\right) - C}}\right)}^{-0.5}}\\
\end{array}
\end{array}
if B < 3.9999999999999999e-266Initial program 17.2%
Simplified24.3%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6411.3%
Simplified11.3%
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6417.6%
Applied egg-rr17.6%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6418.1%
Simplified18.1%
if 3.9999999999999999e-266 < B < 3.1499999999999999e-51Initial program 20.6%
Simplified22.5%
Taylor expanded in C around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
+-lowering-+.f64N/A
metadata-evalN/A
*-lowering-*.f6418.5%
Simplified18.5%
if 3.1499999999999999e-51 < B Initial program 25.1%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6457.0%
Simplified57.0%
mul-1-negN/A
distribute-neg-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr57.1%
sub0-negN/A
distribute-lft-neg-inN/A
sqrt-prodN/A
unpow1/2N/A
distribute-neg-fracN/A
clear-numN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
div-invN/A
Applied egg-rr57.2%
*-commutativeN/A
associate-*r*N/A
flip--N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
clear-numN/A
flip--N/A
/-lowering-/.f64N/A
Applied egg-rr57.1%
Final simplification27.6%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (* 4.0 (* A C))))
(if (<= B_m 3e-266)
(/ (sqrt (* -16.0 (* (* A C) (* C F)))) t_0)
(if (<= B_m 1.2e-51)
(/ (sqrt (* (* A -8.0) (* C (* F (+ A A))))) (- t_0 (* B_m B_m)))
(/ (pow (* 2.0 (* F (- C (hypot B_m C)))) 0.5) (- 0.0 B_m))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = 4.0 * (A * C);
double tmp;
if (B_m <= 3e-266) {
tmp = sqrt((-16.0 * ((A * C) * (C * F)))) / t_0;
} else if (B_m <= 1.2e-51) {
tmp = sqrt(((A * -8.0) * (C * (F * (A + A))))) / (t_0 - (B_m * B_m));
} else {
tmp = pow((2.0 * (F * (C - hypot(B_m, C)))), 0.5) / (0.0 - B_m);
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = 4.0 * (A * C);
double tmp;
if (B_m <= 3e-266) {
tmp = Math.sqrt((-16.0 * ((A * C) * (C * F)))) / t_0;
} else if (B_m <= 1.2e-51) {
tmp = Math.sqrt(((A * -8.0) * (C * (F * (A + A))))) / (t_0 - (B_m * B_m));
} else {
tmp = Math.pow((2.0 * (F * (C - Math.hypot(B_m, C)))), 0.5) / (0.0 - B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = 4.0 * (A * C) tmp = 0 if B_m <= 3e-266: tmp = math.sqrt((-16.0 * ((A * C) * (C * F)))) / t_0 elif B_m <= 1.2e-51: tmp = math.sqrt(((A * -8.0) * (C * (F * (A + A))))) / (t_0 - (B_m * B_m)) else: tmp = math.pow((2.0 * (F * (C - math.hypot(B_m, C)))), 0.5) / (0.0 - B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(4.0 * Float64(A * C)) tmp = 0.0 if (B_m <= 3e-266) tmp = Float64(sqrt(Float64(-16.0 * Float64(Float64(A * C) * Float64(C * F)))) / t_0); elseif (B_m <= 1.2e-51) tmp = Float64(sqrt(Float64(Float64(A * -8.0) * Float64(C * Float64(F * Float64(A + A))))) / Float64(t_0 - Float64(B_m * B_m))); else tmp = Float64((Float64(2.0 * Float64(F * Float64(C - hypot(B_m, C)))) ^ 0.5) / Float64(0.0 - B_m)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = 4.0 * (A * C); tmp = 0.0; if (B_m <= 3e-266) tmp = sqrt((-16.0 * ((A * C) * (C * F)))) / t_0; elseif (B_m <= 1.2e-51) tmp = sqrt(((A * -8.0) * (C * (F * (A + A))))) / (t_0 - (B_m * B_m)); else tmp = ((2.0 * (F * (C - hypot(B_m, C)))) ^ 0.5) / (0.0 - B_m); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 3e-266], N[(N[Sqrt[N[(-16.0 * N[(N[(A * C), $MachinePrecision] * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[B$95$m, 1.2e-51], N[(N[Sqrt[N[(N[(A * -8.0), $MachinePrecision] * N[(C * N[(F * N[(A + A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(t$95$0 - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(2.0 * N[(F * N[(C - N[Sqrt[B$95$m ^ 2 + C ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := 4 \cdot \left(A \cdot C\right)\\
\mathbf{if}\;B\_m \leq 3 \cdot 10^{-266}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(\left(A \cdot C\right) \cdot \left(C \cdot F\right)\right)}}{t\_0}\\
\mathbf{elif}\;B\_m \leq 1.2 \cdot 10^{-51}:\\
\;\;\;\;\frac{\sqrt{\left(A \cdot -8\right) \cdot \left(C \cdot \left(F \cdot \left(A + A\right)\right)\right)}}{t\_0 - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(2 \cdot \left(F \cdot \left(C - \mathsf{hypot}\left(B\_m, C\right)\right)\right)\right)}^{0.5}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 3e-266Initial program 17.2%
Simplified24.3%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6411.3%
Simplified11.3%
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6417.6%
Applied egg-rr17.6%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6418.1%
Simplified18.1%
if 3e-266 < B < 1.2e-51Initial program 20.6%
Simplified22.5%
Taylor expanded in C around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
+-lowering-+.f64N/A
metadata-evalN/A
*-lowering-*.f6418.5%
Simplified18.5%
if 1.2e-51 < B Initial program 25.1%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6457.0%
Simplified57.0%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr57.2%
Final simplification27.6%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (* 4.0 (* A C))))
(if (<= B_m 3.1e-266)
(/ (sqrt (* -16.0 (* (* A C) (* C F)))) t_0)
(if (<= B_m 2.06e-50)
(/ (sqrt (* (* A -8.0) (* C (* F (+ A A))))) (- t_0 (* B_m B_m)))
(/ (sqrt (* F (* 2.0 (- C (hypot C B_m))))) (- 0.0 B_m))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = 4.0 * (A * C);
double tmp;
if (B_m <= 3.1e-266) {
tmp = sqrt((-16.0 * ((A * C) * (C * F)))) / t_0;
} else if (B_m <= 2.06e-50) {
tmp = sqrt(((A * -8.0) * (C * (F * (A + A))))) / (t_0 - (B_m * B_m));
} else {
tmp = sqrt((F * (2.0 * (C - hypot(C, B_m))))) / (0.0 - B_m);
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = 4.0 * (A * C);
double tmp;
if (B_m <= 3.1e-266) {
tmp = Math.sqrt((-16.0 * ((A * C) * (C * F)))) / t_0;
} else if (B_m <= 2.06e-50) {
tmp = Math.sqrt(((A * -8.0) * (C * (F * (A + A))))) / (t_0 - (B_m * B_m));
} else {
tmp = Math.sqrt((F * (2.0 * (C - Math.hypot(C, B_m))))) / (0.0 - B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = 4.0 * (A * C) tmp = 0 if B_m <= 3.1e-266: tmp = math.sqrt((-16.0 * ((A * C) * (C * F)))) / t_0 elif B_m <= 2.06e-50: tmp = math.sqrt(((A * -8.0) * (C * (F * (A + A))))) / (t_0 - (B_m * B_m)) else: tmp = math.sqrt((F * (2.0 * (C - math.hypot(C, B_m))))) / (0.0 - B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(4.0 * Float64(A * C)) tmp = 0.0 if (B_m <= 3.1e-266) tmp = Float64(sqrt(Float64(-16.0 * Float64(Float64(A * C) * Float64(C * F)))) / t_0); elseif (B_m <= 2.06e-50) tmp = Float64(sqrt(Float64(Float64(A * -8.0) * Float64(C * Float64(F * Float64(A + A))))) / Float64(t_0 - Float64(B_m * B_m))); else tmp = Float64(sqrt(Float64(F * Float64(2.0 * Float64(C - hypot(C, B_m))))) / Float64(0.0 - B_m)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = 4.0 * (A * C); tmp = 0.0; if (B_m <= 3.1e-266) tmp = sqrt((-16.0 * ((A * C) * (C * F)))) / t_0; elseif (B_m <= 2.06e-50) tmp = sqrt(((A * -8.0) * (C * (F * (A + A))))) / (t_0 - (B_m * B_m)); else tmp = sqrt((F * (2.0 * (C - hypot(C, B_m))))) / (0.0 - B_m); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 3.1e-266], N[(N[Sqrt[N[(-16.0 * N[(N[(A * C), $MachinePrecision] * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[B$95$m, 2.06e-50], N[(N[Sqrt[N[(N[(A * -8.0), $MachinePrecision] * N[(C * N[(F * N[(A + A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(t$95$0 - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(F * N[(2.0 * N[(C - N[Sqrt[C ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := 4 \cdot \left(A \cdot C\right)\\
\mathbf{if}\;B\_m \leq 3.1 \cdot 10^{-266}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(\left(A \cdot C\right) \cdot \left(C \cdot F\right)\right)}}{t\_0}\\
\mathbf{elif}\;B\_m \leq 2.06 \cdot 10^{-50}:\\
\;\;\;\;\frac{\sqrt{\left(A \cdot -8\right) \cdot \left(C \cdot \left(F \cdot \left(A + A\right)\right)\right)}}{t\_0 - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{F \cdot \left(2 \cdot \left(C - \mathsf{hypot}\left(C, B\_m\right)\right)\right)}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 3.09999999999999995e-266Initial program 17.2%
Simplified24.3%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6411.3%
Simplified11.3%
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6417.6%
Applied egg-rr17.6%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6418.1%
Simplified18.1%
if 3.09999999999999995e-266 < B < 2.06e-50Initial program 20.6%
Simplified22.5%
Taylor expanded in C around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
+-lowering-+.f64N/A
metadata-evalN/A
*-lowering-*.f6418.5%
Simplified18.5%
if 2.06e-50 < B Initial program 25.1%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6457.0%
Simplified57.0%
mul-1-negN/A
distribute-neg-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr57.1%
sub0-negN/A
distribute-lft-neg-inN/A
sqrt-prodN/A
unpow1/2N/A
neg-lowering-neg.f64N/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
+-commutativeN/A
hypot-defineN/A
hypot-lowering-hypot.f6457.2%
Applied egg-rr57.2%
Final simplification27.6%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(let* ((t_0 (* 4.0 (* A C))))
(if (<= B_m 2.85e-266)
(/ (sqrt (* -16.0 (* (* A C) (* C F)))) t_0)
(if (<= B_m 4.6e-49)
(/ (sqrt (* (* A -8.0) (* C (* F (+ A A))))) (- t_0 (* B_m B_m)))
(/ -1.0 (* B_m (pow (* F (* 2.0 (- C B_m))) -0.5)))))))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 (B_m <= 2.85e-266) {
tmp = sqrt((-16.0 * ((A * C) * (C * F)))) / t_0;
} else if (B_m <= 4.6e-49) {
tmp = sqrt(((A * -8.0) * (C * (F * (A + A))))) / (t_0 - (B_m * B_m));
} else {
tmp = -1.0 / (B_m * pow((F * (2.0 * (C - B_m))), -0.5));
}
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 (b_m <= 2.85d-266) then
tmp = sqrt(((-16.0d0) * ((a * c) * (c * f)))) / t_0
else if (b_m <= 4.6d-49) then
tmp = sqrt(((a * (-8.0d0)) * (c * (f * (a + a))))) / (t_0 - (b_m * b_m))
else
tmp = (-1.0d0) / (b_m * ((f * (2.0d0 * (c - b_m))) ** (-0.5d0)))
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 (B_m <= 2.85e-266) {
tmp = Math.sqrt((-16.0 * ((A * C) * (C * F)))) / t_0;
} else if (B_m <= 4.6e-49) {
tmp = Math.sqrt(((A * -8.0) * (C * (F * (A + A))))) / (t_0 - (B_m * B_m));
} else {
tmp = -1.0 / (B_m * Math.pow((F * (2.0 * (C - B_m))), -0.5));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = 4.0 * (A * C) tmp = 0 if B_m <= 2.85e-266: tmp = math.sqrt((-16.0 * ((A * C) * (C * F)))) / t_0 elif B_m <= 4.6e-49: tmp = math.sqrt(((A * -8.0) * (C * (F * (A + A))))) / (t_0 - (B_m * B_m)) else: tmp = -1.0 / (B_m * math.pow((F * (2.0 * (C - B_m))), -0.5)) 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 (B_m <= 2.85e-266) tmp = Float64(sqrt(Float64(-16.0 * Float64(Float64(A * C) * Float64(C * F)))) / t_0); elseif (B_m <= 4.6e-49) tmp = Float64(sqrt(Float64(Float64(A * -8.0) * Float64(C * Float64(F * Float64(A + A))))) / Float64(t_0 - Float64(B_m * B_m))); else tmp = Float64(-1.0 / Float64(B_m * (Float64(F * Float64(2.0 * Float64(C - B_m))) ^ -0.5))); 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 (B_m <= 2.85e-266) tmp = sqrt((-16.0 * ((A * C) * (C * F)))) / t_0; elseif (B_m <= 4.6e-49) tmp = sqrt(((A * -8.0) * (C * (F * (A + A))))) / (t_0 - (B_m * B_m)); else tmp = -1.0 / (B_m * ((F * (2.0 * (C - B_m))) ^ -0.5)); 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[B$95$m, 2.85e-266], N[(N[Sqrt[N[(-16.0 * N[(N[(A * C), $MachinePrecision] * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[B$95$m, 4.6e-49], N[(N[Sqrt[N[(N[(A * -8.0), $MachinePrecision] * N[(C * N[(F * N[(A + A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(t$95$0 - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 / N[(B$95$m * N[Power[N[(F * N[(2.0 * N[(C - B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := 4 \cdot \left(A \cdot C\right)\\
\mathbf{if}\;B\_m \leq 2.85 \cdot 10^{-266}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(\left(A \cdot C\right) \cdot \left(C \cdot F\right)\right)}}{t\_0}\\
\mathbf{elif}\;B\_m \leq 4.6 \cdot 10^{-49}:\\
\;\;\;\;\frac{\sqrt{\left(A \cdot -8\right) \cdot \left(C \cdot \left(F \cdot \left(A + A\right)\right)\right)}}{t\_0 - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B\_m \cdot {\left(F \cdot \left(2 \cdot \left(C - B\_m\right)\right)\right)}^{-0.5}}\\
\end{array}
\end{array}
if B < 2.8500000000000001e-266Initial program 17.2%
Simplified24.3%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6411.3%
Simplified11.3%
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6417.6%
Applied egg-rr17.6%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6418.1%
Simplified18.1%
if 2.8500000000000001e-266 < B < 4.5999999999999998e-49Initial program 20.6%
Simplified22.5%
Taylor expanded in C around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
+-lowering-+.f64N/A
metadata-evalN/A
*-lowering-*.f6418.5%
Simplified18.5%
if 4.5999999999999998e-49 < B Initial program 25.1%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6457.0%
Simplified57.0%
mul-1-negN/A
distribute-neg-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr57.1%
sub0-negN/A
distribute-lft-neg-inN/A
sqrt-prodN/A
unpow1/2N/A
distribute-neg-fracN/A
clear-numN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
div-invN/A
Applied egg-rr57.2%
Taylor expanded in C around 0
--lowering--.f6451.0%
Simplified51.0%
Final simplification26.1%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= B_m 1.6e-25) (/ (sqrt (* -16.0 (* (* A C) (* C F)))) (* 4.0 (* A C))) (/ -1.0 (* B_m (pow (* F (* 2.0 (- C B_m))) -0.5)))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 1.6e-25) {
tmp = sqrt((-16.0 * ((A * C) * (C * F)))) / (4.0 * (A * C));
} else {
tmp = -1.0 / (B_m * pow((F * (2.0 * (C - B_m))), -0.5));
}
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.6d-25) then
tmp = sqrt(((-16.0d0) * ((a * c) * (c * f)))) / (4.0d0 * (a * c))
else
tmp = (-1.0d0) / (b_m * ((f * (2.0d0 * (c - b_m))) ** (-0.5d0)))
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.6e-25) {
tmp = Math.sqrt((-16.0 * ((A * C) * (C * F)))) / (4.0 * (A * C));
} else {
tmp = -1.0 / (B_m * Math.pow((F * (2.0 * (C - B_m))), -0.5));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 1.6e-25: tmp = math.sqrt((-16.0 * ((A * C) * (C * F)))) / (4.0 * (A * C)) else: tmp = -1.0 / (B_m * math.pow((F * (2.0 * (C - B_m))), -0.5)) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 1.6e-25) tmp = Float64(sqrt(Float64(-16.0 * Float64(Float64(A * C) * Float64(C * F)))) / Float64(4.0 * Float64(A * C))); else tmp = Float64(-1.0 / Float64(B_m * (Float64(F * Float64(2.0 * Float64(C - B_m))) ^ -0.5))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 1.6e-25) tmp = sqrt((-16.0 * ((A * C) * (C * F)))) / (4.0 * (A * C)); else tmp = -1.0 / (B_m * ((F * (2.0 * (C - B_m))) ^ -0.5)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 1.6e-25], N[(N[Sqrt[N[(-16.0 * N[(N[(A * C), $MachinePrecision] * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 / N[(B$95$m * N[Power[N[(F * N[(2.0 * N[(C - B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 1.6 \cdot 10^{-25}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(\left(A \cdot C\right) \cdot \left(C \cdot F\right)\right)}}{4 \cdot \left(A \cdot C\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B\_m \cdot {\left(F \cdot \left(2 \cdot \left(C - B\_m\right)\right)\right)}^{-0.5}}\\
\end{array}
\end{array}
if B < 1.6000000000000001e-25Initial program 18.3%
Simplified24.3%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6411.9%
Simplified11.9%
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6417.9%
Applied egg-rr17.9%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6418.6%
Simplified18.6%
if 1.6000000000000001e-25 < B Initial program 24.0%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6459.1%
Simplified59.1%
mul-1-negN/A
distribute-neg-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr59.2%
sub0-negN/A
distribute-lft-neg-inN/A
sqrt-prodN/A
unpow1/2N/A
distribute-neg-fracN/A
clear-numN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
div-invN/A
Applied egg-rr59.2%
Taylor expanded in C around 0
--lowering--.f6452.5%
Simplified52.5%
Final simplification26.0%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= B_m 3.5e-25) (* (/ (/ 0.25 A) C) (sqrt (* (* C (* A C)) (* F -16.0)))) (/ -1.0 (* B_m (pow (* F (* 2.0 (- C B_m))) -0.5)))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 3.5e-25) {
tmp = ((0.25 / A) / C) * sqrt(((C * (A * C)) * (F * -16.0)));
} else {
tmp = -1.0 / (B_m * pow((F * (2.0 * (C - B_m))), -0.5));
}
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.5d-25) then
tmp = ((0.25d0 / a) / c) * sqrt(((c * (a * c)) * (f * (-16.0d0))))
else
tmp = (-1.0d0) / (b_m * ((f * (2.0d0 * (c - b_m))) ** (-0.5d0)))
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.5e-25) {
tmp = ((0.25 / A) / C) * Math.sqrt(((C * (A * C)) * (F * -16.0)));
} else {
tmp = -1.0 / (B_m * Math.pow((F * (2.0 * (C - B_m))), -0.5));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 3.5e-25: tmp = ((0.25 / A) / C) * math.sqrt(((C * (A * C)) * (F * -16.0))) else: tmp = -1.0 / (B_m * math.pow((F * (2.0 * (C - B_m))), -0.5)) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 3.5e-25) tmp = Float64(Float64(Float64(0.25 / A) / C) * sqrt(Float64(Float64(C * Float64(A * C)) * Float64(F * -16.0)))); else tmp = Float64(-1.0 / Float64(B_m * (Float64(F * Float64(2.0 * Float64(C - B_m))) ^ -0.5))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 3.5e-25) tmp = ((0.25 / A) / C) * sqrt(((C * (A * C)) * (F * -16.0))); else tmp = -1.0 / (B_m * ((F * (2.0 * (C - B_m))) ^ -0.5)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 3.5e-25], N[(N[(N[(0.25 / A), $MachinePrecision] / C), $MachinePrecision] * N[Sqrt[N[(N[(C * N[(A * C), $MachinePrecision]), $MachinePrecision] * N[(F * -16.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(-1.0 / N[(B$95$m * N[Power[N[(F * N[(2.0 * N[(C - B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 3.5 \cdot 10^{-25}:\\
\;\;\;\;\frac{\frac{0.25}{A}}{C} \cdot \sqrt{\left(C \cdot \left(A \cdot C\right)\right) \cdot \left(F \cdot -16\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B\_m \cdot {\left(F \cdot \left(2 \cdot \left(C - B\_m\right)\right)\right)}^{-0.5}}\\
\end{array}
\end{array}
if B < 3.5000000000000002e-25Initial program 18.3%
Simplified24.3%
Taylor expanded in B around 0
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6411.9%
Simplified11.9%
clear-numN/A
associate-/r/N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
Applied egg-rr15.7%
Taylor expanded in C around inf
associate-/r*N/A
metadata-evalN/A
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6416.3%
Simplified16.3%
if 3.5000000000000002e-25 < B Initial program 24.0%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6459.1%
Simplified59.1%
mul-1-negN/A
distribute-neg-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr59.2%
sub0-negN/A
distribute-lft-neg-inN/A
sqrt-prodN/A
unpow1/2N/A
distribute-neg-fracN/A
clear-numN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
div-invN/A
Applied egg-rr59.2%
Taylor expanded in C around 0
--lowering--.f6452.5%
Simplified52.5%
Final simplification24.2%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= C -9.9e+253) (/ -1.0 (* B_m (pow (* F (* 4.0 C)) -0.5))) (/ -1.0 (* B_m (pow (* (* B_m F) -2.0) -0.5)))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (C <= -9.9e+253) {
tmp = -1.0 / (B_m * pow((F * (4.0 * C)), -0.5));
} else {
tmp = -1.0 / (B_m * pow(((B_m * F) * -2.0), -0.5));
}
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 <= (-9.9d+253)) then
tmp = (-1.0d0) / (b_m * ((f * (4.0d0 * c)) ** (-0.5d0)))
else
tmp = (-1.0d0) / (b_m * (((b_m * f) * (-2.0d0)) ** (-0.5d0)))
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 <= -9.9e+253) {
tmp = -1.0 / (B_m * Math.pow((F * (4.0 * C)), -0.5));
} else {
tmp = -1.0 / (B_m * Math.pow(((B_m * F) * -2.0), -0.5));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if C <= -9.9e+253: tmp = -1.0 / (B_m * math.pow((F * (4.0 * C)), -0.5)) else: tmp = -1.0 / (B_m * math.pow(((B_m * F) * -2.0), -0.5)) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (C <= -9.9e+253) tmp = Float64(-1.0 / Float64(B_m * (Float64(F * Float64(4.0 * C)) ^ -0.5))); else tmp = Float64(-1.0 / Float64(B_m * (Float64(Float64(B_m * F) * -2.0) ^ -0.5))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (C <= -9.9e+253) tmp = -1.0 / (B_m * ((F * (4.0 * C)) ^ -0.5)); else tmp = -1.0 / (B_m * (((B_m * F) * -2.0) ^ -0.5)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[C, -9.9e+253], N[(-1.0 / N[(B$95$m * N[Power[N[(F * N[(4.0 * C), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 / N[(B$95$m * N[Power[N[(N[(B$95$m * F), $MachinePrecision] * -2.0), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;C \leq -9.9 \cdot 10^{+253}:\\
\;\;\;\;\frac{-1}{B\_m \cdot {\left(F \cdot \left(4 \cdot C\right)\right)}^{-0.5}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B\_m \cdot {\left(\left(B\_m \cdot F\right) \cdot -2\right)}^{-0.5}}\\
\end{array}
\end{array}
if C < -9.8999999999999998e253Initial program 1.5%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6421.8%
Simplified21.8%
mul-1-negN/A
distribute-neg-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr21.7%
sub0-negN/A
distribute-lft-neg-inN/A
sqrt-prodN/A
unpow1/2N/A
distribute-neg-fracN/A
clear-numN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
div-invN/A
Applied egg-rr22.4%
Taylor expanded in C around -inf
*-commutativeN/A
*-lowering-*.f6422.4%
Simplified22.4%
if -9.8999999999999998e253 < C Initial program 20.6%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6415.7%
Simplified15.7%
mul-1-negN/A
distribute-neg-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr15.7%
sub0-negN/A
distribute-lft-neg-inN/A
sqrt-prodN/A
unpow1/2N/A
distribute-neg-fracN/A
clear-numN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
div-invN/A
Applied egg-rr15.8%
Taylor expanded in C around 0
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6414.6%
Simplified14.6%
Final simplification15.1%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= C -2.15e+250) (/ -1.0 (* B_m (pow (* F (* 4.0 C)) -0.5))) (/ (pow (* (* B_m F) -2.0) 0.5) (- 0.0 B_m))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (C <= -2.15e+250) {
tmp = -1.0 / (B_m * pow((F * (4.0 * C)), -0.5));
} else {
tmp = pow(((B_m * F) * -2.0), 0.5) / (0.0 - B_m);
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if (c <= (-2.15d+250)) then
tmp = (-1.0d0) / (b_m * ((f * (4.0d0 * c)) ** (-0.5d0)))
else
tmp = (((b_m * f) * (-2.0d0)) ** 0.5d0) / (0.0d0 - b_m)
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (C <= -2.15e+250) {
tmp = -1.0 / (B_m * Math.pow((F * (4.0 * C)), -0.5));
} else {
tmp = Math.pow(((B_m * F) * -2.0), 0.5) / (0.0 - B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if C <= -2.15e+250: tmp = -1.0 / (B_m * math.pow((F * (4.0 * C)), -0.5)) else: tmp = math.pow(((B_m * F) * -2.0), 0.5) / (0.0 - B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (C <= -2.15e+250) tmp = Float64(-1.0 / Float64(B_m * (Float64(F * Float64(4.0 * C)) ^ -0.5))); else tmp = Float64((Float64(Float64(B_m * F) * -2.0) ^ 0.5) / Float64(0.0 - B_m)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (C <= -2.15e+250) tmp = -1.0 / (B_m * ((F * (4.0 * C)) ^ -0.5)); else tmp = (((B_m * F) * -2.0) ^ 0.5) / (0.0 - B_m); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[C, -2.15e+250], N[(-1.0 / N[(B$95$m * N[Power[N[(F * N[(4.0 * C), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(N[(B$95$m * F), $MachinePrecision] * -2.0), $MachinePrecision], 0.5], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;C \leq -2.15 \cdot 10^{+250}:\\
\;\;\;\;\frac{-1}{B\_m \cdot {\left(F \cdot \left(4 \cdot C\right)\right)}^{-0.5}}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\left(B\_m \cdot F\right) \cdot -2\right)}^{0.5}}{0 - B\_m}\\
\end{array}
\end{array}
if C < -2.15e250Initial program 1.5%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6421.8%
Simplified21.8%
mul-1-negN/A
distribute-neg-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr21.7%
sub0-negN/A
distribute-lft-neg-inN/A
sqrt-prodN/A
unpow1/2N/A
distribute-neg-fracN/A
clear-numN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
div-invN/A
Applied egg-rr22.4%
Taylor expanded in C around -inf
*-commutativeN/A
*-lowering-*.f6422.4%
Simplified22.4%
if -2.15e250 < C Initial program 20.6%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6415.7%
Simplified15.7%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr15.8%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6414.6%
Simplified14.6%
Final simplification15.1%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= C -1.24e+250) (* -2.0 (/ (sqrt (* C F)) B_m)) (/ (pow (* (* B_m F) -2.0) 0.5) (- 0.0 B_m))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (C <= -1.24e+250) {
tmp = -2.0 * (sqrt((C * F)) / B_m);
} else {
tmp = pow(((B_m * F) * -2.0), 0.5) / (0.0 - B_m);
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if (c <= (-1.24d+250)) then
tmp = (-2.0d0) * (sqrt((c * f)) / b_m)
else
tmp = (((b_m * f) * (-2.0d0)) ** 0.5d0) / (0.0d0 - b_m)
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (C <= -1.24e+250) {
tmp = -2.0 * (Math.sqrt((C * F)) / B_m);
} else {
tmp = Math.pow(((B_m * F) * -2.0), 0.5) / (0.0 - B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if C <= -1.24e+250: tmp = -2.0 * (math.sqrt((C * F)) / B_m) else: tmp = math.pow(((B_m * F) * -2.0), 0.5) / (0.0 - B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (C <= -1.24e+250) tmp = Float64(-2.0 * Float64(sqrt(Float64(C * F)) / B_m)); else tmp = Float64((Float64(Float64(B_m * F) * -2.0) ^ 0.5) / Float64(0.0 - B_m)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (C <= -1.24e+250) tmp = -2.0 * (sqrt((C * F)) / B_m); else tmp = (((B_m * F) * -2.0) ^ 0.5) / (0.0 - B_m); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[C, -1.24e+250], N[(-2.0 * N[(N[Sqrt[N[(C * F), $MachinePrecision]], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(N[(B$95$m * F), $MachinePrecision] * -2.0), $MachinePrecision], 0.5], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.24 \cdot 10^{+250}:\\
\;\;\;\;-2 \cdot \frac{\sqrt{C \cdot F}}{B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\left(B\_m \cdot F\right) \cdot -2\right)}^{0.5}}{0 - B\_m}\\
\end{array}
\end{array}
if C < -1.24000000000000006e250Initial program 1.5%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6421.8%
Simplified21.8%
mul-1-negN/A
distribute-neg-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr21.7%
Taylor expanded in C around -inf
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
unpow2N/A
rem-square-sqrtN/A
rem-square-sqrtN/A
metadata-evalN/A
/-lowering-/.f6421.8%
Simplified21.8%
clear-numN/A
associate-*r/N/A
div-invN/A
metadata-evalN/A
times-fracN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6421.8%
Applied egg-rr21.8%
if -1.24000000000000006e250 < C Initial program 20.6%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6415.7%
Simplified15.7%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr15.8%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6414.6%
Simplified14.6%
Final simplification15.0%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (* (pow (* C F) 0.5) (/ -2.0 B_m)))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
return pow((C * F), 0.5) * (-2.0 / B_m);
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
code = ((c * f) ** 0.5d0) * ((-2.0d0) / b_m)
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
return Math.pow((C * F), 0.5) * (-2.0 / B_m);
}
B_m = math.fabs(B) def code(A, B_m, C, F): return math.pow((C * F), 0.5) * (-2.0 / B_m)
B_m = abs(B) function code(A, B_m, C, F) return Float64((Float64(C * F) ^ 0.5) * Float64(-2.0 / B_m)) end
B_m = abs(B); function tmp = code(A, B_m, C, F) tmp = ((C * F) ^ 0.5) * (-2.0 / B_m); end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := N[(N[Power[N[(C * F), $MachinePrecision], 0.5], $MachinePrecision] * N[(-2.0 / B$95$m), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|
\\
{\left(C \cdot F\right)}^{0.5} \cdot \frac{-2}{B\_m}
\end{array}
Initial program 19.6%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6416.0%
Simplified16.0%
mul-1-negN/A
distribute-neg-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr16.1%
Taylor expanded in C around -inf
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
unpow2N/A
rem-square-sqrtN/A
rem-square-sqrtN/A
metadata-evalN/A
/-lowering-/.f643.3%
Simplified3.3%
pow1/2N/A
pow-lowering-pow.f64N/A
*-lowering-*.f643.4%
Applied egg-rr3.4%
Final simplification3.4%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (* (sqrt (* C F)) (/ -2.0 B_m)))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
return sqrt((C * F)) * (-2.0 / B_m);
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
code = sqrt((c * f)) * ((-2.0d0) / b_m)
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
return Math.sqrt((C * F)) * (-2.0 / B_m);
}
B_m = math.fabs(B) def code(A, B_m, C, F): return math.sqrt((C * F)) * (-2.0 / B_m)
B_m = abs(B) function code(A, B_m, C, F) return Float64(sqrt(Float64(C * F)) * Float64(-2.0 / B_m)) end
B_m = abs(B); function tmp = code(A, B_m, C, F) tmp = sqrt((C * F)) * (-2.0 / B_m); end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := N[(N[Sqrt[N[(C * F), $MachinePrecision]], $MachinePrecision] * N[(-2.0 / B$95$m), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|
\\
\sqrt{C \cdot F} \cdot \frac{-2}{B\_m}
\end{array}
Initial program 19.6%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6416.0%
Simplified16.0%
mul-1-negN/A
distribute-neg-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr16.1%
Taylor expanded in C around -inf
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
unpow2N/A
rem-square-sqrtN/A
rem-square-sqrtN/A
metadata-evalN/A
/-lowering-/.f643.3%
Simplified3.3%
Final simplification3.3%
herbie shell --seed 2024170
(FPCore (A B C F)
:name "ABCF->ab-angle b"
:precision binary64
(/ (- (sqrt (* (* 2.0 (* (- (pow B 2.0) (* (* 4.0 A) C)) F)) (- (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))) (- (pow B 2.0) (* (* 4.0 A) C))))