
(FPCore (w0 M D h l d) :precision binary64 (* w0 (sqrt (- 1.0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l))))))
double code(double w0, double M, double D, double h, double l, double d) {
return w0 * sqrt((1.0 - (pow(((M * D) / (2.0 * d)), 2.0) * (h / l))));
}
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
code = w0 * sqrt((1.0d0 - ((((m * d) / (2.0d0 * d_1)) ** 2.0d0) * (h / l))))
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
return w0 * Math.sqrt((1.0 - (Math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l))));
}
def code(w0, M, D, h, l, d): return w0 * math.sqrt((1.0 - (math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l))))
function code(w0, M, D, h, l, d) return Float64(w0 * sqrt(Float64(1.0 - Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l))))) end
function tmp = code(w0, M, D, h, l, d) tmp = w0 * sqrt((1.0 - ((((M * D) / (2.0 * d)) ^ 2.0) * (h / l)))); end
code[w0_, M_, D_, h_, l_, d_] := N[(w0 * N[Sqrt[N[(1.0 - N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 8 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (w0 M D h l d) :precision binary64 (* w0 (sqrt (- 1.0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l))))))
double code(double w0, double M, double D, double h, double l, double d) {
return w0 * sqrt((1.0 - (pow(((M * D) / (2.0 * d)), 2.0) * (h / l))));
}
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
code = w0 * sqrt((1.0d0 - ((((m * d) / (2.0d0 * d_1)) ** 2.0d0) * (h / l))))
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
return w0 * Math.sqrt((1.0 - (Math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l))));
}
def code(w0, M, D, h, l, d): return w0 * math.sqrt((1.0 - (math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l))))
function code(w0, M, D, h, l, d) return Float64(w0 * sqrt(Float64(1.0 - Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l))))) end
function tmp = code(w0, M, D, h, l, d) tmp = w0 * sqrt((1.0 - ((((M * D) / (2.0 * d)) ^ 2.0) * (h / l)))); end
code[w0_, M_, D_, h_, l_, d_] := N[(w0 * N[Sqrt[N[(1.0 - N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}
\end{array}
(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}
Initial program 79.9%
(FPCore (w0 M D h l d)
:precision binary64
(let* ((t_0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l)))
(t_1 (sqrt (- 1.0 t_0))))
(if (<= (* w0 t_1) 1e-155) t_0 t_1)))
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) * (h / l);
double t_1 = sqrt((1.0 - t_0));
double tmp;
if ((w0 * t_1) <= 1e-155) {
tmp = t_0;
} else {
tmp = t_1;
}
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) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (((m * d) / (2.0d0 * d_1)) ** 2.0d0) * (h / l)
t_1 = sqrt((1.0d0 - t_0))
if ((w0 * t_1) <= 1d-155) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
double t_0 = Math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l);
double t_1 = Math.sqrt((1.0 - t_0));
double tmp;
if ((w0 * t_1) <= 1e-155) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(w0, M, D, h, l, d): t_0 = math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l) t_1 = math.sqrt((1.0 - t_0)) tmp = 0 if (w0 * t_1) <= 1e-155: tmp = t_0 else: tmp = t_1 return tmp
function code(w0, M, D, h, l, d) t_0 = Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l)) t_1 = sqrt(Float64(1.0 - t_0)) tmp = 0.0 if (Float64(w0 * t_1) <= 1e-155) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(w0, M, D, h, l, d) t_0 = (((M * D) / (2.0 * d)) ^ 2.0) * (h / l); t_1 = sqrt((1.0 - t_0)); tmp = 0.0; if ((w0 * t_1) <= 1e-155) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[w0_, M_, D_, h_, l_, d_] := Block[{t$95$0 = N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(1.0 - t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(w0 * t$95$1), $MachinePrecision], 1e-155], t$95$0, t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\\
t_1 := \sqrt{1 - t\_0}\\
\mathbf{if}\;w0 \cdot t\_1 \leq 10^{-155}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 w0 (sqrt.f64 (-.f64 #s(literal 1 binary64) (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l))))) < 1.00000000000000001e-155Initial program 86.9%
Taylor expanded in M around 0
Applied rewrites16.6%
if 1.00000000000000001e-155 < (*.f64 w0 (sqrt.f64 (-.f64 #s(literal 1 binary64) (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l))))) Initial program 72.9%
Taylor expanded in M around 0
Applied rewrites18.9%
(FPCore (w0 M D h l d) :precision binary64 (let* ((t_0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l))) (t_1 (- 1.0 t_0))) (if (<= (* w0 (sqrt t_1)) 1e-155) t_0 t_1)))
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) * (h / l);
double t_1 = 1.0 - t_0;
double tmp;
if ((w0 * sqrt(t_1)) <= 1e-155) {
tmp = t_0;
} else {
tmp = t_1;
}
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) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (((m * d) / (2.0d0 * d_1)) ** 2.0d0) * (h / l)
t_1 = 1.0d0 - t_0
if ((w0 * sqrt(t_1)) <= 1d-155) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
double t_0 = Math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l);
double t_1 = 1.0 - t_0;
double tmp;
if ((w0 * Math.sqrt(t_1)) <= 1e-155) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(w0, M, D, h, l, d): t_0 = math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l) t_1 = 1.0 - t_0 tmp = 0 if (w0 * math.sqrt(t_1)) <= 1e-155: tmp = t_0 else: tmp = t_1 return tmp
function code(w0, M, D, h, l, d) t_0 = Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l)) t_1 = Float64(1.0 - t_0) tmp = 0.0 if (Float64(w0 * sqrt(t_1)) <= 1e-155) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(w0, M, D, h, l, d) t_0 = (((M * D) / (2.0 * d)) ^ 2.0) * (h / l); t_1 = 1.0 - t_0; tmp = 0.0; if ((w0 * sqrt(t_1)) <= 1e-155) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[w0_, M_, D_, h_, l_, d_] := Block[{t$95$0 = N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 - t$95$0), $MachinePrecision]}, If[LessEqual[N[(w0 * N[Sqrt[t$95$1], $MachinePrecision]), $MachinePrecision], 1e-155], t$95$0, t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\\
t_1 := 1 - t\_0\\
\mathbf{if}\;w0 \cdot \sqrt{t\_1} \leq 10^{-155}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 w0 (sqrt.f64 (-.f64 #s(literal 1 binary64) (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l))))) < 1.00000000000000001e-155Initial program 86.9%
Taylor expanded in M around 0
Applied rewrites16.6%
if 1.00000000000000001e-155 < (*.f64 w0 (sqrt.f64 (-.f64 #s(literal 1 binary64) (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l))))) Initial program 72.9%
Taylor expanded in M around 0
Applied rewrites18.9%
(FPCore (w0 M D h l d) :precision binary64 (let* ((t_0 (pow (/ (* M D) (* 2.0 d)) 2.0)) (t_1 (* t_0 (/ h l)))) (if (<= (* w0 (sqrt (- 1.0 t_1))) -5e-297) t_1 t_0)))
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 t_1 = t_0 * (h / l);
double tmp;
if ((w0 * sqrt((1.0 - t_1))) <= -5e-297) {
tmp = t_1;
} else {
tmp = t_0;
}
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) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((m * d) / (2.0d0 * d_1)) ** 2.0d0
t_1 = t_0 * (h / l)
if ((w0 * sqrt((1.0d0 - t_1))) <= (-5d-297)) then
tmp = t_1
else
tmp = t_0
end if
code = tmp
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
double t_0 = Math.pow(((M * D) / (2.0 * d)), 2.0);
double t_1 = t_0 * (h / l);
double tmp;
if ((w0 * Math.sqrt((1.0 - t_1))) <= -5e-297) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(w0, M, D, h, l, d): t_0 = math.pow(((M * D) / (2.0 * d)), 2.0) t_1 = t_0 * (h / l) tmp = 0 if (w0 * math.sqrt((1.0 - t_1))) <= -5e-297: tmp = t_1 else: tmp = t_0 return tmp
function code(w0, M, D, h, l, d) t_0 = Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0 t_1 = Float64(t_0 * Float64(h / l)) tmp = 0.0 if (Float64(w0 * sqrt(Float64(1.0 - t_1))) <= -5e-297) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(w0, M, D, h, l, d) t_0 = ((M * D) / (2.0 * d)) ^ 2.0; t_1 = t_0 * (h / l); tmp = 0.0; if ((w0 * sqrt((1.0 - t_1))) <= -5e-297) tmp = t_1; else tmp = t_0; end tmp_2 = 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]}, Block[{t$95$1 = N[(t$95$0 * N[(h / l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(w0 * N[Sqrt[N[(1.0 - t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], -5e-297], t$95$1, t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\\
t_1 := t\_0 \cdot \frac{h}{\ell}\\
\mathbf{if}\;w0 \cdot \sqrt{1 - t\_1} \leq -5 \cdot 10^{-297}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if (*.f64 w0 (sqrt.f64 (-.f64 #s(literal 1 binary64) (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l))))) < -5e-297Initial program 84.2%
Taylor expanded in M around 0
Applied rewrites18.7%
if -5e-297 < (*.f64 w0 (sqrt.f64 (-.f64 #s(literal 1 binary64) (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l))))) Initial program 76.9%
Taylor expanded in M around 0
Applied rewrites16.7%
Taylor expanded in M around 0
Applied rewrites15.8%
(FPCore (w0 M D h l d) :precision binary64 (let* ((t_0 (/ (* M D) (* 2.0 d)))) (if (<= w0 -6e-286) t_0 (pow t_0 2.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 (w0 <= -6e-286) {
tmp = t_0;
} else {
tmp = pow(t_0, 2.0);
}
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) :: t_0
real(8) :: tmp
t_0 = (m * d) / (2.0d0 * d_1)
if (w0 <= (-6d-286)) then
tmp = t_0
else
tmp = t_0 ** 2.0d0
end if
code = tmp
end function
public static 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 (w0 <= -6e-286) {
tmp = t_0;
} else {
tmp = Math.pow(t_0, 2.0);
}
return tmp;
}
def code(w0, M, D, h, l, d): t_0 = (M * D) / (2.0 * d) tmp = 0 if w0 <= -6e-286: tmp = t_0 else: tmp = math.pow(t_0, 2.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 (w0 <= -6e-286) tmp = t_0; else tmp = t_0 ^ 2.0; end return tmp end
function tmp_2 = code(w0, M, D, h, l, d) t_0 = (M * D) / (2.0 * d); tmp = 0.0; if (w0 <= -6e-286) tmp = t_0; else tmp = t_0 ^ 2.0; end tmp_2 = 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[w0, -6e-286], t$95$0, N[Power[t$95$0, 2.0], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{M \cdot D}{2 \cdot d}\\
\mathbf{if}\;w0 \leq -6 \cdot 10^{-286}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;{t\_0}^{2}\\
\end{array}
\end{array}
if w0 < -6.0000000000000001e-286Initial program 78.5%
Taylor expanded in M around 0
Applied rewrites11.4%
if -6.0000000000000001e-286 < w0 Initial program 81.0%
Taylor expanded in M around 0
Applied rewrites16.8%
Taylor expanded in M around 0
Applied rewrites16.0%
(FPCore (w0 M D h l d) :precision binary64 (/ (* M D) (* 2.0 d)))
double code(double w0, double M, double D, double h, double l, double d) {
return (M * D) / (2.0 * d);
}
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 = (m * d) / (2.0d0 * d_1)
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
return (M * D) / (2.0 * d);
}
def code(w0, M, D, h, l, d): return (M * D) / (2.0 * d)
function code(w0, M, D, h, l, d) return Float64(Float64(M * D) / Float64(2.0 * d)) end
function tmp = code(w0, M, D, h, l, d) tmp = (M * D) / (2.0 * d); end
code[w0_, M_, D_, h_, l_, d_] := N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{M \cdot D}{2 \cdot d}
\end{array}
Initial program 79.9%
Taylor expanded in M around 0
Applied rewrites10.1%
(FPCore (w0 M D h l d) :precision binary64 (* M D))
double code(double w0, double M, double D, double h, double l, double d) {
return M * D;
}
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 = m * d
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
return M * D;
}
def code(w0, M, D, h, l, d): return M * D
function code(w0, M, D, h, l, d) return Float64(M * D) end
function tmp = code(w0, M, D, h, l, d) tmp = M * D; end
code[w0_, M_, D_, h_, l_, d_] := N[(M * D), $MachinePrecision]
\begin{array}{l}
\\
M \cdot D
\end{array}
Initial program 79.9%
Taylor expanded in M around 0
Applied rewrites10.2%
Taylor expanded in M around 0
Applied rewrites6.7%
(FPCore (w0 M D h l d) :precision binary64 (* 2.0 d))
double code(double w0, double M, double D, double h, double l, double d) {
return 2.0 * d;
}
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 = 2.0d0 * d_1
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
return 2.0 * d;
}
def code(w0, M, D, h, l, d): return 2.0 * d
function code(w0, M, D, h, l, d) return Float64(2.0 * d) end
function tmp = code(w0, M, D, h, l, d) tmp = 2.0 * d; end
code[w0_, M_, D_, h_, l_, d_] := N[(2.0 * d), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot d
\end{array}
Initial program 79.9%
Taylor expanded in M around 0
Applied rewrites9.2%
Taylor expanded in M around 0
Applied rewrites2.9%
herbie shell --seed 2024314
(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))))))