
(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 8 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 (/ D d)) (/ (* c0 2.0) (/ (* h D) (/ d w))))
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 / (D / d)) * ((c0 * 2.0) / ((h * D) / (d / w)));
} 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 / (D / d)) * ((c0 * 2.0) / ((h * D) / (d / w)));
} 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 / (D / d)) * ((c0 * 2.0) / ((h * D) / (d / w))) 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(Float64(t_0 / Float64(D / d)) * Float64(Float64(c0 * 2.0) / Float64(Float64(h * D) / Float64(d / w)))); 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 / (D / d)) * ((c0 * 2.0) / ((h * D) / (d / w))); 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[(N[(t$95$0 / N[(D / d), $MachinePrecision]), $MachinePrecision] * N[(N[(c0 * 2.0), $MachinePrecision] / N[(N[(h * D), $MachinePrecision] / N[(d / w), $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:\\
\;\;\;\;\frac{t_0}{\frac{D}{d}} \cdot \frac{c0 \cdot 2}{\frac{h \cdot D}{\frac{d}{w}}}\\
\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 74.2%
Simplified63.8%
associate-*r/64.7%
associate-/r*64.7%
Applied egg-rr64.7%
frac-times64.6%
associate-/l*64.6%
Applied egg-rr64.6%
Taylor expanded in c0 around inf 73.1%
*-commutative73.1%
associate-/l*73.1%
associate-*l/73.1%
unpow273.1%
associate-*l*74.7%
unpow274.7%
Simplified74.7%
frac-times63.6%
*-commutative63.6%
times-frac67.0%
associate-*r*66.0%
*-commutative66.0%
Applied egg-rr66.0%
associate-/r*64.7%
associate-*l/70.8%
times-frac78.1%
*-commutative78.1%
associate-/l*76.1%
*-commutative76.1%
Simplified76.1%
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%
Simplified1.9%
Taylor expanded in c0 around -inf 2.7%
mul-1-neg2.7%
distribute-rgt-in0.2%
Simplified43.2%
Taylor expanded in c0 around 0 47.1%
Final simplification57.5%
(FPCore (c0 w h D d M)
:precision binary64
(let* ((t_0 (/ (* c0 d) D)))
(if (<= c0 -3.5e+182)
(/ (/ (* t_0 t_0) (* w w)) h)
(if (<= c0 -1.35e+83)
0.0
(if (or (<= c0 -3.6e-80)
(and (not (<= c0 9.8e-87))
(or (<= c0 4.2e+244) (not (<= c0 2.5e+265)))))
(* (* (* 2.0 (/ c0 (* 2.0 w))) (/ (/ c0 w) h)) (/ (* d (/ d D)) D))
0.0)))))
double code(double c0, double w, double h, double D, double d, double M) {
double t_0 = (c0 * d) / D;
double tmp;
if (c0 <= -3.5e+182) {
tmp = ((t_0 * t_0) / (w * w)) / h;
} else if (c0 <= -1.35e+83) {
tmp = 0.0;
} else if ((c0 <= -3.6e-80) || (!(c0 <= 9.8e-87) && ((c0 <= 4.2e+244) || !(c0 <= 2.5e+265)))) {
tmp = ((2.0 * (c0 / (2.0 * w))) * ((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) :: t_0
real(8) :: tmp
t_0 = (c0 * d_1) / d
if (c0 <= (-3.5d+182)) then
tmp = ((t_0 * t_0) / (w * w)) / h
else if (c0 <= (-1.35d+83)) then
tmp = 0.0d0
else if ((c0 <= (-3.6d-80)) .or. (.not. (c0 <= 9.8d-87)) .and. (c0 <= 4.2d+244) .or. (.not. (c0 <= 2.5d+265))) then
tmp = ((2.0d0 * (c0 / (2.0d0 * w))) * ((c0 / w) / h)) * ((d_1 * (d_1 / d)) / 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 * d) / D;
double tmp;
if (c0 <= -3.5e+182) {
tmp = ((t_0 * t_0) / (w * w)) / h;
} else if (c0 <= -1.35e+83) {
tmp = 0.0;
} else if ((c0 <= -3.6e-80) || (!(c0 <= 9.8e-87) && ((c0 <= 4.2e+244) || !(c0 <= 2.5e+265)))) {
tmp = ((2.0 * (c0 / (2.0 * w))) * ((c0 / w) / h)) * ((d * (d / D)) / D);
} else {
tmp = 0.0;
}
return tmp;
}
def code(c0, w, h, D, d, M): t_0 = (c0 * d) / D tmp = 0 if c0 <= -3.5e+182: tmp = ((t_0 * t_0) / (w * w)) / h elif c0 <= -1.35e+83: tmp = 0.0 elif (c0 <= -3.6e-80) or (not (c0 <= 9.8e-87) and ((c0 <= 4.2e+244) or not (c0 <= 2.5e+265))): tmp = ((2.0 * (c0 / (2.0 * w))) * ((c0 / w) / h)) * ((d * (d / D)) / D) else: tmp = 0.0 return tmp
function code(c0, w, h, D, d, M) t_0 = Float64(Float64(c0 * d) / D) tmp = 0.0 if (c0 <= -3.5e+182) tmp = Float64(Float64(Float64(t_0 * t_0) / Float64(w * w)) / h); elseif (c0 <= -1.35e+83) tmp = 0.0; elseif ((c0 <= -3.6e-80) || (!(c0 <= 9.8e-87) && ((c0 <= 4.2e+244) || !(c0 <= 2.5e+265)))) tmp = Float64(Float64(Float64(2.0 * Float64(c0 / Float64(2.0 * w))) * Float64(Float64(c0 / w) / h)) * Float64(Float64(d * Float64(d / D)) / D)); else tmp = 0.0; end return tmp end
function tmp_2 = code(c0, w, h, D, d, M) t_0 = (c0 * d) / D; tmp = 0.0; if (c0 <= -3.5e+182) tmp = ((t_0 * t_0) / (w * w)) / h; elseif (c0 <= -1.35e+83) tmp = 0.0; elseif ((c0 <= -3.6e-80) || (~((c0 <= 9.8e-87)) && ((c0 <= 4.2e+244) || ~((c0 <= 2.5e+265))))) tmp = ((2.0 * (c0 / (2.0 * w))) * ((c0 / w) / h)) * ((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[(N[(c0 * d), $MachinePrecision] / D), $MachinePrecision]}, If[LessEqual[c0, -3.5e+182], N[(N[(N[(t$95$0 * t$95$0), $MachinePrecision] / N[(w * w), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision], If[LessEqual[c0, -1.35e+83], 0.0, If[Or[LessEqual[c0, -3.6e-80], And[N[Not[LessEqual[c0, 9.8e-87]], $MachinePrecision], Or[LessEqual[c0, 4.2e+244], N[Not[LessEqual[c0, 2.5e+265]], $MachinePrecision]]]], N[(N[(N[(2.0 * N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(c0 / w), $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision] * N[(N[(d * N[(d / D), $MachinePrecision]), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision], 0.0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{c0 \cdot d}{D}\\
\mathbf{if}\;c0 \leq -3.5 \cdot 10^{+182}:\\
\;\;\;\;\frac{\frac{t_0 \cdot t_0}{w \cdot w}}{h}\\
\mathbf{elif}\;c0 \leq -1.35 \cdot 10^{+83}:\\
\;\;\;\;0\\
\mathbf{elif}\;c0 \leq -3.6 \cdot 10^{-80} \lor \neg \left(c0 \leq 9.8 \cdot 10^{-87}\right) \land \left(c0 \leq 4.2 \cdot 10^{+244} \lor \neg \left(c0 \leq 2.5 \cdot 10^{+265}\right)\right):\\
\;\;\;\;\left(\left(2 \cdot \frac{c0}{2 \cdot w}\right) \cdot \frac{\frac{c0}{w}}{h}\right) \cdot \frac{d \cdot \frac{d}{D}}{D}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if c0 < -3.50000000000000023e182Initial program 24.5%
Simplified24.3%
Taylor expanded in c0 around inf 35.9%
unpow235.9%
*-commutative35.9%
associate-/l/35.8%
unpow235.8%
unpow235.8%
associate-*l/35.8%
times-frac46.5%
associate-*l/46.6%
associate-*r/42.7%
unpow242.7%
associate-*l/46.4%
*-commutative46.4%
associate-/r*49.5%
associate-*r/53.1%
unpow253.1%
Simplified53.1%
Taylor expanded in c0 around 0 49.9%
Taylor expanded in c0 around 0 35.3%
times-frac35.3%
unpow235.3%
unpow235.3%
unpow235.3%
associate-/r*42.8%
unpow242.8%
associate-*r/46.1%
associate-*l/49.1%
unpow249.1%
associate-*r/49.1%
unpow249.1%
*-commutative49.1%
associate-/r*49.0%
Simplified59.8%
if -3.50000000000000023e182 < c0 < -1.35000000000000003e83 or -3.6e-80 < c0 < 9.7999999999999994e-87 or 4.2000000000000002e244 < c0 < 2.5000000000000001e265Initial program 20.1%
Simplified21.0%
Taylor expanded in c0 around -inf 5.9%
mul-1-neg5.9%
distribute-rgt-in5.8%
Simplified49.3%
Taylor expanded in c0 around 0 53.1%
if -1.35000000000000003e83 < c0 < -3.6e-80 or 9.7999999999999994e-87 < c0 < 4.2000000000000002e244 or 2.5000000000000001e265 < c0 Initial program 33.1%
Simplified35.5%
Taylor expanded in c0 around inf 36.9%
unpow236.9%
*-commutative36.9%
associate-/l/37.0%
unpow237.0%
unpow237.0%
associate-*l/39.4%
times-frac48.2%
associate-*l/48.3%
associate-*r/43.7%
unpow243.7%
associate-*l/48.7%
*-commutative48.7%
associate-/r*49.4%
associate-*r/50.3%
unpow250.3%
Simplified50.3%
Taylor expanded in c0 around 0 49.6%
associate-*l/48.1%
*-commutative48.1%
Applied egg-rr48.1%
associate-*l/49.6%
associate-*l*49.6%
associate-*r*48.8%
*-commutative48.8%
*-commutative48.8%
*-commutative48.8%
associate-/r*51.4%
Simplified51.4%
pow251.4%
associate-*r/50.4%
Applied egg-rr50.4%
Final simplification52.6%
(FPCore (c0 w h D d M)
:precision binary64
(let* ((t_0 (/ (* c0 d) D)) (t_1 (/ c0 (* 2.0 w))))
(if (<= c0 -9.8e+182)
(/ (/ (* t_0 t_0) (* w w)) h)
(if (<= c0 -5.5e+83)
0.0
(if (<= c0 -1.6e-72)
(* (* (* 2.0 t_1) (/ (/ c0 w) h)) (/ (* d (/ d D)) D))
(if (<= c0 9.5e-86)
0.0
(if (or (<= c0 3.8e+245) (not (<= c0 2.15e+266)))
(* t_1 (* 2.0 (* (/ (/ c0 h) w) (* (/ d D) (/ d D)))))
0.0)))))))
double code(double c0, double w, double h, double D, double d, double M) {
double t_0 = (c0 * d) / D;
double t_1 = c0 / (2.0 * w);
double tmp;
if (c0 <= -9.8e+182) {
tmp = ((t_0 * t_0) / (w * w)) / h;
} else if (c0 <= -5.5e+83) {
tmp = 0.0;
} else if (c0 <= -1.6e-72) {
tmp = ((2.0 * t_1) * ((c0 / w) / h)) * ((d * (d / D)) / D);
} else if (c0 <= 9.5e-86) {
tmp = 0.0;
} else if ((c0 <= 3.8e+245) || !(c0 <= 2.15e+266)) {
tmp = t_1 * (2.0 * (((c0 / h) / w) * ((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 * d_1) / d
t_1 = c0 / (2.0d0 * w)
if (c0 <= (-9.8d+182)) then
tmp = ((t_0 * t_0) / (w * w)) / h
else if (c0 <= (-5.5d+83)) then
tmp = 0.0d0
else if (c0 <= (-1.6d-72)) then
tmp = ((2.0d0 * t_1) * ((c0 / w) / h)) * ((d_1 * (d_1 / d)) / d)
else if (c0 <= 9.5d-86) then
tmp = 0.0d0
else if ((c0 <= 3.8d+245) .or. (.not. (c0 <= 2.15d+266))) then
tmp = t_1 * (2.0d0 * (((c0 / h) / w) * ((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 * d) / D;
double t_1 = c0 / (2.0 * w);
double tmp;
if (c0 <= -9.8e+182) {
tmp = ((t_0 * t_0) / (w * w)) / h;
} else if (c0 <= -5.5e+83) {
tmp = 0.0;
} else if (c0 <= -1.6e-72) {
tmp = ((2.0 * t_1) * ((c0 / w) / h)) * ((d * (d / D)) / D);
} else if (c0 <= 9.5e-86) {
tmp = 0.0;
} else if ((c0 <= 3.8e+245) || !(c0 <= 2.15e+266)) {
tmp = t_1 * (2.0 * (((c0 / h) / w) * ((d / D) * (d / D))));
} else {
tmp = 0.0;
}
return tmp;
}
def code(c0, w, h, D, d, M): t_0 = (c0 * d) / D t_1 = c0 / (2.0 * w) tmp = 0 if c0 <= -9.8e+182: tmp = ((t_0 * t_0) / (w * w)) / h elif c0 <= -5.5e+83: tmp = 0.0 elif c0 <= -1.6e-72: tmp = ((2.0 * t_1) * ((c0 / w) / h)) * ((d * (d / D)) / D) elif c0 <= 9.5e-86: tmp = 0.0 elif (c0 <= 3.8e+245) or not (c0 <= 2.15e+266): tmp = t_1 * (2.0 * (((c0 / h) / w) * ((d / D) * (d / D)))) else: tmp = 0.0 return tmp
function code(c0, w, h, D, d, M) t_0 = Float64(Float64(c0 * d) / D) t_1 = Float64(c0 / Float64(2.0 * w)) tmp = 0.0 if (c0 <= -9.8e+182) tmp = Float64(Float64(Float64(t_0 * t_0) / Float64(w * w)) / h); elseif (c0 <= -5.5e+83) tmp = 0.0; elseif (c0 <= -1.6e-72) tmp = Float64(Float64(Float64(2.0 * t_1) * Float64(Float64(c0 / w) / h)) * Float64(Float64(d * Float64(d / D)) / D)); elseif (c0 <= 9.5e-86) tmp = 0.0; elseif ((c0 <= 3.8e+245) || !(c0 <= 2.15e+266)) tmp = Float64(t_1 * Float64(2.0 * Float64(Float64(Float64(c0 / h) / w) * 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 * d) / D; t_1 = c0 / (2.0 * w); tmp = 0.0; if (c0 <= -9.8e+182) tmp = ((t_0 * t_0) / (w * w)) / h; elseif (c0 <= -5.5e+83) tmp = 0.0; elseif (c0 <= -1.6e-72) tmp = ((2.0 * t_1) * ((c0 / w) / h)) * ((d * (d / D)) / D); elseif (c0 <= 9.5e-86) tmp = 0.0; elseif ((c0 <= 3.8e+245) || ~((c0 <= 2.15e+266))) tmp = t_1 * (2.0 * (((c0 / h) / w) * ((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[(N[(c0 * d), $MachinePrecision] / D), $MachinePrecision]}, Block[{t$95$1 = N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c0, -9.8e+182], N[(N[(N[(t$95$0 * t$95$0), $MachinePrecision] / N[(w * w), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision], If[LessEqual[c0, -5.5e+83], 0.0, If[LessEqual[c0, -1.6e-72], N[(N[(N[(2.0 * t$95$1), $MachinePrecision] * N[(N[(c0 / w), $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision] * N[(N[(d * N[(d / D), $MachinePrecision]), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision], If[LessEqual[c0, 9.5e-86], 0.0, If[Or[LessEqual[c0, 3.8e+245], N[Not[LessEqual[c0, 2.15e+266]], $MachinePrecision]], N[(t$95$1 * N[(2.0 * N[(N[(N[(c0 / h), $MachinePrecision] / w), $MachinePrecision] * 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 \cdot d}{D}\\
t_1 := \frac{c0}{2 \cdot w}\\
\mathbf{if}\;c0 \leq -9.8 \cdot 10^{+182}:\\
\;\;\;\;\frac{\frac{t_0 \cdot t_0}{w \cdot w}}{h}\\
\mathbf{elif}\;c0 \leq -5.5 \cdot 10^{+83}:\\
\;\;\;\;0\\
\mathbf{elif}\;c0 \leq -1.6 \cdot 10^{-72}:\\
\;\;\;\;\left(\left(2 \cdot t_1\right) \cdot \frac{\frac{c0}{w}}{h}\right) \cdot \frac{d \cdot \frac{d}{D}}{D}\\
\mathbf{elif}\;c0 \leq 9.5 \cdot 10^{-86}:\\
\;\;\;\;0\\
\mathbf{elif}\;c0 \leq 3.8 \cdot 10^{+245} \lor \neg \left(c0 \leq 2.15 \cdot 10^{+266}\right):\\
\;\;\;\;t_1 \cdot \left(2 \cdot \left(\frac{\frac{c0}{h}}{w} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if c0 < -9.7999999999999999e182Initial program 24.5%
Simplified24.3%
Taylor expanded in c0 around inf 35.9%
unpow235.9%
*-commutative35.9%
associate-/l/35.8%
unpow235.8%
unpow235.8%
associate-*l/35.8%
times-frac46.5%
associate-*l/46.6%
associate-*r/42.7%
unpow242.7%
associate-*l/46.4%
*-commutative46.4%
associate-/r*49.5%
associate-*r/53.1%
unpow253.1%
Simplified53.1%
Taylor expanded in c0 around 0 49.9%
Taylor expanded in c0 around 0 35.3%
times-frac35.3%
unpow235.3%
unpow235.3%
unpow235.3%
associate-/r*42.8%
unpow242.8%
associate-*r/46.1%
associate-*l/49.1%
unpow249.1%
associate-*r/49.1%
unpow249.1%
*-commutative49.1%
associate-/r*49.0%
Simplified59.8%
if -9.7999999999999999e182 < c0 < -5.4999999999999996e83 or -1.6e-72 < c0 < 9.4999999999999996e-86 or 3.8e245 < c0 < 2.1500000000000001e266Initial program 20.1%
Simplified21.0%
Taylor expanded in c0 around -inf 5.9%
mul-1-neg5.9%
distribute-rgt-in5.8%
Simplified49.3%
Taylor expanded in c0 around 0 53.1%
if -5.4999999999999996e83 < c0 < -1.6e-72Initial program 39.1%
Simplified39.1%
Taylor expanded in c0 around inf 43.1%
unpow243.1%
*-commutative43.1%
associate-/l/43.1%
unpow243.1%
unpow243.1%
associate-*l/43.1%
times-frac49.4%
associate-*l/49.5%
associate-*r/46.3%
unpow246.3%
associate-*l/52.7%
*-commutative52.7%
associate-/r*51.4%
associate-*r/51.4%
unpow251.4%
Simplified51.4%
Taylor expanded in c0 around 0 52.7%
associate-*l/52.8%
*-commutative52.8%
Applied egg-rr52.8%
associate-*l/52.7%
associate-*l*52.7%
associate-*r*55.7%
*-commutative55.7%
*-commutative55.7%
*-commutative55.7%
associate-/r*58.8%
Simplified58.8%
pow258.8%
associate-*r/58.9%
Applied egg-rr58.9%
if 9.4999999999999996e-86 < c0 < 3.8e245 or 2.1500000000000001e266 < c0 Initial program 31.0%
Simplified34.3%
Taylor expanded in c0 around inf 34.8%
unpow234.8%
*-commutative34.8%
associate-/l/34.9%
unpow234.9%
unpow234.9%
associate-*l/38.1%
times-frac47.8%
associate-*l/47.9%
associate-*r/42.8%
unpow242.8%
associate-*l/47.3%
*-commutative47.3%
associate-/r*48.7%
associate-*r/49.9%
unpow249.9%
Simplified49.9%
pow248.6%
Applied egg-rr49.9%
Final simplification53.5%
(FPCore (c0 w h D d M)
:precision binary64
(let* ((t_0 (/ (* c0 d) D))
(t_1 (/ c0 (* 2.0 w)))
(t_2 (* (* (* 2.0 t_1) (/ (/ c0 w) h)) (/ (* d (/ d D)) D))))
(if (<= c0 -1.25e+183)
(/ (/ (* t_0 t_0) (* w w)) h)
(if (<= c0 -5.2e+82)
0.0
(if (<= c0 -1.75e-78)
t_2
(if (<= c0 5.8e-87)
0.0
(if (<= c0 2.65e+246)
(* t_1 (* 2.0 (* (* (/ d D) (/ d D)) (/ c0 (* w h)))))
(if (<= c0 5.5e+265) 0.0 t_2))))))))
double code(double c0, double w, double h, double D, double d, double M) {
double t_0 = (c0 * d) / D;
double t_1 = c0 / (2.0 * w);
double t_2 = ((2.0 * t_1) * ((c0 / w) / h)) * ((d * (d / D)) / D);
double tmp;
if (c0 <= -1.25e+183) {
tmp = ((t_0 * t_0) / (w * w)) / h;
} else if (c0 <= -5.2e+82) {
tmp = 0.0;
} else if (c0 <= -1.75e-78) {
tmp = t_2;
} else if (c0 <= 5.8e-87) {
tmp = 0.0;
} else if (c0 <= 2.65e+246) {
tmp = t_1 * (2.0 * (((d / D) * (d / D)) * (c0 / (w * h))));
} else if (c0 <= 5.5e+265) {
tmp = 0.0;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_0 = (c0 * d_1) / d
t_1 = c0 / (2.0d0 * w)
t_2 = ((2.0d0 * t_1) * ((c0 / w) / h)) * ((d_1 * (d_1 / d)) / d)
if (c0 <= (-1.25d+183)) then
tmp = ((t_0 * t_0) / (w * w)) / h
else if (c0 <= (-5.2d+82)) then
tmp = 0.0d0
else if (c0 <= (-1.75d-78)) then
tmp = t_2
else if (c0 <= 5.8d-87) then
tmp = 0.0d0
else if (c0 <= 2.65d+246) then
tmp = t_1 * (2.0d0 * (((d_1 / d) * (d_1 / d)) * (c0 / (w * h))))
else if (c0 <= 5.5d+265) then
tmp = 0.0d0
else
tmp = t_2
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 * d) / D;
double t_1 = c0 / (2.0 * w);
double t_2 = ((2.0 * t_1) * ((c0 / w) / h)) * ((d * (d / D)) / D);
double tmp;
if (c0 <= -1.25e+183) {
tmp = ((t_0 * t_0) / (w * w)) / h;
} else if (c0 <= -5.2e+82) {
tmp = 0.0;
} else if (c0 <= -1.75e-78) {
tmp = t_2;
} else if (c0 <= 5.8e-87) {
tmp = 0.0;
} else if (c0 <= 2.65e+246) {
tmp = t_1 * (2.0 * (((d / D) * (d / D)) * (c0 / (w * h))));
} else if (c0 <= 5.5e+265) {
tmp = 0.0;
} else {
tmp = t_2;
}
return tmp;
}
def code(c0, w, h, D, d, M): t_0 = (c0 * d) / D t_1 = c0 / (2.0 * w) t_2 = ((2.0 * t_1) * ((c0 / w) / h)) * ((d * (d / D)) / D) tmp = 0 if c0 <= -1.25e+183: tmp = ((t_0 * t_0) / (w * w)) / h elif c0 <= -5.2e+82: tmp = 0.0 elif c0 <= -1.75e-78: tmp = t_2 elif c0 <= 5.8e-87: tmp = 0.0 elif c0 <= 2.65e+246: tmp = t_1 * (2.0 * (((d / D) * (d / D)) * (c0 / (w * h)))) elif c0 <= 5.5e+265: tmp = 0.0 else: tmp = t_2 return tmp
function code(c0, w, h, D, d, M) t_0 = Float64(Float64(c0 * d) / D) t_1 = Float64(c0 / Float64(2.0 * w)) t_2 = Float64(Float64(Float64(2.0 * t_1) * Float64(Float64(c0 / w) / h)) * Float64(Float64(d * Float64(d / D)) / D)) tmp = 0.0 if (c0 <= -1.25e+183) tmp = Float64(Float64(Float64(t_0 * t_0) / Float64(w * w)) / h); elseif (c0 <= -5.2e+82) tmp = 0.0; elseif (c0 <= -1.75e-78) tmp = t_2; elseif (c0 <= 5.8e-87) tmp = 0.0; elseif (c0 <= 2.65e+246) tmp = Float64(t_1 * Float64(2.0 * Float64(Float64(Float64(d / D) * Float64(d / D)) * Float64(c0 / Float64(w * h))))); elseif (c0 <= 5.5e+265) tmp = 0.0; else tmp = t_2; end return tmp end
function tmp_2 = code(c0, w, h, D, d, M) t_0 = (c0 * d) / D; t_1 = c0 / (2.0 * w); t_2 = ((2.0 * t_1) * ((c0 / w) / h)) * ((d * (d / D)) / D); tmp = 0.0; if (c0 <= -1.25e+183) tmp = ((t_0 * t_0) / (w * w)) / h; elseif (c0 <= -5.2e+82) tmp = 0.0; elseif (c0 <= -1.75e-78) tmp = t_2; elseif (c0 <= 5.8e-87) tmp = 0.0; elseif (c0 <= 2.65e+246) tmp = t_1 * (2.0 * (((d / D) * (d / D)) * (c0 / (w * h)))); elseif (c0 <= 5.5e+265) tmp = 0.0; else tmp = t_2; end tmp_2 = tmp; end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(N[(c0 * d), $MachinePrecision] / D), $MachinePrecision]}, Block[{t$95$1 = N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(2.0 * t$95$1), $MachinePrecision] * N[(N[(c0 / w), $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision] * N[(N[(d * N[(d / D), $MachinePrecision]), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c0, -1.25e+183], N[(N[(N[(t$95$0 * t$95$0), $MachinePrecision] / N[(w * w), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision], If[LessEqual[c0, -5.2e+82], 0.0, If[LessEqual[c0, -1.75e-78], t$95$2, If[LessEqual[c0, 5.8e-87], 0.0, If[LessEqual[c0, 2.65e+246], N[(t$95$1 * N[(2.0 * N[(N[(N[(d / D), $MachinePrecision] * N[(d / D), $MachinePrecision]), $MachinePrecision] * N[(c0 / N[(w * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c0, 5.5e+265], 0.0, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{c0 \cdot d}{D}\\
t_1 := \frac{c0}{2 \cdot w}\\
t_2 := \left(\left(2 \cdot t_1\right) \cdot \frac{\frac{c0}{w}}{h}\right) \cdot \frac{d \cdot \frac{d}{D}}{D}\\
\mathbf{if}\;c0 \leq -1.25 \cdot 10^{+183}:\\
\;\;\;\;\frac{\frac{t_0 \cdot t_0}{w \cdot w}}{h}\\
\mathbf{elif}\;c0 \leq -5.2 \cdot 10^{+82}:\\
\;\;\;\;0\\
\mathbf{elif}\;c0 \leq -1.75 \cdot 10^{-78}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c0 \leq 5.8 \cdot 10^{-87}:\\
\;\;\;\;0\\
\mathbf{elif}\;c0 \leq 2.65 \cdot 10^{+246}:\\
\;\;\;\;t_1 \cdot \left(2 \cdot \left(\left(\frac{d}{D} \cdot \frac{d}{D}\right) \cdot \frac{c0}{w \cdot h}\right)\right)\\
\mathbf{elif}\;c0 \leq 5.5 \cdot 10^{+265}:\\
\;\;\;\;0\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if c0 < -1.25000000000000002e183Initial program 24.5%
Simplified24.3%
Taylor expanded in c0 around inf 35.9%
unpow235.9%
*-commutative35.9%
associate-/l/35.8%
unpow235.8%
unpow235.8%
associate-*l/35.8%
times-frac46.5%
associate-*l/46.6%
associate-*r/42.7%
unpow242.7%
associate-*l/46.4%
*-commutative46.4%
associate-/r*49.5%
associate-*r/53.1%
unpow253.1%
Simplified53.1%
Taylor expanded in c0 around 0 49.9%
Taylor expanded in c0 around 0 35.3%
times-frac35.3%
unpow235.3%
unpow235.3%
unpow235.3%
associate-/r*42.8%
unpow242.8%
associate-*r/46.1%
associate-*l/49.1%
unpow249.1%
associate-*r/49.1%
unpow249.1%
*-commutative49.1%
associate-/r*49.0%
Simplified59.8%
if -1.25000000000000002e183 < c0 < -5.1999999999999997e82 or -1.75e-78 < c0 < 5.7999999999999998e-87 or 2.64999999999999988e246 < c0 < 5.4999999999999997e265Initial program 20.1%
Simplified21.0%
Taylor expanded in c0 around -inf 5.9%
mul-1-neg5.9%
distribute-rgt-in5.8%
Simplified49.3%
Taylor expanded in c0 around 0 53.1%
if -5.1999999999999997e82 < c0 < -1.75e-78 or 5.4999999999999997e265 < c0 Initial program 40.3%
Simplified40.3%
Taylor expanded in c0 around inf 43.4%
unpow243.4%
*-commutative43.4%
associate-/l/43.4%
unpow243.4%
unpow243.4%
associate-*l/43.4%
times-frac53.4%
associate-*l/53.4%
associate-*r/50.9%
unpow250.9%
associate-*l/55.9%
*-commutative55.9%
associate-/r*57.4%
associate-*r/57.4%
unpow257.4%
Simplified57.4%
Taylor expanded in c0 around 0 55.9%
associate-*l/53.6%
*-commutative53.6%
Applied egg-rr53.6%
associate-*l/55.9%
associate-*l*55.9%
associate-*r*58.3%
*-commutative58.3%
*-commutative58.3%
*-commutative58.3%
associate-/r*63.1%
Simplified63.1%
pow263.1%
associate-*r/63.2%
Applied egg-rr63.2%
if 5.7999999999999998e-87 < c0 < 2.64999999999999988e246Initial program 29.5%
Simplified33.2%
Taylor expanded in c0 around inf 33.7%
unpow233.7%
*-commutative33.7%
associate-/l/33.8%
unpow233.8%
unpow233.8%
associate-*l/37.4%
times-frac45.7%
associate-*l/45.7%
associate-*r/40.1%
unpow240.1%
associate-*l/45.1%
*-commutative45.1%
associate-/r*45.4%
associate-*r/46.8%
unpow246.8%
Simplified46.8%
Taylor expanded in c0 around 0 46.5%
pow246.5%
Applied egg-rr46.5%
Final simplification53.4%
(FPCore (c0 w h D d M)
:precision binary64
(let* ((t_0 (/ (* c0 d) D)) (t_1 (/ c0 (* 2.0 w))))
(if (<= c0 -3.5e+182)
(/ (/ (* t_0 t_0) (* w w)) h)
(if (<= c0 -8e+82)
0.0
(if (<= c0 -6.3e-75)
(* (* (* 2.0 t_1) (/ (/ c0 w) h)) (/ (* d (/ d D)) D))
(if (<= c0 6e-97)
0.0
(if (<= c0 1.25e+246)
(* t_1 (/ (* c0 2.0) (* (/ D d) (/ (* h D) (/ d w)))))
(if (<= c0 2.15e+266)
0.0
(* t_1 (* 2.0 (* (/ (/ c0 h) w) (* (/ d D) (/ d D)))))))))))))
double code(double c0, double w, double h, double D, double d, double M) {
double t_0 = (c0 * d) / D;
double t_1 = c0 / (2.0 * w);
double tmp;
if (c0 <= -3.5e+182) {
tmp = ((t_0 * t_0) / (w * w)) / h;
} else if (c0 <= -8e+82) {
tmp = 0.0;
} else if (c0 <= -6.3e-75) {
tmp = ((2.0 * t_1) * ((c0 / w) / h)) * ((d * (d / D)) / D);
} else if (c0 <= 6e-97) {
tmp = 0.0;
} else if (c0 <= 1.25e+246) {
tmp = t_1 * ((c0 * 2.0) / ((D / d) * ((h * D) / (d / w))));
} else if (c0 <= 2.15e+266) {
tmp = 0.0;
} else {
tmp = t_1 * (2.0 * (((c0 / h) / w) * ((d / D) * (d / D))));
}
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 * d_1) / d
t_1 = c0 / (2.0d0 * w)
if (c0 <= (-3.5d+182)) then
tmp = ((t_0 * t_0) / (w * w)) / h
else if (c0 <= (-8d+82)) then
tmp = 0.0d0
else if (c0 <= (-6.3d-75)) then
tmp = ((2.0d0 * t_1) * ((c0 / w) / h)) * ((d_1 * (d_1 / d)) / d)
else if (c0 <= 6d-97) then
tmp = 0.0d0
else if (c0 <= 1.25d+246) then
tmp = t_1 * ((c0 * 2.0d0) / ((d / d_1) * ((h * d) / (d_1 / w))))
else if (c0 <= 2.15d+266) then
tmp = 0.0d0
else
tmp = t_1 * (2.0d0 * (((c0 / h) / w) * ((d_1 / d) * (d_1 / d))))
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 * d) / D;
double t_1 = c0 / (2.0 * w);
double tmp;
if (c0 <= -3.5e+182) {
tmp = ((t_0 * t_0) / (w * w)) / h;
} else if (c0 <= -8e+82) {
tmp = 0.0;
} else if (c0 <= -6.3e-75) {
tmp = ((2.0 * t_1) * ((c0 / w) / h)) * ((d * (d / D)) / D);
} else if (c0 <= 6e-97) {
tmp = 0.0;
} else if (c0 <= 1.25e+246) {
tmp = t_1 * ((c0 * 2.0) / ((D / d) * ((h * D) / (d / w))));
} else if (c0 <= 2.15e+266) {
tmp = 0.0;
} else {
tmp = t_1 * (2.0 * (((c0 / h) / w) * ((d / D) * (d / D))));
}
return tmp;
}
def code(c0, w, h, D, d, M): t_0 = (c0 * d) / D t_1 = c0 / (2.0 * w) tmp = 0 if c0 <= -3.5e+182: tmp = ((t_0 * t_0) / (w * w)) / h elif c0 <= -8e+82: tmp = 0.0 elif c0 <= -6.3e-75: tmp = ((2.0 * t_1) * ((c0 / w) / h)) * ((d * (d / D)) / D) elif c0 <= 6e-97: tmp = 0.0 elif c0 <= 1.25e+246: tmp = t_1 * ((c0 * 2.0) / ((D / d) * ((h * D) / (d / w)))) elif c0 <= 2.15e+266: tmp = 0.0 else: tmp = t_1 * (2.0 * (((c0 / h) / w) * ((d / D) * (d / D)))) return tmp
function code(c0, w, h, D, d, M) t_0 = Float64(Float64(c0 * d) / D) t_1 = Float64(c0 / Float64(2.0 * w)) tmp = 0.0 if (c0 <= -3.5e+182) tmp = Float64(Float64(Float64(t_0 * t_0) / Float64(w * w)) / h); elseif (c0 <= -8e+82) tmp = 0.0; elseif (c0 <= -6.3e-75) tmp = Float64(Float64(Float64(2.0 * t_1) * Float64(Float64(c0 / w) / h)) * Float64(Float64(d * Float64(d / D)) / D)); elseif (c0 <= 6e-97) tmp = 0.0; elseif (c0 <= 1.25e+246) tmp = Float64(t_1 * Float64(Float64(c0 * 2.0) / Float64(Float64(D / d) * Float64(Float64(h * D) / Float64(d / w))))); elseif (c0 <= 2.15e+266) tmp = 0.0; else tmp = Float64(t_1 * Float64(2.0 * Float64(Float64(Float64(c0 / h) / w) * Float64(Float64(d / D) * Float64(d / D))))); end return tmp end
function tmp_2 = code(c0, w, h, D, d, M) t_0 = (c0 * d) / D; t_1 = c0 / (2.0 * w); tmp = 0.0; if (c0 <= -3.5e+182) tmp = ((t_0 * t_0) / (w * w)) / h; elseif (c0 <= -8e+82) tmp = 0.0; elseif (c0 <= -6.3e-75) tmp = ((2.0 * t_1) * ((c0 / w) / h)) * ((d * (d / D)) / D); elseif (c0 <= 6e-97) tmp = 0.0; elseif (c0 <= 1.25e+246) tmp = t_1 * ((c0 * 2.0) / ((D / d) * ((h * D) / (d / w)))); elseif (c0 <= 2.15e+266) tmp = 0.0; else tmp = t_1 * (2.0 * (((c0 / h) / w) * ((d / D) * (d / D)))); end tmp_2 = tmp; end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(N[(c0 * d), $MachinePrecision] / D), $MachinePrecision]}, Block[{t$95$1 = N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c0, -3.5e+182], N[(N[(N[(t$95$0 * t$95$0), $MachinePrecision] / N[(w * w), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision], If[LessEqual[c0, -8e+82], 0.0, If[LessEqual[c0, -6.3e-75], N[(N[(N[(2.0 * t$95$1), $MachinePrecision] * N[(N[(c0 / w), $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision] * N[(N[(d * N[(d / D), $MachinePrecision]), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision], If[LessEqual[c0, 6e-97], 0.0, If[LessEqual[c0, 1.25e+246], N[(t$95$1 * N[(N[(c0 * 2.0), $MachinePrecision] / N[(N[(D / d), $MachinePrecision] * N[(N[(h * D), $MachinePrecision] / N[(d / w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c0, 2.15e+266], 0.0, N[(t$95$1 * N[(2.0 * N[(N[(N[(c0 / h), $MachinePrecision] / w), $MachinePrecision] * N[(N[(d / D), $MachinePrecision] * N[(d / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{c0 \cdot d}{D}\\
t_1 := \frac{c0}{2 \cdot w}\\
\mathbf{if}\;c0 \leq -3.5 \cdot 10^{+182}:\\
\;\;\;\;\frac{\frac{t_0 \cdot t_0}{w \cdot w}}{h}\\
\mathbf{elif}\;c0 \leq -8 \cdot 10^{+82}:\\
\;\;\;\;0\\
\mathbf{elif}\;c0 \leq -6.3 \cdot 10^{-75}:\\
\;\;\;\;\left(\left(2 \cdot t_1\right) \cdot \frac{\frac{c0}{w}}{h}\right) \cdot \frac{d \cdot \frac{d}{D}}{D}\\
\mathbf{elif}\;c0 \leq 6 \cdot 10^{-97}:\\
\;\;\;\;0\\
\mathbf{elif}\;c0 \leq 1.25 \cdot 10^{+246}:\\
\;\;\;\;t_1 \cdot \frac{c0 \cdot 2}{\frac{D}{d} \cdot \frac{h \cdot D}{\frac{d}{w}}}\\
\mathbf{elif}\;c0 \leq 2.15 \cdot 10^{+266}:\\
\;\;\;\;0\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \left(2 \cdot \left(\frac{\frac{c0}{h}}{w} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)\right)\right)\\
\end{array}
\end{array}
if c0 < -3.50000000000000023e182Initial program 24.5%
Simplified24.3%
Taylor expanded in c0 around inf 35.9%
unpow235.9%
*-commutative35.9%
associate-/l/35.8%
unpow235.8%
unpow235.8%
associate-*l/35.8%
times-frac46.5%
associate-*l/46.6%
associate-*r/42.7%
unpow242.7%
associate-*l/46.4%
*-commutative46.4%
associate-/r*49.5%
associate-*r/53.1%
unpow253.1%
Simplified53.1%
Taylor expanded in c0 around 0 49.9%
Taylor expanded in c0 around 0 35.3%
times-frac35.3%
unpow235.3%
unpow235.3%
unpow235.3%
associate-/r*42.8%
unpow242.8%
associate-*r/46.1%
associate-*l/49.1%
unpow249.1%
associate-*r/49.1%
unpow249.1%
*-commutative49.1%
associate-/r*49.0%
Simplified59.8%
if -3.50000000000000023e182 < c0 < -7.9999999999999997e82 or -6.29999999999999983e-75 < c0 < 6.00000000000000048e-97 or 1.24999999999999994e246 < c0 < 2.1500000000000001e266Initial program 19.7%
Simplified20.6%
Taylor expanded in c0 around -inf 6.1%
mul-1-neg6.1%
distribute-rgt-in6.0%
Simplified49.7%
Taylor expanded in c0 around 0 53.6%
if -7.9999999999999997e82 < c0 < -6.29999999999999983e-75Initial program 39.1%
Simplified39.1%
Taylor expanded in c0 around inf 43.1%
unpow243.1%
*-commutative43.1%
associate-/l/43.1%
unpow243.1%
unpow243.1%
associate-*l/43.1%
times-frac49.4%
associate-*l/49.5%
associate-*r/46.3%
unpow246.3%
associate-*l/52.7%
*-commutative52.7%
associate-/r*51.4%
associate-*r/51.4%
unpow251.4%
Simplified51.4%
Taylor expanded in c0 around 0 52.7%
associate-*l/52.8%
*-commutative52.8%
Applied egg-rr52.8%
associate-*l/52.7%
associate-*l*52.7%
associate-*r*55.7%
*-commutative55.7%
*-commutative55.7%
*-commutative55.7%
associate-/r*58.8%
Simplified58.8%
pow258.8%
associate-*r/58.9%
Applied egg-rr58.9%
if 6.00000000000000048e-97 < c0 < 1.24999999999999994e246Initial program 29.6%
Simplified39.6%
associate-*r/39.6%
associate-/r*41.0%
Applied egg-rr41.0%
frac-times39.8%
associate-/l*41.0%
Applied egg-rr41.0%
Taylor expanded in c0 around inf 33.7%
*-commutative33.7%
associate-/l*37.3%
associate-*l/37.3%
unpow237.3%
associate-*l*42.5%
unpow242.5%
Simplified42.5%
*-un-lft-identity42.5%
times-frac51.2%
associate-*r*56.6%
*-commutative56.6%
Applied egg-rr56.6%
*-lft-identity56.6%
associate-/l*57.0%
*-commutative57.0%
Simplified57.0%
if 2.1500000000000001e266 < c0 Initial program 44.4%
Simplified44.3%
Taylor expanded in c0 around inf 44.4%
unpow244.4%
*-commutative44.4%
associate-/l/44.4%
unpow244.4%
unpow244.4%
associate-*l/44.4%
times-frac66.8%
associate-*l/66.8%
associate-*r/66.8%
unpow266.8%
associate-*l/66.8%
*-commutative66.8%
associate-/r*78.1%
associate-*r/78.1%
unpow278.1%
Simplified78.1%
pow267.0%
Applied egg-rr78.1%
Final simplification56.9%
(FPCore (c0 w h D d M)
:precision binary64
(let* ((t_0 (/ (* c0 d) D)) (t_1 (/ (/ (* t_0 t_0) (* w w)) h)))
(if (<= M 4.1e-184)
0.0
(if (<= M 2.35e-110)
t_1
(if (<= M 1.9e-71)
0.0
(if (<= M 2.2e-54)
(* (* (/ c0 D) (/ c0 D)) (* (/ d h) (/ d (* w w))))
(if (<= M 5.8e-13)
0.0
(if (or (<= M 3.7e+36) (not (<= M 3.8e+66))) t_1 0.0))))))))
double code(double c0, double w, double h, double D, double d, double M) {
double t_0 = (c0 * d) / D;
double t_1 = ((t_0 * t_0) / (w * w)) / h;
double tmp;
if (M <= 4.1e-184) {
tmp = 0.0;
} else if (M <= 2.35e-110) {
tmp = t_1;
} else if (M <= 1.9e-71) {
tmp = 0.0;
} else if (M <= 2.2e-54) {
tmp = ((c0 / D) * (c0 / D)) * ((d / h) * (d / (w * w)));
} else if (M <= 5.8e-13) {
tmp = 0.0;
} else if ((M <= 3.7e+36) || !(M <= 3.8e+66)) {
tmp = t_1;
} 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 * d_1) / d
t_1 = ((t_0 * t_0) / (w * w)) / h
if (m <= 4.1d-184) then
tmp = 0.0d0
else if (m <= 2.35d-110) then
tmp = t_1
else if (m <= 1.9d-71) then
tmp = 0.0d0
else if (m <= 2.2d-54) then
tmp = ((c0 / d) * (c0 / d)) * ((d_1 / h) * (d_1 / (w * w)))
else if (m <= 5.8d-13) then
tmp = 0.0d0
else if ((m <= 3.7d+36) .or. (.not. (m <= 3.8d+66))) then
tmp = t_1
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 * d) / D;
double t_1 = ((t_0 * t_0) / (w * w)) / h;
double tmp;
if (M <= 4.1e-184) {
tmp = 0.0;
} else if (M <= 2.35e-110) {
tmp = t_1;
} else if (M <= 1.9e-71) {
tmp = 0.0;
} else if (M <= 2.2e-54) {
tmp = ((c0 / D) * (c0 / D)) * ((d / h) * (d / (w * w)));
} else if (M <= 5.8e-13) {
tmp = 0.0;
} else if ((M <= 3.7e+36) || !(M <= 3.8e+66)) {
tmp = t_1;
} else {
tmp = 0.0;
}
return tmp;
}
def code(c0, w, h, D, d, M): t_0 = (c0 * d) / D t_1 = ((t_0 * t_0) / (w * w)) / h tmp = 0 if M <= 4.1e-184: tmp = 0.0 elif M <= 2.35e-110: tmp = t_1 elif M <= 1.9e-71: tmp = 0.0 elif M <= 2.2e-54: tmp = ((c0 / D) * (c0 / D)) * ((d / h) * (d / (w * w))) elif M <= 5.8e-13: tmp = 0.0 elif (M <= 3.7e+36) or not (M <= 3.8e+66): tmp = t_1 else: tmp = 0.0 return tmp
function code(c0, w, h, D, d, M) t_0 = Float64(Float64(c0 * d) / D) t_1 = Float64(Float64(Float64(t_0 * t_0) / Float64(w * w)) / h) tmp = 0.0 if (M <= 4.1e-184) tmp = 0.0; elseif (M <= 2.35e-110) tmp = t_1; elseif (M <= 1.9e-71) tmp = 0.0; elseif (M <= 2.2e-54) tmp = Float64(Float64(Float64(c0 / D) * Float64(c0 / D)) * Float64(Float64(d / h) * Float64(d / Float64(w * w)))); elseif (M <= 5.8e-13) tmp = 0.0; elseif ((M <= 3.7e+36) || !(M <= 3.8e+66)) 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; t_1 = ((t_0 * t_0) / (w * w)) / h; tmp = 0.0; if (M <= 4.1e-184) tmp = 0.0; elseif (M <= 2.35e-110) tmp = t_1; elseif (M <= 1.9e-71) tmp = 0.0; elseif (M <= 2.2e-54) tmp = ((c0 / D) * (c0 / D)) * ((d / h) * (d / (w * w))); elseif (M <= 5.8e-13) tmp = 0.0; elseif ((M <= 3.7e+36) || ~((M <= 3.8e+66))) 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 * d), $MachinePrecision] / D), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(t$95$0 * t$95$0), $MachinePrecision] / N[(w * w), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision]}, If[LessEqual[M, 4.1e-184], 0.0, If[LessEqual[M, 2.35e-110], t$95$1, If[LessEqual[M, 1.9e-71], 0.0, If[LessEqual[M, 2.2e-54], N[(N[(N[(c0 / D), $MachinePrecision] * N[(c0 / D), $MachinePrecision]), $MachinePrecision] * N[(N[(d / h), $MachinePrecision] * N[(d / N[(w * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[M, 5.8e-13], 0.0, If[Or[LessEqual[M, 3.7e+36], N[Not[LessEqual[M, 3.8e+66]], $MachinePrecision]], t$95$1, 0.0]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{c0 \cdot d}{D}\\
t_1 := \frac{\frac{t_0 \cdot t_0}{w \cdot w}}{h}\\
\mathbf{if}\;M \leq 4.1 \cdot 10^{-184}:\\
\;\;\;\;0\\
\mathbf{elif}\;M \leq 2.35 \cdot 10^{-110}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;M \leq 1.9 \cdot 10^{-71}:\\
\;\;\;\;0\\
\mathbf{elif}\;M \leq 2.2 \cdot 10^{-54}:\\
\;\;\;\;\left(\frac{c0}{D} \cdot \frac{c0}{D}\right) \cdot \left(\frac{d}{h} \cdot \frac{d}{w \cdot w}\right)\\
\mathbf{elif}\;M \leq 5.8 \cdot 10^{-13}:\\
\;\;\;\;0\\
\mathbf{elif}\;M \leq 3.7 \cdot 10^{+36} \lor \neg \left(M \leq 3.8 \cdot 10^{+66}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if M < 4.1e-184 or 2.34999999999999996e-110 < M < 1.89999999999999996e-71 or 2.2e-54 < M < 5.7999999999999995e-13 or 3.70000000000000029e36 < M < 3.8000000000000002e66Initial program 26.0%
Simplified26.9%
Taylor expanded in c0 around -inf 6.9%
mul-1-neg6.9%
distribute-rgt-in4.9%
Simplified37.1%
Taylor expanded in c0 around 0 40.8%
if 4.1e-184 < M < 2.34999999999999996e-110 or 5.7999999999999995e-13 < M < 3.70000000000000029e36 or 3.8000000000000002e66 < M Initial program 27.0%
Simplified30.7%
Taylor expanded in c0 around inf 29.6%
unpow229.6%
*-commutative29.6%
associate-/l/27.9%
unpow227.9%
unpow227.9%
associate-*l/31.7%
times-frac40.8%
associate-*l/41.0%
associate-*r/33.8%
unpow233.8%
associate-*l/37.2%
*-commutative37.2%
associate-/r*39.3%
associate-*r/39.4%
unpow239.4%
Simplified39.4%
Taylor expanded in c0 around 0 37.3%
Taylor expanded in c0 around 0 18.2%
times-frac23.3%
unpow223.3%
unpow223.3%
unpow223.3%
associate-/r*25.2%
unpow225.2%
associate-*r/27.2%
associate-*l/27.2%
unpow227.2%
associate-*r/25.6%
unpow225.6%
*-commutative25.6%
associate-/r*29.4%
Simplified37.3%
if 1.89999999999999996e-71 < M < 2.2e-54Initial program 66.1%
Simplified66.1%
Taylor expanded in c0 around inf 67.4%
unpow267.4%
*-commutative67.4%
associate-/l/67.4%
unpow267.4%
unpow267.4%
associate-*l/67.4%
times-frac67.1%
associate-*l/67.4%
associate-*r/67.4%
unpow267.4%
associate-*l/67.4%
*-commutative67.4%
associate-/r*67.4%
associate-*r/67.4%
unpow267.4%
Simplified67.4%
Taylor expanded in c0 around 0 67.4%
times-frac67.9%
unpow267.9%
unpow267.9%
unpow267.9%
unpow267.9%
Simplified67.9%
times-frac67.4%
Applied egg-rr67.4%
Taylor expanded in d around 0 67.4%
unpow267.4%
times-frac67.9%
unpow267.9%
Simplified67.9%
Final simplification40.4%
(FPCore (c0 w h D d M)
:precision binary64
(if (<= w -2.9e+149)
0.0
(if (or (<= w -1.25e-134) (and (not (<= w -6.2e-180)) (<= w 1.2e+51)))
(* (* (/ c0 D) (/ c0 D)) (* (/ d h) (/ d (* w w))))
0.0)))
double code(double c0, double w, double h, double D, double d, double M) {
double tmp;
if (w <= -2.9e+149) {
tmp = 0.0;
} else if ((w <= -1.25e-134) || (!(w <= -6.2e-180) && (w <= 1.2e+51))) {
tmp = ((c0 / D) * (c0 / D)) * ((d / h) * (d / (w * w)));
} 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 (w <= (-2.9d+149)) then
tmp = 0.0d0
else if ((w <= (-1.25d-134)) .or. (.not. (w <= (-6.2d-180))) .and. (w <= 1.2d+51)) then
tmp = ((c0 / d) * (c0 / d)) * ((d_1 / h) * (d_1 / (w * w)))
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 (w <= -2.9e+149) {
tmp = 0.0;
} else if ((w <= -1.25e-134) || (!(w <= -6.2e-180) && (w <= 1.2e+51))) {
tmp = ((c0 / D) * (c0 / D)) * ((d / h) * (d / (w * w)));
} else {
tmp = 0.0;
}
return tmp;
}
def code(c0, w, h, D, d, M): tmp = 0 if w <= -2.9e+149: tmp = 0.0 elif (w <= -1.25e-134) or (not (w <= -6.2e-180) and (w <= 1.2e+51)): tmp = ((c0 / D) * (c0 / D)) * ((d / h) * (d / (w * w))) else: tmp = 0.0 return tmp
function code(c0, w, h, D, d, M) tmp = 0.0 if (w <= -2.9e+149) tmp = 0.0; elseif ((w <= -1.25e-134) || (!(w <= -6.2e-180) && (w <= 1.2e+51))) tmp = Float64(Float64(Float64(c0 / D) * Float64(c0 / D)) * Float64(Float64(d / h) * Float64(d / Float64(w * w)))); else tmp = 0.0; end return tmp end
function tmp_2 = code(c0, w, h, D, d, M) tmp = 0.0; if (w <= -2.9e+149) tmp = 0.0; elseif ((w <= -1.25e-134) || (~((w <= -6.2e-180)) && (w <= 1.2e+51))) tmp = ((c0 / D) * (c0 / D)) * ((d / h) * (d / (w * w))); else tmp = 0.0; end tmp_2 = tmp; end
code[c0_, w_, h_, D_, d_, M_] := If[LessEqual[w, -2.9e+149], 0.0, If[Or[LessEqual[w, -1.25e-134], And[N[Not[LessEqual[w, -6.2e-180]], $MachinePrecision], LessEqual[w, 1.2e+51]]], N[(N[(N[(c0 / D), $MachinePrecision] * N[(c0 / D), $MachinePrecision]), $MachinePrecision] * N[(N[(d / h), $MachinePrecision] * N[(d / N[(w * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;w \leq -2.9 \cdot 10^{+149}:\\
\;\;\;\;0\\
\mathbf{elif}\;w \leq -1.25 \cdot 10^{-134} \lor \neg \left(w \leq -6.2 \cdot 10^{-180}\right) \land w \leq 1.2 \cdot 10^{+51}:\\
\;\;\;\;\left(\frac{c0}{D} \cdot \frac{c0}{D}\right) \cdot \left(\frac{d}{h} \cdot \frac{d}{w \cdot w}\right)\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if w < -2.9000000000000002e149 or -1.2500000000000001e-134 < w < -6.1999999999999998e-180 or 1.1999999999999999e51 < w Initial program 17.0%
Simplified20.4%
Taylor expanded in c0 around -inf 7.7%
mul-1-neg7.7%
distribute-rgt-in7.7%
Simplified47.8%
Taylor expanded in c0 around 0 48.9%
if -2.9000000000000002e149 < w < -1.2500000000000001e-134 or -6.1999999999999998e-180 < w < 1.1999999999999999e51Initial program 31.5%
Simplified32.0%
Taylor expanded in c0 around inf 35.7%
unpow235.7%
*-commutative35.7%
associate-/l/34.6%
unpow234.6%
unpow234.6%
associate-*l/35.1%
times-frac42.0%
associate-*l/42.2%
associate-*r/38.9%
unpow238.9%
associate-*l/43.5%
*-commutative43.5%
associate-/r*44.6%
associate-*r/46.4%
unpow246.4%
Simplified46.4%
Taylor expanded in c0 around 0 28.4%
times-frac30.0%
unpow230.0%
unpow230.0%
unpow230.0%
unpow230.0%
Simplified30.0%
times-frac37.2%
Applied egg-rr37.2%
Taylor expanded in d around 0 37.2%
unpow237.2%
times-frac44.3%
unpow244.3%
Simplified44.3%
Final simplification45.9%
(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 26.7%
Simplified28.2%
Taylor expanded in c0 around -inf 5.5%
mul-1-neg5.5%
distribute-rgt-in3.9%
Simplified32.5%
Taylor expanded in c0 around 0 35.5%
Final simplification35.5%
herbie shell --seed 2023272
(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))))))