
(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 8 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 (<= (* (pow (/ (* M_m D_m) (* 2.0 d_m)) 2.0) (/ h l)) -5e+250)
(pow
(*
(cbrt w0)
(*
(* (pow (* h (/ -0.25 l)) 0.16666666666666666) (cbrt (* M_m D_m)))
(exp (* -0.3333333333333333 (log d_m)))))
3.0)
(*
w0
(sqrt
(-
1.0
(*
(* M_m (* D_m 0.5))
(/ h (* d_m (* l (* d_m (/ 2.0 (* M_m D_m))))))))))))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 ((pow(((M_m * D_m) / (2.0 * d_m)), 2.0) * (h / l)) <= -5e+250) {
tmp = pow((cbrt(w0) * ((pow((h * (-0.25 / l)), 0.16666666666666666) * cbrt((M_m * D_m))) * exp((-0.3333333333333333 * log(d_m))))), 3.0);
} else {
tmp = w0 * sqrt((1.0 - ((M_m * (D_m * 0.5)) * (h / (d_m * (l * (d_m * (2.0 / (M_m * D_m)))))))));
}
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 ((Math.pow(((M_m * D_m) / (2.0 * d_m)), 2.0) * (h / l)) <= -5e+250) {
tmp = Math.pow((Math.cbrt(w0) * ((Math.pow((h * (-0.25 / l)), 0.16666666666666666) * Math.cbrt((M_m * D_m))) * Math.exp((-0.3333333333333333 * Math.log(d_m))))), 3.0);
} else {
tmp = w0 * Math.sqrt((1.0 - ((M_m * (D_m * 0.5)) * (h / (d_m * (l * (d_m * (2.0 / (M_m * D_m)))))))));
}
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(Float64(M_m * D_m) / Float64(2.0 * d_m)) ^ 2.0) * Float64(h / l)) <= -5e+250) tmp = Float64(cbrt(w0) * Float64(Float64((Float64(h * Float64(-0.25 / l)) ^ 0.16666666666666666) * cbrt(Float64(M_m * D_m))) * exp(Float64(-0.3333333333333333 * log(d_m))))) ^ 3.0; else tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(M_m * Float64(D_m * 0.5)) * Float64(h / Float64(d_m * Float64(l * Float64(d_m * Float64(2.0 / Float64(M_m * D_m)))))))))); 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[Power[N[(N[(M$95$m * D$95$m), $MachinePrecision] / N[(2.0 * d$95$m), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision], -5e+250], N[Power[N[(N[Power[w0, 1/3], $MachinePrecision] * N[(N[(N[Power[N[(h * N[(-0.25 / l), $MachinePrecision]), $MachinePrecision], 0.16666666666666666], $MachinePrecision] * N[Power[N[(M$95$m * D$95$m), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(-0.3333333333333333 * N[Log[d$95$m], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(M$95$m * N[(D$95$m * 0.5), $MachinePrecision]), $MachinePrecision] * N[(h / N[(d$95$m * N[(l * N[(d$95$m * N[(2.0 / N[(M$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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}\;{\left(\frac{M\_m \cdot D\_m}{2 \cdot d\_m}\right)}^{2} \cdot \frac{h}{\ell} \leq -5 \cdot 10^{+250}:\\
\;\;\;\;{\left(\sqrt[3]{w0} \cdot \left(\left({\left(h \cdot \frac{-0.25}{\ell}\right)}^{0.16666666666666666} \cdot \sqrt[3]{M\_m \cdot D\_m}\right) \cdot e^{-0.3333333333333333 \cdot \log d\_m}\right)\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \left(M\_m \cdot \left(D\_m \cdot 0.5\right)\right) \cdot \frac{h}{d\_m \cdot \left(\ell \cdot \left(d\_m \cdot \frac{2}{M\_m \cdot D\_m}\right)\right)}}\\
\end{array}
\end{array}
if (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l)) < -5.0000000000000002e250Initial program 55.0%
Simplified56.3%
Applied egg-rr56.3%
Taylor expanded in d around 0 23.6%
exp-prod23.4%
unpow-prod-up23.4%
distribute-lft-neg-in23.4%
metadata-eval23.4%
associate-*r*22.3%
unpow-prod-down24.8%
*-commutative24.8%
Applied egg-rr24.8%
exp-prod24.8%
exp-prod25.1%
*-commutative25.1%
*-commutative25.1%
exp-to-pow25.1%
associate-/l*24.0%
*-commutative24.0%
*-commutative24.0%
associate-*r*24.0%
metadata-eval24.0%
Simplified24.0%
Taylor expanded in D around 0 14.8%
*-commutative14.8%
associate-/l*14.8%
Simplified14.8%
if -5.0000000000000002e250 < (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l)) Initial program 88.5%
Simplified89.1%
associate-*r/88.5%
unpow288.5%
clear-num88.5%
associate-/r*88.5%
frac-times88.0%
*-un-lft-identity88.0%
associate-/l*88.0%
div-inv88.0%
metadata-eval88.0%
*-commutative88.0%
associate-/l*88.0%
Applied egg-rr88.0%
frac-times93.9%
*-commutative93.9%
*-commutative93.9%
associate-*r/93.9%
*-commutative93.9%
Applied egg-rr93.9%
associate-/l*95.0%
associate-*l*96.6%
associate-/l*96.6%
*-commutative96.6%
Applied egg-rr96.6%
Final simplification73.6%
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 (<= (* (pow (/ (* M_m D_m) (* 2.0 d_m)) 2.0) (/ h l)) -5e+250)
(pow
(*
(cbrt w0)
(*
(pow (* -0.25 (* (/ h l) (pow (* M_m D_m) 2.0))) 0.16666666666666666)
(cbrt (/ 1.0 d_m))))
3.0)
(*
w0
(sqrt
(-
1.0
(*
(* M_m (* D_m 0.5))
(/ h (* d_m (* l (* d_m (/ 2.0 (* M_m D_m))))))))))))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 ((pow(((M_m * D_m) / (2.0 * d_m)), 2.0) * (h / l)) <= -5e+250) {
tmp = pow((cbrt(w0) * (pow((-0.25 * ((h / l) * pow((M_m * D_m), 2.0))), 0.16666666666666666) * cbrt((1.0 / d_m)))), 3.0);
} else {
tmp = w0 * sqrt((1.0 - ((M_m * (D_m * 0.5)) * (h / (d_m * (l * (d_m * (2.0 / (M_m * D_m)))))))));
}
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 ((Math.pow(((M_m * D_m) / (2.0 * d_m)), 2.0) * (h / l)) <= -5e+250) {
tmp = Math.pow((Math.cbrt(w0) * (Math.pow((-0.25 * ((h / l) * Math.pow((M_m * D_m), 2.0))), 0.16666666666666666) * Math.cbrt((1.0 / d_m)))), 3.0);
} else {
tmp = w0 * Math.sqrt((1.0 - ((M_m * (D_m * 0.5)) * (h / (d_m * (l * (d_m * (2.0 / (M_m * D_m)))))))));
}
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(Float64(M_m * D_m) / Float64(2.0 * d_m)) ^ 2.0) * Float64(h / l)) <= -5e+250) tmp = Float64(cbrt(w0) * Float64((Float64(-0.25 * Float64(Float64(h / l) * (Float64(M_m * D_m) ^ 2.0))) ^ 0.16666666666666666) * cbrt(Float64(1.0 / d_m)))) ^ 3.0; else tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(M_m * Float64(D_m * 0.5)) * Float64(h / Float64(d_m * Float64(l * Float64(d_m * Float64(2.0 / Float64(M_m * D_m)))))))))); 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[Power[N[(N[(M$95$m * D$95$m), $MachinePrecision] / N[(2.0 * d$95$m), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision], -5e+250], N[Power[N[(N[Power[w0, 1/3], $MachinePrecision] * N[(N[Power[N[(-0.25 * N[(N[(h / l), $MachinePrecision] * N[Power[N[(M$95$m * D$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.16666666666666666], $MachinePrecision] * N[Power[N[(1.0 / d$95$m), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(M$95$m * N[(D$95$m * 0.5), $MachinePrecision]), $MachinePrecision] * N[(h / N[(d$95$m * N[(l * N[(d$95$m * N[(2.0 / N[(M$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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}\;{\left(\frac{M\_m \cdot D\_m}{2 \cdot d\_m}\right)}^{2} \cdot \frac{h}{\ell} \leq -5 \cdot 10^{+250}:\\
\;\;\;\;{\left(\sqrt[3]{w0} \cdot \left({\left(-0.25 \cdot \left(\frac{h}{\ell} \cdot {\left(M\_m \cdot D\_m\right)}^{2}\right)\right)}^{0.16666666666666666} \cdot \sqrt[3]{\frac{1}{d\_m}}\right)\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \left(M\_m \cdot \left(D\_m \cdot 0.5\right)\right) \cdot \frac{h}{d\_m \cdot \left(\ell \cdot \left(d\_m \cdot \frac{2}{M\_m \cdot D\_m}\right)\right)}}\\
\end{array}
\end{array}
if (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l)) < -5.0000000000000002e250Initial program 55.0%
Simplified56.3%
Applied egg-rr56.3%
Taylor expanded in d around 0 23.6%
exp-prod23.4%
unpow-prod-up23.4%
distribute-lft-neg-in23.4%
metadata-eval23.4%
associate-*r*22.3%
unpow-prod-down24.8%
*-commutative24.8%
Applied egg-rr24.8%
exp-prod24.8%
exp-prod25.1%
*-commutative25.1%
*-commutative25.1%
exp-to-pow25.1%
associate-/l*24.0%
*-commutative24.0%
*-commutative24.0%
associate-*r*24.0%
metadata-eval24.0%
Simplified24.0%
Taylor expanded in d around 0 24.4%
if -5.0000000000000002e250 < (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l)) Initial program 88.5%
Simplified89.1%
associate-*r/88.5%
unpow288.5%
clear-num88.5%
associate-/r*88.5%
frac-times88.0%
*-un-lft-identity88.0%
associate-/l*88.0%
div-inv88.0%
metadata-eval88.0%
*-commutative88.0%
associate-/l*88.0%
Applied egg-rr88.0%
frac-times93.9%
*-commutative93.9%
*-commutative93.9%
associate-*r/93.9%
*-commutative93.9%
Applied egg-rr93.9%
associate-/l*95.0%
associate-*l*96.6%
associate-/l*96.6%
*-commutative96.6%
Applied egg-rr96.6%
Final simplification76.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 (<= (* (pow (/ (* M_m D_m) (* 2.0 d_m)) 2.0) (/ h l)) -5e+250)
(pow
(*
(cbrt w0)
(*
(pow (* -0.25 (* (/ h l) (pow (* M_m D_m) 2.0))) 0.16666666666666666)
(pow d_m -0.3333333333333333)))
3.0)
(*
w0
(sqrt
(-
1.0
(*
(* M_m (* D_m 0.5))
(/ h (* d_m (* l (* d_m (/ 2.0 (* M_m D_m))))))))))))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 ((pow(((M_m * D_m) / (2.0 * d_m)), 2.0) * (h / l)) <= -5e+250) {
tmp = pow((cbrt(w0) * (pow((-0.25 * ((h / l) * pow((M_m * D_m), 2.0))), 0.16666666666666666) * pow(d_m, -0.3333333333333333))), 3.0);
} else {
tmp = w0 * sqrt((1.0 - ((M_m * (D_m * 0.5)) * (h / (d_m * (l * (d_m * (2.0 / (M_m * D_m)))))))));
}
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 ((Math.pow(((M_m * D_m) / (2.0 * d_m)), 2.0) * (h / l)) <= -5e+250) {
tmp = Math.pow((Math.cbrt(w0) * (Math.pow((-0.25 * ((h / l) * Math.pow((M_m * D_m), 2.0))), 0.16666666666666666) * Math.pow(d_m, -0.3333333333333333))), 3.0);
} else {
tmp = w0 * Math.sqrt((1.0 - ((M_m * (D_m * 0.5)) * (h / (d_m * (l * (d_m * (2.0 / (M_m * D_m)))))))));
}
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(Float64(M_m * D_m) / Float64(2.0 * d_m)) ^ 2.0) * Float64(h / l)) <= -5e+250) tmp = Float64(cbrt(w0) * Float64((Float64(-0.25 * Float64(Float64(h / l) * (Float64(M_m * D_m) ^ 2.0))) ^ 0.16666666666666666) * (d_m ^ -0.3333333333333333))) ^ 3.0; else tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(M_m * Float64(D_m * 0.5)) * Float64(h / Float64(d_m * Float64(l * Float64(d_m * Float64(2.0 / Float64(M_m * D_m)))))))))); 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[Power[N[(N[(M$95$m * D$95$m), $MachinePrecision] / N[(2.0 * d$95$m), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision], -5e+250], N[Power[N[(N[Power[w0, 1/3], $MachinePrecision] * N[(N[Power[N[(-0.25 * N[(N[(h / l), $MachinePrecision] * N[Power[N[(M$95$m * D$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.16666666666666666], $MachinePrecision] * N[Power[d$95$m, -0.3333333333333333], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(M$95$m * N[(D$95$m * 0.5), $MachinePrecision]), $MachinePrecision] * N[(h / N[(d$95$m * N[(l * N[(d$95$m * N[(2.0 / N[(M$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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}\;{\left(\frac{M\_m \cdot D\_m}{2 \cdot d\_m}\right)}^{2} \cdot \frac{h}{\ell} \leq -5 \cdot 10^{+250}:\\
\;\;\;\;{\left(\sqrt[3]{w0} \cdot \left({\left(-0.25 \cdot \left(\frac{h}{\ell} \cdot {\left(M\_m \cdot D\_m\right)}^{2}\right)\right)}^{0.16666666666666666} \cdot {d\_m}^{-0.3333333333333333}\right)\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \left(M\_m \cdot \left(D\_m \cdot 0.5\right)\right) \cdot \frac{h}{d\_m \cdot \left(\ell \cdot \left(d\_m \cdot \frac{2}{M\_m \cdot D\_m}\right)\right)}}\\
\end{array}
\end{array}
if (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l)) < -5.0000000000000002e250Initial program 55.0%
Simplified56.3%
Applied egg-rr56.3%
Taylor expanded in d around 0 23.6%
exp-prod23.4%
unpow-prod-up23.4%
distribute-lft-neg-in23.4%
metadata-eval23.4%
associate-*r*22.3%
unpow-prod-down24.8%
*-commutative24.8%
Applied egg-rr24.8%
exp-prod24.8%
exp-prod25.1%
*-commutative25.1%
*-commutative25.1%
exp-to-pow25.1%
associate-/l*24.0%
*-commutative24.0%
*-commutative24.0%
associate-*r*24.0%
metadata-eval24.0%
Simplified24.0%
*-commutative24.0%
exp-to-pow24.0%
Applied egg-rr24.0%
if -5.0000000000000002e250 < (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l)) Initial program 88.5%
Simplified89.1%
associate-*r/88.5%
unpow288.5%
clear-num88.5%
associate-/r*88.5%
frac-times88.0%
*-un-lft-identity88.0%
associate-/l*88.0%
div-inv88.0%
metadata-eval88.0%
*-commutative88.0%
associate-/l*88.0%
Applied egg-rr88.0%
frac-times93.9%
*-commutative93.9%
*-commutative93.9%
associate-*r/93.9%
*-commutative93.9%
Applied egg-rr93.9%
associate-/l*95.0%
associate-*l*96.6%
associate-/l*96.6%
*-commutative96.6%
Applied egg-rr96.6%
Final simplification76.2%
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 (<= l 1e+53)
(* w0 (sqrt (- 1.0 (/ (* h (pow (* M_m (* 0.5 (/ D_m d_m))) 2.0)) l))))
(*
w0
(sqrt
(-
1.0
(*
(* M_m (* D_m 0.5))
(/ h (* d_m (* l (* d_m (/ 2.0 (* M_m D_m))))))))))))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 (l <= 1e+53) {
tmp = w0 * sqrt((1.0 - ((h * pow((M_m * (0.5 * (D_m / d_m))), 2.0)) / l)));
} else {
tmp = w0 * sqrt((1.0 - ((M_m * (D_m * 0.5)) * (h / (d_m * (l * (d_m * (2.0 / (M_m * D_m)))))))));
}
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 (l <= 1d+53) then
tmp = w0 * sqrt((1.0d0 - ((h * ((m_m * (0.5d0 * (d_m / d_m_1))) ** 2.0d0)) / l)))
else
tmp = w0 * sqrt((1.0d0 - ((m_m * (d_m * 0.5d0)) * (h / (d_m_1 * (l * (d_m_1 * (2.0d0 / (m_m * d_m)))))))))
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 (l <= 1e+53) {
tmp = w0 * Math.sqrt((1.0 - ((h * Math.pow((M_m * (0.5 * (D_m / d_m))), 2.0)) / l)));
} else {
tmp = w0 * Math.sqrt((1.0 - ((M_m * (D_m * 0.5)) * (h / (d_m * (l * (d_m * (2.0 / (M_m * D_m)))))))));
}
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 l <= 1e+53: tmp = w0 * math.sqrt((1.0 - ((h * math.pow((M_m * (0.5 * (D_m / d_m))), 2.0)) / l))) else: tmp = w0 * math.sqrt((1.0 - ((M_m * (D_m * 0.5)) * (h / (d_m * (l * (d_m * (2.0 / (M_m * D_m))))))))) 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 (l <= 1e+53) tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(h * (Float64(M_m * Float64(0.5 * Float64(D_m / d_m))) ^ 2.0)) / l)))); else tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(M_m * Float64(D_m * 0.5)) * Float64(h / Float64(d_m * Float64(l * Float64(d_m * Float64(2.0 / Float64(M_m * D_m)))))))))); 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 (l <= 1e+53) tmp = w0 * sqrt((1.0 - ((h * ((M_m * (0.5 * (D_m / d_m))) ^ 2.0)) / l))); else tmp = w0 * sqrt((1.0 - ((M_m * (D_m * 0.5)) * (h / (d_m * (l * (d_m * (2.0 / (M_m * D_m))))))))); 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[l, 1e+53], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(h * N[Power[N[(M$95$m * N[(0.5 * N[(D$95$m / d$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(M$95$m * N[(D$95$m * 0.5), $MachinePrecision]), $MachinePrecision] * N[(h / N[(d$95$m * N[(l * N[(d$95$m * N[(2.0 / N[(M$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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}\;\ell \leq 10^{+53}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{h \cdot {\left(M\_m \cdot \left(0.5 \cdot \frac{D\_m}{d\_m}\right)\right)}^{2}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \left(M\_m \cdot \left(D\_m \cdot 0.5\right)\right) \cdot \frac{h}{d\_m \cdot \left(\ell \cdot \left(d\_m \cdot \frac{2}{M\_m \cdot D\_m}\right)\right)}}\\
\end{array}
\end{array}
if l < 9.9999999999999999e52Initial program 80.1%
Simplified81.1%
associate-*r/87.5%
add-sqr-sqrt87.5%
pow287.5%
sqrt-pow187.5%
metadata-eval87.5%
pow187.5%
*-un-lft-identity87.5%
times-frac87.5%
metadata-eval87.5%
Applied egg-rr87.5%
if 9.9999999999999999e52 < l Initial program 75.0%
Simplified75.0%
associate-*r/75.0%
unpow275.0%
clear-num75.0%
associate-/r*75.0%
frac-times75.0%
*-un-lft-identity75.0%
associate-/l*75.0%
div-inv75.0%
metadata-eval75.0%
*-commutative75.0%
associate-/l*75.0%
Applied egg-rr75.0%
frac-times77.4%
*-commutative77.4%
*-commutative77.4%
associate-*r/77.4%
*-commutative77.4%
Applied egg-rr77.4%
associate-/l*79.2%
associate-*l*83.1%
associate-/l*83.2%
*-commutative83.2%
Applied egg-rr83.2%
Final simplification86.6%
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 (* 0.5 (* D_m (/ M_m d_m))) 2.0)) (/ -1.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((0.5 * (D_m * (M_m / d_m))), 2.0)) * (-1.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 * ((0.5d0 * (d_m * (m_m / d_m_1))) ** 2.0d0)) * ((-1.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((0.5 * (D_m * (M_m / d_m))), 2.0)) * (-1.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((0.5 * (D_m * (M_m / d_m))), 2.0)) * (-1.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(Float64(h * (Float64(0.5 * Float64(D_m * Float64(M_m / d_m))) ^ 2.0)) * Float64(-1.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 * ((0.5 * (D_m * (M_m / d_m))) ^ 2.0)) * (-1.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[(N[(h * N[Power[N[(0.5 * N[(D$95$m * N[(M$95$m / d$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(-1.0 / 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 + \left(h \cdot {\left(0.5 \cdot \left(D\_m \cdot \frac{M\_m}{d\_m}\right)\right)}^{2}\right) \cdot \frac{-1}{\ell}}
\end{array}
Initial program 79.1%
Simplified79.9%
associate-*r/85.1%
clear-num85.1%
add-sqr-sqrt85.1%
pow285.1%
sqrt-pow185.1%
metadata-eval85.1%
pow185.1%
*-un-lft-identity85.1%
times-frac85.1%
metadata-eval85.1%
Applied egg-rr85.1%
associate-/r/85.1%
*-commutative85.1%
*-commutative85.1%
associate-*l*85.1%
associate-*l/84.3%
associate-/l*85.1%
Simplified85.1%
Final simplification85.1%
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) 5e+14)
w0
(+
w0
(*
-0.125
(* (* (* M_m D_m) (/ (* M_m D_m) (pow d_m 2.0))) (/ (* h w0) 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) {
double tmp;
if ((M_m * D_m) <= 5e+14) {
tmp = w0;
} else {
tmp = w0 + (-0.125 * (((M_m * D_m) * ((M_m * D_m) / pow(d_m, 2.0))) * ((h * w0) / l)));
}
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 * d_m) <= 5d+14) then
tmp = w0
else
tmp = w0 + ((-0.125d0) * (((m_m * d_m) * ((m_m * d_m) / (d_m_1 ** 2.0d0))) * ((h * w0) / l)))
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 * D_m) <= 5e+14) {
tmp = w0;
} else {
tmp = w0 + (-0.125 * (((M_m * D_m) * ((M_m * D_m) / Math.pow(d_m, 2.0))) * ((h * w0) / l)));
}
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 * D_m) <= 5e+14: tmp = w0 else: tmp = w0 + (-0.125 * (((M_m * D_m) * ((M_m * D_m) / math.pow(d_m, 2.0))) * ((h * w0) / l))) 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(M_m * D_m) <= 5e+14) tmp = w0; else tmp = Float64(w0 + Float64(-0.125 * Float64(Float64(Float64(M_m * D_m) * Float64(Float64(M_m * D_m) / (d_m ^ 2.0))) * Float64(Float64(h * w0) / l)))); 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 * D_m) <= 5e+14) tmp = w0; else tmp = w0 + (-0.125 * (((M_m * D_m) * ((M_m * D_m) / (d_m ^ 2.0))) * ((h * w0) / l))); 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[N[(M$95$m * D$95$m), $MachinePrecision], 5e+14], w0, N[(w0 + N[(-0.125 * N[(N[(N[(M$95$m * D$95$m), $MachinePrecision] * N[(N[(M$95$m * D$95$m), $MachinePrecision] / N[Power[d$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(h * w0), $MachinePrecision] / l), $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}\;M\_m \cdot D\_m \leq 5 \cdot 10^{+14}:\\
\;\;\;\;w0\\
\mathbf{else}:\\
\;\;\;\;w0 + -0.125 \cdot \left(\left(\left(M\_m \cdot D\_m\right) \cdot \frac{M\_m \cdot D\_m}{{d\_m}^{2}}\right) \cdot \frac{h \cdot w0}{\ell}\right)\\
\end{array}
\end{array}
if (*.f64 M D) < 5e14Initial program 83.0%
Simplified84.0%
Taylor expanded in M around 0 74.5%
if 5e14 < (*.f64 M D) Initial program 62.5%
Simplified62.5%
Taylor expanded in M around 0 29.7%
+-commutative29.7%
fma-define29.7%
associate-*r*29.5%
*-commutative29.5%
unpow229.5%
unpow229.5%
swap-sqr37.7%
unpow237.7%
*-commutative37.7%
Simplified37.7%
fma-undefine37.7%
times-frac37.8%
Applied egg-rr37.8%
unpow237.8%
Applied egg-rr37.8%
associate-/l*48.4%
*-commutative48.4%
*-commutative48.4%
Applied egg-rr48.4%
Final simplification69.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
(*
w0
(sqrt
(-
1.0
(* (* M_m (* D_m 0.5)) (/ h (* d_m (* l (* d_m (/ 2.0 (* M_m D_m)))))))))))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 - ((M_m * (D_m * 0.5)) * (h / (d_m * (l * (d_m * (2.0 / (M_m * D_m)))))))));
}
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 - ((m_m * (d_m * 0.5d0)) * (h / (d_m_1 * (l * (d_m_1 * (2.0d0 / (m_m * d_m)))))))))
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 - ((M_m * (D_m * 0.5)) * (h / (d_m * (l * (d_m * (2.0 / (M_m * D_m)))))))));
}
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 - ((M_m * (D_m * 0.5)) * (h / (d_m * (l * (d_m * (2.0 / (M_m * D_m)))))))))
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(Float64(M_m * Float64(D_m * 0.5)) * Float64(h / Float64(d_m * Float64(l * Float64(d_m * Float64(2.0 / Float64(M_m * D_m)))))))))) 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 - ((M_m * (D_m * 0.5)) * (h / (d_m * (l * (d_m * (2.0 / (M_m * D_m))))))))); 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[(N[(M$95$m * N[(D$95$m * 0.5), $MachinePrecision]), $MachinePrecision] * N[(h / N[(d$95$m * N[(l * N[(d$95$m * N[(2.0 / N[(M$95$m * D$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 - \left(M\_m \cdot \left(D\_m \cdot 0.5\right)\right) \cdot \frac{h}{d\_m \cdot \left(\ell \cdot \left(d\_m \cdot \frac{2}{M\_m \cdot D\_m}\right)\right)}}
\end{array}
Initial program 79.1%
Simplified79.9%
associate-*r/79.1%
unpow279.1%
clear-num79.1%
associate-/r*79.1%
frac-times78.7%
*-un-lft-identity78.7%
associate-/l*78.7%
div-inv78.7%
metadata-eval78.7%
*-commutative78.7%
associate-/l*78.7%
Applied egg-rr78.7%
frac-times83.3%
*-commutative83.3%
*-commutative83.3%
associate-*r/83.3%
*-commutative83.3%
Applied egg-rr83.3%
associate-/l*83.7%
associate-*l*84.9%
associate-/l*84.9%
*-commutative84.9%
Applied egg-rr84.9%
Final simplification84.9%
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 79.1%
Simplified79.9%
Taylor expanded in M around 0 67.8%
herbie shell --seed 2024110
(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))))))