
(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 (if (<= A -5e-310) (* (/ c0 (sqrt l)) (/ (sqrt (- A)) (sqrt (- V)))) (/ c0 (* (sqrt (* l V)) (sqrt (/ 1.0 A))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if (A <= -5e-310) {
tmp = (c0 / sqrt(l)) * (sqrt(-A) / sqrt(-V));
} else {
tmp = c0 / (sqrt((l * V)) * sqrt((1.0 / 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) :: tmp
if (a <= (-5d-310)) then
tmp = (c0 / sqrt(l)) * (sqrt(-a) / sqrt(-v))
else
tmp = c0 / (sqrt((l * v)) * sqrt((1.0d0 / 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 tmp;
if (A <= -5e-310) {
tmp = (c0 / Math.sqrt(l)) * (Math.sqrt(-A) / Math.sqrt(-V));
} else {
tmp = c0 / (Math.sqrt((l * V)) * Math.sqrt((1.0 / A)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if A <= -5e-310: tmp = (c0 / math.sqrt(l)) * (math.sqrt(-A) / math.sqrt(-V)) else: tmp = c0 / (math.sqrt((l * V)) * math.sqrt((1.0 / A))) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (A <= -5e-310) tmp = Float64(Float64(c0 / sqrt(l)) * Float64(sqrt(Float64(-A)) / sqrt(Float64(-V)))); else tmp = Float64(c0 / Float64(sqrt(Float64(l * V)) * sqrt(Float64(1.0 / A)))); 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 <= -5e-310)
tmp = (c0 / sqrt(l)) * (sqrt(-A) / sqrt(-V));
else
tmp = c0 / (sqrt((l * V)) * sqrt((1.0 / 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_] := If[LessEqual[A, -5e-310], N[(N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[(-V)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 / N[(N[Sqrt[N[(l * V), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(1.0 / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{c0}{\sqrt{\ell}} \cdot \frac{\sqrt{-A}}{\sqrt{-V}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{\ell \cdot V} \cdot \sqrt{\frac{1}{A}}}\\
\end{array}
\end{array}
if A < -4.999999999999985e-310Initial program 69.5%
*-commutative69.5%
associate-/r*75.0%
sqrt-div46.2%
associate-*l/44.7%
Applied egg-rr44.7%
associate-/l*46.1%
*-commutative46.1%
Applied egg-rr46.1%
frac-2neg46.1%
sqrt-div55.3%
Applied egg-rr55.3%
if -4.999999999999985e-310 < A Initial program 77.0%
*-un-lft-identity77.0%
times-frac75.8%
Applied egg-rr75.8%
*-commutative75.8%
*-commutative75.8%
associate-*r/76.0%
frac-2neg76.0%
associate-*l/76.0%
*-un-lft-identity76.0%
distribute-frac-neg276.0%
sqrt-undiv41.6%
clear-num41.6%
un-div-inv41.6%
sqrt-undiv76.1%
add-sqr-sqrt38.8%
sqrt-unprod24.0%
sqr-neg24.0%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
add-sqr-sqrt0.0%
sqrt-unprod23.4%
Applied egg-rr76.1%
associate-/r/75.5%
*-commutative75.5%
Simplified75.5%
pow1/275.5%
associate-*r/76.7%
div-inv76.6%
unpow-prod-down85.4%
pow1/285.4%
Applied egg-rr85.4%
unpow1/285.4%
Simplified85.4%
Final simplification71.4%
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 (* l V))))))
(if (or (<= t_0 0.0) (not (<= t_0 5e+193)))
(* 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 / (l * V)));
double tmp;
if ((t_0 <= 0.0) || !(t_0 <= 5e+193)) {
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 / (l * v)))
if ((t_0 <= 0.0d0) .or. (.not. (t_0 <= 5d+193))) 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 / (l * V)));
double tmp;
if ((t_0 <= 0.0) || !(t_0 <= 5e+193)) {
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 / (l * V))) tmp = 0 if (t_0 <= 0.0) or not (t_0 <= 5e+193): 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(l * V)))) tmp = 0.0 if ((t_0 <= 0.0) || !(t_0 <= 5e+193)) 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 / (l * V)));
tmp = 0.0;
if ((t_0 <= 0.0) || ~((t_0 <= 5e+193)))
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[(l * V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, 0.0], N[Not[LessEqual[t$95$0, 5e+193]], $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}{\ell \cdot V}}\\
\mathbf{if}\;t\_0 \leq 0 \lor \neg \left(t\_0 \leq 5 \cdot 10^{+193}\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)))) < 0.0 or 4.99999999999999972e193 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 66.1%
associate-/r*72.5%
Simplified72.5%
if 0.0 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 4.99999999999999972e193Initial program 99.6%
Final simplification78.5%
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 (* l V))))))
(if (<= t_0 0.0)
(sqrt (* (/ A l) (* c0 (/ c0 V))))
(if (<= t_0 4e+232) 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 / (l * V)));
double tmp;
if (t_0 <= 0.0) {
tmp = sqrt(((A / l) * (c0 * (c0 / V))));
} else if (t_0 <= 4e+232) {
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 / (l * v)))
if (t_0 <= 0.0d0) then
tmp = sqrt(((a / l) * (c0 * (c0 / v))))
else if (t_0 <= 4d+232) 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 / (l * V)));
double tmp;
if (t_0 <= 0.0) {
tmp = Math.sqrt(((A / l) * (c0 * (c0 / V))));
} else if (t_0 <= 4e+232) {
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 / (l * V))) tmp = 0 if t_0 <= 0.0: tmp = math.sqrt(((A / l) * (c0 * (c0 / V)))) elif t_0 <= 4e+232: 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(l * V)))) tmp = 0.0 if (t_0 <= 0.0) tmp = sqrt(Float64(Float64(A / l) * Float64(c0 * Float64(c0 / V)))); elseif (t_0 <= 4e+232) 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 / (l * V)));
tmp = 0.0;
if (t_0 <= 0.0)
tmp = sqrt(((A / l) * (c0 * (c0 / V))));
elseif (t_0 <= 4e+232)
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[(l * V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], N[Sqrt[N[(N[(A / l), $MachinePrecision] * N[(c0 * N[(c0 / V), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$0, 4e+232], 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}{\ell \cdot V}}\\
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;\sqrt{\frac{A}{\ell} \cdot \left(c0 \cdot \frac{c0}{V}\right)}\\
\mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+232}:\\
\;\;\;\;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)))) < 0.0Initial program 67.4%
add-sqr-sqrt14.4%
sqrt-unprod15.9%
*-commutative15.9%
*-commutative15.9%
swap-sqr15.6%
add-sqr-sqrt15.6%
pow215.6%
Applied egg-rr15.6%
associate-*l/16.3%
*-commutative16.3%
times-frac18.7%
Simplified18.7%
unpow218.7%
associate-/l*20.0%
Applied egg-rr20.0%
if 0.0 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 4.00000000000000023e232Initial program 99.6%
if 4.00000000000000023e232 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 56.4%
*-un-lft-identity56.4%
times-frac70.8%
Applied egg-rr70.8%
*-commutative70.8%
*-commutative70.8%
associate-*r/70.8%
frac-2neg70.8%
associate-*l/70.8%
*-un-lft-identity70.8%
distribute-frac-neg270.8%
sqrt-undiv36.5%
clear-num36.5%
un-div-inv36.6%
sqrt-undiv70.9%
add-sqr-sqrt27.8%
sqrt-unprod16.2%
sqr-neg16.2%
sqrt-unprod0.1%
add-sqr-sqrt0.1%
add-sqr-sqrt0.1%
sqrt-unprod16.1%
Applied egg-rr70.9%
associate-/r/70.8%
*-commutative70.8%
Simplified70.8%
Final simplification45.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 (* l V))))))
(if (<= t_0 0.0)
(* c0 (sqrt (/ (/ A V) l)))
(if (<= t_0 4e+232) 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 / (l * V)));
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * sqrt(((A / V) / l));
} else if (t_0 <= 4e+232) {
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 / (l * v)))
if (t_0 <= 0.0d0) then
tmp = c0 * sqrt(((a / v) / l))
else if (t_0 <= 4d+232) 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 / (l * V)));
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * Math.sqrt(((A / V) / l));
} else if (t_0 <= 4e+232) {
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 / (l * V))) tmp = 0 if t_0 <= 0.0: tmp = c0 * math.sqrt(((A / V) / l)) elif t_0 <= 4e+232: 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(l * V)))) tmp = 0.0 if (t_0 <= 0.0) tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); elseif (t_0 <= 4e+232) 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 / (l * V)));
tmp = 0.0;
if (t_0 <= 0.0)
tmp = c0 * sqrt(((A / V) / l));
elseif (t_0 <= 4e+232)
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[(l * V), $MachinePrecision]), $MachinePrecision]], $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, 4e+232], 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}{\ell \cdot V}}\\
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+232}:\\
\;\;\;\;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)))) < 0.0Initial program 67.4%
associate-/r*72.4%
Simplified72.4%
if 0.0 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 4.00000000000000023e232Initial program 99.6%
if 4.00000000000000023e232 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 56.4%
*-un-lft-identity56.4%
times-frac70.8%
Applied egg-rr70.8%
*-commutative70.8%
*-commutative70.8%
associate-*r/70.8%
frac-2neg70.8%
associate-*l/70.8%
*-un-lft-identity70.8%
distribute-frac-neg270.8%
sqrt-undiv36.5%
clear-num36.5%
un-div-inv36.6%
sqrt-undiv70.9%
add-sqr-sqrt27.8%
sqrt-unprod16.2%
sqr-neg16.2%
sqrt-unprod0.1%
add-sqr-sqrt0.1%
add-sqr-sqrt0.1%
sqrt-unprod16.1%
Applied egg-rr70.9%
associate-/r/70.8%
*-commutative70.8%
Simplified70.8%
Final simplification78.5%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(if (<= (* l V) -2e+282)
(/ (* c0 (sqrt (/ A V))) (sqrt l))
(if (<= (* l V) -1e-266)
(/ c0 (/ (sqrt (* l (- V))) (sqrt (- A))))
(if (<= (* l V) 2e-312)
(/ c0 (sqrt (* l (/ V A))))
(* c0 (* (sqrt A) (sqrt (/ (/ 1.0 V) l))))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((l * V) <= -2e+282) {
tmp = (c0 * sqrt((A / V))) / sqrt(l);
} else if ((l * V) <= -1e-266) {
tmp = c0 / (sqrt((l * -V)) / sqrt(-A));
} else if ((l * V) <= 2e-312) {
tmp = c0 / sqrt((l * (V / A)));
} else {
tmp = c0 * (sqrt(A) * sqrt(((1.0 / 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 ((l * v) <= (-2d+282)) then
tmp = (c0 * sqrt((a / v))) / sqrt(l)
else if ((l * v) <= (-1d-266)) then
tmp = c0 / (sqrt((l * -v)) / sqrt(-a))
else if ((l * v) <= 2d-312) then
tmp = c0 / sqrt((l * (v / a)))
else
tmp = c0 * (sqrt(a) * sqrt(((1.0d0 / 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 ((l * V) <= -2e+282) {
tmp = (c0 * Math.sqrt((A / V))) / Math.sqrt(l);
} else if ((l * V) <= -1e-266) {
tmp = c0 / (Math.sqrt((l * -V)) / Math.sqrt(-A));
} else if ((l * V) <= 2e-312) {
tmp = c0 / Math.sqrt((l * (V / A)));
} else {
tmp = c0 * (Math.sqrt(A) * Math.sqrt(((1.0 / V) / l)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if (l * V) <= -2e+282: tmp = (c0 * math.sqrt((A / V))) / math.sqrt(l) elif (l * V) <= -1e-266: tmp = c0 / (math.sqrt((l * -V)) / math.sqrt(-A)) elif (l * V) <= 2e-312: tmp = c0 / math.sqrt((l * (V / A))) else: tmp = c0 * (math.sqrt(A) * math.sqrt(((1.0 / V) / l))) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (Float64(l * V) <= -2e+282) tmp = Float64(Float64(c0 * sqrt(Float64(A / V))) / sqrt(l)); elseif (Float64(l * V) <= -1e-266) tmp = Float64(c0 / Float64(sqrt(Float64(l * Float64(-V))) / sqrt(Float64(-A)))); elseif (Float64(l * V) <= 2e-312) tmp = Float64(c0 / sqrt(Float64(l * Float64(V / A)))); else tmp = Float64(c0 * Float64(sqrt(A) * sqrt(Float64(Float64(1.0 / 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 ((l * V) <= -2e+282)
tmp = (c0 * sqrt((A / V))) / sqrt(l);
elseif ((l * V) <= -1e-266)
tmp = c0 / (sqrt((l * -V)) / sqrt(-A));
elseif ((l * V) <= 2e-312)
tmp = c0 / sqrt((l * (V / A)));
else
tmp = c0 * (sqrt(A) * sqrt(((1.0 / 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[(l * V), $MachinePrecision], -2e+282], N[(N[(c0 * N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], -1e-266], N[(c0 / N[(N[Sqrt[N[(l * (-V)), $MachinePrecision]], $MachinePrecision] / N[Sqrt[(-A)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 2e-312], N[(c0 / N[Sqrt[N[(l * N[(V / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] * N[Sqrt[N[(N[(1.0 / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot V \leq -2 \cdot 10^{+282}:\\
\;\;\;\;\frac{c0 \cdot \sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\
\mathbf{elif}\;\ell \cdot V \leq -1 \cdot 10^{-266}:\\
\;\;\;\;\frac{c0}{\frac{\sqrt{\ell \cdot \left(-V\right)}}{\sqrt{-A}}}\\
\mathbf{elif}\;\ell \cdot V \leq 2 \cdot 10^{-312}:\\
\;\;\;\;\frac{c0}{\sqrt{\ell \cdot \frac{V}{A}}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \left(\sqrt{A} \cdot \sqrt{\frac{\frac{1}{V}}{\ell}}\right)\\
\end{array}
\end{array}
if (*.f64 V l) < -2.00000000000000007e282Initial program 47.1%
*-commutative47.1%
associate-/r*73.1%
sqrt-div35.5%
associate-*l/35.5%
Applied egg-rr35.5%
if -2.00000000000000007e282 < (*.f64 V l) < -9.9999999999999998e-267Initial program 79.9%
*-un-lft-identity79.9%
times-frac67.6%
Applied egg-rr67.6%
*-commutative67.6%
*-commutative67.6%
associate-*r/76.2%
frac-2neg76.2%
associate-*l/76.1%
*-un-lft-identity76.1%
distribute-frac-neg276.1%
sqrt-undiv43.4%
clear-num43.4%
un-div-inv43.5%
sqrt-undiv75.0%
add-sqr-sqrt32.8%
sqrt-unprod23.9%
sqr-neg23.9%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
add-sqr-sqrt0.0%
sqrt-unprod20.6%
Applied egg-rr75.0%
associate-/r/67.9%
*-commutative67.9%
Simplified67.9%
associate-*r/79.6%
frac-2neg79.6%
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 -9.9999999999999998e-267 < (*.f64 V l) < 2.0000000000019e-312Initial program 50.4%
*-un-lft-identity50.4%
times-frac75.0%
Applied egg-rr75.0%
*-commutative75.0%
*-commutative75.0%
associate-*r/75.0%
frac-2neg75.0%
associate-*l/75.0%
*-un-lft-identity75.0%
distribute-frac-neg275.0%
sqrt-undiv33.3%
clear-num33.3%
un-div-inv33.4%
sqrt-undiv75.1%
add-sqr-sqrt26.5%
sqrt-unprod17.6%
sqr-neg17.6%
sqrt-unprod0.0%
add-sqr-sqrt0.1%
add-sqr-sqrt0.0%
sqrt-unprod18.3%
Applied egg-rr75.1%
associate-/r/75.0%
associate-*l/50.5%
associate-*r/75.1%
Simplified75.1%
if 2.0000000000019e-312 < (*.f64 V l) Initial program 82.2%
pow1/282.2%
div-inv82.1%
unpow-prod-down92.2%
pow1/292.2%
Applied egg-rr92.2%
unpow1/292.2%
associate-/r*92.1%
Simplified92.1%
Final simplification87.1%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(if (<= (* l V) (- INFINITY))
(/ (* c0 (sqrt (/ A V))) (sqrt l))
(if (<= (* l V) -1e-266)
(* c0 (/ (sqrt (- A)) (sqrt (* l (- V)))))
(if (<= (* l V) 2e-312)
(/ c0 (sqrt (* l (/ V A))))
(* c0 (* (sqrt A) (sqrt (/ (/ 1.0 V) l))))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((l * V) <= -((double) INFINITY)) {
tmp = (c0 * sqrt((A / V))) / sqrt(l);
} else if ((l * V) <= -1e-266) {
tmp = c0 * (sqrt(-A) / sqrt((l * -V)));
} else if ((l * V) <= 2e-312) {
tmp = c0 / sqrt((l * (V / A)));
} else {
tmp = c0 * (sqrt(A) * sqrt(((1.0 / V) / l)));
}
return tmp;
}
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if ((l * V) <= -Double.POSITIVE_INFINITY) {
tmp = (c0 * Math.sqrt((A / V))) / Math.sqrt(l);
} else if ((l * V) <= -1e-266) {
tmp = c0 * (Math.sqrt(-A) / Math.sqrt((l * -V)));
} else if ((l * V) <= 2e-312) {
tmp = c0 / Math.sqrt((l * (V / A)));
} else {
tmp = c0 * (Math.sqrt(A) * Math.sqrt(((1.0 / V) / l)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if (l * V) <= -math.inf: tmp = (c0 * math.sqrt((A / V))) / math.sqrt(l) elif (l * V) <= -1e-266: tmp = c0 * (math.sqrt(-A) / math.sqrt((l * -V))) elif (l * V) <= 2e-312: tmp = c0 / math.sqrt((l * (V / A))) else: tmp = c0 * (math.sqrt(A) * math.sqrt(((1.0 / V) / l))) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (Float64(l * V) <= Float64(-Inf)) tmp = Float64(Float64(c0 * sqrt(Float64(A / V))) / sqrt(l)); elseif (Float64(l * V) <= -1e-266) tmp = Float64(c0 * Float64(sqrt(Float64(-A)) / sqrt(Float64(l * Float64(-V))))); elseif (Float64(l * V) <= 2e-312) tmp = Float64(c0 / sqrt(Float64(l * Float64(V / A)))); else tmp = Float64(c0 * Float64(sqrt(A) * sqrt(Float64(Float64(1.0 / 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 ((l * V) <= -Inf)
tmp = (c0 * sqrt((A / V))) / sqrt(l);
elseif ((l * V) <= -1e-266)
tmp = c0 * (sqrt(-A) / sqrt((l * -V)));
elseif ((l * V) <= 2e-312)
tmp = c0 / sqrt((l * (V / A)));
else
tmp = c0 * (sqrt(A) * sqrt(((1.0 / 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[(l * V), $MachinePrecision], (-Infinity)], N[(N[(c0 * N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], -1e-266], N[(c0 * N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[N[(l * (-V)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 2e-312], N[(c0 / N[Sqrt[N[(l * N[(V / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] * N[Sqrt[N[(N[(1.0 / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot V \leq -\infty:\\
\;\;\;\;\frac{c0 \cdot \sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\
\mathbf{elif}\;\ell \cdot V \leq -1 \cdot 10^{-266}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{\ell \cdot \left(-V\right)}}\\
\mathbf{elif}\;\ell \cdot V \leq 2 \cdot 10^{-312}:\\
\;\;\;\;\frac{c0}{\sqrt{\ell \cdot \frac{V}{A}}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \left(\sqrt{A} \cdot \sqrt{\frac{\frac{1}{V}}{\ell}}\right)\\
\end{array}
\end{array}
if (*.f64 V l) < -inf.0Initial program 37.7%
*-commutative37.7%
associate-/r*68.5%
sqrt-div35.8%
associate-*l/35.8%
Applied egg-rr35.8%
if -inf.0 < (*.f64 V l) < -9.9999999999999998e-267Initial program 80.6%
frac-2neg80.6%
sqrt-div99.4%
*-commutative99.4%
distribute-rgt-neg-in99.4%
Applied egg-rr99.4%
if -9.9999999999999998e-267 < (*.f64 V l) < 2.0000000000019e-312Initial program 50.4%
*-un-lft-identity50.4%
times-frac75.0%
Applied egg-rr75.0%
*-commutative75.0%
*-commutative75.0%
associate-*r/75.0%
frac-2neg75.0%
associate-*l/75.0%
*-un-lft-identity75.0%
distribute-frac-neg275.0%
sqrt-undiv33.3%
clear-num33.3%
un-div-inv33.4%
sqrt-undiv75.1%
add-sqr-sqrt26.5%
sqrt-unprod17.6%
sqr-neg17.6%
sqrt-unprod0.0%
add-sqr-sqrt0.1%
add-sqr-sqrt0.0%
sqrt-unprod18.3%
Applied egg-rr75.1%
associate-/r/75.0%
associate-*l/50.5%
associate-*r/75.1%
Simplified75.1%
if 2.0000000000019e-312 < (*.f64 V l) Initial program 82.2%
pow1/282.2%
div-inv82.1%
unpow-prod-down92.2%
pow1/292.2%
Applied egg-rr92.2%
unpow1/292.2%
associate-/r*92.1%
Simplified92.1%
Final simplification87.9%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(if (<= (* l V) -1e+185)
(* (/ c0 (sqrt l)) (sqrt (/ A V)))
(if (<= (* l V) -1e-14)
(* c0 (sqrt (/ A (* l V))))
(if (<= (* l V) 2e-312)
(* c0 (pow (* l (/ V A)) -0.5))
(/ (* c0 (sqrt A)) (sqrt (* l V)))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((l * V) <= -1e+185) {
tmp = (c0 / sqrt(l)) * sqrt((A / V));
} else if ((l * V) <= -1e-14) {
tmp = c0 * sqrt((A / (l * V)));
} else if ((l * V) <= 2e-312) {
tmp = c0 * pow((l * (V / A)), -0.5);
} else {
tmp = (c0 * sqrt(A)) / sqrt((l * V));
}
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 ((l * v) <= (-1d+185)) then
tmp = (c0 / sqrt(l)) * sqrt((a / v))
else if ((l * v) <= (-1d-14)) then
tmp = c0 * sqrt((a / (l * v)))
else if ((l * v) <= 2d-312) then
tmp = c0 * ((l * (v / a)) ** (-0.5d0))
else
tmp = (c0 * sqrt(a)) / sqrt((l * v))
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 ((l * V) <= -1e+185) {
tmp = (c0 / Math.sqrt(l)) * Math.sqrt((A / V));
} else if ((l * V) <= -1e-14) {
tmp = c0 * Math.sqrt((A / (l * V)));
} else if ((l * V) <= 2e-312) {
tmp = c0 * Math.pow((l * (V / A)), -0.5);
} else {
tmp = (c0 * Math.sqrt(A)) / Math.sqrt((l * V));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if (l * V) <= -1e+185: tmp = (c0 / math.sqrt(l)) * math.sqrt((A / V)) elif (l * V) <= -1e-14: tmp = c0 * math.sqrt((A / (l * V))) elif (l * V) <= 2e-312: tmp = c0 * math.pow((l * (V / A)), -0.5) else: tmp = (c0 * math.sqrt(A)) / math.sqrt((l * V)) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (Float64(l * V) <= -1e+185) tmp = Float64(Float64(c0 / sqrt(l)) * sqrt(Float64(A / V))); elseif (Float64(l * V) <= -1e-14) tmp = Float64(c0 * sqrt(Float64(A / Float64(l * V)))); elseif (Float64(l * V) <= 2e-312) tmp = Float64(c0 * (Float64(l * Float64(V / A)) ^ -0.5)); else tmp = Float64(Float64(c0 * sqrt(A)) / sqrt(Float64(l * V))); 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 ((l * V) <= -1e+185)
tmp = (c0 / sqrt(l)) * sqrt((A / V));
elseif ((l * V) <= -1e-14)
tmp = c0 * sqrt((A / (l * V)));
elseif ((l * V) <= 2e-312)
tmp = c0 * ((l * (V / A)) ^ -0.5);
else
tmp = (c0 * sqrt(A)) / sqrt((l * V));
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[(l * V), $MachinePrecision], -1e+185], N[(N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], -1e-14], N[(c0 * N[Sqrt[N[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 2e-312], N[(c0 * N[Power[N[(l * N[(V / A), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision], N[(N[(c0 * N[Sqrt[A], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(l * V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot V \leq -1 \cdot 10^{+185}:\\
\;\;\;\;\frac{c0}{\sqrt{\ell}} \cdot \sqrt{\frac{A}{V}}\\
\mathbf{elif}\;\ell \cdot V \leq -1 \cdot 10^{-14}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{A}{\ell \cdot V}}\\
\mathbf{elif}\;\ell \cdot V \leq 2 \cdot 10^{-312}:\\
\;\;\;\;c0 \cdot {\left(\ell \cdot \frac{V}{A}\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0 \cdot \sqrt{A}}{\sqrt{\ell \cdot V}}\\
\end{array}
\end{array}
if (*.f64 V l) < -9.9999999999999998e184Initial program 43.5%
associate-/r*58.8%
sqrt-div35.7%
associate-*r/35.6%
Applied egg-rr35.6%
*-commutative35.6%
associate-/l*35.6%
Simplified35.6%
if -9.9999999999999998e184 < (*.f64 V l) < -9.99999999999999999e-15Initial program 92.8%
if -9.99999999999999999e-15 < (*.f64 V l) < 2.0000000000019e-312Initial program 66.2%
*-un-lft-identity66.2%
times-frac78.4%
Applied egg-rr78.4%
clear-num78.5%
un-div-inv78.4%
Applied egg-rr78.4%
associate-/r*78.4%
associate-*r/66.1%
inv-pow66.1%
sqrt-pow167.0%
metadata-eval67.0%
associate-*r/79.3%
Applied egg-rr79.3%
*-commutative79.3%
associate-*l/67.0%
associate-*r/78.6%
Simplified78.6%
if 2.0000000000019e-312 < (*.f64 V l) Initial program 82.2%
*-commutative82.2%
sqrt-div92.1%
associate-*l/90.5%
Applied egg-rr90.5%
Final simplification80.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 (<= (* l V) -1e+185)
(* (/ c0 (sqrt l)) (sqrt (/ A V)))
(if (<= (* l V) -1e-14)
(* c0 (sqrt (/ A (* l V))))
(if (<= (* l V) 2e-312)
(* c0 (pow (* l (/ V A)) -0.5))
(* (sqrt A) (/ c0 (sqrt (* l V))))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((l * V) <= -1e+185) {
tmp = (c0 / sqrt(l)) * sqrt((A / V));
} else if ((l * V) <= -1e-14) {
tmp = c0 * sqrt((A / (l * V)));
} else if ((l * V) <= 2e-312) {
tmp = c0 * pow((l * (V / A)), -0.5);
} else {
tmp = sqrt(A) * (c0 / sqrt((l * V)));
}
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 ((l * v) <= (-1d+185)) then
tmp = (c0 / sqrt(l)) * sqrt((a / v))
else if ((l * v) <= (-1d-14)) then
tmp = c0 * sqrt((a / (l * v)))
else if ((l * v) <= 2d-312) then
tmp = c0 * ((l * (v / a)) ** (-0.5d0))
else
tmp = sqrt(a) * (c0 / sqrt((l * v)))
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 ((l * V) <= -1e+185) {
tmp = (c0 / Math.sqrt(l)) * Math.sqrt((A / V));
} else if ((l * V) <= -1e-14) {
tmp = c0 * Math.sqrt((A / (l * V)));
} else if ((l * V) <= 2e-312) {
tmp = c0 * Math.pow((l * (V / A)), -0.5);
} else {
tmp = Math.sqrt(A) * (c0 / Math.sqrt((l * V)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if (l * V) <= -1e+185: tmp = (c0 / math.sqrt(l)) * math.sqrt((A / V)) elif (l * V) <= -1e-14: tmp = c0 * math.sqrt((A / (l * V))) elif (l * V) <= 2e-312: tmp = c0 * math.pow((l * (V / A)), -0.5) else: tmp = math.sqrt(A) * (c0 / math.sqrt((l * V))) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (Float64(l * V) <= -1e+185) tmp = Float64(Float64(c0 / sqrt(l)) * sqrt(Float64(A / V))); elseif (Float64(l * V) <= -1e-14) tmp = Float64(c0 * sqrt(Float64(A / Float64(l * V)))); elseif (Float64(l * V) <= 2e-312) tmp = Float64(c0 * (Float64(l * Float64(V / A)) ^ -0.5)); else tmp = Float64(sqrt(A) * Float64(c0 / sqrt(Float64(l * V)))); 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 ((l * V) <= -1e+185)
tmp = (c0 / sqrt(l)) * sqrt((A / V));
elseif ((l * V) <= -1e-14)
tmp = c0 * sqrt((A / (l * V)));
elseif ((l * V) <= 2e-312)
tmp = c0 * ((l * (V / A)) ^ -0.5);
else
tmp = sqrt(A) * (c0 / sqrt((l * V)));
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[(l * V), $MachinePrecision], -1e+185], N[(N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], -1e-14], N[(c0 * N[Sqrt[N[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 2e-312], N[(c0 * N[Power[N[(l * N[(V / A), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[A], $MachinePrecision] * N[(c0 / N[Sqrt[N[(l * V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot V \leq -1 \cdot 10^{+185}:\\
\;\;\;\;\frac{c0}{\sqrt{\ell}} \cdot \sqrt{\frac{A}{V}}\\
\mathbf{elif}\;\ell \cdot V \leq -1 \cdot 10^{-14}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{A}{\ell \cdot V}}\\
\mathbf{elif}\;\ell \cdot V \leq 2 \cdot 10^{-312}:\\
\;\;\;\;c0 \cdot {\left(\ell \cdot \frac{V}{A}\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{A} \cdot \frac{c0}{\sqrt{\ell \cdot V}}\\
\end{array}
\end{array}
if (*.f64 V l) < -9.9999999999999998e184Initial program 43.5%
associate-/r*58.8%
sqrt-div35.7%
associate-*r/35.6%
Applied egg-rr35.6%
*-commutative35.6%
associate-/l*35.6%
Simplified35.6%
if -9.9999999999999998e184 < (*.f64 V l) < -9.99999999999999999e-15Initial program 92.8%
if -9.99999999999999999e-15 < (*.f64 V l) < 2.0000000000019e-312Initial program 66.2%
*-un-lft-identity66.2%
times-frac78.4%
Applied egg-rr78.4%
clear-num78.5%
un-div-inv78.4%
Applied egg-rr78.4%
associate-/r*78.4%
associate-*r/66.1%
inv-pow66.1%
sqrt-pow167.0%
metadata-eval67.0%
associate-*r/79.3%
Applied egg-rr79.3%
*-commutative79.3%
associate-*l/67.0%
associate-*r/78.6%
Simplified78.6%
if 2.0000000000019e-312 < (*.f64 V l) Initial program 82.2%
sqrt-div92.1%
associate-*r/90.5%
Applied egg-rr90.5%
*-commutative90.5%
associate-/l*88.8%
Simplified88.8%
Final simplification79.2%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(if (<= (* l V) -2e+79)
(* c0 (* (sqrt (/ A V)) (sqrt (/ 1.0 l))))
(if (<= (* l V) 2e-312)
(/ c0 (sqrt (* V (/ l A))))
(* c0 (* (sqrt A) (sqrt (/ (/ 1.0 V) l)))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((l * V) <= -2e+79) {
tmp = c0 * (sqrt((A / V)) * sqrt((1.0 / l)));
} else if ((l * V) <= 2e-312) {
tmp = c0 / sqrt((V * (l / A)));
} else {
tmp = c0 * (sqrt(A) * sqrt(((1.0 / 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 ((l * v) <= (-2d+79)) then
tmp = c0 * (sqrt((a / v)) * sqrt((1.0d0 / l)))
else if ((l * v) <= 2d-312) then
tmp = c0 / sqrt((v * (l / a)))
else
tmp = c0 * (sqrt(a) * sqrt(((1.0d0 / 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 ((l * V) <= -2e+79) {
tmp = c0 * (Math.sqrt((A / V)) * Math.sqrt((1.0 / l)));
} else if ((l * V) <= 2e-312) {
tmp = c0 / Math.sqrt((V * (l / A)));
} else {
tmp = c0 * (Math.sqrt(A) * Math.sqrt(((1.0 / V) / l)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if (l * V) <= -2e+79: tmp = c0 * (math.sqrt((A / V)) * math.sqrt((1.0 / l))) elif (l * V) <= 2e-312: tmp = c0 / math.sqrt((V * (l / A))) else: tmp = c0 * (math.sqrt(A) * math.sqrt(((1.0 / V) / l))) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (Float64(l * V) <= -2e+79) tmp = Float64(c0 * Float64(sqrt(Float64(A / V)) * sqrt(Float64(1.0 / l)))); elseif (Float64(l * V) <= 2e-312) tmp = Float64(c0 / sqrt(Float64(V * Float64(l / A)))); else tmp = Float64(c0 * Float64(sqrt(A) * sqrt(Float64(Float64(1.0 / 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 ((l * V) <= -2e+79)
tmp = c0 * (sqrt((A / V)) * sqrt((1.0 / l)));
elseif ((l * V) <= 2e-312)
tmp = c0 / sqrt((V * (l / A)));
else
tmp = c0 * (sqrt(A) * sqrt(((1.0 / 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[(l * V), $MachinePrecision], -2e+79], N[(c0 * N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(1.0 / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 2e-312], N[(c0 / N[Sqrt[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] * N[Sqrt[N[(N[(1.0 / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot V \leq -2 \cdot 10^{+79}:\\
\;\;\;\;c0 \cdot \left(\sqrt{\frac{A}{V}} \cdot \sqrt{\frac{1}{\ell}}\right)\\
\mathbf{elif}\;\ell \cdot V \leq 2 \cdot 10^{-312}:\\
\;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \left(\sqrt{A} \cdot \sqrt{\frac{\frac{1}{V}}{\ell}}\right)\\
\end{array}
\end{array}
if (*.f64 V l) < -1.99999999999999993e79Initial program 56.6%
pow1/256.6%
associate-/r*67.2%
div-inv67.2%
unpow-prod-down39.2%
pow1/239.2%
Applied egg-rr39.2%
unpow1/239.2%
Simplified39.2%
if -1.99999999999999993e79 < (*.f64 V l) < 2.0000000000019e-312Initial program 71.6%
*-un-lft-identity71.6%
times-frac76.6%
Applied egg-rr76.6%
*-commutative76.6%
*-commutative76.6%
associate-*r/79.7%
frac-2neg79.7%
associate-*l/79.8%
*-un-lft-identity79.8%
distribute-frac-neg279.8%
sqrt-undiv37.6%
clear-num37.6%
un-div-inv37.6%
sqrt-undiv79.8%
add-sqr-sqrt32.4%
sqrt-unprod22.8%
sqr-neg22.8%
sqrt-unprod0.0%
add-sqr-sqrt0.1%
add-sqr-sqrt0.0%
sqrt-unprod21.3%
Applied egg-rr79.8%
associate-/r/77.3%
*-commutative77.3%
Simplified77.3%
if 2.0000000000019e-312 < (*.f64 V l) Initial program 82.2%
pow1/282.2%
div-inv82.1%
unpow-prod-down92.2%
pow1/292.2%
Applied egg-rr92.2%
unpow1/292.2%
associate-/r*92.1%
Simplified92.1%
Final simplification76.7%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(if (<= (* l V) -5e+108)
(/ (* c0 (sqrt (/ A V))) (sqrt l))
(if (<= (* l V) 2e-312)
(* c0 (sqrt (* (/ 1.0 V) (/ A l))))
(* c0 (* (sqrt A) (sqrt (/ (/ 1.0 V) l)))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((l * V) <= -5e+108) {
tmp = (c0 * sqrt((A / V))) / sqrt(l);
} else if ((l * V) <= 2e-312) {
tmp = c0 * sqrt(((1.0 / V) * (A / l)));
} else {
tmp = c0 * (sqrt(A) * sqrt(((1.0 / 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 ((l * v) <= (-5d+108)) then
tmp = (c0 * sqrt((a / v))) / sqrt(l)
else if ((l * v) <= 2d-312) then
tmp = c0 * sqrt(((1.0d0 / v) * (a / l)))
else
tmp = c0 * (sqrt(a) * sqrt(((1.0d0 / 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 ((l * V) <= -5e+108) {
tmp = (c0 * Math.sqrt((A / V))) / Math.sqrt(l);
} else if ((l * V) <= 2e-312) {
tmp = c0 * Math.sqrt(((1.0 / V) * (A / l)));
} else {
tmp = c0 * (Math.sqrt(A) * Math.sqrt(((1.0 / V) / l)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if (l * V) <= -5e+108: tmp = (c0 * math.sqrt((A / V))) / math.sqrt(l) elif (l * V) <= 2e-312: tmp = c0 * math.sqrt(((1.0 / V) * (A / l))) else: tmp = c0 * (math.sqrt(A) * math.sqrt(((1.0 / V) / l))) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (Float64(l * V) <= -5e+108) tmp = Float64(Float64(c0 * sqrt(Float64(A / V))) / sqrt(l)); elseif (Float64(l * V) <= 2e-312) tmp = Float64(c0 * sqrt(Float64(Float64(1.0 / V) * Float64(A / l)))); else tmp = Float64(c0 * Float64(sqrt(A) * sqrt(Float64(Float64(1.0 / 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 ((l * V) <= -5e+108)
tmp = (c0 * sqrt((A / V))) / sqrt(l);
elseif ((l * V) <= 2e-312)
tmp = c0 * sqrt(((1.0 / V) * (A / l)));
else
tmp = c0 * (sqrt(A) * sqrt(((1.0 / 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[(l * V), $MachinePrecision], -5e+108], N[(N[(c0 * N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 2e-312], N[(c0 * N[Sqrt[N[(N[(1.0 / V), $MachinePrecision] * N[(A / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] * N[Sqrt[N[(N[(1.0 / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot V \leq -5 \cdot 10^{+108}:\\
\;\;\;\;\frac{c0 \cdot \sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\
\mathbf{elif}\;\ell \cdot V \leq 2 \cdot 10^{-312}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{1}{V} \cdot \frac{A}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \left(\sqrt{A} \cdot \sqrt{\frac{\frac{1}{V}}{\ell}}\right)\\
\end{array}
\end{array}
if (*.f64 V l) < -4.99999999999999991e108Initial program 55.2%
*-commutative55.2%
associate-/r*66.7%
sqrt-div40.4%
associate-*l/40.4%
Applied egg-rr40.4%
if -4.99999999999999991e108 < (*.f64 V l) < 2.0000000000019e-312Initial program 71.7%
*-un-lft-identity71.7%
times-frac76.4%
Applied egg-rr76.4%
if 2.0000000000019e-312 < (*.f64 V l) Initial program 82.2%
pow1/282.2%
div-inv82.1%
unpow-prod-down92.2%
pow1/292.2%
Applied egg-rr92.2%
unpow1/292.2%
associate-/r*92.1%
Simplified92.1%
Final simplification77.2%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(if (<= (* l V) -5e+108)
(/ (* c0 (sqrt (/ A V))) (sqrt l))
(if (<= (* l V) 2e-312)
(* c0 (sqrt (* (/ 1.0 V) (/ A l))))
(/ (* c0 (sqrt A)) (sqrt (* l V))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((l * V) <= -5e+108) {
tmp = (c0 * sqrt((A / V))) / sqrt(l);
} else if ((l * V) <= 2e-312) {
tmp = c0 * sqrt(((1.0 / V) * (A / l)));
} else {
tmp = (c0 * sqrt(A)) / sqrt((l * V));
}
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 ((l * v) <= (-5d+108)) then
tmp = (c0 * sqrt((a / v))) / sqrt(l)
else if ((l * v) <= 2d-312) then
tmp = c0 * sqrt(((1.0d0 / v) * (a / l)))
else
tmp = (c0 * sqrt(a)) / sqrt((l * v))
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 ((l * V) <= -5e+108) {
tmp = (c0 * Math.sqrt((A / V))) / Math.sqrt(l);
} else if ((l * V) <= 2e-312) {
tmp = c0 * Math.sqrt(((1.0 / V) * (A / l)));
} else {
tmp = (c0 * Math.sqrt(A)) / Math.sqrt((l * V));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if (l * V) <= -5e+108: tmp = (c0 * math.sqrt((A / V))) / math.sqrt(l) elif (l * V) <= 2e-312: tmp = c0 * math.sqrt(((1.0 / V) * (A / l))) else: tmp = (c0 * math.sqrt(A)) / math.sqrt((l * V)) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (Float64(l * V) <= -5e+108) tmp = Float64(Float64(c0 * sqrt(Float64(A / V))) / sqrt(l)); elseif (Float64(l * V) <= 2e-312) tmp = Float64(c0 * sqrt(Float64(Float64(1.0 / V) * Float64(A / l)))); else tmp = Float64(Float64(c0 * sqrt(A)) / sqrt(Float64(l * V))); 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 ((l * V) <= -5e+108)
tmp = (c0 * sqrt((A / V))) / sqrt(l);
elseif ((l * V) <= 2e-312)
tmp = c0 * sqrt(((1.0 / V) * (A / l)));
else
tmp = (c0 * sqrt(A)) / sqrt((l * V));
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[(l * V), $MachinePrecision], -5e+108], N[(N[(c0 * N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 2e-312], N[(c0 * N[Sqrt[N[(N[(1.0 / V), $MachinePrecision] * N[(A / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(c0 * N[Sqrt[A], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(l * V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot V \leq -5 \cdot 10^{+108}:\\
\;\;\;\;\frac{c0 \cdot \sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\
\mathbf{elif}\;\ell \cdot V \leq 2 \cdot 10^{-312}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{1}{V} \cdot \frac{A}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0 \cdot \sqrt{A}}{\sqrt{\ell \cdot V}}\\
\end{array}
\end{array}
if (*.f64 V l) < -4.99999999999999991e108Initial program 55.2%
*-commutative55.2%
associate-/r*66.7%
sqrt-div40.4%
associate-*l/40.4%
Applied egg-rr40.4%
if -4.99999999999999991e108 < (*.f64 V l) < 2.0000000000019e-312Initial program 71.7%
*-un-lft-identity71.7%
times-frac76.4%
Applied egg-rr76.4%
if 2.0000000000019e-312 < (*.f64 V l) Initial program 82.2%
*-commutative82.2%
sqrt-div92.1%
associate-*l/90.5%
Applied egg-rr90.5%
Final simplification76.5%
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 (* l V)))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
return c0 * sqrt((A / (l * V)));
}
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 / (l * v)))
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 / (l * V)));
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): return c0 * math.sqrt((A / (l * V)))
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) return Float64(c0 * sqrt(Float64(A / Float64(l * V)))) end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp = code(c0, A, V, l)
tmp = c0 * sqrt((A / (l * V)));
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[(l * V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
c0 \cdot \sqrt{\frac{A}{\ell \cdot V}}
\end{array}
Initial program 73.5%
Final simplification73.5%
herbie shell --seed 2024143
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))