
(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 24 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) (- INFINITY))
(/ (/ c0 (sqrt l)) (sqrt (/ V A)))
(if (<= (* l V) -4e-299)
(* c0 (/ (sqrt (- 0.0 A)) (sqrt (/ V (/ -1.0 l)))))
(if (<= (* l V) 0.0)
(* c0 (* (pow (- 0.0 (/ l A)) -0.5) (pow (- 0.0 V) -0.5)))
(* (* c0 (pow (* l V) -0.5)) (sqrt A))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((l * V) <= -((double) INFINITY)) {
tmp = (c0 / sqrt(l)) / sqrt((V / A));
} else if ((l * V) <= -4e-299) {
tmp = c0 * (sqrt((0.0 - A)) / sqrt((V / (-1.0 / l))));
} else if ((l * V) <= 0.0) {
tmp = c0 * (pow((0.0 - (l / A)), -0.5) * pow((0.0 - V), -0.5));
} else {
tmp = (c0 * pow((l * V), -0.5)) * 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 ((l * V) <= -Double.POSITIVE_INFINITY) {
tmp = (c0 / Math.sqrt(l)) / Math.sqrt((V / A));
} else if ((l * V) <= -4e-299) {
tmp = c0 * (Math.sqrt((0.0 - A)) / Math.sqrt((V / (-1.0 / l))));
} else if ((l * V) <= 0.0) {
tmp = c0 * (Math.pow((0.0 - (l / A)), -0.5) * Math.pow((0.0 - V), -0.5));
} else {
tmp = (c0 * Math.pow((l * V), -0.5)) * 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) <= -math.inf: tmp = (c0 / math.sqrt(l)) / math.sqrt((V / A)) elif (l * V) <= -4e-299: tmp = c0 * (math.sqrt((0.0 - A)) / math.sqrt((V / (-1.0 / l)))) elif (l * V) <= 0.0: tmp = c0 * (math.pow((0.0 - (l / A)), -0.5) * math.pow((0.0 - V), -0.5)) else: tmp = (c0 * math.pow((l * V), -0.5)) * 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) <= Float64(-Inf)) tmp = Float64(Float64(c0 / sqrt(l)) / sqrt(Float64(V / A))); elseif (Float64(l * V) <= -4e-299) tmp = Float64(c0 * Float64(sqrt(Float64(0.0 - A)) / sqrt(Float64(V / Float64(-1.0 / l))))); elseif (Float64(l * V) <= 0.0) tmp = Float64(c0 * Float64((Float64(0.0 - Float64(l / A)) ^ -0.5) * (Float64(0.0 - V) ^ -0.5))); else tmp = Float64(Float64(c0 * (Float64(l * V) ^ -0.5)) * 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) <= -Inf)
tmp = (c0 / sqrt(l)) / sqrt((V / A));
elseif ((l * V) <= -4e-299)
tmp = c0 * (sqrt((0.0 - A)) / sqrt((V / (-1.0 / l))));
elseif ((l * V) <= 0.0)
tmp = c0 * (((0.0 - (l / A)) ^ -0.5) * ((0.0 - V) ^ -0.5));
else
tmp = (c0 * ((l * V) ^ -0.5)) * 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], (-Infinity)], N[(N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(V / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], -4e-299], N[(c0 * N[(N[Sqrt[N[(0.0 - A), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(V / N[(-1.0 / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 0.0], N[(c0 * N[(N[Power[N[(0.0 - N[(l / A), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[Power[N[(0.0 - V), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c0 * N[Power[N[(l * V), $MachinePrecision], -0.5], $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}\;\ell \cdot V \leq -\infty:\\
\;\;\;\;\frac{\frac{c0}{\sqrt{\ell}}}{\sqrt{\frac{V}{A}}}\\
\mathbf{elif}\;\ell \cdot V \leq -4 \cdot 10^{-299}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{0 - A}}{\sqrt{\frac{V}{\frac{-1}{\ell}}}}\\
\mathbf{elif}\;\ell \cdot V \leq 0:\\
\;\;\;\;c0 \cdot \left({\left(0 - \frac{\ell}{A}\right)}^{-0.5} \cdot {\left(0 - V\right)}^{-0.5}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(c0 \cdot {\left(\ell \cdot V\right)}^{-0.5}\right) \cdot \sqrt{A}\\
\end{array}
\end{array}
if (*.f64 V l) < -inf.0Initial program 18.5%
associate-/r*N/A
sqrt-divN/A
associate-*r/N/A
associate-*l/N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
/-lowering-/.f6432.0%
Applied egg-rr32.0%
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f6432.0%
Applied egg-rr32.0%
if -inf.0 < (*.f64 V l) < -3.99999999999999997e-299Initial program 82.4%
pow1/2N/A
clear-numN/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
metadata-eval72.2%
Applied egg-rr72.2%
associate-/r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f6483.9%
Applied egg-rr83.9%
clear-numN/A
associate-/l/N/A
inv-powN/A
pow-powN/A
metadata-evalN/A
pow1/2N/A
associate-/l/N/A
frac-2negN/A
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
distribute-rgt-neg-inN/A
sub0-negN/A
flip3--N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
clear-numN/A
flip3--N/A
sub0-negN/A
Applied egg-rr99.4%
if -3.99999999999999997e-299 < (*.f64 V l) < -0.0Initial program 27.7%
pow1/2N/A
clear-numN/A
inv-powN/A
pow-powN/A
frac-2negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
associate-*l/N/A
unpow-prod-downN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
distribute-frac-neg2N/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
pow-lowering-pow.f64N/A
neg-sub0N/A
--lowering--.f64N/A
metadata-eval40.4%
Applied egg-rr40.4%
if -0.0 < (*.f64 V l) Initial program 79.4%
*-commutativeN/A
sqrt-divN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
div-invN/A
metadata-evalN/A
sqrt-divN/A
pow1/2N/A
*-lowering-*.f64N/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
sqrt-lowering-sqrt.f6489.7%
Applied egg-rr89.7%
Final simplification84.3%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (* c0 (sqrt (/ A (* l V))))))
(if (<= t_0 0.0)
(* c0 (sqrt (/ (/ A V) l)))
(if (<= t_0 5e+252) t_0 (* c0 (pow (/ V (/ A l)) -0.5))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = c0 * sqrt((A / (l * V)));
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * sqrt(((A / V) / l));
} else if (t_0 <= 5e+252) {
tmp = t_0;
} else {
tmp = c0 * pow((V / (A / 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) :: t_0
real(8) :: tmp
t_0 = c0 * sqrt((a / (l * v)))
if (t_0 <= 0.0d0) then
tmp = c0 * sqrt(((a / v) / l))
else if (t_0 <= 5d+252) then
tmp = t_0
else
tmp = c0 * ((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 t_0 = c0 * Math.sqrt((A / (l * V)));
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * Math.sqrt(((A / V) / l));
} else if (t_0 <= 5e+252) {
tmp = t_0;
} else {
tmp = c0 * Math.pow((V / (A / l)), -0.5);
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = c0 * math.sqrt((A / (l * V))) tmp = 0 if t_0 <= 0.0: tmp = c0 * math.sqrt(((A / V) / l)) elif t_0 <= 5e+252: tmp = t_0 else: tmp = c0 * math.pow((V / (A / l)), -0.5) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = Float64(c0 * sqrt(Float64(A / Float64(l * V)))) tmp = 0.0 if (t_0 <= 0.0) tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); elseif (t_0 <= 5e+252) tmp = t_0; else tmp = Float64(c0 * (Float64(V / Float64(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)
t_0 = c0 * sqrt((A / (l * V)));
tmp = 0.0;
if (t_0 <= 0.0)
tmp = c0 * sqrt(((A / V) / l));
elseif (t_0 <= 5e+252)
tmp = t_0;
else
tmp = c0 * ((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_] := Block[{t$95$0 = N[(c0 * N[Sqrt[N[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+252], t$95$0, N[(c0 * N[Power[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := c0 \cdot \sqrt{\frac{A}{\ell \cdot V}}\\
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+252}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot {\left(\frac{V}{\frac{A}{\ell}}\right)}^{-0.5}\\
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 0.0Initial program 65.7%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6470.1%
Applied egg-rr70.1%
if 0.0 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 4.9999999999999997e252Initial program 98.9%
if 4.9999999999999997e252 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 47.7%
pow1/2N/A
clear-numN/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
metadata-eval57.6%
Applied egg-rr57.6%
Final simplification75.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 (* l V))))))
(if (<= t_0 0.0)
(* c0 (sqrt (/ (/ A V) l)))
(if (<= t_0 5e+252) t_0 (* c0 (pow (* V (/ l A)) -0.5))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = c0 * sqrt((A / (l * V)));
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * sqrt(((A / V) / l));
} else if (t_0 <= 5e+252) {
tmp = t_0;
} else {
tmp = c0 * pow((V * (l / 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) :: t_0
real(8) :: tmp
t_0 = c0 * sqrt((a / (l * v)))
if (t_0 <= 0.0d0) then
tmp = c0 * sqrt(((a / v) / l))
else if (t_0 <= 5d+252) then
tmp = t_0
else
tmp = c0 * ((v * (l / 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 t_0 = c0 * Math.sqrt((A / (l * V)));
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * Math.sqrt(((A / V) / l));
} else if (t_0 <= 5e+252) {
tmp = t_0;
} else {
tmp = c0 * Math.pow((V * (l / A)), -0.5);
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = c0 * math.sqrt((A / (l * V))) tmp = 0 if t_0 <= 0.0: tmp = c0 * math.sqrt(((A / V) / l)) elif t_0 <= 5e+252: tmp = t_0 else: tmp = c0 * math.pow((V * (l / A)), -0.5) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = Float64(c0 * sqrt(Float64(A / Float64(l * V)))) tmp = 0.0 if (t_0 <= 0.0) tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); elseif (t_0 <= 5e+252) tmp = t_0; else tmp = Float64(c0 * (Float64(V * Float64(l / 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)
t_0 = c0 * sqrt((A / (l * V)));
tmp = 0.0;
if (t_0 <= 0.0)
tmp = c0 * sqrt(((A / V) / l));
elseif (t_0 <= 5e+252)
tmp = t_0;
else
tmp = c0 * ((V * (l / 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_] := Block[{t$95$0 = N[(c0 * N[Sqrt[N[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+252], t$95$0, N[(c0 * N[Power[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := c0 \cdot \sqrt{\frac{A}{\ell \cdot V}}\\
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+252}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot {\left(V \cdot \frac{\ell}{A}\right)}^{-0.5}\\
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 0.0Initial program 65.7%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6470.1%
Applied egg-rr70.1%
if 0.0 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 4.9999999999999997e252Initial program 98.9%
if 4.9999999999999997e252 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 47.7%
pow1/2N/A
clear-numN/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
metadata-eval57.6%
Applied egg-rr57.6%
div-invN/A
clear-numN/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f6457.5%
Applied egg-rr57.5%
Final simplification75.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 (* l V))))))
(if (<= t_0 0.0)
(* c0 (sqrt (/ (/ A V) l)))
(if (<= t_0 5e+256) t_0 (/ c0 (sqrt (/ V (/ A l))))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = c0 * sqrt((A / (l * V)));
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * sqrt(((A / V) / l));
} else if (t_0 <= 5e+256) {
tmp = t_0;
} else {
tmp = c0 / sqrt((V / (A / l)));
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: tmp
t_0 = c0 * sqrt((a / (l * v)))
if (t_0 <= 0.0d0) then
tmp = c0 * sqrt(((a / v) / l))
else if (t_0 <= 5d+256) then
tmp = t_0
else
tmp = c0 / sqrt((v / (a / l)))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = c0 * Math.sqrt((A / (l * V)));
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * Math.sqrt(((A / V) / l));
} else if (t_0 <= 5e+256) {
tmp = t_0;
} else {
tmp = c0 / Math.sqrt((V / (A / l)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = c0 * math.sqrt((A / (l * V))) tmp = 0 if t_0 <= 0.0: tmp = c0 * math.sqrt(((A / V) / l)) elif t_0 <= 5e+256: tmp = t_0 else: tmp = c0 / math.sqrt((V / (A / l))) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = Float64(c0 * sqrt(Float64(A / Float64(l * V)))) tmp = 0.0 if (t_0 <= 0.0) tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); elseif (t_0 <= 5e+256) tmp = t_0; else tmp = Float64(c0 / sqrt(Float64(V / Float64(A / l)))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = c0 * sqrt((A / (l * V)));
tmp = 0.0;
if (t_0 <= 0.0)
tmp = c0 * sqrt(((A / V) / l));
elseif (t_0 <= 5e+256)
tmp = t_0;
else
tmp = c0 / sqrt((V / (A / l)));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(c0 * N[Sqrt[N[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+256], t$95$0, N[(c0 / N[Sqrt[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := c0 \cdot \sqrt{\frac{A}{\ell \cdot V}}\\
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+256}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}\\
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 0.0Initial program 65.7%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6470.1%
Applied egg-rr70.1%
if 0.0 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 5.00000000000000015e256Initial program 98.9%
if 5.00000000000000015e256 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 44.9%
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f6455.2%
Applied egg-rr55.2%
Final simplification75.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 (* l V))))))
(if (<= t_0 0.0)
(* c0 (sqrt (/ (/ A V) l)))
(if (<= t_0 5e+272) t_0 (/ c0 (sqrt (* V (/ l A))))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = c0 * sqrt((A / (l * V)));
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * sqrt(((A / V) / l));
} else if (t_0 <= 5e+272) {
tmp = t_0;
} else {
tmp = c0 / sqrt((V * (l / A)));
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: tmp
t_0 = c0 * sqrt((a / (l * v)))
if (t_0 <= 0.0d0) then
tmp = c0 * sqrt(((a / v) / l))
else if (t_0 <= 5d+272) then
tmp = t_0
else
tmp = c0 / sqrt((v * (l / a)))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = c0 * Math.sqrt((A / (l * V)));
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * Math.sqrt(((A / V) / l));
} else if (t_0 <= 5e+272) {
tmp = t_0;
} else {
tmp = c0 / Math.sqrt((V * (l / A)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = c0 * math.sqrt((A / (l * V))) tmp = 0 if t_0 <= 0.0: tmp = c0 * math.sqrt(((A / V) / l)) elif t_0 <= 5e+272: tmp = t_0 else: tmp = c0 / math.sqrt((V * (l / A))) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = Float64(c0 * sqrt(Float64(A / Float64(l * V)))) tmp = 0.0 if (t_0 <= 0.0) tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); elseif (t_0 <= 5e+272) tmp = t_0; else tmp = Float64(c0 / sqrt(Float64(V * Float64(l / A)))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = c0 * sqrt((A / (l * V)));
tmp = 0.0;
if (t_0 <= 0.0)
tmp = c0 * sqrt(((A / V) / l));
elseif (t_0 <= 5e+272)
tmp = t_0;
else
tmp = c0 / sqrt((V * (l / A)));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(c0 * N[Sqrt[N[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+272], t$95$0, N[(c0 / N[Sqrt[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := c0 \cdot \sqrt{\frac{A}{\ell \cdot V}}\\
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+272}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 0.0Initial program 65.7%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6470.1%
Applied egg-rr70.1%
if 0.0 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 4.99999999999999973e272Initial program 98.9%
if 4.99999999999999973e272 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 43.3%
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f6453.9%
Applied egg-rr53.9%
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
clear-numN/A
/-lowering-/.f6453.9%
Applied egg-rr53.9%
Final simplification75.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 (* l V))))))
(if (<= t_0 0.0)
(* c0 (sqrt (/ (/ A V) l)))
(if (<= t_0 5e+252) 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 / (l * V)));
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * sqrt(((A / V) / l));
} else if (t_0 <= 5e+252) {
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 / (l * v)))
if (t_0 <= 0.0d0) then
tmp = c0 * sqrt(((a / v) / l))
else if (t_0 <= 5d+252) 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 / (l * V)));
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * Math.sqrt(((A / V) / l));
} else if (t_0 <= 5e+252) {
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 / (l * V))) tmp = 0 if t_0 <= 0.0: tmp = c0 * math.sqrt(((A / V) / l)) elif t_0 <= 5e+252: 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(l * V)))) tmp = 0.0 if (t_0 <= 0.0) tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); elseif (t_0 <= 5e+252) 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 / (l * V)));
tmp = 0.0;
if (t_0 <= 0.0)
tmp = c0 * sqrt(((A / V) / l));
elseif (t_0 <= 5e+252)
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[(l * V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+252], 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}{\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^{+252}:\\
\;\;\;\;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)))) < 0.0Initial program 65.7%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6470.1%
Applied egg-rr70.1%
if 0.0 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 4.9999999999999997e252Initial program 98.9%
if 4.9999999999999997e252 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 47.7%
associate-/l/N/A
/-lowering-/.f64N/A
/-lowering-/.f6455.3%
Applied egg-rr55.3%
Final simplification74.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 (* c0 (sqrt (/ A (* l V))))) (t_1 (* c0 (sqrt (/ (/ A V) l))))) (if (<= t_0 0.0) t_1 (if (<= t_0 2e+300) t_0 t_1))))
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 t_1 = c0 * sqrt(((A / V) / l));
double tmp;
if (t_0 <= 0.0) {
tmp = t_1;
} else if (t_0 <= 2e+300) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = c0 * sqrt((a / (l * v)))
t_1 = c0 * sqrt(((a / v) / l))
if (t_0 <= 0.0d0) then
tmp = t_1
else if (t_0 <= 2d+300) then
tmp = t_0
else
tmp = t_1
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 t_1 = c0 * Math.sqrt(((A / V) / l));
double tmp;
if (t_0 <= 0.0) {
tmp = t_1;
} else if (t_0 <= 2e+300) {
tmp = t_0;
} else {
tmp = t_1;
}
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))) t_1 = c0 * math.sqrt(((A / V) / l)) tmp = 0 if t_0 <= 0.0: tmp = t_1 elif t_0 <= 2e+300: tmp = t_0 else: tmp = t_1 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)))) t_1 = Float64(c0 * sqrt(Float64(Float64(A / V) / l))) tmp = 0.0 if (t_0 <= 0.0) tmp = t_1; elseif (t_0 <= 2e+300) tmp = t_0; else tmp = t_1; 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)));
t_1 = c0 * sqrt(((A / V) / l));
tmp = 0.0;
if (t_0 <= 0.0)
tmp = t_1;
elseif (t_0 <= 2e+300)
tmp = t_0;
else
tmp = t_1;
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]}, Block[{t$95$1 = N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], t$95$1, If[LessEqual[t$95$0, 2e+300], t$95$0, t$95$1]]]]
\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}}\\
t_1 := c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+300}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 0.0 or 2.0000000000000001e300 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 61.2%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6466.4%
Applied egg-rr66.4%
if 0.0 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 2.0000000000000001e300Initial program 98.9%
Final simplification74.6%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. (FPCore (c0 A V l) :precision binary64 (if (<= A -4e-310) (/ (/ c0 (sqrt l)) (/ (pow (- 0.0 V) 0.5) (sqrt (- 0.0 A)))) (* (* c0 (pow (* l V) -0.5)) (sqrt A))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if (A <= -4e-310) {
tmp = (c0 / sqrt(l)) / (pow((0.0 - V), 0.5) / sqrt((0.0 - A)));
} else {
tmp = (c0 * pow((l * V), -0.5)) * 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 <= (-4d-310)) then
tmp = (c0 / sqrt(l)) / (((0.0d0 - v) ** 0.5d0) / sqrt((0.0d0 - a)))
else
tmp = (c0 * ((l * v) ** (-0.5d0))) * 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 <= -4e-310) {
tmp = (c0 / Math.sqrt(l)) / (Math.pow((0.0 - V), 0.5) / Math.sqrt((0.0 - A)));
} else {
tmp = (c0 * Math.pow((l * V), -0.5)) * Math.sqrt(A);
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if A <= -4e-310: tmp = (c0 / math.sqrt(l)) / (math.pow((0.0 - V), 0.5) / math.sqrt((0.0 - A))) else: tmp = (c0 * math.pow((l * V), -0.5)) * 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 <= -4e-310) tmp = Float64(Float64(c0 / sqrt(l)) / Float64((Float64(0.0 - V) ^ 0.5) / sqrt(Float64(0.0 - A)))); else tmp = Float64(Float64(c0 * (Float64(l * V) ^ -0.5)) * 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 <= -4e-310)
tmp = (c0 / sqrt(l)) / (((0.0 - V) ^ 0.5) / sqrt((0.0 - A)));
else
tmp = (c0 * ((l * V) ^ -0.5)) * 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, -4e-310], N[(N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] / N[(N[Power[N[(0.0 - V), $MachinePrecision], 0.5], $MachinePrecision] / N[Sqrt[N[(0.0 - A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c0 * N[Power[N[(l * V), $MachinePrecision], -0.5], $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}\;A \leq -4 \cdot 10^{-310}:\\
\;\;\;\;\frac{\frac{c0}{\sqrt{\ell}}}{\frac{{\left(0 - V\right)}^{0.5}}{\sqrt{0 - A}}}\\
\mathbf{else}:\\
\;\;\;\;\left(c0 \cdot {\left(\ell \cdot V\right)}^{-0.5}\right) \cdot \sqrt{A}\\
\end{array}
\end{array}
if A < -3.999999999999988e-310Initial program 68.6%
associate-/r*N/A
sqrt-divN/A
associate-*r/N/A
associate-*l/N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
/-lowering-/.f6434.2%
Applied egg-rr34.2%
unpow1/2N/A
frac-2negN/A
sqrt-divN/A
pow1/2N/A
/-lowering-/.f64N/A
pow-lowering-pow.f64N/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f6445.1%
Applied egg-rr45.1%
if -3.999999999999988e-310 < A Initial program 73.3%
*-commutativeN/A
sqrt-divN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
div-invN/A
metadata-evalN/A
sqrt-divN/A
pow1/2N/A
*-lowering-*.f64N/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
sqrt-lowering-sqrt.f6482.3%
Applied egg-rr82.3%
Final simplification62.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 (<= A -4e-310) (/ (/ c0 (sqrt l)) (* (pow (- 0.0 V) 0.5) (sqrt (/ -1.0 A)))) (* (* c0 (pow (* l V) -0.5)) (sqrt A))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if (A <= -4e-310) {
tmp = (c0 / sqrt(l)) / (pow((0.0 - V), 0.5) * sqrt((-1.0 / A)));
} else {
tmp = (c0 * pow((l * V), -0.5)) * 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 <= (-4d-310)) then
tmp = (c0 / sqrt(l)) / (((0.0d0 - v) ** 0.5d0) * sqrt(((-1.0d0) / a)))
else
tmp = (c0 * ((l * v) ** (-0.5d0))) * 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 <= -4e-310) {
tmp = (c0 / Math.sqrt(l)) / (Math.pow((0.0 - V), 0.5) * Math.sqrt((-1.0 / A)));
} else {
tmp = (c0 * Math.pow((l * V), -0.5)) * Math.sqrt(A);
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if A <= -4e-310: tmp = (c0 / math.sqrt(l)) / (math.pow((0.0 - V), 0.5) * math.sqrt((-1.0 / A))) else: tmp = (c0 * math.pow((l * V), -0.5)) * 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 <= -4e-310) tmp = Float64(Float64(c0 / sqrt(l)) / Float64((Float64(0.0 - V) ^ 0.5) * sqrt(Float64(-1.0 / A)))); else tmp = Float64(Float64(c0 * (Float64(l * V) ^ -0.5)) * 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 <= -4e-310)
tmp = (c0 / sqrt(l)) / (((0.0 - V) ^ 0.5) * sqrt((-1.0 / A)));
else
tmp = (c0 * ((l * V) ^ -0.5)) * 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, -4e-310], N[(N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] / N[(N[Power[N[(0.0 - V), $MachinePrecision], 0.5], $MachinePrecision] * N[Sqrt[N[(-1.0 / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c0 * N[Power[N[(l * V), $MachinePrecision], -0.5], $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}\;A \leq -4 \cdot 10^{-310}:\\
\;\;\;\;\frac{\frac{c0}{\sqrt{\ell}}}{{\left(0 - V\right)}^{0.5} \cdot \sqrt{\frac{-1}{A}}}\\
\mathbf{else}:\\
\;\;\;\;\left(c0 \cdot {\left(\ell \cdot V\right)}^{-0.5}\right) \cdot \sqrt{A}\\
\end{array}
\end{array}
if A < -3.999999999999988e-310Initial program 68.6%
associate-/r*N/A
sqrt-divN/A
associate-*r/N/A
associate-*l/N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
/-lowering-/.f6434.2%
Applied egg-rr34.2%
unpow1/2N/A
frac-2negN/A
div-invN/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
distribute-frac-neg2N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6445.1%
Applied egg-rr45.1%
if -3.999999999999988e-310 < A Initial program 73.3%
*-commutativeN/A
sqrt-divN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
div-invN/A
metadata-evalN/A
sqrt-divN/A
pow1/2N/A
*-lowering-*.f64N/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
sqrt-lowering-sqrt.f6482.3%
Applied egg-rr82.3%
Final simplification62.5%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(if (<= (* l V) (- INFINITY))
(/ (/ c0 (sqrt l)) (sqrt (/ V A)))
(if (<= (* l V) -4e-299)
(* c0 (/ (sqrt (- 0.0 A)) (sqrt (/ V (/ -1.0 l)))))
(if (<= (* l V) 0.0)
(/ c0 (* (pow (- 0.0 V) 0.5) (sqrt (- 0.0 (/ l A)))))
(* (* c0 (pow (* l V) -0.5)) (sqrt A))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((l * V) <= -((double) INFINITY)) {
tmp = (c0 / sqrt(l)) / sqrt((V / A));
} else if ((l * V) <= -4e-299) {
tmp = c0 * (sqrt((0.0 - A)) / sqrt((V / (-1.0 / l))));
} else if ((l * V) <= 0.0) {
tmp = c0 / (pow((0.0 - V), 0.5) * sqrt((0.0 - (l / A))));
} else {
tmp = (c0 * pow((l * V), -0.5)) * 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 ((l * V) <= -Double.POSITIVE_INFINITY) {
tmp = (c0 / Math.sqrt(l)) / Math.sqrt((V / A));
} else if ((l * V) <= -4e-299) {
tmp = c0 * (Math.sqrt((0.0 - A)) / Math.sqrt((V / (-1.0 / l))));
} else if ((l * V) <= 0.0) {
tmp = c0 / (Math.pow((0.0 - V), 0.5) * Math.sqrt((0.0 - (l / A))));
} else {
tmp = (c0 * Math.pow((l * V), -0.5)) * 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) <= -math.inf: tmp = (c0 / math.sqrt(l)) / math.sqrt((V / A)) elif (l * V) <= -4e-299: tmp = c0 * (math.sqrt((0.0 - A)) / math.sqrt((V / (-1.0 / l)))) elif (l * V) <= 0.0: tmp = c0 / (math.pow((0.0 - V), 0.5) * math.sqrt((0.0 - (l / A)))) else: tmp = (c0 * math.pow((l * V), -0.5)) * 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) <= Float64(-Inf)) tmp = Float64(Float64(c0 / sqrt(l)) / sqrt(Float64(V / A))); elseif (Float64(l * V) <= -4e-299) tmp = Float64(c0 * Float64(sqrt(Float64(0.0 - A)) / sqrt(Float64(V / Float64(-1.0 / l))))); elseif (Float64(l * V) <= 0.0) tmp = Float64(c0 / Float64((Float64(0.0 - V) ^ 0.5) * sqrt(Float64(0.0 - Float64(l / A))))); else tmp = Float64(Float64(c0 * (Float64(l * V) ^ -0.5)) * 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) <= -Inf)
tmp = (c0 / sqrt(l)) / sqrt((V / A));
elseif ((l * V) <= -4e-299)
tmp = c0 * (sqrt((0.0 - A)) / sqrt((V / (-1.0 / l))));
elseif ((l * V) <= 0.0)
tmp = c0 / (((0.0 - V) ^ 0.5) * sqrt((0.0 - (l / A))));
else
tmp = (c0 * ((l * V) ^ -0.5)) * 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], (-Infinity)], N[(N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(V / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], -4e-299], N[(c0 * N[(N[Sqrt[N[(0.0 - A), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(V / N[(-1.0 / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 0.0], N[(c0 / N[(N[Power[N[(0.0 - V), $MachinePrecision], 0.5], $MachinePrecision] * N[Sqrt[N[(0.0 - N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c0 * N[Power[N[(l * V), $MachinePrecision], -0.5], $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}\;\ell \cdot V \leq -\infty:\\
\;\;\;\;\frac{\frac{c0}{\sqrt{\ell}}}{\sqrt{\frac{V}{A}}}\\
\mathbf{elif}\;\ell \cdot V \leq -4 \cdot 10^{-299}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{0 - A}}{\sqrt{\frac{V}{\frac{-1}{\ell}}}}\\
\mathbf{elif}\;\ell \cdot V \leq 0:\\
\;\;\;\;\frac{c0}{{\left(0 - V\right)}^{0.5} \cdot \sqrt{0 - \frac{\ell}{A}}}\\
\mathbf{else}:\\
\;\;\;\;\left(c0 \cdot {\left(\ell \cdot V\right)}^{-0.5}\right) \cdot \sqrt{A}\\
\end{array}
\end{array}
if (*.f64 V l) < -inf.0Initial program 18.5%
associate-/r*N/A
sqrt-divN/A
associate-*r/N/A
associate-*l/N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
/-lowering-/.f6432.0%
Applied egg-rr32.0%
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f6432.0%
Applied egg-rr32.0%
if -inf.0 < (*.f64 V l) < -3.99999999999999997e-299Initial program 82.4%
pow1/2N/A
clear-numN/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
metadata-eval72.2%
Applied egg-rr72.2%
associate-/r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f6483.9%
Applied egg-rr83.9%
clear-numN/A
associate-/l/N/A
inv-powN/A
pow-powN/A
metadata-evalN/A
pow1/2N/A
associate-/l/N/A
frac-2negN/A
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
distribute-rgt-neg-inN/A
sub0-negN/A
flip3--N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
clear-numN/A
flip3--N/A
sub0-negN/A
Applied egg-rr99.4%
if -3.99999999999999997e-299 < (*.f64 V l) < -0.0Initial program 27.7%
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f6457.1%
Applied egg-rr57.1%
frac-2negN/A
div-invN/A
sqrt-prodN/A
pow1/2N/A
distribute-frac-neg2N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
neg-sub0N/A
--lowering--.f64N/A
distribute-frac-neg2N/A
sqrt-lowering-sqrt.f64N/A
distribute-frac-neg2N/A
clear-numN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f6440.4%
Applied egg-rr40.4%
if -0.0 < (*.f64 V l) Initial program 79.4%
*-commutativeN/A
sqrt-divN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
div-invN/A
metadata-evalN/A
sqrt-divN/A
pow1/2N/A
*-lowering-*.f64N/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
sqrt-lowering-sqrt.f6489.7%
Applied egg-rr89.7%
Final simplification84.3%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(if (<= (* l V) (- INFINITY))
(/ (/ c0 (sqrt l)) (sqrt (/ V A)))
(if (<= (* l V) -4e-299)
(* c0 (/ (sqrt (- 0.0 A)) (sqrt (/ V (/ -1.0 l)))))
(if (<= (* l V) 0.0)
(* c0 (/ (sqrt (- 0.0 (/ A l))) (pow (- 0.0 V) 0.5)))
(* (* c0 (pow (* l V) -0.5)) (sqrt A))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((l * V) <= -((double) INFINITY)) {
tmp = (c0 / sqrt(l)) / sqrt((V / A));
} else if ((l * V) <= -4e-299) {
tmp = c0 * (sqrt((0.0 - A)) / sqrt((V / (-1.0 / l))));
} else if ((l * V) <= 0.0) {
tmp = c0 * (sqrt((0.0 - (A / l))) / pow((0.0 - V), 0.5));
} else {
tmp = (c0 * pow((l * V), -0.5)) * 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 ((l * V) <= -Double.POSITIVE_INFINITY) {
tmp = (c0 / Math.sqrt(l)) / Math.sqrt((V / A));
} else if ((l * V) <= -4e-299) {
tmp = c0 * (Math.sqrt((0.0 - A)) / Math.sqrt((V / (-1.0 / l))));
} else if ((l * V) <= 0.0) {
tmp = c0 * (Math.sqrt((0.0 - (A / l))) / Math.pow((0.0 - V), 0.5));
} else {
tmp = (c0 * Math.pow((l * V), -0.5)) * 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) <= -math.inf: tmp = (c0 / math.sqrt(l)) / math.sqrt((V / A)) elif (l * V) <= -4e-299: tmp = c0 * (math.sqrt((0.0 - A)) / math.sqrt((V / (-1.0 / l)))) elif (l * V) <= 0.0: tmp = c0 * (math.sqrt((0.0 - (A / l))) / math.pow((0.0 - V), 0.5)) else: tmp = (c0 * math.pow((l * V), -0.5)) * 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) <= Float64(-Inf)) tmp = Float64(Float64(c0 / sqrt(l)) / sqrt(Float64(V / A))); elseif (Float64(l * V) <= -4e-299) tmp = Float64(c0 * Float64(sqrt(Float64(0.0 - A)) / sqrt(Float64(V / Float64(-1.0 / l))))); elseif (Float64(l * V) <= 0.0) tmp = Float64(c0 * Float64(sqrt(Float64(0.0 - Float64(A / l))) / (Float64(0.0 - V) ^ 0.5))); else tmp = Float64(Float64(c0 * (Float64(l * V) ^ -0.5)) * 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) <= -Inf)
tmp = (c0 / sqrt(l)) / sqrt((V / A));
elseif ((l * V) <= -4e-299)
tmp = c0 * (sqrt((0.0 - A)) / sqrt((V / (-1.0 / l))));
elseif ((l * V) <= 0.0)
tmp = c0 * (sqrt((0.0 - (A / l))) / ((0.0 - V) ^ 0.5));
else
tmp = (c0 * ((l * V) ^ -0.5)) * 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], (-Infinity)], N[(N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(V / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], -4e-299], N[(c0 * N[(N[Sqrt[N[(0.0 - A), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(V / N[(-1.0 / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 0.0], N[(c0 * N[(N[Sqrt[N[(0.0 - N[(A / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Power[N[(0.0 - V), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c0 * N[Power[N[(l * V), $MachinePrecision], -0.5], $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}\;\ell \cdot V \leq -\infty:\\
\;\;\;\;\frac{\frac{c0}{\sqrt{\ell}}}{\sqrt{\frac{V}{A}}}\\
\mathbf{elif}\;\ell \cdot V \leq -4 \cdot 10^{-299}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{0 - A}}{\sqrt{\frac{V}{\frac{-1}{\ell}}}}\\
\mathbf{elif}\;\ell \cdot V \leq 0:\\
\;\;\;\;c0 \cdot \frac{\sqrt{0 - \frac{A}{\ell}}}{{\left(0 - V\right)}^{0.5}}\\
\mathbf{else}:\\
\;\;\;\;\left(c0 \cdot {\left(\ell \cdot V\right)}^{-0.5}\right) \cdot \sqrt{A}\\
\end{array}
\end{array}
if (*.f64 V l) < -inf.0Initial program 18.5%
associate-/r*N/A
sqrt-divN/A
associate-*r/N/A
associate-*l/N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
/-lowering-/.f6432.0%
Applied egg-rr32.0%
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f6432.0%
Applied egg-rr32.0%
if -inf.0 < (*.f64 V l) < -3.99999999999999997e-299Initial program 82.4%
pow1/2N/A
clear-numN/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
metadata-eval72.2%
Applied egg-rr72.2%
associate-/r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f6483.9%
Applied egg-rr83.9%
clear-numN/A
associate-/l/N/A
inv-powN/A
pow-powN/A
metadata-evalN/A
pow1/2N/A
associate-/l/N/A
frac-2negN/A
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
distribute-rgt-neg-inN/A
sub0-negN/A
flip3--N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
clear-numN/A
flip3--N/A
sub0-negN/A
Applied egg-rr99.4%
if -3.99999999999999997e-299 < (*.f64 V l) < -0.0Initial program 27.7%
associate-/l/N/A
frac-2negN/A
sqrt-divN/A
distribute-frac-neg2N/A
pow1/2N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
distribute-frac-neg2N/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
pow-lowering-pow.f64N/A
neg-sub0N/A
--lowering--.f6440.5%
Applied egg-rr40.5%
if -0.0 < (*.f64 V l) Initial program 79.4%
*-commutativeN/A
sqrt-divN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
div-invN/A
metadata-evalN/A
sqrt-divN/A
pow1/2N/A
*-lowering-*.f64N/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
sqrt-lowering-sqrt.f6489.7%
Applied egg-rr89.7%
Final simplification84.3%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(if (<= (* l V) (- INFINITY))
(/ (/ c0 (sqrt l)) (sqrt (/ V A)))
(if (<= (* l V) -4e-299)
(* c0 (/ (sqrt (- 0.0 A)) (sqrt (/ V (/ -1.0 l)))))
(if (<= (* l V) 0.0)
(* c0 (* (sqrt (- 0.0 (/ A l))) (sqrt (/ -1.0 V))))
(* (* c0 (pow (* l V) -0.5)) (sqrt A))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((l * V) <= -((double) INFINITY)) {
tmp = (c0 / sqrt(l)) / sqrt((V / A));
} else if ((l * V) <= -4e-299) {
tmp = c0 * (sqrt((0.0 - A)) / sqrt((V / (-1.0 / l))));
} else if ((l * V) <= 0.0) {
tmp = c0 * (sqrt((0.0 - (A / l))) * sqrt((-1.0 / V)));
} else {
tmp = (c0 * pow((l * V), -0.5)) * 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 ((l * V) <= -Double.POSITIVE_INFINITY) {
tmp = (c0 / Math.sqrt(l)) / Math.sqrt((V / A));
} else if ((l * V) <= -4e-299) {
tmp = c0 * (Math.sqrt((0.0 - A)) / Math.sqrt((V / (-1.0 / l))));
} else if ((l * V) <= 0.0) {
tmp = c0 * (Math.sqrt((0.0 - (A / l))) * Math.sqrt((-1.0 / V)));
} else {
tmp = (c0 * Math.pow((l * V), -0.5)) * 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) <= -math.inf: tmp = (c0 / math.sqrt(l)) / math.sqrt((V / A)) elif (l * V) <= -4e-299: tmp = c0 * (math.sqrt((0.0 - A)) / math.sqrt((V / (-1.0 / l)))) elif (l * V) <= 0.0: tmp = c0 * (math.sqrt((0.0 - (A / l))) * math.sqrt((-1.0 / V))) else: tmp = (c0 * math.pow((l * V), -0.5)) * 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) <= Float64(-Inf)) tmp = Float64(Float64(c0 / sqrt(l)) / sqrt(Float64(V / A))); elseif (Float64(l * V) <= -4e-299) tmp = Float64(c0 * Float64(sqrt(Float64(0.0 - A)) / sqrt(Float64(V / Float64(-1.0 / l))))); elseif (Float64(l * V) <= 0.0) tmp = Float64(c0 * Float64(sqrt(Float64(0.0 - Float64(A / l))) * sqrt(Float64(-1.0 / V)))); else tmp = Float64(Float64(c0 * (Float64(l * V) ^ -0.5)) * 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) <= -Inf)
tmp = (c0 / sqrt(l)) / sqrt((V / A));
elseif ((l * V) <= -4e-299)
tmp = c0 * (sqrt((0.0 - A)) / sqrt((V / (-1.0 / l))));
elseif ((l * V) <= 0.0)
tmp = c0 * (sqrt((0.0 - (A / l))) * sqrt((-1.0 / V)));
else
tmp = (c0 * ((l * V) ^ -0.5)) * 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], (-Infinity)], N[(N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(V / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], -4e-299], N[(c0 * N[(N[Sqrt[N[(0.0 - A), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(V / N[(-1.0 / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 0.0], N[(c0 * N[(N[Sqrt[N[(0.0 - N[(A / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(-1.0 / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c0 * N[Power[N[(l * V), $MachinePrecision], -0.5], $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}\;\ell \cdot V \leq -\infty:\\
\;\;\;\;\frac{\frac{c0}{\sqrt{\ell}}}{\sqrt{\frac{V}{A}}}\\
\mathbf{elif}\;\ell \cdot V \leq -4 \cdot 10^{-299}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{0 - A}}{\sqrt{\frac{V}{\frac{-1}{\ell}}}}\\
\mathbf{elif}\;\ell \cdot V \leq 0:\\
\;\;\;\;c0 \cdot \left(\sqrt{0 - \frac{A}{\ell}} \cdot \sqrt{\frac{-1}{V}}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(c0 \cdot {\left(\ell \cdot V\right)}^{-0.5}\right) \cdot \sqrt{A}\\
\end{array}
\end{array}
if (*.f64 V l) < -inf.0Initial program 18.5%
associate-/r*N/A
sqrt-divN/A
associate-*r/N/A
associate-*l/N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
/-lowering-/.f6432.0%
Applied egg-rr32.0%
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f6432.0%
Applied egg-rr32.0%
if -inf.0 < (*.f64 V l) < -3.99999999999999997e-299Initial program 82.4%
pow1/2N/A
clear-numN/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
metadata-eval72.2%
Applied egg-rr72.2%
associate-/r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f6483.9%
Applied egg-rr83.9%
clear-numN/A
associate-/l/N/A
inv-powN/A
pow-powN/A
metadata-evalN/A
pow1/2N/A
associate-/l/N/A
frac-2negN/A
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
distribute-rgt-neg-inN/A
sub0-negN/A
flip3--N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
clear-numN/A
flip3--N/A
sub0-negN/A
Applied egg-rr99.4%
if -3.99999999999999997e-299 < (*.f64 V l) < -0.0Initial program 27.7%
frac-2negN/A
neg-mul-1N/A
distribute-rgt-neg-inN/A
times-fracN/A
sqrt-prodN/A
frac-2negN/A
metadata-evalN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
metadata-evalN/A
frac-2negN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
distribute-frac-neg2N/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f6440.3%
Applied egg-rr40.3%
if -0.0 < (*.f64 V l) Initial program 79.4%
*-commutativeN/A
sqrt-divN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
div-invN/A
metadata-evalN/A
sqrt-divN/A
pow1/2N/A
*-lowering-*.f64N/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
sqrt-lowering-sqrt.f6489.7%
Applied egg-rr89.7%
Final simplification84.3%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(if (<= (* l V) -2e+193)
(* c0 (/ (pow (/ A V) 0.5) (sqrt l)))
(if (<= (* l V) -5e-133)
(* c0 (pow (/ (* l V) A) -0.5))
(if (<= (* l V) 0.0)
(/ (/ c0 (sqrt l)) (sqrt (/ V A)))
(* (* c0 (pow (* l V) -0.5)) (sqrt A))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((l * V) <= -2e+193) {
tmp = c0 * (pow((A / V), 0.5) / sqrt(l));
} else if ((l * V) <= -5e-133) {
tmp = c0 * pow(((l * V) / A), -0.5);
} else if ((l * V) <= 0.0) {
tmp = (c0 / sqrt(l)) / sqrt((V / A));
} else {
tmp = (c0 * pow((l * V), -0.5)) * 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) <= (-2d+193)) then
tmp = c0 * (((a / v) ** 0.5d0) / sqrt(l))
else if ((l * v) <= (-5d-133)) then
tmp = c0 * (((l * v) / a) ** (-0.5d0))
else if ((l * v) <= 0.0d0) then
tmp = (c0 / sqrt(l)) / sqrt((v / a))
else
tmp = (c0 * ((l * v) ** (-0.5d0))) * 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) <= -2e+193) {
tmp = c0 * (Math.pow((A / V), 0.5) / Math.sqrt(l));
} else if ((l * V) <= -5e-133) {
tmp = c0 * Math.pow(((l * V) / A), -0.5);
} else if ((l * V) <= 0.0) {
tmp = (c0 / Math.sqrt(l)) / Math.sqrt((V / A));
} else {
tmp = (c0 * Math.pow((l * V), -0.5)) * 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) <= -2e+193: tmp = c0 * (math.pow((A / V), 0.5) / math.sqrt(l)) elif (l * V) <= -5e-133: tmp = c0 * math.pow(((l * V) / A), -0.5) elif (l * V) <= 0.0: tmp = (c0 / math.sqrt(l)) / math.sqrt((V / A)) else: tmp = (c0 * math.pow((l * V), -0.5)) * 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) <= -2e+193) tmp = Float64(c0 * Float64((Float64(A / V) ^ 0.5) / sqrt(l))); elseif (Float64(l * V) <= -5e-133) tmp = Float64(c0 * (Float64(Float64(l * V) / A) ^ -0.5)); elseif (Float64(l * V) <= 0.0) tmp = Float64(Float64(c0 / sqrt(l)) / sqrt(Float64(V / A))); else tmp = Float64(Float64(c0 * (Float64(l * V) ^ -0.5)) * 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) <= -2e+193)
tmp = c0 * (((A / V) ^ 0.5) / sqrt(l));
elseif ((l * V) <= -5e-133)
tmp = c0 * (((l * V) / A) ^ -0.5);
elseif ((l * V) <= 0.0)
tmp = (c0 / sqrt(l)) / sqrt((V / A));
else
tmp = (c0 * ((l * V) ^ -0.5)) * 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], -2e+193], N[(c0 * N[(N[Power[N[(A / V), $MachinePrecision], 0.5], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], -5e-133], N[(c0 * N[Power[N[(N[(l * V), $MachinePrecision] / A), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 0.0], N[(N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(V / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(c0 * N[Power[N[(l * V), $MachinePrecision], -0.5], $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}\;\ell \cdot V \leq -2 \cdot 10^{+193}:\\
\;\;\;\;c0 \cdot \frac{{\left(\frac{A}{V}\right)}^{0.5}}{\sqrt{\ell}}\\
\mathbf{elif}\;\ell \cdot V \leq -5 \cdot 10^{-133}:\\
\;\;\;\;c0 \cdot {\left(\frac{\ell \cdot V}{A}\right)}^{-0.5}\\
\mathbf{elif}\;\ell \cdot V \leq 0:\\
\;\;\;\;\frac{\frac{c0}{\sqrt{\ell}}}{\sqrt{\frac{V}{A}}}\\
\mathbf{else}:\\
\;\;\;\;\left(c0 \cdot {\left(\ell \cdot V\right)}^{-0.5}\right) \cdot \sqrt{A}\\
\end{array}
\end{array}
if (*.f64 V l) < -2.00000000000000013e193Initial program 50.5%
associate-/r*N/A
sqrt-divN/A
/-lowering-/.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f6435.8%
Applied egg-rr35.8%
if -2.00000000000000013e193 < (*.f64 V l) < -4.9999999999999999e-133Initial program 90.8%
pow1/2N/A
clear-numN/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
metadata-eval73.1%
Applied egg-rr73.1%
associate-/r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f6493.7%
Applied egg-rr93.7%
if -4.9999999999999999e-133 < (*.f64 V l) < -0.0Initial program 49.4%
associate-/r*N/A
sqrt-divN/A
associate-*r/N/A
associate-*l/N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
/-lowering-/.f6433.4%
Applied egg-rr33.4%
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f6433.4%
Applied egg-rr33.4%
if -0.0 < (*.f64 V l) Initial program 79.4%
*-commutativeN/A
sqrt-divN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
div-invN/A
metadata-evalN/A
sqrt-divN/A
pow1/2N/A
*-lowering-*.f64N/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
sqrt-lowering-sqrt.f6489.7%
Applied egg-rr89.7%
Final simplification69.8%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (/ A (* l V))))
(if (<= t_0 1e-317)
(* c0 (/ (pow (/ A V) 0.5) (sqrt l)))
(if (<= t_0 5e+297)
(/ c0 (pow t_0 -0.5))
(/ (/ c0 (sqrt l)) (sqrt (/ 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 <= 1e-317) {
tmp = c0 * (pow((A / V), 0.5) / sqrt(l));
} else if (t_0 <= 5e+297) {
tmp = c0 / pow(t_0, -0.5);
} else {
tmp = (c0 / sqrt(l)) / sqrt((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 <= 1d-317) then
tmp = c0 * (((a / v) ** 0.5d0) / sqrt(l))
else if (t_0 <= 5d+297) then
tmp = c0 / (t_0 ** (-0.5d0))
else
tmp = (c0 / sqrt(l)) / sqrt((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 <= 1e-317) {
tmp = c0 * (Math.pow((A / V), 0.5) / Math.sqrt(l));
} else if (t_0 <= 5e+297) {
tmp = c0 / Math.pow(t_0, -0.5);
} else {
tmp = (c0 / Math.sqrt(l)) / Math.sqrt((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 <= 1e-317: tmp = c0 * (math.pow((A / V), 0.5) / math.sqrt(l)) elif t_0 <= 5e+297: tmp = c0 / math.pow(t_0, -0.5) else: tmp = (c0 / math.sqrt(l)) / math.sqrt((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 <= 1e-317) tmp = Float64(c0 * Float64((Float64(A / V) ^ 0.5) / sqrt(l))); elseif (t_0 <= 5e+297) tmp = Float64(c0 / (t_0 ^ -0.5)); else tmp = Float64(Float64(c0 / sqrt(l)) / sqrt(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 <= 1e-317)
tmp = c0 * (((A / V) ^ 0.5) / sqrt(l));
elseif (t_0 <= 5e+297)
tmp = c0 / (t_0 ^ -0.5);
else
tmp = (c0 / sqrt(l)) / sqrt((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, 1e-317], N[(c0 * N[(N[Power[N[(A / V), $MachinePrecision], 0.5], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+297], N[(c0 / N[Power[t$95$0, -0.5], $MachinePrecision]), $MachinePrecision], N[(N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(V / A), $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 10^{-317}:\\
\;\;\;\;c0 \cdot \frac{{\left(\frac{A}{V}\right)}^{0.5}}{\sqrt{\ell}}\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+297}:\\
\;\;\;\;\frac{c0}{{t\_0}^{-0.5}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{c0}{\sqrt{\ell}}}{\sqrt{\frac{V}{A}}}\\
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 1.00000023e-317Initial program 32.1%
associate-/r*N/A
sqrt-divN/A
/-lowering-/.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f6441.3%
Applied egg-rr41.3%
if 1.00000023e-317 < (/.f64 A (*.f64 V l)) < 4.9999999999999998e297Initial program 99.6%
pow1/2N/A
clear-numN/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
metadata-eval89.0%
Applied egg-rr89.0%
associate-/r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f6499.6%
Applied egg-rr99.6%
clear-numN/A
associate-/l/N/A
inv-powN/A
pow-powN/A
metadata-evalN/A
pow1/2N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
associate-/r/N/A
sqrt-unprodN/A
unpow1/2N/A
div-invN/A
/-lowering-/.f64N/A
pow1/2N/A
pow-prod-downN/A
associate-/r/N/A
clear-numN/A
inv-powN/A
pow-powN/A
metadata-evalN/A
pow-lowering-pow.f64N/A
Applied egg-rr99.6%
if 4.9999999999999998e297 < (/.f64 A (*.f64 V l)) Initial program 29.3%
associate-/r*N/A
sqrt-divN/A
associate-*r/N/A
associate-*l/N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
/-lowering-/.f6432.9%
Applied egg-rr32.9%
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f6432.9%
Applied egg-rr32.9%
Final simplification73.4%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. (FPCore (c0 A V l) :precision binary64 (let* ((t_0 (/ A (* l V))) (t_1 (/ (/ c0 (sqrt l)) (sqrt (/ V A))))) (if (<= t_0 1e-317) t_1 (if (<= t_0 5e+297) (/ c0 (pow t_0 -0.5)) t_1))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = A / (l * V);
double t_1 = (c0 / sqrt(l)) / sqrt((V / A));
double tmp;
if (t_0 <= 1e-317) {
tmp = t_1;
} else if (t_0 <= 5e+297) {
tmp = c0 / pow(t_0, -0.5);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = a / (l * v)
t_1 = (c0 / sqrt(l)) / sqrt((v / a))
if (t_0 <= 1d-317) then
tmp = t_1
else if (t_0 <= 5d+297) then
tmp = c0 / (t_0 ** (-0.5d0))
else
tmp = t_1
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 t_1 = (c0 / Math.sqrt(l)) / Math.sqrt((V / A));
double tmp;
if (t_0 <= 1e-317) {
tmp = t_1;
} else if (t_0 <= 5e+297) {
tmp = c0 / Math.pow(t_0, -0.5);
} else {
tmp = t_1;
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = A / (l * V) t_1 = (c0 / math.sqrt(l)) / math.sqrt((V / A)) tmp = 0 if t_0 <= 1e-317: tmp = t_1 elif t_0 <= 5e+297: tmp = c0 / math.pow(t_0, -0.5) else: tmp = t_1 return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = Float64(A / Float64(l * V)) t_1 = Float64(Float64(c0 / sqrt(l)) / sqrt(Float64(V / A))) tmp = 0.0 if (t_0 <= 1e-317) tmp = t_1; elseif (t_0 <= 5e+297) tmp = Float64(c0 / (t_0 ^ -0.5)); else tmp = t_1; 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);
t_1 = (c0 / sqrt(l)) / sqrt((V / A));
tmp = 0.0;
if (t_0 <= 1e-317)
tmp = t_1;
elseif (t_0 <= 5e+297)
tmp = c0 / (t_0 ^ -0.5);
else
tmp = t_1;
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]}, Block[{t$95$1 = N[(N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(V / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 1e-317], t$95$1, If[LessEqual[t$95$0, 5e+297], N[(c0 / N[Power[t$95$0, -0.5], $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \frac{A}{\ell \cdot V}\\
t_1 := \frac{\frac{c0}{\sqrt{\ell}}}{\sqrt{\frac{V}{A}}}\\
\mathbf{if}\;t\_0 \leq 10^{-317}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+297}:\\
\;\;\;\;\frac{c0}{{t\_0}^{-0.5}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 1.00000023e-317 or 4.9999999999999998e297 < (/.f64 A (*.f64 V l)) Initial program 30.7%
associate-/r*N/A
sqrt-divN/A
associate-*r/N/A
associate-*l/N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
/-lowering-/.f6436.9%
Applied egg-rr36.9%
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f6436.9%
Applied egg-rr36.9%
if 1.00000023e-317 < (/.f64 A (*.f64 V l)) < 4.9999999999999998e297Initial program 99.6%
pow1/2N/A
clear-numN/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
metadata-eval89.0%
Applied egg-rr89.0%
associate-/r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f6499.6%
Applied egg-rr99.6%
clear-numN/A
associate-/l/N/A
inv-powN/A
pow-powN/A
metadata-evalN/A
pow1/2N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
associate-/r/N/A
sqrt-unprodN/A
unpow1/2N/A
div-invN/A
/-lowering-/.f64N/A
pow1/2N/A
pow-prod-downN/A
associate-/r/N/A
clear-numN/A
inv-powN/A
pow-powN/A
metadata-evalN/A
pow-lowering-pow.f64N/A
Applied egg-rr99.6%
Final simplification73.4%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. (FPCore (c0 A V l) :precision binary64 (if (<= l -1e-310) (/ (* c0 (sqrt (- 0.0 (/ A V)))) (pow (- 0.0 l) 0.5)) (* c0 (/ (pow (/ A V) 0.5) (sqrt l)))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if (l <= -1e-310) {
tmp = (c0 * sqrt((0.0 - (A / V)))) / pow((0.0 - l), 0.5);
} else {
tmp = c0 * (pow((A / V), 0.5) / sqrt(l));
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: tmp
if (l <= (-1d-310)) then
tmp = (c0 * sqrt((0.0d0 - (a / v)))) / ((0.0d0 - l) ** 0.5d0)
else
tmp = c0 * (((a / v) ** 0.5d0) / sqrt(l))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if (l <= -1e-310) {
tmp = (c0 * Math.sqrt((0.0 - (A / V)))) / Math.pow((0.0 - l), 0.5);
} else {
tmp = c0 * (Math.pow((A / V), 0.5) / Math.sqrt(l));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if l <= -1e-310: tmp = (c0 * math.sqrt((0.0 - (A / V)))) / math.pow((0.0 - l), 0.5) else: tmp = c0 * (math.pow((A / V), 0.5) / math.sqrt(l)) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (l <= -1e-310) tmp = Float64(Float64(c0 * sqrt(Float64(0.0 - Float64(A / V)))) / (Float64(0.0 - l) ^ 0.5)); else tmp = Float64(c0 * Float64((Float64(A / V) ^ 0.5) / sqrt(l))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
tmp = 0.0;
if (l <= -1e-310)
tmp = (c0 * sqrt((0.0 - (A / V)))) / ((0.0 - l) ^ 0.5);
else
tmp = c0 * (((A / V) ^ 0.5) / sqrt(l));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := If[LessEqual[l, -1e-310], N[(N[(c0 * N[Sqrt[N[(0.0 - N[(A / V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Power[N[(0.0 - l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision], N[(c0 * N[(N[Power[N[(A / V), $MachinePrecision], 0.5], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1 \cdot 10^{-310}:\\
\;\;\;\;\frac{c0 \cdot \sqrt{0 - \frac{A}{V}}}{{\left(0 - \ell\right)}^{0.5}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{{\left(\frac{A}{V}\right)}^{0.5}}{\sqrt{\ell}}\\
\end{array}
\end{array}
if l < -9.999999999999969e-311Initial program 72.9%
*-commutativeN/A
associate-/r*N/A
frac-2negN/A
sqrt-divN/A
pow1/2N/A
pow1/2N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
pow-lowering-pow.f64N/A
neg-sub0N/A
--lowering--.f6483.9%
Applied egg-rr83.9%
sub0-negN/A
neg-lowering-neg.f6483.9%
Applied egg-rr83.9%
sub0-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f6483.9%
Applied egg-rr83.9%
if -9.999999999999969e-311 < l Initial program 68.7%
associate-/r*N/A
sqrt-divN/A
/-lowering-/.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f6478.6%
Applied egg-rr78.6%
Final simplification81.3%
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 -2e-310) (* c0 (* (sqrt (- 0.0 (/ A l))) (sqrt (/ -1.0 V)))) (* (pow (* l V) -0.5) (/ c0 (pow A -0.5)))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if (V <= -2e-310) {
tmp = c0 * (sqrt((0.0 - (A / l))) * sqrt((-1.0 / V)));
} else {
tmp = pow((l * V), -0.5) * (c0 / 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 (v <= (-2d-310)) then
tmp = c0 * (sqrt((0.0d0 - (a / l))) * sqrt(((-1.0d0) / v)))
else
tmp = ((l * v) ** (-0.5d0)) * (c0 / (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 (V <= -2e-310) {
tmp = c0 * (Math.sqrt((0.0 - (A / l))) * Math.sqrt((-1.0 / V)));
} else {
tmp = Math.pow((l * V), -0.5) * (c0 / 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 V <= -2e-310: tmp = c0 * (math.sqrt((0.0 - (A / l))) * math.sqrt((-1.0 / V))) else: tmp = math.pow((l * V), -0.5) * (c0 / 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 (V <= -2e-310) tmp = Float64(c0 * Float64(sqrt(Float64(0.0 - Float64(A / l))) * sqrt(Float64(-1.0 / V)))); else tmp = Float64((Float64(l * V) ^ -0.5) * Float64(c0 / (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 (V <= -2e-310)
tmp = c0 * (sqrt((0.0 - (A / l))) * sqrt((-1.0 / V)));
else
tmp = ((l * V) ^ -0.5) * (c0 / (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[V, -2e-310], N[(c0 * N[(N[Sqrt[N[(0.0 - N[(A / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(-1.0 / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(l * V), $MachinePrecision], -0.5], $MachinePrecision] * N[(c0 / 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}\;V \leq -2 \cdot 10^{-310}:\\
\;\;\;\;c0 \cdot \left(\sqrt{0 - \frac{A}{\ell}} \cdot \sqrt{\frac{-1}{V}}\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\ell \cdot V\right)}^{-0.5} \cdot \frac{c0}{{A}^{-0.5}}\\
\end{array}
\end{array}
if V < -1.999999999999994e-310Initial program 71.0%
frac-2negN/A
neg-mul-1N/A
distribute-rgt-neg-inN/A
times-fracN/A
sqrt-prodN/A
frac-2negN/A
metadata-evalN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
metadata-evalN/A
frac-2negN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
distribute-frac-neg2N/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f6482.0%
Applied egg-rr82.0%
if -1.999999999999994e-310 < V Initial program 70.7%
*-commutativeN/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
associate-*l/N/A
div-invN/A
sqrt-prodN/A
times-fracN/A
metadata-evalN/A
sqrt-divN/A
pow1/2N/A
*-lowering-*.f64N/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
/-lowering-/.f64N/A
inv-powN/A
sqrt-pow1N/A
metadata-evalN/A
metadata-evalN/A
pow-lowering-pow.f64N/A
metadata-eval39.5%
Applied egg-rr39.5%
Final simplification58.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 1e-317)
(* c0 (/ (/ A V) (sqrt (/ l (/ V A)))))
(if (<= t_0 2e+275)
(/ c0 (pow t_0 -0.5))
(* c0 (pow (/ V (/ A l)) -0.5))))))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 <= 1e-317) {
tmp = c0 * ((A / V) / sqrt((l / (V / A))));
} else if (t_0 <= 2e+275) {
tmp = c0 / pow(t_0, -0.5);
} else {
tmp = c0 * pow((V / (A / 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) :: t_0
real(8) :: tmp
t_0 = a / (l * v)
if (t_0 <= 1d-317) then
tmp = c0 * ((a / v) / sqrt((l / (v / a))))
else if (t_0 <= 2d+275) then
tmp = c0 / (t_0 ** (-0.5d0))
else
tmp = c0 * ((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 t_0 = A / (l * V);
double tmp;
if (t_0 <= 1e-317) {
tmp = c0 * ((A / V) / Math.sqrt((l / (V / A))));
} else if (t_0 <= 2e+275) {
tmp = c0 / Math.pow(t_0, -0.5);
} else {
tmp = c0 * Math.pow((V / (A / l)), -0.5);
}
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 <= 1e-317: tmp = c0 * ((A / V) / math.sqrt((l / (V / A)))) elif t_0 <= 2e+275: tmp = c0 / math.pow(t_0, -0.5) else: tmp = c0 * math.pow((V / (A / l)), -0.5) 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 <= 1e-317) tmp = Float64(c0 * Float64(Float64(A / V) / sqrt(Float64(l / Float64(V / A))))); elseif (t_0 <= 2e+275) tmp = Float64(c0 / (t_0 ^ -0.5)); else tmp = Float64(c0 * (Float64(V / Float64(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)
t_0 = A / (l * V);
tmp = 0.0;
if (t_0 <= 1e-317)
tmp = c0 * ((A / V) / sqrt((l / (V / A))));
elseif (t_0 <= 2e+275)
tmp = c0 / (t_0 ^ -0.5);
else
tmp = c0 * ((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_] := Block[{t$95$0 = N[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 1e-317], N[(c0 * N[(N[(A / V), $MachinePrecision] / N[Sqrt[N[(l / N[(V / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+275], N[(c0 / N[Power[t$95$0, -0.5], $MachinePrecision]), $MachinePrecision], N[(c0 * N[Power[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision], -0.5], $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 10^{-317}:\\
\;\;\;\;c0 \cdot \frac{\frac{A}{V}}{\sqrt{\frac{\ell}{\frac{V}{A}}}}\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+275}:\\
\;\;\;\;\frac{c0}{{t\_0}^{-0.5}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot {\left(\frac{V}{\frac{A}{\ell}}\right)}^{-0.5}\\
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 1.00000023e-317Initial program 32.1%
pow1/2N/A
clear-numN/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
metadata-eval43.7%
Applied egg-rr43.7%
Applied egg-rr31.2%
if 1.00000023e-317 < (/.f64 A (*.f64 V l)) < 1.99999999999999992e275Initial program 99.6%
pow1/2N/A
clear-numN/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
metadata-eval89.3%
Applied egg-rr89.3%
associate-/r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f6499.6%
Applied egg-rr99.6%
clear-numN/A
associate-/l/N/A
inv-powN/A
pow-powN/A
metadata-evalN/A
pow1/2N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
associate-/r/N/A
sqrt-unprodN/A
unpow1/2N/A
div-invN/A
/-lowering-/.f64N/A
pow1/2N/A
pow-prod-downN/A
associate-/r/N/A
clear-numN/A
inv-powN/A
pow-powN/A
metadata-evalN/A
pow-lowering-pow.f64N/A
Applied egg-rr99.6%
if 1.99999999999999992e275 < (/.f64 A (*.f64 V l)) Initial program 34.1%
pow1/2N/A
clear-numN/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
metadata-eval47.5%
Applied egg-rr47.5%
Final simplification73.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 (/ A (* l V))))
(if (<= t_0 1e-317)
(* (pow (* V (* A l)) -0.5) (* A c0))
(if (<= t_0 2e+275)
(/ c0 (pow t_0 -0.5))
(* c0 (pow (/ V (/ A l)) -0.5))))))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 <= 1e-317) {
tmp = pow((V * (A * l)), -0.5) * (A * c0);
} else if (t_0 <= 2e+275) {
tmp = c0 / pow(t_0, -0.5);
} else {
tmp = c0 * pow((V / (A / 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) :: t_0
real(8) :: tmp
t_0 = a / (l * v)
if (t_0 <= 1d-317) then
tmp = ((v * (a * l)) ** (-0.5d0)) * (a * c0)
else if (t_0 <= 2d+275) then
tmp = c0 / (t_0 ** (-0.5d0))
else
tmp = c0 * ((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 t_0 = A / (l * V);
double tmp;
if (t_0 <= 1e-317) {
tmp = Math.pow((V * (A * l)), -0.5) * (A * c0);
} else if (t_0 <= 2e+275) {
tmp = c0 / Math.pow(t_0, -0.5);
} else {
tmp = c0 * Math.pow((V / (A / l)), -0.5);
}
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 <= 1e-317: tmp = math.pow((V * (A * l)), -0.5) * (A * c0) elif t_0 <= 2e+275: tmp = c0 / math.pow(t_0, -0.5) else: tmp = c0 * math.pow((V / (A / l)), -0.5) 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 <= 1e-317) tmp = Float64((Float64(V * Float64(A * l)) ^ -0.5) * Float64(A * c0)); elseif (t_0 <= 2e+275) tmp = Float64(c0 / (t_0 ^ -0.5)); else tmp = Float64(c0 * (Float64(V / Float64(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)
t_0 = A / (l * V);
tmp = 0.0;
if (t_0 <= 1e-317)
tmp = ((V * (A * l)) ^ -0.5) * (A * c0);
elseif (t_0 <= 2e+275)
tmp = c0 / (t_0 ^ -0.5);
else
tmp = c0 * ((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_] := Block[{t$95$0 = N[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 1e-317], N[(N[Power[N[(V * N[(A * l), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(A * c0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+275], N[(c0 / N[Power[t$95$0, -0.5], $MachinePrecision]), $MachinePrecision], N[(c0 * N[Power[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision], -0.5], $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 10^{-317}:\\
\;\;\;\;{\left(V \cdot \left(A \cdot \ell\right)\right)}^{-0.5} \cdot \left(A \cdot c0\right)\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+275}:\\
\;\;\;\;\frac{c0}{{t\_0}^{-0.5}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot {\left(\frac{V}{\frac{A}{\ell}}\right)}^{-0.5}\\
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 1.00000023e-317Initial program 32.1%
pow1/2N/A
clear-numN/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
metadata-eval43.7%
Applied egg-rr43.7%
Applied egg-rr45.1%
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
inv-powN/A
sqrt-pow1N/A
metadata-evalN/A
pow-lowering-pow.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6444.7%
Applied egg-rr44.7%
if 1.00000023e-317 < (/.f64 A (*.f64 V l)) < 1.99999999999999992e275Initial program 99.6%
pow1/2N/A
clear-numN/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
metadata-eval89.3%
Applied egg-rr89.3%
associate-/r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f6499.6%
Applied egg-rr99.6%
clear-numN/A
associate-/l/N/A
inv-powN/A
pow-powN/A
metadata-evalN/A
pow1/2N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
associate-/r/N/A
sqrt-unprodN/A
unpow1/2N/A
div-invN/A
/-lowering-/.f64N/A
pow1/2N/A
pow-prod-downN/A
associate-/r/N/A
clear-numN/A
inv-powN/A
pow-powN/A
metadata-evalN/A
pow-lowering-pow.f64N/A
Applied egg-rr99.6%
if 1.99999999999999992e275 < (/.f64 A (*.f64 V l)) Initial program 34.1%
pow1/2N/A
clear-numN/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
metadata-eval47.5%
Applied egg-rr47.5%
Final simplification76.4%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (/ A (* l V))))
(if (<= t_0 1e-317)
(/ (* A c0) (sqrt (* V (* A l))))
(if (<= t_0 2e+275)
(/ c0 (pow t_0 -0.5))
(* c0 (pow (/ V (/ A l)) -0.5))))))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 <= 1e-317) {
tmp = (A * c0) / sqrt((V * (A * l)));
} else if (t_0 <= 2e+275) {
tmp = c0 / pow(t_0, -0.5);
} else {
tmp = c0 * pow((V / (A / 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) :: t_0
real(8) :: tmp
t_0 = a / (l * v)
if (t_0 <= 1d-317) then
tmp = (a * c0) / sqrt((v * (a * l)))
else if (t_0 <= 2d+275) then
tmp = c0 / (t_0 ** (-0.5d0))
else
tmp = c0 * ((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 t_0 = A / (l * V);
double tmp;
if (t_0 <= 1e-317) {
tmp = (A * c0) / Math.sqrt((V * (A * l)));
} else if (t_0 <= 2e+275) {
tmp = c0 / Math.pow(t_0, -0.5);
} else {
tmp = c0 * Math.pow((V / (A / l)), -0.5);
}
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 <= 1e-317: tmp = (A * c0) / math.sqrt((V * (A * l))) elif t_0 <= 2e+275: tmp = c0 / math.pow(t_0, -0.5) else: tmp = c0 * math.pow((V / (A / l)), -0.5) 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 <= 1e-317) tmp = Float64(Float64(A * c0) / sqrt(Float64(V * Float64(A * l)))); elseif (t_0 <= 2e+275) tmp = Float64(c0 / (t_0 ^ -0.5)); else tmp = Float64(c0 * (Float64(V / Float64(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)
t_0 = A / (l * V);
tmp = 0.0;
if (t_0 <= 1e-317)
tmp = (A * c0) / sqrt((V * (A * l)));
elseif (t_0 <= 2e+275)
tmp = c0 / (t_0 ^ -0.5);
else
tmp = c0 * ((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_] := Block[{t$95$0 = N[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 1e-317], N[(N[(A * c0), $MachinePrecision] / N[Sqrt[N[(V * N[(A * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+275], N[(c0 / N[Power[t$95$0, -0.5], $MachinePrecision]), $MachinePrecision], N[(c0 * N[Power[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision], -0.5], $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 10^{-317}:\\
\;\;\;\;\frac{A \cdot c0}{\sqrt{V \cdot \left(A \cdot \ell\right)}}\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+275}:\\
\;\;\;\;\frac{c0}{{t\_0}^{-0.5}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot {\left(\frac{V}{\frac{A}{\ell}}\right)}^{-0.5}\\
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 1.00000023e-317Initial program 32.1%
pow1/2N/A
clear-numN/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
metadata-eval43.7%
Applied egg-rr43.7%
Applied egg-rr45.1%
associate-*r*N/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6444.7%
Applied egg-rr44.7%
if 1.00000023e-317 < (/.f64 A (*.f64 V l)) < 1.99999999999999992e275Initial program 99.6%
pow1/2N/A
clear-numN/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
metadata-eval89.3%
Applied egg-rr89.3%
associate-/r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f6499.6%
Applied egg-rr99.6%
clear-numN/A
associate-/l/N/A
inv-powN/A
pow-powN/A
metadata-evalN/A
pow1/2N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
associate-/r/N/A
sqrt-unprodN/A
unpow1/2N/A
div-invN/A
/-lowering-/.f64N/A
pow1/2N/A
pow-prod-downN/A
associate-/r/N/A
clear-numN/A
inv-powN/A
pow-powN/A
metadata-evalN/A
pow-lowering-pow.f64N/A
Applied egg-rr99.6%
if 1.99999999999999992e275 < (/.f64 A (*.f64 V l)) Initial program 34.1%
pow1/2N/A
clear-numN/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
metadata-eval47.5%
Applied egg-rr47.5%
Final simplification76.4%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (/ A (* l V))))
(if (<= t_0 0.0)
(* c0 (sqrt (/ (/ 1.0 V) (/ l A))))
(if (<= t_0 2e+275)
(/ c0 (pow t_0 -0.5))
(* c0 (pow (/ V (/ A l)) -0.5))))))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(((1.0 / V) / (l / A)));
} else if (t_0 <= 2e+275) {
tmp = c0 / pow(t_0, -0.5);
} else {
tmp = c0 * pow((V / (A / 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) :: t_0
real(8) :: tmp
t_0 = a / (l * v)
if (t_0 <= 0.0d0) then
tmp = c0 * sqrt(((1.0d0 / v) / (l / a)))
else if (t_0 <= 2d+275) then
tmp = c0 / (t_0 ** (-0.5d0))
else
tmp = c0 * ((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 t_0 = A / (l * V);
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * Math.sqrt(((1.0 / V) / (l / A)));
} else if (t_0 <= 2e+275) {
tmp = c0 / Math.pow(t_0, -0.5);
} else {
tmp = c0 * Math.pow((V / (A / l)), -0.5);
}
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(((1.0 / V) / (l / A))) elif t_0 <= 2e+275: tmp = c0 / math.pow(t_0, -0.5) else: tmp = c0 * math.pow((V / (A / l)), -0.5) 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(1.0 / V) / Float64(l / A)))); elseif (t_0 <= 2e+275) tmp = Float64(c0 / (t_0 ^ -0.5)); else tmp = Float64(c0 * (Float64(V / Float64(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)
t_0 = A / (l * V);
tmp = 0.0;
if (t_0 <= 0.0)
tmp = c0 * sqrt(((1.0 / V) / (l / A)));
elseif (t_0 <= 2e+275)
tmp = c0 / (t_0 ^ -0.5);
else
tmp = c0 * ((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_] := Block[{t$95$0 = N[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], N[(c0 * N[Sqrt[N[(N[(1.0 / V), $MachinePrecision] / N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+275], N[(c0 / N[Power[t$95$0, -0.5], $MachinePrecision]), $MachinePrecision], N[(c0 * N[Power[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision], -0.5], $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{1}{V}}{\frac{\ell}{A}}}\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+275}:\\
\;\;\;\;\frac{c0}{{t\_0}^{-0.5}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot {\left(\frac{V}{\frac{A}{\ell}}\right)}^{-0.5}\\
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 0.0Initial program 31.5%
clear-numN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6446.4%
Applied egg-rr46.4%
if 0.0 < (/.f64 A (*.f64 V l)) < 1.99999999999999992e275Initial program 99.3%
pow1/2N/A
clear-numN/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
metadata-eval88.8%
Applied egg-rr88.8%
associate-/r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f6498.9%
Applied egg-rr98.9%
clear-numN/A
associate-/l/N/A
inv-powN/A
pow-powN/A
metadata-evalN/A
pow1/2N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
associate-/r/N/A
sqrt-unprodN/A
unpow1/2N/A
div-invN/A
/-lowering-/.f64N/A
pow1/2N/A
pow-prod-downN/A
associate-/r/N/A
clear-numN/A
inv-powN/A
pow-powN/A
metadata-evalN/A
pow-lowering-pow.f64N/A
Applied egg-rr99.4%
if 1.99999999999999992e275 < (/.f64 A (*.f64 V l)) Initial program 34.1%
pow1/2N/A
clear-numN/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
metadata-eval47.5%
Applied egg-rr47.5%
Final simplification76.9%
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 2e+275)
(/ c0 (pow t_0 -0.5))
(* c0 (pow (/ V (/ A l)) -0.5))))))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 <= 2e+275) {
tmp = c0 / pow(t_0, -0.5);
} else {
tmp = c0 * pow((V / (A / 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) :: 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 <= 2d+275) then
tmp = c0 / (t_0 ** (-0.5d0))
else
tmp = c0 * ((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 t_0 = A / (l * V);
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * Math.sqrt(((A / V) / l));
} else if (t_0 <= 2e+275) {
tmp = c0 / Math.pow(t_0, -0.5);
} else {
tmp = c0 * Math.pow((V / (A / l)), -0.5);
}
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 <= 2e+275: tmp = c0 / math.pow(t_0, -0.5) else: tmp = c0 * math.pow((V / (A / l)), -0.5) 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 <= 2e+275) tmp = Float64(c0 / (t_0 ^ -0.5)); else tmp = Float64(c0 * (Float64(V / Float64(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)
t_0 = A / (l * V);
tmp = 0.0;
if (t_0 <= 0.0)
tmp = c0 * sqrt(((A / V) / l));
elseif (t_0 <= 2e+275)
tmp = c0 / (t_0 ^ -0.5);
else
tmp = c0 * ((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_] := 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, 2e+275], N[(c0 / N[Power[t$95$0, -0.5], $MachinePrecision]), $MachinePrecision], N[(c0 * N[Power[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision], -0.5], $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 2 \cdot 10^{+275}:\\
\;\;\;\;\frac{c0}{{t\_0}^{-0.5}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot {\left(\frac{V}{\frac{A}{\ell}}\right)}^{-0.5}\\
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 0.0Initial program 31.5%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6446.4%
Applied egg-rr46.4%
if 0.0 < (/.f64 A (*.f64 V l)) < 1.99999999999999992e275Initial program 99.3%
pow1/2N/A
clear-numN/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
metadata-eval88.8%
Applied egg-rr88.8%
associate-/r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f6498.9%
Applied egg-rr98.9%
clear-numN/A
associate-/l/N/A
inv-powN/A
pow-powN/A
metadata-evalN/A
pow1/2N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
associate-/r/N/A
sqrt-unprodN/A
unpow1/2N/A
div-invN/A
/-lowering-/.f64N/A
pow1/2N/A
pow-prod-downN/A
associate-/r/N/A
clear-numN/A
inv-powN/A
pow-powN/A
metadata-evalN/A
pow-lowering-pow.f64N/A
Applied egg-rr99.4%
if 1.99999999999999992e275 < (/.f64 A (*.f64 V l)) Initial program 34.1%
pow1/2N/A
clear-numN/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
metadata-eval47.5%
Applied egg-rr47.5%
Final simplification76.9%
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+297) (* c0 (sqrt t_0)) (/ c0 (sqrt (* 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 <= 0.0) {
tmp = c0 * sqrt(((A / V) / l));
} else if (t_0 <= 5e+297) {
tmp = c0 * sqrt(t_0);
} else {
tmp = c0 / sqrt((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 <= 0.0d0) then
tmp = c0 * sqrt(((a / v) / l))
else if (t_0 <= 5d+297) then
tmp = c0 * sqrt(t_0)
else
tmp = c0 / sqrt((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 <= 0.0) {
tmp = c0 * Math.sqrt(((A / V) / l));
} else if (t_0 <= 5e+297) {
tmp = c0 * Math.sqrt(t_0);
} else {
tmp = c0 / Math.sqrt((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 <= 0.0: tmp = c0 * math.sqrt(((A / V) / l)) elif t_0 <= 5e+297: tmp = c0 * math.sqrt(t_0) else: tmp = c0 / math.sqrt((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 <= 0.0) tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); elseif (t_0 <= 5e+297) tmp = Float64(c0 * sqrt(t_0)); else tmp = Float64(c0 / sqrt(Float64(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 <= 0.0)
tmp = c0 * sqrt(((A / V) / l));
elseif (t_0 <= 5e+297)
tmp = c0 * sqrt(t_0);
else
tmp = c0 / sqrt((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, 0.0], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+297], N[(c0 * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision], N[(c0 / N[Sqrt[N[(l * 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 0:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+297}:\\
\;\;\;\;c0 \cdot \sqrt{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{\ell \cdot \frac{V}{A}}}\\
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 0.0Initial program 31.5%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6446.4%
Applied egg-rr46.4%
if 0.0 < (/.f64 A (*.f64 V l)) < 4.9999999999999998e297Initial program 99.4%
if 4.9999999999999998e297 < (/.f64 A (*.f64 V l)) Initial program 29.3%
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f6445.4%
Applied egg-rr45.4%
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f6448.3%
Applied egg-rr48.3%
Final simplification77.9%
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 70.8%
Final simplification70.8%
herbie shell --seed 2024161
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))