
(FPCore (w0 M D h l d) :precision binary64 (* w0 (sqrt (- 1.0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l))))))
double code(double w0, double M, double D, double h, double l, double d) {
return w0 * sqrt((1.0 - (pow(((M * D) / (2.0 * d)), 2.0) * (h / l))));
}
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
code = w0 * sqrt((1.0d0 - ((((m * d) / (2.0d0 * d_1)) ** 2.0d0) * (h / l))))
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
return w0 * Math.sqrt((1.0 - (Math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l))));
}
def code(w0, M, D, h, l, d): return w0 * math.sqrt((1.0 - (math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l))))
function code(w0, M, D, h, l, d) return Float64(w0 * sqrt(Float64(1.0 - Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l))))) end
function tmp = code(w0, M, D, h, l, d) tmp = w0 * sqrt((1.0 - ((((M * D) / (2.0 * d)) ^ 2.0) * (h / l)))); end
code[w0_, M_, D_, h_, l_, d_] := N[(w0 * N[Sqrt[N[(1.0 - N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (w0 M D h l d) :precision binary64 (* w0 (sqrt (- 1.0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l))))))
double code(double w0, double M, double D, double h, double l, double d) {
return w0 * sqrt((1.0 - (pow(((M * D) / (2.0 * d)), 2.0) * (h / l))));
}
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
code = w0 * sqrt((1.0d0 - ((((m * d) / (2.0d0 * d_1)) ** 2.0d0) * (h / l))))
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
return w0 * Math.sqrt((1.0 - (Math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l))));
}
def code(w0, M, D, h, l, d): return w0 * math.sqrt((1.0 - (math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l))))
function code(w0, M, D, h, l, d) return Float64(w0 * sqrt(Float64(1.0 - Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l))))) end
function tmp = code(w0, M, D, h, l, d) tmp = w0 * sqrt((1.0 - ((((M * D) / (2.0 * d)) ^ 2.0) * (h / l)))); end
code[w0_, M_, D_, h_, l_, d_] := N[(w0 * N[Sqrt[N[(1.0 - N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}
\end{array}
(FPCore (w0 M D h l d) :precision binary64 (let* ((t_0 (* (pow (/ (* M D) (* d 2.0)) 2.0) (/ h l)))) (if (<= t_0 5e-8) (* w0 (sqrt (- 1.0 t_0))) w0)))
double code(double w0, double M, double D, double h, double l, double d) {
double t_0 = pow(((M * D) / (d * 2.0)), 2.0) * (h / l);
double tmp;
if (t_0 <= 5e-8) {
tmp = w0 * sqrt((1.0 - t_0));
} else {
tmp = w0;
}
return tmp;
}
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
real(8) :: t_0
real(8) :: tmp
t_0 = (((m * d) / (d_1 * 2.0d0)) ** 2.0d0) * (h / l)
if (t_0 <= 5d-8) then
tmp = w0 * sqrt((1.0d0 - t_0))
else
tmp = w0
end if
code = tmp
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
double t_0 = Math.pow(((M * D) / (d * 2.0)), 2.0) * (h / l);
double tmp;
if (t_0 <= 5e-8) {
tmp = w0 * Math.sqrt((1.0 - t_0));
} else {
tmp = w0;
}
return tmp;
}
def code(w0, M, D, h, l, d): t_0 = math.pow(((M * D) / (d * 2.0)), 2.0) * (h / l) tmp = 0 if t_0 <= 5e-8: tmp = w0 * math.sqrt((1.0 - t_0)) else: tmp = w0 return tmp
function code(w0, M, D, h, l, d) t_0 = Float64((Float64(Float64(M * D) / Float64(d * 2.0)) ^ 2.0) * Float64(h / l)) tmp = 0.0 if (t_0 <= 5e-8) tmp = Float64(w0 * sqrt(Float64(1.0 - t_0))); else tmp = w0; end return tmp end
function tmp_2 = code(w0, M, D, h, l, d) t_0 = (((M * D) / (d * 2.0)) ^ 2.0) * (h / l); tmp = 0.0; if (t_0 <= 5e-8) tmp = w0 * sqrt((1.0 - t_0)); else tmp = w0; end tmp_2 = tmp; end
code[w0_, M_, D_, h_, l_, d_] := Block[{t$95$0 = N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 5e-8], N[(w0 * N[Sqrt[N[(1.0 - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], w0]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot \frac{h}{\ell}\\
\mathbf{if}\;t_0 \leq 5 \cdot 10^{-8}:\\
\;\;\;\;w0 \cdot \sqrt{1 - t_0}\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\end{array}
if (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2) (/.f64 h l)) < 4.9999999999999998e-8Initial program 90.9%
if 4.9999999999999998e-8 < (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2) (/.f64 h l)) Initial program 0.0%
times-frac0.0%
Simplified0.0%
Taylor expanded in M around 0 62.9%
Final simplification89.0%
(FPCore (w0 M D h l d) :precision binary64 (if (<= (/ h l) -5e-295) (* w0 (sqrt (- 1.0 (* (/ h l) (pow (* (/ M 2.0) (/ D d)) 2.0))))) w0))
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((h / l) <= -5e-295) {
tmp = w0 * sqrt((1.0 - ((h / l) * pow(((M / 2.0) * (D / d)), 2.0))));
} else {
tmp = w0;
}
return tmp;
}
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
real(8) :: tmp
if ((h / l) <= (-5d-295)) then
tmp = w0 * sqrt((1.0d0 - ((h / l) * (((m / 2.0d0) * (d / d_1)) ** 2.0d0))))
else
tmp = w0
end if
code = tmp
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((h / l) <= -5e-295) {
tmp = w0 * Math.sqrt((1.0 - ((h / l) * Math.pow(((M / 2.0) * (D / d)), 2.0))));
} else {
tmp = w0;
}
return tmp;
}
def code(w0, M, D, h, l, d): tmp = 0 if (h / l) <= -5e-295: tmp = w0 * math.sqrt((1.0 - ((h / l) * math.pow(((M / 2.0) * (D / d)), 2.0)))) else: tmp = w0 return tmp
function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64(h / l) <= -5e-295) tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(h / l) * (Float64(Float64(M / 2.0) * Float64(D / d)) ^ 2.0))))); else tmp = w0; end return tmp end
function tmp_2 = code(w0, M, D, h, l, d) tmp = 0.0; if ((h / l) <= -5e-295) tmp = w0 * sqrt((1.0 - ((h / l) * (((M / 2.0) * (D / d)) ^ 2.0)))); else tmp = w0; end tmp_2 = tmp; end
code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(h / l), $MachinePrecision], -5e-295], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(h / l), $MachinePrecision] * N[Power[N[(N[(M / 2.0), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], w0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{h}{\ell} \leq -5 \cdot 10^{-295}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{h}{\ell} \cdot {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\end{array}
if (/.f64 h l) < -5.00000000000000008e-295Initial program 82.4%
times-frac82.4%
Simplified82.4%
if -5.00000000000000008e-295 < (/.f64 h l) Initial program 87.8%
times-frac87.8%
Simplified87.8%
Taylor expanded in M around 0 94.1%
Final simplification87.7%
(FPCore (w0 M D h l d) :precision binary64 (* w0 (sqrt (- 1.0 (/ (* (pow (* M (* D (/ 0.5 d))) 2.0) h) l)))))
double code(double w0, double M, double D, double h, double l, double d) {
return w0 * sqrt((1.0 - ((pow((M * (D * (0.5 / d))), 2.0) * h) / l)));
}
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
code = w0 * sqrt((1.0d0 - ((((m * (d * (0.5d0 / d_1))) ** 2.0d0) * h) / l)))
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
return w0 * Math.sqrt((1.0 - ((Math.pow((M * (D * (0.5 / d))), 2.0) * h) / l)));
}
def code(w0, M, D, h, l, d): return w0 * math.sqrt((1.0 - ((math.pow((M * (D * (0.5 / d))), 2.0) * h) / l)))
function code(w0, M, D, h, l, d) return Float64(w0 * sqrt(Float64(1.0 - Float64(Float64((Float64(M * Float64(D * Float64(0.5 / d))) ^ 2.0) * h) / l)))) end
function tmp = code(w0, M, D, h, l, d) tmp = w0 * sqrt((1.0 - ((((M * (D * (0.5 / d))) ^ 2.0) * h) / l))); end
code[w0_, M_, D_, h_, l_, d_] := N[(w0 * N[Sqrt[N[(1.0 - N[(N[(N[Power[N[(M * N[(D * N[(0.5 / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * h), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
w0 \cdot \sqrt{1 - \frac{{\left(M \cdot \left(D \cdot \frac{0.5}{d}\right)\right)}^{2} \cdot h}{\ell}}
\end{array}
Initial program 84.8%
times-frac84.8%
Simplified84.8%
unpow284.8%
unpow284.8%
frac-times84.8%
associate-*r/87.3%
frac-times87.3%
unpow287.3%
unpow287.3%
frac-times87.3%
div-inv87.3%
associate-*l*87.3%
associate-/r*87.3%
metadata-eval87.3%
Applied egg-rr87.3%
Final simplification87.3%
(FPCore (w0 M D h l d)
:precision binary64
(let* ((t_0
(*
w0
(sqrt
(- 1.0 (* 0.25 (* (* (/ D d) (/ D d)) (/ (* M (* M h)) l))))))))
(if (<= (/ h l) -1e+138)
t_0
(if (<= (/ h l) -5e-8)
(* w0 (+ 1.0 (* (/ (* D h) (* (/ l D) (pow (/ d M) 2.0))) -0.125)))
(if (<= (/ h l) -2e-182) t_0 w0)))))
double code(double w0, double M, double D, double h, double l, double d) {
double t_0 = w0 * sqrt((1.0 - (0.25 * (((D / d) * (D / d)) * ((M * (M * h)) / l)))));
double tmp;
if ((h / l) <= -1e+138) {
tmp = t_0;
} else if ((h / l) <= -5e-8) {
tmp = w0 * (1.0 + (((D * h) / ((l / D) * pow((d / M), 2.0))) * -0.125));
} else if ((h / l) <= -2e-182) {
tmp = t_0;
} else {
tmp = w0;
}
return tmp;
}
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
real(8) :: t_0
real(8) :: tmp
t_0 = w0 * sqrt((1.0d0 - (0.25d0 * (((d / d_1) * (d / d_1)) * ((m * (m * h)) / l)))))
if ((h / l) <= (-1d+138)) then
tmp = t_0
else if ((h / l) <= (-5d-8)) then
tmp = w0 * (1.0d0 + (((d * h) / ((l / d) * ((d_1 / m) ** 2.0d0))) * (-0.125d0)))
else if ((h / l) <= (-2d-182)) then
tmp = t_0
else
tmp = w0
end if
code = tmp
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
double t_0 = w0 * Math.sqrt((1.0 - (0.25 * (((D / d) * (D / d)) * ((M * (M * h)) / l)))));
double tmp;
if ((h / l) <= -1e+138) {
tmp = t_0;
} else if ((h / l) <= -5e-8) {
tmp = w0 * (1.0 + (((D * h) / ((l / D) * Math.pow((d / M), 2.0))) * -0.125));
} else if ((h / l) <= -2e-182) {
tmp = t_0;
} else {
tmp = w0;
}
return tmp;
}
def code(w0, M, D, h, l, d): t_0 = w0 * math.sqrt((1.0 - (0.25 * (((D / d) * (D / d)) * ((M * (M * h)) / l))))) tmp = 0 if (h / l) <= -1e+138: tmp = t_0 elif (h / l) <= -5e-8: tmp = w0 * (1.0 + (((D * h) / ((l / D) * math.pow((d / M), 2.0))) * -0.125)) elif (h / l) <= -2e-182: tmp = t_0 else: tmp = w0 return tmp
function code(w0, M, D, h, l, d) t_0 = Float64(w0 * sqrt(Float64(1.0 - Float64(0.25 * Float64(Float64(Float64(D / d) * Float64(D / d)) * Float64(Float64(M * Float64(M * h)) / l)))))) tmp = 0.0 if (Float64(h / l) <= -1e+138) tmp = t_0; elseif (Float64(h / l) <= -5e-8) tmp = Float64(w0 * Float64(1.0 + Float64(Float64(Float64(D * h) / Float64(Float64(l / D) * (Float64(d / M) ^ 2.0))) * -0.125))); elseif (Float64(h / l) <= -2e-182) tmp = t_0; else tmp = w0; end return tmp end
function tmp_2 = code(w0, M, D, h, l, d) t_0 = w0 * sqrt((1.0 - (0.25 * (((D / d) * (D / d)) * ((M * (M * h)) / l))))); tmp = 0.0; if ((h / l) <= -1e+138) tmp = t_0; elseif ((h / l) <= -5e-8) tmp = w0 * (1.0 + (((D * h) / ((l / D) * ((d / M) ^ 2.0))) * -0.125)); elseif ((h / l) <= -2e-182) tmp = t_0; else tmp = w0; end tmp_2 = tmp; end
code[w0_, M_, D_, h_, l_, d_] := Block[{t$95$0 = N[(w0 * N[Sqrt[N[(1.0 - N[(0.25 * N[(N[(N[(D / d), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision] * N[(N[(M * N[(M * h), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(h / l), $MachinePrecision], -1e+138], t$95$0, If[LessEqual[N[(h / l), $MachinePrecision], -5e-8], N[(w0 * N[(1.0 + N[(N[(N[(D * h), $MachinePrecision] / N[(N[(l / D), $MachinePrecision] * N[Power[N[(d / M), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(h / l), $MachinePrecision], -2e-182], t$95$0, w0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := w0 \cdot \sqrt{1 - 0.25 \cdot \left(\left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \frac{M \cdot \left(M \cdot h\right)}{\ell}\right)}\\
\mathbf{if}\;\frac{h}{\ell} \leq -1 \cdot 10^{+138}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;\frac{h}{\ell} \leq -5 \cdot 10^{-8}:\\
\;\;\;\;w0 \cdot \left(1 + \frac{D \cdot h}{\frac{\ell}{D} \cdot {\left(\frac{d}{M}\right)}^{2}} \cdot -0.125\right)\\
\mathbf{elif}\;\frac{h}{\ell} \leq -2 \cdot 10^{-182}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\end{array}
if (/.f64 h l) < -1e138 or -4.9999999999999998e-8 < (/.f64 h l) < -2.0000000000000001e-182Initial program 83.6%
times-frac83.6%
Simplified83.6%
Taylor expanded in M around 0 54.1%
*-commutative54.1%
times-frac51.1%
*-commutative51.1%
unpow251.1%
unpow251.1%
times-frac69.8%
unpow269.8%
*-commutative69.8%
unpow269.8%
associate-*l*73.8%
Simplified73.8%
unpow265.9%
Applied egg-rr73.8%
if -1e138 < (/.f64 h l) < -4.9999999999999998e-8Initial program 84.7%
times-frac81.5%
Simplified81.5%
Taylor expanded in M around 0 46.0%
associate-*r/46.0%
*-commutative46.0%
associate-*r/46.0%
*-commutative46.0%
times-frac45.9%
unpow245.9%
*-commutative45.9%
unpow245.9%
unpow245.9%
Simplified45.9%
Taylor expanded in D around 0 46.0%
*-commutative46.0%
times-frac45.9%
unpow245.9%
associate-/l*49.1%
unpow249.1%
*-commutative49.1%
associate-/l*52.3%
unpow252.3%
Simplified52.3%
Taylor expanded in d around 0 52.3%
unpow252.3%
unpow252.3%
times-frac61.8%
Simplified61.8%
frac-times61.9%
pow261.9%
Applied egg-rr61.9%
if -2.0000000000000001e-182 < (/.f64 h l) Initial program 85.8%
times-frac86.5%
Simplified86.5%
Taylor expanded in M around 0 90.5%
Final simplification81.0%
(FPCore (w0 M D h l d)
:precision binary64
(let* ((t_0
(*
w0
(sqrt
(- 1.0 (* 0.25 (* (* (/ D d) (/ D d)) (/ (* M (* M h)) l))))))))
(if (<= (/ h l) -1e+138)
t_0
(if (<= (/ h l) -5e-24)
(*
w0
(sqrt (- 1.0 (* 0.25 (* (/ (* D D) l) (/ h (* (/ d M) (/ d M))))))))
(if (<= (/ h l) -2e-182) t_0 w0)))))
double code(double w0, double M, double D, double h, double l, double d) {
double t_0 = w0 * sqrt((1.0 - (0.25 * (((D / d) * (D / d)) * ((M * (M * h)) / l)))));
double tmp;
if ((h / l) <= -1e+138) {
tmp = t_0;
} else if ((h / l) <= -5e-24) {
tmp = w0 * sqrt((1.0 - (0.25 * (((D * D) / l) * (h / ((d / M) * (d / M)))))));
} else if ((h / l) <= -2e-182) {
tmp = t_0;
} else {
tmp = w0;
}
return tmp;
}
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
real(8) :: t_0
real(8) :: tmp
t_0 = w0 * sqrt((1.0d0 - (0.25d0 * (((d / d_1) * (d / d_1)) * ((m * (m * h)) / l)))))
if ((h / l) <= (-1d+138)) then
tmp = t_0
else if ((h / l) <= (-5d-24)) then
tmp = w0 * sqrt((1.0d0 - (0.25d0 * (((d * d) / l) * (h / ((d_1 / m) * (d_1 / m)))))))
else if ((h / l) <= (-2d-182)) then
tmp = t_0
else
tmp = w0
end if
code = tmp
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
double t_0 = w0 * Math.sqrt((1.0 - (0.25 * (((D / d) * (D / d)) * ((M * (M * h)) / l)))));
double tmp;
if ((h / l) <= -1e+138) {
tmp = t_0;
} else if ((h / l) <= -5e-24) {
tmp = w0 * Math.sqrt((1.0 - (0.25 * (((D * D) / l) * (h / ((d / M) * (d / M)))))));
} else if ((h / l) <= -2e-182) {
tmp = t_0;
} else {
tmp = w0;
}
return tmp;
}
def code(w0, M, D, h, l, d): t_0 = w0 * math.sqrt((1.0 - (0.25 * (((D / d) * (D / d)) * ((M * (M * h)) / l))))) tmp = 0 if (h / l) <= -1e+138: tmp = t_0 elif (h / l) <= -5e-24: tmp = w0 * math.sqrt((1.0 - (0.25 * (((D * D) / l) * (h / ((d / M) * (d / M))))))) elif (h / l) <= -2e-182: tmp = t_0 else: tmp = w0 return tmp
function code(w0, M, D, h, l, d) t_0 = Float64(w0 * sqrt(Float64(1.0 - Float64(0.25 * Float64(Float64(Float64(D / d) * Float64(D / d)) * Float64(Float64(M * Float64(M * h)) / l)))))) tmp = 0.0 if (Float64(h / l) <= -1e+138) tmp = t_0; elseif (Float64(h / l) <= -5e-24) tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(0.25 * Float64(Float64(Float64(D * D) / l) * Float64(h / Float64(Float64(d / M) * Float64(d / M)))))))); elseif (Float64(h / l) <= -2e-182) tmp = t_0; else tmp = w0; end return tmp end
function tmp_2 = code(w0, M, D, h, l, d) t_0 = w0 * sqrt((1.0 - (0.25 * (((D / d) * (D / d)) * ((M * (M * h)) / l))))); tmp = 0.0; if ((h / l) <= -1e+138) tmp = t_0; elseif ((h / l) <= -5e-24) tmp = w0 * sqrt((1.0 - (0.25 * (((D * D) / l) * (h / ((d / M) * (d / M))))))); elseif ((h / l) <= -2e-182) tmp = t_0; else tmp = w0; end tmp_2 = tmp; end
code[w0_, M_, D_, h_, l_, d_] := Block[{t$95$0 = N[(w0 * N[Sqrt[N[(1.0 - N[(0.25 * N[(N[(N[(D / d), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision] * N[(N[(M * N[(M * h), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(h / l), $MachinePrecision], -1e+138], t$95$0, If[LessEqual[N[(h / l), $MachinePrecision], -5e-24], N[(w0 * N[Sqrt[N[(1.0 - N[(0.25 * N[(N[(N[(D * D), $MachinePrecision] / l), $MachinePrecision] * N[(h / N[(N[(d / M), $MachinePrecision] * N[(d / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(h / l), $MachinePrecision], -2e-182], t$95$0, w0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := w0 \cdot \sqrt{1 - 0.25 \cdot \left(\left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \frac{M \cdot \left(M \cdot h\right)}{\ell}\right)}\\
\mathbf{if}\;\frac{h}{\ell} \leq -1 \cdot 10^{+138}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;\frac{h}{\ell} \leq -5 \cdot 10^{-24}:\\
\;\;\;\;w0 \cdot \sqrt{1 - 0.25 \cdot \left(\frac{D \cdot D}{\ell} \cdot \frac{h}{\frac{d}{M} \cdot \frac{d}{M}}\right)}\\
\mathbf{elif}\;\frac{h}{\ell} \leq -2 \cdot 10^{-182}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\end{array}
if (/.f64 h l) < -1e138 or -4.9999999999999998e-24 < (/.f64 h l) < -2.0000000000000001e-182Initial program 82.7%
times-frac82.7%
Simplified82.7%
Taylor expanded in M around 0 51.6%
*-commutative51.6%
times-frac49.4%
*-commutative49.4%
unpow249.4%
unpow249.4%
times-frac69.1%
unpow269.1%
*-commutative69.1%
unpow269.1%
associate-*l*73.4%
Simplified73.4%
unpow265.0%
Applied egg-rr73.4%
if -1e138 < (/.f64 h l) < -4.9999999999999998e-24Initial program 86.7%
times-frac84.1%
Simplified84.1%
Taylor expanded in M around 0 53.4%
associate-*r/53.4%
*-commutative53.4%
associate-*r/53.4%
times-frac53.4%
unpow253.4%
*-commutative53.4%
unpow253.4%
unpow253.4%
Simplified53.4%
Taylor expanded in M around 0 53.4%
unpow253.4%
*-commutative53.4%
associate-/l*56.2%
unpow256.2%
times-frac70.4%
Simplified70.4%
if -2.0000000000000001e-182 < (/.f64 h l) Initial program 85.8%
times-frac86.5%
Simplified86.5%
Taylor expanded in M around 0 90.5%
Final simplification81.8%
(FPCore (w0 M D h l d)
:precision binary64
(let* ((t_0 (pow (/ D d) 2.0)))
(if (<= (/ h l) -1e+138)
(* w0 (+ 1.0 (* -0.125 (* t_0 (* M (/ (* M h) l))))))
(if (<= (/ h l) -1e-151)
(* w0 (+ 1.0 (* -0.125 (* (/ h (* (/ d M) (/ d M))) (/ D (/ l D))))))
(if (<= (/ h l) -2e-182)
(* w0 (+ 1.0 (* -0.125 (* t_0 (* M (* M (/ h l)))))))
w0)))))
double code(double w0, double M, double D, double h, double l, double d) {
double t_0 = pow((D / d), 2.0);
double tmp;
if ((h / l) <= -1e+138) {
tmp = w0 * (1.0 + (-0.125 * (t_0 * (M * ((M * h) / l)))));
} else if ((h / l) <= -1e-151) {
tmp = w0 * (1.0 + (-0.125 * ((h / ((d / M) * (d / M))) * (D / (l / D)))));
} else if ((h / l) <= -2e-182) {
tmp = w0 * (1.0 + (-0.125 * (t_0 * (M * (M * (h / l))))));
} else {
tmp = w0;
}
return tmp;
}
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
real(8) :: t_0
real(8) :: tmp
t_0 = (d / d_1) ** 2.0d0
if ((h / l) <= (-1d+138)) then
tmp = w0 * (1.0d0 + ((-0.125d0) * (t_0 * (m * ((m * h) / l)))))
else if ((h / l) <= (-1d-151)) then
tmp = w0 * (1.0d0 + ((-0.125d0) * ((h / ((d_1 / m) * (d_1 / m))) * (d / (l / d)))))
else if ((h / l) <= (-2d-182)) then
tmp = w0 * (1.0d0 + ((-0.125d0) * (t_0 * (m * (m * (h / l))))))
else
tmp = w0
end if
code = tmp
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
double t_0 = Math.pow((D / d), 2.0);
double tmp;
if ((h / l) <= -1e+138) {
tmp = w0 * (1.0 + (-0.125 * (t_0 * (M * ((M * h) / l)))));
} else if ((h / l) <= -1e-151) {
tmp = w0 * (1.0 + (-0.125 * ((h / ((d / M) * (d / M))) * (D / (l / D)))));
} else if ((h / l) <= -2e-182) {
tmp = w0 * (1.0 + (-0.125 * (t_0 * (M * (M * (h / l))))));
} else {
tmp = w0;
}
return tmp;
}
def code(w0, M, D, h, l, d): t_0 = math.pow((D / d), 2.0) tmp = 0 if (h / l) <= -1e+138: tmp = w0 * (1.0 + (-0.125 * (t_0 * (M * ((M * h) / l))))) elif (h / l) <= -1e-151: tmp = w0 * (1.0 + (-0.125 * ((h / ((d / M) * (d / M))) * (D / (l / D))))) elif (h / l) <= -2e-182: tmp = w0 * (1.0 + (-0.125 * (t_0 * (M * (M * (h / l)))))) else: tmp = w0 return tmp
function code(w0, M, D, h, l, d) t_0 = Float64(D / d) ^ 2.0 tmp = 0.0 if (Float64(h / l) <= -1e+138) tmp = Float64(w0 * Float64(1.0 + Float64(-0.125 * Float64(t_0 * Float64(M * Float64(Float64(M * h) / l)))))); elseif (Float64(h / l) <= -1e-151) tmp = Float64(w0 * Float64(1.0 + Float64(-0.125 * Float64(Float64(h / Float64(Float64(d / M) * Float64(d / M))) * Float64(D / Float64(l / D)))))); elseif (Float64(h / l) <= -2e-182) tmp = Float64(w0 * Float64(1.0 + Float64(-0.125 * Float64(t_0 * Float64(M * Float64(M * Float64(h / l))))))); else tmp = w0; end return tmp end
function tmp_2 = code(w0, M, D, h, l, d) t_0 = (D / d) ^ 2.0; tmp = 0.0; if ((h / l) <= -1e+138) tmp = w0 * (1.0 + (-0.125 * (t_0 * (M * ((M * h) / l))))); elseif ((h / l) <= -1e-151) tmp = w0 * (1.0 + (-0.125 * ((h / ((d / M) * (d / M))) * (D / (l / D))))); elseif ((h / l) <= -2e-182) tmp = w0 * (1.0 + (-0.125 * (t_0 * (M * (M * (h / l)))))); else tmp = w0; end tmp_2 = tmp; end
code[w0_, M_, D_, h_, l_, d_] := Block[{t$95$0 = N[Power[N[(D / d), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[N[(h / l), $MachinePrecision], -1e+138], N[(w0 * N[(1.0 + N[(-0.125 * N[(t$95$0 * N[(M * N[(N[(M * h), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(h / l), $MachinePrecision], -1e-151], N[(w0 * N[(1.0 + N[(-0.125 * N[(N[(h / N[(N[(d / M), $MachinePrecision] * N[(d / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(D / N[(l / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(h / l), $MachinePrecision], -2e-182], N[(w0 * N[(1.0 + N[(-0.125 * N[(t$95$0 * N[(M * N[(M * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], w0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\frac{D}{d}\right)}^{2}\\
\mathbf{if}\;\frac{h}{\ell} \leq -1 \cdot 10^{+138}:\\
\;\;\;\;w0 \cdot \left(1 + -0.125 \cdot \left(t_0 \cdot \left(M \cdot \frac{M \cdot h}{\ell}\right)\right)\right)\\
\mathbf{elif}\;\frac{h}{\ell} \leq -1 \cdot 10^{-151}:\\
\;\;\;\;w0 \cdot \left(1 + -0.125 \cdot \left(\frac{h}{\frac{d}{M} \cdot \frac{d}{M}} \cdot \frac{D}{\frac{\ell}{D}}\right)\right)\\
\mathbf{elif}\;\frac{h}{\ell} \leq -2 \cdot 10^{-182}:\\
\;\;\;\;w0 \cdot \left(1 + -0.125 \cdot \left(t_0 \cdot \left(M \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\end{array}
if (/.f64 h l) < -1e138Initial program 76.8%
times-frac76.8%
Simplified76.8%
Taylor expanded in M around 0 54.6%
associate-*r/54.6%
*-commutative54.6%
associate-*r/54.6%
*-commutative54.6%
times-frac54.8%
unpow254.8%
*-commutative54.8%
unpow254.8%
unpow254.8%
Simplified54.8%
Taylor expanded in D around 0 54.6%
times-frac48.7%
unpow248.7%
*-commutative48.7%
unpow248.7%
unpow248.7%
times-frac61.0%
unpow261.0%
associate-/l*59.0%
associate-/r/59.0%
Simplified59.0%
Taylor expanded in h around 0 61.0%
unpow261.0%
*-commutative61.0%
associate-*r/59.0%
associate-*l*61.1%
Simplified61.1%
Taylor expanded in h around 0 63.1%
if -1e138 < (/.f64 h l) < -9.9999999999999994e-152Initial program 87.8%
times-frac86.4%
Simplified86.4%
Taylor expanded in M around 0 47.2%
associate-*r/47.2%
*-commutative47.2%
associate-*r/47.2%
*-commutative47.2%
times-frac48.5%
unpow248.5%
*-commutative48.5%
unpow248.5%
unpow248.5%
Simplified48.5%
Taylor expanded in D around 0 47.2%
*-commutative47.2%
times-frac48.5%
unpow248.5%
associate-/l*52.9%
unpow252.9%
*-commutative52.9%
associate-/l*54.6%
unpow254.6%
Simplified54.6%
Taylor expanded in d around 0 54.6%
unpow254.6%
unpow254.6%
times-frac67.9%
Simplified67.9%
if -9.9999999999999994e-152 < (/.f64 h l) < -2.0000000000000001e-182Initial program 99.7%
times-frac99.7%
Simplified99.7%
Taylor expanded in M around 0 40.0%
associate-*r/40.0%
*-commutative40.0%
associate-*r/40.0%
*-commutative40.0%
times-frac40.0%
unpow240.0%
*-commutative40.0%
unpow240.0%
unpow240.0%
Simplified40.0%
Taylor expanded in D around 0 40.0%
times-frac40.0%
unpow240.0%
*-commutative40.0%
unpow240.0%
unpow240.0%
times-frac61.5%
unpow261.5%
associate-/l*61.5%
associate-/r/61.5%
Simplified61.5%
Taylor expanded in h around 0 61.5%
unpow261.5%
*-commutative61.5%
associate-*r/61.5%
associate-*l*82.0%
Simplified82.0%
if -2.0000000000000001e-182 < (/.f64 h l) Initial program 85.8%
times-frac86.5%
Simplified86.5%
Taylor expanded in M around 0 90.5%
Final simplification78.9%
(FPCore (w0 M D h l d)
:precision binary64
(let* ((t_0 (pow (/ d M) 2.0)))
(if (<= (/ h l) -1e+138)
(* w0 (+ 1.0 (* -0.125 (* (pow (/ D d) 2.0) (* M (/ (* M h) l))))))
(if (<= (/ h l) -50000000000.0)
(* w0 (+ 1.0 (* (/ (* D h) (* (/ l D) t_0)) -0.125)))
(if (<= (/ h l) -1e-180)
(* w0 (+ 1.0 (* -0.125 (/ (* D (/ h t_0)) (/ l D)))))
w0)))))
double code(double w0, double M, double D, double h, double l, double d) {
double t_0 = pow((d / M), 2.0);
double tmp;
if ((h / l) <= -1e+138) {
tmp = w0 * (1.0 + (-0.125 * (pow((D / d), 2.0) * (M * ((M * h) / l)))));
} else if ((h / l) <= -50000000000.0) {
tmp = w0 * (1.0 + (((D * h) / ((l / D) * t_0)) * -0.125));
} else if ((h / l) <= -1e-180) {
tmp = w0 * (1.0 + (-0.125 * ((D * (h / t_0)) / (l / D))));
} else {
tmp = w0;
}
return tmp;
}
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
real(8) :: t_0
real(8) :: tmp
t_0 = (d_1 / m) ** 2.0d0
if ((h / l) <= (-1d+138)) then
tmp = w0 * (1.0d0 + ((-0.125d0) * (((d / d_1) ** 2.0d0) * (m * ((m * h) / l)))))
else if ((h / l) <= (-50000000000.0d0)) then
tmp = w0 * (1.0d0 + (((d * h) / ((l / d) * t_0)) * (-0.125d0)))
else if ((h / l) <= (-1d-180)) then
tmp = w0 * (1.0d0 + ((-0.125d0) * ((d * (h / t_0)) / (l / d))))
else
tmp = w0
end if
code = tmp
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
double t_0 = Math.pow((d / M), 2.0);
double tmp;
if ((h / l) <= -1e+138) {
tmp = w0 * (1.0 + (-0.125 * (Math.pow((D / d), 2.0) * (M * ((M * h) / l)))));
} else if ((h / l) <= -50000000000.0) {
tmp = w0 * (1.0 + (((D * h) / ((l / D) * t_0)) * -0.125));
} else if ((h / l) <= -1e-180) {
tmp = w0 * (1.0 + (-0.125 * ((D * (h / t_0)) / (l / D))));
} else {
tmp = w0;
}
return tmp;
}
def code(w0, M, D, h, l, d): t_0 = math.pow((d / M), 2.0) tmp = 0 if (h / l) <= -1e+138: tmp = w0 * (1.0 + (-0.125 * (math.pow((D / d), 2.0) * (M * ((M * h) / l))))) elif (h / l) <= -50000000000.0: tmp = w0 * (1.0 + (((D * h) / ((l / D) * t_0)) * -0.125)) elif (h / l) <= -1e-180: tmp = w0 * (1.0 + (-0.125 * ((D * (h / t_0)) / (l / D)))) else: tmp = w0 return tmp
function code(w0, M, D, h, l, d) t_0 = Float64(d / M) ^ 2.0 tmp = 0.0 if (Float64(h / l) <= -1e+138) tmp = Float64(w0 * Float64(1.0 + Float64(-0.125 * Float64((Float64(D / d) ^ 2.0) * Float64(M * Float64(Float64(M * h) / l)))))); elseif (Float64(h / l) <= -50000000000.0) tmp = Float64(w0 * Float64(1.0 + Float64(Float64(Float64(D * h) / Float64(Float64(l / D) * t_0)) * -0.125))); elseif (Float64(h / l) <= -1e-180) tmp = Float64(w0 * Float64(1.0 + Float64(-0.125 * Float64(Float64(D * Float64(h / t_0)) / Float64(l / D))))); else tmp = w0; end return tmp end
function tmp_2 = code(w0, M, D, h, l, d) t_0 = (d / M) ^ 2.0; tmp = 0.0; if ((h / l) <= -1e+138) tmp = w0 * (1.0 + (-0.125 * (((D / d) ^ 2.0) * (M * ((M * h) / l))))); elseif ((h / l) <= -50000000000.0) tmp = w0 * (1.0 + (((D * h) / ((l / D) * t_0)) * -0.125)); elseif ((h / l) <= -1e-180) tmp = w0 * (1.0 + (-0.125 * ((D * (h / t_0)) / (l / D)))); else tmp = w0; end tmp_2 = tmp; end
code[w0_, M_, D_, h_, l_, d_] := Block[{t$95$0 = N[Power[N[(d / M), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[N[(h / l), $MachinePrecision], -1e+138], N[(w0 * N[(1.0 + N[(-0.125 * N[(N[Power[N[(D / d), $MachinePrecision], 2.0], $MachinePrecision] * N[(M * N[(N[(M * h), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(h / l), $MachinePrecision], -50000000000.0], N[(w0 * N[(1.0 + N[(N[(N[(D * h), $MachinePrecision] / N[(N[(l / D), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(h / l), $MachinePrecision], -1e-180], N[(w0 * N[(1.0 + N[(-0.125 * N[(N[(D * N[(h / t$95$0), $MachinePrecision]), $MachinePrecision] / N[(l / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], w0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\frac{d}{M}\right)}^{2}\\
\mathbf{if}\;\frac{h}{\ell} \leq -1 \cdot 10^{+138}:\\
\;\;\;\;w0 \cdot \left(1 + -0.125 \cdot \left({\left(\frac{D}{d}\right)}^{2} \cdot \left(M \cdot \frac{M \cdot h}{\ell}\right)\right)\right)\\
\mathbf{elif}\;\frac{h}{\ell} \leq -50000000000:\\
\;\;\;\;w0 \cdot \left(1 + \frac{D \cdot h}{\frac{\ell}{D} \cdot t_0} \cdot -0.125\right)\\
\mathbf{elif}\;\frac{h}{\ell} \leq -1 \cdot 10^{-180}:\\
\;\;\;\;w0 \cdot \left(1 + -0.125 \cdot \frac{D \cdot \frac{h}{t_0}}{\frac{\ell}{D}}\right)\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\end{array}
if (/.f64 h l) < -1e138Initial program 76.8%
times-frac76.8%
Simplified76.8%
Taylor expanded in M around 0 54.6%
associate-*r/54.6%
*-commutative54.6%
associate-*r/54.6%
*-commutative54.6%
times-frac54.8%
unpow254.8%
*-commutative54.8%
unpow254.8%
unpow254.8%
Simplified54.8%
Taylor expanded in D around 0 54.6%
times-frac48.7%
unpow248.7%
*-commutative48.7%
unpow248.7%
unpow248.7%
times-frac61.0%
unpow261.0%
associate-/l*59.0%
associate-/r/59.0%
Simplified59.0%
Taylor expanded in h around 0 61.0%
unpow261.0%
*-commutative61.0%
associate-*r/59.0%
associate-*l*61.1%
Simplified61.1%
Taylor expanded in h around 0 63.1%
if -1e138 < (/.f64 h l) < -5e10Initial program 79.5%
times-frac75.3%
Simplified75.3%
Taylor expanded in M around 0 44.4%
associate-*r/44.4%
*-commutative44.4%
associate-*r/44.4%
*-commutative44.4%
times-frac44.3%
unpow244.3%
*-commutative44.3%
unpow244.3%
unpow244.3%
Simplified44.3%
Taylor expanded in D around 0 44.4%
*-commutative44.4%
times-frac44.3%
unpow244.3%
associate-/l*48.7%
unpow248.7%
*-commutative48.7%
associate-/l*53.0%
unpow253.0%
Simplified53.0%
Taylor expanded in d around 0 53.0%
unpow253.0%
unpow253.0%
times-frac60.6%
Simplified60.6%
frac-times60.7%
pow260.7%
Applied egg-rr60.7%
if -5e10 < (/.f64 h l) < -1e-180Initial program 92.7%
times-frac92.7%
Simplified92.7%
Taylor expanded in M around 0 48.6%
associate-*r/48.6%
*-commutative48.6%
associate-*r/48.6%
*-commutative48.6%
times-frac50.6%
unpow250.6%
*-commutative50.6%
unpow250.6%
unpow250.6%
Simplified50.6%
Taylor expanded in D around 0 48.6%
*-commutative48.6%
times-frac50.6%
unpow250.6%
associate-/l*54.6%
unpow254.6%
*-commutative54.6%
associate-/l*54.9%
unpow254.9%
Simplified54.9%
Taylor expanded in d around 0 54.9%
unpow254.9%
unpow254.9%
times-frac73.8%
Simplified73.8%
associate-*l/79.8%
pow279.8%
Applied egg-rr79.8%
if -1e-180 < (/.f64 h l) Initial program 85.9%
times-frac86.6%
Simplified86.6%
Taylor expanded in M around 0 89.9%
Final simplification80.1%
(FPCore (w0 M D h l d)
:precision binary64
(if (<= (/ h l) -1e+138)
(* w0 (+ 1.0 (* -0.125 (* (pow (/ D d) 2.0) (* M (/ (* M h) l))))))
(if (<= (/ h l) -1e-180)
(* w0 (+ 1.0 (* (/ (* D h) (* (/ l D) (pow (/ d M) 2.0))) -0.125)))
w0)))
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((h / l) <= -1e+138) {
tmp = w0 * (1.0 + (-0.125 * (pow((D / d), 2.0) * (M * ((M * h) / l)))));
} else if ((h / l) <= -1e-180) {
tmp = w0 * (1.0 + (((D * h) / ((l / D) * pow((d / M), 2.0))) * -0.125));
} else {
tmp = w0;
}
return tmp;
}
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
real(8) :: tmp
if ((h / l) <= (-1d+138)) then
tmp = w0 * (1.0d0 + ((-0.125d0) * (((d / d_1) ** 2.0d0) * (m * ((m * h) / l)))))
else if ((h / l) <= (-1d-180)) then
tmp = w0 * (1.0d0 + (((d * h) / ((l / d) * ((d_1 / m) ** 2.0d0))) * (-0.125d0)))
else
tmp = w0
end if
code = tmp
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((h / l) <= -1e+138) {
tmp = w0 * (1.0 + (-0.125 * (Math.pow((D / d), 2.0) * (M * ((M * h) / l)))));
} else if ((h / l) <= -1e-180) {
tmp = w0 * (1.0 + (((D * h) / ((l / D) * Math.pow((d / M), 2.0))) * -0.125));
} else {
tmp = w0;
}
return tmp;
}
def code(w0, M, D, h, l, d): tmp = 0 if (h / l) <= -1e+138: tmp = w0 * (1.0 + (-0.125 * (math.pow((D / d), 2.0) * (M * ((M * h) / l))))) elif (h / l) <= -1e-180: tmp = w0 * (1.0 + (((D * h) / ((l / D) * math.pow((d / M), 2.0))) * -0.125)) else: tmp = w0 return tmp
function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64(h / l) <= -1e+138) tmp = Float64(w0 * Float64(1.0 + Float64(-0.125 * Float64((Float64(D / d) ^ 2.0) * Float64(M * Float64(Float64(M * h) / l)))))); elseif (Float64(h / l) <= -1e-180) tmp = Float64(w0 * Float64(1.0 + Float64(Float64(Float64(D * h) / Float64(Float64(l / D) * (Float64(d / M) ^ 2.0))) * -0.125))); else tmp = w0; end return tmp end
function tmp_2 = code(w0, M, D, h, l, d) tmp = 0.0; if ((h / l) <= -1e+138) tmp = w0 * (1.0 + (-0.125 * (((D / d) ^ 2.0) * (M * ((M * h) / l))))); elseif ((h / l) <= -1e-180) tmp = w0 * (1.0 + (((D * h) / ((l / D) * ((d / M) ^ 2.0))) * -0.125)); else tmp = w0; end tmp_2 = tmp; end
code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(h / l), $MachinePrecision], -1e+138], N[(w0 * N[(1.0 + N[(-0.125 * N[(N[Power[N[(D / d), $MachinePrecision], 2.0], $MachinePrecision] * N[(M * N[(N[(M * h), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(h / l), $MachinePrecision], -1e-180], N[(w0 * N[(1.0 + N[(N[(N[(D * h), $MachinePrecision] / N[(N[(l / D), $MachinePrecision] * N[Power[N[(d / M), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], w0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{h}{\ell} \leq -1 \cdot 10^{+138}:\\
\;\;\;\;w0 \cdot \left(1 + -0.125 \cdot \left({\left(\frac{D}{d}\right)}^{2} \cdot \left(M \cdot \frac{M \cdot h}{\ell}\right)\right)\right)\\
\mathbf{elif}\;\frac{h}{\ell} \leq -1 \cdot 10^{-180}:\\
\;\;\;\;w0 \cdot \left(1 + \frac{D \cdot h}{\frac{\ell}{D} \cdot {\left(\frac{d}{M}\right)}^{2}} \cdot -0.125\right)\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\end{array}
if (/.f64 h l) < -1e138Initial program 76.8%
times-frac76.8%
Simplified76.8%
Taylor expanded in M around 0 54.6%
associate-*r/54.6%
*-commutative54.6%
associate-*r/54.6%
*-commutative54.6%
times-frac54.8%
unpow254.8%
*-commutative54.8%
unpow254.8%
unpow254.8%
Simplified54.8%
Taylor expanded in D around 0 54.6%
times-frac48.7%
unpow248.7%
*-commutative48.7%
unpow248.7%
unpow248.7%
times-frac61.0%
unpow261.0%
associate-/l*59.0%
associate-/r/59.0%
Simplified59.0%
Taylor expanded in h around 0 61.0%
unpow261.0%
*-commutative61.0%
associate-*r/59.0%
associate-*l*61.1%
Simplified61.1%
Taylor expanded in h around 0 63.1%
if -1e138 < (/.f64 h l) < -1e-180Initial program 88.5%
times-frac87.2%
Simplified87.2%
Taylor expanded in M around 0 47.3%
associate-*r/47.3%
*-commutative47.3%
associate-*r/47.3%
*-commutative47.3%
times-frac48.6%
unpow248.6%
*-commutative48.6%
unpow248.6%
unpow248.6%
Simplified48.6%
Taylor expanded in D around 0 47.3%
*-commutative47.3%
times-frac48.6%
unpow248.6%
associate-/l*52.7%
unpow252.7%
*-commutative52.7%
associate-/l*54.3%
unpow254.3%
Simplified54.3%
Taylor expanded in d around 0 54.3%
unpow254.3%
unpow254.3%
times-frac69.6%
Simplified69.6%
frac-times69.7%
pow269.7%
Applied egg-rr69.7%
if -1e-180 < (/.f64 h l) Initial program 85.9%
times-frac86.6%
Simplified86.6%
Taylor expanded in M around 0 89.9%
Final simplification78.9%
(FPCore (w0 M D h l d)
:precision binary64
(if (<= M -1.45e+113)
(* w0 (+ 1.0 (* -0.125 (* (/ h (* (/ d M) (/ d M))) (/ D (/ l D))))))
(if (or (<= M -1.7e+23) (not (<= M 4.05e-112)))
(* w0 (+ 1.0 (* -0.125 (* (pow (/ D d) 2.0) (* M (* M (/ h l)))))))
w0)))
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (M <= -1.45e+113) {
tmp = w0 * (1.0 + (-0.125 * ((h / ((d / M) * (d / M))) * (D / (l / D)))));
} else if ((M <= -1.7e+23) || !(M <= 4.05e-112)) {
tmp = w0 * (1.0 + (-0.125 * (pow((D / d), 2.0) * (M * (M * (h / l))))));
} else {
tmp = w0;
}
return tmp;
}
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
real(8) :: tmp
if (m <= (-1.45d+113)) then
tmp = w0 * (1.0d0 + ((-0.125d0) * ((h / ((d_1 / m) * (d_1 / m))) * (d / (l / d)))))
else if ((m <= (-1.7d+23)) .or. (.not. (m <= 4.05d-112))) then
tmp = w0 * (1.0d0 + ((-0.125d0) * (((d / d_1) ** 2.0d0) * (m * (m * (h / l))))))
else
tmp = w0
end if
code = tmp
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (M <= -1.45e+113) {
tmp = w0 * (1.0 + (-0.125 * ((h / ((d / M) * (d / M))) * (D / (l / D)))));
} else if ((M <= -1.7e+23) || !(M <= 4.05e-112)) {
tmp = w0 * (1.0 + (-0.125 * (Math.pow((D / d), 2.0) * (M * (M * (h / l))))));
} else {
tmp = w0;
}
return tmp;
}
def code(w0, M, D, h, l, d): tmp = 0 if M <= -1.45e+113: tmp = w0 * (1.0 + (-0.125 * ((h / ((d / M) * (d / M))) * (D / (l / D))))) elif (M <= -1.7e+23) or not (M <= 4.05e-112): tmp = w0 * (1.0 + (-0.125 * (math.pow((D / d), 2.0) * (M * (M * (h / l)))))) else: tmp = w0 return tmp
function code(w0, M, D, h, l, d) tmp = 0.0 if (M <= -1.45e+113) tmp = Float64(w0 * Float64(1.0 + Float64(-0.125 * Float64(Float64(h / Float64(Float64(d / M) * Float64(d / M))) * Float64(D / Float64(l / D)))))); elseif ((M <= -1.7e+23) || !(M <= 4.05e-112)) tmp = Float64(w0 * Float64(1.0 + Float64(-0.125 * Float64((Float64(D / d) ^ 2.0) * Float64(M * Float64(M * Float64(h / l))))))); else tmp = w0; end return tmp end
function tmp_2 = code(w0, M, D, h, l, d) tmp = 0.0; if (M <= -1.45e+113) tmp = w0 * (1.0 + (-0.125 * ((h / ((d / M) * (d / M))) * (D / (l / D))))); elseif ((M <= -1.7e+23) || ~((M <= 4.05e-112))) tmp = w0 * (1.0 + (-0.125 * (((D / d) ^ 2.0) * (M * (M * (h / l)))))); else tmp = w0; end tmp_2 = tmp; end
code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[M, -1.45e+113], N[(w0 * N[(1.0 + N[(-0.125 * N[(N[(h / N[(N[(d / M), $MachinePrecision] * N[(d / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(D / N[(l / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[M, -1.7e+23], N[Not[LessEqual[M, 4.05e-112]], $MachinePrecision]], N[(w0 * N[(1.0 + N[(-0.125 * N[(N[Power[N[(D / d), $MachinePrecision], 2.0], $MachinePrecision] * N[(M * N[(M * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], w0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;M \leq -1.45 \cdot 10^{+113}:\\
\;\;\;\;w0 \cdot \left(1 + -0.125 \cdot \left(\frac{h}{\frac{d}{M} \cdot \frac{d}{M}} \cdot \frac{D}{\frac{\ell}{D}}\right)\right)\\
\mathbf{elif}\;M \leq -1.7 \cdot 10^{+23} \lor \neg \left(M \leq 4.05 \cdot 10^{-112}\right):\\
\;\;\;\;w0 \cdot \left(1 + -0.125 \cdot \left({\left(\frac{D}{d}\right)}^{2} \cdot \left(M \cdot \left(M \cdot \frac{h}{\ell}\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\end{array}
if M < -1.44999999999999992e113Initial program 76.2%
times-frac76.2%
Simplified76.2%
Taylor expanded in M around 0 34.1%
associate-*r/34.1%
*-commutative34.1%
associate-*r/34.1%
*-commutative34.1%
times-frac34.2%
unpow234.2%
*-commutative34.2%
unpow234.2%
unpow234.2%
Simplified34.2%
Taylor expanded in D around 0 34.1%
*-commutative34.1%
times-frac34.2%
unpow234.2%
associate-/l*39.9%
unpow239.9%
*-commutative39.9%
associate-/l*42.7%
unpow242.7%
Simplified42.7%
Taylor expanded in d around 0 42.7%
unpow242.7%
unpow242.7%
times-frac63.0%
Simplified63.0%
if -1.44999999999999992e113 < M < -1.69999999999999996e23 or 4.05000000000000011e-112 < M Initial program 82.4%
times-frac83.3%
Simplified83.3%
Taylor expanded in M around 0 45.8%
associate-*r/45.8%
*-commutative45.8%
associate-*r/45.8%
*-commutative45.8%
times-frac48.8%
unpow248.8%
*-commutative48.8%
unpow248.8%
unpow248.8%
Simplified48.8%
Taylor expanded in D around 0 45.8%
times-frac47.8%
unpow247.8%
*-commutative47.8%
unpow247.8%
unpow247.8%
times-frac58.6%
unpow258.6%
associate-/l*59.5%
associate-/r/61.4%
Simplified61.4%
Taylor expanded in h around 0 58.6%
unpow258.6%
*-commutative58.6%
associate-*r/61.4%
associate-*l*70.1%
Simplified70.1%
if -1.69999999999999996e23 < M < 4.05000000000000011e-112Initial program 89.7%
times-frac88.9%
Simplified88.9%
Taylor expanded in M around 0 88.1%
Final simplification77.3%
(FPCore (w0 M D h l d)
:precision binary64
(if (<= M -1.75e+113)
(* w0 (+ 1.0 (* -0.125 (* (/ h (* (/ d M) (/ d M))) (/ D (/ l D))))))
(if (or (<= M -2.4e+21) (not (<= M 4.7e-119)))
(* w0 (+ 1.0 (* -0.125 (* (* (/ D d) (/ D d)) (* (/ h l) (* M M))))))
w0)))
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (M <= -1.75e+113) {
tmp = w0 * (1.0 + (-0.125 * ((h / ((d / M) * (d / M))) * (D / (l / D)))));
} else if ((M <= -2.4e+21) || !(M <= 4.7e-119)) {
tmp = w0 * (1.0 + (-0.125 * (((D / d) * (D / d)) * ((h / l) * (M * M)))));
} else {
tmp = w0;
}
return tmp;
}
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
real(8) :: tmp
if (m <= (-1.75d+113)) then
tmp = w0 * (1.0d0 + ((-0.125d0) * ((h / ((d_1 / m) * (d_1 / m))) * (d / (l / d)))))
else if ((m <= (-2.4d+21)) .or. (.not. (m <= 4.7d-119))) then
tmp = w0 * (1.0d0 + ((-0.125d0) * (((d / d_1) * (d / d_1)) * ((h / l) * (m * m)))))
else
tmp = w0
end if
code = tmp
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (M <= -1.75e+113) {
tmp = w0 * (1.0 + (-0.125 * ((h / ((d / M) * (d / M))) * (D / (l / D)))));
} else if ((M <= -2.4e+21) || !(M <= 4.7e-119)) {
tmp = w0 * (1.0 + (-0.125 * (((D / d) * (D / d)) * ((h / l) * (M * M)))));
} else {
tmp = w0;
}
return tmp;
}
def code(w0, M, D, h, l, d): tmp = 0 if M <= -1.75e+113: tmp = w0 * (1.0 + (-0.125 * ((h / ((d / M) * (d / M))) * (D / (l / D))))) elif (M <= -2.4e+21) or not (M <= 4.7e-119): tmp = w0 * (1.0 + (-0.125 * (((D / d) * (D / d)) * ((h / l) * (M * M))))) else: tmp = w0 return tmp
function code(w0, M, D, h, l, d) tmp = 0.0 if (M <= -1.75e+113) tmp = Float64(w0 * Float64(1.0 + Float64(-0.125 * Float64(Float64(h / Float64(Float64(d / M) * Float64(d / M))) * Float64(D / Float64(l / D)))))); elseif ((M <= -2.4e+21) || !(M <= 4.7e-119)) tmp = Float64(w0 * Float64(1.0 + Float64(-0.125 * Float64(Float64(Float64(D / d) * Float64(D / d)) * Float64(Float64(h / l) * Float64(M * M)))))); else tmp = w0; end return tmp end
function tmp_2 = code(w0, M, D, h, l, d) tmp = 0.0; if (M <= -1.75e+113) tmp = w0 * (1.0 + (-0.125 * ((h / ((d / M) * (d / M))) * (D / (l / D))))); elseif ((M <= -2.4e+21) || ~((M <= 4.7e-119))) tmp = w0 * (1.0 + (-0.125 * (((D / d) * (D / d)) * ((h / l) * (M * M))))); else tmp = w0; end tmp_2 = tmp; end
code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[M, -1.75e+113], N[(w0 * N[(1.0 + N[(-0.125 * N[(N[(h / N[(N[(d / M), $MachinePrecision] * N[(d / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(D / N[(l / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[M, -2.4e+21], N[Not[LessEqual[M, 4.7e-119]], $MachinePrecision]], N[(w0 * N[(1.0 + N[(-0.125 * N[(N[(N[(D / d), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision] * N[(N[(h / l), $MachinePrecision] * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], w0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;M \leq -1.75 \cdot 10^{+113}:\\
\;\;\;\;w0 \cdot \left(1 + -0.125 \cdot \left(\frac{h}{\frac{d}{M} \cdot \frac{d}{M}} \cdot \frac{D}{\frac{\ell}{D}}\right)\right)\\
\mathbf{elif}\;M \leq -2.4 \cdot 10^{+21} \lor \neg \left(M \leq 4.7 \cdot 10^{-119}\right):\\
\;\;\;\;w0 \cdot \left(1 + -0.125 \cdot \left(\left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \left(\frac{h}{\ell} \cdot \left(M \cdot M\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\end{array}
if M < -1.75e113Initial program 76.2%
times-frac76.2%
Simplified76.2%
Taylor expanded in M around 0 34.1%
associate-*r/34.1%
*-commutative34.1%
associate-*r/34.1%
*-commutative34.1%
times-frac34.2%
unpow234.2%
*-commutative34.2%
unpow234.2%
unpow234.2%
Simplified34.2%
Taylor expanded in D around 0 34.1%
*-commutative34.1%
times-frac34.2%
unpow234.2%
associate-/l*39.9%
unpow239.9%
*-commutative39.9%
associate-/l*42.7%
unpow242.7%
Simplified42.7%
Taylor expanded in d around 0 42.7%
unpow242.7%
unpow242.7%
times-frac63.0%
Simplified63.0%
if -1.75e113 < M < -2.4e21 or 4.70000000000000002e-119 < M Initial program 82.6%
times-frac83.5%
Simplified83.5%
Taylor expanded in M around 0 45.4%
associate-*r/45.4%
*-commutative45.4%
associate-*r/45.4%
*-commutative45.4%
times-frac48.3%
unpow248.3%
*-commutative48.3%
unpow248.3%
unpow248.3%
Simplified48.3%
Taylor expanded in D around 0 45.4%
times-frac47.4%
unpow247.4%
*-commutative47.4%
unpow247.4%
unpow247.4%
times-frac59.0%
unpow259.0%
associate-/l*59.8%
associate-/r/61.7%
Simplified61.7%
unpow261.7%
Applied egg-rr61.7%
if -2.4e21 < M < 4.70000000000000002e-119Initial program 89.6%
times-frac88.8%
Simplified88.8%
Taylor expanded in M around 0 88.0%
Final simplification73.7%
(FPCore (w0 M D h l d) :precision binary64 (if (<= (/ h l) -5e-133) (* w0 (+ 1.0 (* -0.125 (* (* (/ D d) (/ D d)) (* (/ h l) (* M M)))))) w0))
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((h / l) <= -5e-133) {
tmp = w0 * (1.0 + (-0.125 * (((D / d) * (D / d)) * ((h / l) * (M * M)))));
} else {
tmp = w0;
}
return tmp;
}
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
real(8) :: tmp
if ((h / l) <= (-5d-133)) then
tmp = w0 * (1.0d0 + ((-0.125d0) * (((d / d_1) * (d / d_1)) * ((h / l) * (m * m)))))
else
tmp = w0
end if
code = tmp
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((h / l) <= -5e-133) {
tmp = w0 * (1.0 + (-0.125 * (((D / d) * (D / d)) * ((h / l) * (M * M)))));
} else {
tmp = w0;
}
return tmp;
}
def code(w0, M, D, h, l, d): tmp = 0 if (h / l) <= -5e-133: tmp = w0 * (1.0 + (-0.125 * (((D / d) * (D / d)) * ((h / l) * (M * M))))) else: tmp = w0 return tmp
function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64(h / l) <= -5e-133) tmp = Float64(w0 * Float64(1.0 + Float64(-0.125 * Float64(Float64(Float64(D / d) * Float64(D / d)) * Float64(Float64(h / l) * Float64(M * M)))))); else tmp = w0; end return tmp end
function tmp_2 = code(w0, M, D, h, l, d) tmp = 0.0; if ((h / l) <= -5e-133) tmp = w0 * (1.0 + (-0.125 * (((D / d) * (D / d)) * ((h / l) * (M * M))))); else tmp = w0; end tmp_2 = tmp; end
code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(h / l), $MachinePrecision], -5e-133], N[(w0 * N[(1.0 + N[(-0.125 * N[(N[(N[(D / d), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision] * N[(N[(h / l), $MachinePrecision] * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], w0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{h}{\ell} \leq -5 \cdot 10^{-133}:\\
\;\;\;\;w0 \cdot \left(1 + -0.125 \cdot \left(\left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \left(\frac{h}{\ell} \cdot \left(M \cdot M\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\end{array}
if (/.f64 h l) < -4.9999999999999999e-133Initial program 83.2%
times-frac82.3%
Simplified82.3%
Taylor expanded in M around 0 51.1%
associate-*r/51.1%
*-commutative51.1%
associate-*r/51.1%
*-commutative51.1%
times-frac52.1%
unpow252.1%
*-commutative52.1%
unpow252.1%
unpow252.1%
Simplified52.1%
Taylor expanded in D around 0 51.1%
times-frac49.4%
unpow249.4%
*-commutative49.4%
unpow249.4%
unpow249.4%
times-frac63.1%
unpow263.1%
associate-/l*60.5%
associate-/r/62.4%
Simplified62.4%
unpow262.4%
Applied egg-rr62.4%
if -4.9999999999999999e-133 < (/.f64 h l) Initial program 86.2%
times-frac86.8%
Simplified86.8%
Taylor expanded in M around 0 88.0%
Final simplification76.7%
(FPCore (w0 M D h l d) :precision binary64 w0)
double code(double w0, double M, double D, double h, double l, double d) {
return w0;
}
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
code = w0
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
return w0;
}
def code(w0, M, D, h, l, d): return w0
function code(w0, M, D, h, l, d) return w0 end
function tmp = code(w0, M, D, h, l, d) tmp = w0; end
code[w0_, M_, D_, h_, l_, d_] := w0
\begin{array}{l}
\\
w0
\end{array}
Initial program 84.8%
times-frac84.8%
Simplified84.8%
Taylor expanded in M around 0 68.9%
Final simplification68.9%
herbie shell --seed 2023195
(FPCore (w0 M D h l d)
:name "Henrywood and Agarwal, Equation (9a)"
:precision binary64
(* w0 (sqrt (- 1.0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l))))))