
(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}
(FPCore (w0 M D h l d)
:precision binary64
(let* ((t_0 (/ (* M D) (* 2.0 d))))
(if (<= (* (pow t_0 2.0) (/ h l)) 1e-27)
(* w0 (sqrt (fma t_0 (* (/ h l) (/ (* M D) (* d -2.0))) 1.0)))
(* w0 (sqrt (fma t_0 (/ (/ (* (* M D) h) (* 2.0 d)) (- l)) 1.0))))))
double code(double w0, double M, double D, double h, double l, double d) {
double t_0 = (M * D) / (2.0 * d);
double tmp;
if ((pow(t_0, 2.0) * (h / l)) <= 1e-27) {
tmp = w0 * sqrt(fma(t_0, ((h / l) * ((M * D) / (d * -2.0))), 1.0));
} else {
tmp = w0 * sqrt(fma(t_0, ((((M * D) * h) / (2.0 * d)) / -l), 1.0));
}
return tmp;
}
function code(w0, M, D, h, l, d) t_0 = Float64(Float64(M * D) / Float64(2.0 * d)) tmp = 0.0 if (Float64((t_0 ^ 2.0) * Float64(h / l)) <= 1e-27) tmp = Float64(w0 * sqrt(fma(t_0, Float64(Float64(h / l) * Float64(Float64(M * D) / Float64(d * -2.0))), 1.0))); else tmp = Float64(w0 * sqrt(fma(t_0, Float64(Float64(Float64(Float64(M * D) * h) / Float64(2.0 * d)) / Float64(-l)), 1.0))); end return tmp end
code[w0_, M_, D_, h_, l_, d_] := Block[{t$95$0 = N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[Power[t$95$0, 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision], 1e-27], N[(w0 * N[Sqrt[N[(t$95$0 * N[(N[(h / l), $MachinePrecision] * N[(N[(M * D), $MachinePrecision] / N[(d * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(w0 * N[Sqrt[N[(t$95$0 * N[(N[(N[(N[(M * D), $MachinePrecision] * h), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision] / (-l)), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{M \cdot D}{2 \cdot d}\\
\mathbf{if}\;{t\_0}^{2} \cdot \frac{h}{\ell} \leq 10^{-27}:\\
\;\;\;\;w0 \cdot \sqrt{\mathsf{fma}\left(t\_0, \frac{h}{\ell} \cdot \frac{M \cdot D}{d \cdot -2}, 1\right)}\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{\mathsf{fma}\left(t\_0, \frac{\frac{\left(M \cdot D\right) \cdot h}{2 \cdot d}}{-\ell}, 1\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)) < 1e-27Initial program 86.0%
sub-negN/A
+-commutativeN/A
distribute-lft-neg-inN/A
unpow2N/A
distribute-rgt-neg-inN/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr86.3%
if 1e-27 < (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l)) Initial program 20.0%
sub-negN/A
+-commutativeN/A
associate-*r/N/A
distribute-neg-frac2N/A
unpow2N/A
associate-*l*N/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr90.6%
Final simplification86.7%
(FPCore (w0 M D h l d)
:precision binary64
(let* ((t_0 (pow (/ (* M D) (* 2.0 d)) 2.0)))
(if (<= t_0 1e-86)
w0
(if (<= t_0 5e+121)
(*
w0
(sqrt (- 1.0 (* D (* M (/ (* (* M D) h) (* l (* (* d d) 4.0))))))))
(fma (/ (* (* M D) (* M (* w0 (* h -0.125)))) (* d l)) (/ D d) w0)))))
double code(double w0, double M, double D, double h, double l, double d) {
double t_0 = pow(((M * D) / (2.0 * d)), 2.0);
double tmp;
if (t_0 <= 1e-86) {
tmp = w0;
} else if (t_0 <= 5e+121) {
tmp = w0 * sqrt((1.0 - (D * (M * (((M * D) * h) / (l * ((d * d) * 4.0)))))));
} else {
tmp = fma((((M * D) * (M * (w0 * (h * -0.125)))) / (d * l)), (D / d), w0);
}
return tmp;
}
function code(w0, M, D, h, l, d) t_0 = Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0 tmp = 0.0 if (t_0 <= 1e-86) tmp = w0; elseif (t_0 <= 5e+121) tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(D * Float64(M * Float64(Float64(Float64(M * D) * h) / Float64(l * Float64(Float64(d * d) * 4.0)))))))); else tmp = fma(Float64(Float64(Float64(M * D) * Float64(M * Float64(w0 * Float64(h * -0.125)))) / Float64(d * l)), Float64(D / d), w0); end return tmp end
code[w0_, M_, D_, h_, l_, d_] := Block[{t$95$0 = N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[t$95$0, 1e-86], w0, If[LessEqual[t$95$0, 5e+121], N[(w0 * N[Sqrt[N[(1.0 - N[(D * N[(M * N[(N[(N[(M * D), $MachinePrecision] * h), $MachinePrecision] / N[(l * N[(N[(d * d), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(M * D), $MachinePrecision] * N[(M * N[(w0 * N[(h * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision] * N[(D / d), $MachinePrecision] + w0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\\
\mathbf{if}\;t\_0 \leq 10^{-86}:\\
\;\;\;\;w0\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+121}:\\
\;\;\;\;w0 \cdot \sqrt{1 - D \cdot \left(M \cdot \frac{\left(M \cdot D\right) \cdot h}{\ell \cdot \left(\left(d \cdot d\right) \cdot 4\right)}\right)}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot \left(w0 \cdot \left(h \cdot -0.125\right)\right)\right)}{d \cdot \ell}, \frac{D}{d}, w0\right)\\
\end{array}
\end{array}
if (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) < 1.00000000000000008e-86Initial program 93.5%
Taylor expanded in M around 0
Simplified98.0%
if 1.00000000000000008e-86 < (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) < 5.00000000000000007e121Initial program 81.5%
unpow2N/A
frac-timesN/A
associate-/l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-commutativeN/A
swap-sqrN/A
metadata-evalN/A
metadata-evalN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-eval72.3
Applied egg-rr72.3%
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
frac-timesN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6459.9
Applied egg-rr59.9%
if 5.00000000000000007e121 < (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) Initial program 60.1%
Taylor expanded in M around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified44.2%
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6449.5
Applied egg-rr49.5%
associate-*l/N/A
*-commutativeN/A
times-fracN/A
associate-*r/N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr56.7%
Final simplification79.5%
(FPCore (w0 M D h l d)
:precision binary64
(let* ((t_0 (/ (* M D) (* 2.0 d))))
(if (<= (* (pow t_0 2.0) (/ h l)) 5e-7)
(* w0 (sqrt (fma t_0 (* (/ h l) (/ (* M D) (* d -2.0))) 1.0)))
(fma (/ (* D D) (* d d)) (/ (* (* M (* M w0)) (* h -0.125)) l) w0))))
double code(double w0, double M, double D, double h, double l, double d) {
double t_0 = (M * D) / (2.0 * d);
double tmp;
if ((pow(t_0, 2.0) * (h / l)) <= 5e-7) {
tmp = w0 * sqrt(fma(t_0, ((h / l) * ((M * D) / (d * -2.0))), 1.0));
} else {
tmp = fma(((D * D) / (d * d)), (((M * (M * w0)) * (h * -0.125)) / l), w0);
}
return tmp;
}
function code(w0, M, D, h, l, d) t_0 = Float64(Float64(M * D) / Float64(2.0 * d)) tmp = 0.0 if (Float64((t_0 ^ 2.0) * Float64(h / l)) <= 5e-7) tmp = Float64(w0 * sqrt(fma(t_0, Float64(Float64(h / l) * Float64(Float64(M * D) / Float64(d * -2.0))), 1.0))); else tmp = fma(Float64(Float64(D * D) / Float64(d * d)), Float64(Float64(Float64(M * Float64(M * w0)) * Float64(h * -0.125)) / l), w0); end return tmp end
code[w0_, M_, D_, h_, l_, d_] := Block[{t$95$0 = N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[Power[t$95$0, 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision], 5e-7], N[(w0 * N[Sqrt[N[(t$95$0 * N[(N[(h / l), $MachinePrecision] * N[(N[(M * D), $MachinePrecision] / N[(d * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(D * D), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(M * N[(M * w0), $MachinePrecision]), $MachinePrecision] * N[(h * -0.125), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] + w0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{M \cdot D}{2 \cdot d}\\
\mathbf{if}\;{t\_0}^{2} \cdot \frac{h}{\ell} \leq 5 \cdot 10^{-7}:\\
\;\;\;\;w0 \cdot \sqrt{\mathsf{fma}\left(t\_0, \frac{h}{\ell} \cdot \frac{M \cdot D}{d \cdot -2}, 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{D \cdot D}{d \cdot d}, \frac{\left(M \cdot \left(M \cdot w0\right)\right) \cdot \left(h \cdot -0.125\right)}{\ell}, w0\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)) < 4.99999999999999977e-7Initial program 86.2%
sub-negN/A
+-commutativeN/A
distribute-lft-neg-inN/A
unpow2N/A
distribute-rgt-neg-inN/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr86.6%
if 4.99999999999999977e-7 < (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l)) Initial program 0.0%
Taylor expanded in M around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified44.5%
associate-*r/N/A
times-fracN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6463.3
Applied egg-rr63.3%
Final simplification85.1%
(FPCore (w0 M D h l d)
:precision binary64
(if (<= (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l)) 1e-27)
(* w0 (sqrt (- 1.0 (* (/ h l) (* (* M D) (/ (/ (* M D) d) (* d 4.0)))))))
(*
w0
(sqrt (fma (* (/ (* (* M D) h) (* d (* l 4.0))) (/ M d)) (- D) 1.0)))))
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) <= 1e-27) {
tmp = w0 * sqrt((1.0 - ((h / l) * ((M * D) * (((M * D) / d) / (d * 4.0))))));
} else {
tmp = w0 * sqrt(fma(((((M * D) * h) / (d * (l * 4.0))) * (M / d)), -D, 1.0));
}
return tmp;
}
function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l)) <= 1e-27) tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(h / l) * Float64(Float64(M * D) * Float64(Float64(Float64(M * D) / d) / Float64(d * 4.0))))))); else tmp = Float64(w0 * sqrt(fma(Float64(Float64(Float64(Float64(M * D) * h) / Float64(d * Float64(l * 4.0))) * Float64(M / d)), Float64(-D), 1.0))); end return tmp end
code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision], 1e-27], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(h / l), $MachinePrecision] * N[(N[(M * D), $MachinePrecision] * N[(N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision] / N[(d * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(w0 * N[Sqrt[N[(N[(N[(N[(N[(M * D), $MachinePrecision] * h), $MachinePrecision] / N[(d * N[(l * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(M / d), $MachinePrecision]), $MachinePrecision] * (-D) + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell} \leq 10^{-27}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{h}{\ell} \cdot \left(\left(M \cdot D\right) \cdot \frac{\frac{M \cdot D}{d}}{d \cdot 4}\right)}\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{\mathsf{fma}\left(\frac{\left(M \cdot D\right) \cdot h}{d \cdot \left(\ell \cdot 4\right)} \cdot \frac{M}{d}, -D, 1\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)) < 1e-27Initial program 86.0%
unpow2N/A
frac-timesN/A
associate-/l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-commutativeN/A
swap-sqrN/A
metadata-evalN/A
metadata-evalN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-eval76.3
Applied egg-rr76.3%
associate-*l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6486.0
Applied egg-rr86.0%
if 1e-27 < (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l)) Initial program 20.0%
unpow2N/A
frac-timesN/A
associate-/l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-commutativeN/A
swap-sqrN/A
metadata-evalN/A
metadata-evalN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-eval14.9
Applied egg-rr14.9%
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr63.3%
*-commutativeN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6464.2
Applied egg-rr64.2%
associate-*l/N/A
*-commutativeN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f6475.6
Applied egg-rr75.6%
Final simplification85.2%
(FPCore (w0 M D h l d) :precision binary64 (if (<= (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l)) -5e+37) (fma (/ (* (* M D) (* M (* w0 (* h -0.125)))) (* d l)) (/ D d) w0) w0))
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) <= -5e+37) {
tmp = fma((((M * D) * (M * (w0 * (h * -0.125)))) / (d * l)), (D / d), w0);
} else {
tmp = w0;
}
return tmp;
}
function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l)) <= -5e+37) tmp = fma(Float64(Float64(Float64(M * D) * Float64(M * Float64(w0 * Float64(h * -0.125)))) / Float64(d * l)), Float64(D / d), w0); else tmp = w0; end return tmp end
code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision], -5e+37], N[(N[(N[(N[(M * D), $MachinePrecision] * N[(M * N[(w0 * N[(h * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision] * N[(D / d), $MachinePrecision] + w0), $MachinePrecision], w0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell} \leq -5 \cdot 10^{+37}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\left(M \cdot D\right) \cdot \left(M \cdot \left(w0 \cdot \left(h \cdot -0.125\right)\right)\right)}{d \cdot \ell}, \frac{D}{d}, w0\right)\\
\mathbf{else}:\\
\;\;\;\;w0\\
\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)) < -4.99999999999999989e37Initial program 64.1%
Taylor expanded in M around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified39.6%
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6442.6
Applied egg-rr42.6%
associate-*l/N/A
*-commutativeN/A
times-fracN/A
associate-*r/N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr47.3%
if -4.99999999999999989e37 < (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l)) Initial program 90.2%
Taylor expanded in M around 0
Simplified96.1%
(FPCore (w0 M D h l d) :precision binary64 (if (<= (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l)) -5e+85) (fma (/ (* D D) d) (* (* M w0) (* M (/ (* h -0.125) (* d l)))) w0) w0))
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) <= -5e+85) {
tmp = fma(((D * D) / d), ((M * w0) * (M * ((h * -0.125) / (d * l)))), w0);
} else {
tmp = w0;
}
return tmp;
}
function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l)) <= -5e+85) tmp = fma(Float64(Float64(D * D) / d), Float64(Float64(M * w0) * Float64(M * Float64(Float64(h * -0.125) / Float64(d * l)))), w0); else tmp = w0; end return tmp end
code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision], -5e+85], N[(N[(N[(D * D), $MachinePrecision] / d), $MachinePrecision] * N[(N[(M * w0), $MachinePrecision] * N[(M * N[(N[(h * -0.125), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + w0), $MachinePrecision], w0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell} \leq -5 \cdot 10^{+85}:\\
\;\;\;\;\mathsf{fma}\left(\frac{D \cdot D}{d}, \left(M \cdot w0\right) \cdot \left(M \cdot \frac{h \cdot -0.125}{d \cdot \ell}\right), w0\right)\\
\mathbf{else}:\\
\;\;\;\;w0\\
\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.0000000000000001e85Initial program 61.6%
Taylor expanded in M around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified42.1%
associate-*r/N/A
associate-*l*N/A
times-fracN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6447.1
Applied egg-rr47.1%
associate-/l*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6448.3
Applied egg-rr48.3%
if -5.0000000000000001e85 < (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l)) Initial program 90.6%
Taylor expanded in M around 0
Simplified93.0%
(FPCore (w0 M D h l d) :precision binary64 (if (<= (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l)) -5e+85) (fma (* D (/ D d)) (/ (* (* M (* M w0)) (* h -0.125)) (* d l)) w0) w0))
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) <= -5e+85) {
tmp = fma((D * (D / d)), (((M * (M * w0)) * (h * -0.125)) / (d * l)), w0);
} else {
tmp = w0;
}
return tmp;
}
function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l)) <= -5e+85) tmp = fma(Float64(D * Float64(D / d)), Float64(Float64(Float64(M * Float64(M * w0)) * Float64(h * -0.125)) / Float64(d * l)), w0); else tmp = w0; end return tmp end
code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision], -5e+85], N[(N[(D * N[(D / d), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(M * N[(M * w0), $MachinePrecision]), $MachinePrecision] * N[(h * -0.125), $MachinePrecision]), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision] + w0), $MachinePrecision], w0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell} \leq -5 \cdot 10^{+85}:\\
\;\;\;\;\mathsf{fma}\left(D \cdot \frac{D}{d}, \frac{\left(M \cdot \left(M \cdot w0\right)\right) \cdot \left(h \cdot -0.125\right)}{d \cdot \ell}, w0\right)\\
\mathbf{else}:\\
\;\;\;\;w0\\
\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.0000000000000001e85Initial program 61.6%
Taylor expanded in M around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified42.1%
associate-*r/N/A
associate-*l*N/A
times-fracN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6447.1
Applied egg-rr47.1%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f6448.7
Applied egg-rr48.7%
if -5.0000000000000001e85 < (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l)) Initial program 90.6%
Taylor expanded in M around 0
Simplified93.0%
Final simplification78.1%
(FPCore (w0 M D h l d) :precision binary64 (if (<= (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l)) -5e+85) (* (* D D) (* (/ (* w0 (* M (* M h))) d) (/ -0.125 (* d l)))) w0))
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) <= -5e+85) {
tmp = (D * D) * (((w0 * (M * (M * h))) / d) * (-0.125 / (d * l)));
} else {
tmp = w0;
}
return tmp;
}
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
real(8) :: tmp
if (((((m * d) / (2.0d0 * d_1)) ** 2.0d0) * (h / l)) <= (-5d+85)) then
tmp = (d * d) * (((w0 * (m * (m * h))) / d_1) * ((-0.125d0) / (d_1 * l)))
else
tmp = w0
end if
code = tmp
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((Math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) <= -5e+85) {
tmp = (D * D) * (((w0 * (M * (M * h))) / d) * (-0.125 / (d * l)));
} else {
tmp = w0;
}
return tmp;
}
def code(w0, M, D, h, l, d): tmp = 0 if (math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) <= -5e+85: tmp = (D * D) * (((w0 * (M * (M * h))) / d) * (-0.125 / (d * l))) else: tmp = w0 return tmp
function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l)) <= -5e+85) tmp = Float64(Float64(D * D) * Float64(Float64(Float64(w0 * Float64(M * Float64(M * h))) / d) * Float64(-0.125 / Float64(d * l)))); else tmp = w0; end return tmp end
function tmp_2 = code(w0, M, D, h, l, d) tmp = 0.0; if (((((M * D) / (2.0 * d)) ^ 2.0) * (h / l)) <= -5e+85) tmp = (D * D) * (((w0 * (M * (M * h))) / d) * (-0.125 / (d * l))); else tmp = w0; end tmp_2 = tmp; end
code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision], -5e+85], N[(N[(D * D), $MachinePrecision] * N[(N[(N[(w0 * N[(M * N[(M * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] * N[(-0.125 / N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], w0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell} \leq -5 \cdot 10^{+85}:\\
\;\;\;\;\left(D \cdot D\right) \cdot \left(\frac{w0 \cdot \left(M \cdot \left(M \cdot h\right)\right)}{d} \cdot \frac{-0.125}{d \cdot \ell}\right)\\
\mathbf{else}:\\
\;\;\;\;w0\\
\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.0000000000000001e85Initial program 61.6%
Taylor expanded in M around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified42.1%
Taylor expanded in D around inf
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6439.8
Simplified39.8%
*-commutativeN/A
associate-*l*N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6446.0
Applied egg-rr46.0%
if -5.0000000000000001e85 < (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l)) Initial program 90.6%
Taylor expanded in M around 0
Simplified93.0%
(FPCore (w0 M D h l d) :precision binary64 (if (<= (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l)) -5e+85) (* (* D D) (* (* M h) (* (/ w0 (* d (* d l))) (* M -0.125)))) w0))
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) <= -5e+85) {
tmp = (D * D) * ((M * h) * ((w0 / (d * (d * l))) * (M * -0.125)));
} else {
tmp = w0;
}
return tmp;
}
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
real(8) :: tmp
if (((((m * d) / (2.0d0 * d_1)) ** 2.0d0) * (h / l)) <= (-5d+85)) then
tmp = (d * d) * ((m * h) * ((w0 / (d_1 * (d_1 * l))) * (m * (-0.125d0))))
else
tmp = w0
end if
code = tmp
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((Math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) <= -5e+85) {
tmp = (D * D) * ((M * h) * ((w0 / (d * (d * l))) * (M * -0.125)));
} else {
tmp = w0;
}
return tmp;
}
def code(w0, M, D, h, l, d): tmp = 0 if (math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) <= -5e+85: tmp = (D * D) * ((M * h) * ((w0 / (d * (d * l))) * (M * -0.125))) else: tmp = w0 return tmp
function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l)) <= -5e+85) tmp = Float64(Float64(D * D) * Float64(Float64(M * h) * Float64(Float64(w0 / Float64(d * Float64(d * l))) * Float64(M * -0.125)))); else tmp = w0; end return tmp end
function tmp_2 = code(w0, M, D, h, l, d) tmp = 0.0; if (((((M * D) / (2.0 * d)) ^ 2.0) * (h / l)) <= -5e+85) tmp = (D * D) * ((M * h) * ((w0 / (d * (d * l))) * (M * -0.125))); else tmp = w0; end tmp_2 = tmp; end
code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision], -5e+85], N[(N[(D * D), $MachinePrecision] * N[(N[(M * h), $MachinePrecision] * N[(N[(w0 / N[(d * N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(M * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], w0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell} \leq -5 \cdot 10^{+85}:\\
\;\;\;\;\left(D \cdot D\right) \cdot \left(\left(M \cdot h\right) \cdot \left(\frac{w0}{d \cdot \left(d \cdot \ell\right)} \cdot \left(M \cdot -0.125\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;w0\\
\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.0000000000000001e85Initial program 61.6%
Taylor expanded in M around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified42.1%
Taylor expanded in D around inf
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6439.8
Simplified39.8%
associate-*r*N/A
associate-/l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6441.1
Applied egg-rr41.1%
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6444.7
Applied egg-rr44.7%
if -5.0000000000000001e85 < (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l)) Initial program 90.6%
Taylor expanded in M around 0
Simplified93.0%
Final simplification76.8%
(FPCore (w0 M D h l d) :precision binary64 (if (<= (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l)) -5e+85) (* (* D D) (* (/ w0 (* d (* d l))) (* -0.125 (* M (* M h))))) w0))
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) <= -5e+85) {
tmp = (D * D) * ((w0 / (d * (d * l))) * (-0.125 * (M * (M * h))));
} else {
tmp = w0;
}
return tmp;
}
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
real(8) :: tmp
if (((((m * d) / (2.0d0 * d_1)) ** 2.0d0) * (h / l)) <= (-5d+85)) then
tmp = (d * d) * ((w0 / (d_1 * (d_1 * l))) * ((-0.125d0) * (m * (m * h))))
else
tmp = w0
end if
code = tmp
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((Math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) <= -5e+85) {
tmp = (D * D) * ((w0 / (d * (d * l))) * (-0.125 * (M * (M * h))));
} else {
tmp = w0;
}
return tmp;
}
def code(w0, M, D, h, l, d): tmp = 0 if (math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) <= -5e+85: tmp = (D * D) * ((w0 / (d * (d * l))) * (-0.125 * (M * (M * h)))) else: tmp = w0 return tmp
function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l)) <= -5e+85) tmp = Float64(Float64(D * D) * Float64(Float64(w0 / Float64(d * Float64(d * l))) * Float64(-0.125 * Float64(M * Float64(M * h))))); else tmp = w0; end return tmp end
function tmp_2 = code(w0, M, D, h, l, d) tmp = 0.0; if (((((M * D) / (2.0 * d)) ^ 2.0) * (h / l)) <= -5e+85) tmp = (D * D) * ((w0 / (d * (d * l))) * (-0.125 * (M * (M * h)))); else tmp = w0; end tmp_2 = tmp; end
code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision], -5e+85], N[(N[(D * D), $MachinePrecision] * N[(N[(w0 / N[(d * N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-0.125 * N[(M * N[(M * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], w0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell} \leq -5 \cdot 10^{+85}:\\
\;\;\;\;\left(D \cdot D\right) \cdot \left(\frac{w0}{d \cdot \left(d \cdot \ell\right)} \cdot \left(-0.125 \cdot \left(M \cdot \left(M \cdot h\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;w0\\
\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.0000000000000001e85Initial program 61.6%
Taylor expanded in M around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified42.1%
Taylor expanded in D around inf
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6439.8
Simplified39.8%
associate-*r*N/A
associate-/l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6441.1
Applied egg-rr41.1%
if -5.0000000000000001e85 < (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l)) Initial program 90.6%
Taylor expanded in M around 0
Simplified93.0%
Final simplification75.5%
(FPCore (w0 M D h l d)
:precision binary64
(let* ((t_0 (/ (* M D) (* 2.0 d))))
(if (<= t_0 1e-43)
w0
(* w0 (sqrt (fma t_0 (/ (* (* (* M D) h) -0.5) (* d l)) 1.0))))))
double code(double w0, double M, double D, double h, double l, double d) {
double t_0 = (M * D) / (2.0 * d);
double tmp;
if (t_0 <= 1e-43) {
tmp = w0;
} else {
tmp = w0 * sqrt(fma(t_0, ((((M * D) * h) * -0.5) / (d * l)), 1.0));
}
return tmp;
}
function code(w0, M, D, h, l, d) t_0 = Float64(Float64(M * D) / Float64(2.0 * d)) tmp = 0.0 if (t_0 <= 1e-43) tmp = w0; else tmp = Float64(w0 * sqrt(fma(t_0, Float64(Float64(Float64(Float64(M * D) * h) * -0.5) / Float64(d * l)), 1.0))); end return tmp end
code[w0_, M_, D_, h_, l_, d_] := Block[{t$95$0 = N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 1e-43], w0, N[(w0 * N[Sqrt[N[(t$95$0 * N[(N[(N[(N[(M * D), $MachinePrecision] * h), $MachinePrecision] * -0.5), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{M \cdot D}{2 \cdot d}\\
\mathbf{if}\;t\_0 \leq 10^{-43}:\\
\;\;\;\;w0\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{\mathsf{fma}\left(t\_0, \frac{\left(\left(M \cdot D\right) \cdot h\right) \cdot -0.5}{d \cdot \ell}, 1\right)}\\
\end{array}
\end{array}
if (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) < 1.00000000000000008e-43Initial program 84.4%
Taylor expanded in M around 0
Simplified75.2%
if 1.00000000000000008e-43 < (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) Initial program 68.3%
sub-negN/A
+-commutativeN/A
associate-*r/N/A
distribute-neg-frac2N/A
unpow2N/A
associate-*l*N/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr70.0%
Taylor expanded in M around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6468.1
Simplified68.1%
Final simplification73.6%
(FPCore (w0 M D h l d)
:precision binary64
(if (<= (/ (* M D) (* 2.0 d)) 1e-43)
w0
(*
w0
(sqrt (fma (* (/ (* (* M D) h) (* d (* l 4.0))) (/ M d)) (- D) 1.0)))))
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (((M * D) / (2.0 * d)) <= 1e-43) {
tmp = w0;
} else {
tmp = w0 * sqrt(fma(((((M * D) * h) / (d * (l * 4.0))) * (M / d)), -D, 1.0));
}
return tmp;
}
function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64(Float64(M * D) / Float64(2.0 * d)) <= 1e-43) tmp = w0; else tmp = Float64(w0 * sqrt(fma(Float64(Float64(Float64(Float64(M * D) * h) / Float64(d * Float64(l * 4.0))) * Float64(M / d)), Float64(-D), 1.0))); end return tmp end
code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 1e-43], w0, N[(w0 * N[Sqrt[N[(N[(N[(N[(N[(M * D), $MachinePrecision] * h), $MachinePrecision] / N[(d * N[(l * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(M / d), $MachinePrecision]), $MachinePrecision] * (-D) + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{M \cdot D}{2 \cdot d} \leq 10^{-43}:\\
\;\;\;\;w0\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{\mathsf{fma}\left(\frac{\left(M \cdot D\right) \cdot h}{d \cdot \left(\ell \cdot 4\right)} \cdot \frac{M}{d}, -D, 1\right)}\\
\end{array}
\end{array}
if (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) < 1.00000000000000008e-43Initial program 84.4%
Taylor expanded in M around 0
Simplified75.2%
if 1.00000000000000008e-43 < (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) Initial program 68.3%
unpow2N/A
frac-timesN/A
associate-/l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-commutativeN/A
swap-sqrN/A
metadata-evalN/A
metadata-evalN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-eval59.4
Applied egg-rr59.4%
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr55.4%
*-commutativeN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6457.8
Applied egg-rr57.8%
associate-*l/N/A
*-commutativeN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f6463.0
Applied egg-rr63.0%
Final simplification72.5%
(FPCore (w0 M D h l d)
:precision binary64
(if (<= (* M D) 1e-210)
w0
(if (<= (* M D) 2e+142)
(*
w0
(sqrt (fma (- (* M D)) (* (* M D) (/ h (* d (* d (* l 4.0))))) 1.0)))
(*
w0
(sqrt (fma (* (/ D d) (* (* M M) 0.25)) (* (- D) (/ h (* d l))) 1.0))))))
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((M * D) <= 1e-210) {
tmp = w0;
} else if ((M * D) <= 2e+142) {
tmp = w0 * sqrt(fma(-(M * D), ((M * D) * (h / (d * (d * (l * 4.0))))), 1.0));
} else {
tmp = w0 * sqrt(fma(((D / d) * ((M * M) * 0.25)), (-D * (h / (d * l))), 1.0));
}
return tmp;
}
function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64(M * D) <= 1e-210) tmp = w0; elseif (Float64(M * D) <= 2e+142) tmp = Float64(w0 * sqrt(fma(Float64(-Float64(M * D)), Float64(Float64(M * D) * Float64(h / Float64(d * Float64(d * Float64(l * 4.0))))), 1.0))); else tmp = Float64(w0 * sqrt(fma(Float64(Float64(D / d) * Float64(Float64(M * M) * 0.25)), Float64(Float64(-D) * Float64(h / Float64(d * l))), 1.0))); end return tmp end
code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(M * D), $MachinePrecision], 1e-210], w0, If[LessEqual[N[(M * D), $MachinePrecision], 2e+142], N[(w0 * N[Sqrt[N[((-N[(M * D), $MachinePrecision]) * N[(N[(M * D), $MachinePrecision] * N[(h / N[(d * N[(d * N[(l * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(w0 * N[Sqrt[N[(N[(N[(D / d), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision] * N[((-D) * N[(h / N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;M \cdot D \leq 10^{-210}:\\
\;\;\;\;w0\\
\mathbf{elif}\;M \cdot D \leq 2 \cdot 10^{+142}:\\
\;\;\;\;w0 \cdot \sqrt{\mathsf{fma}\left(-M \cdot D, \left(M \cdot D\right) \cdot \frac{h}{d \cdot \left(d \cdot \left(\ell \cdot 4\right)\right)}, 1\right)}\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{\mathsf{fma}\left(\frac{D}{d} \cdot \left(\left(M \cdot M\right) \cdot 0.25\right), \left(-D\right) \cdot \frac{h}{d \cdot \ell}, 1\right)}\\
\end{array}
\end{array}
if (*.f64 M D) < 1e-210Initial program 83.7%
Taylor expanded in M around 0
Simplified74.3%
if 1e-210 < (*.f64 M D) < 2.0000000000000001e142Initial program 83.6%
unpow2N/A
frac-timesN/A
associate-/l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-commutativeN/A
swap-sqrN/A
metadata-evalN/A
metadata-evalN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-eval78.1
Applied egg-rr78.1%
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr78.9%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6485.1
Applied egg-rr85.1%
if 2.0000000000000001e142 < (*.f64 M D) Initial program 67.3%
sub-negN/A
+-commutativeN/A
associate-*r/N/A
distribute-neg-frac2N/A
associate-/l*N/A
unpow2N/A
times-fracN/A
associate-*r*N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr51.7%
frac-timesN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f6456.0
Applied egg-rr56.0%
Final simplification74.1%
(FPCore (w0 M D h l d)
:precision binary64
(if (<= (* M D) 1e-210)
w0
(if (<= (* M D) 2e+294)
(*
w0
(sqrt (fma (- (* M D)) (* (* M D) (/ h (* d (* d (* l 4.0))))) 1.0)))
(/ (/ (* (/ (* D D) d) (* h (* -0.125 (* w0 (* M M))))) l) d))))
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((M * D) <= 1e-210) {
tmp = w0;
} else if ((M * D) <= 2e+294) {
tmp = w0 * sqrt(fma(-(M * D), ((M * D) * (h / (d * (d * (l * 4.0))))), 1.0));
} else {
tmp = ((((D * D) / d) * (h * (-0.125 * (w0 * (M * M))))) / l) / d;
}
return tmp;
}
function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64(M * D) <= 1e-210) tmp = w0; elseif (Float64(M * D) <= 2e+294) tmp = Float64(w0 * sqrt(fma(Float64(-Float64(M * D)), Float64(Float64(M * D) * Float64(h / Float64(d * Float64(d * Float64(l * 4.0))))), 1.0))); else tmp = Float64(Float64(Float64(Float64(Float64(D * D) / d) * Float64(h * Float64(-0.125 * Float64(w0 * Float64(M * M))))) / l) / d); end return tmp end
code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(M * D), $MachinePrecision], 1e-210], w0, If[LessEqual[N[(M * D), $MachinePrecision], 2e+294], N[(w0 * N[Sqrt[N[((-N[(M * D), $MachinePrecision]) * N[(N[(M * D), $MachinePrecision] * N[(h / N[(d * N[(d * N[(l * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(D * D), $MachinePrecision] / d), $MachinePrecision] * N[(h * N[(-0.125 * N[(w0 * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] / d), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;M \cdot D \leq 10^{-210}:\\
\;\;\;\;w0\\
\mathbf{elif}\;M \cdot D \leq 2 \cdot 10^{+294}:\\
\;\;\;\;w0 \cdot \sqrt{\mathsf{fma}\left(-M \cdot D, \left(M \cdot D\right) \cdot \frac{h}{d \cdot \left(d \cdot \left(\ell \cdot 4\right)\right)}, 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{D \cdot D}{d} \cdot \left(h \cdot \left(-0.125 \cdot \left(w0 \cdot \left(M \cdot M\right)\right)\right)\right)}{\ell}}{d}\\
\end{array}
\end{array}
if (*.f64 M D) < 1e-210Initial program 83.7%
Taylor expanded in M around 0
Simplified74.3%
if 1e-210 < (*.f64 M D) < 2.00000000000000013e294Initial program 81.7%
unpow2N/A
frac-timesN/A
associate-/l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-commutativeN/A
swap-sqrN/A
metadata-evalN/A
metadata-evalN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-eval74.2
Applied egg-rr74.2%
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr74.9%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6481.1
Applied egg-rr81.1%
if 2.00000000000000013e294 < (*.f64 M D) Initial program 61.7%
Taylor expanded in M around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified61.0%
Taylor expanded in D around inf
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6461.0
Simplified61.0%
associate-*r/N/A
associate-*l*N/A
times-fracN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
associate-*r/N/A
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
Applied egg-rr69.9%
Final simplification76.3%
(FPCore (w0 M D h l d) :precision binary64 (if (<= (/ (* M D) (* 2.0 d)) 1e-43) w0 (fma (/ (* D (* (* M (* M w0)) (* h -0.125))) (* d (* d l))) D w0)))
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (((M * D) / (2.0 * d)) <= 1e-43) {
tmp = w0;
} else {
tmp = fma(((D * ((M * (M * w0)) * (h * -0.125))) / (d * (d * l))), D, w0);
}
return tmp;
}
function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64(Float64(M * D) / Float64(2.0 * d)) <= 1e-43) tmp = w0; else tmp = fma(Float64(Float64(D * Float64(Float64(M * Float64(M * w0)) * Float64(h * -0.125))) / Float64(d * Float64(d * l))), D, w0); end return tmp end
code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 1e-43], w0, N[(N[(N[(D * N[(N[(M * N[(M * w0), $MachinePrecision]), $MachinePrecision] * N[(h * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * D + w0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{M \cdot D}{2 \cdot d} \leq 10^{-43}:\\
\;\;\;\;w0\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{D \cdot \left(\left(M \cdot \left(M \cdot w0\right)\right) \cdot \left(h \cdot -0.125\right)\right)}{d \cdot \left(d \cdot \ell\right)}, D, w0\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) < 1.00000000000000008e-43Initial program 84.4%
Taylor expanded in M around 0
Simplified75.2%
if 1.00000000000000008e-43 < (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) Initial program 68.3%
Taylor expanded in M around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified38.2%
associate-*l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6440.8
Applied egg-rr40.8%
(FPCore (w0 M D h l d) :precision binary64 w0)
double code(double w0, double M, double D, double h, double l, double d) {
return w0;
}
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
code = w0
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
return w0;
}
def code(w0, M, D, h, l, d): return w0
function code(w0, M, D, h, l, d) return w0 end
function tmp = code(w0, M, D, h, l, d) tmp = w0; end
code[w0_, M_, D_, h_, l_, d_] := w0
\begin{array}{l}
\\
w0
\end{array}
Initial program 80.8%
Taylor expanded in M around 0
Simplified63.3%
herbie shell --seed 2024198
(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))))))