
(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 (* d d)) (* (* w h) (* D D)))))
(if (<=
(* (/ c0 (* 2.0 w)) (+ t_0 (sqrt (- (* t_0 t_0) (* M M)))))
INFINITY)
(/ (* (/ c0 w) (pow (/ d D) 2.0)) (* h (/ w c0)))
0.0)))
double code(double c0, double w, double h, double D, double d, double 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))))) <= ((double) INFINITY)) {
tmp = ((c0 / w) * pow((d / D), 2.0)) / (h * (w / c0));
} 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)) / ((w * h) * (D * D));
double tmp;
if (((c0 / (2.0 * w)) * (t_0 + Math.sqrt(((t_0 * t_0) - (M * M))))) <= Double.POSITIVE_INFINITY) {
tmp = ((c0 / w) * Math.pow((d / D), 2.0)) / (h * (w / c0));
} else {
tmp = 0.0;
}
return tmp;
}
def code(c0, w, h, D, d, 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))))) <= math.inf: tmp = ((c0 / w) * math.pow((d / D), 2.0)) / (h * (w / c0)) else: tmp = 0.0 return tmp
function code(c0, w, h, D, d, 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))))) <= Inf) tmp = Float64(Float64(Float64(c0 / w) * (Float64(d / D) ^ 2.0)) / Float64(h * Float64(w / c0))); else tmp = 0.0; end return tmp end
function tmp_2 = code(c0, w, h, D, d, 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))))) <= Inf) tmp = ((c0 / w) * ((d / D) ^ 2.0)) / (h * (w / c0)); 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[(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 * M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(c0 / w), $MachinePrecision] * N[Power[N[(d / D), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(h * N[(w / c0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0]]
\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)}\\
\mathbf{if}\;\frac{c0}{2 \cdot w} \cdot \left(t_0 + \sqrt{t_0 \cdot t_0 - M \cdot M}\right) \leq \infty:\\
\;\;\;\;\frac{\frac{c0}{w} \cdot {\left(\frac{d}{D}\right)}^{2}}{h \cdot \frac{w}{c0}}\\
\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 78.0%
+-commutative78.0%
+-commutative78.0%
times-frac76.7%
fma-neg76.7%
Simplified76.7%
Taylor expanded in c0 around inf 83.9%
expm1-log1p-u39.3%
expm1-udef36.8%
Applied egg-rr36.8%
expm1-def39.3%
expm1-log1p81.3%
associate-*l/78.8%
associate-/l*82.5%
*-commutative82.5%
times-frac82.5%
metadata-eval82.5%
associate-*l/81.3%
unpow281.3%
unpow281.3%
times-frac86.7%
unpow286.7%
times-frac86.1%
Simplified86.1%
expm1-log1p-u41.6%
expm1-udef36.8%
*-un-lft-identity36.8%
Applied egg-rr36.8%
expm1-def41.6%
expm1-log1p86.1%
associate-/r/87.3%
Simplified87.3%
*-commutative87.3%
pow287.3%
associate-*r/89.0%
clear-num89.0%
frac-times88.9%
pow288.9%
Applied egg-rr88.9%
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%
+-commutative0.0%
+-commutative0.0%
times-frac0.0%
fma-neg0.0%
Simplified1.3%
Taylor expanded in c0 around -inf 1.8%
associate-*r*1.8%
neg-mul-11.8%
distribute-lft1-in1.8%
metadata-eval1.8%
mul0-lft40.4%
distribute-lft-neg-in40.4%
distribute-rgt-neg-in40.4%
metadata-eval40.4%
Simplified40.4%
Taylor expanded in c0 around 0 46.3%
Final simplification59.1%
(FPCore (c0 w h D d M)
:precision binary64
(if (<= D 9.5e-219)
(* (/ c0 w) (/ (* (/ c0 w) (* d (/ d D))) (* h D)))
(if (<= D 1.12e-122)
0.0
(if (<= D 1.55e-74)
(/ c0 (/ w (* (/ c0 w) (/ (pow (/ d D) 2.0) h))))
(if (<= D 2.4e-61)
0.0
(* (/ c0 w) (* (/ c0 w) (/ (/ d (* D (/ D d))) h))))))))
double code(double c0, double w, double h, double D, double d, double M) {
double tmp;
if (D <= 9.5e-219) {
tmp = (c0 / w) * (((c0 / w) * (d * (d / D))) / (h * D));
} else if (D <= 1.12e-122) {
tmp = 0.0;
} else if (D <= 1.55e-74) {
tmp = c0 / (w / ((c0 / w) * (pow((d / D), 2.0) / h)));
} else if (D <= 2.4e-61) {
tmp = 0.0;
} else {
tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / 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) :: tmp
if (d <= 9.5d-219) then
tmp = (c0 / w) * (((c0 / w) * (d_1 * (d_1 / d))) / (h * d))
else if (d <= 1.12d-122) then
tmp = 0.0d0
else if (d <= 1.55d-74) then
tmp = c0 / (w / ((c0 / w) * (((d_1 / d) ** 2.0d0) / h)))
else if (d <= 2.4d-61) then
tmp = 0.0d0
else
tmp = (c0 / w) * ((c0 / w) * ((d_1 / (d * (d / d_1))) / h))
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 <= 9.5e-219) {
tmp = (c0 / w) * (((c0 / w) * (d * (d / D))) / (h * D));
} else if (D <= 1.12e-122) {
tmp = 0.0;
} else if (D <= 1.55e-74) {
tmp = c0 / (w / ((c0 / w) * (Math.pow((d / D), 2.0) / h)));
} else if (D <= 2.4e-61) {
tmp = 0.0;
} else {
tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / h));
}
return tmp;
}
def code(c0, w, h, D, d, M): tmp = 0 if D <= 9.5e-219: tmp = (c0 / w) * (((c0 / w) * (d * (d / D))) / (h * D)) elif D <= 1.12e-122: tmp = 0.0 elif D <= 1.55e-74: tmp = c0 / (w / ((c0 / w) * (math.pow((d / D), 2.0) / h))) elif D <= 2.4e-61: tmp = 0.0 else: tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / h)) return tmp
function code(c0, w, h, D, d, M) tmp = 0.0 if (D <= 9.5e-219) tmp = Float64(Float64(c0 / w) * Float64(Float64(Float64(c0 / w) * Float64(d * Float64(d / D))) / Float64(h * D))); elseif (D <= 1.12e-122) tmp = 0.0; elseif (D <= 1.55e-74) tmp = Float64(c0 / Float64(w / Float64(Float64(c0 / w) * Float64((Float64(d / D) ^ 2.0) / h)))); elseif (D <= 2.4e-61) tmp = 0.0; else tmp = Float64(Float64(c0 / w) * Float64(Float64(c0 / w) * Float64(Float64(d / Float64(D * Float64(D / d))) / h))); end return tmp end
function tmp_2 = code(c0, w, h, D, d, M) tmp = 0.0; if (D <= 9.5e-219) tmp = (c0 / w) * (((c0 / w) * (d * (d / D))) / (h * D)); elseif (D <= 1.12e-122) tmp = 0.0; elseif (D <= 1.55e-74) tmp = c0 / (w / ((c0 / w) * (((d / D) ^ 2.0) / h))); elseif (D <= 2.4e-61) tmp = 0.0; else tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / h)); end tmp_2 = tmp; end
code[c0_, w_, h_, D_, d_, M_] := If[LessEqual[D, 9.5e-219], N[(N[(c0 / w), $MachinePrecision] * N[(N[(N[(c0 / w), $MachinePrecision] * N[(d * N[(d / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(h * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[D, 1.12e-122], 0.0, If[LessEqual[D, 1.55e-74], N[(c0 / N[(w / N[(N[(c0 / w), $MachinePrecision] * N[(N[Power[N[(d / D), $MachinePrecision], 2.0], $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[D, 2.4e-61], 0.0, N[(N[(c0 / w), $MachinePrecision] * N[(N[(c0 / w), $MachinePrecision] * N[(N[(d / N[(D * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;D \leq 9.5 \cdot 10^{-219}:\\
\;\;\;\;\frac{c0}{w} \cdot \frac{\frac{c0}{w} \cdot \left(d \cdot \frac{d}{D}\right)}{h \cdot D}\\
\mathbf{elif}\;D \leq 1.12 \cdot 10^{-122}:\\
\;\;\;\;0\\
\mathbf{elif}\;D \leq 1.55 \cdot 10^{-74}:\\
\;\;\;\;\frac{c0}{\frac{w}{\frac{c0}{w} \cdot \frac{{\left(\frac{d}{D}\right)}^{2}}{h}}}\\
\mathbf{elif}\;D \leq 2.4 \cdot 10^{-61}:\\
\;\;\;\;0\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{w} \cdot \left(\frac{c0}{w} \cdot \frac{\frac{d}{D \cdot \frac{D}{d}}}{h}\right)\\
\end{array}
\end{array}
if D < 9.4999999999999997e-219Initial program 23.7%
+-commutative23.7%
+-commutative23.7%
times-frac23.0%
fma-neg23.0%
Simplified23.8%
Taylor expanded in c0 around inf 33.0%
expm1-log1p-u14.6%
expm1-udef14.6%
Applied egg-rr15.3%
expm1-def15.3%
expm1-log1p32.6%
associate-*l/32.6%
associate-/l*32.6%
*-commutative32.6%
times-frac32.6%
metadata-eval32.6%
associate-*l/34.0%
unpow234.0%
unpow234.0%
times-frac40.7%
unpow240.7%
times-frac41.7%
Simplified41.7%
expm1-log1p-u20.5%
expm1-udef20.9%
*-un-lft-identity20.9%
Applied egg-rr20.9%
expm1-def20.5%
expm1-log1p41.7%
associate-/r/42.8%
Simplified42.8%
pow242.8%
frac-times40.5%
associate-*l/39.9%
associate-/r*42.3%
associate-*r/41.1%
frac-times41.7%
Applied egg-rr41.7%
if 9.4999999999999997e-219 < D < 1.12e-122 or 1.5500000000000001e-74 < D < 2.4000000000000001e-61Initial program 10.0%
+-commutative10.0%
+-commutative10.0%
times-frac10.0%
fma-neg10.0%
Simplified10.1%
Taylor expanded in c0 around -inf 0.0%
associate-*r*0.0%
neg-mul-10.0%
distribute-lft1-in0.0%
metadata-eval0.0%
mul0-lft53.1%
distribute-lft-neg-in53.1%
distribute-rgt-neg-in53.1%
metadata-eval53.1%
Simplified53.1%
Taylor expanded in c0 around 0 59.9%
if 1.12e-122 < D < 1.5500000000000001e-74Initial program 54.6%
+-commutative54.6%
+-commutative54.6%
times-frac54.6%
fma-neg54.6%
Simplified54.6%
Taylor expanded in c0 around inf 62.6%
expm1-log1p-u31.8%
expm1-udef31.8%
Applied egg-rr31.8%
expm1-def31.8%
expm1-log1p62.6%
associate-*l/69.5%
associate-/l*69.5%
*-commutative69.5%
times-frac69.5%
metadata-eval69.5%
associate-*l/69.5%
unpow269.5%
unpow269.5%
times-frac69.7%
unpow269.7%
times-frac61.9%
Simplified61.9%
if 2.4000000000000001e-61 < D Initial program 22.9%
+-commutative22.9%
+-commutative22.9%
times-frac22.9%
fma-neg22.9%
Simplified24.9%
Taylor expanded in c0 around inf 40.2%
expm1-log1p-u19.9%
expm1-udef16.3%
Applied egg-rr18.1%
expm1-def21.8%
expm1-log1p42.3%
associate-*l/36.7%
associate-/l*42.3%
*-commutative42.3%
times-frac42.3%
metadata-eval42.3%
associate-*l/38.6%
unpow238.6%
unpow238.6%
times-frac56.1%
unpow256.1%
times-frac59.9%
Simplified59.9%
expm1-log1p-u30.0%
expm1-udef24.4%
*-un-lft-identity24.4%
Applied egg-rr24.4%
expm1-def30.0%
expm1-log1p59.9%
associate-/r/59.9%
Simplified59.9%
pow259.9%
clear-num59.9%
frac-times60.0%
*-un-lft-identity60.0%
Applied egg-rr60.0%
Final simplification48.5%
(FPCore (c0 w h D d M)
:precision binary64
(if (<= D 1.3e-218)
(* (/ c0 w) (/ (* (/ c0 w) (* d (/ d D))) (* h D)))
(if (<= D 1.7e-131)
0.0
(if (<= D 2.5e-74)
(/ c0 (/ w (/ c0 (* w (/ h (pow (/ d D) 2.0))))))
(if (<= D 8e-62)
0.0
(* (/ c0 w) (* (/ c0 w) (/ (/ d (* D (/ D d))) h))))))))
double code(double c0, double w, double h, double D, double d, double M) {
double tmp;
if (D <= 1.3e-218) {
tmp = (c0 / w) * (((c0 / w) * (d * (d / D))) / (h * D));
} else if (D <= 1.7e-131) {
tmp = 0.0;
} else if (D <= 2.5e-74) {
tmp = c0 / (w / (c0 / (w * (h / pow((d / D), 2.0)))));
} else if (D <= 8e-62) {
tmp = 0.0;
} else {
tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / 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) :: tmp
if (d <= 1.3d-218) then
tmp = (c0 / w) * (((c0 / w) * (d_1 * (d_1 / d))) / (h * d))
else if (d <= 1.7d-131) then
tmp = 0.0d0
else if (d <= 2.5d-74) then
tmp = c0 / (w / (c0 / (w * (h / ((d_1 / d) ** 2.0d0)))))
else if (d <= 8d-62) then
tmp = 0.0d0
else
tmp = (c0 / w) * ((c0 / w) * ((d_1 / (d * (d / d_1))) / h))
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.3e-218) {
tmp = (c0 / w) * (((c0 / w) * (d * (d / D))) / (h * D));
} else if (D <= 1.7e-131) {
tmp = 0.0;
} else if (D <= 2.5e-74) {
tmp = c0 / (w / (c0 / (w * (h / Math.pow((d / D), 2.0)))));
} else if (D <= 8e-62) {
tmp = 0.0;
} else {
tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / h));
}
return tmp;
}
def code(c0, w, h, D, d, M): tmp = 0 if D <= 1.3e-218: tmp = (c0 / w) * (((c0 / w) * (d * (d / D))) / (h * D)) elif D <= 1.7e-131: tmp = 0.0 elif D <= 2.5e-74: tmp = c0 / (w / (c0 / (w * (h / math.pow((d / D), 2.0))))) elif D <= 8e-62: tmp = 0.0 else: tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / h)) return tmp
function code(c0, w, h, D, d, M) tmp = 0.0 if (D <= 1.3e-218) tmp = Float64(Float64(c0 / w) * Float64(Float64(Float64(c0 / w) * Float64(d * Float64(d / D))) / Float64(h * D))); elseif (D <= 1.7e-131) tmp = 0.0; elseif (D <= 2.5e-74) tmp = Float64(c0 / Float64(w / Float64(c0 / Float64(w * Float64(h / (Float64(d / D) ^ 2.0)))))); elseif (D <= 8e-62) tmp = 0.0; else tmp = Float64(Float64(c0 / w) * Float64(Float64(c0 / w) * Float64(Float64(d / Float64(D * Float64(D / d))) / h))); end return tmp end
function tmp_2 = code(c0, w, h, D, d, M) tmp = 0.0; if (D <= 1.3e-218) tmp = (c0 / w) * (((c0 / w) * (d * (d / D))) / (h * D)); elseif (D <= 1.7e-131) tmp = 0.0; elseif (D <= 2.5e-74) tmp = c0 / (w / (c0 / (w * (h / ((d / D) ^ 2.0))))); elseif (D <= 8e-62) tmp = 0.0; else tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / h)); end tmp_2 = tmp; end
code[c0_, w_, h_, D_, d_, M_] := If[LessEqual[D, 1.3e-218], N[(N[(c0 / w), $MachinePrecision] * N[(N[(N[(c0 / w), $MachinePrecision] * N[(d * N[(d / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(h * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[D, 1.7e-131], 0.0, If[LessEqual[D, 2.5e-74], N[(c0 / N[(w / N[(c0 / N[(w * N[(h / N[Power[N[(d / D), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[D, 8e-62], 0.0, N[(N[(c0 / w), $MachinePrecision] * N[(N[(c0 / w), $MachinePrecision] * N[(N[(d / N[(D * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;D \leq 1.3 \cdot 10^{-218}:\\
\;\;\;\;\frac{c0}{w} \cdot \frac{\frac{c0}{w} \cdot \left(d \cdot \frac{d}{D}\right)}{h \cdot D}\\
\mathbf{elif}\;D \leq 1.7 \cdot 10^{-131}:\\
\;\;\;\;0\\
\mathbf{elif}\;D \leq 2.5 \cdot 10^{-74}:\\
\;\;\;\;\frac{c0}{\frac{w}{\frac{c0}{w \cdot \frac{h}{{\left(\frac{d}{D}\right)}^{2}}}}}\\
\mathbf{elif}\;D \leq 8 \cdot 10^{-62}:\\
\;\;\;\;0\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{w} \cdot \left(\frac{c0}{w} \cdot \frac{\frac{d}{D \cdot \frac{D}{d}}}{h}\right)\\
\end{array}
\end{array}
if D < 1.29999999999999992e-218Initial program 23.7%
+-commutative23.7%
+-commutative23.7%
times-frac23.0%
fma-neg23.0%
Simplified23.8%
Taylor expanded in c0 around inf 33.0%
expm1-log1p-u14.6%
expm1-udef14.6%
Applied egg-rr15.3%
expm1-def15.3%
expm1-log1p32.6%
associate-*l/32.6%
associate-/l*32.6%
*-commutative32.6%
times-frac32.6%
metadata-eval32.6%
associate-*l/34.0%
unpow234.0%
unpow234.0%
times-frac40.7%
unpow240.7%
times-frac41.7%
Simplified41.7%
expm1-log1p-u20.5%
expm1-udef20.9%
*-un-lft-identity20.9%
Applied egg-rr20.9%
expm1-def20.5%
expm1-log1p41.7%
associate-/r/42.8%
Simplified42.8%
pow242.8%
frac-times40.5%
associate-*l/39.9%
associate-/r*42.3%
associate-*r/41.1%
frac-times41.7%
Applied egg-rr41.7%
if 1.29999999999999992e-218 < D < 1.69999999999999998e-131 or 2.49999999999999999e-74 < D < 8.0000000000000003e-62Initial program 10.0%
+-commutative10.0%
+-commutative10.0%
times-frac10.0%
fma-neg10.0%
Simplified10.1%
Taylor expanded in c0 around -inf 0.0%
associate-*r*0.0%
neg-mul-10.0%
distribute-lft1-in0.0%
metadata-eval0.0%
mul0-lft53.1%
distribute-lft-neg-in53.1%
distribute-rgt-neg-in53.1%
metadata-eval53.1%
Simplified53.1%
Taylor expanded in c0 around 0 59.9%
if 1.69999999999999998e-131 < D < 2.49999999999999999e-74Initial program 54.6%
+-commutative54.6%
+-commutative54.6%
times-frac54.6%
fma-neg54.6%
Simplified54.6%
Taylor expanded in c0 around inf 62.6%
expm1-log1p-u31.8%
expm1-udef31.8%
Applied egg-rr31.8%
expm1-def31.8%
expm1-log1p62.6%
associate-*l/69.5%
associate-/l*69.5%
*-commutative69.5%
times-frac69.5%
metadata-eval69.5%
associate-*l/69.5%
unpow269.5%
unpow269.5%
times-frac69.7%
unpow269.7%
times-frac61.9%
Simplified61.9%
*-commutative61.9%
pow261.9%
clear-num61.9%
frac-times62.1%
*-un-lft-identity62.1%
pow262.1%
Applied egg-rr62.1%
if 8.0000000000000003e-62 < D Initial program 22.9%
+-commutative22.9%
+-commutative22.9%
times-frac22.9%
fma-neg22.9%
Simplified24.9%
Taylor expanded in c0 around inf 40.2%
expm1-log1p-u19.9%
expm1-udef16.3%
Applied egg-rr18.1%
expm1-def21.8%
expm1-log1p42.3%
associate-*l/36.7%
associate-/l*42.3%
*-commutative42.3%
times-frac42.3%
metadata-eval42.3%
associate-*l/38.6%
unpow238.6%
unpow238.6%
times-frac56.1%
unpow256.1%
times-frac59.9%
Simplified59.9%
expm1-log1p-u30.0%
expm1-udef24.4%
*-un-lft-identity24.4%
Applied egg-rr24.4%
expm1-def30.0%
expm1-log1p59.9%
associate-/r/59.9%
Simplified59.9%
pow259.9%
clear-num59.9%
frac-times60.0%
*-un-lft-identity60.0%
Applied egg-rr60.0%
Final simplification48.5%
(FPCore (c0 w h D d M)
:precision binary64
(if (<= D 2.5e-218)
(* (/ c0 w) (/ (* (/ c0 w) (* d (/ d D))) (* h D)))
(if (<= D 1e-123)
0.0
(if (<= D 1.35e-74)
(/ c0 (/ w (/ (* (/ c0 w) (pow (/ d D) 2.0)) h)))
(if (<= D 7.5e-62)
0.0
(* (/ c0 w) (* (/ c0 w) (/ (/ d (* D (/ D d))) h))))))))
double code(double c0, double w, double h, double D, double d, double M) {
double tmp;
if (D <= 2.5e-218) {
tmp = (c0 / w) * (((c0 / w) * (d * (d / D))) / (h * D));
} else if (D <= 1e-123) {
tmp = 0.0;
} else if (D <= 1.35e-74) {
tmp = c0 / (w / (((c0 / w) * pow((d / D), 2.0)) / h));
} else if (D <= 7.5e-62) {
tmp = 0.0;
} else {
tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / 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) :: tmp
if (d <= 2.5d-218) then
tmp = (c0 / w) * (((c0 / w) * (d_1 * (d_1 / d))) / (h * d))
else if (d <= 1d-123) then
tmp = 0.0d0
else if (d <= 1.35d-74) then
tmp = c0 / (w / (((c0 / w) * ((d_1 / d) ** 2.0d0)) / h))
else if (d <= 7.5d-62) then
tmp = 0.0d0
else
tmp = (c0 / w) * ((c0 / w) * ((d_1 / (d * (d / d_1))) / h))
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 <= 2.5e-218) {
tmp = (c0 / w) * (((c0 / w) * (d * (d / D))) / (h * D));
} else if (D <= 1e-123) {
tmp = 0.0;
} else if (D <= 1.35e-74) {
tmp = c0 / (w / (((c0 / w) * Math.pow((d / D), 2.0)) / h));
} else if (D <= 7.5e-62) {
tmp = 0.0;
} else {
tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / h));
}
return tmp;
}
def code(c0, w, h, D, d, M): tmp = 0 if D <= 2.5e-218: tmp = (c0 / w) * (((c0 / w) * (d * (d / D))) / (h * D)) elif D <= 1e-123: tmp = 0.0 elif D <= 1.35e-74: tmp = c0 / (w / (((c0 / w) * math.pow((d / D), 2.0)) / h)) elif D <= 7.5e-62: tmp = 0.0 else: tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / h)) return tmp
function code(c0, w, h, D, d, M) tmp = 0.0 if (D <= 2.5e-218) tmp = Float64(Float64(c0 / w) * Float64(Float64(Float64(c0 / w) * Float64(d * Float64(d / D))) / Float64(h * D))); elseif (D <= 1e-123) tmp = 0.0; elseif (D <= 1.35e-74) tmp = Float64(c0 / Float64(w / Float64(Float64(Float64(c0 / w) * (Float64(d / D) ^ 2.0)) / h))); elseif (D <= 7.5e-62) tmp = 0.0; else tmp = Float64(Float64(c0 / w) * Float64(Float64(c0 / w) * Float64(Float64(d / Float64(D * Float64(D / d))) / h))); end return tmp end
function tmp_2 = code(c0, w, h, D, d, M) tmp = 0.0; if (D <= 2.5e-218) tmp = (c0 / w) * (((c0 / w) * (d * (d / D))) / (h * D)); elseif (D <= 1e-123) tmp = 0.0; elseif (D <= 1.35e-74) tmp = c0 / (w / (((c0 / w) * ((d / D) ^ 2.0)) / h)); elseif (D <= 7.5e-62) tmp = 0.0; else tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / h)); end tmp_2 = tmp; end
code[c0_, w_, h_, D_, d_, M_] := If[LessEqual[D, 2.5e-218], N[(N[(c0 / w), $MachinePrecision] * N[(N[(N[(c0 / w), $MachinePrecision] * N[(d * N[(d / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(h * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[D, 1e-123], 0.0, If[LessEqual[D, 1.35e-74], N[(c0 / N[(w / N[(N[(N[(c0 / w), $MachinePrecision] * N[Power[N[(d / D), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[D, 7.5e-62], 0.0, N[(N[(c0 / w), $MachinePrecision] * N[(N[(c0 / w), $MachinePrecision] * N[(N[(d / N[(D * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;D \leq 2.5 \cdot 10^{-218}:\\
\;\;\;\;\frac{c0}{w} \cdot \frac{\frac{c0}{w} \cdot \left(d \cdot \frac{d}{D}\right)}{h \cdot D}\\
\mathbf{elif}\;D \leq 10^{-123}:\\
\;\;\;\;0\\
\mathbf{elif}\;D \leq 1.35 \cdot 10^{-74}:\\
\;\;\;\;\frac{c0}{\frac{w}{\frac{\frac{c0}{w} \cdot {\left(\frac{d}{D}\right)}^{2}}{h}}}\\
\mathbf{elif}\;D \leq 7.5 \cdot 10^{-62}:\\
\;\;\;\;0\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{w} \cdot \left(\frac{c0}{w} \cdot \frac{\frac{d}{D \cdot \frac{D}{d}}}{h}\right)\\
\end{array}
\end{array}
if D < 2.50000000000000021e-218Initial program 23.7%
+-commutative23.7%
+-commutative23.7%
times-frac23.0%
fma-neg23.0%
Simplified23.8%
Taylor expanded in c0 around inf 33.0%
expm1-log1p-u14.6%
expm1-udef14.6%
Applied egg-rr15.3%
expm1-def15.3%
expm1-log1p32.6%
associate-*l/32.6%
associate-/l*32.6%
*-commutative32.6%
times-frac32.6%
metadata-eval32.6%
associate-*l/34.0%
unpow234.0%
unpow234.0%
times-frac40.7%
unpow240.7%
times-frac41.7%
Simplified41.7%
expm1-log1p-u20.5%
expm1-udef20.9%
*-un-lft-identity20.9%
Applied egg-rr20.9%
expm1-def20.5%
expm1-log1p41.7%
associate-/r/42.8%
Simplified42.8%
pow242.8%
frac-times40.5%
associate-*l/39.9%
associate-/r*42.3%
associate-*r/41.1%
frac-times41.7%
Applied egg-rr41.7%
if 2.50000000000000021e-218 < D < 1.0000000000000001e-123 or 1.35000000000000009e-74 < D < 7.5000000000000003e-62Initial program 10.0%
+-commutative10.0%
+-commutative10.0%
times-frac10.0%
fma-neg10.0%
Simplified10.1%
Taylor expanded in c0 around -inf 0.0%
associate-*r*0.0%
neg-mul-10.0%
distribute-lft1-in0.0%
metadata-eval0.0%
mul0-lft53.1%
distribute-lft-neg-in53.1%
distribute-rgt-neg-in53.1%
metadata-eval53.1%
Simplified53.1%
Taylor expanded in c0 around 0 59.9%
if 1.0000000000000001e-123 < D < 1.35000000000000009e-74Initial program 54.6%
+-commutative54.6%
+-commutative54.6%
times-frac54.6%
fma-neg54.6%
Simplified54.6%
Taylor expanded in c0 around inf 62.6%
expm1-log1p-u31.8%
expm1-udef31.8%
Applied egg-rr31.8%
expm1-def31.8%
expm1-log1p62.6%
associate-*l/69.5%
associate-/l*69.5%
*-commutative69.5%
times-frac69.5%
metadata-eval69.5%
associate-*l/69.5%
unpow269.5%
unpow269.5%
times-frac69.7%
unpow269.7%
times-frac61.9%
Simplified61.9%
pow261.9%
frac-times69.7%
associate-*l/69.7%
*-commutative69.7%
associate-/r*62.6%
associate-*r/62.6%
pow262.6%
Applied egg-rr62.6%
if 7.5000000000000003e-62 < D Initial program 22.9%
+-commutative22.9%
+-commutative22.9%
times-frac22.9%
fma-neg22.9%
Simplified24.9%
Taylor expanded in c0 around inf 40.2%
expm1-log1p-u19.9%
expm1-udef16.3%
Applied egg-rr18.1%
expm1-def21.8%
expm1-log1p42.3%
associate-*l/36.7%
associate-/l*42.3%
*-commutative42.3%
times-frac42.3%
metadata-eval42.3%
associate-*l/38.6%
unpow238.6%
unpow238.6%
times-frac56.1%
unpow256.1%
times-frac59.9%
Simplified59.9%
expm1-log1p-u30.0%
expm1-udef24.4%
*-un-lft-identity24.4%
Applied egg-rr24.4%
expm1-def30.0%
expm1-log1p59.9%
associate-/r/59.9%
Simplified59.9%
pow259.9%
clear-num59.9%
frac-times60.0%
*-un-lft-identity60.0%
Applied egg-rr60.0%
Final simplification48.6%
(FPCore (c0 w h D d M)
:precision binary64
(if (<= D 4.8e-218)
(* (/ c0 w) (/ (* c0 (* d (/ d D))) (* (* w h) D)))
(if (<= D 1.8e-124)
0.0
(if (<= D 1.8e-74)
(* (/ c0 w) (* (/ c0 w) (/ (* (/ d D) (/ d D)) h)))
(if (<= D 7.5e-62)
0.0
(* (/ c0 w) (* (/ c0 w) (/ (/ d (* D (/ D d))) h))))))))
double code(double c0, double w, double h, double D, double d, double M) {
double tmp;
if (D <= 4.8e-218) {
tmp = (c0 / w) * ((c0 * (d * (d / D))) / ((w * h) * D));
} else if (D <= 1.8e-124) {
tmp = 0.0;
} else if (D <= 1.8e-74) {
tmp = (c0 / w) * ((c0 / w) * (((d / D) * (d / D)) / h));
} else if (D <= 7.5e-62) {
tmp = 0.0;
} else {
tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / 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) :: tmp
if (d <= 4.8d-218) then
tmp = (c0 / w) * ((c0 * (d_1 * (d_1 / d))) / ((w * h) * d))
else if (d <= 1.8d-124) then
tmp = 0.0d0
else if (d <= 1.8d-74) then
tmp = (c0 / w) * ((c0 / w) * (((d_1 / d) * (d_1 / d)) / h))
else if (d <= 7.5d-62) then
tmp = 0.0d0
else
tmp = (c0 / w) * ((c0 / w) * ((d_1 / (d * (d / d_1))) / h))
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 <= 4.8e-218) {
tmp = (c0 / w) * ((c0 * (d * (d / D))) / ((w * h) * D));
} else if (D <= 1.8e-124) {
tmp = 0.0;
} else if (D <= 1.8e-74) {
tmp = (c0 / w) * ((c0 / w) * (((d / D) * (d / D)) / h));
} else if (D <= 7.5e-62) {
tmp = 0.0;
} else {
tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / h));
}
return tmp;
}
def code(c0, w, h, D, d, M): tmp = 0 if D <= 4.8e-218: tmp = (c0 / w) * ((c0 * (d * (d / D))) / ((w * h) * D)) elif D <= 1.8e-124: tmp = 0.0 elif D <= 1.8e-74: tmp = (c0 / w) * ((c0 / w) * (((d / D) * (d / D)) / h)) elif D <= 7.5e-62: tmp = 0.0 else: tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / h)) return tmp
function code(c0, w, h, D, d, M) tmp = 0.0 if (D <= 4.8e-218) tmp = Float64(Float64(c0 / w) * Float64(Float64(c0 * Float64(d * Float64(d / D))) / Float64(Float64(w * h) * D))); elseif (D <= 1.8e-124) tmp = 0.0; elseif (D <= 1.8e-74) tmp = Float64(Float64(c0 / w) * Float64(Float64(c0 / w) * Float64(Float64(Float64(d / D) * Float64(d / D)) / h))); elseif (D <= 7.5e-62) tmp = 0.0; else tmp = Float64(Float64(c0 / w) * Float64(Float64(c0 / w) * Float64(Float64(d / Float64(D * Float64(D / d))) / h))); end return tmp end
function tmp_2 = code(c0, w, h, D, d, M) tmp = 0.0; if (D <= 4.8e-218) tmp = (c0 / w) * ((c0 * (d * (d / D))) / ((w * h) * D)); elseif (D <= 1.8e-124) tmp = 0.0; elseif (D <= 1.8e-74) tmp = (c0 / w) * ((c0 / w) * (((d / D) * (d / D)) / h)); elseif (D <= 7.5e-62) tmp = 0.0; else tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / h)); end tmp_2 = tmp; end
code[c0_, w_, h_, D_, d_, M_] := If[LessEqual[D, 4.8e-218], N[(N[(c0 / w), $MachinePrecision] * N[(N[(c0 * N[(d * N[(d / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[D, 1.8e-124], 0.0, If[LessEqual[D, 1.8e-74], N[(N[(c0 / w), $MachinePrecision] * N[(N[(c0 / w), $MachinePrecision] * N[(N[(N[(d / D), $MachinePrecision] * N[(d / D), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[D, 7.5e-62], 0.0, N[(N[(c0 / w), $MachinePrecision] * N[(N[(c0 / w), $MachinePrecision] * N[(N[(d / N[(D * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;D \leq 4.8 \cdot 10^{-218}:\\
\;\;\;\;\frac{c0}{w} \cdot \frac{c0 \cdot \left(d \cdot \frac{d}{D}\right)}{\left(w \cdot h\right) \cdot D}\\
\mathbf{elif}\;D \leq 1.8 \cdot 10^{-124}:\\
\;\;\;\;0\\
\mathbf{elif}\;D \leq 1.8 \cdot 10^{-74}:\\
\;\;\;\;\frac{c0}{w} \cdot \left(\frac{c0}{w} \cdot \frac{\frac{d}{D} \cdot \frac{d}{D}}{h}\right)\\
\mathbf{elif}\;D \leq 7.5 \cdot 10^{-62}:\\
\;\;\;\;0\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{w} \cdot \left(\frac{c0}{w} \cdot \frac{\frac{d}{D \cdot \frac{D}{d}}}{h}\right)\\
\end{array}
\end{array}
if D < 4.8000000000000002e-218Initial program 23.7%
+-commutative23.7%
+-commutative23.7%
times-frac23.0%
fma-neg23.0%
Simplified23.8%
Taylor expanded in c0 around inf 33.0%
expm1-log1p-u14.6%
expm1-udef14.6%
Applied egg-rr15.3%
expm1-def15.3%
expm1-log1p32.6%
associate-*l/32.6%
associate-/l*32.6%
*-commutative32.6%
times-frac32.6%
metadata-eval32.6%
associate-*l/34.0%
unpow234.0%
unpow234.0%
times-frac40.7%
unpow240.7%
times-frac41.7%
Simplified41.7%
expm1-log1p-u20.5%
expm1-udef20.9%
*-un-lft-identity20.9%
Applied egg-rr20.9%
expm1-def20.5%
expm1-log1p41.7%
associate-/r/42.8%
Simplified42.8%
pow242.8%
frac-times40.5%
associate-*l/39.9%
*-commutative39.9%
associate-*r/38.7%
frac-times39.7%
Applied egg-rr39.7%
if 4.8000000000000002e-218 < D < 1.80000000000000005e-124 or 1.8000000000000001e-74 < D < 7.5000000000000003e-62Initial program 10.0%
+-commutative10.0%
+-commutative10.0%
times-frac10.0%
fma-neg10.0%
Simplified10.1%
Taylor expanded in c0 around -inf 0.0%
associate-*r*0.0%
neg-mul-10.0%
distribute-lft1-in0.0%
metadata-eval0.0%
mul0-lft53.1%
distribute-lft-neg-in53.1%
distribute-rgt-neg-in53.1%
metadata-eval53.1%
Simplified53.1%
Taylor expanded in c0 around 0 59.9%
if 1.80000000000000005e-124 < D < 1.8000000000000001e-74Initial program 54.6%
+-commutative54.6%
+-commutative54.6%
times-frac54.6%
fma-neg54.6%
Simplified54.6%
Taylor expanded in c0 around inf 62.6%
expm1-log1p-u31.8%
expm1-udef31.8%
Applied egg-rr31.8%
expm1-def31.8%
expm1-log1p62.6%
associate-*l/69.5%
associate-/l*69.5%
*-commutative69.5%
times-frac69.5%
metadata-eval69.5%
associate-*l/69.5%
unpow269.5%
unpow269.5%
times-frac69.7%
unpow269.7%
times-frac61.9%
Simplified61.9%
expm1-log1p-u31.0%
expm1-udef31.0%
*-un-lft-identity31.0%
Applied egg-rr31.0%
expm1-def31.0%
expm1-log1p61.9%
associate-/r/61.9%
Simplified61.9%
pow261.9%
Applied egg-rr61.9%
if 7.5000000000000003e-62 < D Initial program 22.9%
+-commutative22.9%
+-commutative22.9%
times-frac22.9%
fma-neg22.9%
Simplified24.9%
Taylor expanded in c0 around inf 40.2%
expm1-log1p-u19.9%
expm1-udef16.3%
Applied egg-rr18.1%
expm1-def21.8%
expm1-log1p42.3%
associate-*l/36.7%
associate-/l*42.3%
*-commutative42.3%
times-frac42.3%
metadata-eval42.3%
associate-*l/38.6%
unpow238.6%
unpow238.6%
times-frac56.1%
unpow256.1%
times-frac59.9%
Simplified59.9%
expm1-log1p-u30.0%
expm1-udef24.4%
*-un-lft-identity24.4%
Applied egg-rr24.4%
expm1-def30.0%
expm1-log1p59.9%
associate-/r/59.9%
Simplified59.9%
pow259.9%
clear-num59.9%
frac-times60.0%
*-un-lft-identity60.0%
Applied egg-rr60.0%
Final simplification47.3%
(FPCore (c0 w h D d M)
:precision binary64
(if (<= D 7.2e-219)
(* (/ c0 w) (/ (* (/ c0 w) (* d (/ d D))) (* h D)))
(if (<= D 2.05e-122)
0.0
(if (<= D 1.45e-74)
(* (/ c0 w) (* (/ c0 w) (/ (* (/ d D) (/ d D)) h)))
(if (<= D 4.3e-61)
0.0
(* (/ c0 w) (* (/ c0 w) (/ (/ d (* D (/ D d))) h))))))))
double code(double c0, double w, double h, double D, double d, double M) {
double tmp;
if (D <= 7.2e-219) {
tmp = (c0 / w) * (((c0 / w) * (d * (d / D))) / (h * D));
} else if (D <= 2.05e-122) {
tmp = 0.0;
} else if (D <= 1.45e-74) {
tmp = (c0 / w) * ((c0 / w) * (((d / D) * (d / D)) / h));
} else if (D <= 4.3e-61) {
tmp = 0.0;
} else {
tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / 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) :: tmp
if (d <= 7.2d-219) then
tmp = (c0 / w) * (((c0 / w) * (d_1 * (d_1 / d))) / (h * d))
else if (d <= 2.05d-122) then
tmp = 0.0d0
else if (d <= 1.45d-74) then
tmp = (c0 / w) * ((c0 / w) * (((d_1 / d) * (d_1 / d)) / h))
else if (d <= 4.3d-61) then
tmp = 0.0d0
else
tmp = (c0 / w) * ((c0 / w) * ((d_1 / (d * (d / d_1))) / h))
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 <= 7.2e-219) {
tmp = (c0 / w) * (((c0 / w) * (d * (d / D))) / (h * D));
} else if (D <= 2.05e-122) {
tmp = 0.0;
} else if (D <= 1.45e-74) {
tmp = (c0 / w) * ((c0 / w) * (((d / D) * (d / D)) / h));
} else if (D <= 4.3e-61) {
tmp = 0.0;
} else {
tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / h));
}
return tmp;
}
def code(c0, w, h, D, d, M): tmp = 0 if D <= 7.2e-219: tmp = (c0 / w) * (((c0 / w) * (d * (d / D))) / (h * D)) elif D <= 2.05e-122: tmp = 0.0 elif D <= 1.45e-74: tmp = (c0 / w) * ((c0 / w) * (((d / D) * (d / D)) / h)) elif D <= 4.3e-61: tmp = 0.0 else: tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / h)) return tmp
function code(c0, w, h, D, d, M) tmp = 0.0 if (D <= 7.2e-219) tmp = Float64(Float64(c0 / w) * Float64(Float64(Float64(c0 / w) * Float64(d * Float64(d / D))) / Float64(h * D))); elseif (D <= 2.05e-122) tmp = 0.0; elseif (D <= 1.45e-74) tmp = Float64(Float64(c0 / w) * Float64(Float64(c0 / w) * Float64(Float64(Float64(d / D) * Float64(d / D)) / h))); elseif (D <= 4.3e-61) tmp = 0.0; else tmp = Float64(Float64(c0 / w) * Float64(Float64(c0 / w) * Float64(Float64(d / Float64(D * Float64(D / d))) / h))); end return tmp end
function tmp_2 = code(c0, w, h, D, d, M) tmp = 0.0; if (D <= 7.2e-219) tmp = (c0 / w) * (((c0 / w) * (d * (d / D))) / (h * D)); elseif (D <= 2.05e-122) tmp = 0.0; elseif (D <= 1.45e-74) tmp = (c0 / w) * ((c0 / w) * (((d / D) * (d / D)) / h)); elseif (D <= 4.3e-61) tmp = 0.0; else tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / h)); end tmp_2 = tmp; end
code[c0_, w_, h_, D_, d_, M_] := If[LessEqual[D, 7.2e-219], N[(N[(c0 / w), $MachinePrecision] * N[(N[(N[(c0 / w), $MachinePrecision] * N[(d * N[(d / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(h * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[D, 2.05e-122], 0.0, If[LessEqual[D, 1.45e-74], N[(N[(c0 / w), $MachinePrecision] * N[(N[(c0 / w), $MachinePrecision] * N[(N[(N[(d / D), $MachinePrecision] * N[(d / D), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[D, 4.3e-61], 0.0, N[(N[(c0 / w), $MachinePrecision] * N[(N[(c0 / w), $MachinePrecision] * N[(N[(d / N[(D * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;D \leq 7.2 \cdot 10^{-219}:\\
\;\;\;\;\frac{c0}{w} \cdot \frac{\frac{c0}{w} \cdot \left(d \cdot \frac{d}{D}\right)}{h \cdot D}\\
\mathbf{elif}\;D \leq 2.05 \cdot 10^{-122}:\\
\;\;\;\;0\\
\mathbf{elif}\;D \leq 1.45 \cdot 10^{-74}:\\
\;\;\;\;\frac{c0}{w} \cdot \left(\frac{c0}{w} \cdot \frac{\frac{d}{D} \cdot \frac{d}{D}}{h}\right)\\
\mathbf{elif}\;D \leq 4.3 \cdot 10^{-61}:\\
\;\;\;\;0\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{w} \cdot \left(\frac{c0}{w} \cdot \frac{\frac{d}{D \cdot \frac{D}{d}}}{h}\right)\\
\end{array}
\end{array}
if D < 7.19999999999999947e-219Initial program 23.7%
+-commutative23.7%
+-commutative23.7%
times-frac23.0%
fma-neg23.0%
Simplified23.8%
Taylor expanded in c0 around inf 33.0%
expm1-log1p-u14.6%
expm1-udef14.6%
Applied egg-rr15.3%
expm1-def15.3%
expm1-log1p32.6%
associate-*l/32.6%
associate-/l*32.6%
*-commutative32.6%
times-frac32.6%
metadata-eval32.6%
associate-*l/34.0%
unpow234.0%
unpow234.0%
times-frac40.7%
unpow240.7%
times-frac41.7%
Simplified41.7%
expm1-log1p-u20.5%
expm1-udef20.9%
*-un-lft-identity20.9%
Applied egg-rr20.9%
expm1-def20.5%
expm1-log1p41.7%
associate-/r/42.8%
Simplified42.8%
pow242.8%
frac-times40.5%
associate-*l/39.9%
associate-/r*42.3%
associate-*r/41.1%
frac-times41.7%
Applied egg-rr41.7%
if 7.19999999999999947e-219 < D < 2.05e-122 or 1.45e-74 < D < 4.3000000000000003e-61Initial program 10.0%
+-commutative10.0%
+-commutative10.0%
times-frac10.0%
fma-neg10.0%
Simplified10.1%
Taylor expanded in c0 around -inf 0.0%
associate-*r*0.0%
neg-mul-10.0%
distribute-lft1-in0.0%
metadata-eval0.0%
mul0-lft53.1%
distribute-lft-neg-in53.1%
distribute-rgt-neg-in53.1%
metadata-eval53.1%
Simplified53.1%
Taylor expanded in c0 around 0 59.9%
if 2.05e-122 < D < 1.45e-74Initial program 54.6%
+-commutative54.6%
+-commutative54.6%
times-frac54.6%
fma-neg54.6%
Simplified54.6%
Taylor expanded in c0 around inf 62.6%
expm1-log1p-u31.8%
expm1-udef31.8%
Applied egg-rr31.8%
expm1-def31.8%
expm1-log1p62.6%
associate-*l/69.5%
associate-/l*69.5%
*-commutative69.5%
times-frac69.5%
metadata-eval69.5%
associate-*l/69.5%
unpow269.5%
unpow269.5%
times-frac69.7%
unpow269.7%
times-frac61.9%
Simplified61.9%
expm1-log1p-u31.0%
expm1-udef31.0%
*-un-lft-identity31.0%
Applied egg-rr31.0%
expm1-def31.0%
expm1-log1p61.9%
associate-/r/61.9%
Simplified61.9%
pow261.9%
Applied egg-rr61.9%
if 4.3000000000000003e-61 < D Initial program 22.9%
+-commutative22.9%
+-commutative22.9%
times-frac22.9%
fma-neg22.9%
Simplified24.9%
Taylor expanded in c0 around inf 40.2%
expm1-log1p-u19.9%
expm1-udef16.3%
Applied egg-rr18.1%
expm1-def21.8%
expm1-log1p42.3%
associate-*l/36.7%
associate-/l*42.3%
*-commutative42.3%
times-frac42.3%
metadata-eval42.3%
associate-*l/38.6%
unpow238.6%
unpow238.6%
times-frac56.1%
unpow256.1%
times-frac59.9%
Simplified59.9%
expm1-log1p-u30.0%
expm1-udef24.4%
*-un-lft-identity24.4%
Applied egg-rr24.4%
expm1-def30.0%
expm1-log1p59.9%
associate-/r/59.9%
Simplified59.9%
pow259.9%
clear-num59.9%
frac-times60.0%
*-un-lft-identity60.0%
Applied egg-rr60.0%
Final simplification48.5%
(FPCore (c0 w h D d M)
:precision binary64
(if (<= c0 -4.5e+231)
0.0
(if (or (<= c0 -5e-127) (not (<= c0 1.2e-93)))
(* (/ c0 w) (* (/ c0 w) (/ (* (/ d D) (/ d D)) h)))
0.0)))
double code(double c0, double w, double h, double D, double d, double M) {
double tmp;
if (c0 <= -4.5e+231) {
tmp = 0.0;
} else if ((c0 <= -5e-127) || !(c0 <= 1.2e-93)) {
tmp = (c0 / w) * ((c0 / w) * (((d / D) * (d / D)) / 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 (c0 <= (-4.5d+231)) then
tmp = 0.0d0
else if ((c0 <= (-5d-127)) .or. (.not. (c0 <= 1.2d-93))) then
tmp = (c0 / w) * ((c0 / w) * (((d_1 / d) * (d_1 / d)) / 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 (c0 <= -4.5e+231) {
tmp = 0.0;
} else if ((c0 <= -5e-127) || !(c0 <= 1.2e-93)) {
tmp = (c0 / w) * ((c0 / w) * (((d / D) * (d / D)) / h));
} else {
tmp = 0.0;
}
return tmp;
}
def code(c0, w, h, D, d, M): tmp = 0 if c0 <= -4.5e+231: tmp = 0.0 elif (c0 <= -5e-127) or not (c0 <= 1.2e-93): tmp = (c0 / w) * ((c0 / w) * (((d / D) * (d / D)) / h)) else: tmp = 0.0 return tmp
function code(c0, w, h, D, d, M) tmp = 0.0 if (c0 <= -4.5e+231) tmp = 0.0; elseif ((c0 <= -5e-127) || !(c0 <= 1.2e-93)) tmp = Float64(Float64(c0 / w) * Float64(Float64(c0 / w) * Float64(Float64(Float64(d / D) * Float64(d / D)) / h))); else tmp = 0.0; end return tmp end
function tmp_2 = code(c0, w, h, D, d, M) tmp = 0.0; if (c0 <= -4.5e+231) tmp = 0.0; elseif ((c0 <= -5e-127) || ~((c0 <= 1.2e-93))) tmp = (c0 / w) * ((c0 / w) * (((d / D) * (d / D)) / h)); else tmp = 0.0; end tmp_2 = tmp; end
code[c0_, w_, h_, D_, d_, M_] := If[LessEqual[c0, -4.5e+231], 0.0, If[Or[LessEqual[c0, -5e-127], N[Not[LessEqual[c0, 1.2e-93]], $MachinePrecision]], N[(N[(c0 / w), $MachinePrecision] * N[(N[(c0 / w), $MachinePrecision] * N[(N[(N[(d / D), $MachinePrecision] * N[(d / D), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c0 \leq -4.5 \cdot 10^{+231}:\\
\;\;\;\;0\\
\mathbf{elif}\;c0 \leq -5 \cdot 10^{-127} \lor \neg \left(c0 \leq 1.2 \cdot 10^{-93}\right):\\
\;\;\;\;\frac{c0}{w} \cdot \left(\frac{c0}{w} \cdot \frac{\frac{d}{D} \cdot \frac{d}{D}}{h}\right)\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if c0 < -4.49999999999999991e231 or -4.9999999999999997e-127 < c0 < 1.2000000000000001e-93Initial program 14.7%
+-commutative14.7%
+-commutative14.7%
times-frac13.5%
fma-neg13.5%
Simplified13.6%
Taylor expanded in c0 around -inf 1.5%
associate-*r*1.5%
neg-mul-11.5%
distribute-lft1-in1.5%
metadata-eval1.5%
mul0-lft48.5%
distribute-lft-neg-in48.5%
distribute-rgt-neg-in48.5%
metadata-eval48.5%
Simplified48.5%
Taylor expanded in c0 around 0 53.4%
if -4.49999999999999991e231 < c0 < -4.9999999999999997e-127 or 1.2000000000000001e-93 < c0 Initial program 27.9%
+-commutative27.9%
+-commutative27.9%
times-frac27.9%
fma-neg27.9%
Simplified29.2%
Taylor expanded in c0 around inf 39.2%
expm1-log1p-u18.0%
expm1-udef18.0%
Applied egg-rr19.2%
expm1-def19.2%
expm1-log1p40.5%
associate-*l/40.5%
associate-/l*41.0%
*-commutative41.0%
times-frac41.0%
metadata-eval41.0%
associate-*l/41.7%
unpow241.7%
unpow241.7%
times-frac50.2%
unpow250.2%
times-frac50.8%
Simplified50.8%
expm1-log1p-u24.0%
expm1-udef24.1%
*-un-lft-identity24.1%
Applied egg-rr24.1%
expm1-def24.0%
expm1-log1p50.8%
associate-/r/51.3%
Simplified51.3%
pow251.3%
Applied egg-rr51.3%
Final simplification52.0%
(FPCore (c0 w h D d M)
:precision binary64
(if (<= c0 -3.6e+232)
0.0
(if (<= c0 -3.4e-128)
(* (/ c0 w) (* (/ c0 w) (/ (* (/ d D) (/ d D)) h)))
(if (<= c0 7.5e-95)
0.0
(* (/ c0 w) (* (/ c0 w) (/ (/ d (* D (/ D d))) h)))))))
double code(double c0, double w, double h, double D, double d, double M) {
double tmp;
if (c0 <= -3.6e+232) {
tmp = 0.0;
} else if (c0 <= -3.4e-128) {
tmp = (c0 / w) * ((c0 / w) * (((d / D) * (d / D)) / h));
} else if (c0 <= 7.5e-95) {
tmp = 0.0;
} else {
tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / 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) :: tmp
if (c0 <= (-3.6d+232)) then
tmp = 0.0d0
else if (c0 <= (-3.4d-128)) then
tmp = (c0 / w) * ((c0 / w) * (((d_1 / d) * (d_1 / d)) / h))
else if (c0 <= 7.5d-95) then
tmp = 0.0d0
else
tmp = (c0 / w) * ((c0 / w) * ((d_1 / (d * (d / d_1))) / h))
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 (c0 <= -3.6e+232) {
tmp = 0.0;
} else if (c0 <= -3.4e-128) {
tmp = (c0 / w) * ((c0 / w) * (((d / D) * (d / D)) / h));
} else if (c0 <= 7.5e-95) {
tmp = 0.0;
} else {
tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / h));
}
return tmp;
}
def code(c0, w, h, D, d, M): tmp = 0 if c0 <= -3.6e+232: tmp = 0.0 elif c0 <= -3.4e-128: tmp = (c0 / w) * ((c0 / w) * (((d / D) * (d / D)) / h)) elif c0 <= 7.5e-95: tmp = 0.0 else: tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / h)) return tmp
function code(c0, w, h, D, d, M) tmp = 0.0 if (c0 <= -3.6e+232) tmp = 0.0; elseif (c0 <= -3.4e-128) tmp = Float64(Float64(c0 / w) * Float64(Float64(c0 / w) * Float64(Float64(Float64(d / D) * Float64(d / D)) / h))); elseif (c0 <= 7.5e-95) tmp = 0.0; else tmp = Float64(Float64(c0 / w) * Float64(Float64(c0 / w) * Float64(Float64(d / Float64(D * Float64(D / d))) / h))); end return tmp end
function tmp_2 = code(c0, w, h, D, d, M) tmp = 0.0; if (c0 <= -3.6e+232) tmp = 0.0; elseif (c0 <= -3.4e-128) tmp = (c0 / w) * ((c0 / w) * (((d / D) * (d / D)) / h)); elseif (c0 <= 7.5e-95) tmp = 0.0; else tmp = (c0 / w) * ((c0 / w) * ((d / (D * (D / d))) / h)); end tmp_2 = tmp; end
code[c0_, w_, h_, D_, d_, M_] := If[LessEqual[c0, -3.6e+232], 0.0, If[LessEqual[c0, -3.4e-128], N[(N[(c0 / w), $MachinePrecision] * N[(N[(c0 / w), $MachinePrecision] * N[(N[(N[(d / D), $MachinePrecision] * N[(d / D), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c0, 7.5e-95], 0.0, N[(N[(c0 / w), $MachinePrecision] * N[(N[(c0 / w), $MachinePrecision] * N[(N[(d / N[(D * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c0 \leq -3.6 \cdot 10^{+232}:\\
\;\;\;\;0\\
\mathbf{elif}\;c0 \leq -3.4 \cdot 10^{-128}:\\
\;\;\;\;\frac{c0}{w} \cdot \left(\frac{c0}{w} \cdot \frac{\frac{d}{D} \cdot \frac{d}{D}}{h}\right)\\
\mathbf{elif}\;c0 \leq 7.5 \cdot 10^{-95}:\\
\;\;\;\;0\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{w} \cdot \left(\frac{c0}{w} \cdot \frac{\frac{d}{D \cdot \frac{D}{d}}}{h}\right)\\
\end{array}
\end{array}
if c0 < -3.59999999999999993e232 or -3.39999999999999975e-128 < c0 < 7.5000000000000003e-95Initial program 14.7%
+-commutative14.7%
+-commutative14.7%
times-frac13.5%
fma-neg13.5%
Simplified13.6%
Taylor expanded in c0 around -inf 1.5%
associate-*r*1.5%
neg-mul-11.5%
distribute-lft1-in1.5%
metadata-eval1.5%
mul0-lft48.5%
distribute-lft-neg-in48.5%
distribute-rgt-neg-in48.5%
metadata-eval48.5%
Simplified48.5%
Taylor expanded in c0 around 0 53.4%
if -3.59999999999999993e232 < c0 < -3.39999999999999975e-128Initial program 32.3%
+-commutative32.3%
+-commutative32.3%
times-frac32.3%
fma-neg32.3%
Simplified32.4%
Taylor expanded in c0 around inf 46.1%
expm1-log1p-u21.7%
expm1-udef21.7%
Applied egg-rr21.8%
expm1-def21.8%
expm1-log1p46.3%
associate-*l/47.5%
associate-/l*47.6%
*-commutative47.6%
times-frac47.6%
metadata-eval47.6%
associate-*l/47.5%
unpow247.5%
unpow247.5%
times-frac58.2%
unpow258.2%
times-frac57.0%
Simplified57.0%
expm1-log1p-u28.4%
expm1-udef27.2%
*-un-lft-identity27.2%
Applied egg-rr27.2%
expm1-def28.4%
expm1-log1p57.0%
associate-/r/58.2%
Simplified58.2%
pow258.2%
Applied egg-rr58.2%
if 7.5000000000000003e-95 < c0 Initial program 24.5%
+-commutative24.5%
+-commutative24.5%
times-frac24.5%
fma-neg24.5%
Simplified26.7%
Taylor expanded in c0 around inf 33.8%
expm1-log1p-u15.1%
expm1-udef15.1%
Applied egg-rr17.2%
expm1-def17.2%
expm1-log1p35.9%
associate-*l/34.9%
associate-/l*35.9%
*-commutative35.9%
times-frac35.9%
metadata-eval35.9%
associate-*l/37.1%
unpow237.1%
unpow237.1%
times-frac44.0%
unpow244.0%
times-frac45.8%
Simplified45.8%
expm1-log1p-u20.6%
expm1-udef21.6%
*-un-lft-identity21.6%
Applied egg-rr21.6%
expm1-def20.6%
expm1-log1p45.8%
associate-/r/45.8%
Simplified45.8%
pow245.8%
clear-num45.8%
frac-times46.9%
*-un-lft-identity46.9%
Applied egg-rr46.9%
Final simplification52.4%
(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.5%
+-commutative23.5%
+-commutative23.5%
times-frac23.1%
fma-neg23.1%
Simplified23.9%
Taylor expanded in c0 around -inf 3.0%
associate-*r*3.0%
neg-mul-13.0%
distribute-lft1-in3.0%
metadata-eval3.0%
mul0-lft30.7%
distribute-lft-neg-in30.7%
distribute-rgt-neg-in30.7%
metadata-eval30.7%
Simplified30.7%
Taylor expanded in c0 around 0 34.9%
Final simplification34.9%
herbie shell --seed 2024024
(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))))))