
(FPCore (c0 A V l) :precision binary64 (* c0 (sqrt (/ A (* V l)))))
double code(double c0, double A, double V, double l) {
return c0 * sqrt((A / (V * l)));
}
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
code = c0 * sqrt((a / (v * l)))
end function
public static double code(double c0, double A, double V, double l) {
return c0 * Math.sqrt((A / (V * l)));
}
def code(c0, A, V, l): return c0 * math.sqrt((A / (V * l)))
function code(c0, A, V, l) return Float64(c0 * sqrt(Float64(A / Float64(V * l)))) end
function tmp = code(c0, A, V, l) tmp = c0 * sqrt((A / (V * l))); end
code[c0_, A_, V_, l_] := N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (c0 A V l) :precision binary64 (* c0 (sqrt (/ A (* V l)))))
double code(double c0, double A, double V, double l) {
return c0 * sqrt((A / (V * l)));
}
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
code = c0 * sqrt((a / (v * l)))
end function
public static double code(double c0, double A, double V, double l) {
return c0 * Math.sqrt((A / (V * l)));
}
def code(c0, A, V, l): return c0 * math.sqrt((A / (V * l)))
function code(c0, A, V, l) return Float64(c0 * sqrt(Float64(A / Float64(V * l)))) end
function tmp = code(c0, A, V, l) tmp = c0 * sqrt((A / (V * l))); end
code[c0_, A_, V_, l_] := N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\end{array}
NOTE: V and l should be sorted in increasing order before calling this function. (FPCore (c0 A V l) :precision binary64 (* c0 (pow (/ (* (cbrt A) (cbrt (/ 1.0 V))) (cbrt l)) 1.5)))
assert(V < l);
double code(double c0, double A, double V, double l) {
return c0 * pow(((cbrt(A) * cbrt((1.0 / V))) / cbrt(l)), 1.5);
}
assert V < l;
public static double code(double c0, double A, double V, double l) {
return c0 * Math.pow(((Math.cbrt(A) * Math.cbrt((1.0 / V))) / Math.cbrt(l)), 1.5);
}
V, l = sort([V, l]) function code(c0, A, V, l) return Float64(c0 * (Float64(Float64(cbrt(A) * cbrt(Float64(1.0 / V))) / cbrt(l)) ^ 1.5)) end
NOTE: V and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := N[(c0 * N[Power[N[(N[(N[Power[A, 1/3], $MachinePrecision] * N[Power[N[(1.0 / V), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[V, l] = \mathsf{sort}([V, l])\\
\\
c0 \cdot {\left(\frac{\sqrt[3]{A} \cdot \sqrt[3]{\frac{1}{V}}}{\sqrt[3]{\ell}}\right)}^{1.5}
\end{array}
Initial program 73.2%
pow1/273.2%
add-cube-cbrt72.7%
pow372.7%
pow-pow72.6%
metadata-eval72.6%
Applied egg-rr72.6%
cbrt-div83.9%
*-rgt-identity83.9%
cbrt-div72.6%
frac-times74.4%
*-commutative74.4%
cbrt-prod84.2%
cbrt-div84.1%
metadata-eval84.1%
Applied egg-rr84.1%
associate-*l/84.1%
*-lft-identity84.1%
Simplified84.1%
div-inv84.1%
cbrt-prod96.7%
Applied egg-rr96.7%
Final simplification96.7%
NOTE: V and l should be sorted in increasing order before calling this function. (FPCore (c0 A V l) :precision binary64 (* c0 (pow (/ (/ (cbrt A) (cbrt V)) (cbrt l)) 1.5)))
assert(V < l);
double code(double c0, double A, double V, double l) {
return c0 * pow(((cbrt(A) / cbrt(V)) / cbrt(l)), 1.5);
}
assert V < l;
public static double code(double c0, double A, double V, double l) {
return c0 * Math.pow(((Math.cbrt(A) / Math.cbrt(V)) / Math.cbrt(l)), 1.5);
}
V, l = sort([V, l]) function code(c0, A, V, l) return Float64(c0 * (Float64(Float64(cbrt(A) / cbrt(V)) / cbrt(l)) ^ 1.5)) end
NOTE: V and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := N[(c0 * N[Power[N[(N[(N[Power[A, 1/3], $MachinePrecision] / N[Power[V, 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[V, l] = \mathsf{sort}([V, l])\\
\\
c0 \cdot {\left(\frac{\frac{\sqrt[3]{A}}{\sqrt[3]{V}}}{\sqrt[3]{\ell}}\right)}^{1.5}
\end{array}
Initial program 73.2%
pow1/273.2%
add-cube-cbrt72.7%
pow372.7%
pow-pow72.6%
metadata-eval72.6%
Applied egg-rr72.6%
cbrt-div83.9%
*-rgt-identity83.9%
cbrt-div72.6%
frac-times74.4%
*-commutative74.4%
cbrt-prod84.2%
cbrt-div84.1%
metadata-eval84.1%
Applied egg-rr84.1%
associate-*l/84.1%
*-lft-identity84.1%
Simplified84.1%
cbrt-div96.6%
div-inv96.6%
Applied egg-rr96.6%
associate-*r/96.6%
*-rgt-identity96.6%
Simplified96.6%
Final simplification96.6%
NOTE: V and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(if (<= (* V l) (- INFINITY))
(/ (/ c0 (sqrt (/ V A))) (sqrt l))
(if (<= (* V l) -1e-306)
(* c0 (/ (sqrt (- A)) (sqrt (* V (- l)))))
(if (or (<= (* V l) 2e-301) (not (<= (* V l) 1e+298)))
(* c0 (pow (/ (cbrt (/ A V)) (cbrt l)) 1.5))
(/ c0 (/ (sqrt (* V l)) (sqrt A)))))))assert(V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -((double) INFINITY)) {
tmp = (c0 / sqrt((V / A))) / sqrt(l);
} else if ((V * l) <= -1e-306) {
tmp = c0 * (sqrt(-A) / sqrt((V * -l)));
} else if (((V * l) <= 2e-301) || !((V * l) <= 1e+298)) {
tmp = c0 * pow((cbrt((A / V)) / cbrt(l)), 1.5);
} else {
tmp = c0 / (sqrt((V * l)) / sqrt(A));
}
return tmp;
}
assert V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -Double.POSITIVE_INFINITY) {
tmp = (c0 / Math.sqrt((V / A))) / Math.sqrt(l);
} else if ((V * l) <= -1e-306) {
tmp = c0 * (Math.sqrt(-A) / Math.sqrt((V * -l)));
} else if (((V * l) <= 2e-301) || !((V * l) <= 1e+298)) {
tmp = c0 * Math.pow((Math.cbrt((A / V)) / Math.cbrt(l)), 1.5);
} else {
tmp = c0 / (Math.sqrt((V * l)) / Math.sqrt(A));
}
return tmp;
}
V, l = sort([V, l]) function code(c0, A, V, l) tmp = 0.0 if (Float64(V * l) <= Float64(-Inf)) tmp = Float64(Float64(c0 / sqrt(Float64(V / A))) / sqrt(l)); elseif (Float64(V * l) <= -1e-306) tmp = Float64(c0 * Float64(sqrt(Float64(-A)) / sqrt(Float64(V * Float64(-l))))); elseif ((Float64(V * l) <= 2e-301) || !(Float64(V * l) <= 1e+298)) tmp = Float64(c0 * (Float64(cbrt(Float64(A / V)) / cbrt(l)) ^ 1.5)); else tmp = Float64(c0 / Float64(sqrt(Float64(V * l)) / sqrt(A))); end return tmp end
NOTE: V and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := If[LessEqual[N[(V * l), $MachinePrecision], (-Infinity)], N[(N[(c0 / N[Sqrt[N[(V / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -1e-306], N[(c0 * N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[N[(V * (-l)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(V * l), $MachinePrecision], 2e-301], N[Not[LessEqual[N[(V * l), $MachinePrecision], 1e+298]], $MachinePrecision]], N[(c0 * N[Power[N[(N[Power[N[(A / V), $MachinePrecision], 1/3], $MachinePrecision] / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision]), $MachinePrecision], N[(c0 / N[(N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[V, l] = \mathsf{sort}([V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -\infty:\\
\;\;\;\;\frac{\frac{c0}{\sqrt{\frac{V}{A}}}}{\sqrt{\ell}}\\
\mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-306}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\
\mathbf{elif}\;V \cdot \ell \leq 2 \cdot 10^{-301} \lor \neg \left(V \cdot \ell \leq 10^{+298}\right):\\
\;\;\;\;c0 \cdot {\left(\frac{\sqrt[3]{\frac{A}{V}}}{\sqrt[3]{\ell}}\right)}^{1.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\
\end{array}
\end{array}
if (*.f64 V l) < -inf.0Initial program 41.1%
associate-/r*76.5%
div-inv76.4%
Applied egg-rr76.4%
sqrt-prod37.8%
associate-*r*37.8%
sqrt-div37.8%
metadata-eval37.8%
div-inv37.9%
Applied egg-rr37.9%
sqrt-div0.0%
clear-num0.0%
un-div-inv0.0%
sqrt-undiv38.0%
Applied egg-rr38.0%
if -inf.0 < (*.f64 V l) < -1.00000000000000003e-306Initial program 87.5%
frac-2neg87.5%
sqrt-div99.5%
*-commutative99.5%
distribute-rgt-neg-in99.5%
Applied egg-rr99.5%
if -1.00000000000000003e-306 < (*.f64 V l) < 2.00000000000000013e-301 or 9.9999999999999996e297 < (*.f64 V l) Initial program 34.0%
pow1/234.0%
add-cube-cbrt34.0%
pow334.0%
pow-pow34.0%
metadata-eval34.0%
Applied egg-rr34.0%
cbrt-div36.8%
*-rgt-identity36.8%
cbrt-div34.0%
frac-times53.7%
*-commutative53.7%
cbrt-prod75.3%
cbrt-div75.3%
metadata-eval75.3%
Applied egg-rr75.3%
associate-*l/75.4%
*-lft-identity75.4%
Simplified75.4%
if 2.00000000000000013e-301 < (*.f64 V l) < 9.9999999999999996e297Initial program 82.6%
sqrt-div99.5%
associate-*r/96.0%
Applied egg-rr96.0%
associate-/l*99.6%
Simplified99.6%
Final simplification91.3%
NOTE: V and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(if (<= (* V l) (- INFINITY))
(/ (/ c0 (sqrt (/ V A))) (sqrt l))
(if (<= (* V l) -1e-306)
(* c0 (/ (sqrt (- A)) (sqrt (* V (- l)))))
(if (or (<= (* V l) 1e-318) (not (<= (* V l) 1e+298)))
(* c0 (pow (/ (cbrt (/ A l)) (cbrt V)) 1.5))
(/ c0 (/ (sqrt (* V l)) (sqrt A)))))))assert(V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -((double) INFINITY)) {
tmp = (c0 / sqrt((V / A))) / sqrt(l);
} else if ((V * l) <= -1e-306) {
tmp = c0 * (sqrt(-A) / sqrt((V * -l)));
} else if (((V * l) <= 1e-318) || !((V * l) <= 1e+298)) {
tmp = c0 * pow((cbrt((A / l)) / cbrt(V)), 1.5);
} else {
tmp = c0 / (sqrt((V * l)) / sqrt(A));
}
return tmp;
}
assert V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -Double.POSITIVE_INFINITY) {
tmp = (c0 / Math.sqrt((V / A))) / Math.sqrt(l);
} else if ((V * l) <= -1e-306) {
tmp = c0 * (Math.sqrt(-A) / Math.sqrt((V * -l)));
} else if (((V * l) <= 1e-318) || !((V * l) <= 1e+298)) {
tmp = c0 * Math.pow((Math.cbrt((A / l)) / Math.cbrt(V)), 1.5);
} else {
tmp = c0 / (Math.sqrt((V * l)) / Math.sqrt(A));
}
return tmp;
}
V, l = sort([V, l]) function code(c0, A, V, l) tmp = 0.0 if (Float64(V * l) <= Float64(-Inf)) tmp = Float64(Float64(c0 / sqrt(Float64(V / A))) / sqrt(l)); elseif (Float64(V * l) <= -1e-306) tmp = Float64(c0 * Float64(sqrt(Float64(-A)) / sqrt(Float64(V * Float64(-l))))); elseif ((Float64(V * l) <= 1e-318) || !(Float64(V * l) <= 1e+298)) tmp = Float64(c0 * (Float64(cbrt(Float64(A / l)) / cbrt(V)) ^ 1.5)); else tmp = Float64(c0 / Float64(sqrt(Float64(V * l)) / sqrt(A))); end return tmp end
NOTE: V and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := If[LessEqual[N[(V * l), $MachinePrecision], (-Infinity)], N[(N[(c0 / N[Sqrt[N[(V / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -1e-306], N[(c0 * N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[N[(V * (-l)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(V * l), $MachinePrecision], 1e-318], N[Not[LessEqual[N[(V * l), $MachinePrecision], 1e+298]], $MachinePrecision]], N[(c0 * N[Power[N[(N[Power[N[(A / l), $MachinePrecision], 1/3], $MachinePrecision] / N[Power[V, 1/3], $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision]), $MachinePrecision], N[(c0 / N[(N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[V, l] = \mathsf{sort}([V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -\infty:\\
\;\;\;\;\frac{\frac{c0}{\sqrt{\frac{V}{A}}}}{\sqrt{\ell}}\\
\mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-306}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\
\mathbf{elif}\;V \cdot \ell \leq 10^{-318} \lor \neg \left(V \cdot \ell \leq 10^{+298}\right):\\
\;\;\;\;c0 \cdot {\left(\frac{\sqrt[3]{\frac{A}{\ell}}}{\sqrt[3]{V}}\right)}^{1.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\
\end{array}
\end{array}
if (*.f64 V l) < -inf.0Initial program 41.1%
associate-/r*76.5%
div-inv76.4%
Applied egg-rr76.4%
sqrt-prod37.8%
associate-*r*37.8%
sqrt-div37.8%
metadata-eval37.8%
div-inv37.9%
Applied egg-rr37.9%
sqrt-div0.0%
clear-num0.0%
un-div-inv0.0%
sqrt-undiv38.0%
Applied egg-rr38.0%
if -inf.0 < (*.f64 V l) < -1.00000000000000003e-306Initial program 87.5%
frac-2neg87.5%
sqrt-div99.5%
*-commutative99.5%
distribute-rgt-neg-in99.5%
Applied egg-rr99.5%
if -1.00000000000000003e-306 < (*.f64 V l) < 9.9999875e-319 or 9.9999999999999996e297 < (*.f64 V l) Initial program 34.6%
pow1/234.6%
add-cube-cbrt34.6%
pow334.6%
pow-pow34.6%
metadata-eval34.6%
Applied egg-rr34.6%
*-un-lft-identity34.6%
frac-times54.7%
*-commutative54.7%
cbrt-prod80.0%
cbrt-div80.1%
metadata-eval80.1%
Applied egg-rr80.1%
associate-*r/80.3%
*-rgt-identity80.3%
Simplified80.3%
if 9.9999875e-319 < (*.f64 V l) < 9.9999999999999996e297Initial program 81.8%
sqrt-div99.5%
associate-*r/96.0%
Applied egg-rr96.0%
associate-/l*99.6%
Simplified99.6%
Final simplification92.3%
NOTE: V and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(if (<= (* V l) -1e-306)
(* c0 (/ (/ (sqrt (- A)) (sqrt (- V))) (sqrt l)))
(if (or (<= (* V l) 1e-318) (not (<= (* V l) 1e+298)))
(* c0 (pow (/ (cbrt (/ A l)) (cbrt V)) 1.5))
(/ c0 (/ (sqrt (* V l)) (sqrt A))))))assert(V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -1e-306) {
tmp = c0 * ((sqrt(-A) / sqrt(-V)) / sqrt(l));
} else if (((V * l) <= 1e-318) || !((V * l) <= 1e+298)) {
tmp = c0 * pow((cbrt((A / l)) / cbrt(V)), 1.5);
} else {
tmp = c0 / (sqrt((V * l)) / sqrt(A));
}
return tmp;
}
assert V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -1e-306) {
tmp = c0 * ((Math.sqrt(-A) / Math.sqrt(-V)) / Math.sqrt(l));
} else if (((V * l) <= 1e-318) || !((V * l) <= 1e+298)) {
tmp = c0 * Math.pow((Math.cbrt((A / l)) / Math.cbrt(V)), 1.5);
} else {
tmp = c0 / (Math.sqrt((V * l)) / Math.sqrt(A));
}
return tmp;
}
V, l = sort([V, l]) function code(c0, A, V, l) tmp = 0.0 if (Float64(V * l) <= -1e-306) tmp = Float64(c0 * Float64(Float64(sqrt(Float64(-A)) / sqrt(Float64(-V))) / sqrt(l))); elseif ((Float64(V * l) <= 1e-318) || !(Float64(V * l) <= 1e+298)) tmp = Float64(c0 * (Float64(cbrt(Float64(A / l)) / cbrt(V)) ^ 1.5)); else tmp = Float64(c0 / Float64(sqrt(Float64(V * l)) / sqrt(A))); end return tmp end
NOTE: V and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := If[LessEqual[N[(V * l), $MachinePrecision], -1e-306], N[(c0 * N[(N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[(-V)], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(V * l), $MachinePrecision], 1e-318], N[Not[LessEqual[N[(V * l), $MachinePrecision], 1e+298]], $MachinePrecision]], N[(c0 * N[Power[N[(N[Power[N[(A / l), $MachinePrecision], 1/3], $MachinePrecision] / N[Power[V, 1/3], $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision]), $MachinePrecision], N[(c0 / N[(N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[V, l] = \mathsf{sort}([V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -1 \cdot 10^{-306}:\\
\;\;\;\;c0 \cdot \frac{\frac{\sqrt{-A}}{\sqrt{-V}}}{\sqrt{\ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 10^{-318} \lor \neg \left(V \cdot \ell \leq 10^{+298}\right):\\
\;\;\;\;c0 \cdot {\left(\frac{\sqrt[3]{\frac{A}{\ell}}}{\sqrt[3]{V}}\right)}^{1.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\
\end{array}
\end{array}
if (*.f64 V l) < -1.00000000000000003e-306Initial program 81.1%
associate-/r*81.6%
sqrt-div47.2%
Applied egg-rr47.2%
frac-2neg47.2%
sqrt-div51.4%
Applied egg-rr51.4%
if -1.00000000000000003e-306 < (*.f64 V l) < 9.9999875e-319 or 9.9999999999999996e297 < (*.f64 V l) Initial program 34.6%
pow1/234.6%
add-cube-cbrt34.6%
pow334.6%
pow-pow34.6%
metadata-eval34.6%
Applied egg-rr34.6%
*-un-lft-identity34.6%
frac-times54.7%
*-commutative54.7%
cbrt-prod80.0%
cbrt-div80.1%
metadata-eval80.1%
Applied egg-rr80.1%
associate-*r/80.3%
*-rgt-identity80.3%
Simplified80.3%
if 9.9999875e-319 < (*.f64 V l) < 9.9999999999999996e297Initial program 81.8%
sqrt-div99.5%
associate-*r/96.0%
Applied egg-rr96.0%
associate-/l*99.6%
Simplified99.6%
Final simplification74.3%
NOTE: V and l should be sorted in increasing order before calling this function. (FPCore (c0 A V l) :precision binary64 (if (<= V -5e-310) (* c0 (pow (/ (cbrt A) (cbrt (* V l))) 1.5)) (* c0 (/ (* (sqrt A) (pow l -0.5)) (sqrt V)))))
assert(V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if (V <= -5e-310) {
tmp = c0 * pow((cbrt(A) / cbrt((V * l))), 1.5);
} else {
tmp = c0 * ((sqrt(A) * pow(l, -0.5)) / sqrt(V));
}
return tmp;
}
assert V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if (V <= -5e-310) {
tmp = c0 * Math.pow((Math.cbrt(A) / Math.cbrt((V * l))), 1.5);
} else {
tmp = c0 * ((Math.sqrt(A) * Math.pow(l, -0.5)) / Math.sqrt(V));
}
return tmp;
}
V, l = sort([V, l]) function code(c0, A, V, l) tmp = 0.0 if (V <= -5e-310) tmp = Float64(c0 * (Float64(cbrt(A) / cbrt(Float64(V * l))) ^ 1.5)); else tmp = Float64(c0 * Float64(Float64(sqrt(A) * (l ^ -0.5)) / sqrt(V))); end return tmp end
NOTE: V and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := If[LessEqual[V, -5e-310], N[(c0 * N[Power[N[(N[Power[A, 1/3], $MachinePrecision] / N[Power[N[(V * l), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision]), $MachinePrecision], N[(c0 * N[(N[(N[Sqrt[A], $MachinePrecision] * N[Power[l, -0.5], $MachinePrecision]), $MachinePrecision] / N[Sqrt[V], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[V, l] = \mathsf{sort}([V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \leq -5 \cdot 10^{-310}:\\
\;\;\;\;c0 \cdot {\left(\frac{\sqrt[3]{A}}{\sqrt[3]{V \cdot \ell}}\right)}^{1.5}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A} \cdot {\ell}^{-0.5}}{\sqrt{V}}\\
\end{array}
\end{array}
if V < -4.999999999999985e-310Initial program 75.0%
pow1/275.0%
add-cube-cbrt74.4%
pow374.4%
pow-pow74.4%
metadata-eval74.4%
Applied egg-rr74.4%
cbrt-div84.2%
div-inv84.1%
Applied egg-rr84.1%
associate-*r/84.2%
*-rgt-identity84.2%
Simplified84.2%
if -4.999999999999985e-310 < V Initial program 71.1%
pow1/271.1%
add-cube-cbrt70.6%
pow370.6%
pow-pow70.6%
metadata-eval70.6%
Applied egg-rr70.6%
cbrt-div83.5%
*-rgt-identity83.5%
cbrt-div70.6%
frac-times70.3%
*-commutative70.3%
cbrt-prod82.1%
cbrt-div82.0%
metadata-eval82.0%
Applied egg-rr82.0%
associate-*l/82.0%
*-lft-identity82.0%
Simplified82.0%
add-sqr-sqrt82.0%
sqrt-unprod70.2%
pow-prod-up70.2%
metadata-eval70.2%
pow370.2%
frac-times70.2%
times-frac70.2%
add-cube-cbrt70.4%
add-cube-cbrt70.9%
sqrt-div40.9%
div-inv40.9%
sqrt-div47.5%
associate-*l/47.5%
Applied egg-rr47.6%
Final simplification67.2%
NOTE: V and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (/ (/ c0 (sqrt (/ V A))) (sqrt l))))
(if (<= (* V l) (- INFINITY))
t_0
(if (<= (* V l) -5e-291)
(* c0 (/ (sqrt (- A)) (sqrt (* V (- l)))))
(if (<= (* V l) 0.0)
t_0
(if (<= (* V l) 1e+298)
(/ c0 (/ (sqrt (* V l)) (sqrt A)))
(* c0 (sqrt (/ (/ A l) V)))))))))assert(V < l);
double code(double c0, double A, double V, double l) {
double t_0 = (c0 / sqrt((V / A))) / sqrt(l);
double tmp;
if ((V * l) <= -((double) INFINITY)) {
tmp = t_0;
} else if ((V * l) <= -5e-291) {
tmp = c0 * (sqrt(-A) / sqrt((V * -l)));
} else if ((V * l) <= 0.0) {
tmp = t_0;
} else if ((V * l) <= 1e+298) {
tmp = c0 / (sqrt((V * l)) / sqrt(A));
} else {
tmp = c0 * sqrt(((A / l) / V));
}
return tmp;
}
assert V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = (c0 / Math.sqrt((V / A))) / Math.sqrt(l);
double tmp;
if ((V * l) <= -Double.POSITIVE_INFINITY) {
tmp = t_0;
} else if ((V * l) <= -5e-291) {
tmp = c0 * (Math.sqrt(-A) / Math.sqrt((V * -l)));
} else if ((V * l) <= 0.0) {
tmp = t_0;
} else if ((V * l) <= 1e+298) {
tmp = c0 / (Math.sqrt((V * l)) / Math.sqrt(A));
} else {
tmp = c0 * Math.sqrt(((A / l) / V));
}
return tmp;
}
[V, l] = sort([V, l]) def code(c0, A, V, l): t_0 = (c0 / math.sqrt((V / A))) / math.sqrt(l) tmp = 0 if (V * l) <= -math.inf: tmp = t_0 elif (V * l) <= -5e-291: tmp = c0 * (math.sqrt(-A) / math.sqrt((V * -l))) elif (V * l) <= 0.0: tmp = t_0 elif (V * l) <= 1e+298: tmp = c0 / (math.sqrt((V * l)) / math.sqrt(A)) else: tmp = c0 * math.sqrt(((A / l) / V)) return tmp
V, l = sort([V, l]) function code(c0, A, V, l) t_0 = Float64(Float64(c0 / sqrt(Float64(V / A))) / sqrt(l)) tmp = 0.0 if (Float64(V * l) <= Float64(-Inf)) tmp = t_0; elseif (Float64(V * l) <= -5e-291) tmp = Float64(c0 * Float64(sqrt(Float64(-A)) / sqrt(Float64(V * Float64(-l))))); elseif (Float64(V * l) <= 0.0) tmp = t_0; elseif (Float64(V * l) <= 1e+298) tmp = Float64(c0 / Float64(sqrt(Float64(V * l)) / sqrt(A))); else tmp = Float64(c0 * sqrt(Float64(Float64(A / l) / V))); end return tmp end
V, l = num2cell(sort([V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = (c0 / sqrt((V / A))) / sqrt(l);
tmp = 0.0;
if ((V * l) <= -Inf)
tmp = t_0;
elseif ((V * l) <= -5e-291)
tmp = c0 * (sqrt(-A) / sqrt((V * -l)));
elseif ((V * l) <= 0.0)
tmp = t_0;
elseif ((V * l) <= 1e+298)
tmp = c0 / (sqrt((V * l)) / sqrt(A));
else
tmp = c0 * sqrt(((A / l) / V));
end
tmp_2 = tmp;
end
NOTE: V and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(N[(c0 / N[Sqrt[N[(V / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(V * l), $MachinePrecision], (-Infinity)], t$95$0, If[LessEqual[N[(V * l), $MachinePrecision], -5e-291], N[(c0 * N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[N[(V * (-l)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 0.0], t$95$0, If[LessEqual[N[(V * l), $MachinePrecision], 1e+298], N[(c0 / N[(N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[Sqrt[N[(N[(A / l), $MachinePrecision] / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[V, l] = \mathsf{sort}([V, l])\\
\\
\begin{array}{l}
t_0 := \frac{\frac{c0}{\sqrt{\frac{V}{A}}}}{\sqrt{\ell}}\\
\mathbf{if}\;V \cdot \ell \leq -\infty:\\
\;\;\;\;t_0\\
\mathbf{elif}\;V \cdot \ell \leq -5 \cdot 10^{-291}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\
\mathbf{elif}\;V \cdot \ell \leq 0:\\
\;\;\;\;t_0\\
\mathbf{elif}\;V \cdot \ell \leq 10^{+298}:\\
\;\;\;\;\frac{c0}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\
\end{array}
\end{array}
if (*.f64 V l) < -inf.0 or -5.0000000000000003e-291 < (*.f64 V l) < -0.0Initial program 38.6%
associate-/r*58.3%
div-inv58.3%
Applied egg-rr58.3%
sqrt-prod42.3%
associate-*r*42.3%
sqrt-div42.3%
metadata-eval42.3%
div-inv42.4%
Applied egg-rr42.4%
sqrt-div14.5%
clear-num14.5%
un-div-inv14.5%
sqrt-undiv42.4%
Applied egg-rr42.4%
if -inf.0 < (*.f64 V l) < -5.0000000000000003e-291Initial program 87.2%
frac-2neg87.2%
sqrt-div99.5%
*-commutative99.5%
distribute-rgt-neg-in99.5%
Applied egg-rr99.5%
if -0.0 < (*.f64 V l) < 9.9999999999999996e297Initial program 81.4%
sqrt-div98.9%
associate-*r/95.5%
Applied egg-rr95.5%
associate-/l*99.1%
Simplified99.1%
if 9.9999999999999996e297 < (*.f64 V l) Initial program 36.8%
associate-/r*71.3%
div-inv71.3%
Applied egg-rr71.3%
associate-*l/71.3%
div-inv71.3%
Applied egg-rr71.3%
Final simplification87.1%
NOTE: V and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(if (<= (* V l) (- INFINITY))
(/ (/ c0 (sqrt (/ V A))) (sqrt l))
(if (<= (* V l) -2e-270)
(* c0 (/ (sqrt (- A)) (sqrt (* V (- l)))))
(if (<= (* V l) 2e-301)
(* c0 (/ (sqrt (/ (- A) l)) (sqrt (- V))))
(if (<= (* V l) 1e+298)
(/ c0 (/ (sqrt (* V l)) (sqrt A)))
(* c0 (sqrt (/ (/ A l) V))))))))assert(V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -((double) INFINITY)) {
tmp = (c0 / sqrt((V / A))) / sqrt(l);
} else if ((V * l) <= -2e-270) {
tmp = c0 * (sqrt(-A) / sqrt((V * -l)));
} else if ((V * l) <= 2e-301) {
tmp = c0 * (sqrt((-A / l)) / sqrt(-V));
} else if ((V * l) <= 1e+298) {
tmp = c0 / (sqrt((V * l)) / sqrt(A));
} else {
tmp = c0 * sqrt(((A / l) / V));
}
return tmp;
}
assert V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -Double.POSITIVE_INFINITY) {
tmp = (c0 / Math.sqrt((V / A))) / Math.sqrt(l);
} else if ((V * l) <= -2e-270) {
tmp = c0 * (Math.sqrt(-A) / Math.sqrt((V * -l)));
} else if ((V * l) <= 2e-301) {
tmp = c0 * (Math.sqrt((-A / l)) / Math.sqrt(-V));
} else if ((V * l) <= 1e+298) {
tmp = c0 / (Math.sqrt((V * l)) / Math.sqrt(A));
} else {
tmp = c0 * Math.sqrt(((A / l) / V));
}
return tmp;
}
[V, l] = sort([V, l]) def code(c0, A, V, l): tmp = 0 if (V * l) <= -math.inf: tmp = (c0 / math.sqrt((V / A))) / math.sqrt(l) elif (V * l) <= -2e-270: tmp = c0 * (math.sqrt(-A) / math.sqrt((V * -l))) elif (V * l) <= 2e-301: tmp = c0 * (math.sqrt((-A / l)) / math.sqrt(-V)) elif (V * l) <= 1e+298: tmp = c0 / (math.sqrt((V * l)) / math.sqrt(A)) else: tmp = c0 * math.sqrt(((A / l) / V)) return tmp
V, l = sort([V, l]) function code(c0, A, V, l) tmp = 0.0 if (Float64(V * l) <= Float64(-Inf)) tmp = Float64(Float64(c0 / sqrt(Float64(V / A))) / sqrt(l)); elseif (Float64(V * l) <= -2e-270) tmp = Float64(c0 * Float64(sqrt(Float64(-A)) / sqrt(Float64(V * Float64(-l))))); elseif (Float64(V * l) <= 2e-301) tmp = Float64(c0 * Float64(sqrt(Float64(Float64(-A) / l)) / sqrt(Float64(-V)))); elseif (Float64(V * l) <= 1e+298) tmp = Float64(c0 / Float64(sqrt(Float64(V * l)) / sqrt(A))); else tmp = Float64(c0 * sqrt(Float64(Float64(A / l) / V))); end return tmp end
V, l = num2cell(sort([V, l])){:}
function tmp_2 = code(c0, A, V, l)
tmp = 0.0;
if ((V * l) <= -Inf)
tmp = (c0 / sqrt((V / A))) / sqrt(l);
elseif ((V * l) <= -2e-270)
tmp = c0 * (sqrt(-A) / sqrt((V * -l)));
elseif ((V * l) <= 2e-301)
tmp = c0 * (sqrt((-A / l)) / sqrt(-V));
elseif ((V * l) <= 1e+298)
tmp = c0 / (sqrt((V * l)) / sqrt(A));
else
tmp = c0 * sqrt(((A / l) / V));
end
tmp_2 = tmp;
end
NOTE: V and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := If[LessEqual[N[(V * l), $MachinePrecision], (-Infinity)], N[(N[(c0 / N[Sqrt[N[(V / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -2e-270], N[(c0 * N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[N[(V * (-l)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 2e-301], N[(c0 * N[(N[Sqrt[N[((-A) / l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[(-V)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 1e+298], N[(c0 / N[(N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[Sqrt[N[(N[(A / l), $MachinePrecision] / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[V, l] = \mathsf{sort}([V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -\infty:\\
\;\;\;\;\frac{\frac{c0}{\sqrt{\frac{V}{A}}}}{\sqrt{\ell}}\\
\mathbf{elif}\;V \cdot \ell \leq -2 \cdot 10^{-270}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\
\mathbf{elif}\;V \cdot \ell \leq 2 \cdot 10^{-301}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{\frac{-A}{\ell}}}{\sqrt{-V}}\\
\mathbf{elif}\;V \cdot \ell \leq 10^{+298}:\\
\;\;\;\;\frac{c0}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\
\end{array}
\end{array}
if (*.f64 V l) < -inf.0Initial program 41.1%
associate-/r*76.5%
div-inv76.4%
Applied egg-rr76.4%
sqrt-prod37.8%
associate-*r*37.8%
sqrt-div37.8%
metadata-eval37.8%
div-inv37.9%
Applied egg-rr37.9%
sqrt-div0.0%
clear-num0.0%
un-div-inv0.0%
sqrt-undiv38.0%
Applied egg-rr38.0%
if -inf.0 < (*.f64 V l) < -2.0000000000000001e-270Initial program 87.8%
frac-2neg87.8%
sqrt-div99.5%
*-commutative99.5%
distribute-rgt-neg-in99.5%
Applied egg-rr99.5%
if -2.0000000000000001e-270 < (*.f64 V l) < 2.00000000000000013e-301Initial program 39.2%
associate-/r*50.9%
div-inv50.9%
Applied egg-rr50.9%
associate-*l/50.9%
div-inv50.9%
Applied egg-rr50.9%
frac-2neg50.9%
sqrt-div54.5%
Applied egg-rr54.5%
distribute-frac-neg54.5%
Simplified54.5%
if 2.00000000000000013e-301 < (*.f64 V l) < 9.9999999999999996e297Initial program 82.6%
sqrt-div99.5%
associate-*r/96.0%
Applied egg-rr96.0%
associate-/l*99.6%
Simplified99.6%
if 9.9999999999999996e297 < (*.f64 V l) Initial program 36.8%
associate-/r*71.3%
div-inv71.3%
Applied egg-rr71.3%
associate-*l/71.3%
div-inv71.3%
Applied egg-rr71.3%
Final simplification87.6%
NOTE: V and l should be sorted in increasing order before calling this function. (FPCore (c0 A V l) :precision binary64 (if (<= l -1e-310) (* c0 (sqrt (* (/ A V) (/ 1.0 l)))) (* c0 (/ (sqrt (/ A V)) (sqrt l)))))
assert(V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if (l <= -1e-310) {
tmp = c0 * sqrt(((A / V) * (1.0 / l)));
} else {
tmp = c0 * (sqrt((A / V)) / sqrt(l));
}
return tmp;
}
NOTE: V and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: tmp
if (l <= (-1d-310)) then
tmp = c0 * sqrt(((a / v) * (1.0d0 / l)))
else
tmp = c0 * (sqrt((a / v)) / sqrt(l))
end if
code = tmp
end function
assert V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if (l <= -1e-310) {
tmp = c0 * Math.sqrt(((A / V) * (1.0 / l)));
} else {
tmp = c0 * (Math.sqrt((A / V)) / Math.sqrt(l));
}
return tmp;
}
[V, l] = sort([V, l]) def code(c0, A, V, l): tmp = 0 if l <= -1e-310: tmp = c0 * math.sqrt(((A / V) * (1.0 / l))) else: tmp = c0 * (math.sqrt((A / V)) / math.sqrt(l)) return tmp
V, l = sort([V, l]) function code(c0, A, V, l) tmp = 0.0 if (l <= -1e-310) tmp = Float64(c0 * sqrt(Float64(Float64(A / V) * Float64(1.0 / l)))); else tmp = Float64(c0 * Float64(sqrt(Float64(A / V)) / sqrt(l))); end return tmp end
V, l = num2cell(sort([V, l])){:}
function tmp_2 = code(c0, A, V, l)
tmp = 0.0;
if (l <= -1e-310)
tmp = c0 * sqrt(((A / V) * (1.0 / l)));
else
tmp = c0 * (sqrt((A / V)) / sqrt(l));
end
tmp_2 = tmp;
end
NOTE: V and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := If[LessEqual[l, -1e-310], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] * N[(1.0 / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0 * N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[V, l] = \mathsf{sort}([V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1 \cdot 10^{-310}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{A}{V} \cdot \frac{1}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\
\end{array}
\end{array}
if l < -9.999999999999969e-311Initial program 74.7%
associate-/r*74.5%
div-inv74.5%
Applied egg-rr74.5%
if -9.999999999999969e-311 < l Initial program 71.7%
associate-/r*75.3%
sqrt-div85.8%
Applied egg-rr85.8%
Final simplification80.3%
NOTE: V and l should be sorted in increasing order before calling this function. (FPCore (c0 A V l) :precision binary64 (if (<= A 2.9e-295) (* c0 (/ (sqrt (/ A V)) (sqrt l))) (* c0 (/ (sqrt A) (sqrt (* V l))))))
assert(V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if (A <= 2.9e-295) {
tmp = c0 * (sqrt((A / V)) / sqrt(l));
} else {
tmp = c0 * (sqrt(A) / sqrt((V * l)));
}
return tmp;
}
NOTE: V and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: tmp
if (a <= 2.9d-295) then
tmp = c0 * (sqrt((a / v)) / sqrt(l))
else
tmp = c0 * (sqrt(a) / sqrt((v * l)))
end if
code = tmp
end function
assert V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if (A <= 2.9e-295) {
tmp = c0 * (Math.sqrt((A / V)) / Math.sqrt(l));
} else {
tmp = c0 * (Math.sqrt(A) / Math.sqrt((V * l)));
}
return tmp;
}
[V, l] = sort([V, l]) def code(c0, A, V, l): tmp = 0 if A <= 2.9e-295: tmp = c0 * (math.sqrt((A / V)) / math.sqrt(l)) else: tmp = c0 * (math.sqrt(A) / math.sqrt((V * l))) return tmp
V, l = sort([V, l]) function code(c0, A, V, l) tmp = 0.0 if (A <= 2.9e-295) tmp = Float64(c0 * Float64(sqrt(Float64(A / V)) / sqrt(l))); else tmp = Float64(c0 * Float64(sqrt(A) / sqrt(Float64(V * l)))); end return tmp end
V, l = num2cell(sort([V, l])){:}
function tmp_2 = code(c0, A, V, l)
tmp = 0.0;
if (A <= 2.9e-295)
tmp = c0 * (sqrt((A / V)) / sqrt(l));
else
tmp = c0 * (sqrt(A) / sqrt((V * l)));
end
tmp_2 = tmp;
end
NOTE: V and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := If[LessEqual[A, 2.9e-295], N[(c0 * N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[V, l] = \mathsf{sort}([V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;A \leq 2.9 \cdot 10^{-295}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\
\end{array}
\end{array}
if A < 2.90000000000000015e-295Initial program 75.4%
associate-/r*78.0%
sqrt-div48.5%
Applied egg-rr48.5%
if 2.90000000000000015e-295 < A Initial program 70.6%
sqrt-div84.6%
associate-*r/81.8%
Applied egg-rr81.8%
*-commutative81.8%
associate-*l/84.6%
Simplified84.6%
Final simplification65.4%
NOTE: V and l should be sorted in increasing order before calling this function. (FPCore (c0 A V l) :precision binary64 (if (<= A 2.9e-295) (* c0 (/ (sqrt (/ A V)) (sqrt l))) (/ c0 (/ (sqrt (* V l)) (sqrt A)))))
assert(V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if (A <= 2.9e-295) {
tmp = c0 * (sqrt((A / V)) / sqrt(l));
} else {
tmp = c0 / (sqrt((V * l)) / sqrt(A));
}
return tmp;
}
NOTE: V and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: tmp
if (a <= 2.9d-295) then
tmp = c0 * (sqrt((a / v)) / sqrt(l))
else
tmp = c0 / (sqrt((v * l)) / sqrt(a))
end if
code = tmp
end function
assert V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if (A <= 2.9e-295) {
tmp = c0 * (Math.sqrt((A / V)) / Math.sqrt(l));
} else {
tmp = c0 / (Math.sqrt((V * l)) / Math.sqrt(A));
}
return tmp;
}
[V, l] = sort([V, l]) def code(c0, A, V, l): tmp = 0 if A <= 2.9e-295: tmp = c0 * (math.sqrt((A / V)) / math.sqrt(l)) else: tmp = c0 / (math.sqrt((V * l)) / math.sqrt(A)) return tmp
V, l = sort([V, l]) function code(c0, A, V, l) tmp = 0.0 if (A <= 2.9e-295) tmp = Float64(c0 * Float64(sqrt(Float64(A / V)) / sqrt(l))); else tmp = Float64(c0 / Float64(sqrt(Float64(V * l)) / sqrt(A))); end return tmp end
V, l = num2cell(sort([V, l])){:}
function tmp_2 = code(c0, A, V, l)
tmp = 0.0;
if (A <= 2.9e-295)
tmp = c0 * (sqrt((A / V)) / sqrt(l));
else
tmp = c0 / (sqrt((V * l)) / sqrt(A));
end
tmp_2 = tmp;
end
NOTE: V and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := If[LessEqual[A, 2.9e-295], N[(c0 * N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 / N[(N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[V, l] = \mathsf{sort}([V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;A \leq 2.9 \cdot 10^{-295}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\
\end{array}
\end{array}
if A < 2.90000000000000015e-295Initial program 75.4%
associate-/r*78.0%
sqrt-div48.5%
Applied egg-rr48.5%
if 2.90000000000000015e-295 < A Initial program 70.6%
sqrt-div84.6%
associate-*r/81.8%
Applied egg-rr81.8%
associate-/l*84.7%
Simplified84.7%
Final simplification65.5%
NOTE: V and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (/ A (* V l))))
(if (<= t_0 5e-317)
(* c0 (sqrt (/ (/ A V) l)))
(if (<= t_0 1e+280)
(/ c0 (sqrt (/ (* V l) A)))
(* c0 (pow (/ V (/ A l)) -0.5))))))assert(V < l);
double code(double c0, double A, double V, double l) {
double t_0 = A / (V * l);
double tmp;
if (t_0 <= 5e-317) {
tmp = c0 * sqrt(((A / V) / l));
} else if (t_0 <= 1e+280) {
tmp = c0 / sqrt(((V * l) / A));
} else {
tmp = c0 * pow((V / (A / l)), -0.5);
}
return tmp;
}
NOTE: V and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: tmp
t_0 = a / (v * l)
if (t_0 <= 5d-317) then
tmp = c0 * sqrt(((a / v) / l))
else if (t_0 <= 1d+280) then
tmp = c0 / sqrt(((v * l) / a))
else
tmp = c0 * ((v / (a / l)) ** (-0.5d0))
end if
code = tmp
end function
assert V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = A / (V * l);
double tmp;
if (t_0 <= 5e-317) {
tmp = c0 * Math.sqrt(((A / V) / l));
} else if (t_0 <= 1e+280) {
tmp = c0 / Math.sqrt(((V * l) / A));
} else {
tmp = c0 * Math.pow((V / (A / l)), -0.5);
}
return tmp;
}
[V, l] = sort([V, l]) def code(c0, A, V, l): t_0 = A / (V * l) tmp = 0 if t_0 <= 5e-317: tmp = c0 * math.sqrt(((A / V) / l)) elif t_0 <= 1e+280: tmp = c0 / math.sqrt(((V * l) / A)) else: tmp = c0 * math.pow((V / (A / l)), -0.5) return tmp
V, l = sort([V, l]) function code(c0, A, V, l) t_0 = Float64(A / Float64(V * l)) tmp = 0.0 if (t_0 <= 5e-317) tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); elseif (t_0 <= 1e+280) tmp = Float64(c0 / sqrt(Float64(Float64(V * l) / A))); else tmp = Float64(c0 * (Float64(V / Float64(A / l)) ^ -0.5)); end return tmp end
V, l = num2cell(sort([V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = A / (V * l);
tmp = 0.0;
if (t_0 <= 5e-317)
tmp = c0 * sqrt(((A / V) / l));
elseif (t_0 <= 1e+280)
tmp = c0 / sqrt(((V * l) / A));
else
tmp = c0 * ((V / (A / l)) ^ -0.5);
end
tmp_2 = tmp;
end
NOTE: V and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 5e-317], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+280], N[(c0 / N[Sqrt[N[(N[(V * l), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0 * N[Power[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[V, l] = \mathsf{sort}([V, l])\\
\\
\begin{array}{l}
t_0 := \frac{A}{V \cdot \ell}\\
\mathbf{if}\;t_0 \leq 5 \cdot 10^{-317}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;t_0 \leq 10^{+280}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot {\left(\frac{V}{\frac{A}{\ell}}\right)}^{-0.5}\\
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 5.00000017e-317Initial program 44.3%
associate-/r*63.6%
div-inv63.6%
Applied egg-rr63.6%
un-div-inv63.6%
Applied egg-rr63.6%
if 5.00000017e-317 < (/.f64 A (*.f64 V l)) < 1e280Initial program 99.5%
pow1/299.5%
add-cube-cbrt98.7%
pow398.7%
pow-pow98.6%
metadata-eval98.6%
Applied egg-rr98.6%
cbrt-div98.4%
*-rgt-identity98.4%
cbrt-div98.6%
frac-times92.7%
*-commutative92.7%
cbrt-prod92.7%
cbrt-div92.5%
metadata-eval92.5%
Applied egg-rr92.5%
associate-*l/92.5%
*-lft-identity92.5%
Simplified92.5%
add-sqr-sqrt92.5%
sqrt-unprod92.5%
pow-prod-up92.6%
metadata-eval92.6%
pow392.6%
frac-times92.5%
times-frac92.5%
add-cube-cbrt93.0%
add-cube-cbrt93.5%
sqrt-div52.0%
associate-*r/49.0%
associate-/l*52.0%
Applied egg-rr92.5%
expm1-log1p-u62.9%
expm1-udef29.9%
associate-*r/31.7%
*-commutative31.7%
sqrt-undiv16.3%
clear-num16.3%
sqrt-undiv31.7%
*-commutative31.7%
associate-*r/29.9%
Applied egg-rr29.9%
expm1-def63.1%
expm1-log1p92.8%
*-commutative92.8%
associate-*l/99.6%
Simplified99.6%
if 1e280 < (/.f64 A (*.f64 V l)) Initial program 34.0%
pow1/234.0%
clear-num34.0%
inv-pow34.0%
pow-pow37.1%
associate-/l*44.4%
metadata-eval44.4%
Applied egg-rr44.4%
Final simplification79.5%
NOTE: V and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (/ A (* V l))))
(if (<= t_0 0.0)
(* c0 (sqrt (/ (/ A V) l)))
(if (<= t_0 1e+280) (* c0 (sqrt t_0)) (/ c0 (sqrt (* V (/ l A))))))))assert(V < l);
double code(double c0, double A, double V, double l) {
double t_0 = A / (V * l);
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * sqrt(((A / V) / l));
} else if (t_0 <= 1e+280) {
tmp = c0 * sqrt(t_0);
} else {
tmp = c0 / sqrt((V * (l / A)));
}
return tmp;
}
NOTE: V and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: tmp
t_0 = a / (v * l)
if (t_0 <= 0.0d0) then
tmp = c0 * sqrt(((a / v) / l))
else if (t_0 <= 1d+280) then
tmp = c0 * sqrt(t_0)
else
tmp = c0 / sqrt((v * (l / a)))
end if
code = tmp
end function
assert V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = A / (V * l);
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * Math.sqrt(((A / V) / l));
} else if (t_0 <= 1e+280) {
tmp = c0 * Math.sqrt(t_0);
} else {
tmp = c0 / Math.sqrt((V * (l / A)));
}
return tmp;
}
[V, l] = sort([V, l]) def code(c0, A, V, l): t_0 = A / (V * l) tmp = 0 if t_0 <= 0.0: tmp = c0 * math.sqrt(((A / V) / l)) elif t_0 <= 1e+280: tmp = c0 * math.sqrt(t_0) else: tmp = c0 / math.sqrt((V * (l / A))) return tmp
V, l = sort([V, l]) function code(c0, A, V, l) t_0 = Float64(A / Float64(V * l)) tmp = 0.0 if (t_0 <= 0.0) tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); elseif (t_0 <= 1e+280) tmp = Float64(c0 * sqrt(t_0)); else tmp = Float64(c0 / sqrt(Float64(V * Float64(l / A)))); end return tmp end
V, l = num2cell(sort([V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = A / (V * l);
tmp = 0.0;
if (t_0 <= 0.0)
tmp = c0 * sqrt(((A / V) / l));
elseif (t_0 <= 1e+280)
tmp = c0 * sqrt(t_0);
else
tmp = c0 / sqrt((V * (l / A)));
end
tmp_2 = tmp;
end
NOTE: V and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+280], N[(c0 * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision], N[(c0 / N[Sqrt[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[V, l] = \mathsf{sort}([V, l])\\
\\
\begin{array}{l}
t_0 := \frac{A}{V \cdot \ell}\\
\mathbf{if}\;t_0 \leq 0:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;t_0 \leq 10^{+280}:\\
\;\;\;\;c0 \cdot \sqrt{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 0.0Initial program 43.5%
associate-/r*64.9%
div-inv64.8%
Applied egg-rr64.8%
un-div-inv64.9%
Applied egg-rr64.9%
if 0.0 < (/.f64 A (*.f64 V l)) < 1e280Initial program 99.1%
if 1e280 < (/.f64 A (*.f64 V l)) Initial program 34.0%
associate-/r*39.6%
div-inv39.6%
Applied egg-rr39.6%
Applied egg-rr17.5%
expm1-def23.6%
expm1-log1p44.4%
Simplified44.4%
Final simplification79.7%
NOTE: V and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (/ A (* V l))))
(if (<= t_0 5e-317)
(* c0 (sqrt (/ (/ A V) l)))
(if (<= t_0 1e+280)
(/ c0 (sqrt (/ (* V l) A)))
(/ c0 (sqrt (* V (/ l A))))))))assert(V < l);
double code(double c0, double A, double V, double l) {
double t_0 = A / (V * l);
double tmp;
if (t_0 <= 5e-317) {
tmp = c0 * sqrt(((A / V) / l));
} else if (t_0 <= 1e+280) {
tmp = c0 / sqrt(((V * l) / A));
} else {
tmp = c0 / sqrt((V * (l / A)));
}
return tmp;
}
NOTE: V and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: tmp
t_0 = a / (v * l)
if (t_0 <= 5d-317) then
tmp = c0 * sqrt(((a / v) / l))
else if (t_0 <= 1d+280) then
tmp = c0 / sqrt(((v * l) / a))
else
tmp = c0 / sqrt((v * (l / a)))
end if
code = tmp
end function
assert V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = A / (V * l);
double tmp;
if (t_0 <= 5e-317) {
tmp = c0 * Math.sqrt(((A / V) / l));
} else if (t_0 <= 1e+280) {
tmp = c0 / Math.sqrt(((V * l) / A));
} else {
tmp = c0 / Math.sqrt((V * (l / A)));
}
return tmp;
}
[V, l] = sort([V, l]) def code(c0, A, V, l): t_0 = A / (V * l) tmp = 0 if t_0 <= 5e-317: tmp = c0 * math.sqrt(((A / V) / l)) elif t_0 <= 1e+280: tmp = c0 / math.sqrt(((V * l) / A)) else: tmp = c0 / math.sqrt((V * (l / A))) return tmp
V, l = sort([V, l]) function code(c0, A, V, l) t_0 = Float64(A / Float64(V * l)) tmp = 0.0 if (t_0 <= 5e-317) tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); elseif (t_0 <= 1e+280) tmp = Float64(c0 / sqrt(Float64(Float64(V * l) / A))); else tmp = Float64(c0 / sqrt(Float64(V * Float64(l / A)))); end return tmp end
V, l = num2cell(sort([V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = A / (V * l);
tmp = 0.0;
if (t_0 <= 5e-317)
tmp = c0 * sqrt(((A / V) / l));
elseif (t_0 <= 1e+280)
tmp = c0 / sqrt(((V * l) / A));
else
tmp = c0 / sqrt((V * (l / A)));
end
tmp_2 = tmp;
end
NOTE: V and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 5e-317], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+280], N[(c0 / N[Sqrt[N[(N[(V * l), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0 / N[Sqrt[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[V, l] = \mathsf{sort}([V, l])\\
\\
\begin{array}{l}
t_0 := \frac{A}{V \cdot \ell}\\
\mathbf{if}\;t_0 \leq 5 \cdot 10^{-317}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;t_0 \leq 10^{+280}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 5.00000017e-317Initial program 44.3%
associate-/r*63.6%
div-inv63.6%
Applied egg-rr63.6%
un-div-inv63.6%
Applied egg-rr63.6%
if 5.00000017e-317 < (/.f64 A (*.f64 V l)) < 1e280Initial program 99.5%
pow1/299.5%
add-cube-cbrt98.7%
pow398.7%
pow-pow98.6%
metadata-eval98.6%
Applied egg-rr98.6%
cbrt-div98.4%
*-rgt-identity98.4%
cbrt-div98.6%
frac-times92.7%
*-commutative92.7%
cbrt-prod92.7%
cbrt-div92.5%
metadata-eval92.5%
Applied egg-rr92.5%
associate-*l/92.5%
*-lft-identity92.5%
Simplified92.5%
add-sqr-sqrt92.5%
sqrt-unprod92.5%
pow-prod-up92.6%
metadata-eval92.6%
pow392.6%
frac-times92.5%
times-frac92.5%
add-cube-cbrt93.0%
add-cube-cbrt93.5%
sqrt-div52.0%
associate-*r/49.0%
associate-/l*52.0%
Applied egg-rr92.5%
expm1-log1p-u62.9%
expm1-udef29.9%
associate-*r/31.7%
*-commutative31.7%
sqrt-undiv16.3%
clear-num16.3%
sqrt-undiv31.7%
*-commutative31.7%
associate-*r/29.9%
Applied egg-rr29.9%
expm1-def63.1%
expm1-log1p92.8%
*-commutative92.8%
associate-*l/99.6%
Simplified99.6%
if 1e280 < (/.f64 A (*.f64 V l)) Initial program 34.0%
associate-/r*39.6%
div-inv39.6%
Applied egg-rr39.6%
Applied egg-rr17.5%
expm1-def23.6%
expm1-log1p44.4%
Simplified44.4%
Final simplification79.5%
NOTE: V and l should be sorted in increasing order before calling this function. (FPCore (c0 A V l) :precision binary64 (* c0 (sqrt (/ A (* V l)))))
assert(V < l);
double code(double c0, double A, double V, double l) {
return c0 * sqrt((A / (V * l)));
}
NOTE: V and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
code = c0 * sqrt((a / (v * l)))
end function
assert V < l;
public static double code(double c0, double A, double V, double l) {
return c0 * Math.sqrt((A / (V * l)));
}
[V, l] = sort([V, l]) def code(c0, A, V, l): return c0 * math.sqrt((A / (V * l)))
V, l = sort([V, l]) function code(c0, A, V, l) return Float64(c0 * sqrt(Float64(A / Float64(V * l)))) end
V, l = num2cell(sort([V, l])){:}
function tmp = code(c0, A, V, l)
tmp = c0 * sqrt((A / (V * l)));
end
NOTE: V and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[V, l] = \mathsf{sort}([V, l])\\
\\
c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\end{array}
Initial program 73.2%
Final simplification73.2%
NOTE: V and l should be sorted in increasing order before calling this function. (FPCore (c0 A V l) :precision binary64 (* c0 (sqrt (/ (/ A V) l))))
assert(V < l);
double code(double c0, double A, double V, double l) {
return c0 * sqrt(((A / V) / l));
}
NOTE: V and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
code = c0 * sqrt(((a / v) / l))
end function
assert V < l;
public static double code(double c0, double A, double V, double l) {
return c0 * Math.sqrt(((A / V) / l));
}
[V, l] = sort([V, l]) def code(c0, A, V, l): return c0 * math.sqrt(((A / V) / l))
V, l = sort([V, l]) function code(c0, A, V, l) return Float64(c0 * sqrt(Float64(Float64(A / V) / l))) end
V, l = num2cell(sort([V, l])){:}
function tmp = code(c0, A, V, l)
tmp = c0 * sqrt(((A / V) / l));
end
NOTE: V and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[V, l] = \mathsf{sort}([V, l])\\
\\
c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}
\end{array}
Initial program 73.2%
associate-/r*74.9%
div-inv74.9%
Applied egg-rr74.9%
un-div-inv74.9%
Applied egg-rr74.9%
Final simplification74.9%
herbie shell --seed 2023187
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))