
(FPCore (c0 w h D d M) :precision binary64 (let* ((t_0 (/ (* c0 (* d d)) (* (* w h) (* D D))))) (* (/ c0 (* 2.0 w)) (+ t_0 (sqrt (- (* t_0 t_0) (* M M)))))))
double code(double c0, double w, double h, double D, double d, double M) {
double t_0 = (c0 * (d * d)) / ((w * h) * (D * D));
return (c0 / (2.0 * w)) * (t_0 + sqrt(((t_0 * t_0) - (M * M))));
}
real(8) function code(c0, w, h, d, d_1, m)
real(8), intent (in) :: c0
real(8), intent (in) :: w
real(8), intent (in) :: h
real(8), intent (in) :: d
real(8), intent (in) :: d_1
real(8), intent (in) :: m
real(8) :: t_0
t_0 = (c0 * (d_1 * d_1)) / ((w * h) * (d * d))
code = (c0 / (2.0d0 * w)) * (t_0 + sqrt(((t_0 * t_0) - (m * m))))
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
double t_0 = (c0 * (d * d)) / ((w * h) * (D * D));
return (c0 / (2.0 * w)) * (t_0 + Math.sqrt(((t_0 * t_0) - (M * M))));
}
def code(c0, w, h, D, d, M): t_0 = (c0 * (d * d)) / ((w * h) * (D * D)) return (c0 / (2.0 * w)) * (t_0 + math.sqrt(((t_0 * t_0) - (M * M))))
function code(c0, w, h, D, d, M) t_0 = Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D))) return Float64(Float64(c0 / Float64(2.0 * w)) * Float64(t_0 + sqrt(Float64(Float64(t_0 * t_0) - Float64(M * M))))) end
function tmp = code(c0, w, h, D, d, M) t_0 = (c0 * (d * d)) / ((w * h) * (D * D)); tmp = (c0 / (2.0 * w)) * (t_0 + sqrt(((t_0 * t_0) - (M * M)))); end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 + N[Sqrt[N[(N[(t$95$0 * t$95$0), $MachinePrecision] - N[(M * M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\
\frac{c0}{2 \cdot w} \cdot \left(t\_0 + \sqrt{t\_0 \cdot t\_0 - M \cdot M}\right)
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 10 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (c0 w h D d M) :precision binary64 (let* ((t_0 (/ (* c0 (* d d)) (* (* w h) (* D D))))) (* (/ c0 (* 2.0 w)) (+ t_0 (sqrt (- (* t_0 t_0) (* M M)))))))
double code(double c0, double w, double h, double D, double d, double M) {
double t_0 = (c0 * (d * d)) / ((w * h) * (D * D));
return (c0 / (2.0 * w)) * (t_0 + sqrt(((t_0 * t_0) - (M * M))));
}
real(8) function code(c0, w, h, d, d_1, m)
real(8), intent (in) :: c0
real(8), intent (in) :: w
real(8), intent (in) :: h
real(8), intent (in) :: d
real(8), intent (in) :: d_1
real(8), intent (in) :: m
real(8) :: t_0
t_0 = (c0 * (d_1 * d_1)) / ((w * h) * (d * d))
code = (c0 / (2.0d0 * w)) * (t_0 + sqrt(((t_0 * t_0) - (m * m))))
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
double t_0 = (c0 * (d * d)) / ((w * h) * (D * D));
return (c0 / (2.0 * w)) * (t_0 + Math.sqrt(((t_0 * t_0) - (M * M))));
}
def code(c0, w, h, D, d, M): t_0 = (c0 * (d * d)) / ((w * h) * (D * D)) return (c0 / (2.0 * w)) * (t_0 + math.sqrt(((t_0 * t_0) - (M * M))))
function code(c0, w, h, D, d, M) t_0 = Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D))) return Float64(Float64(c0 / Float64(2.0 * w)) * Float64(t_0 + sqrt(Float64(Float64(t_0 * t_0) - Float64(M * M))))) end
function tmp = code(c0, w, h, D, d, M) t_0 = (c0 * (d * d)) / ((w * h) * (D * D)); tmp = (c0 / (2.0 * w)) * (t_0 + sqrt(((t_0 * t_0) - (M * M)))); end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 + N[Sqrt[N[(N[(t$95$0 * t$95$0), $MachinePrecision] - N[(M * M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\
\frac{c0}{2 \cdot w} \cdot \left(t\_0 + \sqrt{t\_0 \cdot t\_0 - M \cdot M}\right)
\end{array}
\end{array}
M_m = (fabs.f64 M)
(FPCore (c0 w h D d M_m)
:precision binary64
(let* ((t_0 (/ c0 (* 2.0 w))))
(if (<= M_m 6.2e-188)
(* t_0 (* d (/ (/ c0 D) (* (/ w (* 2.0 d)) (* D h)))))
(if (<= M_m 7.6e-150)
0.0
(* (/ (* d (* c0 2.0)) (* D (* h (* w D)))) (* t_0 d))))))M_m = fabs(M);
double code(double c0, double w, double h, double D, double d, double M_m) {
double t_0 = c0 / (2.0 * w);
double tmp;
if (M_m <= 6.2e-188) {
tmp = t_0 * (d * ((c0 / D) / ((w / (2.0 * d)) * (D * h))));
} else if (M_m <= 7.6e-150) {
tmp = 0.0;
} else {
tmp = ((d * (c0 * 2.0)) / (D * (h * (w * D)))) * (t_0 * d);
}
return tmp;
}
M_m = abs(m)
real(8) function code(c0, w, h, d, d_1, m_m)
real(8), intent (in) :: c0
real(8), intent (in) :: w
real(8), intent (in) :: h
real(8), intent (in) :: d
real(8), intent (in) :: d_1
real(8), intent (in) :: m_m
real(8) :: t_0
real(8) :: tmp
t_0 = c0 / (2.0d0 * w)
if (m_m <= 6.2d-188) then
tmp = t_0 * (d_1 * ((c0 / d) / ((w / (2.0d0 * d_1)) * (d * h))))
else if (m_m <= 7.6d-150) then
tmp = 0.0d0
else
tmp = ((d_1 * (c0 * 2.0d0)) / (d * (h * (w * d)))) * (t_0 * d_1)
end if
code = tmp
end function
M_m = Math.abs(M);
public static double code(double c0, double w, double h, double D, double d, double M_m) {
double t_0 = c0 / (2.0 * w);
double tmp;
if (M_m <= 6.2e-188) {
tmp = t_0 * (d * ((c0 / D) / ((w / (2.0 * d)) * (D * h))));
} else if (M_m <= 7.6e-150) {
tmp = 0.0;
} else {
tmp = ((d * (c0 * 2.0)) / (D * (h * (w * D)))) * (t_0 * d);
}
return tmp;
}
M_m = math.fabs(M) def code(c0, w, h, D, d, M_m): t_0 = c0 / (2.0 * w) tmp = 0 if M_m <= 6.2e-188: tmp = t_0 * (d * ((c0 / D) / ((w / (2.0 * d)) * (D * h)))) elif M_m <= 7.6e-150: tmp = 0.0 else: tmp = ((d * (c0 * 2.0)) / (D * (h * (w * D)))) * (t_0 * d) return tmp
M_m = abs(M) function code(c0, w, h, D, d, M_m) t_0 = Float64(c0 / Float64(2.0 * w)) tmp = 0.0 if (M_m <= 6.2e-188) tmp = Float64(t_0 * Float64(d * Float64(Float64(c0 / D) / Float64(Float64(w / Float64(2.0 * d)) * Float64(D * h))))); elseif (M_m <= 7.6e-150) tmp = 0.0; else tmp = Float64(Float64(Float64(d * Float64(c0 * 2.0)) / Float64(D * Float64(h * Float64(w * D)))) * Float64(t_0 * d)); end return tmp end
M_m = abs(M); function tmp_2 = code(c0, w, h, D, d, M_m) t_0 = c0 / (2.0 * w); tmp = 0.0; if (M_m <= 6.2e-188) tmp = t_0 * (d * ((c0 / D) / ((w / (2.0 * d)) * (D * h)))); elseif (M_m <= 7.6e-150) tmp = 0.0; else tmp = ((d * (c0 * 2.0)) / (D * (h * (w * D)))) * (t_0 * d); end tmp_2 = tmp; end
M_m = N[Abs[M], $MachinePrecision]
code[c0_, w_, h_, D_, d_, M$95$m_] := Block[{t$95$0 = N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[M$95$m, 6.2e-188], N[(t$95$0 * N[(d * N[(N[(c0 / D), $MachinePrecision] / N[(N[(w / N[(2.0 * d), $MachinePrecision]), $MachinePrecision] * N[(D * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[M$95$m, 7.6e-150], 0.0, N[(N[(N[(d * N[(c0 * 2.0), $MachinePrecision]), $MachinePrecision] / N[(D * N[(h * N[(w * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 * d), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
M_m = \left|M\right|
\\
\begin{array}{l}
t_0 := \frac{c0}{2 \cdot w}\\
\mathbf{if}\;M\_m \leq 6.2 \cdot 10^{-188}:\\
\;\;\;\;t\_0 \cdot \left(d \cdot \frac{\frac{c0}{D}}{\frac{w}{2 \cdot d} \cdot \left(D \cdot h\right)}\right)\\
\mathbf{elif}\;M\_m \leq 7.6 \cdot 10^{-150}:\\
\;\;\;\;0\\
\mathbf{else}:\\
\;\;\;\;\frac{d \cdot \left(c0 \cdot 2\right)}{D \cdot \left(h \cdot \left(w \cdot D\right)\right)} \cdot \left(t\_0 \cdot d\right)\\
\end{array}
\end{array}
if M < 6.2000000000000004e-188Initial program 19.4%
Taylor expanded in c0 around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6427.3
Simplified27.3%
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r/N/A
lift-/.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied egg-rr41.7%
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6444.4
Applied egg-rr44.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
*-commutativeN/A
associate-*r/N/A
clear-numN/A
un-div-invN/A
frac-2negN/A
lift-/.f64N/A
distribute-frac-negN/A
lower-/.f64N/A
remove-double-negN/A
frac-2negN/A
lower-/.f64N/A
lower-neg.f64N/A
Applied egg-rr47.0%
if 6.2000000000000004e-188 < M < 7.5999999999999997e-150Initial program 8.9%
Taylor expanded in c0 around -inf
associate-*r*N/A
distribute-lft1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
mul-1-negN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-*.f64N/A
metadata-eval70.2
Simplified70.2%
lift-*.f64N/A
lift-/.f64N/A
mul0-rgtN/A
mul0-rgt70.2
Applied egg-rr70.2%
if 7.5999999999999997e-150 < M Initial program 24.4%
Taylor expanded in c0 around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6447.0
Simplified47.0%
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r/N/A
lift-/.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied egg-rr57.6%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l/N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
*-commutativeN/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6457.3
Applied egg-rr57.3%
Applied egg-rr58.6%
Final simplification52.7%
M_m = (fabs.f64 M)
(FPCore (c0 w h D d M_m)
:precision binary64
(let* ((t_0 (/ (* c0 (* d d)) (* (* w h) (* D D)))))
(if (<=
(* (/ c0 (* 2.0 w)) (+ t_0 (sqrt (- (* t_0 t_0) (* M_m M_m)))))
INFINITY)
(* (* c0 c0) (/ (* d d) (* w (* D (* h (* w D))))))
0.0)))M_m = fabs(M);
double code(double c0, double w, double h, double D, double d, double M_m) {
double t_0 = (c0 * (d * d)) / ((w * h) * (D * D));
double tmp;
if (((c0 / (2.0 * w)) * (t_0 + sqrt(((t_0 * t_0) - (M_m * M_m))))) <= ((double) INFINITY)) {
tmp = (c0 * c0) * ((d * d) / (w * (D * (h * (w * D)))));
} else {
tmp = 0.0;
}
return tmp;
}
M_m = Math.abs(M);
public static double code(double c0, double w, double h, double D, double d, double M_m) {
double t_0 = (c0 * (d * d)) / ((w * h) * (D * D));
double tmp;
if (((c0 / (2.0 * w)) * (t_0 + Math.sqrt(((t_0 * t_0) - (M_m * M_m))))) <= Double.POSITIVE_INFINITY) {
tmp = (c0 * c0) * ((d * d) / (w * (D * (h * (w * D)))));
} else {
tmp = 0.0;
}
return tmp;
}
M_m = math.fabs(M) def code(c0, w, h, D, d, M_m): t_0 = (c0 * (d * d)) / ((w * h) * (D * D)) tmp = 0 if ((c0 / (2.0 * w)) * (t_0 + math.sqrt(((t_0 * t_0) - (M_m * M_m))))) <= math.inf: tmp = (c0 * c0) * ((d * d) / (w * (D * (h * (w * D))))) else: tmp = 0.0 return tmp
M_m = abs(M) function code(c0, w, h, D, d, M_m) t_0 = Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D))) tmp = 0.0 if (Float64(Float64(c0 / Float64(2.0 * w)) * Float64(t_0 + sqrt(Float64(Float64(t_0 * t_0) - Float64(M_m * M_m))))) <= Inf) tmp = Float64(Float64(c0 * c0) * Float64(Float64(d * d) / Float64(w * Float64(D * Float64(h * Float64(w * D)))))); else tmp = 0.0; end return tmp end
M_m = abs(M); function tmp_2 = code(c0, w, h, D, d, M_m) t_0 = (c0 * (d * d)) / ((w * h) * (D * D)); tmp = 0.0; if (((c0 / (2.0 * w)) * (t_0 + sqrt(((t_0 * t_0) - (M_m * M_m))))) <= Inf) tmp = (c0 * c0) * ((d * d) / (w * (D * (h * (w * D))))); else tmp = 0.0; end tmp_2 = tmp; end
M_m = N[Abs[M], $MachinePrecision]
code[c0_, w_, h_, D_, d_, M$95$m_] := Block[{t$95$0 = N[(N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 + N[Sqrt[N[(N[(t$95$0 * t$95$0), $MachinePrecision] - N[(M$95$m * M$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(c0 * c0), $MachinePrecision] * N[(N[(d * d), $MachinePrecision] / N[(w * N[(D * N[(h * N[(w * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0]]
\begin{array}{l}
M_m = \left|M\right|
\\
\begin{array}{l}
t_0 := \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\
\mathbf{if}\;\frac{c0}{2 \cdot w} \cdot \left(t\_0 + \sqrt{t\_0 \cdot t\_0 - M\_m \cdot M\_m}\right) \leq \infty:\\
\;\;\;\;\left(c0 \cdot c0\right) \cdot \frac{d \cdot d}{w \cdot \left(D \cdot \left(h \cdot \left(w \cdot D\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if (*.f64 (/.f64 c0 (*.f64 #s(literal 2 binary64) w)) (+.f64 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (-.f64 (*.f64 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))) (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D)))) (*.f64 M M))))) < +inf.0Initial program 65.0%
Taylor expanded in c0 around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6467.8
Simplified67.8%
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r/N/A
lift-/.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied egg-rr73.5%
Taylor expanded in c0 around 0
lower-/.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6458.9
Simplified58.9%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-/l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6456.2
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
associate-*l*N/A
Applied egg-rr59.7%
if +inf.0 < (*.f64 (/.f64 c0 (*.f64 #s(literal 2 binary64) w)) (+.f64 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (-.f64 (*.f64 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))) (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D)))) (*.f64 M M))))) Initial program 0.0%
Taylor expanded in c0 around -inf
associate-*r*N/A
distribute-lft1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
mul-1-negN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-*.f64N/A
metadata-eval33.7
Simplified33.7%
lift-*.f64N/A
lift-/.f64N/A
mul0-rgtN/A
mul0-rgt37.2
Applied egg-rr37.2%
Final simplification44.4%
M_m = (fabs.f64 M)
(FPCore (c0 w h D d M_m)
:precision binary64
(let* ((t_0 (* d (* c0 2.0)))
(t_1 (/ c0 (* 2.0 w)))
(t_2 (* t_1 (* d (/ t_0 (* D (* h (* w D))))))))
(if (<= M_m 6.2e-188)
t_2
(if (<= M_m 8.2e-150)
0.0
(if (<= M_m 7.8e-20)
(* (* t_1 d) (/ t_0 (* D (* D (* w h)))))
(if (<= M_m 6.4e+38) 0.0 t_2))))))M_m = fabs(M);
double code(double c0, double w, double h, double D, double d, double M_m) {
double t_0 = d * (c0 * 2.0);
double t_1 = c0 / (2.0 * w);
double t_2 = t_1 * (d * (t_0 / (D * (h * (w * D)))));
double tmp;
if (M_m <= 6.2e-188) {
tmp = t_2;
} else if (M_m <= 8.2e-150) {
tmp = 0.0;
} else if (M_m <= 7.8e-20) {
tmp = (t_1 * d) * (t_0 / (D * (D * (w * h))));
} else if (M_m <= 6.4e+38) {
tmp = 0.0;
} else {
tmp = t_2;
}
return tmp;
}
M_m = abs(m)
real(8) function code(c0, w, h, d, d_1, m_m)
real(8), intent (in) :: c0
real(8), intent (in) :: w
real(8), intent (in) :: h
real(8), intent (in) :: d
real(8), intent (in) :: d_1
real(8), intent (in) :: m_m
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = d_1 * (c0 * 2.0d0)
t_1 = c0 / (2.0d0 * w)
t_2 = t_1 * (d_1 * (t_0 / (d * (h * (w * d)))))
if (m_m <= 6.2d-188) then
tmp = t_2
else if (m_m <= 8.2d-150) then
tmp = 0.0d0
else if (m_m <= 7.8d-20) then
tmp = (t_1 * d_1) * (t_0 / (d * (d * (w * h))))
else if (m_m <= 6.4d+38) then
tmp = 0.0d0
else
tmp = t_2
end if
code = tmp
end function
M_m = Math.abs(M);
public static double code(double c0, double w, double h, double D, double d, double M_m) {
double t_0 = d * (c0 * 2.0);
double t_1 = c0 / (2.0 * w);
double t_2 = t_1 * (d * (t_0 / (D * (h * (w * D)))));
double tmp;
if (M_m <= 6.2e-188) {
tmp = t_2;
} else if (M_m <= 8.2e-150) {
tmp = 0.0;
} else if (M_m <= 7.8e-20) {
tmp = (t_1 * d) * (t_0 / (D * (D * (w * h))));
} else if (M_m <= 6.4e+38) {
tmp = 0.0;
} else {
tmp = t_2;
}
return tmp;
}
M_m = math.fabs(M) def code(c0, w, h, D, d, M_m): t_0 = d * (c0 * 2.0) t_1 = c0 / (2.0 * w) t_2 = t_1 * (d * (t_0 / (D * (h * (w * D))))) tmp = 0 if M_m <= 6.2e-188: tmp = t_2 elif M_m <= 8.2e-150: tmp = 0.0 elif M_m <= 7.8e-20: tmp = (t_1 * d) * (t_0 / (D * (D * (w * h)))) elif M_m <= 6.4e+38: tmp = 0.0 else: tmp = t_2 return tmp
M_m = abs(M) function code(c0, w, h, D, d, M_m) t_0 = Float64(d * Float64(c0 * 2.0)) t_1 = Float64(c0 / Float64(2.0 * w)) t_2 = Float64(t_1 * Float64(d * Float64(t_0 / Float64(D * Float64(h * Float64(w * D)))))) tmp = 0.0 if (M_m <= 6.2e-188) tmp = t_2; elseif (M_m <= 8.2e-150) tmp = 0.0; elseif (M_m <= 7.8e-20) tmp = Float64(Float64(t_1 * d) * Float64(t_0 / Float64(D * Float64(D * Float64(w * h))))); elseif (M_m <= 6.4e+38) tmp = 0.0; else tmp = t_2; end return tmp end
M_m = abs(M); function tmp_2 = code(c0, w, h, D, d, M_m) t_0 = d * (c0 * 2.0); t_1 = c0 / (2.0 * w); t_2 = t_1 * (d * (t_0 / (D * (h * (w * D))))); tmp = 0.0; if (M_m <= 6.2e-188) tmp = t_2; elseif (M_m <= 8.2e-150) tmp = 0.0; elseif (M_m <= 7.8e-20) tmp = (t_1 * d) * (t_0 / (D * (D * (w * h)))); elseif (M_m <= 6.4e+38) tmp = 0.0; else tmp = t_2; end tmp_2 = tmp; end
M_m = N[Abs[M], $MachinePrecision]
code[c0_, w_, h_, D_, d_, M$95$m_] := Block[{t$95$0 = N[(d * N[(c0 * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(d * N[(t$95$0 / N[(D * N[(h * N[(w * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[M$95$m, 6.2e-188], t$95$2, If[LessEqual[M$95$m, 8.2e-150], 0.0, If[LessEqual[M$95$m, 7.8e-20], N[(N[(t$95$1 * d), $MachinePrecision] * N[(t$95$0 / N[(D * N[(D * N[(w * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[M$95$m, 6.4e+38], 0.0, t$95$2]]]]]]]
\begin{array}{l}
M_m = \left|M\right|
\\
\begin{array}{l}
t_0 := d \cdot \left(c0 \cdot 2\right)\\
t_1 := \frac{c0}{2 \cdot w}\\
t_2 := t\_1 \cdot \left(d \cdot \frac{t\_0}{D \cdot \left(h \cdot \left(w \cdot D\right)\right)}\right)\\
\mathbf{if}\;M\_m \leq 6.2 \cdot 10^{-188}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;M\_m \leq 8.2 \cdot 10^{-150}:\\
\;\;\;\;0\\
\mathbf{elif}\;M\_m \leq 7.8 \cdot 10^{-20}:\\
\;\;\;\;\left(t\_1 \cdot d\right) \cdot \frac{t\_0}{D \cdot \left(D \cdot \left(w \cdot h\right)\right)}\\
\mathbf{elif}\;M\_m \leq 6.4 \cdot 10^{+38}:\\
\;\;\;\;0\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if M < 6.2000000000000004e-188 or 6.3999999999999997e38 < M Initial program 17.6%
Taylor expanded in c0 around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6433.7
Simplified33.7%
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r/N/A
lift-/.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied egg-rr46.9%
if 6.2000000000000004e-188 < M < 8.1999999999999997e-150 or 7.80000000000000014e-20 < M < 6.3999999999999997e38Initial program 21.5%
Taylor expanded in c0 around -inf
associate-*r*N/A
distribute-lft1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
mul-1-negN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-*.f64N/A
metadata-eval59.2
Simplified59.2%
lift-*.f64N/A
lift-/.f64N/A
mul0-rgtN/A
mul0-rgt59.4
Applied egg-rr59.4%
if 8.1999999999999997e-150 < M < 7.80000000000000014e-20Initial program 39.2%
Taylor expanded in c0 around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6445.0
Simplified45.0%
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r/N/A
lift-/.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied egg-rr56.7%
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
Applied egg-rr59.6%
Final simplification49.8%
M_m = (fabs.f64 M)
(FPCore (c0 w h D d M_m)
:precision binary64
(let* ((t_0
(* (/ c0 (* 2.0 w)) (* d (/ (* d (* c0 2.0)) (* D (* h (* w D))))))))
(if (<= M_m 6.2e-188)
t_0
(if (<= M_m 1.15e-149)
0.0
(if (<= M_m 1.5e-19)
(* (/ (* c0 (* d (* c0 -2.0))) (* (* w -2.0) (* D h))) (/ d (* w D)))
(if (<= M_m 6.4e+38) 0.0 t_0))))))M_m = fabs(M);
double code(double c0, double w, double h, double D, double d, double M_m) {
double t_0 = (c0 / (2.0 * w)) * (d * ((d * (c0 * 2.0)) / (D * (h * (w * D)))));
double tmp;
if (M_m <= 6.2e-188) {
tmp = t_0;
} else if (M_m <= 1.15e-149) {
tmp = 0.0;
} else if (M_m <= 1.5e-19) {
tmp = ((c0 * (d * (c0 * -2.0))) / ((w * -2.0) * (D * h))) * (d / (w * D));
} else if (M_m <= 6.4e+38) {
tmp = 0.0;
} else {
tmp = t_0;
}
return tmp;
}
M_m = abs(m)
real(8) function code(c0, w, h, d, d_1, m_m)
real(8), intent (in) :: c0
real(8), intent (in) :: w
real(8), intent (in) :: h
real(8), intent (in) :: d
real(8), intent (in) :: d_1
real(8), intent (in) :: m_m
real(8) :: t_0
real(8) :: tmp
t_0 = (c0 / (2.0d0 * w)) * (d_1 * ((d_1 * (c0 * 2.0d0)) / (d * (h * (w * d)))))
if (m_m <= 6.2d-188) then
tmp = t_0
else if (m_m <= 1.15d-149) then
tmp = 0.0d0
else if (m_m <= 1.5d-19) then
tmp = ((c0 * (d_1 * (c0 * (-2.0d0)))) / ((w * (-2.0d0)) * (d * h))) * (d_1 / (w * d))
else if (m_m <= 6.4d+38) then
tmp = 0.0d0
else
tmp = t_0
end if
code = tmp
end function
M_m = Math.abs(M);
public static double code(double c0, double w, double h, double D, double d, double M_m) {
double t_0 = (c0 / (2.0 * w)) * (d * ((d * (c0 * 2.0)) / (D * (h * (w * D)))));
double tmp;
if (M_m <= 6.2e-188) {
tmp = t_0;
} else if (M_m <= 1.15e-149) {
tmp = 0.0;
} else if (M_m <= 1.5e-19) {
tmp = ((c0 * (d * (c0 * -2.0))) / ((w * -2.0) * (D * h))) * (d / (w * D));
} else if (M_m <= 6.4e+38) {
tmp = 0.0;
} else {
tmp = t_0;
}
return tmp;
}
M_m = math.fabs(M) def code(c0, w, h, D, d, M_m): t_0 = (c0 / (2.0 * w)) * (d * ((d * (c0 * 2.0)) / (D * (h * (w * D))))) tmp = 0 if M_m <= 6.2e-188: tmp = t_0 elif M_m <= 1.15e-149: tmp = 0.0 elif M_m <= 1.5e-19: tmp = ((c0 * (d * (c0 * -2.0))) / ((w * -2.0) * (D * h))) * (d / (w * D)) elif M_m <= 6.4e+38: tmp = 0.0 else: tmp = t_0 return tmp
M_m = abs(M) function code(c0, w, h, D, d, M_m) t_0 = Float64(Float64(c0 / Float64(2.0 * w)) * Float64(d * Float64(Float64(d * Float64(c0 * 2.0)) / Float64(D * Float64(h * Float64(w * D)))))) tmp = 0.0 if (M_m <= 6.2e-188) tmp = t_0; elseif (M_m <= 1.15e-149) tmp = 0.0; elseif (M_m <= 1.5e-19) tmp = Float64(Float64(Float64(c0 * Float64(d * Float64(c0 * -2.0))) / Float64(Float64(w * -2.0) * Float64(D * h))) * Float64(d / Float64(w * D))); elseif (M_m <= 6.4e+38) tmp = 0.0; else tmp = t_0; end return tmp end
M_m = abs(M); function tmp_2 = code(c0, w, h, D, d, M_m) t_0 = (c0 / (2.0 * w)) * (d * ((d * (c0 * 2.0)) / (D * (h * (w * D))))); tmp = 0.0; if (M_m <= 6.2e-188) tmp = t_0; elseif (M_m <= 1.15e-149) tmp = 0.0; elseif (M_m <= 1.5e-19) tmp = ((c0 * (d * (c0 * -2.0))) / ((w * -2.0) * (D * h))) * (d / (w * D)); elseif (M_m <= 6.4e+38) tmp = 0.0; else tmp = t_0; end tmp_2 = tmp; end
M_m = N[Abs[M], $MachinePrecision]
code[c0_, w_, h_, D_, d_, M$95$m_] := Block[{t$95$0 = N[(N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision] * N[(d * N[(N[(d * N[(c0 * 2.0), $MachinePrecision]), $MachinePrecision] / N[(D * N[(h * N[(w * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[M$95$m, 6.2e-188], t$95$0, If[LessEqual[M$95$m, 1.15e-149], 0.0, If[LessEqual[M$95$m, 1.5e-19], N[(N[(N[(c0 * N[(d * N[(c0 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(w * -2.0), $MachinePrecision] * N[(D * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(d / N[(w * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[M$95$m, 6.4e+38], 0.0, t$95$0]]]]]
\begin{array}{l}
M_m = \left|M\right|
\\
\begin{array}{l}
t_0 := \frac{c0}{2 \cdot w} \cdot \left(d \cdot \frac{d \cdot \left(c0 \cdot 2\right)}{D \cdot \left(h \cdot \left(w \cdot D\right)\right)}\right)\\
\mathbf{if}\;M\_m \leq 6.2 \cdot 10^{-188}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;M\_m \leq 1.15 \cdot 10^{-149}:\\
\;\;\;\;0\\
\mathbf{elif}\;M\_m \leq 1.5 \cdot 10^{-19}:\\
\;\;\;\;\frac{c0 \cdot \left(d \cdot \left(c0 \cdot -2\right)\right)}{\left(w \cdot -2\right) \cdot \left(D \cdot h\right)} \cdot \frac{d}{w \cdot D}\\
\mathbf{elif}\;M\_m \leq 6.4 \cdot 10^{+38}:\\
\;\;\;\;0\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if M < 6.2000000000000004e-188 or 6.3999999999999997e38 < M Initial program 17.6%
Taylor expanded in c0 around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6433.7
Simplified33.7%
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r/N/A
lift-/.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied egg-rr46.9%
if 6.2000000000000004e-188 < M < 1.15e-149 or 1.49999999999999996e-19 < M < 6.3999999999999997e38Initial program 21.5%
Taylor expanded in c0 around -inf
associate-*r*N/A
distribute-lft1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
mul-1-negN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-*.f64N/A
metadata-eval59.2
Simplified59.2%
lift-*.f64N/A
lift-/.f64N/A
mul0-rgtN/A
mul0-rgt59.4
Applied egg-rr59.4%
if 1.15e-149 < M < 1.49999999999999996e-19Initial program 39.2%
Taylor expanded in c0 around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6445.0
Simplified45.0%
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r/N/A
lift-/.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied egg-rr56.7%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l/N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
*-commutativeN/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6456.8
Applied egg-rr56.8%
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied egg-rr54.0%
Final simplification49.0%
M_m = (fabs.f64 M)
(FPCore (c0 w h D d M_m)
:precision binary64
(let* ((t_0 (* D (* h (* w D))))
(t_1 (* d (* c0 d)))
(t_2 (* (/ t_1 t_0) (/ c0 w))))
(if (<= M_m 6.2e-188)
t_2
(if (<= M_m 3.05e-151)
0.0
(if (<= M_m 1.5e-19)
(* t_1 (/ c0 (* w t_0)))
(if (<= M_m 9e+44) 0.0 t_2))))))M_m = fabs(M);
double code(double c0, double w, double h, double D, double d, double M_m) {
double t_0 = D * (h * (w * D));
double t_1 = d * (c0 * d);
double t_2 = (t_1 / t_0) * (c0 / w);
double tmp;
if (M_m <= 6.2e-188) {
tmp = t_2;
} else if (M_m <= 3.05e-151) {
tmp = 0.0;
} else if (M_m <= 1.5e-19) {
tmp = t_1 * (c0 / (w * t_0));
} else if (M_m <= 9e+44) {
tmp = 0.0;
} else {
tmp = t_2;
}
return tmp;
}
M_m = abs(m)
real(8) function code(c0, w, h, d, d_1, m_m)
real(8), intent (in) :: c0
real(8), intent (in) :: w
real(8), intent (in) :: h
real(8), intent (in) :: d
real(8), intent (in) :: d_1
real(8), intent (in) :: m_m
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = d * (h * (w * d))
t_1 = d_1 * (c0 * d_1)
t_2 = (t_1 / t_0) * (c0 / w)
if (m_m <= 6.2d-188) then
tmp = t_2
else if (m_m <= 3.05d-151) then
tmp = 0.0d0
else if (m_m <= 1.5d-19) then
tmp = t_1 * (c0 / (w * t_0))
else if (m_m <= 9d+44) then
tmp = 0.0d0
else
tmp = t_2
end if
code = tmp
end function
M_m = Math.abs(M);
public static double code(double c0, double w, double h, double D, double d, double M_m) {
double t_0 = D * (h * (w * D));
double t_1 = d * (c0 * d);
double t_2 = (t_1 / t_0) * (c0 / w);
double tmp;
if (M_m <= 6.2e-188) {
tmp = t_2;
} else if (M_m <= 3.05e-151) {
tmp = 0.0;
} else if (M_m <= 1.5e-19) {
tmp = t_1 * (c0 / (w * t_0));
} else if (M_m <= 9e+44) {
tmp = 0.0;
} else {
tmp = t_2;
}
return tmp;
}
M_m = math.fabs(M) def code(c0, w, h, D, d, M_m): t_0 = D * (h * (w * D)) t_1 = d * (c0 * d) t_2 = (t_1 / t_0) * (c0 / w) tmp = 0 if M_m <= 6.2e-188: tmp = t_2 elif M_m <= 3.05e-151: tmp = 0.0 elif M_m <= 1.5e-19: tmp = t_1 * (c0 / (w * t_0)) elif M_m <= 9e+44: tmp = 0.0 else: tmp = t_2 return tmp
M_m = abs(M) function code(c0, w, h, D, d, M_m) t_0 = Float64(D * Float64(h * Float64(w * D))) t_1 = Float64(d * Float64(c0 * d)) t_2 = Float64(Float64(t_1 / t_0) * Float64(c0 / w)) tmp = 0.0 if (M_m <= 6.2e-188) tmp = t_2; elseif (M_m <= 3.05e-151) tmp = 0.0; elseif (M_m <= 1.5e-19) tmp = Float64(t_1 * Float64(c0 / Float64(w * t_0))); elseif (M_m <= 9e+44) tmp = 0.0; else tmp = t_2; end return tmp end
M_m = abs(M); function tmp_2 = code(c0, w, h, D, d, M_m) t_0 = D * (h * (w * D)); t_1 = d * (c0 * d); t_2 = (t_1 / t_0) * (c0 / w); tmp = 0.0; if (M_m <= 6.2e-188) tmp = t_2; elseif (M_m <= 3.05e-151) tmp = 0.0; elseif (M_m <= 1.5e-19) tmp = t_1 * (c0 / (w * t_0)); elseif (M_m <= 9e+44) tmp = 0.0; else tmp = t_2; end tmp_2 = tmp; end
M_m = N[Abs[M], $MachinePrecision]
code[c0_, w_, h_, D_, d_, M$95$m_] := Block[{t$95$0 = N[(D * N[(h * N[(w * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(d * N[(c0 * d), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 / t$95$0), $MachinePrecision] * N[(c0 / w), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[M$95$m, 6.2e-188], t$95$2, If[LessEqual[M$95$m, 3.05e-151], 0.0, If[LessEqual[M$95$m, 1.5e-19], N[(t$95$1 * N[(c0 / N[(w * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[M$95$m, 9e+44], 0.0, t$95$2]]]]]]]
\begin{array}{l}
M_m = \left|M\right|
\\
\begin{array}{l}
t_0 := D \cdot \left(h \cdot \left(w \cdot D\right)\right)\\
t_1 := d \cdot \left(c0 \cdot d\right)\\
t_2 := \frac{t\_1}{t\_0} \cdot \frac{c0}{w}\\
\mathbf{if}\;M\_m \leq 6.2 \cdot 10^{-188}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;M\_m \leq 3.05 \cdot 10^{-151}:\\
\;\;\;\;0\\
\mathbf{elif}\;M\_m \leq 1.5 \cdot 10^{-19}:\\
\;\;\;\;t\_1 \cdot \frac{c0}{w \cdot t\_0}\\
\mathbf{elif}\;M\_m \leq 9 \cdot 10^{+44}:\\
\;\;\;\;0\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if M < 6.2000000000000004e-188 or 9e44 < M Initial program 17.7%
Taylor expanded in c0 around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6433.9
Simplified33.9%
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r/N/A
lift-/.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied egg-rr47.1%
Taylor expanded in c0 around 0
lower-/.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6430.1
Simplified30.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lower-*.f64N/A
Applied egg-rr45.1%
if 6.2000000000000004e-188 < M < 3.05e-151 or 1.49999999999999996e-19 < M < 9e44Initial program 20.6%
Taylor expanded in c0 around -inf
associate-*r*N/A
distribute-lft1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
mul-1-negN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-*.f64N/A
metadata-eval56.9
Simplified56.9%
lift-*.f64N/A
lift-/.f64N/A
mul0-rgtN/A
mul0-rgt57.1
Applied egg-rr57.1%
if 3.05e-151 < M < 1.49999999999999996e-19Initial program 39.2%
Taylor expanded in c0 around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6445.0
Simplified45.0%
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r/N/A
lift-/.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied egg-rr56.7%
Taylor expanded in c0 around 0
lower-/.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6444.9
Simplified44.9%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6448.2
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
Applied egg-rr54.0%
Final simplification47.5%
M_m = (fabs.f64 M)
(FPCore (c0 w h D d M_m)
:precision binary64
(let* ((t_0 (/ c0 (* 2.0 w))))
(if (<= M_m 6.2e-188)
(* t_0 (* d (* (/ (* 2.0 d) (* D (* w h))) (/ c0 D))))
(if (<= M_m 7.6e-150)
0.0
(* (/ (* d (* c0 2.0)) (* D (* h (* w D)))) (* t_0 d))))))M_m = fabs(M);
double code(double c0, double w, double h, double D, double d, double M_m) {
double t_0 = c0 / (2.0 * w);
double tmp;
if (M_m <= 6.2e-188) {
tmp = t_0 * (d * (((2.0 * d) / (D * (w * h))) * (c0 / D)));
} else if (M_m <= 7.6e-150) {
tmp = 0.0;
} else {
tmp = ((d * (c0 * 2.0)) / (D * (h * (w * D)))) * (t_0 * d);
}
return tmp;
}
M_m = abs(m)
real(8) function code(c0, w, h, d, d_1, m_m)
real(8), intent (in) :: c0
real(8), intent (in) :: w
real(8), intent (in) :: h
real(8), intent (in) :: d
real(8), intent (in) :: d_1
real(8), intent (in) :: m_m
real(8) :: t_0
real(8) :: tmp
t_0 = c0 / (2.0d0 * w)
if (m_m <= 6.2d-188) then
tmp = t_0 * (d_1 * (((2.0d0 * d_1) / (d * (w * h))) * (c0 / d)))
else if (m_m <= 7.6d-150) then
tmp = 0.0d0
else
tmp = ((d_1 * (c0 * 2.0d0)) / (d * (h * (w * d)))) * (t_0 * d_1)
end if
code = tmp
end function
M_m = Math.abs(M);
public static double code(double c0, double w, double h, double D, double d, double M_m) {
double t_0 = c0 / (2.0 * w);
double tmp;
if (M_m <= 6.2e-188) {
tmp = t_0 * (d * (((2.0 * d) / (D * (w * h))) * (c0 / D)));
} else if (M_m <= 7.6e-150) {
tmp = 0.0;
} else {
tmp = ((d * (c0 * 2.0)) / (D * (h * (w * D)))) * (t_0 * d);
}
return tmp;
}
M_m = math.fabs(M) def code(c0, w, h, D, d, M_m): t_0 = c0 / (2.0 * w) tmp = 0 if M_m <= 6.2e-188: tmp = t_0 * (d * (((2.0 * d) / (D * (w * h))) * (c0 / D))) elif M_m <= 7.6e-150: tmp = 0.0 else: tmp = ((d * (c0 * 2.0)) / (D * (h * (w * D)))) * (t_0 * d) return tmp
M_m = abs(M) function code(c0, w, h, D, d, M_m) t_0 = Float64(c0 / Float64(2.0 * w)) tmp = 0.0 if (M_m <= 6.2e-188) tmp = Float64(t_0 * Float64(d * Float64(Float64(Float64(2.0 * d) / Float64(D * Float64(w * h))) * Float64(c0 / D)))); elseif (M_m <= 7.6e-150) tmp = 0.0; else tmp = Float64(Float64(Float64(d * Float64(c0 * 2.0)) / Float64(D * Float64(h * Float64(w * D)))) * Float64(t_0 * d)); end return tmp end
M_m = abs(M); function tmp_2 = code(c0, w, h, D, d, M_m) t_0 = c0 / (2.0 * w); tmp = 0.0; if (M_m <= 6.2e-188) tmp = t_0 * (d * (((2.0 * d) / (D * (w * h))) * (c0 / D))); elseif (M_m <= 7.6e-150) tmp = 0.0; else tmp = ((d * (c0 * 2.0)) / (D * (h * (w * D)))) * (t_0 * d); end tmp_2 = tmp; end
M_m = N[Abs[M], $MachinePrecision]
code[c0_, w_, h_, D_, d_, M$95$m_] := Block[{t$95$0 = N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[M$95$m, 6.2e-188], N[(t$95$0 * N[(d * N[(N[(N[(2.0 * d), $MachinePrecision] / N[(D * N[(w * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(c0 / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[M$95$m, 7.6e-150], 0.0, N[(N[(N[(d * N[(c0 * 2.0), $MachinePrecision]), $MachinePrecision] / N[(D * N[(h * N[(w * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 * d), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
M_m = \left|M\right|
\\
\begin{array}{l}
t_0 := \frac{c0}{2 \cdot w}\\
\mathbf{if}\;M\_m \leq 6.2 \cdot 10^{-188}:\\
\;\;\;\;t\_0 \cdot \left(d \cdot \left(\frac{2 \cdot d}{D \cdot \left(w \cdot h\right)} \cdot \frac{c0}{D}\right)\right)\\
\mathbf{elif}\;M\_m \leq 7.6 \cdot 10^{-150}:\\
\;\;\;\;0\\
\mathbf{else}:\\
\;\;\;\;\frac{d \cdot \left(c0 \cdot 2\right)}{D \cdot \left(h \cdot \left(w \cdot D\right)\right)} \cdot \left(t\_0 \cdot d\right)\\
\end{array}
\end{array}
if M < 6.2000000000000004e-188Initial program 19.4%
Taylor expanded in c0 around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6427.3
Simplified27.3%
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r/N/A
lift-/.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied egg-rr41.7%
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6444.4
Applied egg-rr44.4%
if 6.2000000000000004e-188 < M < 7.5999999999999997e-150Initial program 8.9%
Taylor expanded in c0 around -inf
associate-*r*N/A
distribute-lft1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
mul-1-negN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-*.f64N/A
metadata-eval70.2
Simplified70.2%
lift-*.f64N/A
lift-/.f64N/A
mul0-rgtN/A
mul0-rgt70.2
Applied egg-rr70.2%
if 7.5999999999999997e-150 < M Initial program 24.4%
Taylor expanded in c0 around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6447.0
Simplified47.0%
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r/N/A
lift-/.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied egg-rr57.6%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l/N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
*-commutativeN/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6457.3
Applied egg-rr57.3%
Applied egg-rr58.6%
Final simplification51.2%
M_m = (fabs.f64 M)
(FPCore (c0 w h D d M_m)
:precision binary64
(let* ((t_0 (/ (* d (* c0 2.0)) (* D (* h (* w D))))) (t_1 (/ c0 (* 2.0 w))))
(if (<= M_m 6.2e-188)
(* t_1 (* d t_0))
(if (<= M_m 7.6e-150) 0.0 (* t_0 (* t_1 d))))))M_m = fabs(M);
double code(double c0, double w, double h, double D, double d, double M_m) {
double t_0 = (d * (c0 * 2.0)) / (D * (h * (w * D)));
double t_1 = c0 / (2.0 * w);
double tmp;
if (M_m <= 6.2e-188) {
tmp = t_1 * (d * t_0);
} else if (M_m <= 7.6e-150) {
tmp = 0.0;
} else {
tmp = t_0 * (t_1 * d);
}
return tmp;
}
M_m = abs(m)
real(8) function code(c0, w, h, d, d_1, m_m)
real(8), intent (in) :: c0
real(8), intent (in) :: w
real(8), intent (in) :: h
real(8), intent (in) :: d
real(8), intent (in) :: d_1
real(8), intent (in) :: m_m
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (d_1 * (c0 * 2.0d0)) / (d * (h * (w * d)))
t_1 = c0 / (2.0d0 * w)
if (m_m <= 6.2d-188) then
tmp = t_1 * (d_1 * t_0)
else if (m_m <= 7.6d-150) then
tmp = 0.0d0
else
tmp = t_0 * (t_1 * d_1)
end if
code = tmp
end function
M_m = Math.abs(M);
public static double code(double c0, double w, double h, double D, double d, double M_m) {
double t_0 = (d * (c0 * 2.0)) / (D * (h * (w * D)));
double t_1 = c0 / (2.0 * w);
double tmp;
if (M_m <= 6.2e-188) {
tmp = t_1 * (d * t_0);
} else if (M_m <= 7.6e-150) {
tmp = 0.0;
} else {
tmp = t_0 * (t_1 * d);
}
return tmp;
}
M_m = math.fabs(M) def code(c0, w, h, D, d, M_m): t_0 = (d * (c0 * 2.0)) / (D * (h * (w * D))) t_1 = c0 / (2.0 * w) tmp = 0 if M_m <= 6.2e-188: tmp = t_1 * (d * t_0) elif M_m <= 7.6e-150: tmp = 0.0 else: tmp = t_0 * (t_1 * d) return tmp
M_m = abs(M) function code(c0, w, h, D, d, M_m) t_0 = Float64(Float64(d * Float64(c0 * 2.0)) / Float64(D * Float64(h * Float64(w * D)))) t_1 = Float64(c0 / Float64(2.0 * w)) tmp = 0.0 if (M_m <= 6.2e-188) tmp = Float64(t_1 * Float64(d * t_0)); elseif (M_m <= 7.6e-150) tmp = 0.0; else tmp = Float64(t_0 * Float64(t_1 * d)); end return tmp end
M_m = abs(M); function tmp_2 = code(c0, w, h, D, d, M_m) t_0 = (d * (c0 * 2.0)) / (D * (h * (w * D))); t_1 = c0 / (2.0 * w); tmp = 0.0; if (M_m <= 6.2e-188) tmp = t_1 * (d * t_0); elseif (M_m <= 7.6e-150) tmp = 0.0; else tmp = t_0 * (t_1 * d); end tmp_2 = tmp; end
M_m = N[Abs[M], $MachinePrecision]
code[c0_, w_, h_, D_, d_, M$95$m_] := Block[{t$95$0 = N[(N[(d * N[(c0 * 2.0), $MachinePrecision]), $MachinePrecision] / N[(D * N[(h * N[(w * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[M$95$m, 6.2e-188], N[(t$95$1 * N[(d * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[M$95$m, 7.6e-150], 0.0, N[(t$95$0 * N[(t$95$1 * d), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
M_m = \left|M\right|
\\
\begin{array}{l}
t_0 := \frac{d \cdot \left(c0 \cdot 2\right)}{D \cdot \left(h \cdot \left(w \cdot D\right)\right)}\\
t_1 := \frac{c0}{2 \cdot w}\\
\mathbf{if}\;M\_m \leq 6.2 \cdot 10^{-188}:\\
\;\;\;\;t\_1 \cdot \left(d \cdot t\_0\right)\\
\mathbf{elif}\;M\_m \leq 7.6 \cdot 10^{-150}:\\
\;\;\;\;0\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(t\_1 \cdot d\right)\\
\end{array}
\end{array}
if M < 6.2000000000000004e-188Initial program 19.4%
Taylor expanded in c0 around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6427.3
Simplified27.3%
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r/N/A
lift-/.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied egg-rr41.7%
if 6.2000000000000004e-188 < M < 7.5999999999999997e-150Initial program 8.9%
Taylor expanded in c0 around -inf
associate-*r*N/A
distribute-lft1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
mul-1-negN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-*.f64N/A
metadata-eval70.2
Simplified70.2%
lift-*.f64N/A
lift-/.f64N/A
mul0-rgtN/A
mul0-rgt70.2
Applied egg-rr70.2%
if 7.5999999999999997e-150 < M Initial program 24.4%
Taylor expanded in c0 around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6447.0
Simplified47.0%
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r/N/A
lift-/.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied egg-rr57.6%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l/N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
*-commutativeN/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6457.3
Applied egg-rr57.3%
Applied egg-rr58.6%
Final simplification49.7%
M_m = (fabs.f64 M)
(FPCore (c0 w h D d M_m)
:precision binary64
(let* ((t_0
(* (/ c0 (* 2.0 w)) (* d (/ (* d (* c0 2.0)) (* D (* h (* w D))))))))
(if (<= M_m 6.2e-188) t_0 (if (<= M_m 7.6e-150) 0.0 t_0))))M_m = fabs(M);
double code(double c0, double w, double h, double D, double d, double M_m) {
double t_0 = (c0 / (2.0 * w)) * (d * ((d * (c0 * 2.0)) / (D * (h * (w * D)))));
double tmp;
if (M_m <= 6.2e-188) {
tmp = t_0;
} else if (M_m <= 7.6e-150) {
tmp = 0.0;
} else {
tmp = t_0;
}
return tmp;
}
M_m = abs(m)
real(8) function code(c0, w, h, d, d_1, m_m)
real(8), intent (in) :: c0
real(8), intent (in) :: w
real(8), intent (in) :: h
real(8), intent (in) :: d
real(8), intent (in) :: d_1
real(8), intent (in) :: m_m
real(8) :: t_0
real(8) :: tmp
t_0 = (c0 / (2.0d0 * w)) * (d_1 * ((d_1 * (c0 * 2.0d0)) / (d * (h * (w * d)))))
if (m_m <= 6.2d-188) then
tmp = t_0
else if (m_m <= 7.6d-150) then
tmp = 0.0d0
else
tmp = t_0
end if
code = tmp
end function
M_m = Math.abs(M);
public static double code(double c0, double w, double h, double D, double d, double M_m) {
double t_0 = (c0 / (2.0 * w)) * (d * ((d * (c0 * 2.0)) / (D * (h * (w * D)))));
double tmp;
if (M_m <= 6.2e-188) {
tmp = t_0;
} else if (M_m <= 7.6e-150) {
tmp = 0.0;
} else {
tmp = t_0;
}
return tmp;
}
M_m = math.fabs(M) def code(c0, w, h, D, d, M_m): t_0 = (c0 / (2.0 * w)) * (d * ((d * (c0 * 2.0)) / (D * (h * (w * D))))) tmp = 0 if M_m <= 6.2e-188: tmp = t_0 elif M_m <= 7.6e-150: tmp = 0.0 else: tmp = t_0 return tmp
M_m = abs(M) function code(c0, w, h, D, d, M_m) t_0 = Float64(Float64(c0 / Float64(2.0 * w)) * Float64(d * Float64(Float64(d * Float64(c0 * 2.0)) / Float64(D * Float64(h * Float64(w * D)))))) tmp = 0.0 if (M_m <= 6.2e-188) tmp = t_0; elseif (M_m <= 7.6e-150) tmp = 0.0; else tmp = t_0; end return tmp end
M_m = abs(M); function tmp_2 = code(c0, w, h, D, d, M_m) t_0 = (c0 / (2.0 * w)) * (d * ((d * (c0 * 2.0)) / (D * (h * (w * D))))); tmp = 0.0; if (M_m <= 6.2e-188) tmp = t_0; elseif (M_m <= 7.6e-150) tmp = 0.0; else tmp = t_0; end tmp_2 = tmp; end
M_m = N[Abs[M], $MachinePrecision]
code[c0_, w_, h_, D_, d_, M$95$m_] := Block[{t$95$0 = N[(N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision] * N[(d * N[(N[(d * N[(c0 * 2.0), $MachinePrecision]), $MachinePrecision] / N[(D * N[(h * N[(w * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[M$95$m, 6.2e-188], t$95$0, If[LessEqual[M$95$m, 7.6e-150], 0.0, t$95$0]]]
\begin{array}{l}
M_m = \left|M\right|
\\
\begin{array}{l}
t_0 := \frac{c0}{2 \cdot w} \cdot \left(d \cdot \frac{d \cdot \left(c0 \cdot 2\right)}{D \cdot \left(h \cdot \left(w \cdot D\right)\right)}\right)\\
\mathbf{if}\;M\_m \leq 6.2 \cdot 10^{-188}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;M\_m \leq 7.6 \cdot 10^{-150}:\\
\;\;\;\;0\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if M < 6.2000000000000004e-188 or 7.5999999999999997e-150 < M Initial program 21.4%
Taylor expanded in c0 around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6435.4
Simplified35.4%
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r/N/A
lift-/.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied egg-rr48.2%
if 6.2000000000000004e-188 < M < 7.5999999999999997e-150Initial program 8.9%
Taylor expanded in c0 around -inf
associate-*r*N/A
distribute-lft1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
mul-1-negN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-*.f64N/A
metadata-eval70.2
Simplified70.2%
lift-*.f64N/A
lift-/.f64N/A
mul0-rgtN/A
mul0-rgt70.2
Applied egg-rr70.2%
Final simplification49.3%
M_m = (fabs.f64 M) (FPCore (c0 w h D d M_m) :precision binary64 (let* ((t_0 (* (* d (* c0 d)) (/ c0 (* w (* D (* h (* w D)))))))) (if (<= M_m 6.2e-188) t_0 (if (<= M_m 3.05e-151) 0.0 t_0))))
M_m = fabs(M);
double code(double c0, double w, double h, double D, double d, double M_m) {
double t_0 = (d * (c0 * d)) * (c0 / (w * (D * (h * (w * D)))));
double tmp;
if (M_m <= 6.2e-188) {
tmp = t_0;
} else if (M_m <= 3.05e-151) {
tmp = 0.0;
} else {
tmp = t_0;
}
return tmp;
}
M_m = abs(m)
real(8) function code(c0, w, h, d, d_1, m_m)
real(8), intent (in) :: c0
real(8), intent (in) :: w
real(8), intent (in) :: h
real(8), intent (in) :: d
real(8), intent (in) :: d_1
real(8), intent (in) :: m_m
real(8) :: t_0
real(8) :: tmp
t_0 = (d_1 * (c0 * d_1)) * (c0 / (w * (d * (h * (w * d)))))
if (m_m <= 6.2d-188) then
tmp = t_0
else if (m_m <= 3.05d-151) then
tmp = 0.0d0
else
tmp = t_0
end if
code = tmp
end function
M_m = Math.abs(M);
public static double code(double c0, double w, double h, double D, double d, double M_m) {
double t_0 = (d * (c0 * d)) * (c0 / (w * (D * (h * (w * D)))));
double tmp;
if (M_m <= 6.2e-188) {
tmp = t_0;
} else if (M_m <= 3.05e-151) {
tmp = 0.0;
} else {
tmp = t_0;
}
return tmp;
}
M_m = math.fabs(M) def code(c0, w, h, D, d, M_m): t_0 = (d * (c0 * d)) * (c0 / (w * (D * (h * (w * D))))) tmp = 0 if M_m <= 6.2e-188: tmp = t_0 elif M_m <= 3.05e-151: tmp = 0.0 else: tmp = t_0 return tmp
M_m = abs(M) function code(c0, w, h, D, d, M_m) t_0 = Float64(Float64(d * Float64(c0 * d)) * Float64(c0 / Float64(w * Float64(D * Float64(h * Float64(w * D)))))) tmp = 0.0 if (M_m <= 6.2e-188) tmp = t_0; elseif (M_m <= 3.05e-151) tmp = 0.0; else tmp = t_0; end return tmp end
M_m = abs(M); function tmp_2 = code(c0, w, h, D, d, M_m) t_0 = (d * (c0 * d)) * (c0 / (w * (D * (h * (w * D))))); tmp = 0.0; if (M_m <= 6.2e-188) tmp = t_0; elseif (M_m <= 3.05e-151) tmp = 0.0; else tmp = t_0; end tmp_2 = tmp; end
M_m = N[Abs[M], $MachinePrecision]
code[c0_, w_, h_, D_, d_, M$95$m_] := Block[{t$95$0 = N[(N[(d * N[(c0 * d), $MachinePrecision]), $MachinePrecision] * N[(c0 / N[(w * N[(D * N[(h * N[(w * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[M$95$m, 6.2e-188], t$95$0, If[LessEqual[M$95$m, 3.05e-151], 0.0, t$95$0]]]
\begin{array}{l}
M_m = \left|M\right|
\\
\begin{array}{l}
t_0 := \left(d \cdot \left(c0 \cdot d\right)\right) \cdot \frac{c0}{w \cdot \left(D \cdot \left(h \cdot \left(w \cdot D\right)\right)\right)}\\
\mathbf{if}\;M\_m \leq 6.2 \cdot 10^{-188}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;M\_m \leq 3.05 \cdot 10^{-151}:\\
\;\;\;\;0\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if M < 6.2000000000000004e-188 or 3.05e-151 < M Initial program 21.4%
Taylor expanded in c0 around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6435.4
Simplified35.4%
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r/N/A
lift-/.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied egg-rr48.2%
Taylor expanded in c0 around 0
lower-/.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6431.9
Simplified31.9%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6437.9
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
Applied egg-rr46.1%
if 6.2000000000000004e-188 < M < 3.05e-151Initial program 8.9%
Taylor expanded in c0 around -inf
associate-*r*N/A
distribute-lft1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
mul-1-negN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-*.f64N/A
metadata-eval70.2
Simplified70.2%
lift-*.f64N/A
lift-/.f64N/A
mul0-rgtN/A
mul0-rgt70.2
Applied egg-rr70.2%
Final simplification47.3%
M_m = (fabs.f64 M) (FPCore (c0 w h D d M_m) :precision binary64 0.0)
M_m = fabs(M);
double code(double c0, double w, double h, double D, double d, double M_m) {
return 0.0;
}
M_m = abs(m)
real(8) function code(c0, w, h, d, d_1, m_m)
real(8), intent (in) :: c0
real(8), intent (in) :: w
real(8), intent (in) :: h
real(8), intent (in) :: d
real(8), intent (in) :: d_1
real(8), intent (in) :: m_m
code = 0.0d0
end function
M_m = Math.abs(M);
public static double code(double c0, double w, double h, double D, double d, double M_m) {
return 0.0;
}
M_m = math.fabs(M) def code(c0, w, h, D, d, M_m): return 0.0
M_m = abs(M) function code(c0, w, h, D, d, M_m) return 0.0 end
M_m = abs(M); function tmp = code(c0, w, h, D, d, M_m) tmp = 0.0; end
M_m = N[Abs[M], $MachinePrecision] code[c0_, w_, h_, D_, d_, M$95$m_] := 0.0
\begin{array}{l}
M_m = \left|M\right|
\\
0
\end{array}
Initial program 20.8%
Taylor expanded in c0 around -inf
associate-*r*N/A
distribute-lft1-inN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
mul-1-negN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-*.f64N/A
metadata-eval26.6
Simplified26.6%
lift-*.f64N/A
lift-/.f64N/A
mul0-rgtN/A
mul0-rgt29.1
Applied egg-rr29.1%
herbie shell --seed 2024219
(FPCore (c0 w h D d M)
:name "Henrywood and Agarwal, Equation (13)"
:precision binary64
(* (/ c0 (* 2.0 w)) (+ (/ (* c0 (* d d)) (* (* w h) (* D D))) (sqrt (- (* (/ (* c0 (* d d)) (* (* w h) (* D D))) (/ (* c0 (* d d)) (* (* w h) (* D D)))) (* M M))))))