
(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 16 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}
NOTE: M and D should be sorted in increasing order before calling this function. (FPCore (w0 M D h l d) :precision binary64 (if (<= (* M D) -4e+195) (* w0 (sqrt (- 1.0 (* 0.25 (* (pow (/ D d) 2.0) (/ M (/ l (* M h)))))))) (* w0 (sqrt (- 1.0 (/ (* h (pow (* (/ M d) (* D 0.5)) 2.0)) l))))))
assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((M * D) <= -4e+195) {
tmp = w0 * sqrt((1.0 - (0.25 * (pow((D / d), 2.0) * (M / (l / (M * h)))))));
} else {
tmp = w0 * sqrt((1.0 - ((h * pow(((M / d) * (D * 0.5)), 2.0)) / l)));
}
return tmp;
}
NOTE: M and D should be sorted in increasing order before calling this function.
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 * d) <= (-4d+195)) then
tmp = w0 * sqrt((1.0d0 - (0.25d0 * (((d / d_1) ** 2.0d0) * (m / (l / (m * h)))))))
else
tmp = w0 * sqrt((1.0d0 - ((h * (((m / d_1) * (d * 0.5d0)) ** 2.0d0)) / l)))
end if
code = tmp
end function
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((M * D) <= -4e+195) {
tmp = w0 * Math.sqrt((1.0 - (0.25 * (Math.pow((D / d), 2.0) * (M / (l / (M * h)))))));
} else {
tmp = w0 * Math.sqrt((1.0 - ((h * Math.pow(((M / d) * (D * 0.5)), 2.0)) / l)));
}
return tmp;
}
[M, D] = sort([M, D]) def code(w0, M, D, h, l, d): tmp = 0 if (M * D) <= -4e+195: tmp = w0 * math.sqrt((1.0 - (0.25 * (math.pow((D / d), 2.0) * (M / (l / (M * h))))))) else: tmp = w0 * math.sqrt((1.0 - ((h * math.pow(((M / d) * (D * 0.5)), 2.0)) / l))) return tmp
M, D = sort([M, D]) function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64(M * D) <= -4e+195) tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(0.25 * Float64((Float64(D / d) ^ 2.0) * Float64(M / Float64(l / Float64(M * h)))))))); else tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(h * (Float64(Float64(M / d) * Float64(D * 0.5)) ^ 2.0)) / l)))); end return tmp end
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(w0, M, D, h, l, d)
tmp = 0.0;
if ((M * D) <= -4e+195)
tmp = w0 * sqrt((1.0 - (0.25 * (((D / d) ^ 2.0) * (M / (l / (M * h)))))));
else
tmp = w0 * sqrt((1.0 - ((h * (((M / d) * (D * 0.5)) ^ 2.0)) / l)));
end
tmp_2 = tmp;
end
NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(M * D), $MachinePrecision], -4e+195], N[(w0 * N[Sqrt[N[(1.0 - N[(0.25 * N[(N[Power[N[(D / d), $MachinePrecision], 2.0], $MachinePrecision] * N[(M / N[(l / N[(M * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(h * N[Power[N[(N[(M / d), $MachinePrecision] * N[(D * 0.5), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;M \cdot D \leq -4 \cdot 10^{+195}:\\
\;\;\;\;w0 \cdot \sqrt{1 - 0.25 \cdot \left({\left(\frac{D}{d}\right)}^{2} \cdot \frac{M}{\frac{\ell}{M \cdot h}}\right)}\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{h \cdot {\left(\frac{M}{d} \cdot \left(D \cdot 0.5\right)\right)}^{2}}{\ell}}\\
\end{array}
\end{array}
if (*.f64 M D) < -3.99999999999999991e195Initial program 42.4%
*-commutative42.4%
times-frac42.4%
Simplified42.4%
Taylor expanded in M around 0 28.7%
associate-*r/28.7%
*-commutative28.7%
times-frac29.5%
associate-*r*29.7%
unpow229.7%
associate-*l*33.8%
unpow233.8%
unpow233.8%
Simplified33.8%
associate-*r/33.8%
associate-*l*33.8%
*-commutative33.8%
Applied egg-rr33.8%
*-un-lft-identity33.8%
times-frac38.2%
*-commutative38.2%
Applied egg-rr38.2%
*-lft-identity38.2%
associate-/r*38.2%
associate-/l*42.3%
associate-/r/42.3%
*-commutative42.3%
*-commutative42.3%
associate-*r*42.3%
Simplified42.3%
Taylor expanded in l around 0 28.7%
times-frac29.5%
unpow229.5%
unpow229.5%
times-frac38.3%
unpow238.3%
unpow238.3%
associate-*r*38.3%
associate-/l*46.6%
*-commutative46.6%
Simplified46.6%
if -3.99999999999999991e195 < (*.f64 M D) Initial program 82.8%
*-commutative82.8%
times-frac82.8%
Simplified82.8%
*-commutative82.8%
frac-times82.8%
*-commutative82.8%
associate-*l/89.3%
*-commutative89.3%
frac-times89.7%
div-inv89.7%
metadata-eval89.7%
Applied egg-rr89.7%
Final simplification85.8%
NOTE: M and D should be sorted in increasing order before calling this function. (FPCore (w0 M D h l d) :precision binary64 (if (<= (* (pow (/ (* M D) (* d 2.0)) 2.0) (/ h l)) 0.02) (* w0 (sqrt (- 1.0 (* (/ h l) (pow (/ (* D 0.5) (/ d M)) 2.0))))) w0))
assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((pow(((M * D) / (d * 2.0)), 2.0) * (h / l)) <= 0.02) {
tmp = w0 * sqrt((1.0 - ((h / l) * pow(((D * 0.5) / (d / M)), 2.0))));
} else {
tmp = w0;
}
return tmp;
}
NOTE: M and D should be sorted in increasing order before calling this function.
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 * d) / (d_1 * 2.0d0)) ** 2.0d0) * (h / l)) <= 0.02d0) then
tmp = w0 * sqrt((1.0d0 - ((h / l) * (((d * 0.5d0) / (d_1 / m)) ** 2.0d0))))
else
tmp = w0
end if
code = tmp
end function
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((Math.pow(((M * D) / (d * 2.0)), 2.0) * (h / l)) <= 0.02) {
tmp = w0 * Math.sqrt((1.0 - ((h / l) * Math.pow(((D * 0.5) / (d / M)), 2.0))));
} else {
tmp = w0;
}
return tmp;
}
[M, D] = sort([M, D]) def code(w0, M, D, h, l, d): tmp = 0 if (math.pow(((M * D) / (d * 2.0)), 2.0) * (h / l)) <= 0.02: tmp = w0 * math.sqrt((1.0 - ((h / l) * math.pow(((D * 0.5) / (d / M)), 2.0)))) else: tmp = w0 return tmp
M, D = sort([M, D]) function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64((Float64(Float64(M * D) / Float64(d * 2.0)) ^ 2.0) * Float64(h / l)) <= 0.02) tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(h / l) * (Float64(Float64(D * 0.5) / Float64(d / M)) ^ 2.0))))); else tmp = w0; end return tmp end
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(w0, M, D, h, l, d)
tmp = 0.0;
if (((((M * D) / (d * 2.0)) ^ 2.0) * (h / l)) <= 0.02)
tmp = w0 * sqrt((1.0 - ((h / l) * (((D * 0.5) / (d / M)) ^ 2.0))));
else
tmp = w0;
end
tmp_2 = tmp;
end
NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision], 0.02], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(h / l), $MachinePrecision] * N[Power[N[(N[(D * 0.5), $MachinePrecision] / N[(d / M), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], w0]
\begin{array}{l}
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;{\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot \frac{h}{\ell} \leq 0.02:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{h}{\ell} \cdot {\left(\frac{D \cdot 0.5}{\frac{d}{M}}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\end{array}
if (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2) (/.f64 h l)) < 0.0200000000000000004Initial program 86.2%
*-commutative86.2%
times-frac86.2%
Simplified86.2%
*-commutative86.2%
clear-num86.2%
un-div-inv86.7%
div-inv86.7%
metadata-eval86.7%
Applied egg-rr86.7%
if 0.0200000000000000004 < (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2) (/.f64 h l)) Initial program 0.0%
*-commutative0.0%
times-frac0.1%
Simplified0.1%
Taylor expanded in M around 0 73.4%
Final simplification85.6%
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (w0 M D h l d)
:precision binary64
(if (<= (/ h l) (- INFINITY))
(* w0 (sqrt (- 1.0 (/ (* (* D (* D h)) (/ 0.25 l)) (* (/ d M) (/ d M))))))
(if (<= (/ h l) -1e-166)
(* w0 (sqrt (- 1.0 (* (/ h l) (pow (* (* M D) (/ 0.5 d)) 2.0)))))
w0)))assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((h / l) <= -((double) INFINITY)) {
tmp = w0 * sqrt((1.0 - (((D * (D * h)) * (0.25 / l)) / ((d / M) * (d / M)))));
} else if ((h / l) <= -1e-166) {
tmp = w0 * sqrt((1.0 - ((h / l) * pow(((M * D) * (0.5 / d)), 2.0))));
} else {
tmp = w0;
}
return tmp;
}
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((h / l) <= -Double.POSITIVE_INFINITY) {
tmp = w0 * Math.sqrt((1.0 - (((D * (D * h)) * (0.25 / l)) / ((d / M) * (d / M)))));
} else if ((h / l) <= -1e-166) {
tmp = w0 * Math.sqrt((1.0 - ((h / l) * Math.pow(((M * D) * (0.5 / d)), 2.0))));
} else {
tmp = w0;
}
return tmp;
}
[M, D] = sort([M, D]) def code(w0, M, D, h, l, d): tmp = 0 if (h / l) <= -math.inf: tmp = w0 * math.sqrt((1.0 - (((D * (D * h)) * (0.25 / l)) / ((d / M) * (d / M))))) elif (h / l) <= -1e-166: tmp = w0 * math.sqrt((1.0 - ((h / l) * math.pow(((M * D) * (0.5 / d)), 2.0)))) else: tmp = w0 return tmp
M, D = sort([M, D]) function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64(h / l) <= Float64(-Inf)) tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(Float64(D * Float64(D * h)) * Float64(0.25 / l)) / Float64(Float64(d / M) * Float64(d / M)))))); elseif (Float64(h / l) <= -1e-166) tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(h / l) * (Float64(Float64(M * D) * Float64(0.5 / d)) ^ 2.0))))); else tmp = w0; end return tmp end
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(w0, M, D, h, l, d)
tmp = 0.0;
if ((h / l) <= -Inf)
tmp = w0 * sqrt((1.0 - (((D * (D * h)) * (0.25 / l)) / ((d / M) * (d / M)))));
elseif ((h / l) <= -1e-166)
tmp = w0 * sqrt((1.0 - ((h / l) * (((M * D) * (0.5 / d)) ^ 2.0))));
else
tmp = w0;
end
tmp_2 = tmp;
end
NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(h / l), $MachinePrecision], (-Infinity)], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(N[(D * N[(D * h), $MachinePrecision]), $MachinePrecision] * N[(0.25 / l), $MachinePrecision]), $MachinePrecision] / N[(N[(d / M), $MachinePrecision] * N[(d / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(h / l), $MachinePrecision], -1e-166], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(h / l), $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] * N[(0.5 / d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], w0]]
\begin{array}{l}
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{h}{\ell} \leq -\infty:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{\left(D \cdot \left(D \cdot h\right)\right) \cdot \frac{0.25}{\ell}}{\frac{d}{M} \cdot \frac{d}{M}}}\\
\mathbf{elif}\;\frac{h}{\ell} \leq -1 \cdot 10^{-166}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{h}{\ell} \cdot {\left(\left(M \cdot D\right) \cdot \frac{0.5}{d}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\end{array}
if (/.f64 h l) < -inf.0Initial program 43.2%
*-commutative43.2%
times-frac43.3%
Simplified43.3%
Taylor expanded in M around 0 50.9%
associate-*r/50.9%
*-commutative50.9%
times-frac55.6%
associate-*r*51.1%
unpow251.1%
associate-*l*55.2%
unpow255.2%
unpow255.2%
Simplified55.2%
*-un-lft-identity55.2%
*-commutative55.2%
associate-/l*55.2%
*-commutative55.2%
Applied egg-rr55.2%
Simplified69.6%
if -inf.0 < (/.f64 h l) < -1.00000000000000004e-166Initial program 81.1%
associate-/l*82.0%
Simplified82.0%
associate-/l*81.1%
clear-num81.0%
associate-/r/81.1%
associate-/r*81.1%
metadata-eval81.1%
Applied egg-rr81.1%
if -1.00000000000000004e-166 < (/.f64 h l) Initial program 84.3%
*-commutative84.3%
times-frac85.0%
Simplified85.0%
Taylor expanded in M around 0 90.8%
Final simplification84.9%
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (w0 M D h l d)
:precision binary64
(if (<= (/ h l) (- INFINITY))
(* w0 (sqrt (- 1.0 (/ (* (* D (* D h)) (/ 0.25 l)) (* (/ d M) (/ d M))))))
(if (<= (/ h l) -5e-296)
(* w0 (sqrt (- 1.0 (* (/ h l) (pow (* (/ M d) (/ D 2.0)) 2.0)))))
w0)))assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((h / l) <= -((double) INFINITY)) {
tmp = w0 * sqrt((1.0 - (((D * (D * h)) * (0.25 / l)) / ((d / M) * (d / M)))));
} else if ((h / l) <= -5e-296) {
tmp = w0 * sqrt((1.0 - ((h / l) * pow(((M / d) * (D / 2.0)), 2.0))));
} else {
tmp = w0;
}
return tmp;
}
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((h / l) <= -Double.POSITIVE_INFINITY) {
tmp = w0 * Math.sqrt((1.0 - (((D * (D * h)) * (0.25 / l)) / ((d / M) * (d / M)))));
} else if ((h / l) <= -5e-296) {
tmp = w0 * Math.sqrt((1.0 - ((h / l) * Math.pow(((M / d) * (D / 2.0)), 2.0))));
} else {
tmp = w0;
}
return tmp;
}
[M, D] = sort([M, D]) def code(w0, M, D, h, l, d): tmp = 0 if (h / l) <= -math.inf: tmp = w0 * math.sqrt((1.0 - (((D * (D * h)) * (0.25 / l)) / ((d / M) * (d / M))))) elif (h / l) <= -5e-296: tmp = w0 * math.sqrt((1.0 - ((h / l) * math.pow(((M / d) * (D / 2.0)), 2.0)))) else: tmp = w0 return tmp
M, D = sort([M, D]) function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64(h / l) <= Float64(-Inf)) tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(Float64(D * Float64(D * h)) * Float64(0.25 / l)) / Float64(Float64(d / M) * Float64(d / M)))))); elseif (Float64(h / l) <= -5e-296) tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(h / l) * (Float64(Float64(M / d) * Float64(D / 2.0)) ^ 2.0))))); else tmp = w0; end return tmp end
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(w0, M, D, h, l, d)
tmp = 0.0;
if ((h / l) <= -Inf)
tmp = w0 * sqrt((1.0 - (((D * (D * h)) * (0.25 / l)) / ((d / M) * (d / M)))));
elseif ((h / l) <= -5e-296)
tmp = w0 * sqrt((1.0 - ((h / l) * (((M / d) * (D / 2.0)) ^ 2.0))));
else
tmp = w0;
end
tmp_2 = tmp;
end
NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(h / l), $MachinePrecision], (-Infinity)], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(N[(D * N[(D * h), $MachinePrecision]), $MachinePrecision] * N[(0.25 / l), $MachinePrecision]), $MachinePrecision] / N[(N[(d / M), $MachinePrecision] * N[(d / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(h / l), $MachinePrecision], -5e-296], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(h / l), $MachinePrecision] * N[Power[N[(N[(M / d), $MachinePrecision] * N[(D / 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], w0]]
\begin{array}{l}
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{h}{\ell} \leq -\infty:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{\left(D \cdot \left(D \cdot h\right)\right) \cdot \frac{0.25}{\ell}}{\frac{d}{M} \cdot \frac{d}{M}}}\\
\mathbf{elif}\;\frac{h}{\ell} \leq -5 \cdot 10^{-296}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{h}{\ell} \cdot {\left(\frac{M}{d} \cdot \frac{D}{2}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\end{array}
if (/.f64 h l) < -inf.0Initial program 43.2%
*-commutative43.2%
times-frac43.3%
Simplified43.3%
Taylor expanded in M around 0 50.9%
associate-*r/50.9%
*-commutative50.9%
times-frac55.6%
associate-*r*51.1%
unpow251.1%
associate-*l*55.2%
unpow255.2%
unpow255.2%
Simplified55.2%
*-un-lft-identity55.2%
*-commutative55.2%
associate-/l*55.2%
*-commutative55.2%
Applied egg-rr55.2%
Simplified69.6%
if -inf.0 < (/.f64 h l) < -5.0000000000000003e-296Initial program 78.3%
*-commutative78.3%
times-frac79.0%
Simplified79.0%
if -5.0000000000000003e-296 < (/.f64 h l) Initial program 88.1%
*-commutative88.1%
times-frac87.2%
Simplified87.2%
Taylor expanded in M around 0 95.0%
Final simplification84.9%
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (w0 M D h l d)
:precision binary64
(if (<= (/ h l) -1e+306)
(* w0 (sqrt (- 1.0 (/ (* (* D (* D h)) (/ 0.25 l)) (* (/ d M) (/ d M))))))
(if (<= (/ h l) -5e-296)
(* w0 (sqrt (- 1.0 (* (/ h l) (pow (/ M (/ (* d 2.0) D)) 2.0)))))
w0)))assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((h / l) <= -1e+306) {
tmp = w0 * sqrt((1.0 - (((D * (D * h)) * (0.25 / l)) / ((d / M) * (d / M)))));
} else if ((h / l) <= -5e-296) {
tmp = w0 * sqrt((1.0 - ((h / l) * pow((M / ((d * 2.0) / D)), 2.0))));
} else {
tmp = w0;
}
return tmp;
}
NOTE: M and D should be sorted in increasing order before calling this function.
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+306)) then
tmp = w0 * sqrt((1.0d0 - (((d * (d * h)) * (0.25d0 / l)) / ((d_1 / m) * (d_1 / m)))))
else if ((h / l) <= (-5d-296)) then
tmp = w0 * sqrt((1.0d0 - ((h / l) * ((m / ((d_1 * 2.0d0) / d)) ** 2.0d0))))
else
tmp = w0
end if
code = tmp
end function
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((h / l) <= -1e+306) {
tmp = w0 * Math.sqrt((1.0 - (((D * (D * h)) * (0.25 / l)) / ((d / M) * (d / M)))));
} else if ((h / l) <= -5e-296) {
tmp = w0 * Math.sqrt((1.0 - ((h / l) * Math.pow((M / ((d * 2.0) / D)), 2.0))));
} else {
tmp = w0;
}
return tmp;
}
[M, D] = sort([M, D]) def code(w0, M, D, h, l, d): tmp = 0 if (h / l) <= -1e+306: tmp = w0 * math.sqrt((1.0 - (((D * (D * h)) * (0.25 / l)) / ((d / M) * (d / M))))) elif (h / l) <= -5e-296: tmp = w0 * math.sqrt((1.0 - ((h / l) * math.pow((M / ((d * 2.0) / D)), 2.0)))) else: tmp = w0 return tmp
M, D = sort([M, D]) function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64(h / l) <= -1e+306) tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(Float64(D * Float64(D * h)) * Float64(0.25 / l)) / Float64(Float64(d / M) * Float64(d / M)))))); elseif (Float64(h / l) <= -5e-296) tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(h / l) * (Float64(M / Float64(Float64(d * 2.0) / D)) ^ 2.0))))); else tmp = w0; end return tmp end
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(w0, M, D, h, l, d)
tmp = 0.0;
if ((h / l) <= -1e+306)
tmp = w0 * sqrt((1.0 - (((D * (D * h)) * (0.25 / l)) / ((d / M) * (d / M)))));
elseif ((h / l) <= -5e-296)
tmp = w0 * sqrt((1.0 - ((h / l) * ((M / ((d * 2.0) / D)) ^ 2.0))));
else
tmp = w0;
end
tmp_2 = tmp;
end
NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(h / l), $MachinePrecision], -1e+306], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(N[(D * N[(D * h), $MachinePrecision]), $MachinePrecision] * N[(0.25 / l), $MachinePrecision]), $MachinePrecision] / N[(N[(d / M), $MachinePrecision] * N[(d / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(h / l), $MachinePrecision], -5e-296], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(h / l), $MachinePrecision] * N[Power[N[(M / N[(N[(d * 2.0), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], w0]]
\begin{array}{l}
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{h}{\ell} \leq -1 \cdot 10^{+306}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{\left(D \cdot \left(D \cdot h\right)\right) \cdot \frac{0.25}{\ell}}{\frac{d}{M} \cdot \frac{d}{M}}}\\
\mathbf{elif}\;\frac{h}{\ell} \leq -5 \cdot 10^{-296}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{h}{\ell} \cdot {\left(\frac{M}{\frac{d \cdot 2}{D}}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\end{array}
if (/.f64 h l) < -1.00000000000000002e306Initial program 41.6%
*-commutative41.6%
times-frac41.7%
Simplified41.7%
Taylor expanded in M around 0 49.0%
associate-*r/49.0%
*-commutative49.0%
times-frac53.5%
associate-*r*49.2%
unpow249.2%
associate-*l*53.2%
unpow253.2%
unpow253.2%
Simplified53.2%
*-un-lft-identity53.2%
*-commutative53.2%
associate-/l*53.2%
*-commutative53.2%
Applied egg-rr53.2%
Simplified67.0%
if -1.00000000000000002e306 < (/.f64 h l) < -5.0000000000000003e-296Initial program 78.9%
associate-/l*81.2%
Simplified81.2%
if -5.0000000000000003e-296 < (/.f64 h l) Initial program 88.1%
*-commutative88.1%
times-frac87.2%
Simplified87.2%
Taylor expanded in M around 0 95.0%
Final simplification85.7%
NOTE: M and D should be sorted in increasing order before calling this function. (FPCore (w0 M D h l d) :precision binary64 (* w0 (sqrt (- 1.0 (/ (* h (pow (* (/ M d) (* D 0.5)) 2.0)) l)))))
assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
return w0 * sqrt((1.0 - ((h * pow(((M / d) * (D * 0.5)), 2.0)) / l)));
}
NOTE: M and D should be sorted in increasing order before calling this function.
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 - ((h * (((m / d_1) * (d * 0.5d0)) ** 2.0d0)) / l)))
end function
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
return w0 * Math.sqrt((1.0 - ((h * Math.pow(((M / d) * (D * 0.5)), 2.0)) / l)));
}
[M, D] = sort([M, D]) def code(w0, M, D, h, l, d): return w0 * math.sqrt((1.0 - ((h * math.pow(((M / d) * (D * 0.5)), 2.0)) / l)))
M, D = sort([M, D]) function code(w0, M, D, h, l, d) return Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(h * (Float64(Float64(M / d) * Float64(D * 0.5)) ^ 2.0)) / l)))) end
M, D = num2cell(sort([M, D])){:}
function tmp = code(w0, M, D, h, l, d)
tmp = w0 * sqrt((1.0 - ((h * (((M / d) * (D * 0.5)) ^ 2.0)) / l)));
end
NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := N[(w0 * N[Sqrt[N[(1.0 - N[(N[(h * N[Power[N[(N[(M / d), $MachinePrecision] * N[(D * 0.5), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[M, D] = \mathsf{sort}([M, D])\\
\\
w0 \cdot \sqrt{1 - \frac{h \cdot {\left(\frac{M}{d} \cdot \left(D \cdot 0.5\right)\right)}^{2}}{\ell}}
\end{array}
Initial program 79.2%
*-commutative79.2%
times-frac79.1%
Simplified79.1%
*-commutative79.1%
frac-times79.2%
*-commutative79.2%
associate-*l/84.8%
*-commutative84.8%
frac-times85.1%
div-inv85.1%
metadata-eval85.1%
Applied egg-rr85.1%
Final simplification85.1%
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (w0 M D h l d)
:precision binary64
(if (<= M -1e+102)
(+ w0 (* w0 (* -0.125 (* D (* (/ D l) (* (/ M d) (* M (/ h d))))))))
(if (<= M -2e-161)
(* w0 (sqrt (- 1.0 (* (/ 0.25 (* d l)) (* (/ D d) (* D (* h (* M M))))))))
(if (<= M 7e-203)
(* w0 (+ 1.0 (* (/ -0.125 l) (* D (* D (/ (* (/ M d) (* M h)) d))))))
(*
w0
(sqrt
(+ 1.0 (* (* D (* (/ D l) (* (/ (* M M) d) (/ h d)))) -0.25))))))))assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (M <= -1e+102) {
tmp = w0 + (w0 * (-0.125 * (D * ((D / l) * ((M / d) * (M * (h / d)))))));
} else if (M <= -2e-161) {
tmp = w0 * sqrt((1.0 - ((0.25 / (d * l)) * ((D / d) * (D * (h * (M * M)))))));
} else if (M <= 7e-203) {
tmp = w0 * (1.0 + ((-0.125 / l) * (D * (D * (((M / d) * (M * h)) / d)))));
} else {
tmp = w0 * sqrt((1.0 + ((D * ((D / l) * (((M * M) / d) * (h / d)))) * -0.25)));
}
return tmp;
}
NOTE: M and D should be sorted in increasing order before calling this function.
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 <= (-1d+102)) then
tmp = w0 + (w0 * ((-0.125d0) * (d * ((d / l) * ((m / d_1) * (m * (h / d_1)))))))
else if (m <= (-2d-161)) then
tmp = w0 * sqrt((1.0d0 - ((0.25d0 / (d_1 * l)) * ((d / d_1) * (d * (h * (m * m)))))))
else if (m <= 7d-203) then
tmp = w0 * (1.0d0 + (((-0.125d0) / l) * (d * (d * (((m / d_1) * (m * h)) / d_1)))))
else
tmp = w0 * sqrt((1.0d0 + ((d * ((d / l) * (((m * m) / d_1) * (h / d_1)))) * (-0.25d0))))
end if
code = tmp
end function
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (M <= -1e+102) {
tmp = w0 + (w0 * (-0.125 * (D * ((D / l) * ((M / d) * (M * (h / d)))))));
} else if (M <= -2e-161) {
tmp = w0 * Math.sqrt((1.0 - ((0.25 / (d * l)) * ((D / d) * (D * (h * (M * M)))))));
} else if (M <= 7e-203) {
tmp = w0 * (1.0 + ((-0.125 / l) * (D * (D * (((M / d) * (M * h)) / d)))));
} else {
tmp = w0 * Math.sqrt((1.0 + ((D * ((D / l) * (((M * M) / d) * (h / d)))) * -0.25)));
}
return tmp;
}
[M, D] = sort([M, D]) def code(w0, M, D, h, l, d): tmp = 0 if M <= -1e+102: tmp = w0 + (w0 * (-0.125 * (D * ((D / l) * ((M / d) * (M * (h / d))))))) elif M <= -2e-161: tmp = w0 * math.sqrt((1.0 - ((0.25 / (d * l)) * ((D / d) * (D * (h * (M * M))))))) elif M <= 7e-203: tmp = w0 * (1.0 + ((-0.125 / l) * (D * (D * (((M / d) * (M * h)) / d))))) else: tmp = w0 * math.sqrt((1.0 + ((D * ((D / l) * (((M * M) / d) * (h / d)))) * -0.25))) return tmp
M, D = sort([M, D]) function code(w0, M, D, h, l, d) tmp = 0.0 if (M <= -1e+102) tmp = Float64(w0 + Float64(w0 * Float64(-0.125 * Float64(D * Float64(Float64(D / l) * Float64(Float64(M / d) * Float64(M * Float64(h / d)))))))); elseif (M <= -2e-161) tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(0.25 / Float64(d * l)) * Float64(Float64(D / d) * Float64(D * Float64(h * Float64(M * M)))))))); elseif (M <= 7e-203) tmp = Float64(w0 * Float64(1.0 + Float64(Float64(-0.125 / l) * Float64(D * Float64(D * Float64(Float64(Float64(M / d) * Float64(M * h)) / d)))))); else tmp = Float64(w0 * sqrt(Float64(1.0 + Float64(Float64(D * Float64(Float64(D / l) * Float64(Float64(Float64(M * M) / d) * Float64(h / d)))) * -0.25)))); end return tmp end
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(w0, M, D, h, l, d)
tmp = 0.0;
if (M <= -1e+102)
tmp = w0 + (w0 * (-0.125 * (D * ((D / l) * ((M / d) * (M * (h / d)))))));
elseif (M <= -2e-161)
tmp = w0 * sqrt((1.0 - ((0.25 / (d * l)) * ((D / d) * (D * (h * (M * M)))))));
elseif (M <= 7e-203)
tmp = w0 * (1.0 + ((-0.125 / l) * (D * (D * (((M / d) * (M * h)) / d)))));
else
tmp = w0 * sqrt((1.0 + ((D * ((D / l) * (((M * M) / d) * (h / d)))) * -0.25)));
end
tmp_2 = tmp;
end
NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[M, -1e+102], N[(w0 + N[(w0 * N[(-0.125 * N[(D * N[(N[(D / l), $MachinePrecision] * N[(N[(M / d), $MachinePrecision] * N[(M * N[(h / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[M, -2e-161], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(0.25 / N[(d * l), $MachinePrecision]), $MachinePrecision] * N[(N[(D / d), $MachinePrecision] * N[(D * N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[M, 7e-203], N[(w0 * N[(1.0 + N[(N[(-0.125 / l), $MachinePrecision] * N[(D * N[(D * N[(N[(N[(M / d), $MachinePrecision] * N[(M * h), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(w0 * N[Sqrt[N[(1.0 + N[(N[(D * N[(N[(D / l), $MachinePrecision] * N[(N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision] * N[(h / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;M \leq -1 \cdot 10^{+102}:\\
\;\;\;\;w0 + w0 \cdot \left(-0.125 \cdot \left(D \cdot \left(\frac{D}{\ell} \cdot \left(\frac{M}{d} \cdot \left(M \cdot \frac{h}{d}\right)\right)\right)\right)\right)\\
\mathbf{elif}\;M \leq -2 \cdot 10^{-161}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{0.25}{d \cdot \ell} \cdot \left(\frac{D}{d} \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)}\\
\mathbf{elif}\;M \leq 7 \cdot 10^{-203}:\\
\;\;\;\;w0 \cdot \left(1 + \frac{-0.125}{\ell} \cdot \left(D \cdot \left(D \cdot \frac{\frac{M}{d} \cdot \left(M \cdot h\right)}{d}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 + \left(D \cdot \left(\frac{D}{\ell} \cdot \left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right)\right)\right) \cdot -0.25}\\
\end{array}
\end{array}
if M < -9.99999999999999977e101Initial program 60.3%
*-commutative60.3%
times-frac57.1%
Simplified57.1%
Taylor expanded in M around 0 24.2%
associate-*r/24.2%
*-commutative24.2%
associate-*r/24.2%
*-commutative24.2%
times-frac24.0%
unpow224.0%
*-commutative24.0%
unpow224.0%
unpow224.0%
Simplified24.0%
Taylor expanded in D around 0 24.2%
*-commutative24.2%
times-frac24.0%
unpow224.0%
unpow224.0%
times-frac34.3%
unpow234.3%
associate-*l/37.5%
*-commutative37.5%
associate-/l*50.6%
Simplified50.6%
associate-*r/47.2%
associate-/r/47.2%
Applied egg-rr47.2%
distribute-rgt-in47.2%
*-un-lft-identity47.2%
*-commutative47.2%
associate-*l*47.6%
associate-*r/50.8%
associate-*l*50.8%
Applied egg-rr50.8%
if -9.99999999999999977e101 < M < -2.00000000000000006e-161Initial program 89.9%
*-commutative89.9%
times-frac89.9%
Simplified89.9%
Taylor expanded in M around 0 71.4%
associate-*r/71.4%
*-commutative71.4%
times-frac73.3%
associate-*r*68.3%
unpow268.3%
associate-*l*71.7%
unpow271.7%
unpow271.7%
Simplified71.7%
associate-*r/71.6%
associate-*l*78.8%
*-commutative78.8%
Applied egg-rr78.8%
*-un-lft-identity78.8%
times-frac90.5%
*-commutative90.5%
Applied egg-rr90.5%
*-lft-identity90.5%
associate-/r*90.5%
associate-/l*92.3%
associate-/r/92.3%
*-commutative92.3%
*-commutative92.3%
associate-*r*92.2%
Simplified92.2%
if -2.00000000000000006e-161 < M < 7.0000000000000003e-203Initial program 89.8%
*-commutative89.8%
times-frac89.8%
Simplified89.8%
*-commutative89.8%
frac-times89.8%
*-commutative89.8%
associate-*l/94.4%
*-commutative94.4%
frac-times95.7%
div-inv95.7%
metadata-eval95.7%
Applied egg-rr95.7%
Taylor expanded in h around 0 68.7%
Simplified77.8%
fma-udef77.8%
associate-*l*86.8%
associate-/r/86.8%
Applied egg-rr86.8%
associate-*r/91.3%
associate-*l*92.9%
Applied egg-rr92.9%
if 7.0000000000000003e-203 < M Initial program 71.5%
*-commutative71.5%
times-frac72.4%
Simplified72.4%
Taylor expanded in w0 around 0 53.2%
*-commutative53.2%
cancel-sign-sub-inv53.2%
metadata-eval53.2%
*-commutative53.2%
associate-/l*53.3%
associate-*r/53.3%
unpow253.3%
associate-/r*50.5%
*-commutative50.5%
unpow250.5%
associate-*l*53.9%
unpow253.9%
Simplified53.9%
Taylor expanded in D around 0 53.2%
associate-*r/53.2%
unpow253.2%
*-commutative53.2%
unpow253.2%
associate-*r/53.2%
*-commutative53.2%
Simplified67.8%
Final simplification77.9%
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (w0 M D h l d)
:precision binary64
(if (<= M -1e+101)
(* w0 (sqrt (- 1.0 (/ (* (* D (* D h)) (/ 0.25 l)) (* (/ d M) (/ d M))))))
(if (<= M -1.4e-162)
(* w0 (sqrt (- 1.0 (* (/ 0.25 (* d l)) (* (/ D d) (* D (* h (* M M))))))))
(if (<= M 5e-203)
(* w0 (+ 1.0 (* (/ -0.125 l) (* D (* D (/ (* (/ M d) (* M h)) d))))))
(*
w0
(sqrt
(+ 1.0 (* (* D (* (/ D l) (* (/ (* M M) d) (/ h d)))) -0.25))))))))assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (M <= -1e+101) {
tmp = w0 * sqrt((1.0 - (((D * (D * h)) * (0.25 / l)) / ((d / M) * (d / M)))));
} else if (M <= -1.4e-162) {
tmp = w0 * sqrt((1.0 - ((0.25 / (d * l)) * ((D / d) * (D * (h * (M * M)))))));
} else if (M <= 5e-203) {
tmp = w0 * (1.0 + ((-0.125 / l) * (D * (D * (((M / d) * (M * h)) / d)))));
} else {
tmp = w0 * sqrt((1.0 + ((D * ((D / l) * (((M * M) / d) * (h / d)))) * -0.25)));
}
return tmp;
}
NOTE: M and D should be sorted in increasing order before calling this function.
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 <= (-1d+101)) then
tmp = w0 * sqrt((1.0d0 - (((d * (d * h)) * (0.25d0 / l)) / ((d_1 / m) * (d_1 / m)))))
else if (m <= (-1.4d-162)) then
tmp = w0 * sqrt((1.0d0 - ((0.25d0 / (d_1 * l)) * ((d / d_1) * (d * (h * (m * m)))))))
else if (m <= 5d-203) then
tmp = w0 * (1.0d0 + (((-0.125d0) / l) * (d * (d * (((m / d_1) * (m * h)) / d_1)))))
else
tmp = w0 * sqrt((1.0d0 + ((d * ((d / l) * (((m * m) / d_1) * (h / d_1)))) * (-0.25d0))))
end if
code = tmp
end function
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (M <= -1e+101) {
tmp = w0 * Math.sqrt((1.0 - (((D * (D * h)) * (0.25 / l)) / ((d / M) * (d / M)))));
} else if (M <= -1.4e-162) {
tmp = w0 * Math.sqrt((1.0 - ((0.25 / (d * l)) * ((D / d) * (D * (h * (M * M)))))));
} else if (M <= 5e-203) {
tmp = w0 * (1.0 + ((-0.125 / l) * (D * (D * (((M / d) * (M * h)) / d)))));
} else {
tmp = w0 * Math.sqrt((1.0 + ((D * ((D / l) * (((M * M) / d) * (h / d)))) * -0.25)));
}
return tmp;
}
[M, D] = sort([M, D]) def code(w0, M, D, h, l, d): tmp = 0 if M <= -1e+101: tmp = w0 * math.sqrt((1.0 - (((D * (D * h)) * (0.25 / l)) / ((d / M) * (d / M))))) elif M <= -1.4e-162: tmp = w0 * math.sqrt((1.0 - ((0.25 / (d * l)) * ((D / d) * (D * (h * (M * M))))))) elif M <= 5e-203: tmp = w0 * (1.0 + ((-0.125 / l) * (D * (D * (((M / d) * (M * h)) / d))))) else: tmp = w0 * math.sqrt((1.0 + ((D * ((D / l) * (((M * M) / d) * (h / d)))) * -0.25))) return tmp
M, D = sort([M, D]) function code(w0, M, D, h, l, d) tmp = 0.0 if (M <= -1e+101) tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(Float64(D * Float64(D * h)) * Float64(0.25 / l)) / Float64(Float64(d / M) * Float64(d / M)))))); elseif (M <= -1.4e-162) tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(0.25 / Float64(d * l)) * Float64(Float64(D / d) * Float64(D * Float64(h * Float64(M * M)))))))); elseif (M <= 5e-203) tmp = Float64(w0 * Float64(1.0 + Float64(Float64(-0.125 / l) * Float64(D * Float64(D * Float64(Float64(Float64(M / d) * Float64(M * h)) / d)))))); else tmp = Float64(w0 * sqrt(Float64(1.0 + Float64(Float64(D * Float64(Float64(D / l) * Float64(Float64(Float64(M * M) / d) * Float64(h / d)))) * -0.25)))); end return tmp end
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(w0, M, D, h, l, d)
tmp = 0.0;
if (M <= -1e+101)
tmp = w0 * sqrt((1.0 - (((D * (D * h)) * (0.25 / l)) / ((d / M) * (d / M)))));
elseif (M <= -1.4e-162)
tmp = w0 * sqrt((1.0 - ((0.25 / (d * l)) * ((D / d) * (D * (h * (M * M)))))));
elseif (M <= 5e-203)
tmp = w0 * (1.0 + ((-0.125 / l) * (D * (D * (((M / d) * (M * h)) / d)))));
else
tmp = w0 * sqrt((1.0 + ((D * ((D / l) * (((M * M) / d) * (h / d)))) * -0.25)));
end
tmp_2 = tmp;
end
NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[M, -1e+101], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(N[(D * N[(D * h), $MachinePrecision]), $MachinePrecision] * N[(0.25 / l), $MachinePrecision]), $MachinePrecision] / N[(N[(d / M), $MachinePrecision] * N[(d / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[M, -1.4e-162], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(0.25 / N[(d * l), $MachinePrecision]), $MachinePrecision] * N[(N[(D / d), $MachinePrecision] * N[(D * N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[M, 5e-203], N[(w0 * N[(1.0 + N[(N[(-0.125 / l), $MachinePrecision] * N[(D * N[(D * N[(N[(N[(M / d), $MachinePrecision] * N[(M * h), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(w0 * N[Sqrt[N[(1.0 + N[(N[(D * N[(N[(D / l), $MachinePrecision] * N[(N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision] * N[(h / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;M \leq -1 \cdot 10^{+101}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{\left(D \cdot \left(D \cdot h\right)\right) \cdot \frac{0.25}{\ell}}{\frac{d}{M} \cdot \frac{d}{M}}}\\
\mathbf{elif}\;M \leq -1.4 \cdot 10^{-162}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{0.25}{d \cdot \ell} \cdot \left(\frac{D}{d} \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)}\\
\mathbf{elif}\;M \leq 5 \cdot 10^{-203}:\\
\;\;\;\;w0 \cdot \left(1 + \frac{-0.125}{\ell} \cdot \left(D \cdot \left(D \cdot \frac{\frac{M}{d} \cdot \left(M \cdot h\right)}{d}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 + \left(D \cdot \left(\frac{D}{\ell} \cdot \left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right)\right)\right) \cdot -0.25}\\
\end{array}
\end{array}
if M < -9.9999999999999998e100Initial program 60.3%
*-commutative60.3%
times-frac57.1%
Simplified57.1%
Taylor expanded in M around 0 24.2%
associate-*r/24.2%
*-commutative24.2%
times-frac24.2%
associate-*r*33.8%
unpow233.8%
associate-*l*34.4%
unpow234.4%
unpow234.4%
Simplified34.4%
*-un-lft-identity34.4%
*-commutative34.4%
associate-/l*37.5%
*-commutative37.5%
Applied egg-rr37.5%
Simplified54.6%
if -9.9999999999999998e100 < M < -1.40000000000000011e-162Initial program 90.1%
*-commutative90.1%
times-frac90.1%
Simplified90.1%
Taylor expanded in M around 0 71.8%
associate-*r/71.8%
*-commutative71.8%
times-frac73.7%
associate-*r*68.8%
unpow268.8%
associate-*l*72.2%
unpow272.2%
unpow272.2%
Simplified72.2%
associate-*r/72.1%
associate-*l*79.1%
*-commutative79.1%
Applied egg-rr79.1%
*-un-lft-identity79.1%
times-frac90.7%
*-commutative90.7%
Applied egg-rr90.7%
*-lft-identity90.7%
associate-/r*90.7%
associate-/l*92.4%
associate-/r/92.4%
*-commutative92.4%
*-commutative92.4%
associate-*r*92.4%
Simplified92.4%
if -1.40000000000000011e-162 < M < 5.0000000000000002e-203Initial program 89.6%
*-commutative89.6%
times-frac89.7%
Simplified89.7%
*-commutative89.7%
frac-times89.6%
*-commutative89.6%
associate-*l/94.3%
*-commutative94.3%
frac-times95.6%
div-inv95.6%
metadata-eval95.6%
Applied egg-rr95.6%
Taylor expanded in h around 0 68.2%
Simplified77.5%
fma-udef77.5%
associate-*l*86.6%
associate-/r/86.6%
Applied egg-rr86.6%
associate-*r/91.2%
associate-*l*92.8%
Applied egg-rr92.8%
if 5.0000000000000002e-203 < M Initial program 71.5%
*-commutative71.5%
times-frac72.4%
Simplified72.4%
Taylor expanded in w0 around 0 53.2%
*-commutative53.2%
cancel-sign-sub-inv53.2%
metadata-eval53.2%
*-commutative53.2%
associate-/l*53.3%
associate-*r/53.3%
unpow253.3%
associate-/r*50.5%
*-commutative50.5%
unpow250.5%
associate-*l*53.9%
unpow253.9%
Simplified53.9%
Taylor expanded in D around 0 53.2%
associate-*r/53.2%
unpow253.2%
*-commutative53.2%
unpow253.2%
associate-*r/53.2%
*-commutative53.2%
Simplified67.8%
Final simplification78.4%
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (w0 M D h l d)
:precision binary64
(if (<= w0 -1e-265)
(* w0 (+ 1.0 (* (/ -0.125 l) (* D (* D (/ (* (/ M d) (* M h)) d))))))
(*
w0
(sqrt (+ 1.0 (* (* D (* (/ D l) (* (/ (* M M) d) (/ h d)))) -0.25))))))assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (w0 <= -1e-265) {
tmp = w0 * (1.0 + ((-0.125 / l) * (D * (D * (((M / d) * (M * h)) / d)))));
} else {
tmp = w0 * sqrt((1.0 + ((D * ((D / l) * (((M * M) / d) * (h / d)))) * -0.25)));
}
return tmp;
}
NOTE: M and D should be sorted in increasing order before calling this function.
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 (w0 <= (-1d-265)) then
tmp = w0 * (1.0d0 + (((-0.125d0) / l) * (d * (d * (((m / d_1) * (m * h)) / d_1)))))
else
tmp = w0 * sqrt((1.0d0 + ((d * ((d / l) * (((m * m) / d_1) * (h / d_1)))) * (-0.25d0))))
end if
code = tmp
end function
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (w0 <= -1e-265) {
tmp = w0 * (1.0 + ((-0.125 / l) * (D * (D * (((M / d) * (M * h)) / d)))));
} else {
tmp = w0 * Math.sqrt((1.0 + ((D * ((D / l) * (((M * M) / d) * (h / d)))) * -0.25)));
}
return tmp;
}
[M, D] = sort([M, D]) def code(w0, M, D, h, l, d): tmp = 0 if w0 <= -1e-265: tmp = w0 * (1.0 + ((-0.125 / l) * (D * (D * (((M / d) * (M * h)) / d))))) else: tmp = w0 * math.sqrt((1.0 + ((D * ((D / l) * (((M * M) / d) * (h / d)))) * -0.25))) return tmp
M, D = sort([M, D]) function code(w0, M, D, h, l, d) tmp = 0.0 if (w0 <= -1e-265) tmp = Float64(w0 * Float64(1.0 + Float64(Float64(-0.125 / l) * Float64(D * Float64(D * Float64(Float64(Float64(M / d) * Float64(M * h)) / d)))))); else tmp = Float64(w0 * sqrt(Float64(1.0 + Float64(Float64(D * Float64(Float64(D / l) * Float64(Float64(Float64(M * M) / d) * Float64(h / d)))) * -0.25)))); end return tmp end
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(w0, M, D, h, l, d)
tmp = 0.0;
if (w0 <= -1e-265)
tmp = w0 * (1.0 + ((-0.125 / l) * (D * (D * (((M / d) * (M * h)) / d)))));
else
tmp = w0 * sqrt((1.0 + ((D * ((D / l) * (((M * M) / d) * (h / d)))) * -0.25)));
end
tmp_2 = tmp;
end
NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[w0, -1e-265], N[(w0 * N[(1.0 + N[(N[(-0.125 / l), $MachinePrecision] * N[(D * N[(D * N[(N[(N[(M / d), $MachinePrecision] * N[(M * h), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(w0 * N[Sqrt[N[(1.0 + N[(N[(D * N[(N[(D / l), $MachinePrecision] * N[(N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision] * N[(h / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;w0 \leq -1 \cdot 10^{-265}:\\
\;\;\;\;w0 \cdot \left(1 + \frac{-0.125}{\ell} \cdot \left(D \cdot \left(D \cdot \frac{\frac{M}{d} \cdot \left(M \cdot h\right)}{d}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 + \left(D \cdot \left(\frac{D}{\ell} \cdot \left(\frac{M \cdot M}{d} \cdot \frac{h}{d}\right)\right)\right) \cdot -0.25}\\
\end{array}
\end{array}
if w0 < -9.99999999999999985e-266Initial program 79.9%
*-commutative79.9%
times-frac80.7%
Simplified80.7%
*-commutative80.7%
frac-times79.9%
*-commutative79.9%
associate-*l/87.1%
*-commutative87.1%
frac-times87.9%
div-inv87.9%
metadata-eval87.9%
Applied egg-rr87.9%
Taylor expanded in h around 0 55.1%
Simplified65.3%
fma-udef65.3%
associate-*l*74.1%
associate-/r/74.1%
Applied egg-rr74.1%
associate-*r/75.0%
associate-*l*76.0%
Applied egg-rr76.0%
if -9.99999999999999985e-266 < w0 Initial program 78.6%
*-commutative78.6%
times-frac78.0%
Simplified78.0%
Taylor expanded in w0 around 0 58.8%
*-commutative58.8%
cancel-sign-sub-inv58.8%
metadata-eval58.8%
*-commutative58.8%
associate-/l*59.5%
associate-*r/59.5%
unpow259.5%
associate-/r*59.0%
*-commutative59.0%
unpow259.0%
associate-*l*62.6%
unpow262.6%
Simplified62.6%
Taylor expanded in D around 0 58.8%
associate-*r/58.8%
unpow258.8%
*-commutative58.8%
unpow258.8%
associate-*r/58.8%
*-commutative58.8%
Simplified76.8%
Final simplification76.5%
NOTE: M and D should be sorted in increasing order before calling this function. (FPCore (w0 M D h l d) :precision binary64 (if (or (<= M -4.2e-10) (not (<= M 2.5e-59))) (* w0 (+ 1.0 (* -0.125 (* (* D (/ D l)) (/ (* M (/ h d)) (/ d M)))))) w0))
assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((M <= -4.2e-10) || !(M <= 2.5e-59)) {
tmp = w0 * (1.0 + (-0.125 * ((D * (D / l)) * ((M * (h / d)) / (d / M)))));
} else {
tmp = w0;
}
return tmp;
}
NOTE: M and D should be sorted in increasing order before calling this function.
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 <= (-4.2d-10)) .or. (.not. (m <= 2.5d-59))) then
tmp = w0 * (1.0d0 + ((-0.125d0) * ((d * (d / l)) * ((m * (h / d_1)) / (d_1 / m)))))
else
tmp = w0
end if
code = tmp
end function
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((M <= -4.2e-10) || !(M <= 2.5e-59)) {
tmp = w0 * (1.0 + (-0.125 * ((D * (D / l)) * ((M * (h / d)) / (d / M)))));
} else {
tmp = w0;
}
return tmp;
}
[M, D] = sort([M, D]) def code(w0, M, D, h, l, d): tmp = 0 if (M <= -4.2e-10) or not (M <= 2.5e-59): tmp = w0 * (1.0 + (-0.125 * ((D * (D / l)) * ((M * (h / d)) / (d / M))))) else: tmp = w0 return tmp
M, D = sort([M, D]) function code(w0, M, D, h, l, d) tmp = 0.0 if ((M <= -4.2e-10) || !(M <= 2.5e-59)) tmp = Float64(w0 * Float64(1.0 + Float64(-0.125 * Float64(Float64(D * Float64(D / l)) * Float64(Float64(M * Float64(h / d)) / Float64(d / M)))))); else tmp = w0; end return tmp end
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(w0, M, D, h, l, d)
tmp = 0.0;
if ((M <= -4.2e-10) || ~((M <= 2.5e-59)))
tmp = w0 * (1.0 + (-0.125 * ((D * (D / l)) * ((M * (h / d)) / (d / M)))));
else
tmp = w0;
end
tmp_2 = tmp;
end
NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := If[Or[LessEqual[M, -4.2e-10], N[Not[LessEqual[M, 2.5e-59]], $MachinePrecision]], N[(w0 * N[(1.0 + N[(-0.125 * N[(N[(D * N[(D / l), $MachinePrecision]), $MachinePrecision] * N[(N[(M * N[(h / d), $MachinePrecision]), $MachinePrecision] / N[(d / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], w0]
\begin{array}{l}
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;M \leq -4.2 \cdot 10^{-10} \lor \neg \left(M \leq 2.5 \cdot 10^{-59}\right):\\
\;\;\;\;w0 \cdot \left(1 + -0.125 \cdot \left(\left(D \cdot \frac{D}{\ell}\right) \cdot \frac{M \cdot \frac{h}{d}}{\frac{d}{M}}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\end{array}
if M < -4.2e-10 or 2.5000000000000001e-59 < M Initial program 71.7%
*-commutative71.7%
times-frac71.6%
Simplified71.6%
Taylor expanded in M around 0 42.1%
associate-*r/42.1%
*-commutative42.1%
associate-*r/42.1%
*-commutative42.1%
times-frac42.3%
unpow242.3%
*-commutative42.3%
unpow242.3%
unpow242.3%
Simplified42.3%
Taylor expanded in D around 0 42.1%
*-commutative42.1%
times-frac42.3%
unpow242.3%
unpow242.3%
times-frac47.8%
unpow247.8%
associate-*l/50.4%
*-commutative50.4%
associate-/l*58.3%
Simplified58.3%
associate-*l/61.0%
Applied egg-rr61.0%
if -4.2e-10 < M < 2.5000000000000001e-59Initial program 85.3%
*-commutative85.3%
times-frac85.3%
Simplified85.3%
Taylor expanded in M around 0 84.0%
Final simplification73.7%
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (w0 M D h l d)
:precision binary64
(if (<= d -5.6e-74)
w0
(if (<= d 2.9e-8)
(* w0 (+ 1.0 (* -0.125 (* (* D (/ D l)) (* (/ h d) (/ M (/ d M)))))))
w0)))assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (d <= -5.6e-74) {
tmp = w0;
} else if (d <= 2.9e-8) {
tmp = w0 * (1.0 + (-0.125 * ((D * (D / l)) * ((h / d) * (M / (d / M))))));
} else {
tmp = w0;
}
return tmp;
}
NOTE: M and D should be sorted in increasing order before calling this function.
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 (d_1 <= (-5.6d-74)) then
tmp = w0
else if (d_1 <= 2.9d-8) then
tmp = w0 * (1.0d0 + ((-0.125d0) * ((d * (d / l)) * ((h / d_1) * (m / (d_1 / m))))))
else
tmp = w0
end if
code = tmp
end function
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (d <= -5.6e-74) {
tmp = w0;
} else if (d <= 2.9e-8) {
tmp = w0 * (1.0 + (-0.125 * ((D * (D / l)) * ((h / d) * (M / (d / M))))));
} else {
tmp = w0;
}
return tmp;
}
[M, D] = sort([M, D]) def code(w0, M, D, h, l, d): tmp = 0 if d <= -5.6e-74: tmp = w0 elif d <= 2.9e-8: tmp = w0 * (1.0 + (-0.125 * ((D * (D / l)) * ((h / d) * (M / (d / M)))))) else: tmp = w0 return tmp
M, D = sort([M, D]) function code(w0, M, D, h, l, d) tmp = 0.0 if (d <= -5.6e-74) tmp = w0; elseif (d <= 2.9e-8) tmp = Float64(w0 * Float64(1.0 + Float64(-0.125 * Float64(Float64(D * Float64(D / l)) * Float64(Float64(h / d) * Float64(M / Float64(d / M))))))); else tmp = w0; end return tmp end
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(w0, M, D, h, l, d)
tmp = 0.0;
if (d <= -5.6e-74)
tmp = w0;
elseif (d <= 2.9e-8)
tmp = w0 * (1.0 + (-0.125 * ((D * (D / l)) * ((h / d) * (M / (d / M))))));
else
tmp = w0;
end
tmp_2 = tmp;
end
NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[d, -5.6e-74], w0, If[LessEqual[d, 2.9e-8], N[(w0 * N[(1.0 + N[(-0.125 * N[(N[(D * N[(D / l), $MachinePrecision]), $MachinePrecision] * N[(N[(h / d), $MachinePrecision] * N[(M / N[(d / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], w0]]
\begin{array}{l}
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;d \leq -5.6 \cdot 10^{-74}:\\
\;\;\;\;w0\\
\mathbf{elif}\;d \leq 2.9 \cdot 10^{-8}:\\
\;\;\;\;w0 \cdot \left(1 + -0.125 \cdot \left(\left(D \cdot \frac{D}{\ell}\right) \cdot \left(\frac{h}{d} \cdot \frac{M}{\frac{d}{M}}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\end{array}
if d < -5.59999999999999976e-74 or 2.9000000000000002e-8 < d Initial program 81.1%
*-commutative81.1%
times-frac82.9%
Simplified82.9%
Taylor expanded in M around 0 81.7%
if -5.59999999999999976e-74 < d < 2.9000000000000002e-8Initial program 76.0%
*-commutative76.0%
times-frac73.0%
Simplified73.0%
Taylor expanded in M around 0 40.8%
associate-*r/40.8%
*-commutative40.8%
associate-*r/40.8%
*-commutative40.8%
times-frac43.9%
unpow243.9%
*-commutative43.9%
unpow243.9%
unpow243.9%
Simplified43.9%
Taylor expanded in D around 0 40.8%
*-commutative40.8%
times-frac43.9%
unpow243.9%
unpow243.9%
times-frac55.7%
unpow255.7%
associate-*l/57.9%
*-commutative57.9%
associate-/l*59.1%
Simplified59.1%
Final simplification73.3%
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (w0 M D h l d)
:precision binary64
(if (<= d -1.4e-73)
w0
(if (<= d 3.1e-9)
(* w0 (+ 1.0 (* -0.125 (* (* D (/ D l)) (/ (* h (* M (/ M d))) d)))))
w0)))assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (d <= -1.4e-73) {
tmp = w0;
} else if (d <= 3.1e-9) {
tmp = w0 * (1.0 + (-0.125 * ((D * (D / l)) * ((h * (M * (M / d))) / d))));
} else {
tmp = w0;
}
return tmp;
}
NOTE: M and D should be sorted in increasing order before calling this function.
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 (d_1 <= (-1.4d-73)) then
tmp = w0
else if (d_1 <= 3.1d-9) then
tmp = w0 * (1.0d0 + ((-0.125d0) * ((d * (d / l)) * ((h * (m * (m / d_1))) / d_1))))
else
tmp = w0
end if
code = tmp
end function
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (d <= -1.4e-73) {
tmp = w0;
} else if (d <= 3.1e-9) {
tmp = w0 * (1.0 + (-0.125 * ((D * (D / l)) * ((h * (M * (M / d))) / d))));
} else {
tmp = w0;
}
return tmp;
}
[M, D] = sort([M, D]) def code(w0, M, D, h, l, d): tmp = 0 if d <= -1.4e-73: tmp = w0 elif d <= 3.1e-9: tmp = w0 * (1.0 + (-0.125 * ((D * (D / l)) * ((h * (M * (M / d))) / d)))) else: tmp = w0 return tmp
M, D = sort([M, D]) function code(w0, M, D, h, l, d) tmp = 0.0 if (d <= -1.4e-73) tmp = w0; elseif (d <= 3.1e-9) tmp = Float64(w0 * Float64(1.0 + Float64(-0.125 * Float64(Float64(D * Float64(D / l)) * Float64(Float64(h * Float64(M * Float64(M / d))) / d))))); else tmp = w0; end return tmp end
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(w0, M, D, h, l, d)
tmp = 0.0;
if (d <= -1.4e-73)
tmp = w0;
elseif (d <= 3.1e-9)
tmp = w0 * (1.0 + (-0.125 * ((D * (D / l)) * ((h * (M * (M / d))) / d))));
else
tmp = w0;
end
tmp_2 = tmp;
end
NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[d, -1.4e-73], w0, If[LessEqual[d, 3.1e-9], N[(w0 * N[(1.0 + N[(-0.125 * N[(N[(D * N[(D / l), $MachinePrecision]), $MachinePrecision] * N[(N[(h * N[(M * N[(M / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], w0]]
\begin{array}{l}
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;d \leq -1.4 \cdot 10^{-73}:\\
\;\;\;\;w0\\
\mathbf{elif}\;d \leq 3.1 \cdot 10^{-9}:\\
\;\;\;\;w0 \cdot \left(1 + -0.125 \cdot \left(\left(D \cdot \frac{D}{\ell}\right) \cdot \frac{h \cdot \left(M \cdot \frac{M}{d}\right)}{d}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\end{array}
if d < -1.40000000000000006e-73 or 3.10000000000000005e-9 < d Initial program 81.1%
*-commutative81.1%
times-frac82.9%
Simplified82.9%
Taylor expanded in M around 0 81.7%
if -1.40000000000000006e-73 < d < 3.10000000000000005e-9Initial program 76.0%
*-commutative76.0%
times-frac73.0%
Simplified73.0%
Taylor expanded in M around 0 40.8%
associate-*r/40.8%
*-commutative40.8%
associate-*r/40.8%
*-commutative40.8%
times-frac43.9%
unpow243.9%
*-commutative43.9%
unpow243.9%
unpow243.9%
Simplified43.9%
Taylor expanded in D around 0 40.8%
*-commutative40.8%
times-frac43.9%
unpow243.9%
unpow243.9%
times-frac55.7%
unpow255.7%
associate-*l/57.9%
*-commutative57.9%
associate-/l*59.1%
Simplified59.1%
associate-*r/61.2%
associate-/r/61.2%
Applied egg-rr61.2%
Final simplification74.0%
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (w0 M D h l d)
:precision binary64
(if (<= M -7e-11)
(* w0 (+ 1.0 (* -0.125 (* (* D (/ D l)) (/ (* M (/ h d)) (/ d M))))))
(if (<= M 5e-59)
w0
(* w0 (+ 1.0 (* -0.125 (/ (* (* (/ M d) (* M h)) (/ (* D D) l)) d)))))))assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (M <= -7e-11) {
tmp = w0 * (1.0 + (-0.125 * ((D * (D / l)) * ((M * (h / d)) / (d / M)))));
} else if (M <= 5e-59) {
tmp = w0;
} else {
tmp = w0 * (1.0 + (-0.125 * ((((M / d) * (M * h)) * ((D * D) / l)) / d)));
}
return tmp;
}
NOTE: M and D should be sorted in increasing order before calling this function.
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 <= (-7d-11)) then
tmp = w0 * (1.0d0 + ((-0.125d0) * ((d * (d / l)) * ((m * (h / d_1)) / (d_1 / m)))))
else if (m <= 5d-59) then
tmp = w0
else
tmp = w0 * (1.0d0 + ((-0.125d0) * ((((m / d_1) * (m * h)) * ((d * d) / l)) / d_1)))
end if
code = tmp
end function
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (M <= -7e-11) {
tmp = w0 * (1.0 + (-0.125 * ((D * (D / l)) * ((M * (h / d)) / (d / M)))));
} else if (M <= 5e-59) {
tmp = w0;
} else {
tmp = w0 * (1.0 + (-0.125 * ((((M / d) * (M * h)) * ((D * D) / l)) / d)));
}
return tmp;
}
[M, D] = sort([M, D]) def code(w0, M, D, h, l, d): tmp = 0 if M <= -7e-11: tmp = w0 * (1.0 + (-0.125 * ((D * (D / l)) * ((M * (h / d)) / (d / M))))) elif M <= 5e-59: tmp = w0 else: tmp = w0 * (1.0 + (-0.125 * ((((M / d) * (M * h)) * ((D * D) / l)) / d))) return tmp
M, D = sort([M, D]) function code(w0, M, D, h, l, d) tmp = 0.0 if (M <= -7e-11) tmp = Float64(w0 * Float64(1.0 + Float64(-0.125 * Float64(Float64(D * Float64(D / l)) * Float64(Float64(M * Float64(h / d)) / Float64(d / M)))))); elseif (M <= 5e-59) tmp = w0; else tmp = Float64(w0 * Float64(1.0 + Float64(-0.125 * Float64(Float64(Float64(Float64(M / d) * Float64(M * h)) * Float64(Float64(D * D) / l)) / d)))); end return tmp end
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(w0, M, D, h, l, d)
tmp = 0.0;
if (M <= -7e-11)
tmp = w0 * (1.0 + (-0.125 * ((D * (D / l)) * ((M * (h / d)) / (d / M)))));
elseif (M <= 5e-59)
tmp = w0;
else
tmp = w0 * (1.0 + (-0.125 * ((((M / d) * (M * h)) * ((D * D) / l)) / d)));
end
tmp_2 = tmp;
end
NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[M, -7e-11], N[(w0 * N[(1.0 + N[(-0.125 * N[(N[(D * N[(D / l), $MachinePrecision]), $MachinePrecision] * N[(N[(M * N[(h / d), $MachinePrecision]), $MachinePrecision] / N[(d / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[M, 5e-59], w0, N[(w0 * N[(1.0 + N[(-0.125 * N[(N[(N[(N[(M / d), $MachinePrecision] * N[(M * h), $MachinePrecision]), $MachinePrecision] * N[(N[(D * D), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;M \leq -7 \cdot 10^{-11}:\\
\;\;\;\;w0 \cdot \left(1 + -0.125 \cdot \left(\left(D \cdot \frac{D}{\ell}\right) \cdot \frac{M \cdot \frac{h}{d}}{\frac{d}{M}}\right)\right)\\
\mathbf{elif}\;M \leq 5 \cdot 10^{-59}:\\
\;\;\;\;w0\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \left(1 + -0.125 \cdot \frac{\left(\frac{M}{d} \cdot \left(M \cdot h\right)\right) \cdot \frac{D \cdot D}{\ell}}{d}\right)\\
\end{array}
\end{array}
if M < -7.00000000000000038e-11Initial program 71.1%
*-commutative71.1%
times-frac69.0%
Simplified69.0%
Taylor expanded in M around 0 34.1%
associate-*r/34.1%
*-commutative34.1%
associate-*r/34.1%
*-commutative34.1%
times-frac36.2%
unpow236.2%
*-commutative36.2%
unpow236.2%
unpow236.2%
Simplified36.2%
Taylor expanded in D around 0 34.1%
*-commutative34.1%
times-frac36.2%
unpow236.2%
unpow236.2%
times-frac43.1%
unpow243.1%
associate-*l/47.4%
*-commutative47.4%
associate-/l*56.2%
Simplified56.2%
associate-*l/56.2%
Applied egg-rr56.2%
if -7.00000000000000038e-11 < M < 5.0000000000000001e-59Initial program 85.3%
*-commutative85.3%
times-frac85.3%
Simplified85.3%
Taylor expanded in M around 0 84.0%
if 5.0000000000000001e-59 < M Initial program 72.0%
*-commutative72.0%
times-frac73.3%
Simplified73.3%
Taylor expanded in M around 0 47.5%
associate-*r/47.5%
*-commutative47.5%
associate-*r/47.5%
*-commutative47.5%
times-frac46.4%
unpow246.4%
*-commutative46.4%
unpow246.4%
unpow246.4%
Simplified46.4%
Taylor expanded in D around 0 47.5%
*-commutative47.5%
times-frac46.4%
unpow246.4%
unpow246.4%
times-frac50.9%
unpow250.9%
associate-*l/52.4%
*-commutative52.4%
associate-/l*59.8%
Simplified59.8%
associate-*r/56.8%
associate-/r/56.8%
Applied egg-rr56.8%
associate-*r/56.9%
associate-*r/55.5%
associate-*l*59.8%
Applied egg-rr59.8%
Final simplification72.5%
NOTE: M and D should be sorted in increasing order before calling this function. (FPCore (w0 M D h l d) :precision binary64 (if (<= l 5.8e+69) (* w0 (+ 1.0 (* (/ -0.125 l) (* D (* D (* (/ h d) (* M (/ M d)))))))) w0))
assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (l <= 5.8e+69) {
tmp = w0 * (1.0 + ((-0.125 / l) * (D * (D * ((h / d) * (M * (M / d)))))));
} else {
tmp = w0;
}
return tmp;
}
NOTE: M and D should be sorted in increasing order before calling this function.
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 (l <= 5.8d+69) then
tmp = w0 * (1.0d0 + (((-0.125d0) / l) * (d * (d * ((h / d_1) * (m * (m / d_1)))))))
else
tmp = w0
end if
code = tmp
end function
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (l <= 5.8e+69) {
tmp = w0 * (1.0 + ((-0.125 / l) * (D * (D * ((h / d) * (M * (M / d)))))));
} else {
tmp = w0;
}
return tmp;
}
[M, D] = sort([M, D]) def code(w0, M, D, h, l, d): tmp = 0 if l <= 5.8e+69: tmp = w0 * (1.0 + ((-0.125 / l) * (D * (D * ((h / d) * (M * (M / d))))))) else: tmp = w0 return tmp
M, D = sort([M, D]) function code(w0, M, D, h, l, d) tmp = 0.0 if (l <= 5.8e+69) tmp = Float64(w0 * Float64(1.0 + Float64(Float64(-0.125 / l) * Float64(D * Float64(D * Float64(Float64(h / d) * Float64(M * Float64(M / d)))))))); else tmp = w0; end return tmp end
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(w0, M, D, h, l, d)
tmp = 0.0;
if (l <= 5.8e+69)
tmp = w0 * (1.0 + ((-0.125 / l) * (D * (D * ((h / d) * (M * (M / d)))))));
else
tmp = w0;
end
tmp_2 = tmp;
end
NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[l, 5.8e+69], N[(w0 * N[(1.0 + N[(N[(-0.125 / l), $MachinePrecision] * N[(D * N[(D * N[(N[(h / d), $MachinePrecision] * N[(M * N[(M / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], w0]
\begin{array}{l}
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 5.8 \cdot 10^{+69}:\\
\;\;\;\;w0 \cdot \left(1 + \frac{-0.125}{\ell} \cdot \left(D \cdot \left(D \cdot \left(\frac{h}{d} \cdot \left(M \cdot \frac{M}{d}\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\end{array}
if l < 5.7999999999999997e69Initial program 79.4%
*-commutative79.4%
times-frac79.8%
Simplified79.8%
*-commutative79.8%
frac-times79.4%
*-commutative79.4%
associate-*l/86.3%
*-commutative86.3%
frac-times87.1%
div-inv87.1%
metadata-eval87.1%
Applied egg-rr87.1%
Taylor expanded in h around 0 57.8%
Simplified69.3%
fma-udef69.3%
associate-*l*75.0%
associate-/r/75.0%
Applied egg-rr75.0%
if 5.7999999999999997e69 < l Initial program 78.2%
*-commutative78.2%
times-frac76.2%
Simplified76.2%
Taylor expanded in M around 0 78.6%
Final simplification75.7%
NOTE: M and D should be sorted in increasing order before calling this function. (FPCore (w0 M D h l d) :precision binary64 (* w0 (+ 1.0 (* (/ -0.125 l) (* D (* D (/ (* (/ M d) (* M h)) d)))))))
assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
return w0 * (1.0 + ((-0.125 / l) * (D * (D * (((M / d) * (M * h)) / d)))));
}
NOTE: M and D should be sorted in increasing order before calling this function.
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 * (1.0d0 + (((-0.125d0) / l) * (d * (d * (((m / d_1) * (m * h)) / d_1)))))
end function
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
return w0 * (1.0 + ((-0.125 / l) * (D * (D * (((M / d) * (M * h)) / d)))));
}
[M, D] = sort([M, D]) def code(w0, M, D, h, l, d): return w0 * (1.0 + ((-0.125 / l) * (D * (D * (((M / d) * (M * h)) / d)))))
M, D = sort([M, D]) function code(w0, M, D, h, l, d) return Float64(w0 * Float64(1.0 + Float64(Float64(-0.125 / l) * Float64(D * Float64(D * Float64(Float64(Float64(M / d) * Float64(M * h)) / d)))))) end
M, D = num2cell(sort([M, D])){:}
function tmp = code(w0, M, D, h, l, d)
tmp = w0 * (1.0 + ((-0.125 / l) * (D * (D * (((M / d) * (M * h)) / d)))));
end
NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := N[(w0 * N[(1.0 + N[(N[(-0.125 / l), $MachinePrecision] * N[(D * N[(D * N[(N[(N[(M / d), $MachinePrecision] * N[(M * h), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[M, D] = \mathsf{sort}([M, D])\\
\\
w0 \cdot \left(1 + \frac{-0.125}{\ell} \cdot \left(D \cdot \left(D \cdot \frac{\frac{M}{d} \cdot \left(M \cdot h\right)}{d}\right)\right)\right)
\end{array}
Initial program 79.2%
*-commutative79.2%
times-frac79.1%
Simplified79.1%
*-commutative79.1%
frac-times79.2%
*-commutative79.2%
associate-*l/84.8%
*-commutative84.8%
frac-times85.1%
div-inv85.1%
metadata-eval85.1%
Applied egg-rr85.1%
Taylor expanded in h around 0 55.0%
Simplified67.1%
fma-udef67.1%
associate-*l*73.7%
associate-/r/73.7%
Applied egg-rr73.7%
associate-*r/73.7%
associate-*l*74.2%
Applied egg-rr74.2%
Final simplification74.2%
NOTE: M and D should be sorted in increasing order before calling this function. (FPCore (w0 M D h l d) :precision binary64 w0)
assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
return w0;
}
NOTE: M and D should be sorted in increasing order before calling this function.
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
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
return w0;
}
[M, D] = sort([M, D]) def code(w0, M, D, h, l, d): return w0
M, D = sort([M, D]) function code(w0, M, D, h, l, d) return w0 end
M, D = num2cell(sort([M, D])){:}
function tmp = code(w0, M, D, h, l, d)
tmp = w0;
end
NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := w0
\begin{array}{l}
[M, D] = \mathsf{sort}([M, D])\\
\\
w0
\end{array}
Initial program 79.2%
*-commutative79.2%
times-frac79.1%
Simplified79.1%
Taylor expanded in M around 0 68.3%
Final simplification68.3%
herbie shell --seed 2023185
(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))))))