
(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 6 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (w0 M D h l d) :precision binary64 (* w0 (sqrt (- 1.0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l))))))
double code(double w0, double M, double D, double h, double l, double d) {
return w0 * sqrt((1.0 - (pow(((M * D) / (2.0 * d)), 2.0) * (h / l))));
}
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
code = w0 * sqrt((1.0d0 - ((((m * d) / (2.0d0 * d_1)) ** 2.0d0) * (h / l))))
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
return w0 * Math.sqrt((1.0 - (Math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l))));
}
def code(w0, M, D, h, l, d): return w0 * math.sqrt((1.0 - (math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l))))
function code(w0, M, D, h, l, d) return Float64(w0 * sqrt(Float64(1.0 - Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l))))) end
function tmp = code(w0, M, D, h, l, d) tmp = w0 * sqrt((1.0 - ((((M * D) / (2.0 * d)) ^ 2.0) * (h / l)))); end
code[w0_, M_, D_, h_, l_, d_] := N[(w0 * N[Sqrt[N[(1.0 - N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}
\end{array}
M_m = (fabs.f64 M)
D_m = (fabs.f64 D)
d_m = (fabs.f64 d)
(FPCore (w0 M_m D_m h l d_m)
:precision binary64
(let* ((t_0 (/ (* M_m D_m) (* 2.0 d_m))))
(if (<= t_0 2e+159)
(* w0 (cbrt (pow (- 1.0 (/ (* h (pow t_0 2.0)) l)) 1.5)))
(*
w0
(pow
(exp
(*
0.25
(+
(+ (log (* -0.25 (/ h (* l (pow d_m 2.0))))) (* 2.0 (log D_m)))
(* -2.0 (log (/ 1.0 M_m))))))
2.0)))))M_m = fabs(M);
D_m = fabs(D);
d_m = fabs(d);
double code(double w0, double M_m, double D_m, double h, double l, double d_m) {
double t_0 = (M_m * D_m) / (2.0 * d_m);
double tmp;
if (t_0 <= 2e+159) {
tmp = w0 * cbrt(pow((1.0 - ((h * pow(t_0, 2.0)) / l)), 1.5));
} else {
tmp = w0 * pow(exp((0.25 * ((log((-0.25 * (h / (l * pow(d_m, 2.0))))) + (2.0 * log(D_m))) + (-2.0 * log((1.0 / M_m)))))), 2.0);
}
return tmp;
}
M_m = Math.abs(M);
D_m = Math.abs(D);
d_m = Math.abs(d);
public static double code(double w0, double M_m, double D_m, double h, double l, double d_m) {
double t_0 = (M_m * D_m) / (2.0 * d_m);
double tmp;
if (t_0 <= 2e+159) {
tmp = w0 * Math.cbrt(Math.pow((1.0 - ((h * Math.pow(t_0, 2.0)) / l)), 1.5));
} else {
tmp = w0 * Math.pow(Math.exp((0.25 * ((Math.log((-0.25 * (h / (l * Math.pow(d_m, 2.0))))) + (2.0 * Math.log(D_m))) + (-2.0 * Math.log((1.0 / M_m)))))), 2.0);
}
return tmp;
}
M_m = abs(M) D_m = abs(D) d_m = abs(d) function code(w0, M_m, D_m, h, l, d_m) t_0 = Float64(Float64(M_m * D_m) / Float64(2.0 * d_m)) tmp = 0.0 if (t_0 <= 2e+159) tmp = Float64(w0 * cbrt((Float64(1.0 - Float64(Float64(h * (t_0 ^ 2.0)) / l)) ^ 1.5))); else tmp = Float64(w0 * (exp(Float64(0.25 * Float64(Float64(log(Float64(-0.25 * Float64(h / Float64(l * (d_m ^ 2.0))))) + Float64(2.0 * log(D_m))) + Float64(-2.0 * log(Float64(1.0 / M_m)))))) ^ 2.0)); end return tmp end
M_m = N[Abs[M], $MachinePrecision]
D_m = N[Abs[D], $MachinePrecision]
d_m = N[Abs[d], $MachinePrecision]
code[w0_, M$95$m_, D$95$m_, h_, l_, d$95$m_] := Block[{t$95$0 = N[(N[(M$95$m * D$95$m), $MachinePrecision] / N[(2.0 * d$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 2e+159], N[(w0 * N[Power[N[Power[N[(1.0 - N[(N[(h * N[Power[t$95$0, 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], N[(w0 * N[Power[N[Exp[N[(0.25 * N[(N[(N[Log[N[(-0.25 * N[(h / N[(l * N[Power[d$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(2.0 * N[Log[D$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-2.0 * N[Log[N[(1.0 / M$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
d_m = \left|d\right|
\\
\begin{array}{l}
t_0 := \frac{M_m \cdot D_m}{2 \cdot d_m}\\
\mathbf{if}\;t_0 \leq 2 \cdot 10^{+159}:\\
\;\;\;\;w0 \cdot \sqrt[3]{{\left(1 - \frac{h \cdot {t_0}^{2}}{\ell}\right)}^{1.5}}\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot {\left(e^{0.25 \cdot \left(\left(\log \left(-0.25 \cdot \frac{h}{\ell \cdot {d_m}^{2}}\right) + 2 \cdot \log D_m\right) + -2 \cdot \log \left(\frac{1}{M_m}\right)\right)}\right)}^{2}\\
\end{array}
\end{array}
M_m = (fabs.f64 M) D_m = (fabs.f64 D) d_m = (fabs.f64 d) (FPCore (w0 M_m D_m h l d_m) :precision binary64 (let* ((t_0 (* (pow (/ (* M_m D_m) (* 2.0 d_m)) 2.0) (/ h l)))) (if (<= t_0 4e-6) (* w0 (sqrt (- 1.0 t_0))) w0)))
M_m = fabs(M);
D_m = fabs(D);
d_m = fabs(d);
double code(double w0, double M_m, double D_m, double h, double l, double d_m) {
double t_0 = pow(((M_m * D_m) / (2.0 * d_m)), 2.0) * (h / l);
double tmp;
if (t_0 <= 4e-6) {
tmp = w0 * sqrt((1.0 - t_0));
} else {
tmp = w0;
}
return tmp;
}
M_m = abs(M)
D_m = abs(D)
d_m = abs(d)
real(8) function code(w0, m_m, d_m, h, l, d_m_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m_m
real(8), intent (in) :: d_m
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_m_1
real(8) :: t_0
real(8) :: tmp
t_0 = (((m_m * d_m) / (2.0d0 * d_m_1)) ** 2.0d0) * (h / l)
if (t_0 <= 4d-6) then
tmp = w0 * sqrt((1.0d0 - t_0))
else
tmp = w0
end if
code = tmp
end function
M_m = Math.abs(M);
D_m = Math.abs(D);
d_m = Math.abs(d);
public static double code(double w0, double M_m, double D_m, double h, double l, double d_m) {
double t_0 = Math.pow(((M_m * D_m) / (2.0 * d_m)), 2.0) * (h / l);
double tmp;
if (t_0 <= 4e-6) {
tmp = w0 * Math.sqrt((1.0 - t_0));
} else {
tmp = w0;
}
return tmp;
}
M_m = math.fabs(M) D_m = math.fabs(D) d_m = math.fabs(d) def code(w0, M_m, D_m, h, l, d_m): t_0 = math.pow(((M_m * D_m) / (2.0 * d_m)), 2.0) * (h / l) tmp = 0 if t_0 <= 4e-6: tmp = w0 * math.sqrt((1.0 - t_0)) else: tmp = w0 return tmp
M_m = abs(M) D_m = abs(D) d_m = abs(d) function code(w0, M_m, D_m, h, l, d_m) t_0 = Float64((Float64(Float64(M_m * D_m) / Float64(2.0 * d_m)) ^ 2.0) * Float64(h / l)) tmp = 0.0 if (t_0 <= 4e-6) tmp = Float64(w0 * sqrt(Float64(1.0 - t_0))); else tmp = w0; end return tmp end
M_m = abs(M); D_m = abs(D); d_m = abs(d); function tmp_2 = code(w0, M_m, D_m, h, l, d_m) t_0 = (((M_m * D_m) / (2.0 * d_m)) ^ 2.0) * (h / l); tmp = 0.0; if (t_0 <= 4e-6) tmp = w0 * sqrt((1.0 - t_0)); else tmp = w0; end tmp_2 = tmp; end
M_m = N[Abs[M], $MachinePrecision]
D_m = N[Abs[D], $MachinePrecision]
d_m = N[Abs[d], $MachinePrecision]
code[w0_, M$95$m_, D$95$m_, h_, l_, d$95$m_] := Block[{t$95$0 = N[(N[Power[N[(N[(M$95$m * D$95$m), $MachinePrecision] / N[(2.0 * d$95$m), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 4e-6], N[(w0 * N[Sqrt[N[(1.0 - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], w0]]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
d_m = \left|d\right|
\\
\begin{array}{l}
t_0 := {\left(\frac{M_m \cdot D_m}{2 \cdot d_m}\right)}^{2} \cdot \frac{h}{\ell}\\
\mathbf{if}\;t_0 \leq 4 \cdot 10^{-6}:\\
\;\;\;\;w0 \cdot \sqrt{1 - t_0}\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\end{array}
M_m = (fabs.f64 M) D_m = (fabs.f64 D) d_m = (fabs.f64 d) (FPCore (w0 M_m D_m h l d_m) :precision binary64 (* w0 (cbrt (pow (- 1.0 (/ (* h (pow (/ (* M_m D_m) (* 2.0 d_m)) 2.0)) l)) 1.5))))
M_m = fabs(M);
D_m = fabs(D);
d_m = fabs(d);
double code(double w0, double M_m, double D_m, double h, double l, double d_m) {
return w0 * cbrt(pow((1.0 - ((h * pow(((M_m * D_m) / (2.0 * d_m)), 2.0)) / l)), 1.5));
}
M_m = Math.abs(M);
D_m = Math.abs(D);
d_m = Math.abs(d);
public static double code(double w0, double M_m, double D_m, double h, double l, double d_m) {
return w0 * Math.cbrt(Math.pow((1.0 - ((h * Math.pow(((M_m * D_m) / (2.0 * d_m)), 2.0)) / l)), 1.5));
}
M_m = abs(M) D_m = abs(D) d_m = abs(d) function code(w0, M_m, D_m, h, l, d_m) return Float64(w0 * cbrt((Float64(1.0 - Float64(Float64(h * (Float64(Float64(M_m * D_m) / Float64(2.0 * d_m)) ^ 2.0)) / l)) ^ 1.5))) end
M_m = N[Abs[M], $MachinePrecision] D_m = N[Abs[D], $MachinePrecision] d_m = N[Abs[d], $MachinePrecision] code[w0_, M$95$m_, D$95$m_, h_, l_, d$95$m_] := N[(w0 * N[Power[N[Power[N[(1.0 - N[(N[(h * N[Power[N[(N[(M$95$m * D$95$m), $MachinePrecision] / N[(2.0 * d$95$m), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
d_m = \left|d\right|
\\
w0 \cdot \sqrt[3]{{\left(1 - \frac{h \cdot {\left(\frac{M_m \cdot D_m}{2 \cdot d_m}\right)}^{2}}{\ell}\right)}^{1.5}}
\end{array}
M_m = (fabs.f64 M) D_m = (fabs.f64 D) d_m = (fabs.f64 d) (FPCore (w0 M_m D_m h l d_m) :precision binary64 (if (<= (/ h l) -4e-313) (* w0 (sqrt (- 1.0 (* (/ h l) (pow (* (/ M_m 2.0) (/ D_m d_m)) 2.0))))) w0))
M_m = fabs(M);
D_m = fabs(D);
d_m = fabs(d);
double code(double w0, double M_m, double D_m, double h, double l, double d_m) {
double tmp;
if ((h / l) <= -4e-313) {
tmp = w0 * sqrt((1.0 - ((h / l) * pow(((M_m / 2.0) * (D_m / d_m)), 2.0))));
} else {
tmp = w0;
}
return tmp;
}
M_m = abs(M)
D_m = abs(D)
d_m = abs(d)
real(8) function code(w0, m_m, d_m, h, l, d_m_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m_m
real(8), intent (in) :: d_m
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_m_1
real(8) :: tmp
if ((h / l) <= (-4d-313)) then
tmp = w0 * sqrt((1.0d0 - ((h / l) * (((m_m / 2.0d0) * (d_m / d_m_1)) ** 2.0d0))))
else
tmp = w0
end if
code = tmp
end function
M_m = Math.abs(M);
D_m = Math.abs(D);
d_m = Math.abs(d);
public static double code(double w0, double M_m, double D_m, double h, double l, double d_m) {
double tmp;
if ((h / l) <= -4e-313) {
tmp = w0 * Math.sqrt((1.0 - ((h / l) * Math.pow(((M_m / 2.0) * (D_m / d_m)), 2.0))));
} else {
tmp = w0;
}
return tmp;
}
M_m = math.fabs(M) D_m = math.fabs(D) d_m = math.fabs(d) def code(w0, M_m, D_m, h, l, d_m): tmp = 0 if (h / l) <= -4e-313: tmp = w0 * math.sqrt((1.0 - ((h / l) * math.pow(((M_m / 2.0) * (D_m / d_m)), 2.0)))) else: tmp = w0 return tmp
M_m = abs(M) D_m = abs(D) d_m = abs(d) function code(w0, M_m, D_m, h, l, d_m) tmp = 0.0 if (Float64(h / l) <= -4e-313) tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(h / l) * (Float64(Float64(M_m / 2.0) * Float64(D_m / d_m)) ^ 2.0))))); else tmp = w0; end return tmp end
M_m = abs(M); D_m = abs(D); d_m = abs(d); function tmp_2 = code(w0, M_m, D_m, h, l, d_m) tmp = 0.0; if ((h / l) <= -4e-313) tmp = w0 * sqrt((1.0 - ((h / l) * (((M_m / 2.0) * (D_m / d_m)) ^ 2.0)))); else tmp = w0; end tmp_2 = tmp; end
M_m = N[Abs[M], $MachinePrecision] D_m = N[Abs[D], $MachinePrecision] d_m = N[Abs[d], $MachinePrecision] code[w0_, M$95$m_, D$95$m_, h_, l_, d$95$m_] := If[LessEqual[N[(h / l), $MachinePrecision], -4e-313], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(h / l), $MachinePrecision] * N[Power[N[(N[(M$95$m / 2.0), $MachinePrecision] * N[(D$95$m / d$95$m), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], w0]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
d_m = \left|d\right|
\\
\begin{array}{l}
\mathbf{if}\;\frac{h}{\ell} \leq -4 \cdot 10^{-313}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{h}{\ell} \cdot {\left(\frac{M_m}{2} \cdot \frac{D_m}{d_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\end{array}
M_m = (fabs.f64 M) D_m = (fabs.f64 D) d_m = (fabs.f64 d) (FPCore (w0 M_m D_m h l d_m) :precision binary64 (if (<= (/ h l) -4e-313) (* w0 (sqrt (- 1.0 (* (/ h l) (pow (* D_m (/ M_m (* 2.0 d_m))) 2.0))))) w0))
M_m = fabs(M);
D_m = fabs(D);
d_m = fabs(d);
double code(double w0, double M_m, double D_m, double h, double l, double d_m) {
double tmp;
if ((h / l) <= -4e-313) {
tmp = w0 * sqrt((1.0 - ((h / l) * pow((D_m * (M_m / (2.0 * d_m))), 2.0))));
} else {
tmp = w0;
}
return tmp;
}
M_m = abs(M)
D_m = abs(D)
d_m = abs(d)
real(8) function code(w0, m_m, d_m, h, l, d_m_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m_m
real(8), intent (in) :: d_m
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_m_1
real(8) :: tmp
if ((h / l) <= (-4d-313)) then
tmp = w0 * sqrt((1.0d0 - ((h / l) * ((d_m * (m_m / (2.0d0 * d_m_1))) ** 2.0d0))))
else
tmp = w0
end if
code = tmp
end function
M_m = Math.abs(M);
D_m = Math.abs(D);
d_m = Math.abs(d);
public static double code(double w0, double M_m, double D_m, double h, double l, double d_m) {
double tmp;
if ((h / l) <= -4e-313) {
tmp = w0 * Math.sqrt((1.0 - ((h / l) * Math.pow((D_m * (M_m / (2.0 * d_m))), 2.0))));
} else {
tmp = w0;
}
return tmp;
}
M_m = math.fabs(M) D_m = math.fabs(D) d_m = math.fabs(d) def code(w0, M_m, D_m, h, l, d_m): tmp = 0 if (h / l) <= -4e-313: tmp = w0 * math.sqrt((1.0 - ((h / l) * math.pow((D_m * (M_m / (2.0 * d_m))), 2.0)))) else: tmp = w0 return tmp
M_m = abs(M) D_m = abs(D) d_m = abs(d) function code(w0, M_m, D_m, h, l, d_m) tmp = 0.0 if (Float64(h / l) <= -4e-313) tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(h / l) * (Float64(D_m * Float64(M_m / Float64(2.0 * d_m))) ^ 2.0))))); else tmp = w0; end return tmp end
M_m = abs(M); D_m = abs(D); d_m = abs(d); function tmp_2 = code(w0, M_m, D_m, h, l, d_m) tmp = 0.0; if ((h / l) <= -4e-313) tmp = w0 * sqrt((1.0 - ((h / l) * ((D_m * (M_m / (2.0 * d_m))) ^ 2.0)))); else tmp = w0; end tmp_2 = tmp; end
M_m = N[Abs[M], $MachinePrecision] D_m = N[Abs[D], $MachinePrecision] d_m = N[Abs[d], $MachinePrecision] code[w0_, M$95$m_, D$95$m_, h_, l_, d$95$m_] := If[LessEqual[N[(h / l), $MachinePrecision], -4e-313], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(h / l), $MachinePrecision] * N[Power[N[(D$95$m * N[(M$95$m / N[(2.0 * d$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], w0]
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
d_m = \left|d\right|
\\
\begin{array}{l}
\mathbf{if}\;\frac{h}{\ell} \leq -4 \cdot 10^{-313}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{h}{\ell} \cdot {\left(D_m \cdot \frac{M_m}{2 \cdot d_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\end{array}
M_m = (fabs.f64 M) D_m = (fabs.f64 D) d_m = (fabs.f64 d) (FPCore (w0 M_m D_m h l d_m) :precision binary64 w0)
M_m = fabs(M);
D_m = fabs(D);
d_m = fabs(d);
double code(double w0, double M_m, double D_m, double h, double l, double d_m) {
return w0;
}
M_m = abs(M)
D_m = abs(D)
d_m = abs(d)
real(8) function code(w0, m_m, d_m, h, l, d_m_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m_m
real(8), intent (in) :: d_m
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_m_1
code = w0
end function
M_m = Math.abs(M);
D_m = Math.abs(D);
d_m = Math.abs(d);
public static double code(double w0, double M_m, double D_m, double h, double l, double d_m) {
return w0;
}
M_m = math.fabs(M) D_m = math.fabs(D) d_m = math.fabs(d) def code(w0, M_m, D_m, h, l, d_m): return w0
M_m = abs(M) D_m = abs(D) d_m = abs(d) function code(w0, M_m, D_m, h, l, d_m) return w0 end
M_m = abs(M); D_m = abs(D); d_m = abs(d); function tmp = code(w0, M_m, D_m, h, l, d_m) tmp = w0; end
M_m = N[Abs[M], $MachinePrecision] D_m = N[Abs[D], $MachinePrecision] d_m = N[Abs[d], $MachinePrecision] code[w0_, M$95$m_, D$95$m_, h_, l_, d$95$m_] := w0
\begin{array}{l}
M_m = \left|M\right|
\\
D_m = \left|D\right|
\\
d_m = \left|d\right|
\\
w0
\end{array}
herbie shell --seed 2024003
(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))))))