
(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 9 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 (<= (* l V) -1e+272)
(/ c0 (/ (sqrt l) (sqrt (/ A V))))
(if (<= (* l V) -2e-210)
(* c0 (/ (sqrt (- A)) (sqrt (* l (- V)))))
(if (or (<= (* l V) 0.0) (not (<= (* l V) 5e+299)))
(/ c0 (sqrt (* V (/ l A))))
(/ c0 (/ (sqrt (* l V)) (sqrt A)))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((l * V) <= -1e+272) {
tmp = c0 / (sqrt(l) / sqrt((A / V)));
} else if ((l * V) <= -2e-210) {
tmp = c0 * (sqrt(-A) / sqrt((l * -V)));
} else if (((l * V) <= 0.0) || !((l * V) <= 5e+299)) {
tmp = c0 / sqrt((V * (l / A)));
} else {
tmp = c0 / (sqrt((l * V)) / sqrt(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 ((l * v) <= (-1d+272)) then
tmp = c0 / (sqrt(l) / sqrt((a / v)))
else if ((l * v) <= (-2d-210)) then
tmp = c0 * (sqrt(-a) / sqrt((l * -v)))
else if (((l * v) <= 0.0d0) .or. (.not. ((l * v) <= 5d+299))) then
tmp = c0 / sqrt((v * (l / a)))
else
tmp = c0 / (sqrt((l * v)) / sqrt(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 ((l * V) <= -1e+272) {
tmp = c0 / (Math.sqrt(l) / Math.sqrt((A / V)));
} else if ((l * V) <= -2e-210) {
tmp = c0 * (Math.sqrt(-A) / Math.sqrt((l * -V)));
} else if (((l * V) <= 0.0) || !((l * V) <= 5e+299)) {
tmp = c0 / Math.sqrt((V * (l / A)));
} else {
tmp = c0 / (Math.sqrt((l * V)) / Math.sqrt(A));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if (l * V) <= -1e+272: tmp = c0 / (math.sqrt(l) / math.sqrt((A / V))) elif (l * V) <= -2e-210: tmp = c0 * (math.sqrt(-A) / math.sqrt((l * -V))) elif ((l * V) <= 0.0) or not ((l * V) <= 5e+299): tmp = c0 / math.sqrt((V * (l / A))) else: tmp = c0 / (math.sqrt((l * V)) / math.sqrt(A)) 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+272) tmp = Float64(c0 / Float64(sqrt(l) / sqrt(Float64(A / V)))); elseif (Float64(l * V) <= -2e-210) tmp = Float64(c0 * Float64(sqrt(Float64(-A)) / sqrt(Float64(l * Float64(-V))))); elseif ((Float64(l * V) <= 0.0) || !(Float64(l * V) <= 5e+299)) tmp = Float64(c0 / sqrt(Float64(V * Float64(l / A)))); else tmp = Float64(c0 / Float64(sqrt(Float64(l * V)) / sqrt(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 ((l * V) <= -1e+272)
tmp = c0 / (sqrt(l) / sqrt((A / V)));
elseif ((l * V) <= -2e-210)
tmp = c0 * (sqrt(-A) / sqrt((l * -V)));
elseif (((l * V) <= 0.0) || ~(((l * V) <= 5e+299)))
tmp = c0 / sqrt((V * (l / A)));
else
tmp = c0 / (sqrt((l * V)) / sqrt(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[N[(l * V), $MachinePrecision], -1e+272], N[(c0 / N[(N[Sqrt[l], $MachinePrecision] / N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], -2e-210], N[(c0 * N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[N[(l * (-V)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(l * V), $MachinePrecision], 0.0], N[Not[LessEqual[N[(l * V), $MachinePrecision], 5e+299]], $MachinePrecision]], N[(c0 / N[Sqrt[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0 / N[(N[Sqrt[N[(l * V), $MachinePrecision]], $MachinePrecision] / N[Sqrt[A], $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^{+272}:\\
\;\;\;\;\frac{c0}{\frac{\sqrt{\ell}}{\sqrt{\frac{A}{V}}}}\\
\mathbf{elif}\;\ell \cdot V \leq -2 \cdot 10^{-210}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{\ell \cdot \left(-V\right)}}\\
\mathbf{elif}\;\ell \cdot V \leq 0 \lor \neg \left(\ell \cdot V \leq 5 \cdot 10^{+299}\right):\\
\;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\frac{\sqrt{\ell \cdot V}}{\sqrt{A}}}\\
\end{array}
\end{array}
if (*.f64 V l) < -1.0000000000000001e272Initial program 47.9%
associate-/r*75.7%
sqrt-div49.9%
associate-*r/50.0%
Applied egg-rr50.0%
associate-/l*50.2%
Simplified50.2%
if -1.0000000000000001e272 < (*.f64 V l) < -2.0000000000000001e-210Initial program 88.8%
frac-2neg88.8%
sqrt-div99.6%
distribute-rgt-neg-in99.6%
Applied egg-rr99.6%
distribute-rgt-neg-out99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
Simplified99.6%
if -2.0000000000000001e-210 < (*.f64 V l) < -0.0 or 5.0000000000000003e299 < (*.f64 V l) Initial program 49.2%
associate-/r*71.7%
div-inv71.8%
Applied egg-rr71.8%
Applied egg-rr71.8%
associate-/r/73.3%
*-commutative73.3%
Simplified73.3%
if -0.0 < (*.f64 V l) < 5.0000000000000003e299Initial program 87.2%
associate-/r*80.6%
div-inv80.5%
Applied egg-rr80.5%
Applied egg-rr78.3%
associate-/r/73.6%
*-commutative73.6%
Simplified73.6%
associate-*r/85.1%
sqrt-div99.5%
*-commutative99.5%
Applied egg-rr99.5%
Final simplification89.1%
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 1.5e+288)))
(* 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 <= 1.5e+288)) {
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 <= 1.5d+288))) 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 <= 1.5e+288)) {
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 <= 1.5e+288): 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 <= 1.5e+288)) 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 <= 1.5e+288)))
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, 1.5e+288]], $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 1.5 \cdot 10^{+288}\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 1.4999999999999999e288 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 67.4%
*-commutative67.4%
associate-/l/72.4%
Simplified72.4%
if 0.0 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1.4999999999999999e288Initial program 99.5%
Final simplification79.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 -5e-310) (* c0 (/ (/ (sqrt A) (sqrt (- V))) (sqrt (- l)))) (* c0 (* (/ 1.0 (sqrt (/ V A))) (pow l -0.5)))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if (l <= -5e-310) {
tmp = c0 * ((sqrt(A) / sqrt(-V)) / sqrt(-l));
} else {
tmp = c0 * ((1.0 / sqrt((V / A))) * pow(l, -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) :: tmp
if (l <= (-5d-310)) then
tmp = c0 * ((sqrt(a) / sqrt(-v)) / sqrt(-l))
else
tmp = c0 * ((1.0d0 / sqrt((v / a))) * (l ** (-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 tmp;
if (l <= -5e-310) {
tmp = c0 * ((Math.sqrt(A) / Math.sqrt(-V)) / Math.sqrt(-l));
} else {
tmp = c0 * ((1.0 / Math.sqrt((V / A))) * Math.pow(l, -0.5));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if l <= -5e-310: tmp = c0 * ((math.sqrt(A) / math.sqrt(-V)) / math.sqrt(-l)) else: tmp = c0 * ((1.0 / math.sqrt((V / A))) * math.pow(l, -0.5)) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (l <= -5e-310) tmp = Float64(c0 * Float64(Float64(sqrt(A) / sqrt(Float64(-V))) / sqrt(Float64(-l)))); else tmp = Float64(c0 * Float64(Float64(1.0 / sqrt(Float64(V / A))) * (l ^ -0.5))); 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 <= -5e-310)
tmp = c0 * ((sqrt(A) / sqrt(-V)) / sqrt(-l));
else
tmp = c0 * ((1.0 / sqrt((V / A))) * (l ^ -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_] := If[LessEqual[l, -5e-310], N[(c0 * N[(N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[(-V)], $MachinePrecision]), $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[(N[(1.0 / N[Sqrt[N[(V / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Power[l, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -5 \cdot 10^{-310}:\\
\;\;\;\;c0 \cdot \frac{\frac{\sqrt{A}}{\sqrt{-V}}}{\sqrt{-\ell}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \left(\frac{1}{\sqrt{\frac{V}{A}}} \cdot {\ell}^{-0.5}\right)\\
\end{array}
\end{array}
if l < -4.999999999999985e-310Initial program 75.2%
associate-/r*75.9%
frac-2neg75.9%
sqrt-div87.3%
distribute-neg-frac87.3%
Applied egg-rr87.3%
frac-2neg87.3%
sqrt-div54.5%
remove-double-neg54.5%
Applied egg-rr54.5%
if -4.999999999999985e-310 < l Initial program 75.2%
associate-/r*76.1%
div-inv76.1%
Applied egg-rr76.1%
*-commutative76.1%
clear-num75.9%
un-div-inv77.1%
Applied egg-rr77.1%
sqrt-div84.5%
clear-num84.4%
inv-pow84.4%
sqrt-pow184.5%
metadata-eval84.5%
Applied egg-rr84.5%
associate-/r/84.5%
Simplified84.5%
Final simplification68.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) -5e+143)
(/ c0 (/ (sqrt l) (sqrt (/ A V))))
(if (<= (* l V) -2e-189)
(* c0 (pow (/ (* l V) A) -0.5))
(if (or (<= (* l V) 0.0) (not (<= (* l V) 5e+299)))
(/ c0 (sqrt (* V (/ l A))))
(/ c0 (/ (sqrt (* l V)) (sqrt A)))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((l * V) <= -5e+143) {
tmp = c0 / (sqrt(l) / sqrt((A / V)));
} else if ((l * V) <= -2e-189) {
tmp = c0 * pow(((l * V) / A), -0.5);
} else if (((l * V) <= 0.0) || !((l * V) <= 5e+299)) {
tmp = c0 / sqrt((V * (l / A)));
} else {
tmp = c0 / (sqrt((l * V)) / sqrt(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 ((l * v) <= (-5d+143)) then
tmp = c0 / (sqrt(l) / sqrt((a / v)))
else if ((l * v) <= (-2d-189)) then
tmp = c0 * (((l * v) / a) ** (-0.5d0))
else if (((l * v) <= 0.0d0) .or. (.not. ((l * v) <= 5d+299))) then
tmp = c0 / sqrt((v * (l / a)))
else
tmp = c0 / (sqrt((l * v)) / sqrt(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 ((l * V) <= -5e+143) {
tmp = c0 / (Math.sqrt(l) / Math.sqrt((A / V)));
} else if ((l * V) <= -2e-189) {
tmp = c0 * Math.pow(((l * V) / A), -0.5);
} else if (((l * V) <= 0.0) || !((l * V) <= 5e+299)) {
tmp = c0 / Math.sqrt((V * (l / A)));
} else {
tmp = c0 / (Math.sqrt((l * V)) / Math.sqrt(A));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if (l * V) <= -5e+143: tmp = c0 / (math.sqrt(l) / math.sqrt((A / V))) elif (l * V) <= -2e-189: tmp = c0 * math.pow(((l * V) / A), -0.5) elif ((l * V) <= 0.0) or not ((l * V) <= 5e+299): tmp = c0 / math.sqrt((V * (l / A))) else: tmp = c0 / (math.sqrt((l * V)) / math.sqrt(A)) 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+143) tmp = Float64(c0 / Float64(sqrt(l) / sqrt(Float64(A / V)))); elseif (Float64(l * V) <= -2e-189) tmp = Float64(c0 * (Float64(Float64(l * V) / A) ^ -0.5)); elseif ((Float64(l * V) <= 0.0) || !(Float64(l * V) <= 5e+299)) tmp = Float64(c0 / sqrt(Float64(V * Float64(l / A)))); else tmp = Float64(c0 / Float64(sqrt(Float64(l * V)) / sqrt(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 ((l * V) <= -5e+143)
tmp = c0 / (sqrt(l) / sqrt((A / V)));
elseif ((l * V) <= -2e-189)
tmp = c0 * (((l * V) / A) ^ -0.5);
elseif (((l * V) <= 0.0) || ~(((l * V) <= 5e+299)))
tmp = c0 / sqrt((V * (l / A)));
else
tmp = c0 / (sqrt((l * V)) / sqrt(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[N[(l * V), $MachinePrecision], -5e+143], N[(c0 / N[(N[Sqrt[l], $MachinePrecision] / N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], -2e-189], N[(c0 * N[Power[N[(N[(l * V), $MachinePrecision] / A), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(l * V), $MachinePrecision], 0.0], N[Not[LessEqual[N[(l * V), $MachinePrecision], 5e+299]], $MachinePrecision]], N[(c0 / N[Sqrt[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0 / N[(N[Sqrt[N[(l * V), $MachinePrecision]], $MachinePrecision] / N[Sqrt[A], $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^{+143}:\\
\;\;\;\;\frac{c0}{\frac{\sqrt{\ell}}{\sqrt{\frac{A}{V}}}}\\
\mathbf{elif}\;\ell \cdot V \leq -2 \cdot 10^{-189}:\\
\;\;\;\;c0 \cdot {\left(\frac{\ell \cdot V}{A}\right)}^{-0.5}\\
\mathbf{elif}\;\ell \cdot V \leq 0 \lor \neg \left(\ell \cdot V \leq 5 \cdot 10^{+299}\right):\\
\;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\frac{\sqrt{\ell \cdot V}}{\sqrt{A}}}\\
\end{array}
\end{array}
if (*.f64 V l) < -5.00000000000000012e143Initial program 55.2%
associate-/r*71.6%
sqrt-div46.8%
associate-*r/47.0%
Applied egg-rr47.0%
associate-/l*47.1%
Simplified47.1%
if -5.00000000000000012e143 < (*.f64 V l) < -2.00000000000000014e-189Initial program 96.9%
associate-/r*79.4%
div-inv79.4%
Applied egg-rr79.4%
*-commutative79.4%
clear-num79.0%
un-div-inv81.0%
Applied egg-rr81.0%
div-inv79.0%
clear-num79.4%
frac-times96.9%
*-un-lft-identity96.9%
*-commutative96.9%
clear-num97.0%
associate-*r/83.3%
sqrt-div83.3%
metadata-eval83.3%
pow1/283.3%
pow-flip83.3%
associate-*r/97.0%
*-commutative97.0%
metadata-eval97.0%
Applied egg-rr97.0%
if -2.00000000000000014e-189 < (*.f64 V l) < -0.0 or 5.0000000000000003e299 < (*.f64 V l) Initial program 47.3%
associate-/r*68.8%
div-inv68.9%
Applied egg-rr68.9%
Applied egg-rr68.9%
associate-/r/70.4%
*-commutative70.4%
Simplified70.4%
if -0.0 < (*.f64 V l) < 5.0000000000000003e299Initial program 87.2%
associate-/r*80.6%
div-inv80.5%
Applied egg-rr80.5%
Applied egg-rr78.3%
associate-/r/73.6%
*-commutative73.6%
Simplified73.6%
associate-*r/85.1%
sqrt-div99.5%
*-commutative99.5%
Applied egg-rr99.5%
Final simplification84.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 -5e-310) (* c0 (sqrt (/ (/ A V) l))) (/ c0 (/ (sqrt l) (sqrt (/ A V))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if (l <= -5e-310) {
tmp = c0 * sqrt(((A / V) / l));
} else {
tmp = c0 / (sqrt(l) / sqrt((A / 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 <= (-5d-310)) then
tmp = c0 * sqrt(((a / v) / l))
else
tmp = c0 / (sqrt(l) / sqrt((a / 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 <= -5e-310) {
tmp = c0 * Math.sqrt(((A / V) / l));
} else {
tmp = c0 / (Math.sqrt(l) / Math.sqrt((A / V)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if l <= -5e-310: tmp = c0 * math.sqrt(((A / V) / l)) else: tmp = c0 / (math.sqrt(l) / math.sqrt((A / V))) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (l <= -5e-310) tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); else tmp = Float64(c0 / Float64(sqrt(l) / sqrt(Float64(A / 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 <= -5e-310)
tmp = c0 * sqrt(((A / V) / l));
else
tmp = c0 / (sqrt(l) / sqrt((A / 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[l, -5e-310], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0 / N[(N[Sqrt[l], $MachinePrecision] / N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -5 \cdot 10^{-310}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\frac{\sqrt{\ell}}{\sqrt{\frac{A}{V}}}}\\
\end{array}
\end{array}
if l < -4.999999999999985e-310Initial program 75.2%
*-commutative75.2%
associate-/l/75.9%
Simplified75.9%
if -4.999999999999985e-310 < l Initial program 75.2%
associate-/r*76.1%
sqrt-div83.5%
associate-*r/81.3%
Applied egg-rr81.3%
associate-/l*83.6%
Simplified83.6%
Final simplification79.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 (/ A (* l V))))
(if (<= t_0 5e-311)
(* c0 (sqrt (/ (/ A V) l)))
(if (<= t_0 1e+270)
(* c0 (pow (/ (* l V) A) -0.5))
(* c0 (sqrt (/ (/ 1.0 l) (/ V A))))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = A / (l * V);
double tmp;
if (t_0 <= 5e-311) {
tmp = c0 * sqrt(((A / V) / l));
} else if (t_0 <= 1e+270) {
tmp = c0 * pow(((l * V) / A), -0.5);
} else {
tmp = c0 * sqrt(((1.0 / l) / (V / 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 = a / (l * v)
if (t_0 <= 5d-311) then
tmp = c0 * sqrt(((a / v) / l))
else if (t_0 <= 1d+270) then
tmp = c0 * (((l * v) / a) ** (-0.5d0))
else
tmp = c0 * sqrt(((1.0d0 / l) / (v / 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 = A / (l * V);
double tmp;
if (t_0 <= 5e-311) {
tmp = c0 * Math.sqrt(((A / V) / l));
} else if (t_0 <= 1e+270) {
tmp = c0 * Math.pow(((l * V) / A), -0.5);
} else {
tmp = c0 * Math.sqrt(((1.0 / l) / (V / A)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = A / (l * V) tmp = 0 if t_0 <= 5e-311: tmp = c0 * math.sqrt(((A / V) / l)) elif t_0 <= 1e+270: tmp = c0 * math.pow(((l * V) / A), -0.5) else: tmp = c0 * math.sqrt(((1.0 / l) / (V / A))) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = Float64(A / Float64(l * V)) tmp = 0.0 if (t_0 <= 5e-311) tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); elseif (t_0 <= 1e+270) tmp = Float64(c0 * (Float64(Float64(l * V) / A) ^ -0.5)); else tmp = Float64(c0 * sqrt(Float64(Float64(1.0 / l) / Float64(V / 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 = A / (l * V);
tmp = 0.0;
if (t_0 <= 5e-311)
tmp = c0 * sqrt(((A / V) / l));
elseif (t_0 <= 1e+270)
tmp = c0 * (((l * V) / A) ^ -0.5);
else
tmp = c0 * sqrt(((1.0 / l) / (V / 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[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 5e-311], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+270], N[(c0 * N[Power[N[(N[(l * V), $MachinePrecision] / A), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision], N[(c0 * N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / N[(V / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \frac{A}{\ell \cdot V}\\
\mathbf{if}\;t_0 \leq 5 \cdot 10^{-311}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;t_0 \leq 10^{+270}:\\
\;\;\;\;c0 \cdot {\left(\frac{\ell \cdot V}{A}\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{1}{\ell}}{\frac{V}{A}}}\\
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 5.00000000000023e-311Initial program 38.4%
*-commutative38.4%
associate-/l/57.1%
Simplified57.1%
if 5.00000000000023e-311 < (/.f64 A (*.f64 V l)) < 1e270Initial program 99.5%
associate-/r*87.8%
div-inv87.8%
Applied egg-rr87.8%
*-commutative87.8%
clear-num87.7%
un-div-inv89.3%
Applied egg-rr89.3%
div-inv87.7%
clear-num87.8%
frac-times99.5%
*-un-lft-identity99.5%
*-commutative99.5%
clear-num99.5%
associate-*r/86.9%
sqrt-div86.8%
metadata-eval86.8%
pow1/286.8%
pow-flip86.9%
associate-*r/99.6%
*-commutative99.6%
metadata-eval99.6%
Applied egg-rr99.6%
if 1e270 < (/.f64 A (*.f64 V l)) Initial program 49.3%
associate-/r*64.5%
div-inv64.5%
Applied egg-rr64.5%
*-commutative64.5%
clear-num64.5%
un-div-inv64.5%
Applied egg-rr64.5%
Final simplification82.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 (/ A (* l V))))
(if (<= t_0 5e-311)
(* c0 (sqrt (/ (/ A V) l)))
(if (<= t_0 5e+293)
(* c0 (pow (/ (* l V) A) -0.5))
(/ c0 (sqrt (/ l (/ A V))))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = A / (l * V);
double tmp;
if (t_0 <= 5e-311) {
tmp = c0 * sqrt(((A / V) / l));
} else if (t_0 <= 5e+293) {
tmp = c0 * pow(((l * V) / A), -0.5);
} else {
tmp = c0 / sqrt((l / (A / 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) :: t_0
real(8) :: tmp
t_0 = a / (l * v)
if (t_0 <= 5d-311) then
tmp = c0 * sqrt(((a / v) / l))
else if (t_0 <= 5d+293) then
tmp = c0 * (((l * v) / a) ** (-0.5d0))
else
tmp = c0 / sqrt((l / (a / 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 t_0 = A / (l * V);
double tmp;
if (t_0 <= 5e-311) {
tmp = c0 * Math.sqrt(((A / V) / l));
} else if (t_0 <= 5e+293) {
tmp = c0 * Math.pow(((l * V) / A), -0.5);
} else {
tmp = c0 / Math.sqrt((l / (A / V)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = A / (l * V) tmp = 0 if t_0 <= 5e-311: tmp = c0 * math.sqrt(((A / V) / l)) elif t_0 <= 5e+293: tmp = c0 * math.pow(((l * V) / A), -0.5) else: tmp = c0 / math.sqrt((l / (A / V))) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = Float64(A / Float64(l * V)) tmp = 0.0 if (t_0 <= 5e-311) tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); elseif (t_0 <= 5e+293) tmp = Float64(c0 * (Float64(Float64(l * V) / A) ^ -0.5)); else tmp = Float64(c0 / sqrt(Float64(l / Float64(A / V)))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = A / (l * V);
tmp = 0.0;
if (t_0 <= 5e-311)
tmp = c0 * sqrt(((A / V) / l));
elseif (t_0 <= 5e+293)
tmp = c0 * (((l * V) / A) ^ -0.5);
else
tmp = c0 / sqrt((l / (A / 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_] := Block[{t$95$0 = N[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 5e-311], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+293], N[(c0 * N[Power[N[(N[(l * V), $MachinePrecision] / A), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision], N[(c0 / N[Sqrt[N[(l / N[(A / V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \frac{A}{\ell \cdot V}\\
\mathbf{if}\;t_0 \leq 5 \cdot 10^{-311}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;t_0 \leq 5 \cdot 10^{+293}:\\
\;\;\;\;c0 \cdot {\left(\frac{\ell \cdot V}{A}\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{\ell}{\frac{A}{V}}}}\\
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 5.00000000000023e-311Initial program 38.4%
*-commutative38.4%
associate-/l/57.1%
Simplified57.1%
if 5.00000000000023e-311 < (/.f64 A (*.f64 V l)) < 5.00000000000000033e293Initial program 99.5%
associate-/r*88.1%
div-inv88.1%
Applied egg-rr88.1%
*-commutative88.1%
clear-num87.9%
un-div-inv89.5%
Applied egg-rr89.5%
div-inv87.9%
clear-num88.1%
frac-times99.5%
*-un-lft-identity99.5%
*-commutative99.5%
clear-num99.5%
associate-*r/87.1%
sqrt-div87.0%
metadata-eval87.0%
pow1/287.0%
pow-flip87.2%
associate-*r/99.6%
*-commutative99.6%
metadata-eval99.6%
Applied egg-rr99.6%
if 5.00000000000000033e293 < (/.f64 A (*.f64 V l)) Initial program 46.1%
associate-/r*62.2%
div-inv62.3%
Applied egg-rr62.3%
Applied egg-rr62.3%
Final simplification82.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 (/ A (* l V))))
(if (<= t_0 0.0)
(* c0 (sqrt (/ (/ A V) l)))
(if (<= t_0 5e+302) (* c0 (sqrt 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 = A / (l * V);
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * sqrt(((A / V) / l));
} else if (t_0 <= 5e+302) {
tmp = c0 * sqrt(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 = a / (l * v)
if (t_0 <= 0.0d0) then
tmp = c0 * sqrt(((a / v) / l))
else if (t_0 <= 5d+302) then
tmp = c0 * sqrt(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 = A / (l * V);
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * Math.sqrt(((A / V) / l));
} else if (t_0 <= 5e+302) {
tmp = c0 * Math.sqrt(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 = A / (l * V) tmp = 0 if t_0 <= 0.0: tmp = c0 * math.sqrt(((A / V) / l)) elif t_0 <= 5e+302: tmp = c0 * math.sqrt(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(A / Float64(l * V)) tmp = 0.0 if (t_0 <= 0.0) tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); elseif (t_0 <= 5e+302) tmp = Float64(c0 * sqrt(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 = A / (l * V);
tmp = 0.0;
if (t_0 <= 0.0)
tmp = c0 * sqrt(((A / V) / l));
elseif (t_0 <= 5e+302)
tmp = c0 * sqrt(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[(A / N[(l * V), $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, 5e+302], N[(c0 * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision], N[(c0 / N[Sqrt[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \frac{A}{\ell \cdot V}\\
\mathbf{if}\;t_0 \leq 0:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;t_0 \leq 5 \cdot 10^{+302}:\\
\;\;\;\;c0 \cdot \sqrt{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 0.0Initial program 36.9%
*-commutative36.9%
associate-/l/56.7%
Simplified56.7%
if 0.0 < (/.f64 A (*.f64 V l)) < 5e302Initial program 98.9%
if 5e302 < (/.f64 A (*.f64 V l)) Initial program 39.9%
associate-/r*62.3%
div-inv62.4%
Applied egg-rr62.4%
Applied egg-rr62.4%
associate-/r/62.4%
*-commutative62.4%
Simplified62.4%
Final simplification83.4%
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 75.2%
Final simplification75.2%
herbie shell --seed 2024020
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))