
(FPCore (c0 A V l) :precision binary64 (* c0 (sqrt (/ A (* V l)))))
double code(double c0, double A, double V, double l) {
return c0 * sqrt((A / (V * l)));
}
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
code = c0 * sqrt((a / (v * l)))
end function
public static double code(double c0, double A, double V, double l) {
return c0 * Math.sqrt((A / (V * l)));
}
def code(c0, A, V, l): return c0 * math.sqrt((A / (V * l)))
function code(c0, A, V, l) return Float64(c0 * sqrt(Float64(A / Float64(V * l)))) end
function tmp = code(c0, A, V, l) tmp = c0 * sqrt((A / (V * l))); end
code[c0_, A_, V_, l_] := N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (c0 A V l) :precision binary64 (* c0 (sqrt (/ A (* V l)))))
double code(double c0, double A, double V, double l) {
return c0 * sqrt((A / (V * l)));
}
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
code = c0 * sqrt((a / (v * l)))
end function
public static double code(double c0, double A, double V, double l) {
return c0 * Math.sqrt((A / (V * l)));
}
def code(c0, A, V, l): return c0 * math.sqrt((A / (V * l)))
function code(c0, A, V, l) return Float64(c0 * sqrt(Float64(A / Float64(V * l)))) end
function tmp = code(c0, A, V, l) tmp = c0 * sqrt((A / (V * l))); end
code[c0_, A_, V_, l_] := N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\end{array}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(if (<= (* V l) -1e+253)
(/ (sqrt (/ A V)) (/ (sqrt l) c0))
(if (<= (* V l) -1e-307)
(/ (* c0 (sqrt (- 0.0 A))) (sqrt (- 0.0 (* V l))))
(if (<= (* V l) 1e-305)
(/ c0 (* (sqrt (- 0.0 V)) (sqrt (- 0.0 (/ l A)))))
(if (<= (* V l) 2e+280)
(* c0 (/ (sqrt A) (sqrt (* V l))))
(* c0 (/ (sqrt (- 0.0 (/ A l))) (pow (- 0.0 V) 0.5))))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -1e+253) {
tmp = sqrt((A / V)) / (sqrt(l) / c0);
} else if ((V * l) <= -1e-307) {
tmp = (c0 * sqrt((0.0 - A))) / sqrt((0.0 - (V * l)));
} else if ((V * l) <= 1e-305) {
tmp = c0 / (sqrt((0.0 - V)) * sqrt((0.0 - (l / A))));
} else if ((V * l) <= 2e+280) {
tmp = c0 * (sqrt(A) / sqrt((V * l)));
} else {
tmp = c0 * (sqrt((0.0 - (A / l))) / pow((0.0 - V), 0.5));
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: tmp
if ((v * l) <= (-1d+253)) then
tmp = sqrt((a / v)) / (sqrt(l) / c0)
else if ((v * l) <= (-1d-307)) then
tmp = (c0 * sqrt((0.0d0 - a))) / sqrt((0.0d0 - (v * l)))
else if ((v * l) <= 1d-305) then
tmp = c0 / (sqrt((0.0d0 - v)) * sqrt((0.0d0 - (l / a))))
else if ((v * l) <= 2d+280) then
tmp = c0 * (sqrt(a) / sqrt((v * l)))
else
tmp = c0 * (sqrt((0.0d0 - (a / l))) / ((0.0d0 - v) ** 0.5d0))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -1e+253) {
tmp = Math.sqrt((A / V)) / (Math.sqrt(l) / c0);
} else if ((V * l) <= -1e-307) {
tmp = (c0 * Math.sqrt((0.0 - A))) / Math.sqrt((0.0 - (V * l)));
} else if ((V * l) <= 1e-305) {
tmp = c0 / (Math.sqrt((0.0 - V)) * Math.sqrt((0.0 - (l / A))));
} else if ((V * l) <= 2e+280) {
tmp = c0 * (Math.sqrt(A) / Math.sqrt((V * l)));
} else {
tmp = c0 * (Math.sqrt((0.0 - (A / l))) / Math.pow((0.0 - V), 0.5));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if (V * l) <= -1e+253: tmp = math.sqrt((A / V)) / (math.sqrt(l) / c0) elif (V * l) <= -1e-307: tmp = (c0 * math.sqrt((0.0 - A))) / math.sqrt((0.0 - (V * l))) elif (V * l) <= 1e-305: tmp = c0 / (math.sqrt((0.0 - V)) * math.sqrt((0.0 - (l / A)))) elif (V * l) <= 2e+280: tmp = c0 * (math.sqrt(A) / math.sqrt((V * l))) else: tmp = c0 * (math.sqrt((0.0 - (A / l))) / math.pow((0.0 - V), 0.5)) 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+253) tmp = Float64(sqrt(Float64(A / V)) / Float64(sqrt(l) / c0)); elseif (Float64(V * l) <= -1e-307) tmp = Float64(Float64(c0 * sqrt(Float64(0.0 - A))) / sqrt(Float64(0.0 - Float64(V * l)))); elseif (Float64(V * l) <= 1e-305) tmp = Float64(c0 / Float64(sqrt(Float64(0.0 - V)) * sqrt(Float64(0.0 - Float64(l / A))))); elseif (Float64(V * l) <= 2e+280) tmp = Float64(c0 * Float64(sqrt(A) / sqrt(Float64(V * l)))); else tmp = Float64(c0 * Float64(sqrt(Float64(0.0 - Float64(A / l))) / (Float64(0.0 - V) ^ 0.5))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
tmp = 0.0;
if ((V * l) <= -1e+253)
tmp = sqrt((A / V)) / (sqrt(l) / c0);
elseif ((V * l) <= -1e-307)
tmp = (c0 * sqrt((0.0 - A))) / sqrt((0.0 - (V * l)));
elseif ((V * l) <= 1e-305)
tmp = c0 / (sqrt((0.0 - V)) * sqrt((0.0 - (l / A))));
elseif ((V * l) <= 2e+280)
tmp = c0 * (sqrt(A) / sqrt((V * l)));
else
tmp = c0 * (sqrt((0.0 - (A / l))) / ((0.0 - V) ^ 0.5));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := If[LessEqual[N[(V * l), $MachinePrecision], -1e+253], N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[(N[Sqrt[l], $MachinePrecision] / c0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -1e-307], N[(N[(c0 * N[Sqrt[N[(0.0 - A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(0.0 - N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 1e-305], N[(c0 / N[(N[Sqrt[N[(0.0 - V), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(0.0 - N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 2e+280], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[(N[Sqrt[N[(0.0 - N[(A / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Power[N[(0.0 - V), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\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^{+253}:\\
\;\;\;\;\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}\\
\mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-307}:\\
\;\;\;\;\frac{c0 \cdot \sqrt{0 - A}}{\sqrt{0 - V \cdot \ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 10^{-305}:\\
\;\;\;\;\frac{c0}{\sqrt{0 - V} \cdot \sqrt{0 - \frac{\ell}{A}}}\\
\mathbf{elif}\;V \cdot \ell \leq 2 \cdot 10^{+280}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{0 - \frac{A}{\ell}}}{{\left(0 - V\right)}^{0.5}}\\
\end{array}
\end{array}
if (*.f64 V l) < -9.9999999999999994e252Initial program 36.5%
*-commutativeN/A
/-rgt-identityN/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f6436.5%
Applied egg-rr36.5%
Applied egg-rr50.2%
Applied egg-rr50.2%
frac-2negN/A
sub0-negN/A
sub0-negN/A
sqrt-divN/A
unpow1/2N/A
unpow1/2N/A
associate-/r/N/A
*-commutativeN/A
clear-numN/A
un-div-invN/A
sqr-powN/A
pow-prod-downN/A
sub0-negN/A
sub0-negN/A
sqr-negN/A
pow-prod-downN/A
sqr-powN/A
pow1/2N/A
Applied egg-rr47.7%
if -9.9999999999999994e252 < (*.f64 V l) < -9.99999999999999909e-308Initial program 81.7%
frac-2negN/A
sqrt-divN/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f6498.2%
Applied egg-rr98.2%
sub0-negN/A
*-commutativeN/A
distribute-lft-neg-outN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6498.2%
Applied egg-rr98.2%
if -9.99999999999999909e-308 < (*.f64 V l) < 9.99999999999999996e-306Initial program 41.0%
*-commutativeN/A
/-rgt-identityN/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f6441.0%
Applied egg-rr41.0%
Applied egg-rr62.9%
Applied egg-rr63.0%
frac-2negN/A
associate-/r/N/A
sqrt-prodN/A
distribute-frac-neg2N/A
pow1/2N/A
*-lowering-*.f64N/A
distribute-frac-neg2N/A
sqrt-lowering-sqrt.f64N/A
frac-2negN/A
sub0-negN/A
remove-double-negN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f6448.6%
Applied egg-rr48.6%
if 9.99999999999999996e-306 < (*.f64 V l) < 2.0000000000000001e280Initial program 91.6%
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6499.7%
Applied egg-rr99.7%
if 2.0000000000000001e280 < (*.f64 V l) Initial program 34.3%
associate-/l/N/A
frac-2negN/A
sqrt-divN/A
distribute-frac-neg2N/A
pow1/2N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
remove-double-negN/A
frac-2negN/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
pow-lowering-pow.f64N/A
neg-sub0N/A
--lowering--.f6456.4%
Applied egg-rr56.4%
Final simplification86.0%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. (FPCore (c0 A V l) :precision binary64 (if (<= A -1e-310) (* (* (pow (- 0.0 A) 0.5) (sqrt (/ -1.0 V))) (* (pow l -0.5) c0)) (* c0 (/ (sqrt A) (sqrt (* V l))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if (A <= -1e-310) {
tmp = (pow((0.0 - A), 0.5) * sqrt((-1.0 / V))) * (pow(l, -0.5) * c0);
} else {
tmp = c0 * (sqrt(A) / sqrt((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 (a <= (-1d-310)) then
tmp = (((0.0d0 - a) ** 0.5d0) * sqrt(((-1.0d0) / v))) * ((l ** (-0.5d0)) * c0)
else
tmp = c0 * (sqrt(a) / sqrt((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 (A <= -1e-310) {
tmp = (Math.pow((0.0 - A), 0.5) * Math.sqrt((-1.0 / V))) * (Math.pow(l, -0.5) * c0);
} else {
tmp = c0 * (Math.sqrt(A) / Math.sqrt((V * l)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if A <= -1e-310: tmp = (math.pow((0.0 - A), 0.5) * math.sqrt((-1.0 / V))) * (math.pow(l, -0.5) * c0) else: tmp = c0 * (math.sqrt(A) / math.sqrt((V * l))) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (A <= -1e-310) tmp = Float64(Float64((Float64(0.0 - A) ^ 0.5) * sqrt(Float64(-1.0 / V))) * Float64((l ^ -0.5) * c0)); else tmp = Float64(c0 * Float64(sqrt(A) / sqrt(Float64(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 (A <= -1e-310)
tmp = (((0.0 - A) ^ 0.5) * sqrt((-1.0 / V))) * ((l ^ -0.5) * c0);
else
tmp = c0 * (sqrt(A) / sqrt((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[A, -1e-310], N[(N[(N[Power[N[(0.0 - A), $MachinePrecision], 0.5], $MachinePrecision] * N[Sqrt[N[(-1.0 / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, -0.5], $MachinePrecision] * c0), $MachinePrecision]), $MachinePrecision], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1 \cdot 10^{-310}:\\
\;\;\;\;\left({\left(0 - A\right)}^{0.5} \cdot \sqrt{\frac{-1}{V}}\right) \cdot \left({\ell}^{-0.5} \cdot c0\right)\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\
\end{array}
\end{array}
if A < -9.999999999999969e-311Initial program 70.8%
*-commutativeN/A
associate-/r*N/A
div-invN/A
sqrt-prodN/A
pow1/2N/A
associate-*l*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
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
metadata-eval43.4%
Applied egg-rr43.4%
metadata-evalN/A
sqrt-pow1N/A
inv-powN/A
clear-numN/A
frac-2negN/A
div-invN/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
distribute-frac-neg2N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6451.2%
Applied egg-rr51.2%
if -9.999999999999969e-311 < A Initial program 76.7%
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6483.6%
Applied egg-rr83.6%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. (FPCore (c0 A V l) :precision binary64 (if (<= A -1e-310) (* (/ c0 (* (sqrt (- 0.0 V)) (sqrt l))) (sqrt (- 0.0 A))) (* c0 (/ (sqrt A) (sqrt (* V l))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if (A <= -1e-310) {
tmp = (c0 / (sqrt((0.0 - V)) * sqrt(l))) * sqrt((0.0 - A));
} else {
tmp = c0 * (sqrt(A) / sqrt((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 (a <= (-1d-310)) then
tmp = (c0 / (sqrt((0.0d0 - v)) * sqrt(l))) * sqrt((0.0d0 - a))
else
tmp = c0 * (sqrt(a) / sqrt((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 (A <= -1e-310) {
tmp = (c0 / (Math.sqrt((0.0 - V)) * Math.sqrt(l))) * Math.sqrt((0.0 - A));
} else {
tmp = c0 * (Math.sqrt(A) / Math.sqrt((V * l)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if A <= -1e-310: tmp = (c0 / (math.sqrt((0.0 - V)) * math.sqrt(l))) * math.sqrt((0.0 - A)) else: tmp = c0 * (math.sqrt(A) / math.sqrt((V * l))) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (A <= -1e-310) tmp = Float64(Float64(c0 / Float64(sqrt(Float64(0.0 - V)) * sqrt(l))) * sqrt(Float64(0.0 - A))); else tmp = Float64(c0 * Float64(sqrt(A) / sqrt(Float64(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 (A <= -1e-310)
tmp = (c0 / (sqrt((0.0 - V)) * sqrt(l))) * sqrt((0.0 - A));
else
tmp = c0 * (sqrt(A) / sqrt((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[A, -1e-310], N[(N[(c0 / N[(N[Sqrt[N[(0.0 - V), $MachinePrecision]], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(0.0 - A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;A \leq -1 \cdot 10^{-310}:\\
\;\;\;\;\frac{c0}{\sqrt{0 - V} \cdot \sqrt{\ell}} \cdot \sqrt{0 - A}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\
\end{array}
\end{array}
if A < -9.999999999999969e-311Initial program 70.8%
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--.f6480.2%
Applied egg-rr80.2%
/-rgt-identityN/A
sub0-negN/A
associate-/r/N/A
metadata-evalN/A
frac-2negN/A
associate-/r/N/A
sqrt-prodN/A
clear-numN/A
metadata-evalN/A
distribute-neg-fracN/A
distribute-frac-neg2N/A
remove-double-divN/A
pow1/2N/A
*-lowering-*.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f6449.3%
Applied egg-rr49.3%
if -9.999999999999969e-311 < A Initial program 76.7%
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6483.6%
Applied egg-rr83.6%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. (FPCore (c0 A V l) :precision binary64 (if (<= l -2e-310) (* (* (sqrt (/ -1.0 V)) (sqrt (/ -1.0 l))) (* c0 (sqrt A))) (* c0 (/ (sqrt (/ A V)) (sqrt l)))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if (l <= -2e-310) {
tmp = (sqrt((-1.0 / V)) * sqrt((-1.0 / l))) * (c0 * sqrt(A));
} else {
tmp = c0 * (sqrt((A / V)) / sqrt(l));
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: tmp
if (l <= (-2d-310)) then
tmp = (sqrt(((-1.0d0) / v)) * sqrt(((-1.0d0) / l))) * (c0 * sqrt(a))
else
tmp = c0 * (sqrt((a / v)) / sqrt(l))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if (l <= -2e-310) {
tmp = (Math.sqrt((-1.0 / V)) * Math.sqrt((-1.0 / l))) * (c0 * Math.sqrt(A));
} else {
tmp = c0 * (Math.sqrt((A / V)) / Math.sqrt(l));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if l <= -2e-310: tmp = (math.sqrt((-1.0 / V)) * math.sqrt((-1.0 / l))) * (c0 * math.sqrt(A)) else: tmp = c0 * (math.sqrt((A / V)) / math.sqrt(l)) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (l <= -2e-310) tmp = Float64(Float64(sqrt(Float64(-1.0 / V)) * sqrt(Float64(-1.0 / l))) * Float64(c0 * sqrt(A))); else tmp = Float64(c0 * Float64(sqrt(Float64(A / V)) / sqrt(l))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
tmp = 0.0;
if (l <= -2e-310)
tmp = (sqrt((-1.0 / V)) * sqrt((-1.0 / l))) * (c0 * sqrt(A));
else
tmp = c0 * (sqrt((A / V)) / sqrt(l));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := If[LessEqual[l, -2e-310], N[(N[(N[Sqrt[N[(-1.0 / V), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(-1.0 / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(c0 * N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -2 \cdot 10^{-310}:\\
\;\;\;\;\left(\sqrt{\frac{-1}{V}} \cdot \sqrt{\frac{-1}{\ell}}\right) \cdot \left(c0 \cdot \sqrt{A}\right)\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\
\end{array}
\end{array}
if l < -1.999999999999994e-310Initial program 70.7%
*-commutativeN/A
/-rgt-identityN/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f6470.7%
Applied egg-rr70.7%
Applied egg-rr43.7%
Applied egg-rr51.5%
if -1.999999999999994e-310 < l Initial program 76.8%
*-commutativeN/A
/-rgt-identityN/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f6476.8%
Applied egg-rr76.8%
Applied egg-rr74.5%
Applied egg-rr82.7%
Final simplification66.8%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(if (<= (* V l) -1e+253)
(/ (sqrt (/ A V)) (/ (sqrt l) c0))
(if (<= (* V l) -1e-307)
(/ (* c0 (sqrt (- 0.0 A))) (sqrt (- 0.0 (* V l))))
(if (<= (* V l) 1e-305)
(/ c0 (* (sqrt (- 0.0 V)) (sqrt (- 0.0 (/ l A)))))
(if (<= (* V l) 2e+280)
(* c0 (/ (sqrt A) (sqrt (* V l))))
(* c0 (* (sqrt (/ -1.0 V)) (sqrt (- 0.0 (/ A l))))))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -1e+253) {
tmp = sqrt((A / V)) / (sqrt(l) / c0);
} else if ((V * l) <= -1e-307) {
tmp = (c0 * sqrt((0.0 - A))) / sqrt((0.0 - (V * l)));
} else if ((V * l) <= 1e-305) {
tmp = c0 / (sqrt((0.0 - V)) * sqrt((0.0 - (l / A))));
} else if ((V * l) <= 2e+280) {
tmp = c0 * (sqrt(A) / sqrt((V * l)));
} else {
tmp = c0 * (sqrt((-1.0 / V)) * sqrt((0.0 - (A / l))));
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: tmp
if ((v * l) <= (-1d+253)) then
tmp = sqrt((a / v)) / (sqrt(l) / c0)
else if ((v * l) <= (-1d-307)) then
tmp = (c0 * sqrt((0.0d0 - a))) / sqrt((0.0d0 - (v * l)))
else if ((v * l) <= 1d-305) then
tmp = c0 / (sqrt((0.0d0 - v)) * sqrt((0.0d0 - (l / a))))
else if ((v * l) <= 2d+280) then
tmp = c0 * (sqrt(a) / sqrt((v * l)))
else
tmp = c0 * (sqrt(((-1.0d0) / v)) * sqrt((0.0d0 - (a / l))))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -1e+253) {
tmp = Math.sqrt((A / V)) / (Math.sqrt(l) / c0);
} else if ((V * l) <= -1e-307) {
tmp = (c0 * Math.sqrt((0.0 - A))) / Math.sqrt((0.0 - (V * l)));
} else if ((V * l) <= 1e-305) {
tmp = c0 / (Math.sqrt((0.0 - V)) * Math.sqrt((0.0 - (l / A))));
} else if ((V * l) <= 2e+280) {
tmp = c0 * (Math.sqrt(A) / Math.sqrt((V * l)));
} else {
tmp = c0 * (Math.sqrt((-1.0 / V)) * Math.sqrt((0.0 - (A / l))));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if (V * l) <= -1e+253: tmp = math.sqrt((A / V)) / (math.sqrt(l) / c0) elif (V * l) <= -1e-307: tmp = (c0 * math.sqrt((0.0 - A))) / math.sqrt((0.0 - (V * l))) elif (V * l) <= 1e-305: tmp = c0 / (math.sqrt((0.0 - V)) * math.sqrt((0.0 - (l / A)))) elif (V * l) <= 2e+280: tmp = c0 * (math.sqrt(A) / math.sqrt((V * l))) else: tmp = c0 * (math.sqrt((-1.0 / V)) * math.sqrt((0.0 - (A / 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+253) tmp = Float64(sqrt(Float64(A / V)) / Float64(sqrt(l) / c0)); elseif (Float64(V * l) <= -1e-307) tmp = Float64(Float64(c0 * sqrt(Float64(0.0 - A))) / sqrt(Float64(0.0 - Float64(V * l)))); elseif (Float64(V * l) <= 1e-305) tmp = Float64(c0 / Float64(sqrt(Float64(0.0 - V)) * sqrt(Float64(0.0 - Float64(l / A))))); elseif (Float64(V * l) <= 2e+280) tmp = Float64(c0 * Float64(sqrt(A) / sqrt(Float64(V * l)))); else tmp = Float64(c0 * Float64(sqrt(Float64(-1.0 / V)) * sqrt(Float64(0.0 - Float64(A / l))))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
tmp = 0.0;
if ((V * l) <= -1e+253)
tmp = sqrt((A / V)) / (sqrt(l) / c0);
elseif ((V * l) <= -1e-307)
tmp = (c0 * sqrt((0.0 - A))) / sqrt((0.0 - (V * l)));
elseif ((V * l) <= 1e-305)
tmp = c0 / (sqrt((0.0 - V)) * sqrt((0.0 - (l / A))));
elseif ((V * l) <= 2e+280)
tmp = c0 * (sqrt(A) / sqrt((V * l)));
else
tmp = c0 * (sqrt((-1.0 / V)) * sqrt((0.0 - (A / l))));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := If[LessEqual[N[(V * l), $MachinePrecision], -1e+253], N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[(N[Sqrt[l], $MachinePrecision] / c0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -1e-307], N[(N[(c0 * N[Sqrt[N[(0.0 - A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(0.0 - N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 1e-305], N[(c0 / N[(N[Sqrt[N[(0.0 - V), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(0.0 - N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 2e+280], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[(N[Sqrt[N[(-1.0 / V), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(0.0 - N[(A / l), $MachinePrecision]), $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 -1 \cdot 10^{+253}:\\
\;\;\;\;\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}\\
\mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-307}:\\
\;\;\;\;\frac{c0 \cdot \sqrt{0 - A}}{\sqrt{0 - V \cdot \ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 10^{-305}:\\
\;\;\;\;\frac{c0}{\sqrt{0 - V} \cdot \sqrt{0 - \frac{\ell}{A}}}\\
\mathbf{elif}\;V \cdot \ell \leq 2 \cdot 10^{+280}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \left(\sqrt{\frac{-1}{V}} \cdot \sqrt{0 - \frac{A}{\ell}}\right)\\
\end{array}
\end{array}
if (*.f64 V l) < -9.9999999999999994e252Initial program 36.5%
*-commutativeN/A
/-rgt-identityN/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f6436.5%
Applied egg-rr36.5%
Applied egg-rr50.2%
Applied egg-rr50.2%
frac-2negN/A
sub0-negN/A
sub0-negN/A
sqrt-divN/A
unpow1/2N/A
unpow1/2N/A
associate-/r/N/A
*-commutativeN/A
clear-numN/A
un-div-invN/A
sqr-powN/A
pow-prod-downN/A
sub0-negN/A
sub0-negN/A
sqr-negN/A
pow-prod-downN/A
sqr-powN/A
pow1/2N/A
Applied egg-rr47.7%
if -9.9999999999999994e252 < (*.f64 V l) < -9.99999999999999909e-308Initial program 81.7%
frac-2negN/A
sqrt-divN/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f6498.2%
Applied egg-rr98.2%
sub0-negN/A
*-commutativeN/A
distribute-lft-neg-outN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6498.2%
Applied egg-rr98.2%
if -9.99999999999999909e-308 < (*.f64 V l) < 9.99999999999999996e-306Initial program 41.0%
*-commutativeN/A
/-rgt-identityN/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f6441.0%
Applied egg-rr41.0%
Applied egg-rr62.9%
Applied egg-rr63.0%
frac-2negN/A
associate-/r/N/A
sqrt-prodN/A
distribute-frac-neg2N/A
pow1/2N/A
*-lowering-*.f64N/A
distribute-frac-neg2N/A
sqrt-lowering-sqrt.f64N/A
frac-2negN/A
sub0-negN/A
remove-double-negN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f6448.6%
Applied egg-rr48.6%
if 9.99999999999999996e-306 < (*.f64 V l) < 2.0000000000000001e280Initial program 91.6%
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6499.7%
Applied egg-rr99.7%
if 2.0000000000000001e280 < (*.f64 V l) Initial program 34.3%
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--.f6456.1%
Applied egg-rr56.1%
Final simplification86.0%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (* c0 (* (sqrt (/ -1.0 V)) (sqrt (- 0.0 (/ A l)))))))
(if (<= (* V l) -1e+253)
(/ (sqrt (/ A V)) (/ (sqrt l) c0))
(if (<= (* V l) -2e-296)
(/ (* c0 (sqrt (- 0.0 A))) (sqrt (- 0.0 (* V l))))
(if (<= (* V l) 1e-305)
t_0
(if (<= (* V l) 2e+280) (* c0 (/ (sqrt A) (sqrt (* V l)))) t_0))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = c0 * (sqrt((-1.0 / V)) * sqrt((0.0 - (A / l))));
double tmp;
if ((V * l) <= -1e+253) {
tmp = sqrt((A / V)) / (sqrt(l) / c0);
} else if ((V * l) <= -2e-296) {
tmp = (c0 * sqrt((0.0 - A))) / sqrt((0.0 - (V * l)));
} else if ((V * l) <= 1e-305) {
tmp = t_0;
} else if ((V * l) <= 2e+280) {
tmp = c0 * (sqrt(A) / sqrt((V * l)));
} else {
tmp = t_0;
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: tmp
t_0 = c0 * (sqrt(((-1.0d0) / v)) * sqrt((0.0d0 - (a / l))))
if ((v * l) <= (-1d+253)) then
tmp = sqrt((a / v)) / (sqrt(l) / c0)
else if ((v * l) <= (-2d-296)) then
tmp = (c0 * sqrt((0.0d0 - a))) / sqrt((0.0d0 - (v * l)))
else if ((v * l) <= 1d-305) then
tmp = t_0
else if ((v * l) <= 2d+280) then
tmp = c0 * (sqrt(a) / sqrt((v * l)))
else
tmp = t_0
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = c0 * (Math.sqrt((-1.0 / V)) * Math.sqrt((0.0 - (A / l))));
double tmp;
if ((V * l) <= -1e+253) {
tmp = Math.sqrt((A / V)) / (Math.sqrt(l) / c0);
} else if ((V * l) <= -2e-296) {
tmp = (c0 * Math.sqrt((0.0 - A))) / Math.sqrt((0.0 - (V * l)));
} else if ((V * l) <= 1e-305) {
tmp = t_0;
} else if ((V * l) <= 2e+280) {
tmp = c0 * (Math.sqrt(A) / Math.sqrt((V * l)));
} else {
tmp = t_0;
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = c0 * (math.sqrt((-1.0 / V)) * math.sqrt((0.0 - (A / l)))) tmp = 0 if (V * l) <= -1e+253: tmp = math.sqrt((A / V)) / (math.sqrt(l) / c0) elif (V * l) <= -2e-296: tmp = (c0 * math.sqrt((0.0 - A))) / math.sqrt((0.0 - (V * l))) elif (V * l) <= 1e-305: tmp = t_0 elif (V * l) <= 2e+280: tmp = c0 * (math.sqrt(A) / math.sqrt((V * l))) else: tmp = t_0 return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = Float64(c0 * Float64(sqrt(Float64(-1.0 / V)) * sqrt(Float64(0.0 - Float64(A / l))))) tmp = 0.0 if (Float64(V * l) <= -1e+253) tmp = Float64(sqrt(Float64(A / V)) / Float64(sqrt(l) / c0)); elseif (Float64(V * l) <= -2e-296) tmp = Float64(Float64(c0 * sqrt(Float64(0.0 - A))) / sqrt(Float64(0.0 - Float64(V * l)))); elseif (Float64(V * l) <= 1e-305) tmp = t_0; elseif (Float64(V * l) <= 2e+280) tmp = Float64(c0 * Float64(sqrt(A) / sqrt(Float64(V * l)))); else tmp = t_0; end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = c0 * (sqrt((-1.0 / V)) * sqrt((0.0 - (A / l))));
tmp = 0.0;
if ((V * l) <= -1e+253)
tmp = sqrt((A / V)) / (sqrt(l) / c0);
elseif ((V * l) <= -2e-296)
tmp = (c0 * sqrt((0.0 - A))) / sqrt((0.0 - (V * l)));
elseif ((V * l) <= 1e-305)
tmp = t_0;
elseif ((V * l) <= 2e+280)
tmp = c0 * (sqrt(A) / sqrt((V * l)));
else
tmp = t_0;
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(c0 * N[(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[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[(N[Sqrt[l], $MachinePrecision] / c0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -2e-296], N[(N[(c0 * N[Sqrt[N[(0.0 - A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(0.0 - N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 1e-305], t$95$0, If[LessEqual[N[(V * l), $MachinePrecision], 2e+280], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := c0 \cdot \left(\sqrt{\frac{-1}{V}} \cdot \sqrt{0 - \frac{A}{\ell}}\right)\\
\mathbf{if}\;V \cdot \ell \leq -1 \cdot 10^{+253}:\\
\;\;\;\;\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}\\
\mathbf{elif}\;V \cdot \ell \leq -2 \cdot 10^{-296}:\\
\;\;\;\;\frac{c0 \cdot \sqrt{0 - A}}{\sqrt{0 - V \cdot \ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 10^{-305}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;V \cdot \ell \leq 2 \cdot 10^{+280}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if (*.f64 V l) < -9.9999999999999994e252Initial program 36.5%
*-commutativeN/A
/-rgt-identityN/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f6436.5%
Applied egg-rr36.5%
Applied egg-rr50.2%
Applied egg-rr50.2%
frac-2negN/A
sub0-negN/A
sub0-negN/A
sqrt-divN/A
unpow1/2N/A
unpow1/2N/A
associate-/r/N/A
*-commutativeN/A
clear-numN/A
un-div-invN/A
sqr-powN/A
pow-prod-downN/A
sub0-negN/A
sub0-negN/A
sqr-negN/A
pow-prod-downN/A
sqr-powN/A
pow1/2N/A
Applied egg-rr47.7%
if -9.9999999999999994e252 < (*.f64 V l) < -2e-296Initial program 81.5%
frac-2negN/A
sqrt-divN/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f6498.2%
Applied egg-rr98.2%
sub0-negN/A
*-commutativeN/A
distribute-lft-neg-outN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6498.2%
Applied egg-rr98.2%
if -2e-296 < (*.f64 V l) < 9.99999999999999996e-306 or 2.0000000000000001e280 < (*.f64 V l) Initial program 40.0%
frac-2negN/A
neg-mul-1N/A
distribute-rgt-neg-inN/A
times-fracN/A
sqrt-prodN/A
frac-2negN/A
metadata-evalN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
metadata-evalN/A
frac-2negN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
remove-double-negN/A
frac-2negN/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f6450.0%
Applied egg-rr50.0%
if 9.99999999999999996e-306 < (*.f64 V l) < 2.0000000000000001e280Initial program 91.6%
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6499.7%
Applied egg-rr99.7%
Final simplification85.6%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(if (<= (* V l) -1e+253)
(/ (sqrt (/ A V)) (/ (sqrt l) c0))
(if (<= (* V l) -1e-307)
(/ (* c0 (sqrt (- 0.0 A))) (sqrt (- 0.0 (* V l))))
(if (<= (* V l) 0.0)
(* (* (pow l -0.5) c0) (pow (/ V A) -0.5))
(* c0 (/ (sqrt A) (sqrt (* 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+253) {
tmp = sqrt((A / V)) / (sqrt(l) / c0);
} else if ((V * l) <= -1e-307) {
tmp = (c0 * sqrt((0.0 - A))) / sqrt((0.0 - (V * l)));
} else if ((V * l) <= 0.0) {
tmp = (pow(l, -0.5) * c0) * pow((V / A), -0.5);
} else {
tmp = c0 * (sqrt(A) / sqrt((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+253)) then
tmp = sqrt((a / v)) / (sqrt(l) / c0)
else if ((v * l) <= (-1d-307)) then
tmp = (c0 * sqrt((0.0d0 - a))) / sqrt((0.0d0 - (v * l)))
else if ((v * l) <= 0.0d0) then
tmp = ((l ** (-0.5d0)) * c0) * ((v / a) ** (-0.5d0))
else
tmp = c0 * (sqrt(a) / sqrt((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+253) {
tmp = Math.sqrt((A / V)) / (Math.sqrt(l) / c0);
} else if ((V * l) <= -1e-307) {
tmp = (c0 * Math.sqrt((0.0 - A))) / Math.sqrt((0.0 - (V * l)));
} else if ((V * l) <= 0.0) {
tmp = (Math.pow(l, -0.5) * c0) * Math.pow((V / A), -0.5);
} else {
tmp = c0 * (Math.sqrt(A) / Math.sqrt((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+253: tmp = math.sqrt((A / V)) / (math.sqrt(l) / c0) elif (V * l) <= -1e-307: tmp = (c0 * math.sqrt((0.0 - A))) / math.sqrt((0.0 - (V * l))) elif (V * l) <= 0.0: tmp = (math.pow(l, -0.5) * c0) * math.pow((V / A), -0.5) else: tmp = c0 * (math.sqrt(A) / math.sqrt((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+253) tmp = Float64(sqrt(Float64(A / V)) / Float64(sqrt(l) / c0)); elseif (Float64(V * l) <= -1e-307) tmp = Float64(Float64(c0 * sqrt(Float64(0.0 - A))) / sqrt(Float64(0.0 - Float64(V * l)))); elseif (Float64(V * l) <= 0.0) tmp = Float64(Float64((l ^ -0.5) * c0) * (Float64(V / A) ^ -0.5)); else tmp = Float64(c0 * Float64(sqrt(A) / sqrt(Float64(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+253)
tmp = sqrt((A / V)) / (sqrt(l) / c0);
elseif ((V * l) <= -1e-307)
tmp = (c0 * sqrt((0.0 - A))) / sqrt((0.0 - (V * l)));
elseif ((V * l) <= 0.0)
tmp = ((l ^ -0.5) * c0) * ((V / A) ^ -0.5);
else
tmp = c0 * (sqrt(A) / sqrt((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+253], N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[(N[Sqrt[l], $MachinePrecision] / c0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -1e-307], N[(N[(c0 * N[Sqrt[N[(0.0 - A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(0.0 - N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 0.0], N[(N[(N[Power[l, -0.5], $MachinePrecision] * c0), $MachinePrecision] * N[Power[N[(V / A), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[N[(V * l), $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 -1 \cdot 10^{+253}:\\
\;\;\;\;\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}\\
\mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-307}:\\
\;\;\;\;\frac{c0 \cdot \sqrt{0 - A}}{\sqrt{0 - V \cdot \ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 0:\\
\;\;\;\;\left({\ell}^{-0.5} \cdot c0\right) \cdot {\left(\frac{V}{A}\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\
\end{array}
\end{array}
if (*.f64 V l) < -9.9999999999999994e252Initial program 36.5%
*-commutativeN/A
/-rgt-identityN/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f6436.5%
Applied egg-rr36.5%
Applied egg-rr50.2%
Applied egg-rr50.2%
frac-2negN/A
sub0-negN/A
sub0-negN/A
sqrt-divN/A
unpow1/2N/A
unpow1/2N/A
associate-/r/N/A
*-commutativeN/A
clear-numN/A
un-div-invN/A
sqr-powN/A
pow-prod-downN/A
sub0-negN/A
sub0-negN/A
sqr-negN/A
pow-prod-downN/A
sqr-powN/A
pow1/2N/A
Applied egg-rr47.7%
if -9.9999999999999994e252 < (*.f64 V l) < -9.99999999999999909e-308Initial program 81.7%
frac-2negN/A
sqrt-divN/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f6498.2%
Applied egg-rr98.2%
sub0-negN/A
*-commutativeN/A
distribute-lft-neg-outN/A
neg-lowering-neg.f64N/A
*-lowering-*.f6498.2%
Applied egg-rr98.2%
if -9.99999999999999909e-308 < (*.f64 V l) < -0.0Initial program 42.3%
*-commutativeN/A
associate-/r*N/A
div-invN/A
sqrt-prodN/A
pow1/2N/A
associate-*l*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
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
metadata-eval41.5%
Applied egg-rr41.5%
if -0.0 < (*.f64 V l) Initial program 82.4%
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6490.2%
Applied egg-rr90.2%
Final simplification84.0%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(if (<= (* V l) -1e+253)
(/ (sqrt (/ A V)) (/ (sqrt l) c0))
(if (<= (* V l) -5e-272)
(* (sqrt (- 0.0 A)) (/ c0 (sqrt (- 0.0 (* V l)))))
(if (<= (* V l) 0.0)
(* c0 (/ (pow l -0.5) (sqrt (/ V A))))
(* c0 (/ (sqrt A) (sqrt (* 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+253) {
tmp = sqrt((A / V)) / (sqrt(l) / c0);
} else if ((V * l) <= -5e-272) {
tmp = sqrt((0.0 - A)) * (c0 / sqrt((0.0 - (V * l))));
} else if ((V * l) <= 0.0) {
tmp = c0 * (pow(l, -0.5) / sqrt((V / A)));
} else {
tmp = c0 * (sqrt(A) / sqrt((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+253)) then
tmp = sqrt((a / v)) / (sqrt(l) / c0)
else if ((v * l) <= (-5d-272)) then
tmp = sqrt((0.0d0 - a)) * (c0 / sqrt((0.0d0 - (v * l))))
else if ((v * l) <= 0.0d0) then
tmp = c0 * ((l ** (-0.5d0)) / sqrt((v / a)))
else
tmp = c0 * (sqrt(a) / sqrt((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+253) {
tmp = Math.sqrt((A / V)) / (Math.sqrt(l) / c0);
} else if ((V * l) <= -5e-272) {
tmp = Math.sqrt((0.0 - A)) * (c0 / Math.sqrt((0.0 - (V * l))));
} else if ((V * l) <= 0.0) {
tmp = c0 * (Math.pow(l, -0.5) / Math.sqrt((V / A)));
} else {
tmp = c0 * (Math.sqrt(A) / Math.sqrt((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+253: tmp = math.sqrt((A / V)) / (math.sqrt(l) / c0) elif (V * l) <= -5e-272: tmp = math.sqrt((0.0 - A)) * (c0 / math.sqrt((0.0 - (V * l)))) elif (V * l) <= 0.0: tmp = c0 * (math.pow(l, -0.5) / math.sqrt((V / A))) else: tmp = c0 * (math.sqrt(A) / math.sqrt((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+253) tmp = Float64(sqrt(Float64(A / V)) / Float64(sqrt(l) / c0)); elseif (Float64(V * l) <= -5e-272) tmp = Float64(sqrt(Float64(0.0 - A)) * Float64(c0 / sqrt(Float64(0.0 - Float64(V * l))))); elseif (Float64(V * l) <= 0.0) tmp = Float64(c0 * Float64((l ^ -0.5) / sqrt(Float64(V / A)))); else tmp = Float64(c0 * Float64(sqrt(A) / sqrt(Float64(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+253)
tmp = sqrt((A / V)) / (sqrt(l) / c0);
elseif ((V * l) <= -5e-272)
tmp = sqrt((0.0 - A)) * (c0 / sqrt((0.0 - (V * l))));
elseif ((V * l) <= 0.0)
tmp = c0 * ((l ^ -0.5) / sqrt((V / A)));
else
tmp = c0 * (sqrt(A) / sqrt((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+253], N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[(N[Sqrt[l], $MachinePrecision] / c0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -5e-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], 0.0], N[(c0 * N[(N[Power[l, -0.5], $MachinePrecision] / N[Sqrt[N[(V / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[N[(V * l), $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 -1 \cdot 10^{+253}:\\
\;\;\;\;\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}\\
\mathbf{elif}\;V \cdot \ell \leq -5 \cdot 10^{-272}:\\
\;\;\;\;\sqrt{0 - A} \cdot \frac{c0}{\sqrt{0 - V \cdot \ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 0:\\
\;\;\;\;c0 \cdot \frac{{\ell}^{-0.5}}{\sqrt{\frac{V}{A}}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\
\end{array}
\end{array}
if (*.f64 V l) < -9.9999999999999994e252Initial program 36.5%
*-commutativeN/A
/-rgt-identityN/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f6436.5%
Applied egg-rr36.5%
Applied egg-rr50.2%
Applied egg-rr50.2%
frac-2negN/A
sub0-negN/A
sub0-negN/A
sqrt-divN/A
unpow1/2N/A
unpow1/2N/A
associate-/r/N/A
*-commutativeN/A
clear-numN/A
un-div-invN/A
sqr-powN/A
pow-prod-downN/A
sub0-negN/A
sub0-negN/A
sqr-negN/A
pow-prod-downN/A
sqr-powN/A
pow1/2N/A
Applied egg-rr47.7%
if -9.9999999999999994e252 < (*.f64 V l) < -4.99999999999999982e-272Initial program 82.4%
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--.f6497.4%
Applied egg-rr97.4%
sub0-negN/A
distribute-rgt-neg-outN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f6497.4%
Applied egg-rr97.4%
if -4.99999999999999982e-272 < (*.f64 V l) < -0.0Initial program 48.1%
*-commutativeN/A
/-rgt-identityN/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f6448.0%
Applied egg-rr48.0%
Applied egg-rr66.5%
Applied egg-rr39.0%
if -0.0 < (*.f64 V l) Initial program 82.4%
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6490.2%
Applied egg-rr90.2%
Final simplification81.8%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. (FPCore (c0 A V l) :precision binary64 (if (<= (* V l) 0.0) (/ c0 (sqrt (/ l (/ A V)))) (* c0 (/ (sqrt A) (sqrt (* V l))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= 0.0) {
tmp = c0 / sqrt((l / (A / V)));
} else {
tmp = c0 * (sqrt(A) / sqrt((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) <= 0.0d0) then
tmp = c0 / sqrt((l / (a / v)))
else
tmp = c0 * (sqrt(a) / sqrt((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) <= 0.0) {
tmp = c0 / Math.sqrt((l / (A / V)));
} else {
tmp = c0 * (Math.sqrt(A) / Math.sqrt((V * l)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if (V * l) <= 0.0: tmp = c0 / math.sqrt((l / (A / V))) else: tmp = c0 * (math.sqrt(A) / math.sqrt((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) <= 0.0) tmp = Float64(c0 / sqrt(Float64(l / Float64(A / V)))); else tmp = Float64(c0 * Float64(sqrt(A) / sqrt(Float64(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) <= 0.0)
tmp = c0 / sqrt((l / (A / V)));
else
tmp = c0 * (sqrt(A) / sqrt((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], 0.0], N[(c0 / N[Sqrt[N[(l / N[(A / V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[N[(V * l), $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 0:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{\ell}{\frac{A}{V}}}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\
\end{array}
\end{array}
if (*.f64 V l) < -0.0Initial program 67.1%
*-commutativeN/A
/-rgt-identityN/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f6467.1%
Applied egg-rr67.1%
Applied egg-rr70.1%
Applied egg-rr70.1%
if -0.0 < (*.f64 V l) Initial program 82.4%
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6490.2%
Applied egg-rr90.2%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. (FPCore (c0 A V l) :precision binary64 (if (<= l -2e-310) (* c0 (/ (sqrt A) (sqrt (* V l)))) (* c0 (/ (sqrt (/ A V)) (sqrt l)))))
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((A / V)) / sqrt(l));
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: tmp
if (l <= (-2d-310)) then
tmp = c0 * (sqrt(a) / sqrt((v * l)))
else
tmp = c0 * (sqrt((a / v)) / sqrt(l))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if (l <= -2e-310) {
tmp = c0 * (Math.sqrt(A) / Math.sqrt((V * l)));
} else {
tmp = c0 * (Math.sqrt((A / V)) / Math.sqrt(l));
}
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((A / V)) / math.sqrt(l)) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (l <= -2e-310) tmp = Float64(c0 * Float64(sqrt(A) / sqrt(Float64(V * l)))); else tmp = Float64(c0 * Float64(sqrt(Float64(A / V)) / sqrt(l))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
tmp = 0.0;
if (l <= -2e-310)
tmp = c0 * (sqrt(A) / sqrt((V * l)));
else
tmp = c0 * (sqrt((A / V)) / sqrt(l));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := If[LessEqual[l, -2e-310], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -2 \cdot 10^{-310}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\
\end{array}
\end{array}
if l < -1.999999999999994e-310Initial program 70.7%
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6443.8%
Applied egg-rr43.8%
if -1.999999999999994e-310 < l Initial program 76.8%
*-commutativeN/A
/-rgt-identityN/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f6476.8%
Applied egg-rr76.8%
Applied egg-rr74.5%
Applied egg-rr82.7%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (/ A (* V l))))
(if (<= t_0 0.0)
(* c0 (sqrt (/ (/ A V) l)))
(if (<= t_0 4e+307) (* c0 (sqrt t_0)) (/ c0 (sqrt (/ l (/ A V))))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = A / (V * l);
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * sqrt(((A / V) / l));
} else if (t_0 <= 4e+307) {
tmp = c0 * sqrt(t_0);
} else {
tmp = c0 / sqrt((l / (A / V)));
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: tmp
t_0 = a / (v * l)
if (t_0 <= 0.0d0) then
tmp = c0 * sqrt(((a / v) / l))
else if (t_0 <= 4d+307) then
tmp = c0 * sqrt(t_0)
else
tmp = c0 / sqrt((l / (a / v)))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = A / (V * l);
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * Math.sqrt(((A / V) / l));
} else if (t_0 <= 4e+307) {
tmp = c0 * Math.sqrt(t_0);
} else {
tmp = c0 / Math.sqrt((l / (A / V)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = A / (V * l) tmp = 0 if t_0 <= 0.0: tmp = c0 * math.sqrt(((A / V) / l)) elif t_0 <= 4e+307: tmp = c0 * math.sqrt(t_0) else: tmp = c0 / math.sqrt((l / (A / V))) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = Float64(A / Float64(V * l)) tmp = 0.0 if (t_0 <= 0.0) tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); elseif (t_0 <= 4e+307) tmp = Float64(c0 * sqrt(t_0)); else tmp = Float64(c0 / sqrt(Float64(l / Float64(A / V)))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = A / (V * l);
tmp = 0.0;
if (t_0 <= 0.0)
tmp = c0 * sqrt(((A / V) / l));
elseif (t_0 <= 4e+307)
tmp = c0 * sqrt(t_0);
else
tmp = c0 / sqrt((l / (A / V)));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 4e+307], N[(c0 * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision], N[(c0 / N[Sqrt[N[(l / N[(A / V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \frac{A}{V \cdot \ell}\\
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+307}:\\
\;\;\;\;c0 \cdot \sqrt{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{\ell}{\frac{A}{V}}}}\\
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 0.0Initial program 28.0%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6440.9%
Applied egg-rr40.9%
if 0.0 < (/.f64 A (*.f64 V l)) < 3.99999999999999994e307Initial program 99.6%
if 3.99999999999999994e307 < (/.f64 A (*.f64 V l)) Initial program 38.6%
*-commutativeN/A
/-rgt-identityN/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f6438.6%
Applied egg-rr38.6%
Applied egg-rr52.2%
Applied egg-rr52.3%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (/ A (* V l))))
(if (<= t_0 0.0)
(* c0 (sqrt (/ (/ A V) l)))
(if (<= t_0 2e+300) (* c0 (sqrt t_0)) (/ c0 (sqrt (* V (/ l A))))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = A / (V * l);
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * sqrt(((A / V) / l));
} else if (t_0 <= 2e+300) {
tmp = c0 * sqrt(t_0);
} else {
tmp = c0 / sqrt((V * (l / A)));
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: tmp
t_0 = a / (v * l)
if (t_0 <= 0.0d0) then
tmp = c0 * sqrt(((a / v) / l))
else if (t_0 <= 2d+300) then
tmp = c0 * sqrt(t_0)
else
tmp = c0 / sqrt((v * (l / a)))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = A / (V * l);
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * Math.sqrt(((A / V) / l));
} else if (t_0 <= 2e+300) {
tmp = c0 * Math.sqrt(t_0);
} else {
tmp = c0 / Math.sqrt((V * (l / A)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = A / (V * l) tmp = 0 if t_0 <= 0.0: tmp = c0 * math.sqrt(((A / V) / l)) elif t_0 <= 2e+300: tmp = c0 * math.sqrt(t_0) else: tmp = c0 / math.sqrt((V * (l / A))) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = Float64(A / Float64(V * l)) tmp = 0.0 if (t_0 <= 0.0) tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); elseif (t_0 <= 2e+300) tmp = Float64(c0 * sqrt(t_0)); else tmp = Float64(c0 / sqrt(Float64(V * Float64(l / A)))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = A / (V * l);
tmp = 0.0;
if (t_0 <= 0.0)
tmp = c0 * sqrt(((A / V) / l));
elseif (t_0 <= 2e+300)
tmp = c0 * sqrt(t_0);
else
tmp = c0 / sqrt((V * (l / A)));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+300], N[(c0 * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision], N[(c0 / N[Sqrt[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \frac{A}{V \cdot \ell}\\
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+300}:\\
\;\;\;\;c0 \cdot \sqrt{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 0.0Initial program 28.0%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6440.9%
Applied egg-rr40.9%
if 0.0 < (/.f64 A (*.f64 V l)) < 2.0000000000000001e300Initial program 99.6%
if 2.0000000000000001e300 < (/.f64 A (*.f64 V l)) Initial program 41.7%
*-commutativeN/A
/-rgt-identityN/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f6441.7%
Applied egg-rr41.7%
Applied egg-rr54.6%
Applied egg-rr54.7%
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f6452.1%
Applied egg-rr52.1%
Final simplification78.3%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. (FPCore (c0 A V l) :precision binary64 (let* ((t_0 (/ A (* V l))) (t_1 (* c0 (sqrt (/ (/ A V) l))))) (if (<= t_0 0.0) t_1 (if (<= t_0 4e+307) (* c0 (sqrt t_0)) t_1))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = A / (V * l);
double t_1 = c0 * sqrt(((A / V) / l));
double tmp;
if (t_0 <= 0.0) {
tmp = t_1;
} else if (t_0 <= 4e+307) {
tmp = c0 * sqrt(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 = a / (v * l)
t_1 = c0 * sqrt(((a / v) / l))
if (t_0 <= 0.0d0) then
tmp = t_1
else if (t_0 <= 4d+307) then
tmp = c0 * sqrt(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 = A / (V * l);
double t_1 = c0 * Math.sqrt(((A / V) / l));
double tmp;
if (t_0 <= 0.0) {
tmp = t_1;
} else if (t_0 <= 4e+307) {
tmp = c0 * Math.sqrt(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 = A / (V * l) t_1 = c0 * math.sqrt(((A / V) / l)) tmp = 0 if t_0 <= 0.0: tmp = t_1 elif t_0 <= 4e+307: tmp = c0 * math.sqrt(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(A / Float64(V * l)) t_1 = Float64(c0 * sqrt(Float64(Float64(A / V) / l))) tmp = 0.0 if (t_0 <= 0.0) tmp = t_1; elseif (t_0 <= 4e+307) tmp = Float64(c0 * sqrt(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 = A / (V * l);
t_1 = c0 * sqrt(((A / V) / l));
tmp = 0.0;
if (t_0 <= 0.0)
tmp = t_1;
elseif (t_0 <= 4e+307)
tmp = c0 * sqrt(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[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], t$95$1, If[LessEqual[t$95$0, 4e+307], N[(c0 * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \frac{A}{V \cdot \ell}\\
t_1 := c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+307}:\\
\;\;\;\;c0 \cdot \sqrt{t\_0}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 0.0 or 3.99999999999999994e307 < (/.f64 A (*.f64 V l)) Initial program 33.9%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6445.3%
Applied egg-rr45.3%
if 0.0 < (/.f64 A (*.f64 V l)) < 3.99999999999999994e307Initial program 99.6%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. (FPCore (c0 A V l) :precision binary64 (* c0 (sqrt (/ A (* V l)))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
return c0 * sqrt((A / (V * l)));
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
code = c0 * sqrt((a / (v * l)))
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
return c0 * Math.sqrt((A / (V * l)));
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): return c0 * math.sqrt((A / (V * l)))
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) return Float64(c0 * sqrt(Float64(A / Float64(V * l)))) end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp = code(c0, A, V, l)
tmp = c0 * sqrt((A / (V * l)));
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\end{array}
Initial program 73.7%
herbie shell --seed 2024138
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))