
(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 14 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 -2e-311) (* (- c0) (/ (* (sqrt (- A)) -1.0) (* (sqrt (- V)) (sqrt l)))) (* c0 (/ (pow (* l V) -0.5) (pow A -0.5)))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if (A <= -2e-311) {
tmp = -c0 * ((sqrt(-A) * -1.0) / (sqrt(-V) * sqrt(l)));
} else {
tmp = c0 * (pow((l * V), -0.5) / pow(A, -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 (a <= (-2d-311)) then
tmp = -c0 * ((sqrt(-a) * (-1.0d0)) / (sqrt(-v) * sqrt(l)))
else
tmp = c0 * (((l * v) ** (-0.5d0)) / (a ** (-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 (A <= -2e-311) {
tmp = -c0 * ((Math.sqrt(-A) * -1.0) / (Math.sqrt(-V) * Math.sqrt(l)));
} else {
tmp = c0 * (Math.pow((l * V), -0.5) / Math.pow(A, -0.5));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if A <= -2e-311: tmp = -c0 * ((math.sqrt(-A) * -1.0) / (math.sqrt(-V) * math.sqrt(l))) else: tmp = c0 * (math.pow((l * V), -0.5) / math.pow(A, -0.5)) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (A <= -2e-311) tmp = Float64(Float64(-c0) * Float64(Float64(sqrt(Float64(-A)) * -1.0) / Float64(sqrt(Float64(-V)) * sqrt(l)))); else tmp = Float64(c0 * Float64((Float64(l * V) ^ -0.5) / (A ^ -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 (A <= -2e-311)
tmp = -c0 * ((sqrt(-A) * -1.0) / (sqrt(-V) * sqrt(l)));
else
tmp = c0 * (((l * V) ^ -0.5) / (A ^ -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[A, -2e-311], N[((-c0) * N[(N[(N[Sqrt[(-A)], $MachinePrecision] * -1.0), $MachinePrecision] / N[(N[Sqrt[(-V)], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[(N[Power[N[(l * V), $MachinePrecision], -0.5], $MachinePrecision] / N[Power[A, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2 \cdot 10^{-311}:\\
\;\;\;\;\left(-c0\right) \cdot \frac{\sqrt{-A} \cdot -1}{\sqrt{-V} \cdot \sqrt{\ell}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{{\left(\ell \cdot V\right)}^{-0.5}}{{A}^{-0.5}}\\
\end{array}
\end{array}
if A < -1.9999999999999e-311Initial program 72.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6472.7
Applied rewrites72.7%
lift-sqrt.f64N/A
lift-/.f64N/A
sqrt-divN/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
div-invN/A
lift-sqrt.f64N/A
lift-/.f64N/A
frac-2negN/A
sqrt-divN/A
frac-2negN/A
metadata-evalN/A
frac-timesN/A
lower-/.f64N/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-neg.f64N/A
lower-neg.f6457.9
Applied rewrites57.9%
if -1.9999999999999e-311 < A Initial program 74.1%
lift-sqrt.f64N/A
lift-/.f64N/A
clear-numN/A
div-invN/A
associate-/r*N/A
sqrt-divN/A
pow1/2N/A
lower-/.f64N/A
inv-powN/A
pow-powN/A
lower-pow.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
metadata-evalN/A
pow1/2N/A
inv-powN/A
pow-powN/A
lower-pow.f64N/A
metadata-eval85.4
Applied rewrites85.4%
Final simplification70.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 (* V l))))))
(if (or (<= t_0 4e-252) (not (<= t_0 1e+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 / (V * l)));
double tmp;
if ((t_0 <= 4e-252) || !(t_0 <= 1e+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 / (v * l)))
if ((t_0 <= 4d-252) .or. (.not. (t_0 <= 1d+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 / (V * l)));
double tmp;
if ((t_0 <= 4e-252) || !(t_0 <= 1e+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 / (V * l))) tmp = 0 if (t_0 <= 4e-252) or not (t_0 <= 1e+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(V * l)))) tmp = 0.0 if ((t_0 <= 4e-252) || !(t_0 <= 1e+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 / (V * l)));
tmp = 0.0;
if ((t_0 <= 4e-252) || ~((t_0 <= 1e+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[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, 4e-252], N[Not[LessEqual[t$95$0, 1e+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}{V \cdot \ell}}\\
\mathbf{if}\;t\_0 \leq 4 \cdot 10^{-252} \lor \neg \left(t\_0 \leq 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)))) < 3.99999999999999977e-252 or 1e288 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 64.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6470.4
Applied rewrites70.4%
if 3.99999999999999977e-252 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1e288Initial program 98.4%
Final simplification77.7%
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 4e-252)
(* c0 (sqrt (/ (/ A V) l)))
(if (<= t_0 4e+291) t_0 (/ 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 = c0 * sqrt((A / (V * l)));
double tmp;
if (t_0 <= 4e-252) {
tmp = c0 * sqrt(((A / V) / l));
} else if (t_0 <= 4e+291) {
tmp = t_0;
} 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 = c0 * sqrt((a / (v * l)))
if (t_0 <= 4d-252) then
tmp = c0 * sqrt(((a / v) / l))
else if (t_0 <= 4d+291) then
tmp = t_0
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 = c0 * Math.sqrt((A / (V * l)));
double tmp;
if (t_0 <= 4e-252) {
tmp = c0 * Math.sqrt(((A / V) / l));
} else if (t_0 <= 4e+291) {
tmp = t_0;
} 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 = c0 * math.sqrt((A / (V * l))) tmp = 0 if t_0 <= 4e-252: tmp = c0 * math.sqrt(((A / V) / l)) elif t_0 <= 4e+291: tmp = t_0 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(c0 * sqrt(Float64(A / Float64(V * l)))) tmp = 0.0 if (t_0 <= 4e-252) tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); elseif (t_0 <= 4e+291) tmp = t_0; else tmp = Float64(c0 / sqrt(Float64(Float64(l / 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 = c0 * sqrt((A / (V * l)));
tmp = 0.0;
if (t_0 <= 4e-252)
tmp = c0 * sqrt(((A / V) / l));
elseif (t_0 <= 4e+291)
tmp = t_0;
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[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 4e-252], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 4e+291], t$95$0, N[(c0 / N[Sqrt[N[(N[(l / A), $MachinePrecision] * V), $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 4 \cdot 10^{-252}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+291}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{\ell}{A} \cdot V}}\\
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 3.99999999999999977e-252Initial program 65.8%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6471.2
Applied rewrites71.2%
if 3.99999999999999977e-252 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 3.9999999999999998e291Initial program 98.4%
if 3.9999999999999998e291 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 55.3%
lift-*.f64N/A
lift-sqrt.f64N/A
lift-/.f64N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f6455.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6455.3
Applied rewrites55.3%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6465.0
Applied rewrites65.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 (* c0 (sqrt (/ A (* V l))))))
(if (<= t_0 4e-252)
(* c0 (sqrt (/ (/ A V) l)))
(if (<= t_0 4e+291) t_0 (* c0 (sqrt (/ (/ A l) V)))))))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 <= 4e-252) {
tmp = c0 * sqrt(((A / V) / l));
} else if (t_0 <= 4e+291) {
tmp = t_0;
} else {
tmp = c0 * sqrt(((A / 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) :: t_0
real(8) :: tmp
t_0 = c0 * sqrt((a / (v * l)))
if (t_0 <= 4d-252) then
tmp = c0 * sqrt(((a / v) / l))
else if (t_0 <= 4d+291) then
tmp = t_0
else
tmp = c0 * sqrt(((a / 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 t_0 = c0 * Math.sqrt((A / (V * l)));
double tmp;
if (t_0 <= 4e-252) {
tmp = c0 * Math.sqrt(((A / V) / l));
} else if (t_0 <= 4e+291) {
tmp = t_0;
} else {
tmp = c0 * Math.sqrt(((A / l) / V));
}
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 <= 4e-252: tmp = c0 * math.sqrt(((A / V) / l)) elif t_0 <= 4e+291: tmp = t_0 else: tmp = c0 * math.sqrt(((A / l) / V)) 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 <= 4e-252) tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); elseif (t_0 <= 4e+291) tmp = t_0; else tmp = Float64(c0 * sqrt(Float64(Float64(A / l) / 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 = c0 * sqrt((A / (V * l)));
tmp = 0.0;
if (t_0 <= 4e-252)
tmp = c0 * sqrt(((A / V) / l));
elseif (t_0 <= 4e+291)
tmp = t_0;
else
tmp = c0 * sqrt(((A / 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_] := Block[{t$95$0 = N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 4e-252], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 4e+291], t$95$0, N[(c0 * N[Sqrt[N[(N[(A / l), $MachinePrecision] / V), $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 4 \cdot 10^{-252}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+291}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 3.99999999999999977e-252Initial program 65.8%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6471.2
Applied rewrites71.2%
if 3.99999999999999977e-252 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 3.9999999999999998e291Initial program 98.4%
if 3.9999999999999998e291 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 55.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/l/N/A
lower-/.f64N/A
lower-/.f6464.9
Applied rewrites64.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 (<= (* V l) (- INFINITY))
(/ c0 (* (sqrt (/ V A)) (sqrt l)))
(if (<= (* V l) -5e-314)
(* c0 (/ (sqrt (- A)) (sqrt (* (- V) l))))
(if (or (<= (* V l) 2e-316) (not (<= (* V l) 1e+262)))
(/ c0 (sqrt (* (/ l A) V)))
(* (* (/ (- -1.0) (sqrt (* V l))) c0) (sqrt A))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -((double) INFINITY)) {
tmp = c0 / (sqrt((V / A)) * sqrt(l));
} else if ((V * l) <= -5e-314) {
tmp = c0 * (sqrt(-A) / sqrt((-V * l)));
} else if (((V * l) <= 2e-316) || !((V * l) <= 1e+262)) {
tmp = c0 / sqrt(((l / A) * V));
} else {
tmp = ((-(-1.0) / sqrt((V * l))) * c0) * sqrt(A);
}
return tmp;
}
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -Double.POSITIVE_INFINITY) {
tmp = c0 / (Math.sqrt((V / A)) * Math.sqrt(l));
} else if ((V * l) <= -5e-314) {
tmp = c0 * (Math.sqrt(-A) / Math.sqrt((-V * l)));
} else if (((V * l) <= 2e-316) || !((V * l) <= 1e+262)) {
tmp = c0 / Math.sqrt(((l / A) * V));
} else {
tmp = ((-(-1.0) / Math.sqrt((V * l))) * c0) * Math.sqrt(A);
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if (V * l) <= -math.inf: tmp = c0 / (math.sqrt((V / A)) * math.sqrt(l)) elif (V * l) <= -5e-314: tmp = c0 * (math.sqrt(-A) / math.sqrt((-V * l))) elif ((V * l) <= 2e-316) or not ((V * l) <= 1e+262): tmp = c0 / math.sqrt(((l / A) * V)) else: tmp = ((-(-1.0) / math.sqrt((V * l))) * c0) * 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(V * l) <= Float64(-Inf)) tmp = Float64(c0 / Float64(sqrt(Float64(V / A)) * sqrt(l))); elseif (Float64(V * l) <= -5e-314) tmp = Float64(c0 * Float64(sqrt(Float64(-A)) / sqrt(Float64(Float64(-V) * l)))); elseif ((Float64(V * l) <= 2e-316) || !(Float64(V * l) <= 1e+262)) tmp = Float64(c0 / sqrt(Float64(Float64(l / A) * V))); else tmp = Float64(Float64(Float64(Float64(-(-1.0)) / sqrt(Float64(V * l))) * c0) * 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 ((V * l) <= -Inf)
tmp = c0 / (sqrt((V / A)) * sqrt(l));
elseif ((V * l) <= -5e-314)
tmp = c0 * (sqrt(-A) / sqrt((-V * l)));
elseif (((V * l) <= 2e-316) || ~(((V * l) <= 1e+262)))
tmp = c0 / sqrt(((l / A) * V));
else
tmp = ((-(-1.0) / sqrt((V * l))) * c0) * 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[(V * l), $MachinePrecision], (-Infinity)], N[(c0 / N[(N[Sqrt[N[(V / A), $MachinePrecision]], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -5e-314], N[(c0 * N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[N[((-V) * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(V * l), $MachinePrecision], 2e-316], N[Not[LessEqual[N[(V * l), $MachinePrecision], 1e+262]], $MachinePrecision]], N[(c0 / N[Sqrt[N[(N[(l / A), $MachinePrecision] * V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[((--1.0) / N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * c0), $MachinePrecision] * N[Sqrt[A], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -\infty:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{V}{A}} \cdot \sqrt{\ell}}\\
\mathbf{elif}\;V \cdot \ell \leq -5 \cdot 10^{-314}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{\left(-V\right) \cdot \ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 2 \cdot 10^{-316} \lor \neg \left(V \cdot \ell \leq 10^{+262}\right):\\
\;\;\;\;\frac{c0}{\sqrt{\frac{\ell}{A} \cdot V}}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{--1}{\sqrt{V \cdot \ell}} \cdot c0\right) \cdot \sqrt{A}\\
\end{array}
\end{array}
if (*.f64 V l) < -inf.0Initial program 37.7%
lift-*.f64N/A
lift-sqrt.f64N/A
lift-/.f64N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f6437.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6437.7
Applied rewrites37.7%
lift-sqrt.f64N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
sqrt-prodN/A
lift-sqrt.f64N/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f6458.5
Applied rewrites58.5%
if -inf.0 < (*.f64 V l) < -4.99999999982e-314Initial program 85.1%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6474.8
Applied rewrites74.8%
lift-sqrt.f64N/A
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
lift-*.f64N/A
frac-2negN/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-neg.f64N/A
lower-sqrt.f64N/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f6499.2
Applied rewrites99.2%
if -4.99999999982e-314 < (*.f64 V l) < 2.000000017e-316 or 1e262 < (*.f64 V l) Initial program 44.9%
lift-*.f64N/A
lift-sqrt.f64N/A
lift-/.f64N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f6444.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f6444.9
Applied rewrites44.9%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6470.3
Applied rewrites70.3%
if 2.000000017e-316 < (*.f64 V l) < 1e262Initial program 83.5%
lift-*.f64N/A
*-commutativeN/A
lift-sqrt.f64N/A
lift-/.f64N/A
sqrt-divN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f6495.1
Applied rewrites95.1%
lift-/.f64N/A
clear-numN/A
frac-2negN/A
associate-/r/N/A
lower-*.f64N/A
neg-mul-1N/A
associate-/r*N/A
metadata-evalN/A
lower-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-neg.f6495.1
Applied rewrites95.1%
Final simplification89.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)) (sqrt (- V))))))
(if (<= (* V l) (- INFINITY))
t_0
(if (<= (* V l) -5e-277)
(* c0 (/ (sqrt (- A)) (sqrt (* (- V) l))))
(if (<= (* V l) 0.0)
t_0
(if (<= (* V l) 1e+262)
(* (* (/ (- -1.0) (sqrt (* V l))) c0) (sqrt A))
(/ 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 = c0 * (sqrt((-A / l)) / sqrt(-V));
double tmp;
if ((V * l) <= -((double) INFINITY)) {
tmp = t_0;
} else if ((V * l) <= -5e-277) {
tmp = c0 * (sqrt(-A) / sqrt((-V * l)));
} else if ((V * l) <= 0.0) {
tmp = t_0;
} else if ((V * l) <= 1e+262) {
tmp = ((-(-1.0) / sqrt((V * l))) * c0) * sqrt(A);
} else {
tmp = c0 / sqrt(((l / A) * V));
}
return tmp;
}
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)) / Math.sqrt(-V));
double tmp;
if ((V * l) <= -Double.POSITIVE_INFINITY) {
tmp = t_0;
} else if ((V * l) <= -5e-277) {
tmp = c0 * (Math.sqrt(-A) / Math.sqrt((-V * l)));
} else if ((V * l) <= 0.0) {
tmp = t_0;
} else if ((V * l) <= 1e+262) {
tmp = ((-(-1.0) / Math.sqrt((V * l))) * c0) * Math.sqrt(A);
} 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 = c0 * (math.sqrt((-A / l)) / math.sqrt(-V)) tmp = 0 if (V * l) <= -math.inf: tmp = t_0 elif (V * l) <= -5e-277: tmp = c0 * (math.sqrt(-A) / math.sqrt((-V * l))) elif (V * l) <= 0.0: tmp = t_0 elif (V * l) <= 1e+262: tmp = ((-(-1.0) / math.sqrt((V * l))) * c0) * math.sqrt(A) 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(c0 * Float64(sqrt(Float64(Float64(-A) / l)) / sqrt(Float64(-V)))) tmp = 0.0 if (Float64(V * l) <= Float64(-Inf)) tmp = t_0; elseif (Float64(V * l) <= -5e-277) tmp = Float64(c0 * Float64(sqrt(Float64(-A)) / sqrt(Float64(Float64(-V) * l)))); elseif (Float64(V * l) <= 0.0) tmp = t_0; elseif (Float64(V * l) <= 1e+262) tmp = Float64(Float64(Float64(Float64(-(-1.0)) / sqrt(Float64(V * l))) * c0) * sqrt(A)); else tmp = Float64(c0 / sqrt(Float64(Float64(l / 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 = c0 * (sqrt((-A / l)) / sqrt(-V));
tmp = 0.0;
if ((V * l) <= -Inf)
tmp = t_0;
elseif ((V * l) <= -5e-277)
tmp = c0 * (sqrt(-A) / sqrt((-V * l)));
elseif ((V * l) <= 0.0)
tmp = t_0;
elseif ((V * l) <= 1e+262)
tmp = ((-(-1.0) / sqrt((V * l))) * c0) * sqrt(A);
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[(c0 * N[(N[Sqrt[N[((-A) / l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[(-V)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(V * l), $MachinePrecision], (-Infinity)], t$95$0, If[LessEqual[N[(V * l), $MachinePrecision], -5e-277], N[(c0 * N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[N[((-V) * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 0.0], t$95$0, If[LessEqual[N[(V * l), $MachinePrecision], 1e+262], N[(N[(N[((--1.0) / N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * c0), $MachinePrecision] * N[Sqrt[A], $MachinePrecision]), $MachinePrecision], N[(c0 / N[Sqrt[N[(N[(l / A), $MachinePrecision] * V), $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}{\ell}}}{\sqrt{-V}}\\
\mathbf{if}\;V \cdot \ell \leq -\infty:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;V \cdot \ell \leq -5 \cdot 10^{-277}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{\left(-V\right) \cdot \ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 0:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;V \cdot \ell \leq 10^{+262}:\\
\;\;\;\;\left(\frac{--1}{\sqrt{V \cdot \ell}} \cdot c0\right) \cdot \sqrt{A}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{\ell}{A} \cdot V}}\\
\end{array}
\end{array}
if (*.f64 V l) < -inf.0 or -5e-277 < (*.f64 V l) < -0.0Initial program 42.9%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6466.2
Applied rewrites66.2%
lift-sqrt.f64N/A
lift-/.f64N/A
lift-/.f64N/A
associate-/r*N/A
associate-/l/N/A
lift-/.f64N/A
frac-2negN/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lift-/.f64N/A
distribute-neg-fracN/A
lower-/.f64N/A
lower-neg.f64N/A
lower-sqrt.f64N/A
lower-neg.f6451.9
Applied rewrites51.9%
if -inf.0 < (*.f64 V l) < -5e-277Initial program 85.7%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6475.0
Applied rewrites75.0%
lift-sqrt.f64N/A
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
lift-*.f64N/A
frac-2negN/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-neg.f64N/A
lower-sqrt.f64N/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f6499.4
Applied rewrites99.4%
if -0.0 < (*.f64 V l) < 1e262Initial program 82.9%
lift-*.f64N/A
*-commutativeN/A
lift-sqrt.f64N/A
lift-/.f64N/A
sqrt-divN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f6494.3
Applied rewrites94.3%
lift-/.f64N/A
clear-numN/A
frac-2negN/A
associate-/r/N/A
lower-*.f64N/A
neg-mul-1N/A
associate-/r*N/A
metadata-evalN/A
lower-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-neg.f6494.3
Applied rewrites94.3%
if 1e262 < (*.f64 V l) Initial program 46.1%
lift-*.f64N/A
lift-sqrt.f64N/A
lift-/.f64N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f6446.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6446.1
Applied rewrites46.1%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6475.8
Applied rewrites75.8%
Final simplification86.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 (<= (* V l) (- INFINITY))
(/ c0 (* (sqrt (/ V A)) (sqrt l)))
(if (<= (* V l) -5e-314)
(* c0 (/ (sqrt (- A)) (sqrt (* (- V) l))))
(if (or (<= (* V l) 2e-316) (not (<= (* V l) 1e+262)))
(/ c0 (sqrt (* (/ l A) V)))
(* (/ 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 ((V * l) <= -((double) INFINITY)) {
tmp = c0 / (sqrt((V / A)) * sqrt(l));
} else if ((V * l) <= -5e-314) {
tmp = c0 * (sqrt(-A) / sqrt((-V * l)));
} else if (((V * l) <= 2e-316) || !((V * l) <= 1e+262)) {
tmp = c0 / sqrt(((l / A) * V));
} else {
tmp = (c0 / sqrt((l * V))) * sqrt(A);
}
return tmp;
}
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -Double.POSITIVE_INFINITY) {
tmp = c0 / (Math.sqrt((V / A)) * Math.sqrt(l));
} else if ((V * l) <= -5e-314) {
tmp = c0 * (Math.sqrt(-A) / Math.sqrt((-V * l)));
} else if (((V * l) <= 2e-316) || !((V * l) <= 1e+262)) {
tmp = c0 / Math.sqrt(((l / A) * V));
} 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 (V * l) <= -math.inf: tmp = c0 / (math.sqrt((V / A)) * math.sqrt(l)) elif (V * l) <= -5e-314: tmp = c0 * (math.sqrt(-A) / math.sqrt((-V * l))) elif ((V * l) <= 2e-316) or not ((V * l) <= 1e+262): tmp = c0 / math.sqrt(((l / A) * V)) 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(V * l) <= Float64(-Inf)) tmp = Float64(c0 / Float64(sqrt(Float64(V / A)) * sqrt(l))); elseif (Float64(V * l) <= -5e-314) tmp = Float64(c0 * Float64(sqrt(Float64(-A)) / sqrt(Float64(Float64(-V) * l)))); elseif ((Float64(V * l) <= 2e-316) || !(Float64(V * l) <= 1e+262)) tmp = Float64(c0 / sqrt(Float64(Float64(l / A) * V))); else tmp = Float64(Float64(c0 / 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 ((V * l) <= -Inf)
tmp = c0 / (sqrt((V / A)) * sqrt(l));
elseif ((V * l) <= -5e-314)
tmp = c0 * (sqrt(-A) / sqrt((-V * l)));
elseif (((V * l) <= 2e-316) || ~(((V * l) <= 1e+262)))
tmp = c0 / sqrt(((l / A) * V));
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[(V * l), $MachinePrecision], (-Infinity)], N[(c0 / N[(N[Sqrt[N[(V / A), $MachinePrecision]], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -5e-314], N[(c0 * N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[N[((-V) * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(V * l), $MachinePrecision], 2e-316], N[Not[LessEqual[N[(V * l), $MachinePrecision], 1e+262]], $MachinePrecision]], N[(c0 / N[Sqrt[N[(N[(l / A), $MachinePrecision] * V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(c0 / N[Sqrt[N[(l * V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sqrt[A], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -\infty:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{V}{A}} \cdot \sqrt{\ell}}\\
\mathbf{elif}\;V \cdot \ell \leq -5 \cdot 10^{-314}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{\left(-V\right) \cdot \ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 2 \cdot 10^{-316} \lor \neg \left(V \cdot \ell \leq 10^{+262}\right):\\
\;\;\;\;\frac{c0}{\sqrt{\frac{\ell}{A} \cdot V}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{\ell \cdot V}} \cdot \sqrt{A}\\
\end{array}
\end{array}
if (*.f64 V l) < -inf.0Initial program 37.7%
lift-*.f64N/A
lift-sqrt.f64N/A
lift-/.f64N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f6437.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6437.7
Applied rewrites37.7%
lift-sqrt.f64N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
sqrt-prodN/A
lift-sqrt.f64N/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f6458.5
Applied rewrites58.5%
if -inf.0 < (*.f64 V l) < -4.99999999982e-314Initial program 85.1%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6474.8
Applied rewrites74.8%
lift-sqrt.f64N/A
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
lift-*.f64N/A
frac-2negN/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-neg.f64N/A
lower-sqrt.f64N/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f6499.2
Applied rewrites99.2%
if -4.99999999982e-314 < (*.f64 V l) < 2.000000017e-316 or 1e262 < (*.f64 V l) Initial program 44.9%
lift-*.f64N/A
lift-sqrt.f64N/A
lift-/.f64N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f6444.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f6444.9
Applied rewrites44.9%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6470.3
Applied rewrites70.3%
if 2.000000017e-316 < (*.f64 V l) < 1e262Initial program 83.5%
lift-*.f64N/A
*-commutativeN/A
lift-sqrt.f64N/A
lift-/.f64N/A
sqrt-divN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f6495.1
Applied rewrites95.1%
Final simplification89.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 (<= (* V l) (- INFINITY))
(* c0 (/ (sqrt (/ A V)) (sqrt l)))
(if (<= (* V l) -5e-314)
(* c0 (/ (sqrt (- A)) (sqrt (* (- V) l))))
(if (or (<= (* V l) 2e-316) (not (<= (* V l) 1e+262)))
(/ c0 (sqrt (* (/ l A) V)))
(* (/ 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 ((V * l) <= -((double) INFINITY)) {
tmp = c0 * (sqrt((A / V)) / sqrt(l));
} else if ((V * l) <= -5e-314) {
tmp = c0 * (sqrt(-A) / sqrt((-V * l)));
} else if (((V * l) <= 2e-316) || !((V * l) <= 1e+262)) {
tmp = c0 / sqrt(((l / A) * V));
} else {
tmp = (c0 / sqrt((l * V))) * sqrt(A);
}
return tmp;
}
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -Double.POSITIVE_INFINITY) {
tmp = c0 * (Math.sqrt((A / V)) / Math.sqrt(l));
} else if ((V * l) <= -5e-314) {
tmp = c0 * (Math.sqrt(-A) / Math.sqrt((-V * l)));
} else if (((V * l) <= 2e-316) || !((V * l) <= 1e+262)) {
tmp = c0 / Math.sqrt(((l / A) * V));
} 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 (V * l) <= -math.inf: tmp = c0 * (math.sqrt((A / V)) / math.sqrt(l)) elif (V * l) <= -5e-314: tmp = c0 * (math.sqrt(-A) / math.sqrt((-V * l))) elif ((V * l) <= 2e-316) or not ((V * l) <= 1e+262): tmp = c0 / math.sqrt(((l / A) * V)) 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(V * l) <= Float64(-Inf)) tmp = Float64(c0 * Float64(sqrt(Float64(A / V)) / sqrt(l))); elseif (Float64(V * l) <= -5e-314) tmp = Float64(c0 * Float64(sqrt(Float64(-A)) / sqrt(Float64(Float64(-V) * l)))); elseif ((Float64(V * l) <= 2e-316) || !(Float64(V * l) <= 1e+262)) tmp = Float64(c0 / sqrt(Float64(Float64(l / A) * V))); else tmp = Float64(Float64(c0 / 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 ((V * l) <= -Inf)
tmp = c0 * (sqrt((A / V)) / sqrt(l));
elseif ((V * l) <= -5e-314)
tmp = c0 * (sqrt(-A) / sqrt((-V * l)));
elseif (((V * l) <= 2e-316) || ~(((V * l) <= 1e+262)))
tmp = c0 / sqrt(((l / A) * V));
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[(V * l), $MachinePrecision], (-Infinity)], N[(c0 * N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -5e-314], N[(c0 * N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[N[((-V) * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(V * l), $MachinePrecision], 2e-316], N[Not[LessEqual[N[(V * l), $MachinePrecision], 1e+262]], $MachinePrecision]], N[(c0 / N[Sqrt[N[(N[(l / A), $MachinePrecision] * V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(c0 / N[Sqrt[N[(l * V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sqrt[A], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -\infty:\\
\;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\
\mathbf{elif}\;V \cdot \ell \leq -5 \cdot 10^{-314}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{\left(-V\right) \cdot \ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 2 \cdot 10^{-316} \lor \neg \left(V \cdot \ell \leq 10^{+262}\right):\\
\;\;\;\;\frac{c0}{\sqrt{\frac{\ell}{A} \cdot V}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{\ell \cdot V}} \cdot \sqrt{A}\\
\end{array}
\end{array}
if (*.f64 V l) < -inf.0Initial program 37.7%
lift-sqrt.f64N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-sqrt.f6458.4
Applied rewrites58.4%
if -inf.0 < (*.f64 V l) < -4.99999999982e-314Initial program 85.1%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6474.8
Applied rewrites74.8%
lift-sqrt.f64N/A
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
lift-*.f64N/A
frac-2negN/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-neg.f64N/A
lower-sqrt.f64N/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f6499.2
Applied rewrites99.2%
if -4.99999999982e-314 < (*.f64 V l) < 2.000000017e-316 or 1e262 < (*.f64 V l) Initial program 44.9%
lift-*.f64N/A
lift-sqrt.f64N/A
lift-/.f64N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f6444.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f6444.9
Applied rewrites44.9%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6470.3
Applied rewrites70.3%
if 2.000000017e-316 < (*.f64 V l) < 1e262Initial program 83.5%
lift-*.f64N/A
*-commutativeN/A
lift-sqrt.f64N/A
lift-/.f64N/A
sqrt-divN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f6495.1
Applied rewrites95.1%
Final simplification89.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 (<= (* V l) (- INFINITY))
(/ c0 (sqrt (/ V (/ A l))))
(if (<= (* V l) -5e-314)
(* c0 (/ (sqrt (- A)) (sqrt (* (- V) l))))
(if (or (<= (* V l) 2e-316) (not (<= (* V l) 1e+262)))
(/ c0 (sqrt (* (/ l A) V)))
(* (/ 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 ((V * l) <= -((double) INFINITY)) {
tmp = c0 / sqrt((V / (A / l)));
} else if ((V * l) <= -5e-314) {
tmp = c0 * (sqrt(-A) / sqrt((-V * l)));
} else if (((V * l) <= 2e-316) || !((V * l) <= 1e+262)) {
tmp = c0 / sqrt(((l / A) * V));
} else {
tmp = (c0 / sqrt((l * V))) * sqrt(A);
}
return tmp;
}
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -Double.POSITIVE_INFINITY) {
tmp = c0 / Math.sqrt((V / (A / l)));
} else if ((V * l) <= -5e-314) {
tmp = c0 * (Math.sqrt(-A) / Math.sqrt((-V * l)));
} else if (((V * l) <= 2e-316) || !((V * l) <= 1e+262)) {
tmp = c0 / Math.sqrt(((l / A) * V));
} 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 (V * l) <= -math.inf: tmp = c0 / math.sqrt((V / (A / l))) elif (V * l) <= -5e-314: tmp = c0 * (math.sqrt(-A) / math.sqrt((-V * l))) elif ((V * l) <= 2e-316) or not ((V * l) <= 1e+262): tmp = c0 / math.sqrt(((l / A) * V)) 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(V * l) <= Float64(-Inf)) tmp = Float64(c0 / sqrt(Float64(V / Float64(A / l)))); elseif (Float64(V * l) <= -5e-314) tmp = Float64(c0 * Float64(sqrt(Float64(-A)) / sqrt(Float64(Float64(-V) * l)))); elseif ((Float64(V * l) <= 2e-316) || !(Float64(V * l) <= 1e+262)) tmp = Float64(c0 / sqrt(Float64(Float64(l / A) * V))); else tmp = Float64(Float64(c0 / 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 ((V * l) <= -Inf)
tmp = c0 / sqrt((V / (A / l)));
elseif ((V * l) <= -5e-314)
tmp = c0 * (sqrt(-A) / sqrt((-V * l)));
elseif (((V * l) <= 2e-316) || ~(((V * l) <= 1e+262)))
tmp = c0 / sqrt(((l / A) * V));
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[(V * l), $MachinePrecision], (-Infinity)], N[(c0 / N[Sqrt[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -5e-314], N[(c0 * N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[N[((-V) * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(V * l), $MachinePrecision], 2e-316], N[Not[LessEqual[N[(V * l), $MachinePrecision], 1e+262]], $MachinePrecision]], N[(c0 / N[Sqrt[N[(N[(l / A), $MachinePrecision] * V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(c0 / N[Sqrt[N[(l * V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sqrt[A], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -\infty:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}\\
\mathbf{elif}\;V \cdot \ell \leq -5 \cdot 10^{-314}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{\left(-V\right) \cdot \ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 2 \cdot 10^{-316} \lor \neg \left(V \cdot \ell \leq 10^{+262}\right):\\
\;\;\;\;\frac{c0}{\sqrt{\frac{\ell}{A} \cdot V}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{\ell \cdot V}} \cdot \sqrt{A}\\
\end{array}
\end{array}
if (*.f64 V l) < -inf.0Initial program 37.7%
lift-*.f64N/A
lift-sqrt.f64N/A
lift-/.f64N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f6437.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6437.7
Applied rewrites37.7%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
lift-/.f64N/A
un-div-invN/A
lower-/.f6471.6
Applied rewrites71.6%
lift-/.f64N/A
div-invN/A
lift-/.f64N/A
clear-numN/A
*-commutativeN/A
associate-/r/N/A
lower-/.f64N/A
lower-/.f6471.6
Applied rewrites71.6%
if -inf.0 < (*.f64 V l) < -4.99999999982e-314Initial program 85.1%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6474.8
Applied rewrites74.8%
lift-sqrt.f64N/A
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
lift-*.f64N/A
frac-2negN/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-neg.f64N/A
lower-sqrt.f64N/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f6499.2
Applied rewrites99.2%
if -4.99999999982e-314 < (*.f64 V l) < 2.000000017e-316 or 1e262 < (*.f64 V l) Initial program 44.9%
lift-*.f64N/A
lift-sqrt.f64N/A
lift-/.f64N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f6444.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f6444.9
Applied rewrites44.9%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6470.3
Applied rewrites70.3%
if 2.000000017e-316 < (*.f64 V l) < 1e262Initial program 83.5%
lift-*.f64N/A
*-commutativeN/A
lift-sqrt.f64N/A
lift-/.f64N/A
sqrt-divN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f6495.1
Applied rewrites95.1%
Final simplification90.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 (<= (* V l) -2e+75)
(* c0 (sqrt (/ (/ A V) l)))
(if (<= (* V l) -1e-114)
(/ c0 (sqrt (/ (* l V) A)))
(if (or (<= (* V l) 2e-316) (not (<= (* V l) 1e+262)))
(/ c0 (sqrt (* (/ l A) V)))
(* (/ 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 ((V * l) <= -2e+75) {
tmp = c0 * sqrt(((A / V) / l));
} else if ((V * l) <= -1e-114) {
tmp = c0 / sqrt(((l * V) / A));
} else if (((V * l) <= 2e-316) || !((V * l) <= 1e+262)) {
tmp = c0 / sqrt(((l / A) * V));
} 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 ((v * l) <= (-2d+75)) then
tmp = c0 * sqrt(((a / v) / l))
else if ((v * l) <= (-1d-114)) then
tmp = c0 / sqrt(((l * v) / a))
else if (((v * l) <= 2d-316) .or. (.not. ((v * l) <= 1d+262))) then
tmp = c0 / sqrt(((l / a) * v))
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 ((V * l) <= -2e+75) {
tmp = c0 * Math.sqrt(((A / V) / l));
} else if ((V * l) <= -1e-114) {
tmp = c0 / Math.sqrt(((l * V) / A));
} else if (((V * l) <= 2e-316) || !((V * l) <= 1e+262)) {
tmp = c0 / Math.sqrt(((l / A) * V));
} 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 (V * l) <= -2e+75: tmp = c0 * math.sqrt(((A / V) / l)) elif (V * l) <= -1e-114: tmp = c0 / math.sqrt(((l * V) / A)) elif ((V * l) <= 2e-316) or not ((V * l) <= 1e+262): tmp = c0 / math.sqrt(((l / A) * V)) 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(V * l) <= -2e+75) tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); elseif (Float64(V * l) <= -1e-114) tmp = Float64(c0 / sqrt(Float64(Float64(l * V) / A))); elseif ((Float64(V * l) <= 2e-316) || !(Float64(V * l) <= 1e+262)) tmp = Float64(c0 / sqrt(Float64(Float64(l / A) * V))); else tmp = Float64(Float64(c0 / 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 ((V * l) <= -2e+75)
tmp = c0 * sqrt(((A / V) / l));
elseif ((V * l) <= -1e-114)
tmp = c0 / sqrt(((l * V) / A));
elseif (((V * l) <= 2e-316) || ~(((V * l) <= 1e+262)))
tmp = c0 / sqrt(((l / A) * V));
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[(V * l), $MachinePrecision], -2e+75], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -1e-114], N[(c0 / N[Sqrt[N[(N[(l * V), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(V * l), $MachinePrecision], 2e-316], N[Not[LessEqual[N[(V * l), $MachinePrecision], 1e+262]], $MachinePrecision]], N[(c0 / N[Sqrt[N[(N[(l / A), $MachinePrecision] * V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(c0 / N[Sqrt[N[(l * V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sqrt[A], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -2 \cdot 10^{+75}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-114}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{\ell \cdot V}{A}}}\\
\mathbf{elif}\;V \cdot \ell \leq 2 \cdot 10^{-316} \lor \neg \left(V \cdot \ell \leq 10^{+262}\right):\\
\;\;\;\;\frac{c0}{\sqrt{\frac{\ell}{A} \cdot V}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{\ell \cdot V}} \cdot \sqrt{A}\\
\end{array}
\end{array}
if (*.f64 V l) < -1.99999999999999985e75Initial program 58.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6470.6
Applied rewrites70.6%
if -1.99999999999999985e75 < (*.f64 V l) < -1.0000000000000001e-114Initial program 95.1%
lift-*.f64N/A
lift-sqrt.f64N/A
lift-/.f64N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f6496.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6496.7
Applied rewrites96.7%
if -1.0000000000000001e-114 < (*.f64 V l) < 2.000000017e-316 or 1e262 < (*.f64 V l) Initial program 60.1%
lift-*.f64N/A
lift-sqrt.f64N/A
lift-/.f64N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f6460.2
lift-*.f64N/A
*-commutativeN/A
lower-*.f6460.2
Applied rewrites60.2%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6475.1
Applied rewrites75.1%
if 2.000000017e-316 < (*.f64 V l) < 1e262Initial program 83.5%
lift-*.f64N/A
*-commutativeN/A
lift-sqrt.f64N/A
lift-/.f64N/A
sqrt-divN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f6495.1
Applied rewrites95.1%
Final simplification84.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 (<= (* V l) -2e+75)
(* c0 (sqrt (/ (/ A V) l)))
(if (<= (* V l) -1e-114)
(/ c0 (sqrt (/ (* l V) A)))
(if (<= (* V l) 2e-316)
(/ c0 (sqrt (/ V (/ A l))))
(if (<= (* V l) 1e+262)
(* (/ c0 (sqrt (* l V))) (sqrt A))
(/ c0 (sqrt (* (/ l A) V))))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -2e+75) {
tmp = c0 * sqrt(((A / V) / l));
} else if ((V * l) <= -1e-114) {
tmp = c0 / sqrt(((l * V) / A));
} else if ((V * l) <= 2e-316) {
tmp = c0 / sqrt((V / (A / l)));
} else if ((V * l) <= 1e+262) {
tmp = (c0 / sqrt((l * V))) * sqrt(A);
} 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) :: tmp
if ((v * l) <= (-2d+75)) then
tmp = c0 * sqrt(((a / v) / l))
else if ((v * l) <= (-1d-114)) then
tmp = c0 / sqrt(((l * v) / a))
else if ((v * l) <= 2d-316) then
tmp = c0 / sqrt((v / (a / l)))
else if ((v * l) <= 1d+262) then
tmp = (c0 / sqrt((l * v))) * sqrt(a)
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 tmp;
if ((V * l) <= -2e+75) {
tmp = c0 * Math.sqrt(((A / V) / l));
} else if ((V * l) <= -1e-114) {
tmp = c0 / Math.sqrt(((l * V) / A));
} else if ((V * l) <= 2e-316) {
tmp = c0 / Math.sqrt((V / (A / l)));
} else if ((V * l) <= 1e+262) {
tmp = (c0 / Math.sqrt((l * V))) * Math.sqrt(A);
} 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): tmp = 0 if (V * l) <= -2e+75: tmp = c0 * math.sqrt(((A / V) / l)) elif (V * l) <= -1e-114: tmp = c0 / math.sqrt(((l * V) / A)) elif (V * l) <= 2e-316: tmp = c0 / math.sqrt((V / (A / l))) elif (V * l) <= 1e+262: tmp = (c0 / math.sqrt((l * V))) * math.sqrt(A) 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) tmp = 0.0 if (Float64(V * l) <= -2e+75) tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); elseif (Float64(V * l) <= -1e-114) tmp = Float64(c0 / sqrt(Float64(Float64(l * V) / A))); elseif (Float64(V * l) <= 2e-316) tmp = Float64(c0 / sqrt(Float64(V / Float64(A / l)))); elseif (Float64(V * l) <= 1e+262) tmp = Float64(Float64(c0 / sqrt(Float64(l * V))) * sqrt(A)); else tmp = Float64(c0 / sqrt(Float64(Float64(l / 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 ((V * l) <= -2e+75)
tmp = c0 * sqrt(((A / V) / l));
elseif ((V * l) <= -1e-114)
tmp = c0 / sqrt(((l * V) / A));
elseif ((V * l) <= 2e-316)
tmp = c0 / sqrt((V / (A / l)));
elseif ((V * l) <= 1e+262)
tmp = (c0 / sqrt((l * V))) * sqrt(A);
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_] := If[LessEqual[N[(V * l), $MachinePrecision], -2e+75], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -1e-114], N[(c0 / N[Sqrt[N[(N[(l * V), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 2e-316], N[(c0 / N[Sqrt[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 1e+262], N[(N[(c0 / N[Sqrt[N[(l * V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sqrt[A], $MachinePrecision]), $MachinePrecision], N[(c0 / N[Sqrt[N[(N[(l / A), $MachinePrecision] * V), $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 -2 \cdot 10^{+75}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-114}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{\ell \cdot V}{A}}}\\
\mathbf{elif}\;V \cdot \ell \leq 2 \cdot 10^{-316}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}\\
\mathbf{elif}\;V \cdot \ell \leq 10^{+262}:\\
\;\;\;\;\frac{c0}{\sqrt{\ell \cdot V}} \cdot \sqrt{A}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{\ell}{A} \cdot V}}\\
\end{array}
\end{array}
if (*.f64 V l) < -1.99999999999999985e75Initial program 58.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6470.6
Applied rewrites70.6%
if -1.99999999999999985e75 < (*.f64 V l) < -1.0000000000000001e-114Initial program 95.1%
lift-*.f64N/A
lift-sqrt.f64N/A
lift-/.f64N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f6496.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6496.7
Applied rewrites96.7%
if -1.0000000000000001e-114 < (*.f64 V l) < 2.000000017e-316Initial program 63.5%
lift-*.f64N/A
lift-sqrt.f64N/A
lift-/.f64N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f6463.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6463.6
Applied rewrites63.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
lift-/.f64N/A
un-div-invN/A
lower-/.f6476.5
Applied rewrites76.5%
lift-/.f64N/A
div-invN/A
lift-/.f64N/A
clear-numN/A
*-commutativeN/A
associate-/r/N/A
lower-/.f64N/A
lower-/.f6476.0
Applied rewrites76.0%
if 2.000000017e-316 < (*.f64 V l) < 1e262Initial program 83.5%
lift-*.f64N/A
*-commutativeN/A
lift-sqrt.f64N/A
lift-/.f64N/A
sqrt-divN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f6495.1
Applied rewrites95.1%
if 1e262 < (*.f64 V l) Initial program 46.1%
lift-*.f64N/A
lift-sqrt.f64N/A
lift-/.f64N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f6446.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6446.1
Applied rewrites46.1%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6475.8
Applied rewrites75.8%
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 -2e-311) (* (- c0) (/ (* (sqrt (- A)) -1.0) (* (sqrt (- V)) (sqrt l)))) (* (* (/ (- -1.0) (sqrt (* V l))) c0) (sqrt A))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if (A <= -2e-311) {
tmp = -c0 * ((sqrt(-A) * -1.0) / (sqrt(-V) * sqrt(l)));
} else {
tmp = ((-(-1.0) / sqrt((V * l))) * c0) * 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 (a <= (-2d-311)) then
tmp = -c0 * ((sqrt(-a) * (-1.0d0)) / (sqrt(-v) * sqrt(l)))
else
tmp = ((-(-1.0d0) / sqrt((v * l))) * c0) * 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 (A <= -2e-311) {
tmp = -c0 * ((Math.sqrt(-A) * -1.0) / (Math.sqrt(-V) * Math.sqrt(l)));
} else {
tmp = ((-(-1.0) / Math.sqrt((V * l))) * c0) * Math.sqrt(A);
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if A <= -2e-311: tmp = -c0 * ((math.sqrt(-A) * -1.0) / (math.sqrt(-V) * math.sqrt(l))) else: tmp = ((-(-1.0) / math.sqrt((V * l))) * c0) * math.sqrt(A) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (A <= -2e-311) tmp = Float64(Float64(-c0) * Float64(Float64(sqrt(Float64(-A)) * -1.0) / Float64(sqrt(Float64(-V)) * sqrt(l)))); else tmp = Float64(Float64(Float64(Float64(-(-1.0)) / sqrt(Float64(V * l))) * c0) * 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 (A <= -2e-311)
tmp = -c0 * ((sqrt(-A) * -1.0) / (sqrt(-V) * sqrt(l)));
else
tmp = ((-(-1.0) / sqrt((V * l))) * c0) * 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[A, -2e-311], N[((-c0) * N[(N[(N[Sqrt[(-A)], $MachinePrecision] * -1.0), $MachinePrecision] / N[(N[Sqrt[(-V)], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[((--1.0) / N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * c0), $MachinePrecision] * N[Sqrt[A], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2 \cdot 10^{-311}:\\
\;\;\;\;\left(-c0\right) \cdot \frac{\sqrt{-A} \cdot -1}{\sqrt{-V} \cdot \sqrt{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{--1}{\sqrt{V \cdot \ell}} \cdot c0\right) \cdot \sqrt{A}\\
\end{array}
\end{array}
if A < -1.9999999999999e-311Initial program 72.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6472.7
Applied rewrites72.7%
lift-sqrt.f64N/A
lift-/.f64N/A
sqrt-divN/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
div-invN/A
lift-sqrt.f64N/A
lift-/.f64N/A
frac-2negN/A
sqrt-divN/A
frac-2negN/A
metadata-evalN/A
frac-timesN/A
lower-/.f64N/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-neg.f64N/A
lower-neg.f6457.9
Applied rewrites57.9%
if -1.9999999999999e-311 < A Initial program 74.1%
lift-*.f64N/A
*-commutativeN/A
lift-sqrt.f64N/A
lift-/.f64N/A
sqrt-divN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f6482.7
Applied rewrites82.7%
lift-/.f64N/A
clear-numN/A
frac-2negN/A
associate-/r/N/A
lower-*.f64N/A
neg-mul-1N/A
associate-/r*N/A
metadata-evalN/A
lower-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-neg.f6482.7
Applied rewrites82.7%
Final simplification69.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 (<= A -2e-311) (/ (* (/ c0 (sqrt l)) (sqrt (- A))) (sqrt (- V))) (* (* (/ (- -1.0) (sqrt (* V l))) c0) (sqrt A))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if (A <= -2e-311) {
tmp = ((c0 / sqrt(l)) * sqrt(-A)) / sqrt(-V);
} else {
tmp = ((-(-1.0) / sqrt((V * l))) * c0) * 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 (a <= (-2d-311)) then
tmp = ((c0 / sqrt(l)) * sqrt(-a)) / sqrt(-v)
else
tmp = ((-(-1.0d0) / sqrt((v * l))) * c0) * 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 (A <= -2e-311) {
tmp = ((c0 / Math.sqrt(l)) * Math.sqrt(-A)) / Math.sqrt(-V);
} else {
tmp = ((-(-1.0) / Math.sqrt((V * l))) * c0) * Math.sqrt(A);
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if A <= -2e-311: tmp = ((c0 / math.sqrt(l)) * math.sqrt(-A)) / math.sqrt(-V) else: tmp = ((-(-1.0) / math.sqrt((V * l))) * c0) * math.sqrt(A) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (A <= -2e-311) tmp = Float64(Float64(Float64(c0 / sqrt(l)) * sqrt(Float64(-A))) / sqrt(Float64(-V))); else tmp = Float64(Float64(Float64(Float64(-(-1.0)) / sqrt(Float64(V * l))) * c0) * 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 (A <= -2e-311)
tmp = ((c0 / sqrt(l)) * sqrt(-A)) / sqrt(-V);
else
tmp = ((-(-1.0) / sqrt((V * l))) * c0) * 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[A, -2e-311], N[(N[(N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[Sqrt[(-A)], $MachinePrecision]), $MachinePrecision] / N[Sqrt[(-V)], $MachinePrecision]), $MachinePrecision], N[(N[(N[((--1.0) / N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * c0), $MachinePrecision] * N[Sqrt[A], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;A \leq -2 \cdot 10^{-311}:\\
\;\;\;\;\frac{\frac{c0}{\sqrt{\ell}} \cdot \sqrt{-A}}{\sqrt{-V}}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{--1}{\sqrt{V \cdot \ell}} \cdot c0\right) \cdot \sqrt{A}\\
\end{array}
\end{array}
if A < -1.9999999999999e-311Initial program 72.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6472.7
Applied rewrites72.7%
lift-*.f64N/A
lift-sqrt.f64N/A
lift-/.f64N/A
sqrt-divN/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
frac-2negN/A
lift-neg.f64N/A
associate-*r/N/A
associate-*l/N/A
un-div-invN/A
metadata-evalN/A
frac-2negN/A
lift-/.f64N/A
lift-neg.f64N/A
neg-mul-1N/A
associate-*r*N/A
lift-sqrt.f64N/A
lift-/.f64N/A
frac-2negN/A
sqrt-divN/A
Applied rewrites55.2%
lift-*.f64N/A
lift-pow.f64N/A
metadata-evalN/A
pow-flipN/A
pow1/2N/A
lift-sqrt.f64N/A
div-invN/A
lower-/.f6455.2
Applied rewrites55.2%
if -1.9999999999999e-311 < A Initial program 74.1%
lift-*.f64N/A
*-commutativeN/A
lift-sqrt.f64N/A
lift-/.f64N/A
sqrt-divN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f6482.7
Applied rewrites82.7%
lift-/.f64N/A
clear-numN/A
frac-2negN/A
associate-/r/N/A
lower-*.f64N/A
neg-mul-1N/A
associate-/r*N/A
metadata-evalN/A
lower-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-neg.f6482.7
Applied rewrites82.7%
Final simplification67.8%
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 73.3%
herbie shell --seed 2024298
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))