
(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 12 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: c0, A, 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 (/ A V)) (sqrt l)))))
(if (<= (* V l) -1e+247)
t_0
(if (<= (* V l) -1e-304)
(* c0 (/ (sqrt (- A)) (sqrt (* V (- l)))))
(if (<= (* V l) 0.0) t_0 (* c0 (/ (sqrt A) (sqrt (* V l)))))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = c0 * (sqrt((A / V)) / sqrt(l));
double tmp;
if ((V * l) <= -1e+247) {
tmp = t_0;
} else if ((V * l) <= -1e-304) {
tmp = c0 * (sqrt(-A) / sqrt((V * -l)));
} else if ((V * l) <= 0.0) {
tmp = t_0;
} else {
tmp = c0 * (sqrt(A) / sqrt((V * l)));
}
return tmp;
}
NOTE: c0, A, 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 = c0 * (sqrt((a / v)) / sqrt(l))
if ((v * l) <= (-1d+247)) then
tmp = t_0
else if ((v * l) <= (-1d-304)) then
tmp = c0 * (sqrt(-a) / sqrt((v * -l)))
else if ((v * l) <= 0.0d0) then
tmp = t_0
else
tmp = c0 * (sqrt(a) / sqrt((v * l)))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = c0 * (Math.sqrt((A / V)) / Math.sqrt(l));
double tmp;
if ((V * l) <= -1e+247) {
tmp = t_0;
} else if ((V * l) <= -1e-304) {
tmp = c0 * (Math.sqrt(-A) / Math.sqrt((V * -l)));
} else if ((V * l) <= 0.0) {
tmp = t_0;
} else {
tmp = c0 * (Math.sqrt(A) / Math.sqrt((V * l)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = c0 * (math.sqrt((A / V)) / math.sqrt(l)) tmp = 0 if (V * l) <= -1e+247: tmp = t_0 elif (V * l) <= -1e-304: tmp = c0 * (math.sqrt(-A) / math.sqrt((V * -l))) elif (V * l) <= 0.0: tmp = t_0 else: tmp = c0 * (math.sqrt(A) / math.sqrt((V * l))) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = Float64(c0 * Float64(sqrt(Float64(A / V)) / sqrt(l))) tmp = 0.0 if (Float64(V * l) <= -1e+247) tmp = t_0; elseif (Float64(V * l) <= -1e-304) tmp = Float64(c0 * Float64(sqrt(Float64(-A)) / sqrt(Float64(V * Float64(-l))))); elseif (Float64(V * l) <= 0.0) tmp = t_0; else tmp = Float64(c0 * Float64(sqrt(A) / sqrt(Float64(V * l)))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = c0 * (sqrt((A / V)) / sqrt(l));
tmp = 0.0;
if ((V * l) <= -1e+247)
tmp = t_0;
elseif ((V * l) <= -1e-304)
tmp = c0 * (sqrt(-A) / sqrt((V * -l)));
elseif ((V * l) <= 0.0)
tmp = t_0;
else
tmp = c0 * (sqrt(A) / sqrt((V * l)));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(c0 * N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(V * l), $MachinePrecision], -1e+247], t$95$0, If[LessEqual[N[(V * l), $MachinePrecision], -1e-304], 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, N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := c0 \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\
\mathbf{if}\;V \cdot \ell \leq -1 \cdot 10^{+247}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-304}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\
\mathbf{elif}\;V \cdot \ell \leq 0:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\
\end{array}
\end{array}
if (*.f64 V l) < -9.99999999999999952e246 or -9.99999999999999971e-305 < (*.f64 V l) < 0.0Initial program 38.8%
associate-/r*65.1%
sqrt-div45.7%
associate-*r/45.7%
Applied egg-rr45.7%
*-commutative45.7%
associate-/l*45.6%
associate-/r/45.7%
Simplified45.7%
if -9.99999999999999952e246 < (*.f64 V l) < -9.99999999999999971e-305Initial program 86.5%
frac-2neg86.5%
sqrt-div99.4%
distribute-rgt-neg-in99.4%
Applied egg-rr99.4%
distribute-rgt-neg-out99.4%
*-commutative99.4%
distribute-rgt-neg-in99.4%
Simplified99.4%
if 0.0 < (*.f64 V l) Initial program 79.3%
associate-/r*75.1%
clear-num74.8%
sqrt-div75.2%
metadata-eval75.2%
div-inv74.5%
clear-num74.6%
Applied egg-rr74.6%
Taylor expanded in l around 0 79.5%
frac-2neg79.5%
*-commutative79.5%
distribute-rgt-neg-out79.5%
sqrt-div0.0%
frac-2neg0.0%
clear-num0.0%
div-inv0.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
add-sqr-sqrt0.0%
sqrt-unprod29.7%
sqr-neg29.7%
sqrt-unprod45.8%
add-sqr-sqrt91.5%
Applied egg-rr91.5%
*-commutative91.5%
neg-mul-191.5%
associate-/r*91.5%
metadata-eval91.5%
/-rgt-identity91.5%
distribute-neg-frac91.5%
times-frac91.6%
neg-mul-191.6%
remove-double-neg91.6%
*-rgt-identity91.6%
Simplified91.6%
Final simplification87.0%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (sqrt (* l (/ V A)))) (t_1 (* c0 (sqrt (/ A (* V l))))))
(if (<= t_1 2e-300)
(/ c0 t_0)
(if (<= t_1 2e+189) t_1 (* c0 (/ 1.0 t_0))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = sqrt((l * (V / A)));
double t_1 = c0 * sqrt((A / (V * l)));
double tmp;
if (t_1 <= 2e-300) {
tmp = c0 / t_0;
} else if (t_1 <= 2e+189) {
tmp = t_1;
} else {
tmp = c0 * (1.0 / t_0);
}
return tmp;
}
NOTE: c0, A, 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) :: t_1
real(8) :: tmp
t_0 = sqrt((l * (v / a)))
t_1 = c0 * sqrt((a / (v * l)))
if (t_1 <= 2d-300) then
tmp = c0 / t_0
else if (t_1 <= 2d+189) then
tmp = t_1
else
tmp = c0 * (1.0d0 / t_0)
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = Math.sqrt((l * (V / A)));
double t_1 = c0 * Math.sqrt((A / (V * l)));
double tmp;
if (t_1 <= 2e-300) {
tmp = c0 / t_0;
} else if (t_1 <= 2e+189) {
tmp = t_1;
} else {
tmp = c0 * (1.0 / t_0);
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = math.sqrt((l * (V / A))) t_1 = c0 * math.sqrt((A / (V * l))) tmp = 0 if t_1 <= 2e-300: tmp = c0 / t_0 elif t_1 <= 2e+189: tmp = t_1 else: tmp = c0 * (1.0 / t_0) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = sqrt(Float64(l * Float64(V / A))) t_1 = Float64(c0 * sqrt(Float64(A / Float64(V * l)))) tmp = 0.0 if (t_1 <= 2e-300) tmp = Float64(c0 / t_0); elseif (t_1 <= 2e+189) tmp = t_1; else tmp = Float64(c0 * Float64(1.0 / t_0)); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = sqrt((l * (V / A)));
t_1 = c0 * sqrt((A / (V * l)));
tmp = 0.0;
if (t_1 <= 2e-300)
tmp = c0 / t_0;
elseif (t_1 <= 2e+189)
tmp = t_1;
else
tmp = c0 * (1.0 / t_0);
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[Sqrt[N[(l * N[(V / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 2e-300], N[(c0 / t$95$0), $MachinePrecision], If[LessEqual[t$95$1, 2e+189], t$95$1, N[(c0 * N[(1.0 / t$95$0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \sqrt{\ell \cdot \frac{V}{A}}\\
t_1 := c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\
\mathbf{if}\;t_1 \leq 2 \cdot 10^{-300}:\\
\;\;\;\;\frac{c0}{t_0}\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+189}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{1}{t_0}\\
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 2.00000000000000005e-300Initial program 69.5%
associate-/r*65.5%
clear-num65.2%
sqrt-div65.2%
metadata-eval65.2%
div-inv64.0%
clear-num64.1%
Applied egg-rr64.1%
Taylor expanded in l around 0 69.2%
un-div-inv69.2%
associate-*r/67.6%
Applied egg-rr67.6%
*-commutative67.6%
associate-/r/65.2%
associate-/l*69.2%
associate-*r/64.1%
Simplified64.1%
if 2.00000000000000005e-300 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 2e189Initial program 98.7%
if 2e189 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 58.0%
associate-/r*70.9%
clear-num70.8%
sqrt-div73.5%
metadata-eval73.5%
div-inv73.6%
clear-num73.5%
Applied egg-rr73.5%
Final simplification74.8%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (* l (/ V A))) (t_1 (* c0 (sqrt (/ A (* V l))))))
(if (<= t_1 2e-300)
(/ c0 (sqrt t_0))
(if (<= t_1 1e+165) t_1 (* c0 (pow t_0 -0.5))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = l * (V / A);
double t_1 = c0 * sqrt((A / (V * l)));
double tmp;
if (t_1 <= 2e-300) {
tmp = c0 / sqrt(t_0);
} else if (t_1 <= 1e+165) {
tmp = t_1;
} else {
tmp = c0 * pow(t_0, -0.5);
}
return tmp;
}
NOTE: c0, A, 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) :: t_1
real(8) :: tmp
t_0 = l * (v / a)
t_1 = c0 * sqrt((a / (v * l)))
if (t_1 <= 2d-300) then
tmp = c0 / sqrt(t_0)
else if (t_1 <= 1d+165) then
tmp = t_1
else
tmp = c0 * (t_0 ** (-0.5d0))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = l * (V / A);
double t_1 = c0 * Math.sqrt((A / (V * l)));
double tmp;
if (t_1 <= 2e-300) {
tmp = c0 / Math.sqrt(t_0);
} else if (t_1 <= 1e+165) {
tmp = t_1;
} else {
tmp = c0 * Math.pow(t_0, -0.5);
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = l * (V / A) t_1 = c0 * math.sqrt((A / (V * l))) tmp = 0 if t_1 <= 2e-300: tmp = c0 / math.sqrt(t_0) elif t_1 <= 1e+165: tmp = t_1 else: tmp = c0 * math.pow(t_0, -0.5) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = Float64(l * Float64(V / A)) t_1 = Float64(c0 * sqrt(Float64(A / Float64(V * l)))) tmp = 0.0 if (t_1 <= 2e-300) tmp = Float64(c0 / sqrt(t_0)); elseif (t_1 <= 1e+165) tmp = t_1; else tmp = Float64(c0 * (t_0 ^ -0.5)); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = l * (V / A);
t_1 = c0 * sqrt((A / (V * l)));
tmp = 0.0;
if (t_1 <= 2e-300)
tmp = c0 / sqrt(t_0);
elseif (t_1 <= 1e+165)
tmp = t_1;
else
tmp = c0 * (t_0 ^ -0.5);
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(l * N[(V / A), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 2e-300], N[(c0 / N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+165], t$95$1, N[(c0 * N[Power[t$95$0, -0.5], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \ell \cdot \frac{V}{A}\\
t_1 := c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\
\mathbf{if}\;t_1 \leq 2 \cdot 10^{-300}:\\
\;\;\;\;\frac{c0}{\sqrt{t_0}}\\
\mathbf{elif}\;t_1 \leq 10^{+165}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot {t_0}^{-0.5}\\
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 2.00000000000000005e-300Initial program 69.5%
associate-/r*65.5%
clear-num65.2%
sqrt-div65.2%
metadata-eval65.2%
div-inv64.0%
clear-num64.1%
Applied egg-rr64.1%
Taylor expanded in l around 0 69.2%
un-div-inv69.2%
associate-*r/67.6%
Applied egg-rr67.6%
*-commutative67.6%
associate-/r/65.2%
associate-/l*69.2%
associate-*r/64.1%
Simplified64.1%
if 2.00000000000000005e-300 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 9.99999999999999899e164Initial program 98.6%
if 9.99999999999999899e164 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 59.9%
associate-/r*72.2%
clear-num72.1%
sqrt-div74.7%
metadata-eval74.7%
div-inv74.7%
clear-num74.6%
Applied egg-rr74.6%
Taylor expanded in l around 0 62.3%
pow1/262.3%
associate-*r/73.6%
pow-flip73.6%
metadata-eval73.6%
Applied egg-rr73.6%
*-commutative73.6%
associate-*l/62.4%
associate-*r/74.7%
Simplified74.7%
Final simplification74.8%
NOTE: c0, A, 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 (/ A (* V l))))))
(if (or (<= t_0 2e-300) (not (<= t_0 1e+165)))
(* c0 (sqrt (/ (/ A V) l)))
t_0)))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = c0 * sqrt((A / (V * l)));
double tmp;
if ((t_0 <= 2e-300) || !(t_0 <= 1e+165)) {
tmp = c0 * sqrt(((A / V) / l));
} else {
tmp = t_0;
}
return tmp;
}
NOTE: c0, A, 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 = c0 * sqrt((a / (v * l)))
if ((t_0 <= 2d-300) .or. (.not. (t_0 <= 1d+165))) then
tmp = c0 * sqrt(((a / v) / l))
else
tmp = t_0
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = c0 * Math.sqrt((A / (V * l)));
double tmp;
if ((t_0 <= 2e-300) || !(t_0 <= 1e+165)) {
tmp = c0 * Math.sqrt(((A / V) / l));
} else {
tmp = t_0;
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = c0 * math.sqrt((A / (V * l))) tmp = 0 if (t_0 <= 2e-300) or not (t_0 <= 1e+165): tmp = c0 * math.sqrt(((A / V) / l)) else: tmp = t_0 return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = Float64(c0 * sqrt(Float64(A / Float64(V * l)))) tmp = 0.0 if ((t_0 <= 2e-300) || !(t_0 <= 1e+165)) tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); else tmp = t_0; end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = c0 * sqrt((A / (V * l)));
tmp = 0.0;
if ((t_0 <= 2e-300) || ~((t_0 <= 1e+165)))
tmp = c0 * sqrt(((A / V) / l));
else
tmp = t_0;
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, 2e-300], N[Not[LessEqual[t$95$0, 1e+165]], $MachinePrecision]], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$0]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\
\mathbf{if}\;t_0 \leq 2 \cdot 10^{-300} \lor \neg \left(t_0 \leq 10^{+165}\right):\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 2.00000000000000005e-300 or 9.99999999999999899e164 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 67.3%
associate-/r*67.1%
Simplified67.1%
if 2.00000000000000005e-300 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 9.99999999999999899e164Initial program 98.6%
Final simplification75.2%
NOTE: c0, A, 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 (/ A (* V l))))))
(if (or (<= t_0 2e-300) (not (<= t_0 2e+189)))
(/ c0 (sqrt (* l (/ V A))))
t_0)))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = c0 * sqrt((A / (V * l)));
double tmp;
if ((t_0 <= 2e-300) || !(t_0 <= 2e+189)) {
tmp = c0 / sqrt((l * (V / A)));
} else {
tmp = t_0;
}
return tmp;
}
NOTE: c0, A, 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 = c0 * sqrt((a / (v * l)))
if ((t_0 <= 2d-300) .or. (.not. (t_0 <= 2d+189))) then
tmp = c0 / sqrt((l * (v / a)))
else
tmp = t_0
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = c0 * Math.sqrt((A / (V * l)));
double tmp;
if ((t_0 <= 2e-300) || !(t_0 <= 2e+189)) {
tmp = c0 / Math.sqrt((l * (V / A)));
} else {
tmp = t_0;
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = c0 * math.sqrt((A / (V * l))) tmp = 0 if (t_0 <= 2e-300) or not (t_0 <= 2e+189): tmp = c0 / math.sqrt((l * (V / A))) else: tmp = t_0 return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = Float64(c0 * sqrt(Float64(A / Float64(V * l)))) tmp = 0.0 if ((t_0 <= 2e-300) || !(t_0 <= 2e+189)) tmp = Float64(c0 / sqrt(Float64(l * Float64(V / A)))); else tmp = t_0; end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = c0 * sqrt((A / (V * l)));
tmp = 0.0;
if ((t_0 <= 2e-300) || ~((t_0 <= 2e+189)))
tmp = c0 / sqrt((l * (V / A)));
else
tmp = t_0;
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, 2e-300], N[Not[LessEqual[t$95$0, 2e+189]], $MachinePrecision]], N[(c0 / N[Sqrt[N[(l * N[(V / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$0]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\
\mathbf{if}\;t_0 \leq 2 \cdot 10^{-300} \lor \neg \left(t_0 \leq 2 \cdot 10^{+189}\right):\\
\;\;\;\;\frac{c0}{\sqrt{\ell \cdot \frac{V}{A}}}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 2.00000000000000005e-300 or 2e189 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 66.9%
associate-/r*66.7%
clear-num66.5%
sqrt-div67.0%
metadata-eval67.0%
div-inv66.2%
clear-num66.2%
Applied egg-rr66.2%
Taylor expanded in l around 0 67.3%
un-div-inv67.3%
associate-*r/69.2%
Applied egg-rr69.2%
*-commutative69.2%
associate-/r/67.1%
associate-/l*67.3%
associate-*r/66.2%
Simplified66.2%
if 2.00000000000000005e-300 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 2e189Initial program 98.7%
Final simplification74.8%
NOTE: c0, A, 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 (/ A (* V l))))))
(if (<= t_0 2e-300)
(* c0 (sqrt (/ (/ A V) l)))
(if (<= t_0 1e+297) t_0 (/ c0 (sqrt (* V (/ l A))))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = c0 * sqrt((A / (V * l)));
double tmp;
if (t_0 <= 2e-300) {
tmp = c0 * sqrt(((A / V) / l));
} else if (t_0 <= 1e+297) {
tmp = t_0;
} else {
tmp = c0 / sqrt((V * (l / A)));
}
return tmp;
}
NOTE: c0, A, 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 = c0 * sqrt((a / (v * l)))
if (t_0 <= 2d-300) then
tmp = c0 * sqrt(((a / v) / l))
else if (t_0 <= 1d+297) then
tmp = t_0
else
tmp = c0 / sqrt((v * (l / a)))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = c0 * Math.sqrt((A / (V * l)));
double tmp;
if (t_0 <= 2e-300) {
tmp = c0 * Math.sqrt(((A / V) / l));
} else if (t_0 <= 1e+297) {
tmp = t_0;
} else {
tmp = c0 / Math.sqrt((V * (l / A)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = c0 * math.sqrt((A / (V * l))) tmp = 0 if t_0 <= 2e-300: tmp = c0 * math.sqrt(((A / V) / l)) elif t_0 <= 1e+297: tmp = t_0 else: tmp = c0 / math.sqrt((V * (l / A))) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = Float64(c0 * sqrt(Float64(A / Float64(V * l)))) tmp = 0.0 if (t_0 <= 2e-300) tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); elseif (t_0 <= 1e+297) tmp = t_0; else tmp = Float64(c0 / sqrt(Float64(V * Float64(l / A)))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = c0 * sqrt((A / (V * l)));
tmp = 0.0;
if (t_0 <= 2e-300)
tmp = c0 * sqrt(((A / V) / l));
elseif (t_0 <= 1e+297)
tmp = t_0;
else
tmp = c0 / sqrt((V * (l / A)));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 2e-300], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+297], t$95$0, N[(c0 / N[Sqrt[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\
\mathbf{if}\;t_0 \leq 2 \cdot 10^{-300}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;t_0 \leq 10^{+297}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 2.00000000000000005e-300Initial program 69.5%
associate-/r*65.5%
Simplified65.5%
if 2.00000000000000005e-300 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1e297Initial program 98.1%
if 1e297 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 46.8%
associate-/r*64.7%
clear-num64.6%
sqrt-div68.2%
metadata-eval68.2%
div-inv68.2%
clear-num68.2%
Applied egg-rr68.2%
Taylor expanded in l around 0 50.2%
un-div-inv50.2%
associate-*r/66.9%
Applied egg-rr66.9%
Final simplification75.6%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. (FPCore (c0 A V l) :precision binary64 (if (<= A -4e-310) (* (/ (/ (sqrt (- A)) (sqrt (- V))) (sqrt l)) c0) (* c0 (/ (sqrt A) (sqrt (* V l))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if (A <= -4e-310) {
tmp = ((sqrt(-A) / sqrt(-V)) / sqrt(l)) * c0;
} else {
tmp = c0 * (sqrt(A) / sqrt((V * l)));
}
return tmp;
}
NOTE: c0, A, 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 <= (-4d-310)) then
tmp = ((sqrt(-a) / sqrt(-v)) / sqrt(l)) * c0
else
tmp = c0 * (sqrt(a) / sqrt((v * l)))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if (A <= -4e-310) {
tmp = ((Math.sqrt(-A) / Math.sqrt(-V)) / Math.sqrt(l)) * c0;
} else {
tmp = c0 * (Math.sqrt(A) / Math.sqrt((V * l)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if A <= -4e-310: tmp = ((math.sqrt(-A) / math.sqrt(-V)) / math.sqrt(l)) * c0 else: tmp = c0 * (math.sqrt(A) / math.sqrt((V * l))) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (A <= -4e-310) tmp = Float64(Float64(Float64(sqrt(Float64(-A)) / sqrt(Float64(-V))) / sqrt(l)) * c0); else tmp = Float64(c0 * Float64(sqrt(A) / sqrt(Float64(V * l)))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
tmp = 0.0;
if (A <= -4e-310)
tmp = ((sqrt(-A) / sqrt(-V)) / sqrt(l)) * c0;
else
tmp = c0 * (sqrt(A) / sqrt((V * l)));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := If[LessEqual[A, -4e-310], N[(N[(N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[(-V)], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * c0), $MachinePrecision], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;A \leq -4 \cdot 10^{-310}:\\
\;\;\;\;\frac{\frac{\sqrt{-A}}{\sqrt{-V}}}{\sqrt{\ell}} \cdot c0\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\
\end{array}
\end{array}
if A < -3.999999999999988e-310Initial program 74.6%
associate-/r*72.7%
sqrt-div39.7%
associate-*r/36.2%
Applied egg-rr36.2%
*-commutative36.2%
associate-/l*39.6%
associate-/r/39.7%
Simplified39.7%
frac-2neg39.7%
sqrt-div45.2%
Applied egg-rr45.2%
if -3.999999999999988e-310 < A Initial program 76.1%
associate-/r*73.7%
clear-num73.4%
sqrt-div73.8%
metadata-eval73.8%
div-inv73.1%
clear-num73.2%
Applied egg-rr73.2%
Taylor expanded in l around 0 76.3%
frac-2neg76.3%
*-commutative76.3%
distribute-rgt-neg-out76.3%
sqrt-div0.0%
frac-2neg0.0%
clear-num0.0%
div-inv0.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
add-sqr-sqrt0.0%
sqrt-unprod29.6%
sqr-neg29.6%
sqrt-unprod44.7%
add-sqr-sqrt87.6%
Applied egg-rr87.6%
*-commutative87.6%
neg-mul-187.6%
associate-/r*87.6%
metadata-eval87.6%
/-rgt-identity87.6%
distribute-neg-frac87.6%
times-frac87.6%
neg-mul-187.6%
remove-double-neg87.6%
*-rgt-identity87.6%
Simplified87.6%
Final simplification66.2%
NOTE: c0, A, 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 (/ A V)) (sqrt l)))))
(if (<= (* V l) -5e+97)
t_0
(if (<= (* V l) -2e-81)
(* c0 (/ 1.0 (sqrt (/ (* V l) A))))
(if (<= (* V l) 0.0) t_0 (* c0 (/ (sqrt A) (sqrt (* V l)))))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = c0 * (sqrt((A / V)) / sqrt(l));
double tmp;
if ((V * l) <= -5e+97) {
tmp = t_0;
} else if ((V * l) <= -2e-81) {
tmp = c0 * (1.0 / sqrt(((V * l) / A)));
} else if ((V * l) <= 0.0) {
tmp = t_0;
} else {
tmp = c0 * (sqrt(A) / sqrt((V * l)));
}
return tmp;
}
NOTE: c0, A, 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 = c0 * (sqrt((a / v)) / sqrt(l))
if ((v * l) <= (-5d+97)) then
tmp = t_0
else if ((v * l) <= (-2d-81)) then
tmp = c0 * (1.0d0 / sqrt(((v * l) / a)))
else if ((v * l) <= 0.0d0) then
tmp = t_0
else
tmp = c0 * (sqrt(a) / sqrt((v * l)))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = c0 * (Math.sqrt((A / V)) / Math.sqrt(l));
double tmp;
if ((V * l) <= -5e+97) {
tmp = t_0;
} else if ((V * l) <= -2e-81) {
tmp = c0 * (1.0 / Math.sqrt(((V * l) / A)));
} else if ((V * l) <= 0.0) {
tmp = t_0;
} else {
tmp = c0 * (Math.sqrt(A) / Math.sqrt((V * l)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = c0 * (math.sqrt((A / V)) / math.sqrt(l)) tmp = 0 if (V * l) <= -5e+97: tmp = t_0 elif (V * l) <= -2e-81: tmp = c0 * (1.0 / math.sqrt(((V * l) / A))) elif (V * l) <= 0.0: tmp = t_0 else: tmp = c0 * (math.sqrt(A) / math.sqrt((V * l))) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = Float64(c0 * Float64(sqrt(Float64(A / V)) / sqrt(l))) tmp = 0.0 if (Float64(V * l) <= -5e+97) tmp = t_0; elseif (Float64(V * l) <= -2e-81) tmp = Float64(c0 * Float64(1.0 / sqrt(Float64(Float64(V * l) / A)))); elseif (Float64(V * l) <= 0.0) tmp = t_0; else tmp = Float64(c0 * Float64(sqrt(A) / sqrt(Float64(V * l)))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = c0 * (sqrt((A / V)) / sqrt(l));
tmp = 0.0;
if ((V * l) <= -5e+97)
tmp = t_0;
elseif ((V * l) <= -2e-81)
tmp = c0 * (1.0 / sqrt(((V * l) / A)));
elseif ((V * l) <= 0.0)
tmp = t_0;
else
tmp = c0 * (sqrt(A) / sqrt((V * l)));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(c0 * N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(V * l), $MachinePrecision], -5e+97], t$95$0, If[LessEqual[N[(V * l), $MachinePrecision], -2e-81], N[(c0 * N[(1.0 / N[Sqrt[N[(N[(V * l), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 0.0], t$95$0, N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := c0 \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\
\mathbf{if}\;V \cdot \ell \leq -5 \cdot 10^{+97}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;V \cdot \ell \leq -2 \cdot 10^{-81}:\\
\;\;\;\;c0 \cdot \frac{1}{\sqrt{\frac{V \cdot \ell}{A}}}\\
\mathbf{elif}\;V \cdot \ell \leq 0:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\
\end{array}
\end{array}
if (*.f64 V l) < -4.99999999999999999e97 or -1.9999999999999999e-81 < (*.f64 V l) < 0.0Initial program 62.9%
associate-/r*70.0%
sqrt-div43.0%
associate-*r/42.1%
Applied egg-rr42.1%
*-commutative42.1%
associate-/l*42.9%
associate-/r/43.0%
Simplified43.0%
if -4.99999999999999999e97 < (*.f64 V l) < -1.9999999999999999e-81Initial program 94.6%
associate-/r*75.2%
clear-num75.2%
sqrt-div76.3%
metadata-eval76.3%
div-inv76.3%
clear-num76.7%
Applied egg-rr76.7%
Taylor expanded in l around 0 95.6%
if 0.0 < (*.f64 V l) Initial program 79.3%
associate-/r*75.1%
clear-num74.8%
sqrt-div75.2%
metadata-eval75.2%
div-inv74.5%
clear-num74.6%
Applied egg-rr74.6%
Taylor expanded in l around 0 79.5%
frac-2neg79.5%
*-commutative79.5%
distribute-rgt-neg-out79.5%
sqrt-div0.0%
frac-2neg0.0%
clear-num0.0%
div-inv0.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
add-sqr-sqrt0.0%
sqrt-unprod29.7%
sqr-neg29.7%
sqrt-unprod45.8%
add-sqr-sqrt91.5%
Applied egg-rr91.5%
*-commutative91.5%
neg-mul-191.5%
associate-/r*91.5%
metadata-eval91.5%
/-rgt-identity91.5%
distribute-neg-frac91.5%
times-frac91.6%
neg-mul-191.6%
remove-double-neg91.6%
*-rgt-identity91.6%
Simplified91.6%
Final simplification73.6%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (sqrt (/ A V))))
(if (<= (* V l) -5e+97)
(* c0 (/ t_0 (sqrt l)))
(if (<= (* V l) -5e-83)
(* c0 (/ 1.0 (sqrt (/ (* V l) A))))
(if (<= (* V l) 0.0)
(/ c0 (/ (sqrt l) t_0))
(* c0 (/ (sqrt A) (sqrt (* V l)))))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = sqrt((A / V));
double tmp;
if ((V * l) <= -5e+97) {
tmp = c0 * (t_0 / sqrt(l));
} else if ((V * l) <= -5e-83) {
tmp = c0 * (1.0 / sqrt(((V * l) / A)));
} else if ((V * l) <= 0.0) {
tmp = c0 / (sqrt(l) / t_0);
} else {
tmp = c0 * (sqrt(A) / sqrt((V * l)));
}
return tmp;
}
NOTE: c0, A, 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 = sqrt((a / v))
if ((v * l) <= (-5d+97)) then
tmp = c0 * (t_0 / sqrt(l))
else if ((v * l) <= (-5d-83)) then
tmp = c0 * (1.0d0 / sqrt(((v * l) / a)))
else if ((v * l) <= 0.0d0) then
tmp = c0 / (sqrt(l) / t_0)
else
tmp = c0 * (sqrt(a) / sqrt((v * l)))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = Math.sqrt((A / V));
double tmp;
if ((V * l) <= -5e+97) {
tmp = c0 * (t_0 / Math.sqrt(l));
} else if ((V * l) <= -5e-83) {
tmp = c0 * (1.0 / Math.sqrt(((V * l) / A)));
} else if ((V * l) <= 0.0) {
tmp = c0 / (Math.sqrt(l) / t_0);
} else {
tmp = c0 * (Math.sqrt(A) / Math.sqrt((V * l)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = math.sqrt((A / V)) tmp = 0 if (V * l) <= -5e+97: tmp = c0 * (t_0 / math.sqrt(l)) elif (V * l) <= -5e-83: tmp = c0 * (1.0 / math.sqrt(((V * l) / A))) elif (V * l) <= 0.0: tmp = c0 / (math.sqrt(l) / t_0) else: tmp = c0 * (math.sqrt(A) / math.sqrt((V * l))) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = sqrt(Float64(A / V)) tmp = 0.0 if (Float64(V * l) <= -5e+97) tmp = Float64(c0 * Float64(t_0 / sqrt(l))); elseif (Float64(V * l) <= -5e-83) tmp = Float64(c0 * Float64(1.0 / sqrt(Float64(Float64(V * l) / A)))); elseif (Float64(V * l) <= 0.0) tmp = Float64(c0 / Float64(sqrt(l) / t_0)); else tmp = Float64(c0 * Float64(sqrt(A) / sqrt(Float64(V * l)))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = sqrt((A / V));
tmp = 0.0;
if ((V * l) <= -5e+97)
tmp = c0 * (t_0 / sqrt(l));
elseif ((V * l) <= -5e-83)
tmp = c0 * (1.0 / sqrt(((V * l) / A)));
elseif ((V * l) <= 0.0)
tmp = c0 / (sqrt(l) / t_0);
else
tmp = c0 * (sqrt(A) / sqrt((V * l)));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(V * l), $MachinePrecision], -5e+97], N[(c0 * N[(t$95$0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -5e-83], N[(c0 * N[(1.0 / N[Sqrt[N[(N[(V * l), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 0.0], N[(c0 / N[(N[Sqrt[l], $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \sqrt{\frac{A}{V}}\\
\mathbf{if}\;V \cdot \ell \leq -5 \cdot 10^{+97}:\\
\;\;\;\;c0 \cdot \frac{t_0}{\sqrt{\ell}}\\
\mathbf{elif}\;V \cdot \ell \leq -5 \cdot 10^{-83}:\\
\;\;\;\;c0 \cdot \frac{1}{\sqrt{\frac{V \cdot \ell}{A}}}\\
\mathbf{elif}\;V \cdot \ell \leq 0:\\
\;\;\;\;\frac{c0}{\frac{\sqrt{\ell}}{t_0}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\
\end{array}
\end{array}
if (*.f64 V l) < -4.99999999999999999e97Initial program 58.5%
associate-/r*61.0%
sqrt-div42.9%
associate-*r/40.6%
Applied egg-rr40.6%
*-commutative40.6%
associate-/l*42.6%
associate-/r/42.9%
Simplified42.9%
if -4.99999999999999999e97 < (*.f64 V l) < -5e-83Initial program 94.9%
associate-/r*76.4%
clear-num76.4%
sqrt-div77.5%
metadata-eval77.5%
div-inv77.4%
clear-num77.8%
Applied egg-rr77.8%
Taylor expanded in l around 0 95.8%
if -5e-83 < (*.f64 V l) < 0.0Initial program 64.7%
associate-/r*75.4%
sqrt-div44.7%
associate-*r/44.7%
Applied egg-rr44.7%
associate-/l*44.7%
Simplified44.7%
if 0.0 < (*.f64 V l) Initial program 79.3%
associate-/r*75.1%
clear-num74.8%
sqrt-div75.2%
metadata-eval75.2%
div-inv74.5%
clear-num74.6%
Applied egg-rr74.6%
Taylor expanded in l around 0 79.5%
frac-2neg79.5%
*-commutative79.5%
distribute-rgt-neg-out79.5%
sqrt-div0.0%
frac-2neg0.0%
clear-num0.0%
div-inv0.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
add-sqr-sqrt0.0%
sqrt-unprod29.7%
sqr-neg29.7%
sqrt-unprod45.8%
add-sqr-sqrt91.5%
Applied egg-rr91.5%
*-commutative91.5%
neg-mul-191.5%
associate-/r*91.5%
metadata-eval91.5%
/-rgt-identity91.5%
distribute-neg-frac91.5%
times-frac91.6%
neg-mul-191.6%
remove-double-neg91.6%
*-rgt-identity91.6%
Simplified91.6%
Final simplification74.4%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(if (<= (* V l) -5e+97)
(* c0 (/ (sqrt (/ A V)) (sqrt l)))
(if (<= (* V l) -1e-81)
(* c0 (/ 1.0 (sqrt (/ (* V l) A))))
(if (<= (* V l) 0.0)
(/ (/ c0 (sqrt l)) (sqrt (/ V A)))
(* c0 (/ (sqrt A) (sqrt (* V l))))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -5e+97) {
tmp = c0 * (sqrt((A / V)) / sqrt(l));
} else if ((V * l) <= -1e-81) {
tmp = c0 * (1.0 / sqrt(((V * l) / A)));
} else if ((V * l) <= 0.0) {
tmp = (c0 / sqrt(l)) / sqrt((V / A));
} else {
tmp = c0 * (sqrt(A) / sqrt((V * l)));
}
return tmp;
}
NOTE: c0, A, 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 ((v * l) <= (-5d+97)) then
tmp = c0 * (sqrt((a / v)) / sqrt(l))
else if ((v * l) <= (-1d-81)) then
tmp = c0 * (1.0d0 / sqrt(((v * l) / a)))
else if ((v * l) <= 0.0d0) then
tmp = (c0 / sqrt(l)) / sqrt((v / a))
else
tmp = c0 * (sqrt(a) / sqrt((v * l)))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -5e+97) {
tmp = c0 * (Math.sqrt((A / V)) / Math.sqrt(l));
} else if ((V * l) <= -1e-81) {
tmp = c0 * (1.0 / Math.sqrt(((V * l) / A)));
} else if ((V * l) <= 0.0) {
tmp = (c0 / Math.sqrt(l)) / Math.sqrt((V / A));
} else {
tmp = c0 * (Math.sqrt(A) / Math.sqrt((V * l)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if (V * l) <= -5e+97: tmp = c0 * (math.sqrt((A / V)) / math.sqrt(l)) elif (V * l) <= -1e-81: tmp = c0 * (1.0 / math.sqrt(((V * l) / A))) elif (V * l) <= 0.0: tmp = (c0 / math.sqrt(l)) / math.sqrt((V / A)) else: tmp = c0 * (math.sqrt(A) / math.sqrt((V * l))) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (Float64(V * l) <= -5e+97) tmp = Float64(c0 * Float64(sqrt(Float64(A / V)) / sqrt(l))); elseif (Float64(V * l) <= -1e-81) tmp = Float64(c0 * Float64(1.0 / sqrt(Float64(Float64(V * l) / A)))); elseif (Float64(V * l) <= 0.0) tmp = Float64(Float64(c0 / sqrt(l)) / sqrt(Float64(V / A))); else tmp = Float64(c0 * Float64(sqrt(A) / sqrt(Float64(V * l)))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
tmp = 0.0;
if ((V * l) <= -5e+97)
tmp = c0 * (sqrt((A / V)) / sqrt(l));
elseif ((V * l) <= -1e-81)
tmp = c0 * (1.0 / sqrt(((V * l) / A)));
elseif ((V * l) <= 0.0)
tmp = (c0 / sqrt(l)) / sqrt((V / A));
else
tmp = c0 * (sqrt(A) / sqrt((V * l)));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := If[LessEqual[N[(V * l), $MachinePrecision], -5e+97], N[(c0 * N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -1e-81], N[(c0 * N[(1.0 / N[Sqrt[N[(N[(V * l), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 0.0], N[(N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(V / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -5 \cdot 10^{+97}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\
\mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-81}:\\
\;\;\;\;c0 \cdot \frac{1}{\sqrt{\frac{V \cdot \ell}{A}}}\\
\mathbf{elif}\;V \cdot \ell \leq 0:\\
\;\;\;\;\frac{\frac{c0}{\sqrt{\ell}}}{\sqrt{\frac{V}{A}}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\
\end{array}
\end{array}
if (*.f64 V l) < -4.99999999999999999e97Initial program 58.5%
associate-/r*61.0%
sqrt-div42.9%
associate-*r/40.6%
Applied egg-rr40.6%
*-commutative40.6%
associate-/l*42.6%
associate-/r/42.9%
Simplified42.9%
if -4.99999999999999999e97 < (*.f64 V l) < -9.9999999999999996e-82Initial program 94.8%
associate-/r*75.8%
clear-num75.8%
sqrt-div76.9%
metadata-eval76.9%
div-inv76.9%
clear-num77.3%
Applied egg-rr77.3%
Taylor expanded in l around 0 95.7%
if -9.9999999999999996e-82 < (*.f64 V l) < 0.0Initial program 65.3%
associate-/r*75.9%
clear-num75.8%
sqrt-div75.8%
metadata-eval75.8%
div-inv74.5%
clear-num74.5%
Applied egg-rr74.5%
Taylor expanded in l around 0 65.3%
associate-/l*72.9%
*-un-lft-identity72.9%
div-inv72.8%
times-frac65.3%
Applied egg-rr65.3%
add-sqr-sqrt40.4%
sqrt-unprod32.4%
un-div-inv32.4%
un-div-inv32.4%
frac-times27.5%
add-sqr-sqrt27.5%
frac-times33.4%
*-un-lft-identity33.4%
div-inv33.4%
div-inv33.3%
clear-num33.4%
add-sqr-sqrt33.3%
frac-times35.1%
Applied egg-rr43.9%
if 0.0 < (*.f64 V l) Initial program 79.3%
associate-/r*75.1%
clear-num74.8%
sqrt-div75.2%
metadata-eval75.2%
div-inv74.5%
clear-num74.6%
Applied egg-rr74.6%
Taylor expanded in l around 0 79.5%
frac-2neg79.5%
*-commutative79.5%
distribute-rgt-neg-out79.5%
sqrt-div0.0%
frac-2neg0.0%
clear-num0.0%
div-inv0.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
add-sqr-sqrt0.0%
sqrt-unprod29.7%
sqr-neg29.7%
sqrt-unprod45.8%
add-sqr-sqrt91.5%
Applied egg-rr91.5%
*-commutative91.5%
neg-mul-191.5%
associate-/r*91.5%
metadata-eval91.5%
/-rgt-identity91.5%
distribute-neg-frac91.5%
times-frac91.6%
neg-mul-191.6%
remove-double-neg91.6%
*-rgt-identity91.6%
Simplified91.6%
Final simplification74.0%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(if (<= (* V l) -4e-222)
(* c0 (/ 1.0 (sqrt (/ (* V l) A))))
(if (<= (* V l) 2e-320)
(/ c0 (sqrt (* l (/ V A))))
(* c0 (/ (sqrt A) (sqrt (* V l)))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -4e-222) {
tmp = c0 * (1.0 / sqrt(((V * l) / A)));
} else if ((V * l) <= 2e-320) {
tmp = c0 / sqrt((l * (V / A)));
} else {
tmp = c0 * (sqrt(A) / sqrt((V * l)));
}
return tmp;
}
NOTE: c0, A, 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 ((v * l) <= (-4d-222)) then
tmp = c0 * (1.0d0 / sqrt(((v * l) / a)))
else if ((v * l) <= 2d-320) then
tmp = c0 / sqrt((l * (v / a)))
else
tmp = c0 * (sqrt(a) / sqrt((v * l)))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -4e-222) {
tmp = c0 * (1.0 / Math.sqrt(((V * l) / A)));
} else if ((V * l) <= 2e-320) {
tmp = c0 / Math.sqrt((l * (V / A)));
} else {
tmp = c0 * (Math.sqrt(A) / Math.sqrt((V * l)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if (V * l) <= -4e-222: tmp = c0 * (1.0 / math.sqrt(((V * l) / A))) elif (V * l) <= 2e-320: tmp = c0 / math.sqrt((l * (V / A))) else: tmp = c0 * (math.sqrt(A) / math.sqrt((V * l))) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (Float64(V * l) <= -4e-222) tmp = Float64(c0 * Float64(1.0 / sqrt(Float64(Float64(V * l) / A)))); elseif (Float64(V * l) <= 2e-320) tmp = Float64(c0 / sqrt(Float64(l * Float64(V / A)))); else tmp = Float64(c0 * Float64(sqrt(A) / sqrt(Float64(V * l)))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
tmp = 0.0;
if ((V * l) <= -4e-222)
tmp = c0 * (1.0 / sqrt(((V * l) / A)));
elseif ((V * l) <= 2e-320)
tmp = c0 / sqrt((l * (V / A)));
else
tmp = c0 * (sqrt(A) / sqrt((V * l)));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := If[LessEqual[N[(V * l), $MachinePrecision], -4e-222], N[(c0 * N[(1.0 / N[Sqrt[N[(N[(V * l), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 2e-320], N[(c0 / N[Sqrt[N[(l * N[(V / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -4 \cdot 10^{-222}:\\
\;\;\;\;c0 \cdot \frac{1}{\sqrt{\frac{V \cdot \ell}{A}}}\\
\mathbf{elif}\;V \cdot \ell \leq 2 \cdot 10^{-320}:\\
\;\;\;\;\frac{c0}{\sqrt{\ell \cdot \frac{V}{A}}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\
\end{array}
\end{array}
if (*.f64 V l) < -4.00000000000000019e-222Initial program 78.5%
associate-/r*70.2%
clear-num70.2%
sqrt-div70.6%
metadata-eval70.6%
div-inv69.8%
clear-num69.9%
Applied egg-rr69.9%
Taylor expanded in l around 0 78.8%
if -4.00000000000000019e-222 < (*.f64 V l) < 1.99998e-320Initial program 50.1%
associate-/r*76.6%
clear-num76.5%
sqrt-div76.5%
metadata-eval76.5%
div-inv76.5%
clear-num76.5%
Applied egg-rr76.5%
Taylor expanded in l around 0 50.1%
un-div-inv50.1%
associate-*r/76.6%
Applied egg-rr76.6%
*-commutative76.6%
associate-/r/76.6%
associate-/l*50.1%
associate-*r/76.6%
Simplified76.6%
if 1.99998e-320 < (*.f64 V l) Initial program 79.6%
associate-/r*74.9%
clear-num74.6%
sqrt-div75.0%
metadata-eval75.0%
div-inv74.3%
clear-num74.3%
Applied egg-rr74.3%
Taylor expanded in l around 0 79.8%
frac-2neg79.8%
*-commutative79.8%
distribute-rgt-neg-out79.8%
sqrt-div0.0%
frac-2neg0.0%
clear-num0.0%
div-inv0.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
add-sqr-sqrt0.0%
sqrt-unprod30.0%
sqr-neg30.0%
sqrt-unprod46.2%
add-sqr-sqrt92.0%
Applied egg-rr92.0%
*-commutative92.0%
neg-mul-192.0%
associate-/r*92.0%
metadata-eval92.0%
/-rgt-identity92.0%
distribute-neg-frac92.0%
times-frac92.0%
neg-mul-192.0%
remove-double-neg92.0%
*-rgt-identity92.0%
Simplified92.0%
Final simplification84.6%
NOTE: c0, A, 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(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
return c0 * sqrt((A / (V * l)));
}
NOTE: c0, A, 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 c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
return c0 * Math.sqrt((A / (V * l)));
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): return c0 * math.sqrt((A / (V * l)))
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) return Float64(c0 * sqrt(Float64(A / Float64(V * l)))) end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp = code(c0, A, V, l)
tmp = c0 * sqrt((A / (V * l)));
end
NOTE: c0, A, 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}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\end{array}
Initial program 75.3%
Final simplification75.3%
herbie shell --seed 2024010
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))