
(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 9 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}
M_m = (fabs.f64 M)
D_m = (fabs.f64 D)
d_m = (fabs.f64 d)
(FPCore (w0 M_m D_m h l d_m)
:precision binary64
(if (<= (/ (* M_m D_m) (* 2.0 d_m)) 2e+163)
(*
w0
(sqrt
(-
1.0
(* (pow (cbrt (/ (pow (* (* M_m D_m) (/ 0.5 d_m)) 2.0) l)) 3.0) h))))
(pow
(*
(cbrt w0)
(*
(exp
(*
(log (* -0.25 (/ (* h (pow (* M_m D_m) 2.0)) l)))
0.16666666666666666))
(exp (* 0.16666666666666666 (* -2.0 (log d_m))))))
3.0)))M_m = fabs(M);
D_m = fabs(D);
d_m = fabs(d);
double code(double w0, double M_m, double D_m, double h, double l, double d_m) {
double tmp;
if (((M_m * D_m) / (2.0 * d_m)) <= 2e+163) {
tmp = w0 * sqrt((1.0 - (pow(cbrt((pow(((M_m * D_m) * (0.5 / d_m)), 2.0) / l)), 3.0) * h)));
} else {
tmp = pow((cbrt(w0) * (exp((log((-0.25 * ((h * pow((M_m * D_m), 2.0)) / l))) * 0.16666666666666666)) * exp((0.16666666666666666 * (-2.0 * log(d_m)))))), 3.0);
}
return tmp;
}
M_m = Math.abs(M);
D_m = Math.abs(D);
d_m = Math.abs(d);
public static double code(double w0, double M_m, double D_m, double h, double l, double d_m) {
double tmp;
if (((M_m * D_m) / (2.0 * d_m)) <= 2e+163) {
tmp = w0 * Math.sqrt((1.0 - (Math.pow(Math.cbrt((Math.pow(((M_m * D_m) * (0.5 / d_m)), 2.0) / l)), 3.0) * h)));
} else {
tmp = Math.pow((Math.cbrt(w0) * (Math.exp((Math.log((-0.25 * ((h * Math.pow((M_m * D_m), 2.0)) / l))) * 0.16666666666666666)) * Math.exp((0.16666666666666666 * (-2.0 * Math.log(d_m)))))), 3.0);
}
return tmp;
}
M_m = abs(M) D_m = abs(D) d_m = abs(d) function code(w0, M_m, D_m, h, l, d_m) tmp = 0.0 if (Float64(Float64(M_m * D_m) / Float64(2.0 * d_m)) <= 2e+163) tmp = Float64(w0 * sqrt(Float64(1.0 - Float64((cbrt(Float64((Float64(Float64(M_m * D_m) * Float64(0.5 / d_m)) ^ 2.0) / l)) ^ 3.0) * h)))); else tmp = Float64(cbrt(w0) * Float64(exp(Float64(log(Float64(-0.25 * Float64(Float64(h * (Float64(M_m * D_m) ^ 2.0)) / l))) * 0.16666666666666666)) * exp(Float64(0.16666666666666666 * Float64(-2.0 * log(d_m)))))) ^ 3.0; end return tmp end
M_m = N[Abs[M], $MachinePrecision] D_m = N[Abs[D], $MachinePrecision] d_m = N[Abs[d], $MachinePrecision] code[w0_, M$95$m_, D$95$m_, h_, l_, d$95$m_] := If[LessEqual[N[(N[(M$95$m * D$95$m), $MachinePrecision] / N[(2.0 * d$95$m), $MachinePrecision]), $MachinePrecision], 2e+163], N[(w0 * N[Sqrt[N[(1.0 - N[(N[Power[N[Power[N[(N[Power[N[(N[(M$95$m * D$95$m), $MachinePrecision] * N[(0.5 / d$95$m), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / l), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision] * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Power[N[(N[Power[w0, 1/3], $MachinePrecision] * N[(N[Exp[N[(N[Log[N[(-0.25 * N[(N[(h * N[Power[N[(M$95$m * D$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 0.16666666666666666), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(0.16666666666666666 * N[(-2.0 * N[Log[d$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
d_m = \left|d\right|
\\
\begin{array}{l}
\mathbf{if}\;\frac{M\_m \cdot D\_m}{2 \cdot d\_m} \leq 2 \cdot 10^{+163}:\\
\;\;\;\;w0 \cdot \sqrt{1 - {\left(\sqrt[3]{\frac{{\left(\left(M\_m \cdot D\_m\right) \cdot \frac{0.5}{d\_m}\right)}^{2}}{\ell}}\right)}^{3} \cdot h}\\
\mathbf{else}:\\
\;\;\;\;{\left(\sqrt[3]{w0} \cdot \left(e^{\log \left(-0.25 \cdot \frac{h \cdot {\left(M\_m \cdot D\_m\right)}^{2}}{\ell}\right) \cdot 0.16666666666666666} \cdot e^{0.16666666666666666 \cdot \left(-2 \cdot \log d\_m\right)}\right)\right)}^{3}\\
\end{array}
\end{array}
if (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) < 1.9999999999999999e163Initial program 85.0%
Simplified85.2%
clear-num85.2%
un-div-inv86.3%
*-commutative86.3%
associate-*l/86.0%
associate-*r/85.4%
div-inv85.4%
metadata-eval85.4%
Applied egg-rr85.4%
associate-/r/89.6%
associate-*r/90.6%
*-commutative90.6%
associate-/l*90.9%
associate-*r/90.9%
Simplified90.9%
add-cube-cbrt90.9%
pow390.9%
associate-*r*90.6%
Applied egg-rr90.6%
if 1.9999999999999999e163 < (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) Initial program 44.9%
Simplified44.9%
add-cube-cbrt44.9%
pow344.9%
*-commutative44.9%
*-commutative44.9%
associate-*l/44.9%
associate-*r/44.9%
div-inv44.9%
metadata-eval44.9%
Applied egg-rr44.9%
Taylor expanded in d around 0 26.9%
distribute-rgt-in26.9%
exp-sum26.9%
distribute-lft-neg-in26.9%
metadata-eval26.9%
associate-*r*30.2%
unpow-prod-down33.9%
Applied egg-rr33.9%
Final simplification85.3%
M_m = (fabs.f64 M)
D_m = (fabs.f64 D)
d_m = (fabs.f64 d)
(FPCore (w0 M_m D_m h l d_m)
:precision binary64
(if (<= (- 1.0 (* (/ h l) (pow (/ (* M_m D_m) (* 2.0 d_m)) 2.0))) 5e+295)
(* w0 (sqrt (- 1.0 (* (/ h l) (pow (* D_m (/ (/ M_m 2.0) d_m)) 2.0)))))
(*
w0
(sqrt
(-
1.0
(*
h
(pow
(* (pow (cbrt (* 0.5 (* M_m (/ D_m d_m)))) 2.0) (cbrt (/ 1.0 l)))
3.0)))))))M_m = fabs(M);
D_m = fabs(D);
d_m = fabs(d);
double code(double w0, double M_m, double D_m, double h, double l, double d_m) {
double tmp;
if ((1.0 - ((h / l) * pow(((M_m * D_m) / (2.0 * d_m)), 2.0))) <= 5e+295) {
tmp = w0 * sqrt((1.0 - ((h / l) * pow((D_m * ((M_m / 2.0) / d_m)), 2.0))));
} else {
tmp = w0 * sqrt((1.0 - (h * pow((pow(cbrt((0.5 * (M_m * (D_m / d_m)))), 2.0) * cbrt((1.0 / l))), 3.0))));
}
return tmp;
}
M_m = Math.abs(M);
D_m = Math.abs(D);
d_m = Math.abs(d);
public static double code(double w0, double M_m, double D_m, double h, double l, double d_m) {
double tmp;
if ((1.0 - ((h / l) * Math.pow(((M_m * D_m) / (2.0 * d_m)), 2.0))) <= 5e+295) {
tmp = w0 * Math.sqrt((1.0 - ((h / l) * Math.pow((D_m * ((M_m / 2.0) / d_m)), 2.0))));
} else {
tmp = w0 * Math.sqrt((1.0 - (h * Math.pow((Math.pow(Math.cbrt((0.5 * (M_m * (D_m / d_m)))), 2.0) * Math.cbrt((1.0 / l))), 3.0))));
}
return tmp;
}
M_m = abs(M) D_m = abs(D) d_m = abs(d) function code(w0, M_m, D_m, h, l, d_m) tmp = 0.0 if (Float64(1.0 - Float64(Float64(h / l) * (Float64(Float64(M_m * D_m) / Float64(2.0 * d_m)) ^ 2.0))) <= 5e+295) tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(h / l) * (Float64(D_m * Float64(Float64(M_m / 2.0) / d_m)) ^ 2.0))))); else tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(h * (Float64((cbrt(Float64(0.5 * Float64(M_m * Float64(D_m / d_m)))) ^ 2.0) * cbrt(Float64(1.0 / l))) ^ 3.0))))); end return tmp end
M_m = N[Abs[M], $MachinePrecision] D_m = N[Abs[D], $MachinePrecision] d_m = N[Abs[d], $MachinePrecision] code[w0_, M$95$m_, D$95$m_, h_, l_, d$95$m_] := If[LessEqual[N[(1.0 - N[(N[(h / l), $MachinePrecision] * N[Power[N[(N[(M$95$m * D$95$m), $MachinePrecision] / N[(2.0 * d$95$m), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 5e+295], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(h / l), $MachinePrecision] * N[Power[N[(D$95$m * N[(N[(M$95$m / 2.0), $MachinePrecision] / d$95$m), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(w0 * N[Sqrt[N[(1.0 - N[(h * N[Power[N[(N[Power[N[Power[N[(0.5 * N[(M$95$m * N[(D$95$m / d$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[N[(1.0 / l), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
d_m = \left|d\right|
\\
\begin{array}{l}
\mathbf{if}\;1 - \frac{h}{\ell} \cdot {\left(\frac{M\_m \cdot D\_m}{2 \cdot d\_m}\right)}^{2} \leq 5 \cdot 10^{+295}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{h}{\ell} \cdot {\left(D\_m \cdot \frac{\frac{M\_m}{2}}{d\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 - h \cdot {\left({\left(\sqrt[3]{0.5 \cdot \left(M\_m \cdot \frac{D\_m}{d\_m}\right)}\right)}^{2} \cdot \sqrt[3]{\frac{1}{\ell}}\right)}^{3}}\\
\end{array}
\end{array}
if (-.f64 #s(literal 1 binary64) (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l))) < 4.99999999999999991e295Initial program 99.6%
Simplified99.4%
if 4.99999999999999991e295 < (-.f64 #s(literal 1 binary64) (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l))) Initial program 37.6%
Simplified38.9%
clear-num38.9%
un-div-inv42.1%
*-commutative42.1%
associate-*l/40.8%
associate-*r/42.0%
div-inv42.0%
metadata-eval42.0%
Applied egg-rr42.0%
associate-/r/56.3%
associate-*r/56.3%
*-commutative56.3%
associate-/l*57.5%
associate-*r/57.5%
Simplified57.5%
add-cube-cbrt57.6%
pow357.6%
associate-*r*56.3%
Applied egg-rr56.3%
pow1/332.7%
div-inv32.7%
associate-*r*33.9%
unpow-prod-down29.9%
Applied egg-rr32.3%
unpow1/362.3%
associate-*r*62.3%
*-commutative62.3%
associate-*r*62.3%
Simplified62.3%
Final simplification88.4%
M_m = (fabs.f64 M)
D_m = (fabs.f64 D)
d_m = (fabs.f64 d)
(FPCore (w0 M_m D_m h l d_m)
:precision binary64
(if (<= (- 1.0 (* (/ h l) (pow (/ (* M_m D_m) (* 2.0 d_m)) 2.0))) 1e+306)
(* w0 (sqrt (- 1.0 (* (/ h l) (pow (* D_m (/ (/ M_m 2.0) d_m)) 2.0)))))
(*
w0
(sqrt
(-
1.0
(*
h
(pow
(/ (pow (cbrt (* 0.5 (* M_m (/ D_m d_m)))) 2.0) (cbrt l))
3.0)))))))M_m = fabs(M);
D_m = fabs(D);
d_m = fabs(d);
double code(double w0, double M_m, double D_m, double h, double l, double d_m) {
double tmp;
if ((1.0 - ((h / l) * pow(((M_m * D_m) / (2.0 * d_m)), 2.0))) <= 1e+306) {
tmp = w0 * sqrt((1.0 - ((h / l) * pow((D_m * ((M_m / 2.0) / d_m)), 2.0))));
} else {
tmp = w0 * sqrt((1.0 - (h * pow((pow(cbrt((0.5 * (M_m * (D_m / d_m)))), 2.0) / cbrt(l)), 3.0))));
}
return tmp;
}
M_m = Math.abs(M);
D_m = Math.abs(D);
d_m = Math.abs(d);
public static double code(double w0, double M_m, double D_m, double h, double l, double d_m) {
double tmp;
if ((1.0 - ((h / l) * Math.pow(((M_m * D_m) / (2.0 * d_m)), 2.0))) <= 1e+306) {
tmp = w0 * Math.sqrt((1.0 - ((h / l) * Math.pow((D_m * ((M_m / 2.0) / d_m)), 2.0))));
} else {
tmp = w0 * Math.sqrt((1.0 - (h * Math.pow((Math.pow(Math.cbrt((0.5 * (M_m * (D_m / d_m)))), 2.0) / Math.cbrt(l)), 3.0))));
}
return tmp;
}
M_m = abs(M) D_m = abs(D) d_m = abs(d) function code(w0, M_m, D_m, h, l, d_m) tmp = 0.0 if (Float64(1.0 - Float64(Float64(h / l) * (Float64(Float64(M_m * D_m) / Float64(2.0 * d_m)) ^ 2.0))) <= 1e+306) tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(h / l) * (Float64(D_m * Float64(Float64(M_m / 2.0) / d_m)) ^ 2.0))))); else tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(h * (Float64((cbrt(Float64(0.5 * Float64(M_m * Float64(D_m / d_m)))) ^ 2.0) / cbrt(l)) ^ 3.0))))); end return tmp end
M_m = N[Abs[M], $MachinePrecision] D_m = N[Abs[D], $MachinePrecision] d_m = N[Abs[d], $MachinePrecision] code[w0_, M$95$m_, D$95$m_, h_, l_, d$95$m_] := If[LessEqual[N[(1.0 - N[(N[(h / l), $MachinePrecision] * N[Power[N[(N[(M$95$m * D$95$m), $MachinePrecision] / N[(2.0 * d$95$m), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+306], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(h / l), $MachinePrecision] * N[Power[N[(D$95$m * N[(N[(M$95$m / 2.0), $MachinePrecision] / d$95$m), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(w0 * N[Sqrt[N[(1.0 - N[(h * N[Power[N[(N[Power[N[Power[N[(0.5 * N[(M$95$m * N[(D$95$m / d$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
d_m = \left|d\right|
\\
\begin{array}{l}
\mathbf{if}\;1 - \frac{h}{\ell} \cdot {\left(\frac{M\_m \cdot D\_m}{2 \cdot d\_m}\right)}^{2} \leq 10^{+306}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{h}{\ell} \cdot {\left(D\_m \cdot \frac{\frac{M\_m}{2}}{d\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 - h \cdot {\left(\frac{{\left(\sqrt[3]{0.5 \cdot \left(M\_m \cdot \frac{D\_m}{d\_m}\right)}\right)}^{2}}{\sqrt[3]{\ell}}\right)}^{3}}\\
\end{array}
\end{array}
if (-.f64 #s(literal 1 binary64) (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l))) < 1.00000000000000002e306Initial program 99.6%
Simplified99.4%
if 1.00000000000000002e306 < (-.f64 #s(literal 1 binary64) (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l))) Initial program 36.8%
Simplified38.0%
clear-num38.0%
un-div-inv41.3%
*-commutative41.3%
associate-*l/40.0%
associate-*r/41.3%
div-inv41.3%
metadata-eval41.3%
Applied egg-rr41.3%
associate-/r/55.8%
associate-*r/55.7%
*-commutative55.7%
associate-/l*57.0%
associate-*r/57.0%
Simplified57.0%
add-cube-cbrt57.0%
pow357.0%
associate-*r*55.7%
Applied egg-rr55.7%
cbrt-div55.7%
associate-*r*57.0%
unpow257.0%
cbrt-prod63.3%
pow263.3%
*-commutative63.3%
associate-*r/63.3%
metadata-eval63.3%
div-inv63.3%
associate-/r/61.9%
div-inv61.8%
div-inv61.8%
metadata-eval61.8%
clear-num61.8%
associate-*l*61.8%
Applied egg-rr61.8%
associate-*r*61.8%
*-commutative61.8%
associate-*r*61.8%
Simplified61.8%
Final simplification88.4%
M_m = (fabs.f64 M)
D_m = (fabs.f64 D)
d_m = (fabs.f64 d)
(FPCore (w0 M_m D_m h l d_m)
:precision binary64
(if (<= (/ (* M_m D_m) (* 2.0 d_m)) 2e+163)
(*
w0
(sqrt
(-
1.0
(* (pow (cbrt (/ (pow (* (* M_m D_m) (/ 0.5 d_m)) 2.0) l)) 3.0) h))))
(pow
(*
(cbrt w0)
(exp
(*
0.16666666666666666
(+
(* -2.0 (log d_m))
(log (* 0.25 (/ (* h (pow (* M_m D_m) 2.0)) (- l))))))))
3.0)))M_m = fabs(M);
D_m = fabs(D);
d_m = fabs(d);
double code(double w0, double M_m, double D_m, double h, double l, double d_m) {
double tmp;
if (((M_m * D_m) / (2.0 * d_m)) <= 2e+163) {
tmp = w0 * sqrt((1.0 - (pow(cbrt((pow(((M_m * D_m) * (0.5 / d_m)), 2.0) / l)), 3.0) * h)));
} else {
tmp = pow((cbrt(w0) * exp((0.16666666666666666 * ((-2.0 * log(d_m)) + log((0.25 * ((h * pow((M_m * D_m), 2.0)) / -l))))))), 3.0);
}
return tmp;
}
M_m = Math.abs(M);
D_m = Math.abs(D);
d_m = Math.abs(d);
public static double code(double w0, double M_m, double D_m, double h, double l, double d_m) {
double tmp;
if (((M_m * D_m) / (2.0 * d_m)) <= 2e+163) {
tmp = w0 * Math.sqrt((1.0 - (Math.pow(Math.cbrt((Math.pow(((M_m * D_m) * (0.5 / d_m)), 2.0) / l)), 3.0) * h)));
} else {
tmp = Math.pow((Math.cbrt(w0) * Math.exp((0.16666666666666666 * ((-2.0 * Math.log(d_m)) + Math.log((0.25 * ((h * Math.pow((M_m * D_m), 2.0)) / -l))))))), 3.0);
}
return tmp;
}
M_m = abs(M) D_m = abs(D) d_m = abs(d) function code(w0, M_m, D_m, h, l, d_m) tmp = 0.0 if (Float64(Float64(M_m * D_m) / Float64(2.0 * d_m)) <= 2e+163) tmp = Float64(w0 * sqrt(Float64(1.0 - Float64((cbrt(Float64((Float64(Float64(M_m * D_m) * Float64(0.5 / d_m)) ^ 2.0) / l)) ^ 3.0) * h)))); else tmp = Float64(cbrt(w0) * exp(Float64(0.16666666666666666 * Float64(Float64(-2.0 * log(d_m)) + log(Float64(0.25 * Float64(Float64(h * (Float64(M_m * D_m) ^ 2.0)) / Float64(-l)))))))) ^ 3.0; end return tmp end
M_m = N[Abs[M], $MachinePrecision] D_m = N[Abs[D], $MachinePrecision] d_m = N[Abs[d], $MachinePrecision] code[w0_, M$95$m_, D$95$m_, h_, l_, d$95$m_] := If[LessEqual[N[(N[(M$95$m * D$95$m), $MachinePrecision] / N[(2.0 * d$95$m), $MachinePrecision]), $MachinePrecision], 2e+163], N[(w0 * N[Sqrt[N[(1.0 - N[(N[Power[N[Power[N[(N[Power[N[(N[(M$95$m * D$95$m), $MachinePrecision] * N[(0.5 / d$95$m), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / l), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision] * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Power[N[(N[Power[w0, 1/3], $MachinePrecision] * N[Exp[N[(0.16666666666666666 * N[(N[(-2.0 * N[Log[d$95$m], $MachinePrecision]), $MachinePrecision] + N[Log[N[(0.25 * N[(N[(h * N[Power[N[(M$95$m * D$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / (-l)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
d_m = \left|d\right|
\\
\begin{array}{l}
\mathbf{if}\;\frac{M\_m \cdot D\_m}{2 \cdot d\_m} \leq 2 \cdot 10^{+163}:\\
\;\;\;\;w0 \cdot \sqrt{1 - {\left(\sqrt[3]{\frac{{\left(\left(M\_m \cdot D\_m\right) \cdot \frac{0.5}{d\_m}\right)}^{2}}{\ell}}\right)}^{3} \cdot h}\\
\mathbf{else}:\\
\;\;\;\;{\left(\sqrt[3]{w0} \cdot e^{0.16666666666666666 \cdot \left(-2 \cdot \log d\_m + \log \left(0.25 \cdot \frac{h \cdot {\left(M\_m \cdot D\_m\right)}^{2}}{-\ell}\right)\right)}\right)}^{3}\\
\end{array}
\end{array}
if (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) < 1.9999999999999999e163Initial program 85.0%
Simplified85.2%
clear-num85.2%
un-div-inv86.3%
*-commutative86.3%
associate-*l/86.0%
associate-*r/85.4%
div-inv85.4%
metadata-eval85.4%
Applied egg-rr85.4%
associate-/r/89.6%
associate-*r/90.6%
*-commutative90.6%
associate-/l*90.9%
associate-*r/90.9%
Simplified90.9%
add-cube-cbrt90.9%
pow390.9%
associate-*r*90.6%
Applied egg-rr90.6%
if 1.9999999999999999e163 < (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) Initial program 44.9%
Simplified44.9%
add-cube-cbrt44.9%
pow344.9%
*-commutative44.9%
*-commutative44.9%
associate-*l/44.9%
associate-*r/44.9%
div-inv44.9%
metadata-eval44.9%
Applied egg-rr44.9%
Taylor expanded in d around 0 26.9%
pow126.9%
associate-*r*30.3%
unpow-prod-down33.9%
Applied egg-rr33.9%
unpow133.9%
*-commutative33.9%
Simplified33.9%
Final simplification85.3%
M_m = (fabs.f64 M)
D_m = (fabs.f64 D)
d_m = (fabs.f64 d)
(FPCore (w0 M_m D_m h l d_m)
:precision binary64
(if (<= (/ (* M_m D_m) (* 2.0 d_m)) 5e+131)
(*
w0
(sqrt
(-
1.0
(* (pow (cbrt (/ (pow (* (* M_m D_m) (/ 0.5 d_m)) 2.0) l)) 3.0) h))))
(pow
(*
(cbrt w0)
(*
(pow (* -0.25 (* (pow (* M_m D_m) 2.0) (/ h l))) 0.16666666666666666)
(exp (* (log d_m) -0.3333333333333333))))
3.0)))M_m = fabs(M);
D_m = fabs(D);
d_m = fabs(d);
double code(double w0, double M_m, double D_m, double h, double l, double d_m) {
double tmp;
if (((M_m * D_m) / (2.0 * d_m)) <= 5e+131) {
tmp = w0 * sqrt((1.0 - (pow(cbrt((pow(((M_m * D_m) * (0.5 / d_m)), 2.0) / l)), 3.0) * h)));
} else {
tmp = pow((cbrt(w0) * (pow((-0.25 * (pow((M_m * D_m), 2.0) * (h / l))), 0.16666666666666666) * exp((log(d_m) * -0.3333333333333333)))), 3.0);
}
return tmp;
}
M_m = Math.abs(M);
D_m = Math.abs(D);
d_m = Math.abs(d);
public static double code(double w0, double M_m, double D_m, double h, double l, double d_m) {
double tmp;
if (((M_m * D_m) / (2.0 * d_m)) <= 5e+131) {
tmp = w0 * Math.sqrt((1.0 - (Math.pow(Math.cbrt((Math.pow(((M_m * D_m) * (0.5 / d_m)), 2.0) / l)), 3.0) * h)));
} else {
tmp = Math.pow((Math.cbrt(w0) * (Math.pow((-0.25 * (Math.pow((M_m * D_m), 2.0) * (h / l))), 0.16666666666666666) * Math.exp((Math.log(d_m) * -0.3333333333333333)))), 3.0);
}
return tmp;
}
M_m = abs(M) D_m = abs(D) d_m = abs(d) function code(w0, M_m, D_m, h, l, d_m) tmp = 0.0 if (Float64(Float64(M_m * D_m) / Float64(2.0 * d_m)) <= 5e+131) tmp = Float64(w0 * sqrt(Float64(1.0 - Float64((cbrt(Float64((Float64(Float64(M_m * D_m) * Float64(0.5 / d_m)) ^ 2.0) / l)) ^ 3.0) * h)))); else tmp = Float64(cbrt(w0) * Float64((Float64(-0.25 * Float64((Float64(M_m * D_m) ^ 2.0) * Float64(h / l))) ^ 0.16666666666666666) * exp(Float64(log(d_m) * -0.3333333333333333)))) ^ 3.0; end return tmp end
M_m = N[Abs[M], $MachinePrecision] D_m = N[Abs[D], $MachinePrecision] d_m = N[Abs[d], $MachinePrecision] code[w0_, M$95$m_, D$95$m_, h_, l_, d$95$m_] := If[LessEqual[N[(N[(M$95$m * D$95$m), $MachinePrecision] / N[(2.0 * d$95$m), $MachinePrecision]), $MachinePrecision], 5e+131], N[(w0 * N[Sqrt[N[(1.0 - N[(N[Power[N[Power[N[(N[Power[N[(N[(M$95$m * D$95$m), $MachinePrecision] * N[(0.5 / d$95$m), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / l), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision] * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Power[N[(N[Power[w0, 1/3], $MachinePrecision] * N[(N[Power[N[(-0.25 * N[(N[Power[N[(M$95$m * D$95$m), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.16666666666666666], $MachinePrecision] * N[Exp[N[(N[Log[d$95$m], $MachinePrecision] * -0.3333333333333333), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
d_m = \left|d\right|
\\
\begin{array}{l}
\mathbf{if}\;\frac{M\_m \cdot D\_m}{2 \cdot d\_m} \leq 5 \cdot 10^{+131}:\\
\;\;\;\;w0 \cdot \sqrt{1 - {\left(\sqrt[3]{\frac{{\left(\left(M\_m \cdot D\_m\right) \cdot \frac{0.5}{d\_m}\right)}^{2}}{\ell}}\right)}^{3} \cdot h}\\
\mathbf{else}:\\
\;\;\;\;{\left(\sqrt[3]{w0} \cdot \left({\left(-0.25 \cdot \left({\left(M\_m \cdot D\_m\right)}^{2} \cdot \frac{h}{\ell}\right)\right)}^{0.16666666666666666} \cdot e^{\log d\_m \cdot -0.3333333333333333}\right)\right)}^{3}\\
\end{array}
\end{array}
if (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) < 4.99999999999999995e131Initial program 85.2%
Simplified85.5%
clear-num85.5%
un-div-inv86.5%
*-commutative86.5%
associate-*l/86.3%
associate-*r/85.6%
div-inv85.6%
metadata-eval85.6%
Applied egg-rr85.6%
associate-/r/89.9%
associate-*r/90.9%
*-commutative90.9%
associate-/l*91.2%
associate-*r/91.2%
Simplified91.2%
add-cube-cbrt91.2%
pow391.2%
associate-*r*90.9%
Applied egg-rr90.9%
if 4.99999999999999995e131 < (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) Initial program 47.3%
Simplified47.3%
add-cube-cbrt47.3%
pow347.3%
*-commutative47.3%
*-commutative47.3%
associate-*l/47.3%
associate-*r/47.3%
div-inv47.3%
metadata-eval47.3%
Applied egg-rr47.3%
Taylor expanded in d around 0 27.8%
exp-prod27.8%
unpow-prod-up27.8%
distribute-lft-neg-in27.8%
metadata-eval27.8%
associate-*r*30.5%
unpow-prod-down33.6%
Applied egg-rr33.6%
exp-prod33.6%
exp-prod34.1%
*-commutative34.1%
exp-to-pow34.1%
associate-/l*30.0%
associate-*r*30.0%
metadata-eval30.0%
Simplified30.0%
Final simplification84.5%
M_m = (fabs.f64 M) D_m = (fabs.f64 D) d_m = (fabs.f64 d) (FPCore (w0 M_m D_m h l d_m) :precision binary64 (if (<= D_m 1.95e+164) w0 (fma -0.125 (* (* h (/ w0 l)) (pow (* D_m (/ M_m d_m)) 2.0)) w0)))
M_m = fabs(M);
D_m = fabs(D);
d_m = fabs(d);
double code(double w0, double M_m, double D_m, double h, double l, double d_m) {
double tmp;
if (D_m <= 1.95e+164) {
tmp = w0;
} else {
tmp = fma(-0.125, ((h * (w0 / l)) * pow((D_m * (M_m / d_m)), 2.0)), w0);
}
return tmp;
}
M_m = abs(M) D_m = abs(D) d_m = abs(d) function code(w0, M_m, D_m, h, l, d_m) tmp = 0.0 if (D_m <= 1.95e+164) tmp = w0; else tmp = fma(-0.125, Float64(Float64(h * Float64(w0 / l)) * (Float64(D_m * Float64(M_m / d_m)) ^ 2.0)), w0); end return tmp end
M_m = N[Abs[M], $MachinePrecision] D_m = N[Abs[D], $MachinePrecision] d_m = N[Abs[d], $MachinePrecision] code[w0_, M$95$m_, D$95$m_, h_, l_, d$95$m_] := If[LessEqual[D$95$m, 1.95e+164], w0, N[(-0.125 * N[(N[(h * N[(w0 / l), $MachinePrecision]), $MachinePrecision] * N[Power[N[(D$95$m * N[(M$95$m / d$95$m), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + w0), $MachinePrecision]]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
d_m = \left|d\right|
\\
\begin{array}{l}
\mathbf{if}\;D\_m \leq 1.95 \cdot 10^{+164}:\\
\;\;\;\;w0\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-0.125, \left(h \cdot \frac{w0}{\ell}\right) \cdot {\left(D\_m \cdot \frac{M\_m}{d\_m}\right)}^{2}, w0\right)\\
\end{array}
\end{array}
if D < 1.94999999999999993e164Initial program 82.2%
Simplified82.1%
Taylor expanded in D around 0 73.9%
if 1.94999999999999993e164 < D Initial program 70.9%
Simplified75.0%
Taylor expanded in D around 0 17.8%
+-commutative17.8%
fma-define17.8%
associate-*r*18.0%
unpow218.0%
unpow218.0%
swap-sqr53.1%
unpow253.1%
Simplified53.1%
Taylor expanded in D around 0 17.8%
associate-*r*18.0%
unpow218.0%
unpow218.0%
swap-sqr53.1%
unpow253.1%
*-commutative53.1%
associate-*r/53.1%
associate-/r*57.4%
Simplified57.4%
Taylor expanded in D around 0 17.8%
associate-*r*18.0%
*-commutative18.0%
unpow218.0%
unpow218.0%
swap-sqr53.1%
unpow253.1%
*-commutative53.1%
times-frac57.4%
associate-*r/53.1%
unpow253.1%
unpow253.1%
times-frac66.6%
unpow166.6%
pow-plus66.6%
associate-/l*66.8%
metadata-eval66.8%
Simplified66.8%
Final simplification73.3%
M_m = (fabs.f64 M) D_m = (fabs.f64 D) d_m = (fabs.f64 d) (FPCore (w0 M_m D_m h l d_m) :precision binary64 (* w0 (sqrt (- 1.0 (* h (/ (pow (* D_m (* M_m (/ 0.5 d_m))) 2.0) l))))))
M_m = fabs(M);
D_m = fabs(D);
d_m = fabs(d);
double code(double w0, double M_m, double D_m, double h, double l, double d_m) {
return w0 * sqrt((1.0 - (h * (pow((D_m * (M_m * (0.5 / d_m))), 2.0) / l))));
}
M_m = abs(m)
D_m = abs(d)
d_m = abs(d)
real(8) function code(w0, m_m, d_m, h, l, d_m_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m_m
real(8), intent (in) :: d_m
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_m_1
code = w0 * sqrt((1.0d0 - (h * (((d_m * (m_m * (0.5d0 / d_m_1))) ** 2.0d0) / l))))
end function
M_m = Math.abs(M);
D_m = Math.abs(D);
d_m = Math.abs(d);
public static double code(double w0, double M_m, double D_m, double h, double l, double d_m) {
return w0 * Math.sqrt((1.0 - (h * (Math.pow((D_m * (M_m * (0.5 / d_m))), 2.0) / l))));
}
M_m = math.fabs(M) D_m = math.fabs(D) d_m = math.fabs(d) def code(w0, M_m, D_m, h, l, d_m): return w0 * math.sqrt((1.0 - (h * (math.pow((D_m * (M_m * (0.5 / d_m))), 2.0) / l))))
M_m = abs(M) D_m = abs(D) d_m = abs(d) function code(w0, M_m, D_m, h, l, d_m) return Float64(w0 * sqrt(Float64(1.0 - Float64(h * Float64((Float64(D_m * Float64(M_m * Float64(0.5 / d_m))) ^ 2.0) / l))))) end
M_m = abs(M); D_m = abs(D); d_m = abs(d); function tmp = code(w0, M_m, D_m, h, l, d_m) tmp = w0 * sqrt((1.0 - (h * (((D_m * (M_m * (0.5 / d_m))) ^ 2.0) / l)))); end
M_m = N[Abs[M], $MachinePrecision] D_m = N[Abs[D], $MachinePrecision] d_m = N[Abs[d], $MachinePrecision] code[w0_, M$95$m_, D$95$m_, h_, l_, d$95$m_] := N[(w0 * N[Sqrt[N[(1.0 - N[(h * N[(N[Power[N[(D$95$m * N[(M$95$m * N[(0.5 / d$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
d_m = \left|d\right|
\\
w0 \cdot \sqrt{1 - h \cdot \frac{{\left(D\_m \cdot \left(M\_m \cdot \frac{0.5}{d\_m}\right)\right)}^{2}}{\ell}}
\end{array}
Initial program 81.2%
Simplified81.4%
clear-num81.4%
un-div-inv82.4%
*-commutative82.4%
associate-*l/82.2%
associate-*r/81.6%
div-inv81.6%
metadata-eval81.6%
Applied egg-rr81.6%
associate-/r/85.8%
associate-*r/86.8%
*-commutative86.8%
associate-/l*87.0%
associate-*r/87.0%
Simplified87.0%
Final simplification87.0%
M_m = (fabs.f64 M) D_m = (fabs.f64 D) d_m = (fabs.f64 d) (FPCore (w0 M_m D_m h l d_m) :precision binary64 (if (<= M_m 1.1e+78) w0 (log (exp w0))))
M_m = fabs(M);
D_m = fabs(D);
d_m = fabs(d);
double code(double w0, double M_m, double D_m, double h, double l, double d_m) {
double tmp;
if (M_m <= 1.1e+78) {
tmp = w0;
} else {
tmp = log(exp(w0));
}
return tmp;
}
M_m = abs(m)
D_m = abs(d)
d_m = abs(d)
real(8) function code(w0, m_m, d_m, h, l, d_m_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m_m
real(8), intent (in) :: d_m
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_m_1
real(8) :: tmp
if (m_m <= 1.1d+78) then
tmp = w0
else
tmp = log(exp(w0))
end if
code = tmp
end function
M_m = Math.abs(M);
D_m = Math.abs(D);
d_m = Math.abs(d);
public static double code(double w0, double M_m, double D_m, double h, double l, double d_m) {
double tmp;
if (M_m <= 1.1e+78) {
tmp = w0;
} else {
tmp = Math.log(Math.exp(w0));
}
return tmp;
}
M_m = math.fabs(M) D_m = math.fabs(D) d_m = math.fabs(d) def code(w0, M_m, D_m, h, l, d_m): tmp = 0 if M_m <= 1.1e+78: tmp = w0 else: tmp = math.log(math.exp(w0)) return tmp
M_m = abs(M) D_m = abs(D) d_m = abs(d) function code(w0, M_m, D_m, h, l, d_m) tmp = 0.0 if (M_m <= 1.1e+78) tmp = w0; else tmp = log(exp(w0)); end return tmp end
M_m = abs(M); D_m = abs(D); d_m = abs(d); function tmp_2 = code(w0, M_m, D_m, h, l, d_m) tmp = 0.0; if (M_m <= 1.1e+78) tmp = w0; else tmp = log(exp(w0)); end tmp_2 = tmp; end
M_m = N[Abs[M], $MachinePrecision] D_m = N[Abs[D], $MachinePrecision] d_m = N[Abs[d], $MachinePrecision] code[w0_, M$95$m_, D$95$m_, h_, l_, d$95$m_] := If[LessEqual[M$95$m, 1.1e+78], w0, N[Log[N[Exp[w0], $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
d_m = \left|d\right|
\\
\begin{array}{l}
\mathbf{if}\;M\_m \leq 1.1 \cdot 10^{+78}:\\
\;\;\;\;w0\\
\mathbf{else}:\\
\;\;\;\;\log \left(e^{w0}\right)\\
\end{array}
\end{array}
if M < 1.10000000000000007e78Initial program 84.8%
Simplified84.6%
Taylor expanded in D around 0 76.7%
if 1.10000000000000007e78 < M Initial program 62.4%
Simplified64.7%
Applied egg-rr19.3%
associate-*l/19.8%
associate-/l*22.1%
associate-*r/19.8%
*-commutative19.8%
associate-/l*22.1%
associate-*r/22.1%
Simplified22.1%
Taylor expanded in h around 0 10.7%
sqrt-pow141.7%
metadata-eval41.7%
pow141.7%
add-log-exp18.3%
Applied egg-rr18.3%
Final simplification67.3%
M_m = (fabs.f64 M) D_m = (fabs.f64 D) d_m = (fabs.f64 d) (FPCore (w0 M_m D_m h l d_m) :precision binary64 w0)
M_m = fabs(M);
D_m = fabs(D);
d_m = fabs(d);
double code(double w0, double M_m, double D_m, double h, double l, double d_m) {
return w0;
}
M_m = abs(m)
D_m = abs(d)
d_m = abs(d)
real(8) function code(w0, m_m, d_m, h, l, d_m_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m_m
real(8), intent (in) :: d_m
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_m_1
code = w0
end function
M_m = Math.abs(M);
D_m = Math.abs(D);
d_m = Math.abs(d);
public static double code(double w0, double M_m, double D_m, double h, double l, double d_m) {
return w0;
}
M_m = math.fabs(M) D_m = math.fabs(D) d_m = math.fabs(d) def code(w0, M_m, D_m, h, l, d_m): return w0
M_m = abs(M) D_m = abs(D) d_m = abs(d) function code(w0, M_m, D_m, h, l, d_m) return w0 end
M_m = abs(M); D_m = abs(D); d_m = abs(d); function tmp = code(w0, M_m, D_m, h, l, d_m) tmp = w0; end
M_m = N[Abs[M], $MachinePrecision] D_m = N[Abs[D], $MachinePrecision] d_m = N[Abs[d], $MachinePrecision] code[w0_, M$95$m_, D$95$m_, h_, l_, d$95$m_] := w0
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
d_m = \left|d\right|
\\
w0
\end{array}
Initial program 81.2%
Simplified81.4%
Taylor expanded in D around 0 71.1%
Final simplification71.1%
herbie shell --seed 2024075
(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))))))