
(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 18 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 (* (* A C) 4.0)))
(if (<= B_m 5.5e-230)
(/
(sqrt
(*
C
(+
(* (* A -8.0) (* F (+ A A)))
(*
2.0
(/ (* F (+ (* 2.0 (* (* B_m B_m) A)) (* (* B_m B_m) (+ A A)))) C)))))
t_0)
(if (<= B_m 2.08e+68)
(/
(sqrt
(*
(* 2.0 F)
(*
(+ A (- C (hypot B_m (- A C))))
(+ (* B_m B_m) (* (* A C) -4.0)))))
(- t_0 (* B_m B_m)))
(* (* (sqrt B_m) (/ -1.0 B_m)) (sqrt (- 0.0 (* 2.0 F))))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double t_0 = (A * C) * 4.0;
double tmp;
if (B_m <= 5.5e-230) {
tmp = sqrt((C * (((A * -8.0) * (F * (A + A))) + (2.0 * ((F * ((2.0 * ((B_m * B_m) * A)) + ((B_m * B_m) * (A + A)))) / C))))) / t_0;
} else if (B_m <= 2.08e+68) {
tmp = sqrt(((2.0 * F) * ((A + (C - hypot(B_m, (A - C)))) * ((B_m * B_m) + ((A * C) * -4.0))))) / (t_0 - (B_m * B_m));
} else {
tmp = (sqrt(B_m) * (-1.0 / B_m)) * sqrt((0.0 - (2.0 * F)));
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double t_0 = (A * C) * 4.0;
double tmp;
if (B_m <= 5.5e-230) {
tmp = Math.sqrt((C * (((A * -8.0) * (F * (A + A))) + (2.0 * ((F * ((2.0 * ((B_m * B_m) * A)) + ((B_m * B_m) * (A + A)))) / C))))) / t_0;
} else if (B_m <= 2.08e+68) {
tmp = Math.sqrt(((2.0 * F) * ((A + (C - Math.hypot(B_m, (A - C)))) * ((B_m * B_m) + ((A * C) * -4.0))))) / (t_0 - (B_m * B_m));
} else {
tmp = (Math.sqrt(B_m) * (-1.0 / B_m)) * Math.sqrt((0.0 - (2.0 * F)));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): t_0 = (A * C) * 4.0 tmp = 0 if B_m <= 5.5e-230: tmp = math.sqrt((C * (((A * -8.0) * (F * (A + A))) + (2.0 * ((F * ((2.0 * ((B_m * B_m) * A)) + ((B_m * B_m) * (A + A)))) / C))))) / t_0 elif B_m <= 2.08e+68: tmp = math.sqrt(((2.0 * F) * ((A + (C - math.hypot(B_m, (A - C)))) * ((B_m * B_m) + ((A * C) * -4.0))))) / (t_0 - (B_m * B_m)) else: tmp = (math.sqrt(B_m) * (-1.0 / B_m)) * math.sqrt((0.0 - (2.0 * F))) return tmp
B_m = abs(B) function code(A, B_m, C, F) t_0 = Float64(Float64(A * C) * 4.0) tmp = 0.0 if (B_m <= 5.5e-230) tmp = Float64(sqrt(Float64(C * Float64(Float64(Float64(A * -8.0) * Float64(F * Float64(A + A))) + Float64(2.0 * Float64(Float64(F * Float64(Float64(2.0 * Float64(Float64(B_m * B_m) * A)) + Float64(Float64(B_m * B_m) * Float64(A + A)))) / C))))) / t_0); elseif (B_m <= 2.08e+68) tmp = Float64(sqrt(Float64(Float64(2.0 * F) * Float64(Float64(A + Float64(C - hypot(B_m, Float64(A - C)))) * Float64(Float64(B_m * B_m) + Float64(Float64(A * C) * -4.0))))) / Float64(t_0 - Float64(B_m * B_m))); else tmp = Float64(Float64(sqrt(B_m) * Float64(-1.0 / B_m)) * sqrt(Float64(0.0 - Float64(2.0 * F)))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) t_0 = (A * C) * 4.0; tmp = 0.0; if (B_m <= 5.5e-230) tmp = sqrt((C * (((A * -8.0) * (F * (A + A))) + (2.0 * ((F * ((2.0 * ((B_m * B_m) * A)) + ((B_m * B_m) * (A + A)))) / C))))) / t_0; elseif (B_m <= 2.08e+68) tmp = sqrt(((2.0 * F) * ((A + (C - hypot(B_m, (A - C)))) * ((B_m * B_m) + ((A * C) * -4.0))))) / (t_0 - (B_m * B_m)); else tmp = (sqrt(B_m) * (-1.0 / B_m)) * sqrt((0.0 - (2.0 * F))); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision]
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]}, If[LessEqual[B$95$m, 5.5e-230], N[(N[Sqrt[N[(C * N[(N[(N[(A * -8.0), $MachinePrecision] * N[(F * N[(A + A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(F * N[(N[(2.0 * N[(N[(B$95$m * B$95$m), $MachinePrecision] * A), $MachinePrecision]), $MachinePrecision] + N[(N[(B$95$m * B$95$m), $MachinePrecision] * N[(A + A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[B$95$m, 2.08e+68], N[(N[Sqrt[N[(N[(2.0 * F), $MachinePrecision] * N[(N[(A + N[(C - N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(N[(A * C), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(t$95$0 - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[B$95$m], $MachinePrecision] * N[(-1.0 / B$95$m), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(0.0 - N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
t_0 := \left(A \cdot C\right) \cdot 4\\
\mathbf{if}\;B\_m \leq 5.5 \cdot 10^{-230}:\\
\;\;\;\;\frac{\sqrt{C \cdot \left(\left(A \cdot -8\right) \cdot \left(F \cdot \left(A + A\right)\right) + 2 \cdot \frac{F \cdot \left(2 \cdot \left(\left(B\_m \cdot B\_m\right) \cdot A\right) + \left(B\_m \cdot B\_m\right) \cdot \left(A + A\right)\right)}{C}\right)}}{t\_0}\\
\mathbf{elif}\;B\_m \leq 2.08 \cdot 10^{+68}:\\
\;\;\;\;\frac{\sqrt{\left(2 \cdot F\right) \cdot \left(\left(A + \left(C - \mathsf{hypot}\left(B\_m, A - C\right)\right)\right) \cdot \left(B\_m \cdot B\_m + \left(A \cdot C\right) \cdot -4\right)\right)}}{t\_0 - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt{B\_m} \cdot \frac{-1}{B\_m}\right) \cdot \sqrt{0 - 2 \cdot F}\\
\end{array}
\end{array}
if B < 5.4999999999999997e-230Initial program 18.0%
Simplified24.9%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-lowering-*.f6415.8%
Simplified15.8%
Taylor expanded in C around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified15.2%
if 5.4999999999999997e-230 < B < 2.08e68Initial program 32.7%
Simplified43.3%
Taylor expanded in F around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
metadata-evalN/A
cancel-sign-sub-invN/A
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
Simplified41.3%
if 2.08e68 < B Initial program 7.9%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6440.0%
Simplified40.0%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f6437.5%
Simplified37.5%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f6437.5%
Applied egg-rr37.5%
*-commutativeN/A
distribute-rgt-neg-outN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
sqrt-unprodN/A
associate-*l*N/A
*-commutativeN/A
associate-/r/N/A
associate-*l*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f6468.1%
Applied egg-rr68.1%
Final simplification32.3%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= (pow B_m 2.0) 5e+136)
(/
(sqrt
(*
(* (+ A (- C (hypot B_m (- A C)))) (* 2.0 F))
(+ (* B_m B_m) (* (* A C) -4.0))))
(- (* (* A C) 4.0) (* B_m B_m)))
(* (* (sqrt B_m) (/ -1.0 B_m)) (sqrt (- 0.0 (* 2.0 F))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (pow(B_m, 2.0) <= 5e+136) {
tmp = sqrt((((A + (C - hypot(B_m, (A - C)))) * (2.0 * F)) * ((B_m * B_m) + ((A * C) * -4.0)))) / (((A * C) * 4.0) - (B_m * B_m));
} else {
tmp = (sqrt(B_m) * (-1.0 / B_m)) * sqrt((0.0 - (2.0 * F)));
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (Math.pow(B_m, 2.0) <= 5e+136) {
tmp = Math.sqrt((((A + (C - Math.hypot(B_m, (A - C)))) * (2.0 * F)) * ((B_m * B_m) + ((A * C) * -4.0)))) / (((A * C) * 4.0) - (B_m * B_m));
} else {
tmp = (Math.sqrt(B_m) * (-1.0 / B_m)) * Math.sqrt((0.0 - (2.0 * F)));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if math.pow(B_m, 2.0) <= 5e+136: tmp = math.sqrt((((A + (C - math.hypot(B_m, (A - C)))) * (2.0 * F)) * ((B_m * B_m) + ((A * C) * -4.0)))) / (((A * C) * 4.0) - (B_m * B_m)) else: tmp = (math.sqrt(B_m) * (-1.0 / B_m)) * math.sqrt((0.0 - (2.0 * F))) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if ((B_m ^ 2.0) <= 5e+136) tmp = Float64(sqrt(Float64(Float64(Float64(A + Float64(C - hypot(B_m, Float64(A - C)))) * Float64(2.0 * F)) * Float64(Float64(B_m * B_m) + Float64(Float64(A * C) * -4.0)))) / Float64(Float64(Float64(A * C) * 4.0) - Float64(B_m * B_m))); else tmp = Float64(Float64(sqrt(B_m) * Float64(-1.0 / B_m)) * sqrt(Float64(0.0 - Float64(2.0 * F)))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if ((B_m ^ 2.0) <= 5e+136) tmp = sqrt((((A + (C - hypot(B_m, (A - C)))) * (2.0 * F)) * ((B_m * B_m) + ((A * C) * -4.0)))) / (((A * C) * 4.0) - (B_m * B_m)); else tmp = (sqrt(B_m) * (-1.0 / B_m)) * sqrt((0.0 - (2.0 * F))); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[N[Power[B$95$m, 2.0], $MachinePrecision], 5e+136], N[(N[Sqrt[N[(N[(N[(A + N[(C - N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision] * N[(N[(B$95$m * B$95$m), $MachinePrecision] + N[(N[(A * C), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[B$95$m], $MachinePrecision] * N[(-1.0 / B$95$m), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(0.0 - N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;{B\_m}^{2} \leq 5 \cdot 10^{+136}:\\
\;\;\;\;\frac{\sqrt{\left(\left(A + \left(C - \mathsf{hypot}\left(B\_m, A - C\right)\right)\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(B\_m \cdot B\_m + \left(A \cdot C\right) \cdot -4\right)}}{\left(A \cdot C\right) \cdot 4 - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt{B\_m} \cdot \frac{-1}{B\_m}\right) \cdot \sqrt{0 - 2 \cdot F}\\
\end{array}
\end{array}
if (pow.f64 B #s(literal 2 binary64)) < 5.0000000000000002e136Initial program 25.1%
Simplified35.9%
if 5.0000000000000002e136 < (pow.f64 B #s(literal 2 binary64)) Initial program 10.8%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6421.4%
Simplified21.4%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f6419.2%
Simplified19.2%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f6419.2%
Applied egg-rr19.2%
*-commutativeN/A
distribute-rgt-neg-outN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
sqrt-unprodN/A
associate-*l*N/A
*-commutativeN/A
associate-/r/N/A
associate-*l*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f6434.7%
Applied egg-rr34.7%
Final simplification35.4%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= (pow B_m 2.0) 1e-53)
(/
(sqrt (* (* (+ A (- C (hypot B_m (- A C)))) (* 2.0 F)) (* (* A C) -4.0)))
(- (* (* A C) 4.0) (* B_m B_m)))
(* (* (sqrt B_m) (/ -1.0 B_m)) (sqrt (- 0.0 (* 2.0 F))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (pow(B_m, 2.0) <= 1e-53) {
tmp = sqrt((((A + (C - hypot(B_m, (A - C)))) * (2.0 * F)) * ((A * C) * -4.0))) / (((A * C) * 4.0) - (B_m * B_m));
} else {
tmp = (sqrt(B_m) * (-1.0 / B_m)) * sqrt((0.0 - (2.0 * F)));
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (Math.pow(B_m, 2.0) <= 1e-53) {
tmp = Math.sqrt((((A + (C - Math.hypot(B_m, (A - C)))) * (2.0 * F)) * ((A * C) * -4.0))) / (((A * C) * 4.0) - (B_m * B_m));
} else {
tmp = (Math.sqrt(B_m) * (-1.0 / B_m)) * Math.sqrt((0.0 - (2.0 * F)));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if math.pow(B_m, 2.0) <= 1e-53: tmp = math.sqrt((((A + (C - math.hypot(B_m, (A - C)))) * (2.0 * F)) * ((A * C) * -4.0))) / (((A * C) * 4.0) - (B_m * B_m)) else: tmp = (math.sqrt(B_m) * (-1.0 / B_m)) * math.sqrt((0.0 - (2.0 * F))) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if ((B_m ^ 2.0) <= 1e-53) tmp = Float64(sqrt(Float64(Float64(Float64(A + Float64(C - hypot(B_m, Float64(A - C)))) * Float64(2.0 * F)) * Float64(Float64(A * C) * -4.0))) / Float64(Float64(Float64(A * C) * 4.0) - Float64(B_m * B_m))); else tmp = Float64(Float64(sqrt(B_m) * Float64(-1.0 / B_m)) * sqrt(Float64(0.0 - Float64(2.0 * F)))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if ((B_m ^ 2.0) <= 1e-53) tmp = sqrt((((A + (C - hypot(B_m, (A - C)))) * (2.0 * F)) * ((A * C) * -4.0))) / (((A * C) * 4.0) - (B_m * B_m)); else tmp = (sqrt(B_m) * (-1.0 / B_m)) * sqrt((0.0 - (2.0 * F))); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[N[Power[B$95$m, 2.0], $MachinePrecision], 1e-53], N[(N[Sqrt[N[(N[(N[(A + N[(C - N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision] * N[(N[(A * C), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[B$95$m], $MachinePrecision] * N[(-1.0 / B$95$m), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(0.0 - N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;{B\_m}^{2} \leq 10^{-53}:\\
\;\;\;\;\frac{\sqrt{\left(\left(A + \left(C - \mathsf{hypot}\left(B\_m, A - C\right)\right)\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A \cdot C\right) \cdot -4\right)}}{\left(A \cdot C\right) \cdot 4 - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt{B\_m} \cdot \frac{-1}{B\_m}\right) \cdot \sqrt{0 - 2 \cdot F}\\
\end{array}
\end{array}
if (pow.f64 B #s(literal 2 binary64)) < 1.00000000000000003e-53Initial program 20.9%
Simplified32.3%
Taylor expanded in B around 0
*-lowering-*.f64N/A
*-lowering-*.f6429.6%
Simplified29.6%
if 1.00000000000000003e-53 < (pow.f64 B #s(literal 2 binary64)) Initial program 17.6%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6420.8%
Simplified20.8%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f6418.3%
Simplified18.3%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f6418.3%
Applied egg-rr18.3%
*-commutativeN/A
distribute-rgt-neg-outN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
sqrt-unprodN/A
associate-*l*N/A
*-commutativeN/A
associate-/r/N/A
associate-*l*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f6430.7%
Applied egg-rr30.7%
Final simplification30.2%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= (pow B_m 2.0) 1e-53)
(/
(sqrt (* (* (+ A (- C (hypot B_m (- A C)))) (* 2.0 F)) (* (* A C) -4.0)))
(* (* A C) 4.0))
(* (* (sqrt B_m) (/ -1.0 B_m)) (sqrt (- 0.0 (* 2.0 F))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (pow(B_m, 2.0) <= 1e-53) {
tmp = sqrt((((A + (C - hypot(B_m, (A - C)))) * (2.0 * F)) * ((A * C) * -4.0))) / ((A * C) * 4.0);
} else {
tmp = (sqrt(B_m) * (-1.0 / B_m)) * sqrt((0.0 - (2.0 * F)));
}
return tmp;
}
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (Math.pow(B_m, 2.0) <= 1e-53) {
tmp = Math.sqrt((((A + (C - Math.hypot(B_m, (A - C)))) * (2.0 * F)) * ((A * C) * -4.0))) / ((A * C) * 4.0);
} else {
tmp = (Math.sqrt(B_m) * (-1.0 / B_m)) * Math.sqrt((0.0 - (2.0 * F)));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if math.pow(B_m, 2.0) <= 1e-53: tmp = math.sqrt((((A + (C - math.hypot(B_m, (A - C)))) * (2.0 * F)) * ((A * C) * -4.0))) / ((A * C) * 4.0) else: tmp = (math.sqrt(B_m) * (-1.0 / B_m)) * math.sqrt((0.0 - (2.0 * F))) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if ((B_m ^ 2.0) <= 1e-53) tmp = Float64(sqrt(Float64(Float64(Float64(A + Float64(C - hypot(B_m, Float64(A - C)))) * Float64(2.0 * F)) * Float64(Float64(A * C) * -4.0))) / Float64(Float64(A * C) * 4.0)); else tmp = Float64(Float64(sqrt(B_m) * Float64(-1.0 / B_m)) * sqrt(Float64(0.0 - Float64(2.0 * F)))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if ((B_m ^ 2.0) <= 1e-53) tmp = sqrt((((A + (C - hypot(B_m, (A - C)))) * (2.0 * F)) * ((A * C) * -4.0))) / ((A * C) * 4.0); else tmp = (sqrt(B_m) * (-1.0 / B_m)) * sqrt((0.0 - (2.0 * F))); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[N[Power[B$95$m, 2.0], $MachinePrecision], 1e-53], N[(N[Sqrt[N[(N[(N[(A + N[(C - N[Sqrt[B$95$m ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision] * N[(N[(A * C), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[B$95$m], $MachinePrecision] * N[(-1.0 / B$95$m), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(0.0 - N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;{B\_m}^{2} \leq 10^{-53}:\\
\;\;\;\;\frac{\sqrt{\left(\left(A + \left(C - \mathsf{hypot}\left(B\_m, A - C\right)\right)\right) \cdot \left(2 \cdot F\right)\right) \cdot \left(\left(A \cdot C\right) \cdot -4\right)}}{\left(A \cdot C\right) \cdot 4}\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt{B\_m} \cdot \frac{-1}{B\_m}\right) \cdot \sqrt{0 - 2 \cdot F}\\
\end{array}
\end{array}
if (pow.f64 B #s(literal 2 binary64)) < 1.00000000000000003e-53Initial program 20.9%
Simplified32.3%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-lowering-*.f6429.4%
Simplified29.4%
Taylor expanded in B around 0
*-lowering-*.f64N/A
*-lowering-*.f6429.4%
Simplified29.4%
if 1.00000000000000003e-53 < (pow.f64 B #s(literal 2 binary64)) Initial program 17.6%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6420.8%
Simplified20.8%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f6418.3%
Simplified18.3%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f6418.3%
Applied egg-rr18.3%
*-commutativeN/A
distribute-rgt-neg-outN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
sqrt-unprodN/A
associate-*l*N/A
*-commutativeN/A
associate-/r/N/A
associate-*l*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f6430.7%
Applied egg-rr30.7%
Final simplification30.1%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= (pow B_m 2.0) 5e-59)
(/
(sqrt
(*
C
(+
(* -8.0 (* (+ A A) (* A F)))
(/
(* 2.0 (* F (+ (* 2.0 (* (* B_m B_m) A)) (* (* B_m B_m) (+ A A)))))
C))))
(- (* (* A C) 4.0) (* B_m B_m)))
(* (* (sqrt B_m) (/ -1.0 B_m)) (sqrt (- 0.0 (* 2.0 F))))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (pow(B_m, 2.0) <= 5e-59) {
tmp = sqrt((C * ((-8.0 * ((A + A) * (A * F))) + ((2.0 * (F * ((2.0 * ((B_m * B_m) * A)) + ((B_m * B_m) * (A + A))))) / C)))) / (((A * C) * 4.0) - (B_m * B_m));
} else {
tmp = (sqrt(B_m) * (-1.0 / B_m)) * sqrt((0.0 - (2.0 * F)));
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if ((b_m ** 2.0d0) <= 5d-59) then
tmp = sqrt((c * (((-8.0d0) * ((a + a) * (a * f))) + ((2.0d0 * (f * ((2.0d0 * ((b_m * b_m) * a)) + ((b_m * b_m) * (a + a))))) / c)))) / (((a * c) * 4.0d0) - (b_m * b_m))
else
tmp = (sqrt(b_m) * ((-1.0d0) / b_m)) * sqrt((0.0d0 - (2.0d0 * f)))
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (Math.pow(B_m, 2.0) <= 5e-59) {
tmp = Math.sqrt((C * ((-8.0 * ((A + A) * (A * F))) + ((2.0 * (F * ((2.0 * ((B_m * B_m) * A)) + ((B_m * B_m) * (A + A))))) / C)))) / (((A * C) * 4.0) - (B_m * B_m));
} else {
tmp = (Math.sqrt(B_m) * (-1.0 / B_m)) * Math.sqrt((0.0 - (2.0 * F)));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if math.pow(B_m, 2.0) <= 5e-59: tmp = math.sqrt((C * ((-8.0 * ((A + A) * (A * F))) + ((2.0 * (F * ((2.0 * ((B_m * B_m) * A)) + ((B_m * B_m) * (A + A))))) / C)))) / (((A * C) * 4.0) - (B_m * B_m)) else: tmp = (math.sqrt(B_m) * (-1.0 / B_m)) * math.sqrt((0.0 - (2.0 * F))) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if ((B_m ^ 2.0) <= 5e-59) tmp = Float64(sqrt(Float64(C * Float64(Float64(-8.0 * Float64(Float64(A + A) * Float64(A * F))) + Float64(Float64(2.0 * Float64(F * Float64(Float64(2.0 * Float64(Float64(B_m * B_m) * A)) + Float64(Float64(B_m * B_m) * Float64(A + A))))) / C)))) / Float64(Float64(Float64(A * C) * 4.0) - Float64(B_m * B_m))); else tmp = Float64(Float64(sqrt(B_m) * Float64(-1.0 / B_m)) * sqrt(Float64(0.0 - Float64(2.0 * F)))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if ((B_m ^ 2.0) <= 5e-59) tmp = sqrt((C * ((-8.0 * ((A + A) * (A * F))) + ((2.0 * (F * ((2.0 * ((B_m * B_m) * A)) + ((B_m * B_m) * (A + A))))) / C)))) / (((A * C) * 4.0) - (B_m * B_m)); else tmp = (sqrt(B_m) * (-1.0 / B_m)) * sqrt((0.0 - (2.0 * F))); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[N[Power[B$95$m, 2.0], $MachinePrecision], 5e-59], N[(N[Sqrt[N[(C * N[(N[(-8.0 * N[(N[(A + A), $MachinePrecision] * N[(A * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(F * N[(N[(2.0 * N[(N[(B$95$m * B$95$m), $MachinePrecision] * A), $MachinePrecision]), $MachinePrecision] + N[(N[(B$95$m * B$95$m), $MachinePrecision] * N[(A + A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[B$95$m], $MachinePrecision] * N[(-1.0 / B$95$m), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(0.0 - N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;{B\_m}^{2} \leq 5 \cdot 10^{-59}:\\
\;\;\;\;\frac{\sqrt{C \cdot \left(-8 \cdot \left(\left(A + A\right) \cdot \left(A \cdot F\right)\right) + \frac{2 \cdot \left(F \cdot \left(2 \cdot \left(\left(B\_m \cdot B\_m\right) \cdot A\right) + \left(B\_m \cdot B\_m\right) \cdot \left(A + A\right)\right)\right)}{C}\right)}}{\left(A \cdot C\right) \cdot 4 - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt{B\_m} \cdot \frac{-1}{B\_m}\right) \cdot \sqrt{0 - 2 \cdot F}\\
\end{array}
\end{array}
if (pow.f64 B #s(literal 2 binary64)) < 5.0000000000000001e-59Initial program 21.1%
Simplified31.7%
Taylor expanded in C around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
+-lowering-+.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
Simplified26.9%
if 5.0000000000000001e-59 < (pow.f64 B #s(literal 2 binary64)) Initial program 17.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.f6420.7%
Simplified20.7%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f6418.2%
Simplified18.2%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f6418.2%
Applied egg-rr18.2%
*-commutativeN/A
distribute-rgt-neg-outN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
sqrt-unprodN/A
associate-*l*N/A
*-commutativeN/A
associate-/r/N/A
associate-*l*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f6430.5%
Applied egg-rr30.5%
Final simplification28.9%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 1.36e-28)
(/
(sqrt
(*
C
(+
(* -8.0 (* (+ A A) (* A F)))
(/
(* 2.0 (* F (+ (* 2.0 (* (* B_m B_m) A)) (* (* B_m B_m) (+ A A)))))
C))))
(- (* (* A C) 4.0) (* B_m B_m)))
(* (sqrt B_m) (/ (sqrt (- 0.0 (* 2.0 F))) (- 0.0 B_m)))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 1.36e-28) {
tmp = sqrt((C * ((-8.0 * ((A + A) * (A * F))) + ((2.0 * (F * ((2.0 * ((B_m * B_m) * A)) + ((B_m * B_m) * (A + A))))) / C)))) / (((A * C) * 4.0) - (B_m * B_m));
} else {
tmp = sqrt(B_m) * (sqrt((0.0 - (2.0 * F))) / (0.0 - B_m));
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if (b_m <= 1.36d-28) then
tmp = sqrt((c * (((-8.0d0) * ((a + a) * (a * f))) + ((2.0d0 * (f * ((2.0d0 * ((b_m * b_m) * a)) + ((b_m * b_m) * (a + a))))) / c)))) / (((a * c) * 4.0d0) - (b_m * b_m))
else
tmp = sqrt(b_m) * (sqrt((0.0d0 - (2.0d0 * f))) / (0.0d0 - b_m))
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 1.36e-28) {
tmp = Math.sqrt((C * ((-8.0 * ((A + A) * (A * F))) + ((2.0 * (F * ((2.0 * ((B_m * B_m) * A)) + ((B_m * B_m) * (A + A))))) / C)))) / (((A * C) * 4.0) - (B_m * B_m));
} else {
tmp = Math.sqrt(B_m) * (Math.sqrt((0.0 - (2.0 * F))) / (0.0 - B_m));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 1.36e-28: tmp = math.sqrt((C * ((-8.0 * ((A + A) * (A * F))) + ((2.0 * (F * ((2.0 * ((B_m * B_m) * A)) + ((B_m * B_m) * (A + A))))) / C)))) / (((A * C) * 4.0) - (B_m * B_m)) else: tmp = math.sqrt(B_m) * (math.sqrt((0.0 - (2.0 * F))) / (0.0 - B_m)) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 1.36e-28) tmp = Float64(sqrt(Float64(C * Float64(Float64(-8.0 * Float64(Float64(A + A) * Float64(A * F))) + Float64(Float64(2.0 * Float64(F * Float64(Float64(2.0 * Float64(Float64(B_m * B_m) * A)) + Float64(Float64(B_m * B_m) * Float64(A + A))))) / C)))) / Float64(Float64(Float64(A * C) * 4.0) - Float64(B_m * B_m))); else tmp = Float64(sqrt(B_m) * Float64(sqrt(Float64(0.0 - Float64(2.0 * F))) / Float64(0.0 - B_m))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 1.36e-28) tmp = sqrt((C * ((-8.0 * ((A + A) * (A * F))) + ((2.0 * (F * ((2.0 * ((B_m * B_m) * A)) + ((B_m * B_m) * (A + A))))) / C)))) / (((A * C) * 4.0) - (B_m * B_m)); else tmp = sqrt(B_m) * (sqrt((0.0 - (2.0 * F))) / (0.0 - B_m)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 1.36e-28], N[(N[Sqrt[N[(C * N[(N[(-8.0 * N[(N[(A + A), $MachinePrecision] * N[(A * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(F * N[(N[(2.0 * N[(N[(B$95$m * B$95$m), $MachinePrecision] * A), $MachinePrecision]), $MachinePrecision] + N[(N[(B$95$m * B$95$m), $MachinePrecision] * N[(A + A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[B$95$m], $MachinePrecision] * N[(N[Sqrt[N[(0.0 - N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 1.36 \cdot 10^{-28}:\\
\;\;\;\;\frac{\sqrt{C \cdot \left(-8 \cdot \left(\left(A + A\right) \cdot \left(A \cdot F\right)\right) + \frac{2 \cdot \left(F \cdot \left(2 \cdot \left(\left(B\_m \cdot B\_m\right) \cdot A\right) + \left(B\_m \cdot B\_m\right) \cdot \left(A + A\right)\right)\right)}{C}\right)}}{\left(A \cdot C\right) \cdot 4 - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{B\_m} \cdot \frac{\sqrt{0 - 2 \cdot F}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 1.35999999999999989e-28Initial program 20.5%
Simplified27.5%
Taylor expanded in C around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
+-lowering-+.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
Simplified17.0%
if 1.35999999999999989e-28 < B Initial program 15.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.f6438.3%
Simplified38.3%
Taylor expanded in C around 0
mul-1-negN/A
neg-lowering-neg.f6435.2%
Simplified35.2%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f6435.2%
Applied egg-rr35.2%
div-invN/A
clear-numN/A
associate-*l*N/A
distribute-rgt-neg-outN/A
distribute-lft-neg-inN/A
sqrt-unprodN/A
mul-1-negN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f64N/A
neg-lowering-neg.f64N/A
Applied egg-rr54.1%
Final simplification27.7%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 9.5e-30)
(/
(sqrt
(*
C
(+
(* -8.0 (* (+ A A) (* A F)))
(/
(* 2.0 (* F (+ (* 2.0 (* (* B_m B_m) A)) (* (* B_m B_m) (+ A A)))))
C))))
(- (* (* A C) 4.0) (* B_m B_m)))
(/ (pow (* -2.0 (* B_m F)) 0.5) (- 0.0 B_m))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 9.5e-30) {
tmp = sqrt((C * ((-8.0 * ((A + A) * (A * F))) + ((2.0 * (F * ((2.0 * ((B_m * B_m) * A)) + ((B_m * B_m) * (A + A))))) / C)))) / (((A * C) * 4.0) - (B_m * B_m));
} else {
tmp = pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if (b_m <= 9.5d-30) then
tmp = sqrt((c * (((-8.0d0) * ((a + a) * (a * f))) + ((2.0d0 * (f * ((2.0d0 * ((b_m * b_m) * a)) + ((b_m * b_m) * (a + a))))) / c)))) / (((a * c) * 4.0d0) - (b_m * b_m))
else
tmp = (((-2.0d0) * (b_m * f)) ** 0.5d0) / (0.0d0 - b_m)
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 9.5e-30) {
tmp = Math.sqrt((C * ((-8.0 * ((A + A) * (A * F))) + ((2.0 * (F * ((2.0 * ((B_m * B_m) * A)) + ((B_m * B_m) * (A + A))))) / C)))) / (((A * C) * 4.0) - (B_m * B_m));
} else {
tmp = Math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 9.5e-30: tmp = math.sqrt((C * ((-8.0 * ((A + A) * (A * F))) + ((2.0 * (F * ((2.0 * ((B_m * B_m) * A)) + ((B_m * B_m) * (A + A))))) / C)))) / (((A * C) * 4.0) - (B_m * B_m)) else: tmp = math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 9.5e-30) tmp = Float64(sqrt(Float64(C * Float64(Float64(-8.0 * Float64(Float64(A + A) * Float64(A * F))) + Float64(Float64(2.0 * Float64(F * Float64(Float64(2.0 * Float64(Float64(B_m * B_m) * A)) + Float64(Float64(B_m * B_m) * Float64(A + A))))) / C)))) / Float64(Float64(Float64(A * C) * 4.0) - Float64(B_m * B_m))); else tmp = Float64((Float64(-2.0 * Float64(B_m * F)) ^ 0.5) / Float64(0.0 - B_m)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 9.5e-30) tmp = sqrt((C * ((-8.0 * ((A + A) * (A * F))) + ((2.0 * (F * ((2.0 * ((B_m * B_m) * A)) + ((B_m * B_m) * (A + A))))) / C)))) / (((A * C) * 4.0) - (B_m * B_m)); else tmp = ((-2.0 * (B_m * F)) ^ 0.5) / (0.0 - B_m); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 9.5e-30], N[(N[Sqrt[N[(C * N[(N[(-8.0 * N[(N[(A + A), $MachinePrecision] * N[(A * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(F * N[(N[(2.0 * N[(N[(B$95$m * B$95$m), $MachinePrecision] * A), $MachinePrecision]), $MachinePrecision] + N[(N[(B$95$m * B$95$m), $MachinePrecision] * N[(A + A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(-2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 9.5 \cdot 10^{-30}:\\
\;\;\;\;\frac{\sqrt{C \cdot \left(-8 \cdot \left(\left(A + A\right) \cdot \left(A \cdot F\right)\right) + \frac{2 \cdot \left(F \cdot \left(2 \cdot \left(\left(B\_m \cdot B\_m\right) \cdot A\right) + \left(B\_m \cdot B\_m\right) \cdot \left(A + A\right)\right)\right)}{C}\right)}}{\left(A \cdot C\right) \cdot 4 - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(-2 \cdot \left(B\_m \cdot F\right)\right)}^{0.5}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 9.49999999999999939e-30Initial program 20.5%
Simplified27.5%
Taylor expanded in C around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
+-lowering-+.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
Simplified17.0%
if 9.49999999999999939e-30 < B Initial program 15.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.f6438.3%
Simplified38.3%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr38.3%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6435.3%
Simplified35.3%
Final simplification22.3%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 5.5e-30)
(/
(sqrt
(*
C
(+
(* (* A -8.0) (* F (+ A A)))
(*
2.0
(/ (* F (+ (* 2.0 (* (* B_m B_m) A)) (* (* B_m B_m) (+ A A)))) C)))))
(* (* A C) 4.0))
(/ (pow (* -2.0 (* B_m F)) 0.5) (- 0.0 B_m))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 5.5e-30) {
tmp = sqrt((C * (((A * -8.0) * (F * (A + A))) + (2.0 * ((F * ((2.0 * ((B_m * B_m) * A)) + ((B_m * B_m) * (A + A)))) / C))))) / ((A * C) * 4.0);
} else {
tmp = pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if (b_m <= 5.5d-30) then
tmp = sqrt((c * (((a * (-8.0d0)) * (f * (a + a))) + (2.0d0 * ((f * ((2.0d0 * ((b_m * b_m) * a)) + ((b_m * b_m) * (a + a)))) / c))))) / ((a * c) * 4.0d0)
else
tmp = (((-2.0d0) * (b_m * f)) ** 0.5d0) / (0.0d0 - b_m)
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 5.5e-30) {
tmp = Math.sqrt((C * (((A * -8.0) * (F * (A + A))) + (2.0 * ((F * ((2.0 * ((B_m * B_m) * A)) + ((B_m * B_m) * (A + A)))) / C))))) / ((A * C) * 4.0);
} else {
tmp = Math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 5.5e-30: tmp = math.sqrt((C * (((A * -8.0) * (F * (A + A))) + (2.0 * ((F * ((2.0 * ((B_m * B_m) * A)) + ((B_m * B_m) * (A + A)))) / C))))) / ((A * C) * 4.0) else: tmp = math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 5.5e-30) tmp = Float64(sqrt(Float64(C * Float64(Float64(Float64(A * -8.0) * Float64(F * Float64(A + A))) + Float64(2.0 * Float64(Float64(F * Float64(Float64(2.0 * Float64(Float64(B_m * B_m) * A)) + Float64(Float64(B_m * B_m) * Float64(A + A)))) / C))))) / Float64(Float64(A * C) * 4.0)); else tmp = Float64((Float64(-2.0 * Float64(B_m * F)) ^ 0.5) / Float64(0.0 - B_m)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 5.5e-30) tmp = sqrt((C * (((A * -8.0) * (F * (A + A))) + (2.0 * ((F * ((2.0 * ((B_m * B_m) * A)) + ((B_m * B_m) * (A + A)))) / C))))) / ((A * C) * 4.0); else tmp = ((-2.0 * (B_m * F)) ^ 0.5) / (0.0 - B_m); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 5.5e-30], N[(N[Sqrt[N[(C * N[(N[(N[(A * -8.0), $MachinePrecision] * N[(F * N[(A + A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(F * N[(N[(2.0 * N[(N[(B$95$m * B$95$m), $MachinePrecision] * A), $MachinePrecision]), $MachinePrecision] + N[(N[(B$95$m * B$95$m), $MachinePrecision] * N[(A + A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(-2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 5.5 \cdot 10^{-30}:\\
\;\;\;\;\frac{\sqrt{C \cdot \left(\left(A \cdot -8\right) \cdot \left(F \cdot \left(A + A\right)\right) + 2 \cdot \frac{F \cdot \left(2 \cdot \left(\left(B\_m \cdot B\_m\right) \cdot A\right) + \left(B\_m \cdot B\_m\right) \cdot \left(A + A\right)\right)}{C}\right)}}{\left(A \cdot C\right) \cdot 4}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(-2 \cdot \left(B\_m \cdot F\right)\right)}^{0.5}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 5.49999999999999976e-30Initial program 20.5%
Simplified27.5%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-lowering-*.f6419.1%
Simplified19.1%
Taylor expanded in C around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified16.9%
if 5.49999999999999976e-30 < B Initial program 15.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.f6438.3%
Simplified38.3%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr38.3%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6435.3%
Simplified35.3%
Final simplification22.2%
B_m = (fabs.f64 B)
(FPCore (A B_m C F)
:precision binary64
(if (<= B_m 5.7e-30)
(/
(sqrt (* (* A -8.0) (* (+ A A) (* C F))))
(- (* (* A C) 4.0) (* B_m B_m)))
(/ (pow (* -2.0 (* B_m F)) 0.5) (- 0.0 B_m))))B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 5.7e-30) {
tmp = sqrt(((A * -8.0) * ((A + A) * (C * F)))) / (((A * C) * 4.0) - (B_m * B_m));
} else {
tmp = pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if (b_m <= 5.7d-30) then
tmp = sqrt(((a * (-8.0d0)) * ((a + a) * (c * f)))) / (((a * c) * 4.0d0) - (b_m * b_m))
else
tmp = (((-2.0d0) * (b_m * f)) ** 0.5d0) / (0.0d0 - b_m)
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 5.7e-30) {
tmp = Math.sqrt(((A * -8.0) * ((A + A) * (C * F)))) / (((A * C) * 4.0) - (B_m * B_m));
} else {
tmp = Math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 5.7e-30: tmp = math.sqrt(((A * -8.0) * ((A + A) * (C * F)))) / (((A * C) * 4.0) - (B_m * B_m)) else: tmp = math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 5.7e-30) tmp = Float64(sqrt(Float64(Float64(A * -8.0) * Float64(Float64(A + A) * Float64(C * F)))) / Float64(Float64(Float64(A * C) * 4.0) - Float64(B_m * B_m))); else tmp = Float64((Float64(-2.0 * Float64(B_m * F)) ^ 0.5) / Float64(0.0 - B_m)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 5.7e-30) tmp = sqrt(((A * -8.0) * ((A + A) * (C * F)))) / (((A * C) * 4.0) - (B_m * B_m)); else tmp = ((-2.0 * (B_m * F)) ^ 0.5) / (0.0 - B_m); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 5.7e-30], N[(N[Sqrt[N[(N[(A * -8.0), $MachinePrecision] * N[(N[(A + A), $MachinePrecision] * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision] - N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(-2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 5.7 \cdot 10^{-30}:\\
\;\;\;\;\frac{\sqrt{\left(A \cdot -8\right) \cdot \left(\left(A + A\right) \cdot \left(C \cdot F\right)\right)}}{\left(A \cdot C\right) \cdot 4 - B\_m \cdot B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(-2 \cdot \left(B\_m \cdot F\right)\right)}^{0.5}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 5.69999999999999977e-30Initial program 20.5%
Simplified27.5%
Taylor expanded in C around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
+-lowering-+.f64N/A
metadata-evalN/A
*-lowering-*.f6415.5%
Simplified15.5%
if 5.69999999999999977e-30 < B Initial program 15.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.f6438.3%
Simplified38.3%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr38.3%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6435.3%
Simplified35.3%
Final simplification21.2%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= B_m 5.5e-29) (/ (sqrt (* (* A -8.0) (* (+ A A) (* C F)))) (* (* A C) 4.0)) (/ (pow (* -2.0 (* B_m F)) 0.5) (- 0.0 B_m))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 5.5e-29) {
tmp = sqrt(((A * -8.0) * ((A + A) * (C * F)))) / ((A * C) * 4.0);
} else {
tmp = pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if (b_m <= 5.5d-29) then
tmp = sqrt(((a * (-8.0d0)) * ((a + a) * (c * f)))) / ((a * c) * 4.0d0)
else
tmp = (((-2.0d0) * (b_m * f)) ** 0.5d0) / (0.0d0 - b_m)
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 5.5e-29) {
tmp = Math.sqrt(((A * -8.0) * ((A + A) * (C * F)))) / ((A * C) * 4.0);
} else {
tmp = Math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 5.5e-29: tmp = math.sqrt(((A * -8.0) * ((A + A) * (C * F)))) / ((A * C) * 4.0) else: tmp = math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 5.5e-29) tmp = Float64(sqrt(Float64(Float64(A * -8.0) * Float64(Float64(A + A) * Float64(C * F)))) / Float64(Float64(A * C) * 4.0)); else tmp = Float64((Float64(-2.0 * Float64(B_m * F)) ^ 0.5) / Float64(0.0 - B_m)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 5.5e-29) tmp = sqrt(((A * -8.0) * ((A + A) * (C * F)))) / ((A * C) * 4.0); else tmp = ((-2.0 * (B_m * F)) ^ 0.5) / (0.0 - B_m); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 5.5e-29], N[(N[Sqrt[N[(N[(A * -8.0), $MachinePrecision] * N[(N[(A + A), $MachinePrecision] * N[(C * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(-2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 5.5 \cdot 10^{-29}:\\
\;\;\;\;\frac{\sqrt{\left(A \cdot -8\right) \cdot \left(\left(A + A\right) \cdot \left(C \cdot F\right)\right)}}{\left(A \cdot C\right) \cdot 4}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(-2 \cdot \left(B\_m \cdot F\right)\right)}^{0.5}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 5.4999999999999999e-29Initial program 20.5%
Simplified27.5%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-lowering-*.f6419.1%
Simplified19.1%
Taylor expanded in C around inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f6415.9%
Simplified15.9%
if 5.4999999999999999e-29 < B Initial program 15.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.f6438.3%
Simplified38.3%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr38.3%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6435.3%
Simplified35.3%
Final simplification21.5%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= B_m 1.3e-31) (/ (sqrt (* (* C F) (* -16.0 (* A A)))) (* (* A C) 4.0)) (/ (pow (* -2.0 (* B_m F)) 0.5) (- 0.0 B_m))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 1.3e-31) {
tmp = sqrt(((C * F) * (-16.0 * (A * A)))) / ((A * C) * 4.0);
} else {
tmp = pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if (b_m <= 1.3d-31) then
tmp = sqrt(((c * f) * ((-16.0d0) * (a * a)))) / ((a * c) * 4.0d0)
else
tmp = (((-2.0d0) * (b_m * f)) ** 0.5d0) / (0.0d0 - b_m)
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 1.3e-31) {
tmp = Math.sqrt(((C * F) * (-16.0 * (A * A)))) / ((A * C) * 4.0);
} else {
tmp = Math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 1.3e-31: tmp = math.sqrt(((C * F) * (-16.0 * (A * A)))) / ((A * C) * 4.0) else: tmp = math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 1.3e-31) tmp = Float64(sqrt(Float64(Float64(C * F) * Float64(-16.0 * Float64(A * A)))) / Float64(Float64(A * C) * 4.0)); else tmp = Float64((Float64(-2.0 * Float64(B_m * F)) ^ 0.5) / Float64(0.0 - B_m)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 1.3e-31) tmp = sqrt(((C * F) * (-16.0 * (A * A)))) / ((A * C) * 4.0); else tmp = ((-2.0 * (B_m * F)) ^ 0.5) / (0.0 - B_m); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 1.3e-31], N[(N[Sqrt[N[(N[(C * F), $MachinePrecision] * N[(-16.0 * N[(A * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(-2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 1.3 \cdot 10^{-31}:\\
\;\;\;\;\frac{\sqrt{\left(C \cdot F\right) \cdot \left(-16 \cdot \left(A \cdot A\right)\right)}}{\left(A \cdot C\right) \cdot 4}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(-2 \cdot \left(B\_m \cdot F\right)\right)}^{0.5}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 1.29999999999999998e-31Initial program 20.5%
Simplified27.1%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-lowering-*.f6418.7%
Simplified18.7%
Taylor expanded in A around -inf
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6413.4%
Simplified13.4%
if 1.29999999999999998e-31 < B Initial program 15.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.f6437.8%
Simplified37.8%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr37.9%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6434.9%
Simplified34.9%
Final simplification19.7%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= B_m 3.8e-32) (/ (sqrt (* -16.0 (* A (* F (* C C))))) (* (* A C) 4.0)) (/ (pow (* -2.0 (* B_m F)) 0.5) (- 0.0 B_m))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 3.8e-32) {
tmp = sqrt((-16.0 * (A * (F * (C * C))))) / ((A * C) * 4.0);
} else {
tmp = pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if (b_m <= 3.8d-32) then
tmp = sqrt(((-16.0d0) * (a * (f * (c * c))))) / ((a * c) * 4.0d0)
else
tmp = (((-2.0d0) * (b_m * f)) ** 0.5d0) / (0.0d0 - b_m)
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (B_m <= 3.8e-32) {
tmp = Math.sqrt((-16.0 * (A * (F * (C * C))))) / ((A * C) * 4.0);
} else {
tmp = Math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if B_m <= 3.8e-32: tmp = math.sqrt((-16.0 * (A * (F * (C * C))))) / ((A * C) * 4.0) else: tmp = math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (B_m <= 3.8e-32) tmp = Float64(sqrt(Float64(-16.0 * Float64(A * Float64(F * Float64(C * C))))) / Float64(Float64(A * C) * 4.0)); else tmp = Float64((Float64(-2.0 * Float64(B_m * F)) ^ 0.5) / Float64(0.0 - B_m)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (B_m <= 3.8e-32) tmp = sqrt((-16.0 * (A * (F * (C * C))))) / ((A * C) * 4.0); else tmp = ((-2.0 * (B_m * F)) ^ 0.5) / (0.0 - B_m); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[B$95$m, 3.8e-32], N[(N[Sqrt[N[(-16.0 * N[(A * N[(F * N[(C * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(A * C), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(-2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;B\_m \leq 3.8 \cdot 10^{-32}:\\
\;\;\;\;\frac{\sqrt{-16 \cdot \left(A \cdot \left(F \cdot \left(C \cdot C\right)\right)\right)}}{\left(A \cdot C\right) \cdot 4}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(-2 \cdot \left(B\_m \cdot F\right)\right)}^{0.5}}{0 - B\_m}\\
\end{array}
\end{array}
if B < 3.80000000000000008e-32Initial program 20.5%
Simplified27.1%
Taylor expanded in A around inf
*-lowering-*.f64N/A
*-lowering-*.f6418.7%
Simplified18.7%
Taylor expanded in B around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6412.3%
Simplified12.3%
if 3.80000000000000008e-32 < B Initial program 15.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.f6437.8%
Simplified37.8%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr37.9%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6434.9%
Simplified34.9%
Final simplification19.0%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= A -7.2e+125) (/ (pow (/ (* (* B_m B_m) F) (- 0.0 C)) 0.5) (- 0.0 B_m)) (/ (pow (* -2.0 (* B_m F)) 0.5) (- 0.0 B_m))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (A <= -7.2e+125) {
tmp = pow((((B_m * B_m) * F) / (0.0 - C)), 0.5) / (0.0 - B_m);
} else {
tmp = pow((-2.0 * (B_m * F)), 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 (a <= (-7.2d+125)) then
tmp = ((((b_m * b_m) * f) / (0.0d0 - c)) ** 0.5d0) / (0.0d0 - b_m)
else
tmp = (((-2.0d0) * (b_m * f)) ** 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 (A <= -7.2e+125) {
tmp = Math.pow((((B_m * B_m) * F) / (0.0 - C)), 0.5) / (0.0 - B_m);
} else {
tmp = Math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if A <= -7.2e+125: tmp = math.pow((((B_m * B_m) * F) / (0.0 - C)), 0.5) / (0.0 - B_m) else: tmp = math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (A <= -7.2e+125) tmp = Float64((Float64(Float64(Float64(B_m * B_m) * F) / Float64(0.0 - C)) ^ 0.5) / Float64(0.0 - B_m)); else tmp = Float64((Float64(-2.0 * Float64(B_m * F)) ^ 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 (A <= -7.2e+125) tmp = ((((B_m * B_m) * F) / (0.0 - C)) ^ 0.5) / (0.0 - B_m); else tmp = ((-2.0 * (B_m * F)) ^ 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[A, -7.2e+125], N[(N[Power[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] * F), $MachinePrecision] / N[(0.0 - C), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(-2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;A \leq -7.2 \cdot 10^{+125}:\\
\;\;\;\;\frac{{\left(\frac{\left(B\_m \cdot B\_m\right) \cdot F}{0 - C}\right)}^{0.5}}{0 - B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(-2 \cdot \left(B\_m \cdot F\right)\right)}^{0.5}}{0 - B\_m}\\
\end{array}
\end{array}
if A < -7.2000000000000007e125Initial program 7.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.f642.3%
Simplified2.3%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr2.4%
Taylor expanded in C around inf
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6423.4%
Simplified23.4%
if -7.2000000000000007e125 < A Initial program 20.8%
Taylor expanded in A around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6416.0%
Simplified16.0%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr16.0%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6413.7%
Simplified13.7%
Final simplification14.9%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= C -2.2e-194) (/ (* -2.0 (pow (* C F) 0.5)) B_m) (* (pow (* A F) 0.5) (/ -2.0 B_m))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (C <= -2.2e-194) {
tmp = (-2.0 * pow((C * F), 0.5)) / B_m;
} else {
tmp = pow((A * F), 0.5) * (-2.0 / B_m);
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if (c <= (-2.2d-194)) then
tmp = ((-2.0d0) * ((c * f) ** 0.5d0)) / b_m
else
tmp = ((a * f) ** 0.5d0) * ((-2.0d0) / b_m)
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (C <= -2.2e-194) {
tmp = (-2.0 * Math.pow((C * F), 0.5)) / B_m;
} else {
tmp = Math.pow((A * F), 0.5) * (-2.0 / B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if C <= -2.2e-194: tmp = (-2.0 * math.pow((C * F), 0.5)) / B_m else: tmp = math.pow((A * F), 0.5) * (-2.0 / B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (C <= -2.2e-194) tmp = Float64(Float64(-2.0 * (Float64(C * F) ^ 0.5)) / B_m); else tmp = Float64((Float64(A * F) ^ 0.5) * Float64(-2.0 / B_m)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (C <= -2.2e-194) tmp = (-2.0 * ((C * F) ^ 0.5)) / B_m; else tmp = ((A * F) ^ 0.5) * (-2.0 / B_m); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[C, -2.2e-194], N[(N[(-2.0 * N[Power[N[(C * F), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] / B$95$m), $MachinePrecision], N[(N[Power[N[(A * F), $MachinePrecision], 0.5], $MachinePrecision] * N[(-2.0 / B$95$m), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;C \leq -2.2 \cdot 10^{-194}:\\
\;\;\;\;\frac{-2 \cdot {\left(C \cdot F\right)}^{0.5}}{B\_m}\\
\mathbf{else}:\\
\;\;\;\;{\left(A \cdot F\right)}^{0.5} \cdot \frac{-2}{B\_m}\\
\end{array}
\end{array}
if C < -2.2000000000000001e-194Initial program 21.1%
Simplified29.9%
Taylor expanded in C around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
fma-defineN/A
mul-1-negN/A
fmm-undefN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified13.1%
Taylor expanded in A around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f646.4%
Simplified6.4%
*-commutativeN/A
*-commutativeN/A
un-div-invN/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
*-commutativeN/A
*-lowering-*.f646.5%
Applied egg-rr6.5%
if -2.2000000000000001e-194 < C Initial program 17.8%
Taylor expanded in C around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6416.5%
Simplified16.5%
Taylor expanded in A around -inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
rem-square-sqrtN/A
unpow2N/A
rem-square-sqrtN/A
metadata-evalN/A
/-lowering-/.f643.8%
Simplified3.8%
pow1/2N/A
pow-lowering-pow.f64N/A
*-lowering-*.f643.9%
Applied egg-rr3.9%
Final simplification4.9%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= C -4.6e-194) (* -2.0 (/ (sqrt (* C F)) B_m)) (* (pow (* A F) 0.5) (/ -2.0 B_m))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (C <= -4.6e-194) {
tmp = -2.0 * (sqrt((C * F)) / B_m);
} else {
tmp = pow((A * F), 0.5) * (-2.0 / B_m);
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if (c <= (-4.6d-194)) then
tmp = (-2.0d0) * (sqrt((c * f)) / b_m)
else
tmp = ((a * f) ** 0.5d0) * ((-2.0d0) / b_m)
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (C <= -4.6e-194) {
tmp = -2.0 * (Math.sqrt((C * F)) / B_m);
} else {
tmp = Math.pow((A * F), 0.5) * (-2.0 / B_m);
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if C <= -4.6e-194: tmp = -2.0 * (math.sqrt((C * F)) / B_m) else: tmp = math.pow((A * F), 0.5) * (-2.0 / B_m) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (C <= -4.6e-194) tmp = Float64(-2.0 * Float64(sqrt(Float64(C * F)) / B_m)); else tmp = Float64((Float64(A * F) ^ 0.5) * Float64(-2.0 / B_m)); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (C <= -4.6e-194) tmp = -2.0 * (sqrt((C * F)) / B_m); else tmp = ((A * F) ^ 0.5) * (-2.0 / B_m); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[C, -4.6e-194], N[(-2.0 * N[(N[Sqrt[N[(C * F), $MachinePrecision]], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(A * F), $MachinePrecision], 0.5], $MachinePrecision] * N[(-2.0 / B$95$m), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;C \leq -4.6 \cdot 10^{-194}:\\
\;\;\;\;-2 \cdot \frac{\sqrt{C \cdot F}}{B\_m}\\
\mathbf{else}:\\
\;\;\;\;{\left(A \cdot F\right)}^{0.5} \cdot \frac{-2}{B\_m}\\
\end{array}
\end{array}
if C < -4.60000000000000005e-194Initial program 21.1%
Simplified29.9%
Taylor expanded in C around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
fma-defineN/A
mul-1-negN/A
fmm-undefN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified13.1%
Taylor expanded in A around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f646.4%
Simplified6.4%
inv-powN/A
pow-to-expN/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f645.1%
Applied egg-rr5.1%
Taylor expanded in B around 0
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f646.4%
Simplified6.4%
if -4.60000000000000005e-194 < C Initial program 17.8%
Taylor expanded in C around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6416.5%
Simplified16.5%
Taylor expanded in A around -inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
rem-square-sqrtN/A
unpow2N/A
rem-square-sqrtN/A
metadata-evalN/A
/-lowering-/.f643.8%
Simplified3.8%
pow1/2N/A
pow-lowering-pow.f64N/A
*-lowering-*.f643.9%
Applied egg-rr3.9%
Final simplification4.9%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (if (<= C -1.4e-193) (* -2.0 (/ (sqrt (* C F)) B_m)) (* (/ -2.0 B_m) (sqrt (* A F)))))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
double tmp;
if (C <= -1.4e-193) {
tmp = -2.0 * (sqrt((C * F)) / B_m);
} else {
tmp = (-2.0 / B_m) * sqrt((A * F));
}
return tmp;
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
real(8) :: tmp
if (c <= (-1.4d-193)) then
tmp = (-2.0d0) * (sqrt((c * f)) / b_m)
else
tmp = ((-2.0d0) / b_m) * sqrt((a * f))
end if
code = tmp
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
double tmp;
if (C <= -1.4e-193) {
tmp = -2.0 * (Math.sqrt((C * F)) / B_m);
} else {
tmp = (-2.0 / B_m) * Math.sqrt((A * F));
}
return tmp;
}
B_m = math.fabs(B) def code(A, B_m, C, F): tmp = 0 if C <= -1.4e-193: tmp = -2.0 * (math.sqrt((C * F)) / B_m) else: tmp = (-2.0 / B_m) * math.sqrt((A * F)) return tmp
B_m = abs(B) function code(A, B_m, C, F) tmp = 0.0 if (C <= -1.4e-193) tmp = Float64(-2.0 * Float64(sqrt(Float64(C * F)) / B_m)); else tmp = Float64(Float64(-2.0 / B_m) * sqrt(Float64(A * F))); end return tmp end
B_m = abs(B); function tmp_2 = code(A, B_m, C, F) tmp = 0.0; if (C <= -1.4e-193) tmp = -2.0 * (sqrt((C * F)) / B_m); else tmp = (-2.0 / B_m) * sqrt((A * F)); end tmp_2 = tmp; end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := If[LessEqual[C, -1.4e-193], N[(-2.0 * N[(N[Sqrt[N[(C * F), $MachinePrecision]], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(-2.0 / B$95$m), $MachinePrecision] * N[Sqrt[N[(A * F), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
B_m = \left|B\right|
\\
\begin{array}{l}
\mathbf{if}\;C \leq -1.4 \cdot 10^{-193}:\\
\;\;\;\;-2 \cdot \frac{\sqrt{C \cdot F}}{B\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{-2}{B\_m} \cdot \sqrt{A \cdot F}\\
\end{array}
\end{array}
if C < -1.4000000000000001e-193Initial program 21.1%
Simplified29.9%
Taylor expanded in C around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
fma-defineN/A
mul-1-negN/A
fmm-undefN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified13.1%
Taylor expanded in A around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f646.4%
Simplified6.4%
inv-powN/A
pow-to-expN/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f645.1%
Applied egg-rr5.1%
Taylor expanded in B around 0
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f646.4%
Simplified6.4%
if -1.4000000000000001e-193 < C Initial program 17.8%
Taylor expanded in C around 0
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6416.5%
Simplified16.5%
Taylor expanded in A around -inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
rem-square-sqrtN/A
unpow2N/A
rem-square-sqrtN/A
metadata-evalN/A
/-lowering-/.f643.8%
Simplified3.8%
Final simplification4.8%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (/ (pow (* -2.0 (* B_m F)) 0.5) (- 0.0 B_m)))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
return pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
code = (((-2.0d0) * (b_m * f)) ** 0.5d0) / (0.0d0 - b_m)
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
return Math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m);
}
B_m = math.fabs(B) def code(A, B_m, C, F): return math.pow((-2.0 * (B_m * F)), 0.5) / (0.0 - B_m)
B_m = abs(B) function code(A, B_m, C, F) return Float64((Float64(-2.0 * Float64(B_m * F)) ^ 0.5) / Float64(0.0 - B_m)) end
B_m = abs(B); function tmp = code(A, B_m, C, F) tmp = ((-2.0 * (B_m * F)) ^ 0.5) / (0.0 - B_m); end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := N[(N[Power[N[(-2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] / N[(0.0 - B$95$m), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|
\\
\frac{{\left(-2 \cdot \left(B\_m \cdot F\right)\right)}^{0.5}}{0 - B\_m}
\end{array}
Initial program 19.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.f6414.2%
Simplified14.2%
associate-*l*N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr14.2%
Taylor expanded in C around 0
*-lowering-*.f64N/A
*-lowering-*.f6412.4%
Simplified12.4%
Final simplification12.4%
B_m = (fabs.f64 B) (FPCore (A B_m C F) :precision binary64 (* -2.0 (/ (sqrt (* C F)) B_m)))
B_m = fabs(B);
double code(double A, double B_m, double C, double F) {
return -2.0 * (sqrt((C * F)) / B_m);
}
B_m = abs(b)
real(8) function code(a, b_m, c, f)
real(8), intent (in) :: a
real(8), intent (in) :: b_m
real(8), intent (in) :: c
real(8), intent (in) :: f
code = (-2.0d0) * (sqrt((c * f)) / b_m)
end function
B_m = Math.abs(B);
public static double code(double A, double B_m, double C, double F) {
return -2.0 * (Math.sqrt((C * F)) / B_m);
}
B_m = math.fabs(B) def code(A, B_m, C, F): return -2.0 * (math.sqrt((C * F)) / B_m)
B_m = abs(B) function code(A, B_m, C, F) return Float64(-2.0 * Float64(sqrt(Float64(C * F)) / B_m)) end
B_m = abs(B); function tmp = code(A, B_m, C, F) tmp = -2.0 * (sqrt((C * F)) / B_m); end
B_m = N[Abs[B], $MachinePrecision] code[A_, B$95$m_, C_, F_] := N[(-2.0 * N[(N[Sqrt[N[(C * F), $MachinePrecision]], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
B_m = \left|B\right|
\\
-2 \cdot \frac{\sqrt{C \cdot F}}{B\_m}
\end{array}
Initial program 19.1%
Simplified25.3%
Taylor expanded in C around -inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
fma-defineN/A
mul-1-negN/A
fmm-undefN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified7.8%
Taylor expanded in A around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f643.1%
Simplified3.1%
inv-powN/A
pow-to-expN/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f642.4%
Applied egg-rr2.4%
Taylor expanded in B around 0
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f643.1%
Simplified3.1%
Final simplification3.1%
herbie shell --seed 2024160
(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))))