
(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 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (c0 A V l) :precision binary64 (* c0 (sqrt (/ A (* V l)))))
double code(double c0, double A, double V, double l) {
return c0 * sqrt((A / (V * l)));
}
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
code = c0 * sqrt((a / (v * l)))
end function
public static double code(double c0, double A, double V, double l) {
return c0 * Math.sqrt((A / (V * l)));
}
def code(c0, A, V, l): return c0 * math.sqrt((A / (V * l)))
function code(c0, A, V, l) return Float64(c0 * sqrt(Float64(A / Float64(V * l)))) end
function tmp = code(c0, A, V, l) tmp = c0 * sqrt((A / (V * l))); end
code[c0_, A_, V_, l_] := N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\end{array}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (sqrt (- 0.0 A))))
(if (<= (* V l) (- INFINITY))
(* (* (sqrt (/ -1.0 V)) t_0) (/ c0 (sqrt l)))
(if (<= (* V l) -1e-253)
(* c0 (* t_0 (sqrt (/ (/ -1.0 V) l))))
(if (<= (* V l) 1e-294)
(/ 1.0 (/ (sqrt (/ V (/ A l))) c0))
(if (<= (* V l) 1e+285)
(/ c0 (* (pow A -0.5) (sqrt (* V l))))
(* c0 (sqrt (/ (/ A V) l)))))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = sqrt((0.0 - A));
double tmp;
if ((V * l) <= -((double) INFINITY)) {
tmp = (sqrt((-1.0 / V)) * t_0) * (c0 / sqrt(l));
} else if ((V * l) <= -1e-253) {
tmp = c0 * (t_0 * sqrt(((-1.0 / V) / l)));
} else if ((V * l) <= 1e-294) {
tmp = 1.0 / (sqrt((V / (A / l))) / c0);
} else if ((V * l) <= 1e+285) {
tmp = c0 / (pow(A, -0.5) * sqrt((V * l)));
} else {
tmp = c0 * sqrt(((A / V) / l));
}
return tmp;
}
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = Math.sqrt((0.0 - A));
double tmp;
if ((V * l) <= -Double.POSITIVE_INFINITY) {
tmp = (Math.sqrt((-1.0 / V)) * t_0) * (c0 / Math.sqrt(l));
} else if ((V * l) <= -1e-253) {
tmp = c0 * (t_0 * Math.sqrt(((-1.0 / V) / l)));
} else if ((V * l) <= 1e-294) {
tmp = 1.0 / (Math.sqrt((V / (A / l))) / c0);
} else if ((V * l) <= 1e+285) {
tmp = c0 / (Math.pow(A, -0.5) * Math.sqrt((V * l)));
} else {
tmp = c0 * Math.sqrt(((A / V) / l));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = math.sqrt((0.0 - A)) tmp = 0 if (V * l) <= -math.inf: tmp = (math.sqrt((-1.0 / V)) * t_0) * (c0 / math.sqrt(l)) elif (V * l) <= -1e-253: tmp = c0 * (t_0 * math.sqrt(((-1.0 / V) / l))) elif (V * l) <= 1e-294: tmp = 1.0 / (math.sqrt((V / (A / l))) / c0) elif (V * l) <= 1e+285: tmp = c0 / (math.pow(A, -0.5) * math.sqrt((V * l))) else: tmp = c0 * math.sqrt(((A / V) / l)) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = sqrt(Float64(0.0 - A)) tmp = 0.0 if (Float64(V * l) <= Float64(-Inf)) tmp = Float64(Float64(sqrt(Float64(-1.0 / V)) * t_0) * Float64(c0 / sqrt(l))); elseif (Float64(V * l) <= -1e-253) tmp = Float64(c0 * Float64(t_0 * sqrt(Float64(Float64(-1.0 / V) / l)))); elseif (Float64(V * l) <= 1e-294) tmp = Float64(1.0 / Float64(sqrt(Float64(V / Float64(A / l))) / c0)); elseif (Float64(V * l) <= 1e+285) tmp = Float64(c0 / Float64((A ^ -0.5) * sqrt(Float64(V * l)))); else tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = sqrt((0.0 - A));
tmp = 0.0;
if ((V * l) <= -Inf)
tmp = (sqrt((-1.0 / V)) * t_0) * (c0 / sqrt(l));
elseif ((V * l) <= -1e-253)
tmp = c0 * (t_0 * sqrt(((-1.0 / V) / l)));
elseif ((V * l) <= 1e-294)
tmp = 1.0 / (sqrt((V / (A / l))) / c0);
elseif ((V * l) <= 1e+285)
tmp = c0 / ((A ^ -0.5) * sqrt((V * l)));
else
tmp = c0 * sqrt(((A / V) / l));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[Sqrt[N[(0.0 - A), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(V * l), $MachinePrecision], (-Infinity)], N[(N[(N[Sqrt[N[(-1.0 / V), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision] * N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -1e-253], N[(c0 * N[(t$95$0 * N[Sqrt[N[(N[(-1.0 / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 1e-294], N[(1.0 / N[(N[Sqrt[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / c0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 1e+285], N[(c0 / N[(N[Power[A, -0.5], $MachinePrecision] * N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \sqrt{0 - A}\\
\mathbf{if}\;V \cdot \ell \leq -\infty:\\
\;\;\;\;\left(\sqrt{\frac{-1}{V}} \cdot t\_0\right) \cdot \frac{c0}{\sqrt{\ell}}\\
\mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-253}:\\
\;\;\;\;c0 \cdot \left(t\_0 \cdot \sqrt{\frac{\frac{-1}{V}}{\ell}}\right)\\
\mathbf{elif}\;V \cdot \ell \leq 10^{-294}:\\
\;\;\;\;\frac{1}{\frac{\sqrt{\frac{V}{\frac{A}{\ell}}}}{c0}}\\
\mathbf{elif}\;V \cdot \ell \leq 10^{+285}:\\
\;\;\;\;\frac{c0}{{A}^{-0.5} \cdot \sqrt{V \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\end{array}
\end{array}
if (*.f64 V l) < -inf.0Initial program 45.9%
*-commutativeN/A
associate-/r*N/A
sqrt-divN/A
associate-*l/N/A
associate-*r/N/A
*-lowering-*.f64N/A
pow1/2N/A
clear-numN/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f6439.5%
Applied egg-rr39.5%
metadata-evalN/A
sqrt-pow1N/A
inv-powN/A
frac-2negN/A
associate-/r/N/A
sqrt-prodN/A
sub0-negN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
distribute-frac-neg2N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
sub0-negN/A
sqrt-lowering-sqrt.f64N/A
sub0-negN/A
--lowering--.f6447.6%
Applied egg-rr47.6%
if -inf.0 < (*.f64 V l) < -1.0000000000000001e-253Initial program 84.9%
clear-numN/A
*-commutativeN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6479.9%
Applied egg-rr79.9%
frac-2negN/A
associate-/r/N/A
sqrt-prodN/A
sub0-negN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
frac-2negN/A
remove-double-negN/A
/-lowering-/.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
sub0-negN/A
sqrt-lowering-sqrt.f64N/A
sub0-negN/A
--lowering--.f6499.4%
Applied egg-rr99.4%
associate-/l/N/A
associate-/r*N/A
frac-2negN/A
metadata-evalN/A
/-lowering-/.f64N/A
metadata-evalN/A
frac-2negN/A
/-lowering-/.f6499.3%
Applied egg-rr99.3%
if -1.0000000000000001e-253 < (*.f64 V l) < 1.00000000000000002e-294Initial program 52.8%
*-commutativeN/A
sqrt-divN/A
associate-*l/N/A
clear-numN/A
/-lowering-/.f64N/A
associate-/r*N/A
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f6468.0%
Applied egg-rr68.0%
if 1.00000000000000002e-294 < (*.f64 V l) < 9.9999999999999998e284Initial program 81.6%
clear-numN/A
*-commutativeN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6477.0%
Applied egg-rr77.0%
associate-/l/N/A
associate-/r/N/A
sqrt-divN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
associate-/r/N/A
sqrt-prodN/A
/-rgt-identityN/A
sqrt-prodN/A
associate-/r/N/A
sqrt-lowering-sqrt.f64N/A
clear-numN/A
associate-/r*N/A
div-invN/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f6477.2%
Applied egg-rr77.2%
clear-numN/A
associate-/l/N/A
associate-/r/N/A
*-commutativeN/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
inv-powN/A
pow-powN/A
metadata-evalN/A
metadata-evalN/A
pow-lowering-pow.f64N/A
metadata-evalN/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f6499.5%
Applied egg-rr99.5%
if 9.9999999999999998e284 < (*.f64 V l) Initial program 38.2%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6485.9%
Applied egg-rr85.9%
Final simplification89.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 (* V l))))))
(if (<= t_0 1e-142)
(* c0 (sqrt (/ (/ 1.0 l) (/ V A))))
(if (<= t_0 2e+134) t_0 (/ 1.0 (/ (sqrt (/ l (/ A V))) c0))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = c0 * sqrt((A / (V * l)));
double tmp;
if (t_0 <= 1e-142) {
tmp = c0 * sqrt(((1.0 / l) / (V / A)));
} else if (t_0 <= 2e+134) {
tmp = t_0;
} else {
tmp = 1.0 / (sqrt((l / (A / V))) / c0);
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: tmp
t_0 = c0 * sqrt((a / (v * l)))
if (t_0 <= 1d-142) then
tmp = c0 * sqrt(((1.0d0 / l) / (v / a)))
else if (t_0 <= 2d+134) then
tmp = t_0
else
tmp = 1.0d0 / (sqrt((l / (a / v))) / c0)
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = c0 * Math.sqrt((A / (V * l)));
double tmp;
if (t_0 <= 1e-142) {
tmp = c0 * Math.sqrt(((1.0 / l) / (V / A)));
} else if (t_0 <= 2e+134) {
tmp = t_0;
} else {
tmp = 1.0 / (Math.sqrt((l / (A / V))) / c0);
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = c0 * math.sqrt((A / (V * l))) tmp = 0 if t_0 <= 1e-142: tmp = c0 * math.sqrt(((1.0 / l) / (V / A))) elif t_0 <= 2e+134: tmp = t_0 else: tmp = 1.0 / (math.sqrt((l / (A / V))) / c0) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = Float64(c0 * sqrt(Float64(A / Float64(V * l)))) tmp = 0.0 if (t_0 <= 1e-142) tmp = Float64(c0 * sqrt(Float64(Float64(1.0 / l) / Float64(V / A)))); elseif (t_0 <= 2e+134) tmp = t_0; else tmp = Float64(1.0 / Float64(sqrt(Float64(l / Float64(A / V))) / c0)); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = c0 * sqrt((A / (V * l)));
tmp = 0.0;
if (t_0 <= 1e-142)
tmp = c0 * sqrt(((1.0 / l) / (V / A)));
elseif (t_0 <= 2e+134)
tmp = t_0;
else
tmp = 1.0 / (sqrt((l / (A / V))) / c0);
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 1e-142], N[(c0 * N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / N[(V / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+134], t$95$0, N[(1.0 / N[(N[Sqrt[N[(l / N[(A / V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / c0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\
\mathbf{if}\;t\_0 \leq 10^{-142}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{1}{\ell}}{\frac{V}{A}}}\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+134}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\sqrt{\frac{\ell}{\frac{A}{V}}}}{c0}}\\
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1e-142Initial program 69.8%
clear-numN/A
*-commutativeN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6476.9%
Applied egg-rr76.9%
if 1e-142 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1.99999999999999984e134Initial program 99.5%
if 1.99999999999999984e134 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 66.4%
clear-numN/A
*-commutativeN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6471.0%
Applied egg-rr71.0%
associate-/l/N/A
associate-/r/N/A
sqrt-divN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
associate-/r/N/A
sqrt-prodN/A
/-rgt-identityN/A
sqrt-prodN/A
associate-/r/N/A
sqrt-lowering-sqrt.f64N/A
clear-numN/A
associate-/r*N/A
div-invN/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f6472.7%
Applied egg-rr72.7%
clear-numN/A
associate-/r/N/A
clear-numN/A
*-lowering-*.f64N/A
/-lowering-/.f6472.7%
Applied egg-rr72.7%
clear-numN/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-/r/N/A
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f6472.7%
Applied egg-rr72.7%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (* c0 (sqrt (/ A (* V l))))))
(if (<= t_0 1e-209)
(/ c0 (sqrt (/ l (/ A V))))
(if (<= t_0 2e+134)
(* c0 (sqrt (/ A (/ l (/ 1.0 V)))))
(/ 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 = c0 * sqrt((A / (V * l)));
double tmp;
if (t_0 <= 1e-209) {
tmp = c0 / sqrt((l / (A / V)));
} else if (t_0 <= 2e+134) {
tmp = c0 * sqrt((A / (l / (1.0 / V))));
} 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 = c0 * sqrt((a / (v * l)))
if (t_0 <= 1d-209) then
tmp = c0 / sqrt((l / (a / v)))
else if (t_0 <= 2d+134) then
tmp = c0 * sqrt((a / (l / (1.0d0 / v))))
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 = c0 * Math.sqrt((A / (V * l)));
double tmp;
if (t_0 <= 1e-209) {
tmp = c0 / Math.sqrt((l / (A / V)));
} else if (t_0 <= 2e+134) {
tmp = c0 * Math.sqrt((A / (l / (1.0 / V))));
} 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 = c0 * math.sqrt((A / (V * l))) tmp = 0 if t_0 <= 1e-209: tmp = c0 / math.sqrt((l / (A / V))) elif t_0 <= 2e+134: tmp = c0 * math.sqrt((A / (l / (1.0 / V)))) 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(c0 * sqrt(Float64(A / Float64(V * l)))) tmp = 0.0 if (t_0 <= 1e-209) tmp = Float64(c0 / sqrt(Float64(l / Float64(A / V)))); elseif (t_0 <= 2e+134) tmp = Float64(c0 * sqrt(Float64(A / Float64(l / Float64(1.0 / V))))); 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 = c0 * sqrt((A / (V * l)));
tmp = 0.0;
if (t_0 <= 1e-209)
tmp = c0 / sqrt((l / (A / V)));
elseif (t_0 <= 2e+134)
tmp = c0 * sqrt((A / (l / (1.0 / V))));
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[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 1e-209], N[(c0 / N[Sqrt[N[(l / N[(A / V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+134], N[(c0 * N[Sqrt[N[(A / N[(l / N[(1.0 / V), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $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 := c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\
\mathbf{if}\;t\_0 \leq 10^{-209}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{\ell}{\frac{A}{V}}}}\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+134}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{A}{\frac{\ell}{\frac{1}{V}}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{\ell \cdot \frac{V}{A}}}\\
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1e-209Initial program 68.8%
clear-numN/A
*-commutativeN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6476.1%
Applied egg-rr76.1%
associate-/l/N/A
associate-/r/N/A
sqrt-divN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
associate-/r/N/A
sqrt-prodN/A
/-rgt-identityN/A
sqrt-prodN/A
associate-/r/N/A
sqrt-lowering-sqrt.f64N/A
clear-numN/A
associate-/r*N/A
div-invN/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f6475.2%
Applied egg-rr75.2%
if 1e-209 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1.99999999999999984e134Initial program 99.5%
*-commutativeN/A
/-rgt-identityN/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f6499.4%
Applied egg-rr99.4%
if 1.99999999999999984e134 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 66.4%
clear-numN/A
*-commutativeN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6471.0%
Applied egg-rr71.0%
associate-/l/N/A
associate-/r/N/A
sqrt-divN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
associate-/r/N/A
sqrt-prodN/A
/-rgt-identityN/A
sqrt-prodN/A
associate-/r/N/A
sqrt-lowering-sqrt.f64N/A
clear-numN/A
associate-/r*N/A
div-invN/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f6472.7%
Applied egg-rr72.7%
clear-numN/A
associate-/r/N/A
clear-numN/A
*-lowering-*.f64N/A
/-lowering-/.f6472.7%
Applied egg-rr72.7%
Final simplification78.2%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (* c0 (sqrt (/ A (* V l))))))
(if (<= t_0 1e-142)
(* c0 (sqrt (/ (/ 1.0 l) (/ V A))))
(if (<= t_0 1e+145) 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 = c0 * sqrt((A / (V * l)));
double tmp;
if (t_0 <= 1e-142) {
tmp = c0 * sqrt(((1.0 / l) / (V / A)));
} else if (t_0 <= 1e+145) {
tmp = 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 = c0 * sqrt((a / (v * l)))
if (t_0 <= 1d-142) then
tmp = c0 * sqrt(((1.0d0 / l) / (v / a)))
else if (t_0 <= 1d+145) then
tmp = 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 = c0 * Math.sqrt((A / (V * l)));
double tmp;
if (t_0 <= 1e-142) {
tmp = c0 * Math.sqrt(((1.0 / l) / (V / A)));
} else if (t_0 <= 1e+145) {
tmp = 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 = c0 * math.sqrt((A / (V * l))) tmp = 0 if t_0 <= 1e-142: tmp = c0 * math.sqrt(((1.0 / l) / (V / A))) elif t_0 <= 1e+145: tmp = 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(c0 * sqrt(Float64(A / Float64(V * l)))) tmp = 0.0 if (t_0 <= 1e-142) tmp = Float64(c0 * sqrt(Float64(Float64(1.0 / l) / Float64(V / A)))); elseif (t_0 <= 1e+145) tmp = 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 = c0 * sqrt((A / (V * l)));
tmp = 0.0;
if (t_0 <= 1e-142)
tmp = c0 * sqrt(((1.0 / l) / (V / A)));
elseif (t_0 <= 1e+145)
tmp = 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[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 1e-142], N[(c0 * N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / N[(V / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+145], t$95$0, 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 := c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\
\mathbf{if}\;t\_0 \leq 10^{-142}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{1}{\ell}}{\frac{V}{A}}}\\
\mathbf{elif}\;t\_0 \leq 10^{+145}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{\ell \cdot \frac{V}{A}}}\\
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1e-142Initial program 69.8%
clear-numN/A
*-commutativeN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6476.9%
Applied egg-rr76.9%
if 1e-142 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 9.9999999999999999e144Initial program 99.5%
if 9.9999999999999999e144 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 66.4%
clear-numN/A
*-commutativeN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6471.0%
Applied egg-rr71.0%
associate-/l/N/A
associate-/r/N/A
sqrt-divN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
associate-/r/N/A
sqrt-prodN/A
/-rgt-identityN/A
sqrt-prodN/A
associate-/r/N/A
sqrt-lowering-sqrt.f64N/A
clear-numN/A
associate-/r*N/A
div-invN/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f6472.7%
Applied egg-rr72.7%
clear-numN/A
associate-/r/N/A
clear-numN/A
*-lowering-*.f64N/A
/-lowering-/.f6472.7%
Applied egg-rr72.7%
Final simplification78.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 (* c0 (sqrt (/ A (* V l))))))
(if (<= t_0 5e-252)
(/ c0 (sqrt (/ l (/ A V))))
(if (<= t_0 1e+145) 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 = c0 * sqrt((A / (V * l)));
double tmp;
if (t_0 <= 5e-252) {
tmp = c0 / sqrt((l / (A / V)));
} else if (t_0 <= 1e+145) {
tmp = 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 = c0 * sqrt((a / (v * l)))
if (t_0 <= 5d-252) then
tmp = c0 / sqrt((l / (a / v)))
else if (t_0 <= 1d+145) then
tmp = 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 = c0 * Math.sqrt((A / (V * l)));
double tmp;
if (t_0 <= 5e-252) {
tmp = c0 / Math.sqrt((l / (A / V)));
} else if (t_0 <= 1e+145) {
tmp = 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 = c0 * math.sqrt((A / (V * l))) tmp = 0 if t_0 <= 5e-252: tmp = c0 / math.sqrt((l / (A / V))) elif t_0 <= 1e+145: tmp = 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(c0 * sqrt(Float64(A / Float64(V * l)))) tmp = 0.0 if (t_0 <= 5e-252) tmp = Float64(c0 / sqrt(Float64(l / Float64(A / V)))); elseif (t_0 <= 1e+145) tmp = 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 = c0 * sqrt((A / (V * l)));
tmp = 0.0;
if (t_0 <= 5e-252)
tmp = c0 / sqrt((l / (A / V)));
elseif (t_0 <= 1e+145)
tmp = 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[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 5e-252], N[(c0 / N[Sqrt[N[(l / N[(A / V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+145], t$95$0, 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 := c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\
\mathbf{if}\;t\_0 \leq 5 \cdot 10^{-252}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{\ell}{\frac{A}{V}}}}\\
\mathbf{elif}\;t\_0 \leq 10^{+145}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{\ell \cdot \frac{V}{A}}}\\
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 5.00000000000000008e-252Initial program 68.5%
clear-numN/A
*-commutativeN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6475.8%
Applied egg-rr75.8%
associate-/l/N/A
associate-/r/N/A
sqrt-divN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
associate-/r/N/A
sqrt-prodN/A
/-rgt-identityN/A
sqrt-prodN/A
associate-/r/N/A
sqrt-lowering-sqrt.f64N/A
clear-numN/A
associate-/r*N/A
div-invN/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f6474.9%
Applied egg-rr74.9%
if 5.00000000000000008e-252 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 9.9999999999999999e144Initial program 99.5%
if 9.9999999999999999e144 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 66.4%
clear-numN/A
*-commutativeN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6471.0%
Applied egg-rr71.0%
associate-/l/N/A
associate-/r/N/A
sqrt-divN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
associate-/r/N/A
sqrt-prodN/A
/-rgt-identityN/A
sqrt-prodN/A
associate-/r/N/A
sqrt-lowering-sqrt.f64N/A
clear-numN/A
associate-/r*N/A
div-invN/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f6472.7%
Applied egg-rr72.7%
clear-numN/A
associate-/r/N/A
clear-numN/A
*-lowering-*.f64N/A
/-lowering-/.f6472.7%
Applied egg-rr72.7%
Final simplification78.2%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (* c0 (sqrt (/ A (* V l))))))
(if (<= t_0 5e-252)
(/ c0 (sqrt (/ V (/ A l))))
(if (<= t_0 1e+145) 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 = c0 * sqrt((A / (V * l)));
double tmp;
if (t_0 <= 5e-252) {
tmp = c0 / sqrt((V / (A / l)));
} else if (t_0 <= 1e+145) {
tmp = 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 = c0 * sqrt((a / (v * l)))
if (t_0 <= 5d-252) then
tmp = c0 / sqrt((v / (a / l)))
else if (t_0 <= 1d+145) then
tmp = 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 = c0 * Math.sqrt((A / (V * l)));
double tmp;
if (t_0 <= 5e-252) {
tmp = c0 / Math.sqrt((V / (A / l)));
} else if (t_0 <= 1e+145) {
tmp = 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 = c0 * math.sqrt((A / (V * l))) tmp = 0 if t_0 <= 5e-252: tmp = c0 / math.sqrt((V / (A / l))) elif t_0 <= 1e+145: tmp = 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(c0 * sqrt(Float64(A / Float64(V * l)))) tmp = 0.0 if (t_0 <= 5e-252) tmp = Float64(c0 / sqrt(Float64(V / Float64(A / l)))); elseif (t_0 <= 1e+145) tmp = 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 = c0 * sqrt((A / (V * l)));
tmp = 0.0;
if (t_0 <= 5e-252)
tmp = c0 / sqrt((V / (A / l)));
elseif (t_0 <= 1e+145)
tmp = 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[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 5e-252], N[(c0 / N[Sqrt[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+145], t$95$0, 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 := c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\
\mathbf{if}\;t\_0 \leq 5 \cdot 10^{-252}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}\\
\mathbf{elif}\;t\_0 \leq 10^{+145}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{\ell \cdot \frac{V}{A}}}\\
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 5.00000000000000008e-252Initial program 68.5%
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-/.f6472.7%
Applied egg-rr72.7%
if 5.00000000000000008e-252 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 9.9999999999999999e144Initial program 99.5%
if 9.9999999999999999e144 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 66.4%
clear-numN/A
*-commutativeN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6471.0%
Applied egg-rr71.0%
associate-/l/N/A
associate-/r/N/A
sqrt-divN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
associate-/r/N/A
sqrt-prodN/A
/-rgt-identityN/A
sqrt-prodN/A
associate-/r/N/A
sqrt-lowering-sqrt.f64N/A
clear-numN/A
associate-/r*N/A
div-invN/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f6472.7%
Applied egg-rr72.7%
clear-numN/A
associate-/r/N/A
clear-numN/A
*-lowering-*.f64N/A
/-lowering-/.f6472.7%
Applied egg-rr72.7%
Final simplification76.7%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. (FPCore (c0 A V l) :precision binary64 (let* ((t_0 (* c0 (sqrt (/ A (* V l))))) (t_1 (/ c0 (sqrt (* l (/ V A)))))) (if (<= t_0 1e-154) t_1 (if (<= t_0 1e+145) 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 / (V * l)));
double t_1 = c0 / sqrt((l * (V / A)));
double tmp;
if (t_0 <= 1e-154) {
tmp = t_1;
} else if (t_0 <= 1e+145) {
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 / (v * l)))
t_1 = c0 / sqrt((l * (v / a)))
if (t_0 <= 1d-154) then
tmp = t_1
else if (t_0 <= 1d+145) 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 / (V * l)));
double t_1 = c0 / Math.sqrt((l * (V / A)));
double tmp;
if (t_0 <= 1e-154) {
tmp = t_1;
} else if (t_0 <= 1e+145) {
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 / (V * l))) t_1 = c0 / math.sqrt((l * (V / A))) tmp = 0 if t_0 <= 1e-154: tmp = t_1 elif t_0 <= 1e+145: 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(V * l)))) t_1 = Float64(c0 / sqrt(Float64(l * Float64(V / A)))) tmp = 0.0 if (t_0 <= 1e-154) tmp = t_1; elseif (t_0 <= 1e+145) 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 / (V * l)));
t_1 = c0 / sqrt((l * (V / A)));
tmp = 0.0;
if (t_0 <= 1e-154)
tmp = t_1;
elseif (t_0 <= 1e+145)
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[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(c0 / N[Sqrt[N[(l * N[(V / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 1e-154], t$95$1, If[LessEqual[t$95$0, 1e+145], 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}{V \cdot \ell}}\\
t_1 := \frac{c0}{\sqrt{\ell \cdot \frac{V}{A}}}\\
\mathbf{if}\;t\_0 \leq 10^{-154}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq 10^{+145}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 9.9999999999999997e-155 or 9.9999999999999999e144 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 68.9%
clear-numN/A
*-commutativeN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6475.6%
Applied egg-rr75.6%
associate-/l/N/A
associate-/r/N/A
sqrt-divN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
associate-/r/N/A
sqrt-prodN/A
/-rgt-identityN/A
sqrt-prodN/A
associate-/r/N/A
sqrt-lowering-sqrt.f64N/A
clear-numN/A
associate-/r*N/A
div-invN/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f6475.2%
Applied egg-rr75.2%
clear-numN/A
associate-/r/N/A
clear-numN/A
*-lowering-*.f64N/A
/-lowering-/.f6475.6%
Applied egg-rr75.6%
if 9.9999999999999997e-155 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 9.9999999999999999e144Initial program 99.5%
Final simplification78.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 (* V l))))))
(if (<= t_0 0.0)
(* c0 (sqrt (/ (/ A l) V)))
(if (<= t_0 2e+134) t_0 (* c0 (sqrt (/ (/ A V) l)))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = c0 * sqrt((A / (V * l)));
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * sqrt(((A / l) / V));
} else if (t_0 <= 2e+134) {
tmp = t_0;
} else {
tmp = c0 * sqrt(((A / V) / l));
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: tmp
t_0 = c0 * sqrt((a / (v * l)))
if (t_0 <= 0.0d0) then
tmp = c0 * sqrt(((a / l) / v))
else if (t_0 <= 2d+134) then
tmp = t_0
else
tmp = c0 * sqrt(((a / v) / l))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = c0 * Math.sqrt((A / (V * l)));
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * Math.sqrt(((A / l) / V));
} else if (t_0 <= 2e+134) {
tmp = t_0;
} else {
tmp = c0 * Math.sqrt(((A / V) / l));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = c0 * math.sqrt((A / (V * l))) tmp = 0 if t_0 <= 0.0: tmp = c0 * math.sqrt(((A / l) / V)) elif t_0 <= 2e+134: tmp = t_0 else: tmp = c0 * math.sqrt(((A / V) / 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(V * l)))) tmp = 0.0 if (t_0 <= 0.0) tmp = Float64(c0 * sqrt(Float64(Float64(A / l) / V))); elseif (t_0 <= 2e+134) tmp = t_0; else tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = c0 * sqrt((A / (V * l)));
tmp = 0.0;
if (t_0 <= 0.0)
tmp = c0 * sqrt(((A / l) / V));
elseif (t_0 <= 2e+134)
tmp = t_0;
else
tmp = c0 * sqrt(((A / V) / l));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], N[(c0 * N[Sqrt[N[(N[(A / l), $MachinePrecision] / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+134], t$95$0, N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+134}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 0.0Initial program 68.3%
associate-/l/N/A
/-lowering-/.f64N/A
/-lowering-/.f6472.5%
Applied egg-rr72.5%
if 0.0 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1.99999999999999984e134Initial program 99.5%
if 1.99999999999999984e134 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 66.4%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6471.1%
Applied egg-rr71.1%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. (FPCore (c0 A V l) :precision binary64 (let* ((t_0 (* c0 (sqrt (/ A (* V l))))) (t_1 (* c0 (sqrt (/ (/ A V) l))))) (if (<= t_0 5e-252) t_1 (if (<= t_0 2e+134) 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 / (V * l)));
double t_1 = c0 * sqrt(((A / V) / l));
double tmp;
if (t_0 <= 5e-252) {
tmp = t_1;
} else if (t_0 <= 2e+134) {
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 / (v * l)))
t_1 = c0 * sqrt(((a / v) / l))
if (t_0 <= 5d-252) then
tmp = t_1
else if (t_0 <= 2d+134) 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 / (V * l)));
double t_1 = c0 * Math.sqrt(((A / V) / l));
double tmp;
if (t_0 <= 5e-252) {
tmp = t_1;
} else if (t_0 <= 2e+134) {
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 / (V * l))) t_1 = c0 * math.sqrt(((A / V) / l)) tmp = 0 if t_0 <= 5e-252: tmp = t_1 elif t_0 <= 2e+134: 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(V * l)))) t_1 = Float64(c0 * sqrt(Float64(Float64(A / V) / l))) tmp = 0.0 if (t_0 <= 5e-252) tmp = t_1; elseif (t_0 <= 2e+134) 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 / (V * l)));
t_1 = c0 * sqrt(((A / V) / l));
tmp = 0.0;
if (t_0 <= 5e-252)
tmp = t_1;
elseif (t_0 <= 2e+134)
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[(V * l), $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, 5e-252], t$95$1, If[LessEqual[t$95$0, 2e+134], 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}{V \cdot \ell}}\\
t_1 := c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{if}\;t\_0 \leq 5 \cdot 10^{-252}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+134}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 5.00000000000000008e-252 or 1.99999999999999984e134 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 68.1%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6474.5%
Applied egg-rr74.5%
if 5.00000000000000008e-252 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1.99999999999999984e134Initial program 99.5%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. (FPCore (c0 A V l) :precision binary64 (if (<= V -5e-310) (/ c0 (* (sqrt (/ l (- 0.0 A))) (sqrt (- 0.0 V)))) (/ (/ (* c0 (sqrt A)) (sqrt l)) (sqrt V))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if (V <= -5e-310) {
tmp = c0 / (sqrt((l / (0.0 - A))) * sqrt((0.0 - V)));
} else {
tmp = ((c0 * sqrt(A)) / sqrt(l)) / sqrt(V);
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: tmp
if (v <= (-5d-310)) then
tmp = c0 / (sqrt((l / (0.0d0 - a))) * sqrt((0.0d0 - v)))
else
tmp = ((c0 * sqrt(a)) / sqrt(l)) / sqrt(v)
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if (V <= -5e-310) {
tmp = c0 / (Math.sqrt((l / (0.0 - A))) * Math.sqrt((0.0 - V)));
} else {
tmp = ((c0 * Math.sqrt(A)) / Math.sqrt(l)) / Math.sqrt(V);
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if V <= -5e-310: tmp = c0 / (math.sqrt((l / (0.0 - A))) * math.sqrt((0.0 - V))) else: tmp = ((c0 * math.sqrt(A)) / math.sqrt(l)) / math.sqrt(V) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (V <= -5e-310) tmp = Float64(c0 / Float64(sqrt(Float64(l / Float64(0.0 - A))) * sqrt(Float64(0.0 - V)))); else tmp = Float64(Float64(Float64(c0 * sqrt(A)) / sqrt(l)) / sqrt(V)); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
tmp = 0.0;
if (V <= -5e-310)
tmp = c0 / (sqrt((l / (0.0 - A))) * sqrt((0.0 - V)));
else
tmp = ((c0 * sqrt(A)) / sqrt(l)) / sqrt(V);
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := If[LessEqual[V, -5e-310], N[(c0 / N[(N[Sqrt[N[(l / N[(0.0 - A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(0.0 - V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(c0 * N[Sqrt[A], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] / N[Sqrt[V], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{\ell}{0 - A}} \cdot \sqrt{0 - V}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{c0 \cdot \sqrt{A}}{\sqrt{\ell}}}{\sqrt{V}}\\
\end{array}
\end{array}
if V < -4.999999999999985e-310Initial program 72.6%
clear-numN/A
*-commutativeN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6476.4%
Applied egg-rr76.4%
associate-/l/N/A
associate-/r/N/A
sqrt-divN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
associate-/r/N/A
sqrt-prodN/A
/-rgt-identityN/A
sqrt-prodN/A
associate-/r/N/A
sqrt-lowering-sqrt.f64N/A
clear-numN/A
associate-/r*N/A
div-invN/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f6476.1%
Applied egg-rr76.1%
frac-2negN/A
associate-/r/N/A
sqrt-prodN/A
distribute-frac-neg2N/A
*-lowering-*.f64N/A
distribute-frac-neg2N/A
sqrt-lowering-sqrt.f64N/A
distribute-frac-neg2N/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f6486.5%
Applied egg-rr86.5%
if -4.999999999999985e-310 < V Initial program 72.9%
*-commutativeN/A
associate-/l/N/A
sqrt-divN/A
pow1/2N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f6483.0%
Applied egg-rr83.0%
sqrt-divN/A
associate-*l/N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6450.0%
Applied egg-rr50.0%
Final simplification68.4%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(if (<= (* V l) (- INFINITY))
(* c0 (* (sqrt (/ -1.0 V)) (sqrt (- 0.0 (/ A l)))))
(if (<= (* V l) -1e-253)
(* c0 (* (sqrt (- 0.0 A)) (sqrt (/ (/ -1.0 V) l))))
(if (<= (* V l) 1e-294)
(/ 1.0 (/ (sqrt (/ V (/ A l))) c0))
(if (<= (* V l) 1e+285)
(/ c0 (* (pow A -0.5) (sqrt (* V l))))
(* c0 (sqrt (/ (/ A V) l))))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -((double) INFINITY)) {
tmp = c0 * (sqrt((-1.0 / V)) * sqrt((0.0 - (A / l))));
} else if ((V * l) <= -1e-253) {
tmp = c0 * (sqrt((0.0 - A)) * sqrt(((-1.0 / V) / l)));
} else if ((V * l) <= 1e-294) {
tmp = 1.0 / (sqrt((V / (A / l))) / c0);
} else if ((V * l) <= 1e+285) {
tmp = c0 / (pow(A, -0.5) * sqrt((V * l)));
} else {
tmp = c0 * sqrt(((A / V) / l));
}
return tmp;
}
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -Double.POSITIVE_INFINITY) {
tmp = c0 * (Math.sqrt((-1.0 / V)) * Math.sqrt((0.0 - (A / l))));
} else if ((V * l) <= -1e-253) {
tmp = c0 * (Math.sqrt((0.0 - A)) * Math.sqrt(((-1.0 / V) / l)));
} else if ((V * l) <= 1e-294) {
tmp = 1.0 / (Math.sqrt((V / (A / l))) / c0);
} else if ((V * l) <= 1e+285) {
tmp = c0 / (Math.pow(A, -0.5) * Math.sqrt((V * l)));
} else {
tmp = c0 * Math.sqrt(((A / V) / l));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if (V * l) <= -math.inf: tmp = c0 * (math.sqrt((-1.0 / V)) * math.sqrt((0.0 - (A / l)))) elif (V * l) <= -1e-253: tmp = c0 * (math.sqrt((0.0 - A)) * math.sqrt(((-1.0 / V) / l))) elif (V * l) <= 1e-294: tmp = 1.0 / (math.sqrt((V / (A / l))) / c0) elif (V * l) <= 1e+285: tmp = c0 / (math.pow(A, -0.5) * math.sqrt((V * l))) else: tmp = c0 * math.sqrt(((A / V) / l)) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (Float64(V * l) <= Float64(-Inf)) tmp = Float64(c0 * Float64(sqrt(Float64(-1.0 / V)) * sqrt(Float64(0.0 - Float64(A / l))))); elseif (Float64(V * l) <= -1e-253) tmp = Float64(c0 * Float64(sqrt(Float64(0.0 - A)) * sqrt(Float64(Float64(-1.0 / V) / l)))); elseif (Float64(V * l) <= 1e-294) tmp = Float64(1.0 / Float64(sqrt(Float64(V / Float64(A / l))) / c0)); elseif (Float64(V * l) <= 1e+285) tmp = Float64(c0 / Float64((A ^ -0.5) * sqrt(Float64(V * l)))); else tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
tmp = 0.0;
if ((V * l) <= -Inf)
tmp = c0 * (sqrt((-1.0 / V)) * sqrt((0.0 - (A / l))));
elseif ((V * l) <= -1e-253)
tmp = c0 * (sqrt((0.0 - A)) * sqrt(((-1.0 / V) / l)));
elseif ((V * l) <= 1e-294)
tmp = 1.0 / (sqrt((V / (A / l))) / c0);
elseif ((V * l) <= 1e+285)
tmp = c0 / ((A ^ -0.5) * sqrt((V * l)));
else
tmp = c0 * sqrt(((A / V) / l));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := If[LessEqual[N[(V * l), $MachinePrecision], (-Infinity)], N[(c0 * N[(N[Sqrt[N[(-1.0 / V), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(0.0 - N[(A / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -1e-253], N[(c0 * N[(N[Sqrt[N[(0.0 - A), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(N[(-1.0 / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 1e-294], N[(1.0 / N[(N[Sqrt[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / c0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 1e+285], N[(c0 / N[(N[Power[A, -0.5], $MachinePrecision] * N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -\infty:\\
\;\;\;\;c0 \cdot \left(\sqrt{\frac{-1}{V}} \cdot \sqrt{0 - \frac{A}{\ell}}\right)\\
\mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-253}:\\
\;\;\;\;c0 \cdot \left(\sqrt{0 - A} \cdot \sqrt{\frac{\frac{-1}{V}}{\ell}}\right)\\
\mathbf{elif}\;V \cdot \ell \leq 10^{-294}:\\
\;\;\;\;\frac{1}{\frac{\sqrt{\frac{V}{\frac{A}{\ell}}}}{c0}}\\
\mathbf{elif}\;V \cdot \ell \leq 10^{+285}:\\
\;\;\;\;\frac{c0}{{A}^{-0.5} \cdot \sqrt{V \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\end{array}
\end{array}
if (*.f64 V l) < -inf.0Initial program 45.9%
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
remove-double-negN/A
frac-2negN/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f6443.6%
Applied egg-rr43.6%
if -inf.0 < (*.f64 V l) < -1.0000000000000001e-253Initial program 84.9%
clear-numN/A
*-commutativeN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6479.9%
Applied egg-rr79.9%
frac-2negN/A
associate-/r/N/A
sqrt-prodN/A
sub0-negN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
frac-2negN/A
remove-double-negN/A
/-lowering-/.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
sub0-negN/A
sqrt-lowering-sqrt.f64N/A
sub0-negN/A
--lowering--.f6499.4%
Applied egg-rr99.4%
associate-/l/N/A
associate-/r*N/A
frac-2negN/A
metadata-evalN/A
/-lowering-/.f64N/A
metadata-evalN/A
frac-2negN/A
/-lowering-/.f6499.3%
Applied egg-rr99.3%
if -1.0000000000000001e-253 < (*.f64 V l) < 1.00000000000000002e-294Initial program 52.8%
*-commutativeN/A
sqrt-divN/A
associate-*l/N/A
clear-numN/A
/-lowering-/.f64N/A
associate-/r*N/A
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f6468.0%
Applied egg-rr68.0%
if 1.00000000000000002e-294 < (*.f64 V l) < 9.9999999999999998e284Initial program 81.6%
clear-numN/A
*-commutativeN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6477.0%
Applied egg-rr77.0%
associate-/l/N/A
associate-/r/N/A
sqrt-divN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
associate-/r/N/A
sqrt-prodN/A
/-rgt-identityN/A
sqrt-prodN/A
associate-/r/N/A
sqrt-lowering-sqrt.f64N/A
clear-numN/A
associate-/r*N/A
div-invN/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f6477.2%
Applied egg-rr77.2%
clear-numN/A
associate-/l/N/A
associate-/r/N/A
*-commutativeN/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
inv-powN/A
pow-powN/A
metadata-evalN/A
metadata-evalN/A
pow-lowering-pow.f64N/A
metadata-evalN/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f6499.5%
Applied egg-rr99.5%
if 9.9999999999999998e284 < (*.f64 V l) Initial program 38.2%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6485.9%
Applied egg-rr85.9%
Final simplification89.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 l) -1e+293)
(* c0 (* (sqrt (/ -1.0 V)) (sqrt (- 0.0 (/ A l)))))
(if (<= (* V l) -1e-272)
(* (sqrt (- 0.0 A)) (/ c0 (sqrt (- 0.0 (* V l)))))
(if (<= (* V l) 5e-315)
(/ 1.0 (/ (sqrt (* l (/ V A))) c0))
(if (<= (* V l) 1e+285)
(/ c0 (* (pow A -0.5) (sqrt (* V l))))
(* c0 (sqrt (/ (/ A V) l))))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -1e+293) {
tmp = c0 * (sqrt((-1.0 / V)) * sqrt((0.0 - (A / l))));
} else if ((V * l) <= -1e-272) {
tmp = sqrt((0.0 - A)) * (c0 / sqrt((0.0 - (V * l))));
} else if ((V * l) <= 5e-315) {
tmp = 1.0 / (sqrt((l * (V / A))) / c0);
} else if ((V * l) <= 1e+285) {
tmp = c0 / (pow(A, -0.5) * sqrt((V * l)));
} else {
tmp = c0 * sqrt(((A / V) / l));
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: tmp
if ((v * l) <= (-1d+293)) then
tmp = c0 * (sqrt(((-1.0d0) / v)) * sqrt((0.0d0 - (a / l))))
else if ((v * l) <= (-1d-272)) then
tmp = sqrt((0.0d0 - a)) * (c0 / sqrt((0.0d0 - (v * l))))
else if ((v * l) <= 5d-315) then
tmp = 1.0d0 / (sqrt((l * (v / a))) / c0)
else if ((v * l) <= 1d+285) then
tmp = c0 / ((a ** (-0.5d0)) * sqrt((v * l)))
else
tmp = c0 * sqrt(((a / v) / l))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -1e+293) {
tmp = c0 * (Math.sqrt((-1.0 / V)) * Math.sqrt((0.0 - (A / l))));
} else if ((V * l) <= -1e-272) {
tmp = Math.sqrt((0.0 - A)) * (c0 / Math.sqrt((0.0 - (V * l))));
} else if ((V * l) <= 5e-315) {
tmp = 1.0 / (Math.sqrt((l * (V / A))) / c0);
} else if ((V * l) <= 1e+285) {
tmp = c0 / (Math.pow(A, -0.5) * Math.sqrt((V * l)));
} else {
tmp = c0 * Math.sqrt(((A / V) / l));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if (V * l) <= -1e+293: tmp = c0 * (math.sqrt((-1.0 / V)) * math.sqrt((0.0 - (A / l)))) elif (V * l) <= -1e-272: tmp = math.sqrt((0.0 - A)) * (c0 / math.sqrt((0.0 - (V * l)))) elif (V * l) <= 5e-315: tmp = 1.0 / (math.sqrt((l * (V / A))) / c0) elif (V * l) <= 1e+285: tmp = c0 / (math.pow(A, -0.5) * math.sqrt((V * l))) else: tmp = c0 * math.sqrt(((A / V) / l)) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (Float64(V * l) <= -1e+293) tmp = Float64(c0 * Float64(sqrt(Float64(-1.0 / V)) * sqrt(Float64(0.0 - Float64(A / l))))); elseif (Float64(V * l) <= -1e-272) tmp = Float64(sqrt(Float64(0.0 - A)) * Float64(c0 / sqrt(Float64(0.0 - Float64(V * l))))); elseif (Float64(V * l) <= 5e-315) tmp = Float64(1.0 / Float64(sqrt(Float64(l * Float64(V / A))) / c0)); elseif (Float64(V * l) <= 1e+285) tmp = Float64(c0 / Float64((A ^ -0.5) * sqrt(Float64(V * l)))); else tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
tmp = 0.0;
if ((V * l) <= -1e+293)
tmp = c0 * (sqrt((-1.0 / V)) * sqrt((0.0 - (A / l))));
elseif ((V * l) <= -1e-272)
tmp = sqrt((0.0 - A)) * (c0 / sqrt((0.0 - (V * l))));
elseif ((V * l) <= 5e-315)
tmp = 1.0 / (sqrt((l * (V / A))) / c0);
elseif ((V * l) <= 1e+285)
tmp = c0 / ((A ^ -0.5) * sqrt((V * l)));
else
tmp = c0 * sqrt(((A / V) / l));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := If[LessEqual[N[(V * l), $MachinePrecision], -1e+293], N[(c0 * N[(N[Sqrt[N[(-1.0 / V), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(0.0 - N[(A / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -1e-272], N[(N[Sqrt[N[(0.0 - A), $MachinePrecision]], $MachinePrecision] * N[(c0 / N[Sqrt[N[(0.0 - N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 5e-315], N[(1.0 / N[(N[Sqrt[N[(l * N[(V / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / c0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 1e+285], N[(c0 / N[(N[Power[A, -0.5], $MachinePrecision] * N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -1 \cdot 10^{+293}:\\
\;\;\;\;c0 \cdot \left(\sqrt{\frac{-1}{V}} \cdot \sqrt{0 - \frac{A}{\ell}}\right)\\
\mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-272}:\\
\;\;\;\;\sqrt{0 - A} \cdot \frac{c0}{\sqrt{0 - V \cdot \ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{-315}:\\
\;\;\;\;\frac{1}{\frac{\sqrt{\ell \cdot \frac{V}{A}}}{c0}}\\
\mathbf{elif}\;V \cdot \ell \leq 10^{+285}:\\
\;\;\;\;\frac{c0}{{A}^{-0.5} \cdot \sqrt{V \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\end{array}
\end{array}
if (*.f64 V l) < -9.9999999999999992e292Initial program 48.1%
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
remove-double-negN/A
frac-2negN/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f6445.9%
Applied egg-rr45.9%
if -9.9999999999999992e292 < (*.f64 V l) < -9.9999999999999993e-273Initial program 84.9%
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
frac-2negN/A
sqrt-divN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f6498.4%
Applied egg-rr98.4%
sub0-negN/A
*-commutativeN/A
distribute-lft-neg-outN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6498.4%
Applied egg-rr98.4%
if -9.9999999999999993e-273 < (*.f64 V l) < 5.0000000023e-315Initial program 48.3%
*-commutativeN/A
sqrt-divN/A
associate-*l/N/A
clear-numN/A
/-lowering-/.f64N/A
associate-/r*N/A
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f6468.0%
Applied egg-rr68.0%
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f6468.1%
Applied egg-rr68.1%
if 5.0000000023e-315 < (*.f64 V l) < 9.9999999999999998e284Initial program 82.0%
clear-numN/A
*-commutativeN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6477.5%
Applied egg-rr77.5%
associate-/l/N/A
associate-/r/N/A
sqrt-divN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
associate-/r/N/A
sqrt-prodN/A
/-rgt-identityN/A
sqrt-prodN/A
associate-/r/N/A
sqrt-lowering-sqrt.f64N/A
clear-numN/A
associate-/r*N/A
div-invN/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f6477.8%
Applied egg-rr77.8%
clear-numN/A
associate-/l/N/A
associate-/r/N/A
*-commutativeN/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
inv-powN/A
pow-powN/A
metadata-evalN/A
metadata-evalN/A
pow-lowering-pow.f64N/A
metadata-evalN/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f6499.5%
Applied egg-rr99.5%
if 9.9999999999999998e284 < (*.f64 V l) Initial program 38.2%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6485.9%
Applied egg-rr85.9%
Final simplification89.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 l) -1e+293)
(/ 1.0 (/ (/ (sqrt l) (pow (/ A V) 0.5)) c0))
(if (<= (* V l) -1e-272)
(* (sqrt (- 0.0 A)) (/ c0 (sqrt (- 0.0 (* V l)))))
(if (<= (* V l) 5e-315)
(/ 1.0 (/ (sqrt (* l (/ V A))) c0))
(if (<= (* V l) 1e+285)
(/ c0 (* (pow A -0.5) (sqrt (* V l))))
(* c0 (sqrt (/ (/ A V) l))))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -1e+293) {
tmp = 1.0 / ((sqrt(l) / pow((A / V), 0.5)) / c0);
} else if ((V * l) <= -1e-272) {
tmp = sqrt((0.0 - A)) * (c0 / sqrt((0.0 - (V * l))));
} else if ((V * l) <= 5e-315) {
tmp = 1.0 / (sqrt((l * (V / A))) / c0);
} else if ((V * l) <= 1e+285) {
tmp = c0 / (pow(A, -0.5) * sqrt((V * l)));
} else {
tmp = c0 * sqrt(((A / V) / l));
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: tmp
if ((v * l) <= (-1d+293)) then
tmp = 1.0d0 / ((sqrt(l) / ((a / v) ** 0.5d0)) / c0)
else if ((v * l) <= (-1d-272)) then
tmp = sqrt((0.0d0 - a)) * (c0 / sqrt((0.0d0 - (v * l))))
else if ((v * l) <= 5d-315) then
tmp = 1.0d0 / (sqrt((l * (v / a))) / c0)
else if ((v * l) <= 1d+285) then
tmp = c0 / ((a ** (-0.5d0)) * sqrt((v * l)))
else
tmp = c0 * sqrt(((a / v) / l))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -1e+293) {
tmp = 1.0 / ((Math.sqrt(l) / Math.pow((A / V), 0.5)) / c0);
} else if ((V * l) <= -1e-272) {
tmp = Math.sqrt((0.0 - A)) * (c0 / Math.sqrt((0.0 - (V * l))));
} else if ((V * l) <= 5e-315) {
tmp = 1.0 / (Math.sqrt((l * (V / A))) / c0);
} else if ((V * l) <= 1e+285) {
tmp = c0 / (Math.pow(A, -0.5) * Math.sqrt((V * l)));
} else {
tmp = c0 * Math.sqrt(((A / V) / l));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if (V * l) <= -1e+293: tmp = 1.0 / ((math.sqrt(l) / math.pow((A / V), 0.5)) / c0) elif (V * l) <= -1e-272: tmp = math.sqrt((0.0 - A)) * (c0 / math.sqrt((0.0 - (V * l)))) elif (V * l) <= 5e-315: tmp = 1.0 / (math.sqrt((l * (V / A))) / c0) elif (V * l) <= 1e+285: tmp = c0 / (math.pow(A, -0.5) * math.sqrt((V * l))) else: tmp = c0 * math.sqrt(((A / V) / l)) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (Float64(V * l) <= -1e+293) tmp = Float64(1.0 / Float64(Float64(sqrt(l) / (Float64(A / V) ^ 0.5)) / c0)); elseif (Float64(V * l) <= -1e-272) tmp = Float64(sqrt(Float64(0.0 - A)) * Float64(c0 / sqrt(Float64(0.0 - Float64(V * l))))); elseif (Float64(V * l) <= 5e-315) tmp = Float64(1.0 / Float64(sqrt(Float64(l * Float64(V / A))) / c0)); elseif (Float64(V * l) <= 1e+285) tmp = Float64(c0 / Float64((A ^ -0.5) * sqrt(Float64(V * l)))); else tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
tmp = 0.0;
if ((V * l) <= -1e+293)
tmp = 1.0 / ((sqrt(l) / ((A / V) ^ 0.5)) / c0);
elseif ((V * l) <= -1e-272)
tmp = sqrt((0.0 - A)) * (c0 / sqrt((0.0 - (V * l))));
elseif ((V * l) <= 5e-315)
tmp = 1.0 / (sqrt((l * (V / A))) / c0);
elseif ((V * l) <= 1e+285)
tmp = c0 / ((A ^ -0.5) * sqrt((V * l)));
else
tmp = c0 * sqrt(((A / V) / l));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := If[LessEqual[N[(V * l), $MachinePrecision], -1e+293], N[(1.0 / N[(N[(N[Sqrt[l], $MachinePrecision] / N[Power[N[(A / V), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] / c0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -1e-272], N[(N[Sqrt[N[(0.0 - A), $MachinePrecision]], $MachinePrecision] * N[(c0 / N[Sqrt[N[(0.0 - N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 5e-315], N[(1.0 / N[(N[Sqrt[N[(l * N[(V / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / c0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 1e+285], N[(c0 / N[(N[Power[A, -0.5], $MachinePrecision] * N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -1 \cdot 10^{+293}:\\
\;\;\;\;\frac{1}{\frac{\frac{\sqrt{\ell}}{{\left(\frac{A}{V}\right)}^{0.5}}}{c0}}\\
\mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-272}:\\
\;\;\;\;\sqrt{0 - A} \cdot \frac{c0}{\sqrt{0 - V \cdot \ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{-315}:\\
\;\;\;\;\frac{1}{\frac{\sqrt{\ell \cdot \frac{V}{A}}}{c0}}\\
\mathbf{elif}\;V \cdot \ell \leq 10^{+285}:\\
\;\;\;\;\frac{c0}{{A}^{-0.5} \cdot \sqrt{V \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\end{array}
\end{array}
if (*.f64 V l) < -9.9999999999999992e292Initial program 48.1%
*-commutativeN/A
sqrt-divN/A
associate-*l/N/A
clear-numN/A
/-lowering-/.f64N/A
associate-/r*N/A
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f6476.1%
Applied egg-rr76.1%
associate-/r/N/A
sqrt-prodN/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
pow1/2N/A
associate-/r/N/A
clear-numN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f6442.0%
Applied egg-rr42.0%
if -9.9999999999999992e292 < (*.f64 V l) < -9.9999999999999993e-273Initial program 84.9%
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
frac-2negN/A
sqrt-divN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f6498.4%
Applied egg-rr98.4%
sub0-negN/A
*-commutativeN/A
distribute-lft-neg-outN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6498.4%
Applied egg-rr98.4%
if -9.9999999999999993e-273 < (*.f64 V l) < 5.0000000023e-315Initial program 48.3%
*-commutativeN/A
sqrt-divN/A
associate-*l/N/A
clear-numN/A
/-lowering-/.f64N/A
associate-/r*N/A
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f6468.0%
Applied egg-rr68.0%
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f6468.1%
Applied egg-rr68.1%
if 5.0000000023e-315 < (*.f64 V l) < 9.9999999999999998e284Initial program 82.0%
clear-numN/A
*-commutativeN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6477.5%
Applied egg-rr77.5%
associate-/l/N/A
associate-/r/N/A
sqrt-divN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
associate-/r/N/A
sqrt-prodN/A
/-rgt-identityN/A
sqrt-prodN/A
associate-/r/N/A
sqrt-lowering-sqrt.f64N/A
clear-numN/A
associate-/r*N/A
div-invN/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f6477.8%
Applied egg-rr77.8%
clear-numN/A
associate-/l/N/A
associate-/r/N/A
*-commutativeN/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
inv-powN/A
pow-powN/A
metadata-evalN/A
metadata-evalN/A
pow-lowering-pow.f64N/A
metadata-evalN/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f6499.5%
Applied egg-rr99.5%
if 9.9999999999999998e284 < (*.f64 V l) Initial program 38.2%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6485.9%
Applied egg-rr85.9%
Final simplification88.9%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(if (<= (* V l) -1e+293)
(/ c0 (/ (sqrt l) (sqrt (/ A V))))
(if (<= (* V l) -1e-272)
(* (sqrt (- 0.0 A)) (/ c0 (sqrt (- 0.0 (* V l)))))
(if (<= (* V l) 5e-315)
(/ 1.0 (/ (sqrt (* l (/ V A))) c0))
(if (<= (* V l) 1e+285)
(/ c0 (* (pow A -0.5) (sqrt (* V l))))
(* c0 (sqrt (/ (/ A V) l))))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -1e+293) {
tmp = c0 / (sqrt(l) / sqrt((A / V)));
} else if ((V * l) <= -1e-272) {
tmp = sqrt((0.0 - A)) * (c0 / sqrt((0.0 - (V * l))));
} else if ((V * l) <= 5e-315) {
tmp = 1.0 / (sqrt((l * (V / A))) / c0);
} else if ((V * l) <= 1e+285) {
tmp = c0 / (pow(A, -0.5) * sqrt((V * l)));
} else {
tmp = c0 * sqrt(((A / V) / l));
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: tmp
if ((v * l) <= (-1d+293)) then
tmp = c0 / (sqrt(l) / sqrt((a / v)))
else if ((v * l) <= (-1d-272)) then
tmp = sqrt((0.0d0 - a)) * (c0 / sqrt((0.0d0 - (v * l))))
else if ((v * l) <= 5d-315) then
tmp = 1.0d0 / (sqrt((l * (v / a))) / c0)
else if ((v * l) <= 1d+285) then
tmp = c0 / ((a ** (-0.5d0)) * sqrt((v * l)))
else
tmp = c0 * sqrt(((a / v) / l))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -1e+293) {
tmp = c0 / (Math.sqrt(l) / Math.sqrt((A / V)));
} else if ((V * l) <= -1e-272) {
tmp = Math.sqrt((0.0 - A)) * (c0 / Math.sqrt((0.0 - (V * l))));
} else if ((V * l) <= 5e-315) {
tmp = 1.0 / (Math.sqrt((l * (V / A))) / c0);
} else if ((V * l) <= 1e+285) {
tmp = c0 / (Math.pow(A, -0.5) * Math.sqrt((V * l)));
} else {
tmp = c0 * Math.sqrt(((A / V) / l));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if (V * l) <= -1e+293: tmp = c0 / (math.sqrt(l) / math.sqrt((A / V))) elif (V * l) <= -1e-272: tmp = math.sqrt((0.0 - A)) * (c0 / math.sqrt((0.0 - (V * l)))) elif (V * l) <= 5e-315: tmp = 1.0 / (math.sqrt((l * (V / A))) / c0) elif (V * l) <= 1e+285: tmp = c0 / (math.pow(A, -0.5) * math.sqrt((V * l))) else: tmp = c0 * math.sqrt(((A / V) / l)) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (Float64(V * l) <= -1e+293) tmp = Float64(c0 / Float64(sqrt(l) / sqrt(Float64(A / V)))); elseif (Float64(V * l) <= -1e-272) tmp = Float64(sqrt(Float64(0.0 - A)) * Float64(c0 / sqrt(Float64(0.0 - Float64(V * l))))); elseif (Float64(V * l) <= 5e-315) tmp = Float64(1.0 / Float64(sqrt(Float64(l * Float64(V / A))) / c0)); elseif (Float64(V * l) <= 1e+285) tmp = Float64(c0 / Float64((A ^ -0.5) * sqrt(Float64(V * l)))); else tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
tmp = 0.0;
if ((V * l) <= -1e+293)
tmp = c0 / (sqrt(l) / sqrt((A / V)));
elseif ((V * l) <= -1e-272)
tmp = sqrt((0.0 - A)) * (c0 / sqrt((0.0 - (V * l))));
elseif ((V * l) <= 5e-315)
tmp = 1.0 / (sqrt((l * (V / A))) / c0);
elseif ((V * l) <= 1e+285)
tmp = c0 / ((A ^ -0.5) * sqrt((V * l)));
else
tmp = c0 * sqrt(((A / V) / l));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := If[LessEqual[N[(V * l), $MachinePrecision], -1e+293], N[(c0 / N[(N[Sqrt[l], $MachinePrecision] / N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -1e-272], N[(N[Sqrt[N[(0.0 - A), $MachinePrecision]], $MachinePrecision] * N[(c0 / N[Sqrt[N[(0.0 - N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 5e-315], N[(1.0 / N[(N[Sqrt[N[(l * N[(V / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / c0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 1e+285], N[(c0 / N[(N[Power[A, -0.5], $MachinePrecision] * N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -1 \cdot 10^{+293}:\\
\;\;\;\;\frac{c0}{\frac{\sqrt{\ell}}{\sqrt{\frac{A}{V}}}}\\
\mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-272}:\\
\;\;\;\;\sqrt{0 - A} \cdot \frac{c0}{\sqrt{0 - V \cdot \ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{-315}:\\
\;\;\;\;\frac{1}{\frac{\sqrt{\ell \cdot \frac{V}{A}}}{c0}}\\
\mathbf{elif}\;V \cdot \ell \leq 10^{+285}:\\
\;\;\;\;\frac{c0}{{A}^{-0.5} \cdot \sqrt{V \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\end{array}
\end{array}
if (*.f64 V l) < -9.9999999999999992e292Initial program 48.1%
clear-numN/A
*-commutativeN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6476.0%
Applied egg-rr76.0%
associate-/l/N/A
associate-/r/N/A
sqrt-divN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
associate-/r/N/A
sqrt-prodN/A
/-rgt-identityN/A
sqrt-prodN/A
associate-/r/N/A
sqrt-lowering-sqrt.f64N/A
clear-numN/A
associate-/r*N/A
div-invN/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f6476.1%
Applied egg-rr76.1%
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f6442.0%
Applied egg-rr42.0%
if -9.9999999999999992e292 < (*.f64 V l) < -9.9999999999999993e-273Initial program 84.9%
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
frac-2negN/A
sqrt-divN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f6498.4%
Applied egg-rr98.4%
sub0-negN/A
*-commutativeN/A
distribute-lft-neg-outN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6498.4%
Applied egg-rr98.4%
if -9.9999999999999993e-273 < (*.f64 V l) < 5.0000000023e-315Initial program 48.3%
*-commutativeN/A
sqrt-divN/A
associate-*l/N/A
clear-numN/A
/-lowering-/.f64N/A
associate-/r*N/A
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f6468.0%
Applied egg-rr68.0%
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f6468.1%
Applied egg-rr68.1%
if 5.0000000023e-315 < (*.f64 V l) < 9.9999999999999998e284Initial program 82.0%
clear-numN/A
*-commutativeN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6477.5%
Applied egg-rr77.5%
associate-/l/N/A
associate-/r/N/A
sqrt-divN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
associate-/r/N/A
sqrt-prodN/A
/-rgt-identityN/A
sqrt-prodN/A
associate-/r/N/A
sqrt-lowering-sqrt.f64N/A
clear-numN/A
associate-/r*N/A
div-invN/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f6477.8%
Applied egg-rr77.8%
clear-numN/A
associate-/l/N/A
associate-/r/N/A
*-commutativeN/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
inv-powN/A
pow-powN/A
metadata-evalN/A
metadata-evalN/A
pow-lowering-pow.f64N/A
metadata-evalN/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f6499.5%
Applied egg-rr99.5%
if 9.9999999999999998e284 < (*.f64 V l) Initial program 38.2%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6485.9%
Applied egg-rr85.9%
Final simplification88.9%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(if (<= (* V l) -5e+220)
(* (/ c0 (sqrt l)) (sqrt (/ A V)))
(if (<= (* V l) -1e-176)
(* c0 (sqrt (/ A (* V l))))
(if (<= (* V l) 1e-294)
(/ 1.0 (/ (sqrt (/ V (/ A l))) c0))
(if (<= (* V l) 4e+283)
(* c0 (/ (sqrt A) (sqrt (* V l))))
(/ c0 (sqrt (/ l (/ A V)))))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -5e+220) {
tmp = (c0 / sqrt(l)) * sqrt((A / V));
} else if ((V * l) <= -1e-176) {
tmp = c0 * sqrt((A / (V * l)));
} else if ((V * l) <= 1e-294) {
tmp = 1.0 / (sqrt((V / (A / l))) / c0);
} else if ((V * l) <= 4e+283) {
tmp = c0 * (sqrt(A) / sqrt((V * l)));
} else {
tmp = c0 / sqrt((l / (A / V)));
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: tmp
if ((v * l) <= (-5d+220)) then
tmp = (c0 / sqrt(l)) * sqrt((a / v))
else if ((v * l) <= (-1d-176)) then
tmp = c0 * sqrt((a / (v * l)))
else if ((v * l) <= 1d-294) then
tmp = 1.0d0 / (sqrt((v / (a / l))) / c0)
else if ((v * l) <= 4d+283) then
tmp = c0 * (sqrt(a) / sqrt((v * l)))
else
tmp = c0 / sqrt((l / (a / v)))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -5e+220) {
tmp = (c0 / Math.sqrt(l)) * Math.sqrt((A / V));
} else if ((V * l) <= -1e-176) {
tmp = c0 * Math.sqrt((A / (V * l)));
} else if ((V * l) <= 1e-294) {
tmp = 1.0 / (Math.sqrt((V / (A / l))) / c0);
} else if ((V * l) <= 4e+283) {
tmp = c0 * (Math.sqrt(A) / Math.sqrt((V * l)));
} else {
tmp = c0 / Math.sqrt((l / (A / V)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if (V * l) <= -5e+220: tmp = (c0 / math.sqrt(l)) * math.sqrt((A / V)) elif (V * l) <= -1e-176: tmp = c0 * math.sqrt((A / (V * l))) elif (V * l) <= 1e-294: tmp = 1.0 / (math.sqrt((V / (A / l))) / c0) elif (V * l) <= 4e+283: tmp = c0 * (math.sqrt(A) / math.sqrt((V * l))) else: tmp = c0 / math.sqrt((l / (A / V))) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (Float64(V * l) <= -5e+220) tmp = Float64(Float64(c0 / sqrt(l)) * sqrt(Float64(A / V))); elseif (Float64(V * l) <= -1e-176) tmp = Float64(c0 * sqrt(Float64(A / Float64(V * l)))); elseif (Float64(V * l) <= 1e-294) tmp = Float64(1.0 / Float64(sqrt(Float64(V / Float64(A / l))) / c0)); elseif (Float64(V * l) <= 4e+283) tmp = Float64(c0 * Float64(sqrt(A) / sqrt(Float64(V * l)))); else tmp = Float64(c0 / sqrt(Float64(l / Float64(A / V)))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
tmp = 0.0;
if ((V * l) <= -5e+220)
tmp = (c0 / sqrt(l)) * sqrt((A / V));
elseif ((V * l) <= -1e-176)
tmp = c0 * sqrt((A / (V * l)));
elseif ((V * l) <= 1e-294)
tmp = 1.0 / (sqrt((V / (A / l))) / c0);
elseif ((V * l) <= 4e+283)
tmp = c0 * (sqrt(A) / sqrt((V * l)));
else
tmp = c0 / sqrt((l / (A / V)));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := If[LessEqual[N[(V * l), $MachinePrecision], -5e+220], N[(N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -1e-176], N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 1e-294], N[(1.0 / N[(N[Sqrt[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / c0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 4e+283], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 / N[Sqrt[N[(l / N[(A / V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -5 \cdot 10^{+220}:\\
\;\;\;\;\frac{c0}{\sqrt{\ell}} \cdot \sqrt{\frac{A}{V}}\\
\mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-176}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 10^{-294}:\\
\;\;\;\;\frac{1}{\frac{\sqrt{\frac{V}{\frac{A}{\ell}}}}{c0}}\\
\mathbf{elif}\;V \cdot \ell \leq 4 \cdot 10^{+283}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{\ell}{\frac{A}{V}}}}\\
\end{array}
\end{array}
if (*.f64 V l) < -5.0000000000000002e220Initial program 54.8%
*-commutativeN/A
associate-/r*N/A
sqrt-divN/A
associate-*l/N/A
associate-*r/N/A
*-lowering-*.f64N/A
pow1/2N/A
clear-numN/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f6441.6%
Applied egg-rr41.6%
metadata-evalN/A
sqrt-pow1N/A
inv-powN/A
clear-numN/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f6441.6%
Applied egg-rr41.6%
if -5.0000000000000002e220 < (*.f64 V l) < -1e-176Initial program 87.7%
if -1e-176 < (*.f64 V l) < 1.00000000000000002e-294Initial program 60.6%
*-commutativeN/A
sqrt-divN/A
associate-*l/N/A
clear-numN/A
/-lowering-/.f64N/A
associate-/r*N/A
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f6471.7%
Applied egg-rr71.7%
if 1.00000000000000002e-294 < (*.f64 V l) < 3.99999999999999982e283Initial program 81.4%
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6499.5%
Applied egg-rr99.5%
if 3.99999999999999982e283 < (*.f64 V l) Initial program 41.4%
clear-numN/A
*-commutativeN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6486.6%
Applied egg-rr86.6%
associate-/l/N/A
associate-/r/N/A
sqrt-divN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
associate-/r/N/A
sqrt-prodN/A
/-rgt-identityN/A
sqrt-prodN/A
associate-/r/N/A
sqrt-lowering-sqrt.f64N/A
clear-numN/A
associate-/r*N/A
div-invN/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f6486.7%
Applied egg-rr86.7%
Final simplification82.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 l) 1e-294)
(* c0 (pow (/ V (/ A l)) -0.5))
(if (<= (* V l) 4e+283)
(* c0 (/ (sqrt A) (sqrt (* V l))))
(/ c0 (sqrt (/ l (/ A V)))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= 1e-294) {
tmp = c0 * pow((V / (A / l)), -0.5);
} else if ((V * l) <= 4e+283) {
tmp = c0 * (sqrt(A) / sqrt((V * l)));
} else {
tmp = c0 / sqrt((l / (A / V)));
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: tmp
if ((v * l) <= 1d-294) then
tmp = c0 * ((v / (a / l)) ** (-0.5d0))
else if ((v * l) <= 4d+283) then
tmp = c0 * (sqrt(a) / sqrt((v * l)))
else
tmp = c0 / sqrt((l / (a / v)))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= 1e-294) {
tmp = c0 * Math.pow((V / (A / l)), -0.5);
} else if ((V * l) <= 4e+283) {
tmp = c0 * (Math.sqrt(A) / Math.sqrt((V * l)));
} else {
tmp = c0 / Math.sqrt((l / (A / V)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if (V * l) <= 1e-294: tmp = c0 * math.pow((V / (A / l)), -0.5) elif (V * l) <= 4e+283: tmp = c0 * (math.sqrt(A) / math.sqrt((V * l))) else: tmp = c0 / math.sqrt((l / (A / V))) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (Float64(V * l) <= 1e-294) tmp = Float64(c0 * (Float64(V / Float64(A / l)) ^ -0.5)); elseif (Float64(V * l) <= 4e+283) tmp = Float64(c0 * Float64(sqrt(A) / sqrt(Float64(V * l)))); else tmp = Float64(c0 / sqrt(Float64(l / Float64(A / V)))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
tmp = 0.0;
if ((V * l) <= 1e-294)
tmp = c0 * ((V / (A / l)) ^ -0.5);
elseif ((V * l) <= 4e+283)
tmp = c0 * (sqrt(A) / sqrt((V * l)));
else
tmp = c0 / sqrt((l / (A / V)));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := If[LessEqual[N[(V * l), $MachinePrecision], 1e-294], N[(c0 * N[Power[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 4e+283], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 / N[Sqrt[N[(l / N[(A / V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq 10^{-294}:\\
\;\;\;\;c0 \cdot {\left(\frac{V}{\frac{A}{\ell}}\right)}^{-0.5}\\
\mathbf{elif}\;V \cdot \ell \leq 4 \cdot 10^{+283}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{\ell}{\frac{A}{V}}}}\\
\end{array}
\end{array}
if (*.f64 V l) < 1.00000000000000002e-294Initial program 72.0%
*-commutativeN/A
*-lowering-*.f64N/A
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-eval74.4%
Applied egg-rr74.4%
if 1.00000000000000002e-294 < (*.f64 V l) < 3.99999999999999982e283Initial program 81.4%
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6499.5%
Applied egg-rr99.5%
if 3.99999999999999982e283 < (*.f64 V l) Initial program 41.4%
clear-numN/A
*-commutativeN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6486.6%
Applied egg-rr86.6%
associate-/l/N/A
associate-/r/N/A
sqrt-divN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
associate-/r/N/A
sqrt-prodN/A
/-rgt-identityN/A
sqrt-prodN/A
associate-/r/N/A
sqrt-lowering-sqrt.f64N/A
clear-numN/A
associate-/r*N/A
div-invN/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f6486.7%
Applied egg-rr86.7%
Final simplification83.4%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. (FPCore (c0 A V l) :precision binary64 (if (<= l -2e-310) (/ c0 (* (pow A -0.5) (sqrt (* V l)))) (/ c0 (/ (sqrt l) (sqrt (/ A V))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if (l <= -2e-310) {
tmp = c0 / (pow(A, -0.5) * sqrt((V * l)));
} else {
tmp = c0 / (sqrt(l) / sqrt((A / V)));
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: tmp
if (l <= (-2d-310)) then
tmp = c0 / ((a ** (-0.5d0)) * sqrt((v * l)))
else
tmp = c0 / (sqrt(l) / sqrt((a / v)))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if (l <= -2e-310) {
tmp = c0 / (Math.pow(A, -0.5) * Math.sqrt((V * l)));
} else {
tmp = c0 / (Math.sqrt(l) / Math.sqrt((A / V)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if l <= -2e-310: tmp = c0 / (math.pow(A, -0.5) * math.sqrt((V * l))) else: tmp = c0 / (math.sqrt(l) / math.sqrt((A / V))) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (l <= -2e-310) tmp = Float64(c0 / Float64((A ^ -0.5) * sqrt(Float64(V * l)))); else tmp = Float64(c0 / Float64(sqrt(l) / sqrt(Float64(A / V)))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
tmp = 0.0;
if (l <= -2e-310)
tmp = c0 / ((A ^ -0.5) * sqrt((V * l)));
else
tmp = c0 / (sqrt(l) / sqrt((A / V)));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := If[LessEqual[l, -2e-310], N[(c0 / N[(N[Power[A, -0.5], $MachinePrecision] * N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 / N[(N[Sqrt[l], $MachinePrecision] / N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -2 \cdot 10^{-310}:\\
\;\;\;\;\frac{c0}{{A}^{-0.5} \cdot \sqrt{V \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\frac{\sqrt{\ell}}{\sqrt{\frac{A}{V}}}}\\
\end{array}
\end{array}
if l < -1.999999999999994e-310Initial program 73.4%
clear-numN/A
*-commutativeN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6479.7%
Applied egg-rr79.7%
associate-/l/N/A
associate-/r/N/A
sqrt-divN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
associate-/r/N/A
sqrt-prodN/A
/-rgt-identityN/A
sqrt-prodN/A
associate-/r/N/A
sqrt-lowering-sqrt.f64N/A
clear-numN/A
associate-/r*N/A
div-invN/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f6479.3%
Applied egg-rr79.3%
clear-numN/A
associate-/l/N/A
associate-/r/N/A
*-commutativeN/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
inv-powN/A
pow-powN/A
metadata-evalN/A
metadata-evalN/A
pow-lowering-pow.f64N/A
metadata-evalN/A
sqrt-lowering-sqrt.f64N/A
*-commutativeN/A
*-lowering-*.f6440.4%
Applied egg-rr40.4%
if -1.999999999999994e-310 < l Initial program 72.2%
clear-numN/A
*-commutativeN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6475.4%
Applied egg-rr75.4%
associate-/l/N/A
associate-/r/N/A
sqrt-divN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
associate-/r/N/A
sqrt-prodN/A
/-rgt-identityN/A
sqrt-prodN/A
associate-/r/N/A
sqrt-lowering-sqrt.f64N/A
clear-numN/A
associate-/r*N/A
div-invN/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f6475.2%
Applied egg-rr75.2%
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f6487.8%
Applied egg-rr87.8%
Final simplification65.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 -2e-310) (* c0 (/ (sqrt A) (sqrt (* V l)))) (/ c0 (/ (sqrt l) (sqrt (/ A V))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if (l <= -2e-310) {
tmp = c0 * (sqrt(A) / sqrt((V * l)));
} else {
tmp = c0 / (sqrt(l) / sqrt((A / V)));
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: tmp
if (l <= (-2d-310)) then
tmp = c0 * (sqrt(a) / sqrt((v * l)))
else
tmp = c0 / (sqrt(l) / sqrt((a / v)))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if (l <= -2e-310) {
tmp = c0 * (Math.sqrt(A) / Math.sqrt((V * l)));
} else {
tmp = c0 / (Math.sqrt(l) / Math.sqrt((A / V)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if l <= -2e-310: tmp = c0 * (math.sqrt(A) / math.sqrt((V * l))) else: tmp = c0 / (math.sqrt(l) / math.sqrt((A / V))) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (l <= -2e-310) tmp = Float64(c0 * Float64(sqrt(A) / sqrt(Float64(V * l)))); else tmp = Float64(c0 / Float64(sqrt(l) / sqrt(Float64(A / V)))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
tmp = 0.0;
if (l <= -2e-310)
tmp = c0 * (sqrt(A) / sqrt((V * l)));
else
tmp = c0 / (sqrt(l) / sqrt((A / V)));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := If[LessEqual[l, -2e-310], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 / N[(N[Sqrt[l], $MachinePrecision] / N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -2 \cdot 10^{-310}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\frac{\sqrt{\ell}}{\sqrt{\frac{A}{V}}}}\\
\end{array}
\end{array}
if l < -1.999999999999994e-310Initial program 73.4%
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6440.4%
Applied egg-rr40.4%
if -1.999999999999994e-310 < l Initial program 72.2%
clear-numN/A
*-commutativeN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6475.4%
Applied egg-rr75.4%
associate-/l/N/A
associate-/r/N/A
sqrt-divN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
associate-/r/N/A
sqrt-prodN/A
/-rgt-identityN/A
sqrt-prodN/A
associate-/r/N/A
sqrt-lowering-sqrt.f64N/A
clear-numN/A
associate-/r*N/A
div-invN/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f6475.2%
Applied egg-rr75.2%
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f6487.8%
Applied egg-rr87.8%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. (FPCore (c0 A V l) :precision binary64 (* c0 (sqrt (/ A (* V l)))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
return c0 * sqrt((A / (V * l)));
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
code = c0 * sqrt((a / (v * l)))
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
return c0 * Math.sqrt((A / (V * l)));
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): return c0 * math.sqrt((A / (V * l)))
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) return Float64(c0 * sqrt(Float64(A / Float64(V * l)))) end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp = code(c0, A, V, l)
tmp = c0 * sqrt((A / (V * l)));
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\end{array}
Initial program 72.8%
herbie shell --seed 2024150
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))