
(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 9 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}
(FPCore (c0 w h D d M)
:precision binary64
(let* ((t_0 (/ c0 (* 2.0 w))) (t_1 (/ (* c0 (* d d)) (* (* D D) (* w h)))))
(if (<= (* t_0 (+ t_1 (sqrt (- (* t_1 t_1) (* M M))))) INFINITY)
(* t_0 (* 2.0 (/ (* c0 (pow d 2.0)) (* (pow D 2.0) (* w h)))))
0.0)))
double code(double c0, double w, double h, double D, double d, double M) {
double t_0 = c0 / (2.0 * w);
double t_1 = (c0 * (d * d)) / ((D * D) * (w * h));
double tmp;
if ((t_0 * (t_1 + sqrt(((t_1 * t_1) - (M * M))))) <= ((double) INFINITY)) {
tmp = t_0 * (2.0 * ((c0 * pow(d, 2.0)) / (pow(D, 2.0) * (w * h))));
} else {
tmp = 0.0;
}
return tmp;
}
public static double code(double c0, double w, double h, double D, double d, double M) {
double t_0 = c0 / (2.0 * w);
double t_1 = (c0 * (d * d)) / ((D * D) * (w * h));
double tmp;
if ((t_0 * (t_1 + Math.sqrt(((t_1 * t_1) - (M * M))))) <= Double.POSITIVE_INFINITY) {
tmp = t_0 * (2.0 * ((c0 * Math.pow(d, 2.0)) / (Math.pow(D, 2.0) * (w * h))));
} else {
tmp = 0.0;
}
return tmp;
}
def code(c0, w, h, D, d, M): t_0 = c0 / (2.0 * w) t_1 = (c0 * (d * d)) / ((D * D) * (w * h)) tmp = 0 if (t_0 * (t_1 + math.sqrt(((t_1 * t_1) - (M * M))))) <= math.inf: tmp = t_0 * (2.0 * ((c0 * math.pow(d, 2.0)) / (math.pow(D, 2.0) * (w * h)))) else: tmp = 0.0 return tmp
function code(c0, w, h, D, d, M) t_0 = Float64(c0 / Float64(2.0 * w)) t_1 = Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(D * D) * Float64(w * h))) tmp = 0.0 if (Float64(t_0 * Float64(t_1 + sqrt(Float64(Float64(t_1 * t_1) - Float64(M * M))))) <= Inf) tmp = Float64(t_0 * Float64(2.0 * Float64(Float64(c0 * (d ^ 2.0)) / Float64((D ^ 2.0) * Float64(w * h))))); else tmp = 0.0; end return tmp end
function tmp_2 = code(c0, w, h, D, d, M) t_0 = c0 / (2.0 * w); t_1 = (c0 * (d * d)) / ((D * D) * (w * h)); tmp = 0.0; if ((t_0 * (t_1 + sqrt(((t_1 * t_1) - (M * M))))) <= Inf) tmp = t_0 * (2.0 * ((c0 * (d ^ 2.0)) / ((D ^ 2.0) * (w * h)))); else tmp = 0.0; end tmp_2 = tmp; end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(D * D), $MachinePrecision] * N[(w * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$0 * N[(t$95$1 + N[Sqrt[N[(N[(t$95$1 * t$95$1), $MachinePrecision] - N[(M * M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(t$95$0 * N[(2.0 * N[(N[(c0 * N[Power[d, 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[D, 2.0], $MachinePrecision] * N[(w * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{c0}{2 \cdot w}\\
t_1 := \frac{c0 \cdot \left(d \cdot d\right)}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}\\
\mathbf{if}\;t_0 \cdot \left(t_1 + \sqrt{t_1 \cdot t_1 - M \cdot M}\right) \leq \infty:\\
\;\;\;\;t_0 \cdot \left(2 \cdot \frac{c0 \cdot {d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if (*.f64 (/.f64 c0 (*.f64 2 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 81.2%
Simplified78.4%
Taylor expanded in c0 around inf 82.0%
if +inf.0 < (*.f64 (/.f64 c0 (*.f64 2 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%
Simplified2.4%
Taylor expanded in c0 around -inf 2.9%
associate-*r*2.9%
neg-mul-12.9%
distribute-lft1-in2.9%
metadata-eval2.9%
mul0-lft37.7%
distribute-lft-neg-in37.7%
distribute-rgt-neg-in37.7%
metadata-eval37.7%
Simplified37.7%
Taylor expanded in c0 around 0 44.9%
Final simplification55.8%
(FPCore (c0 w h D d M)
:precision binary64
(let* ((t_0 (/ (* c0 (* d d)) (* (* D D) (* w h))))
(t_1 (* (/ c0 (* 2.0 w)) (+ t_0 (sqrt (- (* t_0 t_0) (* M M)))))))
(if (<= t_1 INFINITY) t_1 0.0)))
double code(double c0, double w, double h, double D, double d, double M) {
double t_0 = (c0 * (d * d)) / ((D * D) * (w * h));
double t_1 = (c0 / (2.0 * w)) * (t_0 + sqrt(((t_0 * t_0) - (M * M))));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = 0.0;
}
return tmp;
}
public static double code(double c0, double w, double h, double D, double d, double M) {
double t_0 = (c0 * (d * d)) / ((D * D) * (w * h));
double t_1 = (c0 / (2.0 * w)) * (t_0 + Math.sqrt(((t_0 * t_0) - (M * M))));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = 0.0;
}
return tmp;
}
def code(c0, w, h, D, d, M): t_0 = (c0 * (d * d)) / ((D * D) * (w * h)) t_1 = (c0 / (2.0 * w)) * (t_0 + math.sqrt(((t_0 * t_0) - (M * M)))) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = 0.0 return tmp
function code(c0, w, h, D, d, M) t_0 = Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(D * D) * Float64(w * h))) t_1 = Float64(Float64(c0 / Float64(2.0 * w)) * Float64(t_0 + sqrt(Float64(Float64(t_0 * t_0) - Float64(M * M))))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = 0.0; end return tmp end
function tmp_2 = code(c0, w, h, D, d, M) t_0 = (c0 * (d * d)) / ((D * D) * (w * h)); t_1 = (c0 / (2.0 * w)) * (t_0 + sqrt(((t_0 * t_0) - (M * M)))); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = 0.0; end tmp_2 = tmp; end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(D * D), $MachinePrecision] * N[(w * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, Infinity], t$95$1, 0.0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{c0 \cdot \left(d \cdot d\right)}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}\\
t_1 := \frac{c0}{2 \cdot w} \cdot \left(t_0 + \sqrt{t_0 \cdot t_0 - M \cdot M}\right)\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if (*.f64 (/.f64 c0 (*.f64 2 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 81.2%
if +inf.0 < (*.f64 (/.f64 c0 (*.f64 2 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%
Simplified2.4%
Taylor expanded in c0 around -inf 2.9%
associate-*r*2.9%
neg-mul-12.9%
distribute-lft1-in2.9%
metadata-eval2.9%
mul0-lft37.7%
distribute-lft-neg-in37.7%
distribute-rgt-neg-in37.7%
metadata-eval37.7%
Simplified37.7%
Taylor expanded in c0 around 0 44.9%
Final simplification55.6%
(FPCore (c0 w h D d M)
:precision binary64
(let* ((t_0 (pow (/ d D) 2.0)))
(if (<= (* M M) 2e-316)
0.0
(if (<= (* M M) 2.6e-302)
(/ (* (/ c0 w) (* 2.0 (* t_0 (/ (/ c0 w) h)))) 2.0)
(if (<= (* M M) 9.8e-243)
0.0
(if (<= (* M M) 1.9e-72)
(* (/ (/ c0 w) 2.0) (* 2.0 (/ 1.0 (* (/ w c0) (/ h t_0)))))
(if (<= (* M M) 1.15e+77)
0.0
(* (* (/ c0 w) t_0) (/ c0 (* w h))))))))))
double code(double c0, double w, double h, double D, double d, double M) {
double t_0 = pow((d / D), 2.0);
double tmp;
if ((M * M) <= 2e-316) {
tmp = 0.0;
} else if ((M * M) <= 2.6e-302) {
tmp = ((c0 / w) * (2.0 * (t_0 * ((c0 / w) / h)))) / 2.0;
} else if ((M * M) <= 9.8e-243) {
tmp = 0.0;
} else if ((M * M) <= 1.9e-72) {
tmp = ((c0 / w) / 2.0) * (2.0 * (1.0 / ((w / c0) * (h / t_0))));
} else if ((M * M) <= 1.15e+77) {
tmp = 0.0;
} else {
tmp = ((c0 / w) * t_0) * (c0 / (w * h));
}
return tmp;
}
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
real(8) :: tmp
t_0 = (d_1 / d) ** 2.0d0
if ((m * m) <= 2d-316) then
tmp = 0.0d0
else if ((m * m) <= 2.6d-302) then
tmp = ((c0 / w) * (2.0d0 * (t_0 * ((c0 / w) / h)))) / 2.0d0
else if ((m * m) <= 9.8d-243) then
tmp = 0.0d0
else if ((m * m) <= 1.9d-72) then
tmp = ((c0 / w) / 2.0d0) * (2.0d0 * (1.0d0 / ((w / c0) * (h / t_0))))
else if ((m * m) <= 1.15d+77) then
tmp = 0.0d0
else
tmp = ((c0 / w) * t_0) * (c0 / (w * h))
end if
code = tmp
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
double t_0 = Math.pow((d / D), 2.0);
double tmp;
if ((M * M) <= 2e-316) {
tmp = 0.0;
} else if ((M * M) <= 2.6e-302) {
tmp = ((c0 / w) * (2.0 * (t_0 * ((c0 / w) / h)))) / 2.0;
} else if ((M * M) <= 9.8e-243) {
tmp = 0.0;
} else if ((M * M) <= 1.9e-72) {
tmp = ((c0 / w) / 2.0) * (2.0 * (1.0 / ((w / c0) * (h / t_0))));
} else if ((M * M) <= 1.15e+77) {
tmp = 0.0;
} else {
tmp = ((c0 / w) * t_0) * (c0 / (w * h));
}
return tmp;
}
def code(c0, w, h, D, d, M): t_0 = math.pow((d / D), 2.0) tmp = 0 if (M * M) <= 2e-316: tmp = 0.0 elif (M * M) <= 2.6e-302: tmp = ((c0 / w) * (2.0 * (t_0 * ((c0 / w) / h)))) / 2.0 elif (M * M) <= 9.8e-243: tmp = 0.0 elif (M * M) <= 1.9e-72: tmp = ((c0 / w) / 2.0) * (2.0 * (1.0 / ((w / c0) * (h / t_0)))) elif (M * M) <= 1.15e+77: tmp = 0.0 else: tmp = ((c0 / w) * t_0) * (c0 / (w * h)) return tmp
function code(c0, w, h, D, d, M) t_0 = Float64(d / D) ^ 2.0 tmp = 0.0 if (Float64(M * M) <= 2e-316) tmp = 0.0; elseif (Float64(M * M) <= 2.6e-302) tmp = Float64(Float64(Float64(c0 / w) * Float64(2.0 * Float64(t_0 * Float64(Float64(c0 / w) / h)))) / 2.0); elseif (Float64(M * M) <= 9.8e-243) tmp = 0.0; elseif (Float64(M * M) <= 1.9e-72) tmp = Float64(Float64(Float64(c0 / w) / 2.0) * Float64(2.0 * Float64(1.0 / Float64(Float64(w / c0) * Float64(h / t_0))))); elseif (Float64(M * M) <= 1.15e+77) tmp = 0.0; else tmp = Float64(Float64(Float64(c0 / w) * t_0) * Float64(c0 / Float64(w * h))); end return tmp end
function tmp_2 = code(c0, w, h, D, d, M) t_0 = (d / D) ^ 2.0; tmp = 0.0; if ((M * M) <= 2e-316) tmp = 0.0; elseif ((M * M) <= 2.6e-302) tmp = ((c0 / w) * (2.0 * (t_0 * ((c0 / w) / h)))) / 2.0; elseif ((M * M) <= 9.8e-243) tmp = 0.0; elseif ((M * M) <= 1.9e-72) tmp = ((c0 / w) / 2.0) * (2.0 * (1.0 / ((w / c0) * (h / t_0)))); elseif ((M * M) <= 1.15e+77) tmp = 0.0; else tmp = ((c0 / w) * t_0) * (c0 / (w * h)); end tmp_2 = tmp; end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[Power[N[(d / D), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[N[(M * M), $MachinePrecision], 2e-316], 0.0, If[LessEqual[N[(M * M), $MachinePrecision], 2.6e-302], N[(N[(N[(c0 / w), $MachinePrecision] * N[(2.0 * N[(t$95$0 * N[(N[(c0 / w), $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], If[LessEqual[N[(M * M), $MachinePrecision], 9.8e-243], 0.0, If[LessEqual[N[(M * M), $MachinePrecision], 1.9e-72], N[(N[(N[(c0 / w), $MachinePrecision] / 2.0), $MachinePrecision] * N[(2.0 * N[(1.0 / N[(N[(w / c0), $MachinePrecision] * N[(h / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(M * M), $MachinePrecision], 1.15e+77], 0.0, N[(N[(N[(c0 / w), $MachinePrecision] * t$95$0), $MachinePrecision] * N[(c0 / N[(w * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\frac{d}{D}\right)}^{2}\\
\mathbf{if}\;M \cdot M \leq 2 \cdot 10^{-316}:\\
\;\;\;\;0\\
\mathbf{elif}\;M \cdot M \leq 2.6 \cdot 10^{-302}:\\
\;\;\;\;\frac{\frac{c0}{w} \cdot \left(2 \cdot \left(t_0 \cdot \frac{\frac{c0}{w}}{h}\right)\right)}{2}\\
\mathbf{elif}\;M \cdot M \leq 9.8 \cdot 10^{-243}:\\
\;\;\;\;0\\
\mathbf{elif}\;M \cdot M \leq 1.9 \cdot 10^{-72}:\\
\;\;\;\;\frac{\frac{c0}{w}}{2} \cdot \left(2 \cdot \frac{1}{\frac{w}{c0} \cdot \frac{h}{t_0}}\right)\\
\mathbf{elif}\;M \cdot M \leq 1.15 \cdot 10^{+77}:\\
\;\;\;\;0\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{c0}{w} \cdot t_0\right) \cdot \frac{c0}{w \cdot h}\\
\end{array}
\end{array}
if (*.f64 M M) < 2.000000017e-316 or 2.60000000000000011e-302 < (*.f64 M M) < 9.8e-243 or 1.90000000000000001e-72 < (*.f64 M M) < 1.14999999999999997e77Initial program 23.7%
Simplified25.4%
Taylor expanded in c0 around -inf 10.4%
associate-*r*10.4%
neg-mul-110.4%
distribute-lft1-in10.4%
metadata-eval10.4%
mul0-lft45.4%
distribute-lft-neg-in45.4%
distribute-rgt-neg-in45.4%
metadata-eval45.4%
Simplified45.4%
Taylor expanded in c0 around 0 54.7%
if 2.000000017e-316 < (*.f64 M M) < 2.60000000000000011e-302Initial program 60.6%
Simplified99.7%
Taylor expanded in h around 0 0.0%
+-commutative0.0%
*-commutative0.0%
*-commutative0.0%
times-frac0.0%
associate-/r*0.0%
times-frac0.0%
*-commutative0.0%
*-commutative0.0%
times-frac0.0%
associate-/r*0.0%
Simplified60.6%
expm1-log1p-u60.6%
expm1-udef60.6%
Applied egg-rr82.0%
expm1-def97.9%
expm1-log1p99.7%
associate-/l/98.6%
*-commutative98.6%
div098.6%
div098.6%
Simplified98.6%
associate-/r*98.4%
pow298.4%
fma-def98.4%
associate-*l/98.3%
frac-times98.6%
pow298.6%
*-commutative98.6%
div098.6%
fma-def98.6%
associate-*l/98.6%
frac-times99.7%
fma-def99.7%
pow299.7%
div099.7%
Applied egg-rr99.7%
fma-def99.7%
+-rgt-identity99.7%
count-299.7%
associate-*l/99.7%
associate-*r/99.7%
associate-/r*98.3%
*-commutative98.3%
associate-*r/98.4%
Simplified98.4%
associate-*l/98.4%
associate-/l/99.7%
Applied egg-rr99.7%
if 9.8e-243 < (*.f64 M M) < 1.90000000000000001e-72Initial program 42.5%
Simplified54.6%
Taylor expanded in h around 0 0.2%
+-commutative0.2%
*-commutative0.2%
*-commutative0.2%
times-frac3.8%
associate-/r*3.8%
times-frac0.2%
*-commutative0.2%
*-commutative0.2%
times-frac3.8%
associate-/r*3.8%
Simplified46.4%
expm1-log1p-u45.8%
expm1-udef45.8%
Applied egg-rr49.7%
expm1-def49.7%
expm1-log1p50.4%
associate-/l/46.6%
*-commutative46.6%
div046.6%
div054.6%
Simplified54.6%
associate-/r*54.7%
pow254.7%
fma-def54.7%
associate-*l/54.7%
frac-times54.6%
pow254.6%
*-commutative54.6%
div054.6%
fma-def54.6%
associate-*l/54.6%
frac-times58.7%
fma-def58.7%
pow258.7%
div058.7%
Applied egg-rr58.7%
fma-def58.7%
+-rgt-identity58.7%
count-258.7%
associate-*l/58.5%
associate-*r/58.6%
associate-/r*54.7%
*-commutative54.7%
associate-*r/54.7%
Simplified54.7%
pow254.7%
associate-/r*58.4%
add-cbrt-cube47.3%
unpow347.3%
*-commutative47.3%
unpow347.3%
add-cbrt-cube58.4%
associate-/l/54.7%
frac-times46.6%
times-frac43.0%
clear-num43.0%
associate-*l*39.3%
pow239.3%
pow239.3%
Applied egg-rr39.3%
times-frac39.4%
associate-/l*50.7%
unpow250.7%
unpow250.7%
times-frac58.8%
unpow258.8%
Simplified58.8%
if 1.14999999999999997e77 < (*.f64 M M) Initial program 17.0%
Simplified41.0%
Taylor expanded in h around 0 3.5%
+-commutative3.5%
*-commutative3.5%
*-commutative3.5%
times-frac3.5%
associate-/r*3.5%
times-frac3.2%
*-commutative3.2%
*-commutative3.2%
times-frac3.5%
associate-/r*3.5%
Simplified36.5%
expm1-log1p-u31.4%
expm1-udef31.4%
Applied egg-rr35.5%
expm1-def35.5%
expm1-log1p43.0%
associate-/l/43.0%
*-commutative43.0%
div043.0%
div049.2%
Simplified49.2%
associate-/r*49.2%
pow249.2%
fma-def49.2%
associate-*l/49.2%
frac-times49.0%
pow249.0%
*-commutative49.0%
div049.0%
fma-def49.0%
associate-*l/49.0%
frac-times49.1%
fma-def49.1%
pow249.1%
div049.1%
Applied egg-rr49.1%
fma-def49.1%
+-rgt-identity49.1%
count-249.1%
associate-*l/49.1%
associate-*r/49.1%
associate-/r*49.3%
*-commutative49.3%
associate-*r/49.2%
Simplified49.2%
Applied egg-rr21.4%
expm1-def21.6%
expm1-log1p49.2%
associate-*r*49.2%
associate-*r*50.2%
associate-*l*50.2%
metadata-eval50.2%
*-rgt-identity50.2%
unpow250.2%
times-frac36.5%
unpow236.5%
unpow236.5%
times-frac37.4%
*-commutative37.4%
*-commutative37.4%
times-frac36.5%
unpow236.5%
unpow236.5%
times-frac50.2%
unpow250.2%
associate-/l/50.1%
Simplified50.1%
Final simplification54.3%
(FPCore (c0 w h D d M)
:precision binary64
(let* ((t_0 (pow (/ d D) 2.0))
(t_1 (/ (* (/ c0 w) (* 2.0 (* t_0 (/ (/ c0 w) h)))) 2.0)))
(if (<= M 1.9e-158)
0.0
(if (<= M 7e-149)
t_1
(if (<= M 1.3e-121)
0.0
(if (<= M 3.2e-37)
t_1
(if (<= M 1.5e+38) 0.0 (* (* (/ c0 w) t_0) (/ c0 (* w h))))))))))
double code(double c0, double w, double h, double D, double d, double M) {
double t_0 = pow((d / D), 2.0);
double t_1 = ((c0 / w) * (2.0 * (t_0 * ((c0 / w) / h)))) / 2.0;
double tmp;
if (M <= 1.9e-158) {
tmp = 0.0;
} else if (M <= 7e-149) {
tmp = t_1;
} else if (M <= 1.3e-121) {
tmp = 0.0;
} else if (M <= 3.2e-37) {
tmp = t_1;
} else if (M <= 1.5e+38) {
tmp = 0.0;
} else {
tmp = ((c0 / w) * t_0) * (c0 / (w * h));
}
return tmp;
}
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
real(8) :: t_1
real(8) :: tmp
t_0 = (d_1 / d) ** 2.0d0
t_1 = ((c0 / w) * (2.0d0 * (t_0 * ((c0 / w) / h)))) / 2.0d0
if (m <= 1.9d-158) then
tmp = 0.0d0
else if (m <= 7d-149) then
tmp = t_1
else if (m <= 1.3d-121) then
tmp = 0.0d0
else if (m <= 3.2d-37) then
tmp = t_1
else if (m <= 1.5d+38) then
tmp = 0.0d0
else
tmp = ((c0 / w) * t_0) * (c0 / (w * h))
end if
code = tmp
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
double t_0 = Math.pow((d / D), 2.0);
double t_1 = ((c0 / w) * (2.0 * (t_0 * ((c0 / w) / h)))) / 2.0;
double tmp;
if (M <= 1.9e-158) {
tmp = 0.0;
} else if (M <= 7e-149) {
tmp = t_1;
} else if (M <= 1.3e-121) {
tmp = 0.0;
} else if (M <= 3.2e-37) {
tmp = t_1;
} else if (M <= 1.5e+38) {
tmp = 0.0;
} else {
tmp = ((c0 / w) * t_0) * (c0 / (w * h));
}
return tmp;
}
def code(c0, w, h, D, d, M): t_0 = math.pow((d / D), 2.0) t_1 = ((c0 / w) * (2.0 * (t_0 * ((c0 / w) / h)))) / 2.0 tmp = 0 if M <= 1.9e-158: tmp = 0.0 elif M <= 7e-149: tmp = t_1 elif M <= 1.3e-121: tmp = 0.0 elif M <= 3.2e-37: tmp = t_1 elif M <= 1.5e+38: tmp = 0.0 else: tmp = ((c0 / w) * t_0) * (c0 / (w * h)) return tmp
function code(c0, w, h, D, d, M) t_0 = Float64(d / D) ^ 2.0 t_1 = Float64(Float64(Float64(c0 / w) * Float64(2.0 * Float64(t_0 * Float64(Float64(c0 / w) / h)))) / 2.0) tmp = 0.0 if (M <= 1.9e-158) tmp = 0.0; elseif (M <= 7e-149) tmp = t_1; elseif (M <= 1.3e-121) tmp = 0.0; elseif (M <= 3.2e-37) tmp = t_1; elseif (M <= 1.5e+38) tmp = 0.0; else tmp = Float64(Float64(Float64(c0 / w) * t_0) * Float64(c0 / Float64(w * h))); end return tmp end
function tmp_2 = code(c0, w, h, D, d, M) t_0 = (d / D) ^ 2.0; t_1 = ((c0 / w) * (2.0 * (t_0 * ((c0 / w) / h)))) / 2.0; tmp = 0.0; if (M <= 1.9e-158) tmp = 0.0; elseif (M <= 7e-149) tmp = t_1; elseif (M <= 1.3e-121) tmp = 0.0; elseif (M <= 3.2e-37) tmp = t_1; elseif (M <= 1.5e+38) tmp = 0.0; else tmp = ((c0 / w) * t_0) * (c0 / (w * h)); end tmp_2 = tmp; end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[Power[N[(d / D), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(c0 / w), $MachinePrecision] * N[(2.0 * N[(t$95$0 * N[(N[(c0 / w), $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]}, If[LessEqual[M, 1.9e-158], 0.0, If[LessEqual[M, 7e-149], t$95$1, If[LessEqual[M, 1.3e-121], 0.0, If[LessEqual[M, 3.2e-37], t$95$1, If[LessEqual[M, 1.5e+38], 0.0, N[(N[(N[(c0 / w), $MachinePrecision] * t$95$0), $MachinePrecision] * N[(c0 / N[(w * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\frac{d}{D}\right)}^{2}\\
t_1 := \frac{\frac{c0}{w} \cdot \left(2 \cdot \left(t_0 \cdot \frac{\frac{c0}{w}}{h}\right)\right)}{2}\\
\mathbf{if}\;M \leq 1.9 \cdot 10^{-158}:\\
\;\;\;\;0\\
\mathbf{elif}\;M \leq 7 \cdot 10^{-149}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;M \leq 1.3 \cdot 10^{-121}:\\
\;\;\;\;0\\
\mathbf{elif}\;M \leq 3.2 \cdot 10^{-37}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;M \leq 1.5 \cdot 10^{+38}:\\
\;\;\;\;0\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{c0}{w} \cdot t_0\right) \cdot \frac{c0}{w \cdot h}\\
\end{array}
\end{array}
if M < 1.8999999999999999e-158 or 7e-149 < M < 1.29999999999999993e-121 or 3.1999999999999999e-37 < M < 1.5000000000000001e38Initial program 24.7%
Simplified25.8%
Taylor expanded in c0 around -inf 6.8%
associate-*r*6.8%
neg-mul-16.8%
distribute-lft1-in6.8%
metadata-eval6.8%
mul0-lft34.3%
distribute-lft-neg-in34.3%
distribute-rgt-neg-in34.3%
metadata-eval34.3%
Simplified34.3%
Taylor expanded in c0 around 0 41.0%
if 1.8999999999999999e-158 < M < 7e-149 or 1.29999999999999993e-121 < M < 3.1999999999999999e-37Initial program 33.5%
Simplified54.1%
Taylor expanded in h around 0 0.0%
+-commutative0.0%
*-commutative0.0%
*-commutative0.0%
times-frac0.0%
associate-/r*0.0%
times-frac0.0%
*-commutative0.0%
*-commutative0.0%
times-frac0.0%
associate-/r*0.0%
Simplified33.7%
expm1-log1p-u33.5%
expm1-udef33.5%
Applied egg-rr39.4%
expm1-def39.4%
expm1-log1p40.4%
associate-/l/40.0%
*-commutative40.0%
div040.0%
div054.0%
Simplified54.0%
associate-/r*54.0%
pow254.0%
fma-def54.0%
associate-*l/54.0%
frac-times54.0%
pow254.0%
*-commutative54.0%
div054.0%
fma-def54.0%
associate-*l/54.0%
frac-times54.6%
fma-def54.6%
pow254.6%
div054.6%
Applied egg-rr54.6%
fma-def54.6%
+-rgt-identity54.6%
count-254.6%
associate-*l/54.2%
associate-*r/54.2%
associate-/r*54.0%
*-commutative54.0%
associate-*r/54.0%
Simplified54.0%
associate-*l/54.0%
associate-/l/54.3%
Applied egg-rr54.3%
if 1.5000000000000001e38 < M Initial program 16.6%
Simplified39.3%
Taylor expanded in h around 0 7.4%
+-commutative7.4%
*-commutative7.4%
*-commutative7.4%
times-frac7.4%
associate-/r*7.4%
times-frac6.8%
*-commutative6.8%
*-commutative6.8%
times-frac7.4%
associate-/r*7.4%
Simplified37.4%
expm1-log1p-u29.7%
expm1-udef29.7%
Applied egg-rr34.1%
expm1-def34.1%
expm1-log1p44.5%
associate-/l/44.5%
*-commutative44.5%
div044.5%
div051.3%
Simplified51.3%
associate-/r*51.3%
pow251.3%
fma-def51.3%
associate-*l/51.3%
frac-times50.8%
pow250.8%
*-commutative50.8%
div050.8%
fma-def50.8%
associate-*l/50.9%
frac-times50.9%
fma-def50.9%
pow250.9%
div050.9%
Applied egg-rr50.9%
fma-def50.9%
+-rgt-identity50.9%
count-250.9%
associate-*l/50.9%
associate-*r/50.9%
associate-/r*51.4%
*-commutative51.4%
associate-*r/51.3%
Simplified51.3%
Applied egg-rr14.2%
expm1-def14.6%
expm1-log1p51.3%
associate-*r*51.3%
associate-*r*51.3%
associate-*l*51.3%
metadata-eval51.3%
*-rgt-identity51.3%
unpow251.3%
times-frac37.4%
unpow237.4%
unpow237.4%
times-frac37.3%
*-commutative37.3%
*-commutative37.3%
times-frac37.4%
unpow237.4%
unpow237.4%
times-frac51.3%
unpow251.3%
associate-/l/51.3%
Simplified51.3%
Final simplification43.6%
(FPCore (c0 w h D d M)
:precision binary64
(let* ((t_0 (/ c0 (* w h))) (t_1 (* (* (/ c0 w) (pow (/ d D) 2.0)) t_0)))
(if (<= M 1.72e-158)
0.0
(if (<= M 6.8e-155)
t_1
(if (<= M 1.3e-121)
0.0
(if (<= M 5.5e-38)
(* (/ (/ c0 w) 2.0) (* 2.0 (* t_0 (* (/ d D) (/ d D)))))
(if (<= M 2.2e+38) 0.0 t_1)))))))
double code(double c0, double w, double h, double D, double d, double M) {
double t_0 = c0 / (w * h);
double t_1 = ((c0 / w) * pow((d / D), 2.0)) * t_0;
double tmp;
if (M <= 1.72e-158) {
tmp = 0.0;
} else if (M <= 6.8e-155) {
tmp = t_1;
} else if (M <= 1.3e-121) {
tmp = 0.0;
} else if (M <= 5.5e-38) {
tmp = ((c0 / w) / 2.0) * (2.0 * (t_0 * ((d / D) * (d / D))));
} else if (M <= 2.2e+38) {
tmp = 0.0;
} else {
tmp = t_1;
}
return tmp;
}
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
real(8) :: t_1
real(8) :: tmp
t_0 = c0 / (w * h)
t_1 = ((c0 / w) * ((d_1 / d) ** 2.0d0)) * t_0
if (m <= 1.72d-158) then
tmp = 0.0d0
else if (m <= 6.8d-155) then
tmp = t_1
else if (m <= 1.3d-121) then
tmp = 0.0d0
else if (m <= 5.5d-38) then
tmp = ((c0 / w) / 2.0d0) * (2.0d0 * (t_0 * ((d_1 / d) * (d_1 / d))))
else if (m <= 2.2d+38) then
tmp = 0.0d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
double t_0 = c0 / (w * h);
double t_1 = ((c0 / w) * Math.pow((d / D), 2.0)) * t_0;
double tmp;
if (M <= 1.72e-158) {
tmp = 0.0;
} else if (M <= 6.8e-155) {
tmp = t_1;
} else if (M <= 1.3e-121) {
tmp = 0.0;
} else if (M <= 5.5e-38) {
tmp = ((c0 / w) / 2.0) * (2.0 * (t_0 * ((d / D) * (d / D))));
} else if (M <= 2.2e+38) {
tmp = 0.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(c0, w, h, D, d, M): t_0 = c0 / (w * h) t_1 = ((c0 / w) * math.pow((d / D), 2.0)) * t_0 tmp = 0 if M <= 1.72e-158: tmp = 0.0 elif M <= 6.8e-155: tmp = t_1 elif M <= 1.3e-121: tmp = 0.0 elif M <= 5.5e-38: tmp = ((c0 / w) / 2.0) * (2.0 * (t_0 * ((d / D) * (d / D)))) elif M <= 2.2e+38: tmp = 0.0 else: tmp = t_1 return tmp
function code(c0, w, h, D, d, M) t_0 = Float64(c0 / Float64(w * h)) t_1 = Float64(Float64(Float64(c0 / w) * (Float64(d / D) ^ 2.0)) * t_0) tmp = 0.0 if (M <= 1.72e-158) tmp = 0.0; elseif (M <= 6.8e-155) tmp = t_1; elseif (M <= 1.3e-121) tmp = 0.0; elseif (M <= 5.5e-38) tmp = Float64(Float64(Float64(c0 / w) / 2.0) * Float64(2.0 * Float64(t_0 * Float64(Float64(d / D) * Float64(d / D))))); elseif (M <= 2.2e+38) tmp = 0.0; else tmp = t_1; end return tmp end
function tmp_2 = code(c0, w, h, D, d, M) t_0 = c0 / (w * h); t_1 = ((c0 / w) * ((d / D) ^ 2.0)) * t_0; tmp = 0.0; if (M <= 1.72e-158) tmp = 0.0; elseif (M <= 6.8e-155) tmp = t_1; elseif (M <= 1.3e-121) tmp = 0.0; elseif (M <= 5.5e-38) tmp = ((c0 / w) / 2.0) * (2.0 * (t_0 * ((d / D) * (d / D)))); elseif (M <= 2.2e+38) tmp = 0.0; else tmp = t_1; end tmp_2 = tmp; end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(c0 / N[(w * h), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(c0 / w), $MachinePrecision] * N[Power[N[(d / D), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[M, 1.72e-158], 0.0, If[LessEqual[M, 6.8e-155], t$95$1, If[LessEqual[M, 1.3e-121], 0.0, If[LessEqual[M, 5.5e-38], N[(N[(N[(c0 / w), $MachinePrecision] / 2.0), $MachinePrecision] * N[(2.0 * N[(t$95$0 * N[(N[(d / D), $MachinePrecision] * N[(d / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[M, 2.2e+38], 0.0, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{c0}{w \cdot h}\\
t_1 := \left(\frac{c0}{w} \cdot {\left(\frac{d}{D}\right)}^{2}\right) \cdot t_0\\
\mathbf{if}\;M \leq 1.72 \cdot 10^{-158}:\\
\;\;\;\;0\\
\mathbf{elif}\;M \leq 6.8 \cdot 10^{-155}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;M \leq 1.3 \cdot 10^{-121}:\\
\;\;\;\;0\\
\mathbf{elif}\;M \leq 5.5 \cdot 10^{-38}:\\
\;\;\;\;\frac{\frac{c0}{w}}{2} \cdot \left(2 \cdot \left(t_0 \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right)\right)\\
\mathbf{elif}\;M \leq 2.2 \cdot 10^{+38}:\\
\;\;\;\;0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if M < 1.72e-158 or 6.8e-155 < M < 1.29999999999999993e-121 or 5.50000000000000005e-38 < M < 2.20000000000000006e38Initial program 24.7%
Simplified25.8%
Taylor expanded in c0 around -inf 6.8%
associate-*r*6.8%
neg-mul-16.8%
distribute-lft1-in6.8%
metadata-eval6.8%
mul0-lft34.3%
distribute-lft-neg-in34.3%
distribute-rgt-neg-in34.3%
metadata-eval34.3%
Simplified34.3%
Taylor expanded in c0 around 0 41.0%
if 1.72e-158 < M < 6.8e-155 or 2.20000000000000006e38 < M Initial program 18.1%
Simplified41.9%
Taylor expanded in h around 0 7.1%
+-commutative7.1%
*-commutative7.1%
*-commutative7.1%
times-frac7.1%
associate-/r*7.1%
times-frac6.5%
*-commutative6.5%
*-commutative6.5%
times-frac7.1%
associate-/r*7.1%
Simplified38.0%
expm1-log1p-u30.6%
expm1-udef30.6%
Applied egg-rr36.8%
expm1-def36.8%
expm1-log1p46.8%
associate-/l/46.8%
*-commutative46.8%
div046.8%
div053.3%
Simplified53.3%
associate-/r*53.3%
pow253.3%
fma-def53.3%
associate-*l/53.3%
frac-times52.8%
pow252.8%
*-commutative52.8%
div052.8%
fma-def52.8%
associate-*l/52.9%
frac-times53.0%
fma-def53.0%
pow253.0%
div053.0%
Applied egg-rr53.0%
fma-def53.0%
+-rgt-identity53.0%
count-253.0%
associate-*l/53.0%
associate-*r/52.9%
associate-/r*53.3%
*-commutative53.3%
associate-*r/53.3%
Simplified53.3%
Applied egg-rr13.6%
expm1-def16.1%
expm1-log1p53.4%
associate-*r*53.4%
associate-*r*53.4%
associate-*l*53.4%
metadata-eval53.4%
*-rgt-identity53.4%
unpow253.4%
times-frac38.0%
unpow238.0%
unpow238.0%
times-frac37.9%
*-commutative37.9%
*-commutative37.9%
times-frac38.0%
unpow238.0%
unpow238.0%
times-frac53.4%
unpow253.4%
associate-/l/53.3%
Simplified53.3%
if 1.29999999999999993e-121 < M < 5.50000000000000005e-38Initial program 30.8%
Simplified47.1%
Taylor expanded in h around 0 0.0%
+-commutative0.0%
*-commutative0.0%
*-commutative0.0%
times-frac0.0%
associate-/r*0.0%
times-frac0.0%
*-commutative0.0%
*-commutative0.0%
times-frac0.0%
associate-/r*0.0%
Simplified31.0%
expm1-log1p-u30.8%
expm1-udef30.8%
Applied egg-rr30.8%
expm1-def30.8%
expm1-log1p31.2%
associate-/l/31.2%
*-commutative31.2%
div031.2%
div047.3%
Simplified47.3%
associate-/r*47.4%
pow247.4%
fma-def47.4%
associate-*l/47.4%
frac-times47.3%
pow247.3%
*-commutative47.3%
div047.3%
fma-def47.3%
associate-*l/47.3%
frac-times47.6%
fma-def47.6%
pow247.6%
div047.6%
Applied egg-rr47.6%
fma-def47.6%
+-rgt-identity47.6%
count-247.6%
associate-*l/47.2%
associate-*r/47.3%
associate-/r*47.4%
*-commutative47.4%
associate-*r/47.4%
Simplified47.4%
pow247.4%
Applied egg-rr47.4%
Final simplification43.6%
(FPCore (c0 w h D d M)
:precision binary64
(if (<= d 1.55e-6)
(* (/ (/ c0 w) 2.0) (* 2.0 (* (/ c0 (* w h)) (/ (* d (/ d D)) D))))
(if (<= d 2.7e+23)
0.0
(if (<= d 9.5e+164)
(/ (/ c0 w) (/ 1.0 (* c0 (/ (pow (/ d D) 2.0) (* w h)))))
0.0))))
double code(double c0, double w, double h, double D, double d, double M) {
double tmp;
if (d <= 1.55e-6) {
tmp = ((c0 / w) / 2.0) * (2.0 * ((c0 / (w * h)) * ((d * (d / D)) / D)));
} else if (d <= 2.7e+23) {
tmp = 0.0;
} else if (d <= 9.5e+164) {
tmp = (c0 / w) / (1.0 / (c0 * (pow((d / D), 2.0) / (w * h))));
} else {
tmp = 0.0;
}
return tmp;
}
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) :: tmp
if (d_1 <= 1.55d-6) then
tmp = ((c0 / w) / 2.0d0) * (2.0d0 * ((c0 / (w * h)) * ((d_1 * (d_1 / d)) / d)))
else if (d_1 <= 2.7d+23) then
tmp = 0.0d0
else if (d_1 <= 9.5d+164) then
tmp = (c0 / w) / (1.0d0 / (c0 * (((d_1 / d) ** 2.0d0) / (w * h))))
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
double tmp;
if (d <= 1.55e-6) {
tmp = ((c0 / w) / 2.0) * (2.0 * ((c0 / (w * h)) * ((d * (d / D)) / D)));
} else if (d <= 2.7e+23) {
tmp = 0.0;
} else if (d <= 9.5e+164) {
tmp = (c0 / w) / (1.0 / (c0 * (Math.pow((d / D), 2.0) / (w * h))));
} else {
tmp = 0.0;
}
return tmp;
}
def code(c0, w, h, D, d, M): tmp = 0 if d <= 1.55e-6: tmp = ((c0 / w) / 2.0) * (2.0 * ((c0 / (w * h)) * ((d * (d / D)) / D))) elif d <= 2.7e+23: tmp = 0.0 elif d <= 9.5e+164: tmp = (c0 / w) / (1.0 / (c0 * (math.pow((d / D), 2.0) / (w * h)))) else: tmp = 0.0 return tmp
function code(c0, w, h, D, d, M) tmp = 0.0 if (d <= 1.55e-6) tmp = Float64(Float64(Float64(c0 / w) / 2.0) * Float64(2.0 * Float64(Float64(c0 / Float64(w * h)) * Float64(Float64(d * Float64(d / D)) / D)))); elseif (d <= 2.7e+23) tmp = 0.0; elseif (d <= 9.5e+164) tmp = Float64(Float64(c0 / w) / Float64(1.0 / Float64(c0 * Float64((Float64(d / D) ^ 2.0) / Float64(w * h))))); else tmp = 0.0; end return tmp end
function tmp_2 = code(c0, w, h, D, d, M) tmp = 0.0; if (d <= 1.55e-6) tmp = ((c0 / w) / 2.0) * (2.0 * ((c0 / (w * h)) * ((d * (d / D)) / D))); elseif (d <= 2.7e+23) tmp = 0.0; elseif (d <= 9.5e+164) tmp = (c0 / w) / (1.0 / (c0 * (((d / D) ^ 2.0) / (w * h)))); else tmp = 0.0; end tmp_2 = tmp; end
code[c0_, w_, h_, D_, d_, M_] := If[LessEqual[d, 1.55e-6], N[(N[(N[(c0 / w), $MachinePrecision] / 2.0), $MachinePrecision] * N[(2.0 * N[(N[(c0 / N[(w * h), $MachinePrecision]), $MachinePrecision] * N[(N[(d * N[(d / D), $MachinePrecision]), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.7e+23], 0.0, If[LessEqual[d, 9.5e+164], N[(N[(c0 / w), $MachinePrecision] / N[(1.0 / N[(c0 * N[(N[Power[N[(d / D), $MachinePrecision], 2.0], $MachinePrecision] / N[(w * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq 1.55 \cdot 10^{-6}:\\
\;\;\;\;\frac{\frac{c0}{w}}{2} \cdot \left(2 \cdot \left(\frac{c0}{w \cdot h} \cdot \frac{d \cdot \frac{d}{D}}{D}\right)\right)\\
\mathbf{elif}\;d \leq 2.7 \cdot 10^{+23}:\\
\;\;\;\;0\\
\mathbf{elif}\;d \leq 9.5 \cdot 10^{+164}:\\
\;\;\;\;\frac{\frac{c0}{w}}{\frac{1}{c0 \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{w \cdot h}}}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if d < 1.55e-6Initial program 25.4%
Simplified40.4%
Taylor expanded in h around 0 6.4%
+-commutative6.4%
*-commutative6.4%
*-commutative6.4%
times-frac7.0%
associate-/r*7.0%
times-frac5.3%
*-commutative5.3%
*-commutative5.3%
times-frac7.0%
associate-/r*7.0%
Simplified32.5%
expm1-log1p-u30.0%
expm1-udef29.5%
Applied egg-rr32.8%
expm1-def34.3%
expm1-log1p38.0%
associate-/l/38.5%
*-commutative38.5%
div038.5%
div046.3%
Simplified46.3%
associate-/r*46.9%
pow246.9%
fma-def46.9%
associate-*l/46.3%
frac-times44.4%
pow244.4%
*-commutative44.4%
div044.4%
fma-def44.4%
associate-*l/44.4%
frac-times45.1%
fma-def45.1%
pow245.1%
div045.1%
Applied egg-rr45.1%
fma-def45.1%
+-rgt-identity45.1%
count-245.1%
associate-*l/45.1%
associate-*r/46.3%
associate-/r*46.3%
*-commutative46.3%
associate-*r/46.9%
Simplified46.9%
pow246.9%
associate-*r/47.4%
Applied egg-rr47.4%
if 1.55e-6 < d < 2.6999999999999999e23 or 9.49999999999999976e164 < d Initial program 15.6%
Simplified15.6%
Taylor expanded in c0 around -inf 1.7%
associate-*r*1.7%
neg-mul-11.7%
distribute-lft1-in1.7%
metadata-eval1.7%
mul0-lft46.0%
distribute-lft-neg-in46.0%
distribute-rgt-neg-in46.0%
metadata-eval46.0%
Simplified46.0%
Taylor expanded in c0 around 0 53.7%
if 2.6999999999999999e23 < d < 9.49999999999999976e164Initial program 29.4%
Simplified40.5%
Taylor expanded in h around 0 11.0%
+-commutative11.0%
*-commutative11.0%
*-commutative11.0%
times-frac11.0%
associate-/r*11.0%
times-frac8.4%
*-commutative8.4%
*-commutative8.4%
times-frac11.0%
associate-/r*11.0%
Simplified41.2%
expm1-log1p-u35.2%
expm1-udef35.2%
Applied egg-rr38.3%
expm1-def40.3%
expm1-log1p46.5%
associate-/l/46.5%
*-commutative46.5%
div046.5%
div046.5%
Simplified46.5%
associate-/r*46.5%
pow246.5%
fma-def46.5%
associate-*l/46.5%
frac-times43.8%
pow243.8%
*-commutative43.8%
div043.8%
fma-def43.8%
associate-*l/46.3%
frac-times46.3%
fma-def46.3%
pow246.3%
div046.3%
Applied egg-rr46.3%
fma-def46.3%
+-rgt-identity46.3%
count-246.3%
associate-*l/46.3%
associate-*r/46.3%
associate-/r*48.9%
*-commutative48.9%
associate-*r/46.5%
Simplified46.5%
associate-*l/46.5%
associate-/l/46.5%
Applied egg-rr46.5%
associate-/l*46.5%
associate-/r*46.5%
metadata-eval46.5%
associate-/l/46.5%
associate-*r/49.0%
*-commutative49.0%
associate-*r/49.0%
Simplified49.0%
Final simplification49.1%
(FPCore (c0 w h D d M) :precision binary64 (if (or (<= d 1.05e-6) (and (not (<= d 1.12e+27)) (<= d 1.55e+165))) (* (/ (/ c0 w) 2.0) (* 2.0 (* (/ c0 (* w h)) (* (/ d D) (/ d D))))) 0.0))
double code(double c0, double w, double h, double D, double d, double M) {
double tmp;
if ((d <= 1.05e-6) || (!(d <= 1.12e+27) && (d <= 1.55e+165))) {
tmp = ((c0 / w) / 2.0) * (2.0 * ((c0 / (w * h)) * ((d / D) * (d / D))));
} else {
tmp = 0.0;
}
return tmp;
}
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) :: tmp
if ((d_1 <= 1.05d-6) .or. (.not. (d_1 <= 1.12d+27)) .and. (d_1 <= 1.55d+165)) then
tmp = ((c0 / w) / 2.0d0) * (2.0d0 * ((c0 / (w * h)) * ((d_1 / d) * (d_1 / d))))
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
double tmp;
if ((d <= 1.05e-6) || (!(d <= 1.12e+27) && (d <= 1.55e+165))) {
tmp = ((c0 / w) / 2.0) * (2.0 * ((c0 / (w * h)) * ((d / D) * (d / D))));
} else {
tmp = 0.0;
}
return tmp;
}
def code(c0, w, h, D, d, M): tmp = 0 if (d <= 1.05e-6) or (not (d <= 1.12e+27) and (d <= 1.55e+165)): tmp = ((c0 / w) / 2.0) * (2.0 * ((c0 / (w * h)) * ((d / D) * (d / D)))) else: tmp = 0.0 return tmp
function code(c0, w, h, D, d, M) tmp = 0.0 if ((d <= 1.05e-6) || (!(d <= 1.12e+27) && (d <= 1.55e+165))) tmp = Float64(Float64(Float64(c0 / w) / 2.0) * Float64(2.0 * Float64(Float64(c0 / Float64(w * h)) * Float64(Float64(d / D) * Float64(d / D))))); else tmp = 0.0; end return tmp end
function tmp_2 = code(c0, w, h, D, d, M) tmp = 0.0; if ((d <= 1.05e-6) || (~((d <= 1.12e+27)) && (d <= 1.55e+165))) tmp = ((c0 / w) / 2.0) * (2.0 * ((c0 / (w * h)) * ((d / D) * (d / D)))); else tmp = 0.0; end tmp_2 = tmp; end
code[c0_, w_, h_, D_, d_, M_] := If[Or[LessEqual[d, 1.05e-6], And[N[Not[LessEqual[d, 1.12e+27]], $MachinePrecision], LessEqual[d, 1.55e+165]]], N[(N[(N[(c0 / w), $MachinePrecision] / 2.0), $MachinePrecision] * N[(2.0 * N[(N[(c0 / N[(w * h), $MachinePrecision]), $MachinePrecision] * N[(N[(d / D), $MachinePrecision] * N[(d / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq 1.05 \cdot 10^{-6} \lor \neg \left(d \leq 1.12 \cdot 10^{+27}\right) \land d \leq 1.55 \cdot 10^{+165}:\\
\;\;\;\;\frac{\frac{c0}{w}}{2} \cdot \left(2 \cdot \left(\frac{c0}{w \cdot h} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if d < 1.0499999999999999e-6 or 1.12e27 < d < 1.5500000000000001e165Initial program 26.2%
Simplified40.4%
Taylor expanded in h around 0 7.3%
+-commutative7.3%
*-commutative7.3%
*-commutative7.3%
times-frac7.8%
associate-/r*7.8%
times-frac5.9%
*-commutative5.9%
*-commutative5.9%
times-frac7.8%
associate-/r*7.8%
Simplified34.2%
expm1-log1p-u31.0%
expm1-udef30.6%
Applied egg-rr33.9%
expm1-def35.5%
expm1-log1p39.6%
associate-/l/40.1%
*-commutative40.1%
div040.1%
div046.3%
Simplified46.3%
associate-/r*46.8%
pow246.8%
fma-def46.8%
associate-*l/46.3%
frac-times44.3%
pow244.3%
*-commutative44.3%
div044.3%
fma-def44.3%
associate-*l/44.8%
frac-times45.3%
fma-def45.3%
pow245.3%
div045.3%
Applied egg-rr45.3%
fma-def45.3%
+-rgt-identity45.3%
count-245.3%
associate-*l/45.3%
associate-*r/46.3%
associate-/r*46.8%
*-commutative46.8%
associate-*r/46.8%
Simplified46.8%
pow246.8%
Applied egg-rr46.8%
if 1.0499999999999999e-6 < d < 1.12e27 or 1.5500000000000001e165 < d Initial program 15.6%
Simplified15.6%
Taylor expanded in c0 around -inf 1.7%
associate-*r*1.7%
neg-mul-11.7%
distribute-lft1-in1.7%
metadata-eval1.7%
mul0-lft46.0%
distribute-lft-neg-in46.0%
distribute-rgt-neg-in46.0%
metadata-eval46.0%
Simplified46.0%
Taylor expanded in c0 around 0 53.7%
Final simplification48.4%
(FPCore (c0 w h D d M)
:precision binary64
(let* ((t_0 (/ c0 (* w h))) (t_1 (/ (/ c0 w) 2.0)))
(if (<= d 8.2e-7)
(* t_1 (* 2.0 (* t_0 (/ (* d (/ d D)) D))))
(if (<= d 1.4e+28)
0.0
(if (<= d 1.35e+165)
(* t_1 (* 2.0 (* t_0 (* (/ d D) (/ d D)))))
0.0)))))
double code(double c0, double w, double h, double D, double d, double M) {
double t_0 = c0 / (w * h);
double t_1 = (c0 / w) / 2.0;
double tmp;
if (d <= 8.2e-7) {
tmp = t_1 * (2.0 * (t_0 * ((d * (d / D)) / D)));
} else if (d <= 1.4e+28) {
tmp = 0.0;
} else if (d <= 1.35e+165) {
tmp = t_1 * (2.0 * (t_0 * ((d / D) * (d / D))));
} else {
tmp = 0.0;
}
return tmp;
}
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
real(8) :: t_1
real(8) :: tmp
t_0 = c0 / (w * h)
t_1 = (c0 / w) / 2.0d0
if (d_1 <= 8.2d-7) then
tmp = t_1 * (2.0d0 * (t_0 * ((d_1 * (d_1 / d)) / d)))
else if (d_1 <= 1.4d+28) then
tmp = 0.0d0
else if (d_1 <= 1.35d+165) then
tmp = t_1 * (2.0d0 * (t_0 * ((d_1 / d) * (d_1 / d))))
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
double t_0 = c0 / (w * h);
double t_1 = (c0 / w) / 2.0;
double tmp;
if (d <= 8.2e-7) {
tmp = t_1 * (2.0 * (t_0 * ((d * (d / D)) / D)));
} else if (d <= 1.4e+28) {
tmp = 0.0;
} else if (d <= 1.35e+165) {
tmp = t_1 * (2.0 * (t_0 * ((d / D) * (d / D))));
} else {
tmp = 0.0;
}
return tmp;
}
def code(c0, w, h, D, d, M): t_0 = c0 / (w * h) t_1 = (c0 / w) / 2.0 tmp = 0 if d <= 8.2e-7: tmp = t_1 * (2.0 * (t_0 * ((d * (d / D)) / D))) elif d <= 1.4e+28: tmp = 0.0 elif d <= 1.35e+165: tmp = t_1 * (2.0 * (t_0 * ((d / D) * (d / D)))) else: tmp = 0.0 return tmp
function code(c0, w, h, D, d, M) t_0 = Float64(c0 / Float64(w * h)) t_1 = Float64(Float64(c0 / w) / 2.0) tmp = 0.0 if (d <= 8.2e-7) tmp = Float64(t_1 * Float64(2.0 * Float64(t_0 * Float64(Float64(d * Float64(d / D)) / D)))); elseif (d <= 1.4e+28) tmp = 0.0; elseif (d <= 1.35e+165) tmp = Float64(t_1 * Float64(2.0 * Float64(t_0 * Float64(Float64(d / D) * Float64(d / D))))); else tmp = 0.0; end return tmp end
function tmp_2 = code(c0, w, h, D, d, M) t_0 = c0 / (w * h); t_1 = (c0 / w) / 2.0; tmp = 0.0; if (d <= 8.2e-7) tmp = t_1 * (2.0 * (t_0 * ((d * (d / D)) / D))); elseif (d <= 1.4e+28) tmp = 0.0; elseif (d <= 1.35e+165) tmp = t_1 * (2.0 * (t_0 * ((d / D) * (d / D)))); else tmp = 0.0; end tmp_2 = tmp; end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(c0 / N[(w * h), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(c0 / w), $MachinePrecision] / 2.0), $MachinePrecision]}, If[LessEqual[d, 8.2e-7], N[(t$95$1 * N[(2.0 * N[(t$95$0 * N[(N[(d * N[(d / D), $MachinePrecision]), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.4e+28], 0.0, If[LessEqual[d, 1.35e+165], N[(t$95$1 * N[(2.0 * N[(t$95$0 * N[(N[(d / D), $MachinePrecision] * N[(d / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{c0}{w \cdot h}\\
t_1 := \frac{\frac{c0}{w}}{2}\\
\mathbf{if}\;d \leq 8.2 \cdot 10^{-7}:\\
\;\;\;\;t_1 \cdot \left(2 \cdot \left(t_0 \cdot \frac{d \cdot \frac{d}{D}}{D}\right)\right)\\
\mathbf{elif}\;d \leq 1.4 \cdot 10^{+28}:\\
\;\;\;\;0\\
\mathbf{elif}\;d \leq 1.35 \cdot 10^{+165}:\\
\;\;\;\;t_1 \cdot \left(2 \cdot \left(t_0 \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if d < 8.1999999999999998e-7Initial program 25.4%
Simplified40.4%
Taylor expanded in h around 0 6.4%
+-commutative6.4%
*-commutative6.4%
*-commutative6.4%
times-frac7.0%
associate-/r*7.0%
times-frac5.3%
*-commutative5.3%
*-commutative5.3%
times-frac7.0%
associate-/r*7.0%
Simplified32.5%
expm1-log1p-u30.0%
expm1-udef29.5%
Applied egg-rr32.8%
expm1-def34.3%
expm1-log1p38.0%
associate-/l/38.5%
*-commutative38.5%
div038.5%
div046.3%
Simplified46.3%
associate-/r*46.9%
pow246.9%
fma-def46.9%
associate-*l/46.3%
frac-times44.4%
pow244.4%
*-commutative44.4%
div044.4%
fma-def44.4%
associate-*l/44.4%
frac-times45.1%
fma-def45.1%
pow245.1%
div045.1%
Applied egg-rr45.1%
fma-def45.1%
+-rgt-identity45.1%
count-245.1%
associate-*l/45.1%
associate-*r/46.3%
associate-/r*46.3%
*-commutative46.3%
associate-*r/46.9%
Simplified46.9%
pow246.9%
associate-*r/47.4%
Applied egg-rr47.4%
if 8.1999999999999998e-7 < d < 1.4000000000000001e28 or 1.35e165 < d Initial program 15.6%
Simplified15.6%
Taylor expanded in c0 around -inf 1.7%
associate-*r*1.7%
neg-mul-11.7%
distribute-lft1-in1.7%
metadata-eval1.7%
mul0-lft46.0%
distribute-lft-neg-in46.0%
distribute-rgt-neg-in46.0%
metadata-eval46.0%
Simplified46.0%
Taylor expanded in c0 around 0 53.7%
if 1.4000000000000001e28 < d < 1.35e165Initial program 29.4%
Simplified40.5%
Taylor expanded in h around 0 11.0%
+-commutative11.0%
*-commutative11.0%
*-commutative11.0%
times-frac11.0%
associate-/r*11.0%
times-frac8.4%
*-commutative8.4%
*-commutative8.4%
times-frac11.0%
associate-/r*11.0%
Simplified41.2%
expm1-log1p-u35.2%
expm1-udef35.2%
Applied egg-rr38.3%
expm1-def40.3%
expm1-log1p46.5%
associate-/l/46.5%
*-commutative46.5%
div046.5%
div046.5%
Simplified46.5%
associate-/r*46.5%
pow246.5%
fma-def46.5%
associate-*l/46.5%
frac-times43.8%
pow243.8%
*-commutative43.8%
div043.8%
fma-def43.8%
associate-*l/46.3%
frac-times46.3%
fma-def46.3%
pow246.3%
div046.3%
Applied egg-rr46.3%
fma-def46.3%
+-rgt-identity46.3%
count-246.3%
associate-*l/46.3%
associate-*r/46.3%
associate-/r*48.9%
*-commutative48.9%
associate-*r/46.5%
Simplified46.5%
pow246.5%
Applied egg-rr46.5%
Final simplification48.7%
(FPCore (c0 w h D d M) :precision binary64 0.0)
double code(double c0, double w, double h, double D, double d, double M) {
return 0.0;
}
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
code = 0.0d0
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
return 0.0;
}
def code(c0, w, h, D, d, M): return 0.0
function code(c0, w, h, D, d, M) return 0.0 end
function tmp = code(c0, w, h, D, d, M) tmp = 0.0; end
code[c0_, w_, h_, D_, d_, M_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 23.8%
Simplified24.7%
Taylor expanded in c0 around -inf 5.3%
associate-*r*5.3%
neg-mul-15.3%
distribute-lft1-in5.3%
metadata-eval5.3%
mul0-lft30.2%
distribute-lft-neg-in30.2%
distribute-rgt-neg-in30.2%
metadata-eval30.2%
Simplified30.2%
Taylor expanded in c0 around 0 35.4%
Final simplification35.4%
herbie shell --seed 2023335
(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))))))