
(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) (- INFINITY))
(* (pow (/ V A) -0.5) (* c0 (pow l -0.5)))
(if (<= (* V l) -5e-272)
(/ (* c0 (sqrt (- 0.0 A))) (sqrt (- 0.0 (* V l))))
(if (<= (* V l) 0.0)
(/ c0 (* (pow (- 0.0 V) 0.5) (sqrt (- 0.0 (/ l A)))))
(if (<= (* V l) 1e+284)
(* c0 (/ (sqrt A) (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 = pow((V / A), -0.5) * (c0 * pow(l, -0.5));
} else if ((V * l) <= -5e-272) {
tmp = (c0 * sqrt((0.0 - A))) / sqrt((0.0 - (V * l)));
} else if ((V * l) <= 0.0) {
tmp = c0 / (pow((0.0 - V), 0.5) * sqrt((0.0 - (l / A))));
} else if ((V * l) <= 1e+284) {
tmp = c0 * (sqrt(A) / 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 = Math.pow((V / A), -0.5) * (c0 * Math.pow(l, -0.5));
} else if ((V * l) <= -5e-272) {
tmp = (c0 * Math.sqrt((0.0 - A))) / Math.sqrt((0.0 - (V * l)));
} else if ((V * l) <= 0.0) {
tmp = c0 / (Math.pow((0.0 - V), 0.5) * Math.sqrt((0.0 - (l / A))));
} else if ((V * l) <= 1e+284) {
tmp = c0 * (Math.sqrt(A) / 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 = math.pow((V / A), -0.5) * (c0 * math.pow(l, -0.5)) elif (V * l) <= -5e-272: tmp = (c0 * math.sqrt((0.0 - A))) / math.sqrt((0.0 - (V * l))) elif (V * l) <= 0.0: tmp = c0 / (math.pow((0.0 - V), 0.5) * math.sqrt((0.0 - (l / A)))) elif (V * l) <= 1e+284: tmp = c0 * (math.sqrt(A) / 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((Float64(V / A) ^ -0.5) * Float64(c0 * (l ^ -0.5))); elseif (Float64(V * l) <= -5e-272) tmp = Float64(Float64(c0 * sqrt(Float64(0.0 - A))) / sqrt(Float64(0.0 - Float64(V * l)))); elseif (Float64(V * l) <= 0.0) tmp = Float64(c0 / Float64((Float64(0.0 - V) ^ 0.5) * sqrt(Float64(0.0 - Float64(l / A))))); elseif (Float64(V * l) <= 1e+284) tmp = Float64(c0 * Float64(sqrt(A) / 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 = ((V / A) ^ -0.5) * (c0 * (l ^ -0.5));
elseif ((V * l) <= -5e-272)
tmp = (c0 * sqrt((0.0 - A))) / sqrt((0.0 - (V * l)));
elseif ((V * l) <= 0.0)
tmp = c0 / (((0.0 - V) ^ 0.5) * sqrt((0.0 - (l / A))));
elseif ((V * l) <= 1e+284)
tmp = c0 * (sqrt(A) / 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[(N[Power[N[(V / A), $MachinePrecision], -0.5], $MachinePrecision] * N[(c0 * N[Power[l, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -5e-272], 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[(c0 / N[(N[Power[N[(0.0 - V), $MachinePrecision], 0.5], $MachinePrecision] * N[Sqrt[N[(0.0 - N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 1e+284], N[(c0 * N[(N[Sqrt[A], $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:\\
\;\;\;\;{\left(\frac{V}{A}\right)}^{-0.5} \cdot \left(c0 \cdot {\ell}^{-0.5}\right)\\
\mathbf{elif}\;V \cdot \ell \leq -5 \cdot 10^{-272}:\\
\;\;\;\;\frac{c0 \cdot \sqrt{0 - A}}{\sqrt{0 - V \cdot \ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 0:\\
\;\;\;\;\frac{c0}{{\left(0 - V\right)}^{0.5} \cdot \sqrt{0 - \frac{\ell}{A}}}\\
\mathbf{elif}\;V \cdot \ell \leq 10^{+284}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\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 40.9%
*-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-eval56.4%
Applied egg-rr56.4%
if -inf.0 < (*.f64 V l) < -4.99999999999999982e-272Initial program 83.0%
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--.f6497.5%
Applied egg-rr97.5%
sub0-negN/A
distribute-rgt-neg-outN/A
remove-double-negN/A
distribute-rgt-neg-inN/A
sub0-negN/A
neg-lowering-neg.f64N/A
sub0-negN/A
distribute-rgt-neg-inN/A
remove-double-negN/A
*-lowering-*.f6497.5%
Applied egg-rr97.5%
if -4.99999999999999982e-272 < (*.f64 V l) < 0.0Initial program 34.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-/.f6476.8%
Applied egg-rr76.8%
frac-2negN/A
div-invN/A
sqrt-prodN/A
distribute-frac-neg2N/A
clear-numN/A
*-lowering-*.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
neg-sub0N/A
--lowering--.f64N/A
distribute-frac-neg2N/A
sqrt-lowering-sqrt.f64N/A
distribute-frac-neg2N/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f6455.0%
Applied egg-rr55.0%
if 0.0 < (*.f64 V l) < 1.00000000000000008e284Initial program 79.2%
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6498.6%
Applied egg-rr98.6%
if 1.00000000000000008e284 < (*.f64 V l) Initial program 49.0%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6488.8%
Applied egg-rr88.8%
Final simplification89.5%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (* c0 (sqrt (/ A (* V l))))))
(if (<= t_0 4e-291)
(* c0 (sqrt (/ (/ A l) V)))
(if (<= t_0 1e+190) t_0 (/ c0 (sqrt (/ V (/ A l))))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = c0 * sqrt((A / (V * l)));
double tmp;
if (t_0 <= 4e-291) {
tmp = c0 * sqrt(((A / l) / V));
} else if (t_0 <= 1e+190) {
tmp = t_0;
} else {
tmp = c0 / sqrt((V / (A / l)));
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: tmp
t_0 = c0 * sqrt((a / (v * l)))
if (t_0 <= 4d-291) then
tmp = c0 * sqrt(((a / l) / v))
else if (t_0 <= 1d+190) then
tmp = t_0
else
tmp = c0 / sqrt((v / (a / l)))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = c0 * Math.sqrt((A / (V * l)));
double tmp;
if (t_0 <= 4e-291) {
tmp = c0 * Math.sqrt(((A / l) / V));
} else if (t_0 <= 1e+190) {
tmp = t_0;
} else {
tmp = c0 / Math.sqrt((V / (A / l)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = c0 * math.sqrt((A / (V * l))) tmp = 0 if t_0 <= 4e-291: tmp = c0 * math.sqrt(((A / l) / V)) elif t_0 <= 1e+190: tmp = t_0 else: tmp = c0 / math.sqrt((V / (A / l))) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = Float64(c0 * sqrt(Float64(A / Float64(V * l)))) tmp = 0.0 if (t_0 <= 4e-291) tmp = Float64(c0 * sqrt(Float64(Float64(A / l) / V))); elseif (t_0 <= 1e+190) tmp = t_0; else tmp = Float64(c0 / sqrt(Float64(V / Float64(A / l)))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = c0 * sqrt((A / (V * l)));
tmp = 0.0;
if (t_0 <= 4e-291)
tmp = c0 * sqrt(((A / l) / V));
elseif (t_0 <= 1e+190)
tmp = t_0;
else
tmp = c0 / sqrt((V / (A / l)));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 4e-291], N[(c0 * N[Sqrt[N[(N[(A / l), $MachinePrecision] / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+190], t$95$0, N[(c0 / N[Sqrt[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\
\mathbf{if}\;t\_0 \leq 4 \cdot 10^{-291}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\
\mathbf{elif}\;t\_0 \leq 10^{+190}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}\\
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 3.99999999999999985e-291Initial program 64.9%
associate-/l/N/A
/-lowering-/.f64N/A
/-lowering-/.f6471.1%
Applied egg-rr71.1%
if 3.99999999999999985e-291 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1.0000000000000001e190Initial program 97.3%
if 1.0000000000000001e190 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 54.9%
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f6471.9%
Applied egg-rr71.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 4e-291)
(* c0 (sqrt (/ (/ A l) V)))
(if (<= t_0 1e+304) 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 <= 4e-291) {
tmp = c0 * sqrt(((A / l) / V));
} else if (t_0 <= 1e+304) {
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 <= 4d-291) then
tmp = c0 * sqrt(((a / l) / v))
else if (t_0 <= 1d+304) 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 <= 4e-291) {
tmp = c0 * Math.sqrt(((A / l) / V));
} else if (t_0 <= 1e+304) {
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 <= 4e-291: tmp = c0 * math.sqrt(((A / l) / V)) elif t_0 <= 1e+304: 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 <= 4e-291) tmp = Float64(c0 * sqrt(Float64(Float64(A / l) / V))); elseif (t_0 <= 1e+304) 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 <= 4e-291)
tmp = c0 * sqrt(((A / l) / V));
elseif (t_0 <= 1e+304)
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, 4e-291], N[(c0 * N[Sqrt[N[(N[(A / l), $MachinePrecision] / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+304], 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 4 \cdot 10^{-291}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\
\mathbf{elif}\;t\_0 \leq 10^{+304}:\\
\;\;\;\;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)))) < 3.99999999999999985e-291Initial program 64.9%
associate-/l/N/A
/-lowering-/.f64N/A
/-lowering-/.f6471.1%
Applied egg-rr71.1%
if 3.99999999999999985e-291 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 9.9999999999999994e303Initial program 96.7%
if 9.9999999999999994e303 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 45.4%
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-/.f6465.0%
Applied egg-rr65.0%
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f6465.1%
Applied egg-rr65.1%
Final simplification76.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))))) (t_1 (* c0 (sqrt (/ (/ A l) V))))) (if (<= t_0 4e-291) t_1 (if (<= t_0 5e+192) 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 / l) / V));
double tmp;
if (t_0 <= 4e-291) {
tmp = t_1;
} else if (t_0 <= 5e+192) {
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 / l) / v))
if (t_0 <= 4d-291) then
tmp = t_1
else if (t_0 <= 5d+192) 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 / l) / V));
double tmp;
if (t_0 <= 4e-291) {
tmp = t_1;
} else if (t_0 <= 5e+192) {
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 / l) / V)) tmp = 0 if t_0 <= 4e-291: tmp = t_1 elif t_0 <= 5e+192: 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 / l) / V))) tmp = 0.0 if (t_0 <= 4e-291) tmp = t_1; elseif (t_0 <= 5e+192) 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 / l) / V));
tmp = 0.0;
if (t_0 <= 4e-291)
tmp = t_1;
elseif (t_0 <= 5e+192)
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 / l), $MachinePrecision] / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 4e-291], t$95$1, If[LessEqual[t$95$0, 5e+192], 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}{\ell}}{V}}\\
\mathbf{if}\;t\_0 \leq 4 \cdot 10^{-291}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+192}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 3.99999999999999985e-291 or 5.00000000000000033e192 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 63.0%
associate-/l/N/A
/-lowering-/.f64N/A
/-lowering-/.f6470.7%
Applied egg-rr70.7%
if 3.99999999999999985e-291 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 5.00000000000000033e192Initial program 97.3%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. (FPCore (c0 A V l) :precision binary64 (let* ((t_0 (* c0 (sqrt (/ A (* V l))))) (t_1 (* c0 (sqrt (/ (/ A V) l))))) (if (<= t_0 0.0) t_1 (if (<= t_0 5e+293) 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 <= 0.0) {
tmp = t_1;
} else if (t_0 <= 5e+293) {
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 <= 0.0d0) then
tmp = t_1
else if (t_0 <= 5d+293) 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 <= 0.0) {
tmp = t_1;
} else if (t_0 <= 5e+293) {
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 <= 0.0: tmp = t_1 elif t_0 <= 5e+293: 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 <= 0.0) tmp = t_1; elseif (t_0 <= 5e+293) 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 <= 0.0)
tmp = t_1;
elseif (t_0 <= 5e+293)
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, 0.0], t$95$1, If[LessEqual[t$95$0, 5e+293], 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 0:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+293}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 0.0 or 5.00000000000000033e293 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 62.1%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6471.5%
Applied egg-rr71.5%
if 0.0 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 5.00000000000000033e293Initial program 96.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 (pow (- 0.0 V) 0.5)))
(if (<= (* V l) -5e-272)
(/ (/ (* c0 (sqrt (- 0.0 A))) (sqrt l)) t_0)
(if (<= (* V l) 0.0)
(/ c0 (* t_0 (sqrt (- 0.0 (/ l A)))))
(if (<= (* V l) 1e+284)
(* c0 (/ (sqrt A) (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 = pow((0.0 - V), 0.5);
double tmp;
if ((V * l) <= -5e-272) {
tmp = ((c0 * sqrt((0.0 - A))) / sqrt(l)) / t_0;
} else if ((V * l) <= 0.0) {
tmp = c0 / (t_0 * sqrt((0.0 - (l / A))));
} else if ((V * l) <= 1e+284) {
tmp = c0 * (sqrt(A) / 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) :: t_0
real(8) :: tmp
t_0 = (0.0d0 - v) ** 0.5d0
if ((v * l) <= (-5d-272)) then
tmp = ((c0 * sqrt((0.0d0 - a))) / sqrt(l)) / t_0
else if ((v * l) <= 0.0d0) then
tmp = c0 / (t_0 * sqrt((0.0d0 - (l / a))))
else if ((v * l) <= 1d+284) then
tmp = c0 * (sqrt(a) / 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 t_0 = Math.pow((0.0 - V), 0.5);
double tmp;
if ((V * l) <= -5e-272) {
tmp = ((c0 * Math.sqrt((0.0 - A))) / Math.sqrt(l)) / t_0;
} else if ((V * l) <= 0.0) {
tmp = c0 / (t_0 * Math.sqrt((0.0 - (l / A))));
} else if ((V * l) <= 1e+284) {
tmp = c0 * (Math.sqrt(A) / 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.pow((0.0 - V), 0.5) tmp = 0 if (V * l) <= -5e-272: tmp = ((c0 * math.sqrt((0.0 - A))) / math.sqrt(l)) / t_0 elif (V * l) <= 0.0: tmp = c0 / (t_0 * math.sqrt((0.0 - (l / A)))) elif (V * l) <= 1e+284: tmp = c0 * (math.sqrt(A) / 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 = Float64(0.0 - V) ^ 0.5 tmp = 0.0 if (Float64(V * l) <= -5e-272) tmp = Float64(Float64(Float64(c0 * sqrt(Float64(0.0 - A))) / sqrt(l)) / t_0); elseif (Float64(V * l) <= 0.0) tmp = Float64(c0 / Float64(t_0 * sqrt(Float64(0.0 - Float64(l / A))))); elseif (Float64(V * l) <= 1e+284) tmp = Float64(c0 * Float64(sqrt(A) / 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 = (0.0 - V) ^ 0.5;
tmp = 0.0;
if ((V * l) <= -5e-272)
tmp = ((c0 * sqrt((0.0 - A))) / sqrt(l)) / t_0;
elseif ((V * l) <= 0.0)
tmp = c0 / (t_0 * sqrt((0.0 - (l / A))));
elseif ((V * l) <= 1e+284)
tmp = c0 * (sqrt(A) / 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[Power[N[(0.0 - V), $MachinePrecision], 0.5], $MachinePrecision]}, If[LessEqual[N[(V * l), $MachinePrecision], -5e-272], N[(N[(N[(c0 * N[Sqrt[N[(0.0 - A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 0.0], N[(c0 / N[(t$95$0 * N[Sqrt[N[(0.0 - N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 1e+284], N[(c0 * N[(N[Sqrt[A], $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 := {\left(0 - V\right)}^{0.5}\\
\mathbf{if}\;V \cdot \ell \leq -5 \cdot 10^{-272}:\\
\;\;\;\;\frac{\frac{c0 \cdot \sqrt{0 - A}}{\sqrt{\ell}}}{t\_0}\\
\mathbf{elif}\;V \cdot \ell \leq 0:\\
\;\;\;\;\frac{c0}{t\_0 \cdot \sqrt{0 - \frac{\ell}{A}}}\\
\mathbf{elif}\;V \cdot \ell \leq 10^{+284}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\end{array}
\end{array}
if (*.f64 V l) < -4.99999999999999982e-272Initial program 76.7%
frac-2negN/A
sqrt-divN/A
associate-*r/N/A
distribute-lft-neg-inN/A
sqrt-prodN/A
pow1/2N/A
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
pow-lowering-pow.f64N/A
neg-sub0N/A
--lowering--.f6458.7%
Applied egg-rr58.7%
if -4.99999999999999982e-272 < (*.f64 V l) < 0.0Initial program 34.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-/.f6476.8%
Applied egg-rr76.8%
frac-2negN/A
div-invN/A
sqrt-prodN/A
distribute-frac-neg2N/A
clear-numN/A
*-lowering-*.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
neg-sub0N/A
--lowering--.f64N/A
distribute-frac-neg2N/A
sqrt-lowering-sqrt.f64N/A
distribute-frac-neg2N/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f6455.0%
Applied egg-rr55.0%
if 0.0 < (*.f64 V l) < 1.00000000000000008e284Initial program 79.2%
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6498.6%
Applied egg-rr98.6%
if 1.00000000000000008e284 < (*.f64 V l) Initial program 49.0%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6488.8%
Applied egg-rr88.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) (- INFINITY))
(* (pow (/ V A) -0.5) (* c0 (pow l -0.5)))
(if (<= (* V l) -5e-272)
(/ (* c0 (sqrt (- 0.0 A))) (sqrt (- 0.0 (* V l))))
(if (<= (* V l) 0.0)
(* c0 (* (sqrt (/ -1.0 V)) (sqrt (/ A (- 0.0 l)))))
(if (<= (* V l) 1e+284)
(* c0 (/ (sqrt A) (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 = pow((V / A), -0.5) * (c0 * pow(l, -0.5));
} else if ((V * l) <= -5e-272) {
tmp = (c0 * sqrt((0.0 - A))) / sqrt((0.0 - (V * l)));
} else if ((V * l) <= 0.0) {
tmp = c0 * (sqrt((-1.0 / V)) * sqrt((A / (0.0 - l))));
} else if ((V * l) <= 1e+284) {
tmp = c0 * (sqrt(A) / 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 = Math.pow((V / A), -0.5) * (c0 * Math.pow(l, -0.5));
} else if ((V * l) <= -5e-272) {
tmp = (c0 * Math.sqrt((0.0 - A))) / Math.sqrt((0.0 - (V * l)));
} else if ((V * l) <= 0.0) {
tmp = c0 * (Math.sqrt((-1.0 / V)) * Math.sqrt((A / (0.0 - l))));
} else if ((V * l) <= 1e+284) {
tmp = c0 * (Math.sqrt(A) / 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 = math.pow((V / A), -0.5) * (c0 * math.pow(l, -0.5)) elif (V * l) <= -5e-272: tmp = (c0 * math.sqrt((0.0 - A))) / math.sqrt((0.0 - (V * l))) elif (V * l) <= 0.0: tmp = c0 * (math.sqrt((-1.0 / V)) * math.sqrt((A / (0.0 - l)))) elif (V * l) <= 1e+284: tmp = c0 * (math.sqrt(A) / 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((Float64(V / A) ^ -0.5) * Float64(c0 * (l ^ -0.5))); elseif (Float64(V * l) <= -5e-272) tmp = Float64(Float64(c0 * sqrt(Float64(0.0 - A))) / sqrt(Float64(0.0 - Float64(V * l)))); elseif (Float64(V * l) <= 0.0) tmp = Float64(c0 * Float64(sqrt(Float64(-1.0 / V)) * sqrt(Float64(A / Float64(0.0 - l))))); elseif (Float64(V * l) <= 1e+284) tmp = Float64(c0 * Float64(sqrt(A) / 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 = ((V / A) ^ -0.5) * (c0 * (l ^ -0.5));
elseif ((V * l) <= -5e-272)
tmp = (c0 * sqrt((0.0 - A))) / sqrt((0.0 - (V * l)));
elseif ((V * l) <= 0.0)
tmp = c0 * (sqrt((-1.0 / V)) * sqrt((A / (0.0 - l))));
elseif ((V * l) <= 1e+284)
tmp = c0 * (sqrt(A) / 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[(N[Power[N[(V / A), $MachinePrecision], -0.5], $MachinePrecision] * N[(c0 * N[Power[l, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -5e-272], 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[(c0 * N[(N[Sqrt[N[(-1.0 / V), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(A / N[(0.0 - l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 1e+284], N[(c0 * N[(N[Sqrt[A], $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:\\
\;\;\;\;{\left(\frac{V}{A}\right)}^{-0.5} \cdot \left(c0 \cdot {\ell}^{-0.5}\right)\\
\mathbf{elif}\;V \cdot \ell \leq -5 \cdot 10^{-272}:\\
\;\;\;\;\frac{c0 \cdot \sqrt{0 - A}}{\sqrt{0 - V \cdot \ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 0:\\
\;\;\;\;c0 \cdot \left(\sqrt{\frac{-1}{V}} \cdot \sqrt{\frac{A}{0 - \ell}}\right)\\
\mathbf{elif}\;V \cdot \ell \leq 10^{+284}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\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 40.9%
*-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-eval56.4%
Applied egg-rr56.4%
if -inf.0 < (*.f64 V l) < -4.99999999999999982e-272Initial program 83.0%
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--.f6497.5%
Applied egg-rr97.5%
sub0-negN/A
distribute-rgt-neg-outN/A
remove-double-negN/A
distribute-rgt-neg-inN/A
sub0-negN/A
neg-lowering-neg.f64N/A
sub0-negN/A
distribute-rgt-neg-inN/A
remove-double-negN/A
*-lowering-*.f6497.5%
Applied egg-rr97.5%
if -4.99999999999999982e-272 < (*.f64 V l) < 0.0Initial program 34.5%
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--.f6453.5%
Applied egg-rr53.5%
if 0.0 < (*.f64 V l) < 1.00000000000000008e284Initial program 79.2%
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6498.6%
Applied egg-rr98.6%
if 1.00000000000000008e284 < (*.f64 V l) Initial program 49.0%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6488.8%
Applied egg-rr88.8%
Final simplification89.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))
(* (pow (/ V A) -0.5) (* c0 (pow l -0.5)))
(if (<= (* V l) -4e-296)
(/ (* c0 (sqrt (- 0.0 A))) (sqrt (- 0.0 (* V l))))
(if (<= (* V l) 5e-312)
(/ c0 (sqrt (* l (/ V A))))
(if (<= (* V l) 1e+284)
(* c0 (/ (sqrt A) (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 = pow((V / A), -0.5) * (c0 * pow(l, -0.5));
} else if ((V * l) <= -4e-296) {
tmp = (c0 * sqrt((0.0 - A))) / sqrt((0.0 - (V * l)));
} else if ((V * l) <= 5e-312) {
tmp = c0 / sqrt((l * (V / A)));
} else if ((V * l) <= 1e+284) {
tmp = c0 * (sqrt(A) / 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 = Math.pow((V / A), -0.5) * (c0 * Math.pow(l, -0.5));
} else if ((V * l) <= -4e-296) {
tmp = (c0 * Math.sqrt((0.0 - A))) / Math.sqrt((0.0 - (V * l)));
} else if ((V * l) <= 5e-312) {
tmp = c0 / Math.sqrt((l * (V / A)));
} else if ((V * l) <= 1e+284) {
tmp = c0 * (Math.sqrt(A) / 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 = math.pow((V / A), -0.5) * (c0 * math.pow(l, -0.5)) elif (V * l) <= -4e-296: tmp = (c0 * math.sqrt((0.0 - A))) / math.sqrt((0.0 - (V * l))) elif (V * l) <= 5e-312: tmp = c0 / math.sqrt((l * (V / A))) elif (V * l) <= 1e+284: tmp = c0 * (math.sqrt(A) / 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((Float64(V / A) ^ -0.5) * Float64(c0 * (l ^ -0.5))); elseif (Float64(V * l) <= -4e-296) tmp = Float64(Float64(c0 * sqrt(Float64(0.0 - A))) / sqrt(Float64(0.0 - Float64(V * l)))); elseif (Float64(V * l) <= 5e-312) tmp = Float64(c0 / sqrt(Float64(l * Float64(V / A)))); elseif (Float64(V * l) <= 1e+284) tmp = Float64(c0 * Float64(sqrt(A) / 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 = ((V / A) ^ -0.5) * (c0 * (l ^ -0.5));
elseif ((V * l) <= -4e-296)
tmp = (c0 * sqrt((0.0 - A))) / sqrt((0.0 - (V * l)));
elseif ((V * l) <= 5e-312)
tmp = c0 / sqrt((l * (V / A)));
elseif ((V * l) <= 1e+284)
tmp = c0 * (sqrt(A) / 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[(N[Power[N[(V / A), $MachinePrecision], -0.5], $MachinePrecision] * N[(c0 * N[Power[l, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -4e-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], 5e-312], N[(c0 / N[Sqrt[N[(l * N[(V / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 1e+284], N[(c0 * N[(N[Sqrt[A], $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:\\
\;\;\;\;{\left(\frac{V}{A}\right)}^{-0.5} \cdot \left(c0 \cdot {\ell}^{-0.5}\right)\\
\mathbf{elif}\;V \cdot \ell \leq -4 \cdot 10^{-296}:\\
\;\;\;\;\frac{c0 \cdot \sqrt{0 - A}}{\sqrt{0 - V \cdot \ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{-312}:\\
\;\;\;\;\frac{c0}{\sqrt{\ell \cdot \frac{V}{A}}}\\
\mathbf{elif}\;V \cdot \ell \leq 10^{+284}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\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 40.9%
*-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-eval56.4%
Applied egg-rr56.4%
if -inf.0 < (*.f64 V l) < -4e-296Initial program 82.6%
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--.f6497.6%
Applied egg-rr97.6%
sub0-negN/A
distribute-rgt-neg-outN/A
remove-double-negN/A
distribute-rgt-neg-inN/A
sub0-negN/A
neg-lowering-neg.f64N/A
sub0-negN/A
distribute-rgt-neg-inN/A
remove-double-negN/A
*-lowering-*.f6497.6%
Applied egg-rr97.6%
if -4e-296 < (*.f64 V l) < 5.0000000000022e-312Initial program 33.3%
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f6479.3%
Applied egg-rr79.3%
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f6479.4%
Applied egg-rr79.4%
if 5.0000000000022e-312 < (*.f64 V l) < 1.00000000000000008e284Initial program 79.4%
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6499.3%
Applied egg-rr99.3%
if 1.00000000000000008e284 < (*.f64 V l) Initial program 49.0%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6488.8%
Applied egg-rr88.8%
Final simplification92.7%
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-272)
(* c0 (/ (sqrt (/ A V)) (sqrt l)))
(if (<= (* V l) 5e-312)
(/ c0 (sqrt (* l (/ V A))))
(if (<= (* V l) 1e+284)
(* c0 (/ (sqrt A) (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) <= -5e-272) {
tmp = c0 * (sqrt((A / V)) / sqrt(l));
} else if ((V * l) <= 5e-312) {
tmp = c0 / sqrt((l * (V / A)));
} else if ((V * l) <= 1e+284) {
tmp = c0 * (sqrt(A) / 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) <= (-5d-272)) then
tmp = c0 * (sqrt((a / v)) / sqrt(l))
else if ((v * l) <= 5d-312) then
tmp = c0 / sqrt((l * (v / a)))
else if ((v * l) <= 1d+284) then
tmp = c0 * (sqrt(a) / 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) <= -5e-272) {
tmp = c0 * (Math.sqrt((A / V)) / Math.sqrt(l));
} else if ((V * l) <= 5e-312) {
tmp = c0 / Math.sqrt((l * (V / A)));
} else if ((V * l) <= 1e+284) {
tmp = c0 * (Math.sqrt(A) / 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) <= -5e-272: tmp = c0 * (math.sqrt((A / V)) / math.sqrt(l)) elif (V * l) <= 5e-312: tmp = c0 / math.sqrt((l * (V / A))) elif (V * l) <= 1e+284: tmp = c0 * (math.sqrt(A) / 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) <= -5e-272) tmp = Float64(c0 * Float64(sqrt(Float64(A / V)) / sqrt(l))); elseif (Float64(V * l) <= 5e-312) tmp = Float64(c0 / sqrt(Float64(l * Float64(V / A)))); elseif (Float64(V * l) <= 1e+284) tmp = Float64(c0 * Float64(sqrt(A) / 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) <= -5e-272)
tmp = c0 * (sqrt((A / V)) / sqrt(l));
elseif ((V * l) <= 5e-312)
tmp = c0 / sqrt((l * (V / A)));
elseif ((V * l) <= 1e+284)
tmp = c0 * (sqrt(A) / 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], -5e-272], N[(c0 * N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 5e-312], N[(c0 / N[Sqrt[N[(l * N[(V / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 1e+284], N[(c0 * N[(N[Sqrt[A], $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 -5 \cdot 10^{-272}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{-312}:\\
\;\;\;\;\frac{c0}{\sqrt{\ell \cdot \frac{V}{A}}}\\
\mathbf{elif}\;V \cdot \ell \leq 10^{+284}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\end{array}
\end{array}
if (*.f64 V l) < -4.99999999999999982e-272Initial program 76.7%
associate-/r*N/A
sqrt-divN/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
sqrt-lowering-sqrt.f6453.3%
Applied egg-rr53.3%
clear-numN/A
inv-powN/A
pow-powN/A
metadata-evalN/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f6453.4%
Applied egg-rr53.4%
if -4.99999999999999982e-272 < (*.f64 V l) < 5.0000000000022e-312Initial program 36.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-/.f6478.3%
Applied egg-rr78.3%
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f6478.3%
Applied egg-rr78.3%
if 5.0000000000022e-312 < (*.f64 V l) < 1.00000000000000008e284Initial program 79.4%
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6499.3%
Applied egg-rr99.3%
if 1.00000000000000008e284 < (*.f64 V l) Initial program 49.0%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6488.8%
Applied egg-rr88.8%
Final simplification76.5%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(if (<= (* V l) 1e-318)
(/ c0 (/ (pow (/ V A) 0.5) (pow l -0.5)))
(if (<= (* V l) 1e+284)
(* c0 (/ (sqrt A) (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-318) {
tmp = c0 / (pow((V / A), 0.5) / pow(l, -0.5));
} else if ((V * l) <= 1e+284) {
tmp = c0 * (sqrt(A) / 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-318) then
tmp = c0 / (((v / a) ** 0.5d0) / (l ** (-0.5d0)))
else if ((v * l) <= 1d+284) then
tmp = c0 * (sqrt(a) / 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-318) {
tmp = c0 / (Math.pow((V / A), 0.5) / Math.pow(l, -0.5));
} else if ((V * l) <= 1e+284) {
tmp = c0 * (Math.sqrt(A) / 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-318: tmp = c0 / (math.pow((V / A), 0.5) / math.pow(l, -0.5)) elif (V * l) <= 1e+284: tmp = c0 * (math.sqrt(A) / 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-318) tmp = Float64(c0 / Float64((Float64(V / A) ^ 0.5) / (l ^ -0.5))); elseif (Float64(V * l) <= 1e+284) tmp = Float64(c0 * Float64(sqrt(A) / 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-318)
tmp = c0 / (((V / A) ^ 0.5) / (l ^ -0.5));
elseif ((V * l) <= 1e+284)
tmp = c0 * (sqrt(A) / 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-318], N[(c0 / N[(N[Power[N[(V / A), $MachinePrecision], 0.5], $MachinePrecision] / N[Power[l, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 1e+284], N[(c0 * N[(N[Sqrt[A], $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 10^{-318}:\\
\;\;\;\;\frac{c0}{\frac{{\left(\frac{V}{A}\right)}^{0.5}}{{\ell}^{-0.5}}}\\
\mathbf{elif}\;V \cdot \ell \leq 10^{+284}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\end{array}
\end{array}
if (*.f64 V l) < 9.9999875e-319Initial program 67.4%
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.0%
Applied egg-rr72.0%
div-invN/A
associate-/r*N/A
sqrt-divN/A
pow1/2N/A
/-lowering-/.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
inv-powN/A
pow-powN/A
metadata-evalN/A
pow-lowering-pow.f6450.2%
Applied egg-rr50.2%
if 9.9999875e-319 < (*.f64 V l) < 1.00000000000000008e284Initial program 79.5%
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6499.2%
Applied egg-rr99.2%
if 1.00000000000000008e284 < (*.f64 V l) Initial program 49.0%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6488.8%
Applied egg-rr88.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-318)
(* c0 (/ (pow (/ V A) -0.5) (sqrt l)))
(if (<= (* V l) 1e+284)
(* c0 (/ (sqrt A) (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-318) {
tmp = c0 * (pow((V / A), -0.5) / sqrt(l));
} else if ((V * l) <= 1e+284) {
tmp = c0 * (sqrt(A) / 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-318) then
tmp = c0 * (((v / a) ** (-0.5d0)) / sqrt(l))
else if ((v * l) <= 1d+284) then
tmp = c0 * (sqrt(a) / 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-318) {
tmp = c0 * (Math.pow((V / A), -0.5) / Math.sqrt(l));
} else if ((V * l) <= 1e+284) {
tmp = c0 * (Math.sqrt(A) / 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-318: tmp = c0 * (math.pow((V / A), -0.5) / math.sqrt(l)) elif (V * l) <= 1e+284: tmp = c0 * (math.sqrt(A) / 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-318) tmp = Float64(c0 * Float64((Float64(V / A) ^ -0.5) / sqrt(l))); elseif (Float64(V * l) <= 1e+284) tmp = Float64(c0 * Float64(sqrt(A) / 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-318)
tmp = c0 * (((V / A) ^ -0.5) / sqrt(l));
elseif ((V * l) <= 1e+284)
tmp = c0 * (sqrt(A) / 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-318], N[(c0 * N[(N[Power[N[(V / A), $MachinePrecision], -0.5], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 1e+284], N[(c0 * N[(N[Sqrt[A], $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 10^{-318}:\\
\;\;\;\;c0 \cdot \frac{{\left(\frac{V}{A}\right)}^{-0.5}}{\sqrt{\ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 10^{+284}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\end{array}
\end{array}
if (*.f64 V l) < 9.9999875e-319Initial program 67.4%
associate-/r*N/A
sqrt-divN/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
sqrt-lowering-sqrt.f6450.0%
Applied egg-rr50.0%
if 9.9999875e-319 < (*.f64 V l) < 1.00000000000000008e284Initial program 79.5%
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6499.2%
Applied egg-rr99.2%
if 1.00000000000000008e284 < (*.f64 V l) Initial program 49.0%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6488.8%
Applied egg-rr88.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) 5e-312)
(/ c0 (sqrt (/ V (/ A l))))
(if (<= (* V l) 1e+284)
(* c0 (/ (sqrt A) (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) <= 5e-312) {
tmp = c0 / sqrt((V / (A / l)));
} else if ((V * l) <= 1e+284) {
tmp = c0 * (sqrt(A) / 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) <= 5d-312) then
tmp = c0 / sqrt((v / (a / l)))
else if ((v * l) <= 1d+284) then
tmp = c0 * (sqrt(a) / 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) <= 5e-312) {
tmp = c0 / Math.sqrt((V / (A / l)));
} else if ((V * l) <= 1e+284) {
tmp = c0 * (Math.sqrt(A) / 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) <= 5e-312: tmp = c0 / math.sqrt((V / (A / l))) elif (V * l) <= 1e+284: tmp = c0 * (math.sqrt(A) / 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) <= 5e-312) tmp = Float64(c0 / sqrt(Float64(V / Float64(A / l)))); elseif (Float64(V * l) <= 1e+284) tmp = Float64(c0 * Float64(sqrt(A) / 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) <= 5e-312)
tmp = c0 / sqrt((V / (A / l)));
elseif ((V * l) <= 1e+284)
tmp = c0 * (sqrt(A) / 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], 5e-312], N[(c0 / N[Sqrt[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 1e+284], N[(c0 * N[(N[Sqrt[A], $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 5 \cdot 10^{-312}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}\\
\mathbf{elif}\;V \cdot \ell \leq 10^{+284}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\end{array}
\end{array}
if (*.f64 V l) < 5.0000000000022e-312Initial program 67.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.2%
Applied egg-rr72.2%
if 5.0000000000022e-312 < (*.f64 V l) < 1.00000000000000008e284Initial program 79.4%
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6499.3%
Applied egg-rr99.3%
if 1.00000000000000008e284 < (*.f64 V l) Initial program 49.0%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6488.8%
Applied egg-rr88.8%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (/ A (* V l))))
(if (<= t_0 5e-322)
(* (/ c0 l) (sqrt (/ (* l A) V)))
(if (<= t_0 1e+292) (* c0 (sqrt t_0)) (/ c0 (sqrt (/ V (/ A l))))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = A / (V * l);
double tmp;
if (t_0 <= 5e-322) {
tmp = (c0 / l) * sqrt(((l * A) / V));
} else if (t_0 <= 1e+292) {
tmp = c0 * sqrt(t_0);
} else {
tmp = c0 / sqrt((V / (A / l)));
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: tmp
t_0 = a / (v * l)
if (t_0 <= 5d-322) then
tmp = (c0 / l) * sqrt(((l * a) / v))
else if (t_0 <= 1d+292) then
tmp = c0 * sqrt(t_0)
else
tmp = c0 / sqrt((v / (a / l)))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = A / (V * l);
double tmp;
if (t_0 <= 5e-322) {
tmp = (c0 / l) * Math.sqrt(((l * A) / V));
} else if (t_0 <= 1e+292) {
tmp = c0 * Math.sqrt(t_0);
} else {
tmp = c0 / Math.sqrt((V / (A / l)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = A / (V * l) tmp = 0 if t_0 <= 5e-322: tmp = (c0 / l) * math.sqrt(((l * A) / V)) elif t_0 <= 1e+292: tmp = c0 * math.sqrt(t_0) else: tmp = c0 / math.sqrt((V / (A / l))) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = Float64(A / Float64(V * l)) tmp = 0.0 if (t_0 <= 5e-322) tmp = Float64(Float64(c0 / l) * sqrt(Float64(Float64(l * A) / V))); elseif (t_0 <= 1e+292) tmp = Float64(c0 * sqrt(t_0)); else tmp = Float64(c0 / sqrt(Float64(V / Float64(A / l)))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = A / (V * l);
tmp = 0.0;
if (t_0 <= 5e-322)
tmp = (c0 / l) * sqrt(((l * A) / V));
elseif (t_0 <= 1e+292)
tmp = c0 * sqrt(t_0);
else
tmp = c0 / sqrt((V / (A / l)));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 5e-322], N[(N[(c0 / l), $MachinePrecision] * N[Sqrt[N[(N[(l * A), $MachinePrecision] / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+292], N[(c0 * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision], N[(c0 / N[Sqrt[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \frac{A}{V \cdot \ell}\\
\mathbf{if}\;t\_0 \leq 5 \cdot 10^{-322}:\\
\;\;\;\;\frac{c0}{\ell} \cdot \sqrt{\frac{\ell \cdot A}{V}}\\
\mathbf{elif}\;t\_0 \leq 10^{+292}:\\
\;\;\;\;c0 \cdot \sqrt{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}\\
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 4.99006e-322Initial program 36.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-/.f6456.4%
Applied egg-rr56.4%
clear-numN/A
*-rgt-identityN/A
sqrt-divN/A
associate-/r/N/A
associate-*l*N/A
metadata-evalN/A
*-inversesN/A
sqrt-prodN/A
times-fracN/A
sqrt-divN/A
pow2N/A
sqrt-pow1N/A
metadata-evalN/A
unpow1N/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr35.0%
associate-*l/N/A
associate-/l/N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow1/2N/A
sqrt-undivN/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6452.1%
Applied egg-rr52.1%
if 4.99006e-322 < (/.f64 A (*.f64 V l)) < 1e292Initial program 98.5%
if 1e292 < (/.f64 A (*.f64 V l)) Initial program 33.7%
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-*l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
/-lowering-/.f6457.5%
Applied egg-rr57.5%
Final simplification78.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 70.0%
herbie shell --seed 2024145
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))