
(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 16 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}
(FPCore (c0 A V l) :precision binary64 (* c0 (pow (/ (cbrt A) (* (cbrt l) (cbrt V))) 1.5)))
double code(double c0, double A, double V, double l) {
return c0 * pow((cbrt(A) / (cbrt(l) * cbrt(V))), 1.5);
}
public static double code(double c0, double A, double V, double l) {
return c0 * Math.pow((Math.cbrt(A) / (Math.cbrt(l) * Math.cbrt(V))), 1.5);
}
function code(c0, A, V, l) return Float64(c0 * (Float64(cbrt(A) / Float64(cbrt(l) * cbrt(V))) ^ 1.5)) end
code[c0_, A_, V_, l_] := N[(c0 * N[Power[N[(N[Power[A, 1/3], $MachinePrecision] / N[(N[Power[l, 1/3], $MachinePrecision] * N[Power[V, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c0 \cdot {\left(\frac{\sqrt[3]{A}}{\sqrt[3]{\ell} \cdot \sqrt[3]{V}}\right)}^{1.5}
\end{array}
Initial program 74.5%
pow1/274.5%
add-cube-cbrt74.1%
pow374.1%
pow-pow74.1%
metadata-eval74.1%
Applied egg-rr74.1%
cbrt-div84.6%
Applied egg-rr84.6%
*-commutative84.6%
cbrt-prod98.2%
Applied egg-rr98.2%
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (* c0 (sqrt (/ A (* l V))))))
(if (<= t_0 2e-298)
(/ c0 (pow (* V (/ l A)) 0.5))
(if (<= t_0 2e+307) t_0 (* c0 (pow (/ V (/ A l)) -0.5))))))
double code(double c0, double A, double V, double l) {
double t_0 = c0 * sqrt((A / (l * V)));
double tmp;
if (t_0 <= 2e-298) {
tmp = c0 / pow((V * (l / A)), 0.5);
} else if (t_0 <= 2e+307) {
tmp = t_0;
} else {
tmp = c0 * pow((V / (A / l)), -0.5);
}
return tmp;
}
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: tmp
t_0 = c0 * sqrt((a / (l * v)))
if (t_0 <= 2d-298) then
tmp = c0 / ((v * (l / a)) ** 0.5d0)
else if (t_0 <= 2d+307) then
tmp = t_0
else
tmp = c0 * ((v / (a / l)) ** (-0.5d0))
end if
code = tmp
end function
public static double code(double c0, double A, double V, double l) {
double t_0 = c0 * Math.sqrt((A / (l * V)));
double tmp;
if (t_0 <= 2e-298) {
tmp = c0 / Math.pow((V * (l / A)), 0.5);
} else if (t_0 <= 2e+307) {
tmp = t_0;
} else {
tmp = c0 * Math.pow((V / (A / l)), -0.5);
}
return tmp;
}
def code(c0, A, V, l): t_0 = c0 * math.sqrt((A / (l * V))) tmp = 0 if t_0 <= 2e-298: tmp = c0 / math.pow((V * (l / A)), 0.5) elif t_0 <= 2e+307: tmp = t_0 else: tmp = c0 * math.pow((V / (A / l)), -0.5) return tmp
function code(c0, A, V, l) t_0 = Float64(c0 * sqrt(Float64(A / Float64(l * V)))) tmp = 0.0 if (t_0 <= 2e-298) tmp = Float64(c0 / (Float64(V * Float64(l / A)) ^ 0.5)); elseif (t_0 <= 2e+307) tmp = t_0; else tmp = Float64(c0 * (Float64(V / Float64(A / l)) ^ -0.5)); end return tmp end
function tmp_2 = code(c0, A, V, l) t_0 = c0 * sqrt((A / (l * V))); tmp = 0.0; if (t_0 <= 2e-298) tmp = c0 / ((V * (l / A)) ^ 0.5); elseif (t_0 <= 2e+307) tmp = t_0; else tmp = c0 * ((V / (A / l)) ^ -0.5); end tmp_2 = tmp; end
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(c0 * N[Sqrt[N[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 2e-298], N[(c0 / N[Power[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+307], t$95$0, N[(c0 * N[Power[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := c0 \cdot \sqrt{\frac{A}{\ell \cdot V}}\\
\mathbf{if}\;t\_0 \leq 2 \cdot 10^{-298}:\\
\;\;\;\;\frac{c0}{{\left(V \cdot \frac{\ell}{A}\right)}^{0.5}}\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+307}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot {\left(\frac{V}{\frac{A}{\ell}}\right)}^{-0.5}\\
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1.99999999999999982e-298Initial program 67.8%
pow1/267.8%
add-cube-cbrt67.4%
pow367.4%
pow-pow67.4%
metadata-eval67.4%
Applied egg-rr67.4%
cbrt-div80.1%
Applied egg-rr80.1%
add-sqr-sqrt80.1%
sqrt-unprod67.2%
pow-prod-up67.2%
metadata-eval67.2%
pow367.2%
cbrt-undiv67.4%
cbrt-undiv67.5%
cbrt-undiv67.4%
add-cube-cbrt67.8%
sqrt-undiv38.1%
clear-num38.1%
sqrt-div67.7%
associate-*r/73.9%
Applied egg-rr73.9%
if 1.99999999999999982e-298 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1.99999999999999997e307Initial program 96.7%
if 1.99999999999999997e307 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 59.9%
pow1/259.9%
clear-num59.9%
inv-pow59.9%
pow-pow60.5%
associate-/l*70.0%
metadata-eval70.0%
Applied egg-rr70.0%
clear-num70.0%
un-div-inv70.0%
Applied egg-rr70.0%
Final simplification79.4%
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (* c0 (sqrt (/ A (* l V))))))
(if (<= t_0 0.0)
(* c0 (sqrt (/ (/ A V) l)))
(if (<= t_0 2e+307) t_0 (* c0 (pow (/ V (/ A l)) -0.5))))))
double code(double c0, double A, double V, double l) {
double t_0 = c0 * sqrt((A / (l * V)));
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * sqrt(((A / V) / l));
} else if (t_0 <= 2e+307) {
tmp = t_0;
} else {
tmp = c0 * pow((V / (A / l)), -0.5);
}
return tmp;
}
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: tmp
t_0 = c0 * sqrt((a / (l * v)))
if (t_0 <= 0.0d0) then
tmp = c0 * sqrt(((a / v) / l))
else if (t_0 <= 2d+307) then
tmp = t_0
else
tmp = c0 * ((v / (a / l)) ** (-0.5d0))
end if
code = tmp
end function
public static double code(double c0, double A, double V, double l) {
double t_0 = c0 * Math.sqrt((A / (l * V)));
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * Math.sqrt(((A / V) / l));
} else if (t_0 <= 2e+307) {
tmp = t_0;
} else {
tmp = c0 * Math.pow((V / (A / l)), -0.5);
}
return tmp;
}
def code(c0, A, V, l): t_0 = c0 * math.sqrt((A / (l * V))) tmp = 0 if t_0 <= 0.0: tmp = c0 * math.sqrt(((A / V) / l)) elif t_0 <= 2e+307: tmp = t_0 else: tmp = c0 * math.pow((V / (A / l)), -0.5) return tmp
function code(c0, A, V, l) t_0 = Float64(c0 * sqrt(Float64(A / Float64(l * V)))) tmp = 0.0 if (t_0 <= 0.0) tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); elseif (t_0 <= 2e+307) tmp = t_0; else tmp = Float64(c0 * (Float64(V / Float64(A / l)) ^ -0.5)); end return tmp end
function tmp_2 = code(c0, A, V, l) t_0 = c0 * sqrt((A / (l * V))); tmp = 0.0; if (t_0 <= 0.0) tmp = c0 * sqrt(((A / V) / l)); elseif (t_0 <= 2e+307) tmp = t_0; else tmp = c0 * ((V / (A / l)) ^ -0.5); end tmp_2 = tmp; end
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(c0 * N[Sqrt[N[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+307], t$95$0, N[(c0 * N[Power[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := c0 \cdot \sqrt{\frac{A}{\ell \cdot V}}\\
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+307}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot {\left(\frac{V}{\frac{A}{\ell}}\right)}^{-0.5}\\
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 0.0Initial program 67.2%
associate-/r*72.1%
Applied egg-rr72.1%
if 0.0 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1.99999999999999997e307Initial program 96.8%
if 1.99999999999999997e307 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 59.9%
pow1/259.9%
clear-num59.9%
inv-pow59.9%
pow-pow60.5%
associate-/l*70.0%
metadata-eval70.0%
Applied egg-rr70.0%
clear-num70.0%
un-div-inv70.0%
Applied egg-rr70.0%
Final simplification78.6%
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (* c0 (sqrt (/ A (* l V))))))
(if (or (<= t_0 0.0) (not (<= t_0 1e+276)))
(* c0 (sqrt (/ (/ A V) l)))
t_0)))
double code(double c0, double A, double V, double l) {
double t_0 = c0 * sqrt((A / (l * V)));
double tmp;
if ((t_0 <= 0.0) || !(t_0 <= 1e+276)) {
tmp = c0 * sqrt(((A / V) / l));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: tmp
t_0 = c0 * sqrt((a / (l * v)))
if ((t_0 <= 0.0d0) .or. (.not. (t_0 <= 1d+276))) then
tmp = c0 * sqrt(((a / v) / l))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double c0, double A, double V, double l) {
double t_0 = c0 * Math.sqrt((A / (l * V)));
double tmp;
if ((t_0 <= 0.0) || !(t_0 <= 1e+276)) {
tmp = c0 * Math.sqrt(((A / V) / l));
} else {
tmp = t_0;
}
return tmp;
}
def code(c0, A, V, l): t_0 = c0 * math.sqrt((A / (l * V))) tmp = 0 if (t_0 <= 0.0) or not (t_0 <= 1e+276): tmp = c0 * math.sqrt(((A / V) / l)) else: tmp = t_0 return tmp
function code(c0, A, V, l) t_0 = Float64(c0 * sqrt(Float64(A / Float64(l * V)))) tmp = 0.0 if ((t_0 <= 0.0) || !(t_0 <= 1e+276)) tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); else tmp = t_0; end return tmp end
function tmp_2 = code(c0, A, V, l) t_0 = c0 * sqrt((A / (l * V))); tmp = 0.0; if ((t_0 <= 0.0) || ~((t_0 <= 1e+276))) tmp = c0 * sqrt(((A / V) / l)); else tmp = t_0; end tmp_2 = tmp; end
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(c0 * N[Sqrt[N[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, 0.0], N[Not[LessEqual[t$95$0, 1e+276]], $MachinePrecision]], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$0]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := c0 \cdot \sqrt{\frac{A}{\ell \cdot V}}\\
\mathbf{if}\;t\_0 \leq 0 \lor \neg \left(t\_0 \leq 10^{+276}\right):\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 0.0 or 1.0000000000000001e276 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 66.5%
associate-/r*72.1%
Applied egg-rr72.1%
if 0.0 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1.0000000000000001e276Initial program 96.7%
Final simplification78.6%
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (* c0 (/ (sqrt (- (/ A l))) (sqrt (- V))))))
(if (<= V -3.5e+215)
t_0
(if (<= V -6e-96)
(* c0 (pow (/ (cbrt A) (cbrt (* l V))) 1.5))
(if (<= V -1e-310) t_0 (/ (* c0 (/ (sqrt A) (sqrt l))) (sqrt V)))))))
double code(double c0, double A, double V, double l) {
double t_0 = c0 * (sqrt(-(A / l)) / sqrt(-V));
double tmp;
if (V <= -3.5e+215) {
tmp = t_0;
} else if (V <= -6e-96) {
tmp = c0 * pow((cbrt(A) / cbrt((l * V))), 1.5);
} else if (V <= -1e-310) {
tmp = t_0;
} else {
tmp = (c0 * (sqrt(A) / sqrt(l))) / sqrt(V);
}
return tmp;
}
public static double code(double c0, double A, double V, double l) {
double t_0 = c0 * (Math.sqrt(-(A / l)) / Math.sqrt(-V));
double tmp;
if (V <= -3.5e+215) {
tmp = t_0;
} else if (V <= -6e-96) {
tmp = c0 * Math.pow((Math.cbrt(A) / Math.cbrt((l * V))), 1.5);
} else if (V <= -1e-310) {
tmp = t_0;
} else {
tmp = (c0 * (Math.sqrt(A) / Math.sqrt(l))) / Math.sqrt(V);
}
return tmp;
}
function code(c0, A, V, l) t_0 = Float64(c0 * Float64(sqrt(Float64(-Float64(A / l))) / sqrt(Float64(-V)))) tmp = 0.0 if (V <= -3.5e+215) tmp = t_0; elseif (V <= -6e-96) tmp = Float64(c0 * (Float64(cbrt(A) / cbrt(Float64(l * V))) ^ 1.5)); elseif (V <= -1e-310) tmp = t_0; else tmp = Float64(Float64(c0 * Float64(sqrt(A) / sqrt(l))) / sqrt(V)); end return tmp end
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(c0 * N[(N[Sqrt[(-N[(A / l), $MachinePrecision])], $MachinePrecision] / N[Sqrt[(-V)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[V, -3.5e+215], t$95$0, If[LessEqual[V, -6e-96], N[(c0 * N[Power[N[(N[Power[A, 1/3], $MachinePrecision] / N[Power[N[(l * V), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[V, -1e-310], t$95$0, N[(N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[V], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := c0 \cdot \frac{\sqrt{-\frac{A}{\ell}}}{\sqrt{-V}}\\
\mathbf{if}\;V \leq -3.5 \cdot 10^{+215}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;V \leq -6 \cdot 10^{-96}:\\
\;\;\;\;c0 \cdot {\left(\frac{\sqrt[3]{A}}{\sqrt[3]{\ell \cdot V}}\right)}^{1.5}\\
\mathbf{elif}\;V \leq -1 \cdot 10^{-310}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{c0 \cdot \frac{\sqrt{A}}{\sqrt{\ell}}}{\sqrt{V}}\\
\end{array}
\end{array}
if V < -3.49999999999999977e215 or -6e-96 < V < -9.999999999999969e-311Initial program 67.4%
associate-/r*60.2%
Applied egg-rr60.2%
associate-/r*67.4%
associate-/l/70.2%
frac-2neg70.2%
sqrt-div87.9%
distribute-neg-frac287.9%
Applied egg-rr87.9%
if -3.49999999999999977e215 < V < -6e-96Initial program 80.3%
pow1/280.3%
add-cube-cbrt79.6%
pow379.7%
pow-pow79.7%
metadata-eval79.7%
Applied egg-rr79.7%
cbrt-div90.3%
Applied egg-rr90.3%
if -9.999999999999969e-311 < V Initial program 74.4%
associate-/r*76.0%
Applied egg-rr76.0%
*-commutative76.0%
associate-/r*74.4%
associate-/l/74.5%
sqrt-div84.4%
associate-*l/83.3%
pow1/283.3%
Applied egg-rr83.3%
unpow1/283.3%
sqrt-div51.5%
Applied egg-rr51.5%
Final simplification70.5%
(FPCore (c0 A V l)
:precision binary64
(if (<= (* l V) (- INFINITY))
(* c0 (/ (sqrt (- (/ A l))) (sqrt (- V))))
(if (<= (* l V) -2e-294)
(* c0 (/ (sqrt (- A)) (sqrt (* V (- l)))))
(if (<= (* l V) 0.0)
(* c0 (pow (/ V (/ A l)) -0.5))
(if (<= (* l V) 1e+301)
(* c0 (/ (sqrt A) (sqrt (* l V))))
(/ c0 (pow (* V (/ l A)) 0.5)))))))
double code(double c0, double A, double V, double l) {
double tmp;
if ((l * V) <= -((double) INFINITY)) {
tmp = c0 * (sqrt(-(A / l)) / sqrt(-V));
} else if ((l * V) <= -2e-294) {
tmp = c0 * (sqrt(-A) / sqrt((V * -l)));
} else if ((l * V) <= 0.0) {
tmp = c0 * pow((V / (A / l)), -0.5);
} else if ((l * V) <= 1e+301) {
tmp = c0 * (sqrt(A) / sqrt((l * V)));
} else {
tmp = c0 / pow((V * (l / A)), 0.5);
}
return tmp;
}
public static double code(double c0, double A, double V, double l) {
double tmp;
if ((l * V) <= -Double.POSITIVE_INFINITY) {
tmp = c0 * (Math.sqrt(-(A / l)) / Math.sqrt(-V));
} else if ((l * V) <= -2e-294) {
tmp = c0 * (Math.sqrt(-A) / Math.sqrt((V * -l)));
} else if ((l * V) <= 0.0) {
tmp = c0 * Math.pow((V / (A / l)), -0.5);
} else if ((l * V) <= 1e+301) {
tmp = c0 * (Math.sqrt(A) / Math.sqrt((l * V)));
} else {
tmp = c0 / Math.pow((V * (l / A)), 0.5);
}
return tmp;
}
def code(c0, A, V, l): tmp = 0 if (l * V) <= -math.inf: tmp = c0 * (math.sqrt(-(A / l)) / math.sqrt(-V)) elif (l * V) <= -2e-294: tmp = c0 * (math.sqrt(-A) / math.sqrt((V * -l))) elif (l * V) <= 0.0: tmp = c0 * math.pow((V / (A / l)), -0.5) elif (l * V) <= 1e+301: tmp = c0 * (math.sqrt(A) / math.sqrt((l * V))) else: tmp = c0 / math.pow((V * (l / A)), 0.5) return tmp
function code(c0, A, V, l) tmp = 0.0 if (Float64(l * V) <= Float64(-Inf)) tmp = Float64(c0 * Float64(sqrt(Float64(-Float64(A / l))) / sqrt(Float64(-V)))); elseif (Float64(l * V) <= -2e-294) tmp = Float64(c0 * Float64(sqrt(Float64(-A)) / sqrt(Float64(V * Float64(-l))))); elseif (Float64(l * V) <= 0.0) tmp = Float64(c0 * (Float64(V / Float64(A / l)) ^ -0.5)); elseif (Float64(l * V) <= 1e+301) tmp = Float64(c0 * Float64(sqrt(A) / sqrt(Float64(l * V)))); else tmp = Float64(c0 / (Float64(V * Float64(l / A)) ^ 0.5)); end return tmp end
function tmp_2 = code(c0, A, V, l) tmp = 0.0; if ((l * V) <= -Inf) tmp = c0 * (sqrt(-(A / l)) / sqrt(-V)); elseif ((l * V) <= -2e-294) tmp = c0 * (sqrt(-A) / sqrt((V * -l))); elseif ((l * V) <= 0.0) tmp = c0 * ((V / (A / l)) ^ -0.5); elseif ((l * V) <= 1e+301) tmp = c0 * (sqrt(A) / sqrt((l * V))); else tmp = c0 / ((V * (l / A)) ^ 0.5); end tmp_2 = tmp; end
code[c0_, A_, V_, l_] := If[LessEqual[N[(l * V), $MachinePrecision], (-Infinity)], N[(c0 * N[(N[Sqrt[(-N[(A / l), $MachinePrecision])], $MachinePrecision] / N[Sqrt[(-V)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], -2e-294], N[(c0 * N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[N[(V * (-l)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 0.0], N[(c0 * N[Power[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 1e+301], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[N[(l * V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 / N[Power[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot V \leq -\infty:\\
\;\;\;\;c0 \cdot \frac{\sqrt{-\frac{A}{\ell}}}{\sqrt{-V}}\\
\mathbf{elif}\;\ell \cdot V \leq -2 \cdot 10^{-294}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\
\mathbf{elif}\;\ell \cdot V \leq 0:\\
\;\;\;\;c0 \cdot {\left(\frac{V}{\frac{A}{\ell}}\right)}^{-0.5}\\
\mathbf{elif}\;\ell \cdot V \leq 10^{+301}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{\ell \cdot V}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{{\left(V \cdot \frac{\ell}{A}\right)}^{0.5}}\\
\end{array}
\end{array}
if (*.f64 V l) < -inf.0Initial program 5.7%
associate-/r*37.7%
Applied egg-rr37.7%
associate-/r*5.7%
associate-/l/37.1%
frac-2neg37.1%
sqrt-div70.7%
distribute-neg-frac270.7%
Applied egg-rr70.7%
if -inf.0 < (*.f64 V l) < -2.00000000000000003e-294Initial program 85.2%
associate-/r*80.1%
Applied egg-rr80.1%
associate-/r*85.2%
frac-2neg85.2%
sqrt-div99.4%
neg-sub099.4%
distribute-rgt-neg-in99.4%
Applied egg-rr99.4%
if -2.00000000000000003e-294 < (*.f64 V l) < -0.0Initial program 47.6%
pow1/247.6%
clear-num47.6%
inv-pow47.6%
pow-pow47.6%
associate-/l*79.3%
metadata-eval79.3%
Applied egg-rr79.3%
clear-num79.3%
un-div-inv79.4%
Applied egg-rr79.4%
if -0.0 < (*.f64 V l) < 1.00000000000000005e301Initial program 85.2%
associate-/r*70.4%
Applied egg-rr70.4%
associate-/r*85.2%
sqrt-div99.0%
Applied egg-rr99.0%
if 1.00000000000000005e301 < (*.f64 V l) Initial program 29.8%
pow1/229.8%
add-cube-cbrt29.8%
pow329.8%
pow-pow29.8%
metadata-eval29.8%
Applied egg-rr29.8%
cbrt-div29.8%
Applied egg-rr29.8%
add-sqr-sqrt29.8%
sqrt-unprod29.8%
pow-prod-up29.8%
metadata-eval29.8%
pow329.8%
cbrt-undiv29.8%
cbrt-undiv29.8%
cbrt-undiv29.8%
add-cube-cbrt29.8%
sqrt-undiv29.8%
clear-num29.8%
sqrt-div29.8%
associate-*r/68.4%
Applied egg-rr68.5%
Final simplification93.8%
(FPCore (c0 A V l)
:precision binary64
(if (<= (* l V) -5e+132)
(* c0 (/ (pow (/ A V) 0.5) (sqrt l)))
(if (<= (* l V) -5e-206)
(* c0 (sqrt (/ A (* l V))))
(if (<= (* l V) 0.0)
(* c0 (* (pow (/ V A) -0.5) (pow l -0.5)))
(if (<= (* l V) 1e+301)
(* c0 (/ (sqrt A) (sqrt (* l V))))
(/ c0 (pow (* V (/ l A)) 0.5)))))))
double code(double c0, double A, double V, double l) {
double tmp;
if ((l * V) <= -5e+132) {
tmp = c0 * (pow((A / V), 0.5) / sqrt(l));
} else if ((l * V) <= -5e-206) {
tmp = c0 * sqrt((A / (l * V)));
} else if ((l * V) <= 0.0) {
tmp = c0 * (pow((V / A), -0.5) * pow(l, -0.5));
} else if ((l * V) <= 1e+301) {
tmp = c0 * (sqrt(A) / sqrt((l * V)));
} else {
tmp = c0 / pow((V * (l / A)), 0.5);
}
return tmp;
}
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: tmp
if ((l * v) <= (-5d+132)) then
tmp = c0 * (((a / v) ** 0.5d0) / sqrt(l))
else if ((l * v) <= (-5d-206)) then
tmp = c0 * sqrt((a / (l * v)))
else if ((l * v) <= 0.0d0) then
tmp = c0 * (((v / a) ** (-0.5d0)) * (l ** (-0.5d0)))
else if ((l * v) <= 1d+301) then
tmp = c0 * (sqrt(a) / sqrt((l * v)))
else
tmp = c0 / ((v * (l / a)) ** 0.5d0)
end if
code = tmp
end function
public static double code(double c0, double A, double V, double l) {
double tmp;
if ((l * V) <= -5e+132) {
tmp = c0 * (Math.pow((A / V), 0.5) / Math.sqrt(l));
} else if ((l * V) <= -5e-206) {
tmp = c0 * Math.sqrt((A / (l * V)));
} else if ((l * V) <= 0.0) {
tmp = c0 * (Math.pow((V / A), -0.5) * Math.pow(l, -0.5));
} else if ((l * V) <= 1e+301) {
tmp = c0 * (Math.sqrt(A) / Math.sqrt((l * V)));
} else {
tmp = c0 / Math.pow((V * (l / A)), 0.5);
}
return tmp;
}
def code(c0, A, V, l): tmp = 0 if (l * V) <= -5e+132: tmp = c0 * (math.pow((A / V), 0.5) / math.sqrt(l)) elif (l * V) <= -5e-206: tmp = c0 * math.sqrt((A / (l * V))) elif (l * V) <= 0.0: tmp = c0 * (math.pow((V / A), -0.5) * math.pow(l, -0.5)) elif (l * V) <= 1e+301: tmp = c0 * (math.sqrt(A) / math.sqrt((l * V))) else: tmp = c0 / math.pow((V * (l / A)), 0.5) return tmp
function code(c0, A, V, l) tmp = 0.0 if (Float64(l * V) <= -5e+132) tmp = Float64(c0 * Float64((Float64(A / V) ^ 0.5) / sqrt(l))); elseif (Float64(l * V) <= -5e-206) tmp = Float64(c0 * sqrt(Float64(A / Float64(l * V)))); elseif (Float64(l * V) <= 0.0) tmp = Float64(c0 * Float64((Float64(V / A) ^ -0.5) * (l ^ -0.5))); elseif (Float64(l * V) <= 1e+301) tmp = Float64(c0 * Float64(sqrt(A) / sqrt(Float64(l * V)))); else tmp = Float64(c0 / (Float64(V * Float64(l / A)) ^ 0.5)); end return tmp end
function tmp_2 = code(c0, A, V, l) tmp = 0.0; if ((l * V) <= -5e+132) tmp = c0 * (((A / V) ^ 0.5) / sqrt(l)); elseif ((l * V) <= -5e-206) tmp = c0 * sqrt((A / (l * V))); elseif ((l * V) <= 0.0) tmp = c0 * (((V / A) ^ -0.5) * (l ^ -0.5)); elseif ((l * V) <= 1e+301) tmp = c0 * (sqrt(A) / sqrt((l * V))); else tmp = c0 / ((V * (l / A)) ^ 0.5); end tmp_2 = tmp; end
code[c0_, A_, V_, l_] := If[LessEqual[N[(l * V), $MachinePrecision], -5e+132], N[(c0 * N[(N[Power[N[(A / V), $MachinePrecision], 0.5], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], -5e-206], N[(c0 * N[Sqrt[N[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 0.0], N[(c0 * N[(N[Power[N[(V / A), $MachinePrecision], -0.5], $MachinePrecision] * N[Power[l, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 1e+301], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[N[(l * V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 / N[Power[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot V \leq -5 \cdot 10^{+132}:\\
\;\;\;\;c0 \cdot \frac{{\left(\frac{A}{V}\right)}^{0.5}}{\sqrt{\ell}}\\
\mathbf{elif}\;\ell \cdot V \leq -5 \cdot 10^{-206}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{A}{\ell \cdot V}}\\
\mathbf{elif}\;\ell \cdot V \leq 0:\\
\;\;\;\;c0 \cdot \left({\left(\frac{V}{A}\right)}^{-0.5} \cdot {\ell}^{-0.5}\right)\\
\mathbf{elif}\;\ell \cdot V \leq 10^{+301}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{\ell \cdot V}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{{\left(V \cdot \frac{\ell}{A}\right)}^{0.5}}\\
\end{array}
\end{array}
if (*.f64 V l) < -5.0000000000000001e132Initial program 63.6%
associate-/r*66.6%
sqrt-div48.5%
pow1/248.5%
pow1/248.5%
Applied egg-rr48.5%
unpow1/248.5%
Simplified48.5%
if -5.0000000000000001e132 < (*.f64 V l) < -5e-206Initial program 93.4%
if -5e-206 < (*.f64 V l) < -0.0Initial program 50.6%
pow1/250.6%
clear-num50.7%
inv-pow50.7%
pow-pow50.7%
associate-/l*75.8%
metadata-eval75.8%
Applied egg-rr75.8%
clear-num75.8%
un-div-inv75.8%
Applied egg-rr75.8%
associate-/r/75.8%
unpow-prod-down47.9%
Applied egg-rr47.9%
if -0.0 < (*.f64 V l) < 1.00000000000000005e301Initial program 85.2%
associate-/r*70.4%
Applied egg-rr70.4%
associate-/r*85.2%
sqrt-div99.0%
Applied egg-rr99.0%
if 1.00000000000000005e301 < (*.f64 V l) Initial program 29.8%
pow1/229.8%
add-cube-cbrt29.8%
pow329.8%
pow-pow29.8%
metadata-eval29.8%
Applied egg-rr29.8%
cbrt-div29.8%
Applied egg-rr29.8%
add-sqr-sqrt29.8%
sqrt-unprod29.8%
pow-prod-up29.8%
metadata-eval29.8%
pow329.8%
cbrt-undiv29.8%
cbrt-undiv29.8%
cbrt-undiv29.8%
add-cube-cbrt29.8%
sqrt-undiv29.8%
clear-num29.8%
sqrt-div29.8%
associate-*r/68.4%
Applied egg-rr68.5%
Final simplification79.9%
(FPCore (c0 A V l)
:precision binary64
(if (<= (* l V) -5e+132)
(* c0 (/ (pow (/ A V) 0.5) (sqrt l)))
(if (<= (* l V) -5e-206)
(* c0 (sqrt (/ A (* l V))))
(if (<= (* l V) 0.0)
(* c0 (* (pow l -0.5) (sqrt (/ A V))))
(if (<= (* l V) 1e+301)
(* c0 (/ (sqrt A) (sqrt (* l V))))
(/ c0 (pow (* V (/ l A)) 0.5)))))))
double code(double c0, double A, double V, double l) {
double tmp;
if ((l * V) <= -5e+132) {
tmp = c0 * (pow((A / V), 0.5) / sqrt(l));
} else if ((l * V) <= -5e-206) {
tmp = c0 * sqrt((A / (l * V)));
} else if ((l * V) <= 0.0) {
tmp = c0 * (pow(l, -0.5) * sqrt((A / V)));
} else if ((l * V) <= 1e+301) {
tmp = c0 * (sqrt(A) / sqrt((l * V)));
} else {
tmp = c0 / pow((V * (l / A)), 0.5);
}
return tmp;
}
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: tmp
if ((l * v) <= (-5d+132)) then
tmp = c0 * (((a / v) ** 0.5d0) / sqrt(l))
else if ((l * v) <= (-5d-206)) then
tmp = c0 * sqrt((a / (l * v)))
else if ((l * v) <= 0.0d0) then
tmp = c0 * ((l ** (-0.5d0)) * sqrt((a / v)))
else if ((l * v) <= 1d+301) then
tmp = c0 * (sqrt(a) / sqrt((l * v)))
else
tmp = c0 / ((v * (l / a)) ** 0.5d0)
end if
code = tmp
end function
public static double code(double c0, double A, double V, double l) {
double tmp;
if ((l * V) <= -5e+132) {
tmp = c0 * (Math.pow((A / V), 0.5) / Math.sqrt(l));
} else if ((l * V) <= -5e-206) {
tmp = c0 * Math.sqrt((A / (l * V)));
} else if ((l * V) <= 0.0) {
tmp = c0 * (Math.pow(l, -0.5) * Math.sqrt((A / V)));
} else if ((l * V) <= 1e+301) {
tmp = c0 * (Math.sqrt(A) / Math.sqrt((l * V)));
} else {
tmp = c0 / Math.pow((V * (l / A)), 0.5);
}
return tmp;
}
def code(c0, A, V, l): tmp = 0 if (l * V) <= -5e+132: tmp = c0 * (math.pow((A / V), 0.5) / math.sqrt(l)) elif (l * V) <= -5e-206: tmp = c0 * math.sqrt((A / (l * V))) elif (l * V) <= 0.0: tmp = c0 * (math.pow(l, -0.5) * math.sqrt((A / V))) elif (l * V) <= 1e+301: tmp = c0 * (math.sqrt(A) / math.sqrt((l * V))) else: tmp = c0 / math.pow((V * (l / A)), 0.5) return tmp
function code(c0, A, V, l) tmp = 0.0 if (Float64(l * V) <= -5e+132) tmp = Float64(c0 * Float64((Float64(A / V) ^ 0.5) / sqrt(l))); elseif (Float64(l * V) <= -5e-206) tmp = Float64(c0 * sqrt(Float64(A / Float64(l * V)))); elseif (Float64(l * V) <= 0.0) tmp = Float64(c0 * Float64((l ^ -0.5) * sqrt(Float64(A / V)))); elseif (Float64(l * V) <= 1e+301) tmp = Float64(c0 * Float64(sqrt(A) / sqrt(Float64(l * V)))); else tmp = Float64(c0 / (Float64(V * Float64(l / A)) ^ 0.5)); end return tmp end
function tmp_2 = code(c0, A, V, l) tmp = 0.0; if ((l * V) <= -5e+132) tmp = c0 * (((A / V) ^ 0.5) / sqrt(l)); elseif ((l * V) <= -5e-206) tmp = c0 * sqrt((A / (l * V))); elseif ((l * V) <= 0.0) tmp = c0 * ((l ^ -0.5) * sqrt((A / V))); elseif ((l * V) <= 1e+301) tmp = c0 * (sqrt(A) / sqrt((l * V))); else tmp = c0 / ((V * (l / A)) ^ 0.5); end tmp_2 = tmp; end
code[c0_, A_, V_, l_] := If[LessEqual[N[(l * V), $MachinePrecision], -5e+132], N[(c0 * N[(N[Power[N[(A / V), $MachinePrecision], 0.5], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], -5e-206], N[(c0 * N[Sqrt[N[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 0.0], N[(c0 * N[(N[Power[l, -0.5], $MachinePrecision] * N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 1e+301], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[N[(l * V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 / N[Power[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot V \leq -5 \cdot 10^{+132}:\\
\;\;\;\;c0 \cdot \frac{{\left(\frac{A}{V}\right)}^{0.5}}{\sqrt{\ell}}\\
\mathbf{elif}\;\ell \cdot V \leq -5 \cdot 10^{-206}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{A}{\ell \cdot V}}\\
\mathbf{elif}\;\ell \cdot V \leq 0:\\
\;\;\;\;c0 \cdot \left({\ell}^{-0.5} \cdot \sqrt{\frac{A}{V}}\right)\\
\mathbf{elif}\;\ell \cdot V \leq 10^{+301}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{\ell \cdot V}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{{\left(V \cdot \frac{\ell}{A}\right)}^{0.5}}\\
\end{array}
\end{array}
if (*.f64 V l) < -5.0000000000000001e132Initial program 63.6%
associate-/r*66.6%
sqrt-div48.5%
pow1/248.5%
pow1/248.5%
Applied egg-rr48.5%
unpow1/248.5%
Simplified48.5%
if -5.0000000000000001e132 < (*.f64 V l) < -5e-206Initial program 93.4%
if -5e-206 < (*.f64 V l) < -0.0Initial program 50.6%
pow1/250.6%
clear-num50.7%
inv-pow50.7%
pow-pow50.7%
associate-/l*75.8%
metadata-eval75.8%
Applied egg-rr75.8%
clear-num75.8%
un-div-inv75.8%
Applied egg-rr75.8%
add-sqr-sqrt75.6%
sqrt-unprod74.4%
pow-prod-up74.4%
metadata-eval74.4%
inv-pow74.4%
associate-/r/74.3%
associate-/l/74.3%
div-inv74.3%
sqrt-prod47.9%
inv-pow47.9%
sqrt-pow147.9%
metadata-eval47.9%
clear-num47.8%
Applied egg-rr47.8%
if -0.0 < (*.f64 V l) < 1.00000000000000005e301Initial program 85.2%
associate-/r*70.4%
Applied egg-rr70.4%
associate-/r*85.2%
sqrt-div99.0%
Applied egg-rr99.0%
if 1.00000000000000005e301 < (*.f64 V l) Initial program 29.8%
pow1/229.8%
add-cube-cbrt29.8%
pow329.8%
pow-pow29.8%
metadata-eval29.8%
Applied egg-rr29.8%
cbrt-div29.8%
Applied egg-rr29.8%
add-sqr-sqrt29.8%
sqrt-unprod29.8%
pow-prod-up29.8%
metadata-eval29.8%
pow329.8%
cbrt-undiv29.8%
cbrt-undiv29.8%
cbrt-undiv29.8%
add-cube-cbrt29.8%
sqrt-undiv29.8%
clear-num29.8%
sqrt-div29.8%
associate-*r/68.4%
Applied egg-rr68.5%
Final simplification79.9%
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (* c0 (* (pow l -0.5) (sqrt (/ A V))))))
(if (<= (* l V) -5e+132)
t_0
(if (<= (* l V) -5e-206)
(* c0 (sqrt (/ A (* l V))))
(if (<= (* l V) 0.0)
t_0
(if (<= (* l V) 1e+301)
(* c0 (/ (sqrt A) (sqrt (* l V))))
(/ c0 (pow (* V (/ l A)) 0.5))))))))
double code(double c0, double A, double V, double l) {
double t_0 = c0 * (pow(l, -0.5) * sqrt((A / V)));
double tmp;
if ((l * V) <= -5e+132) {
tmp = t_0;
} else if ((l * V) <= -5e-206) {
tmp = c0 * sqrt((A / (l * V)));
} else if ((l * V) <= 0.0) {
tmp = t_0;
} else if ((l * V) <= 1e+301) {
tmp = c0 * (sqrt(A) / sqrt((l * V)));
} else {
tmp = c0 / pow((V * (l / A)), 0.5);
}
return tmp;
}
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 * ((l ** (-0.5d0)) * sqrt((a / v)))
if ((l * v) <= (-5d+132)) then
tmp = t_0
else if ((l * v) <= (-5d-206)) then
tmp = c0 * sqrt((a / (l * v)))
else if ((l * v) <= 0.0d0) then
tmp = t_0
else if ((l * v) <= 1d+301) then
tmp = c0 * (sqrt(a) / sqrt((l * v)))
else
tmp = c0 / ((v * (l / a)) ** 0.5d0)
end if
code = tmp
end function
public static double code(double c0, double A, double V, double l) {
double t_0 = c0 * (Math.pow(l, -0.5) * Math.sqrt((A / V)));
double tmp;
if ((l * V) <= -5e+132) {
tmp = t_0;
} else if ((l * V) <= -5e-206) {
tmp = c0 * Math.sqrt((A / (l * V)));
} else if ((l * V) <= 0.0) {
tmp = t_0;
} else if ((l * V) <= 1e+301) {
tmp = c0 * (Math.sqrt(A) / Math.sqrt((l * V)));
} else {
tmp = c0 / Math.pow((V * (l / A)), 0.5);
}
return tmp;
}
def code(c0, A, V, l): t_0 = c0 * (math.pow(l, -0.5) * math.sqrt((A / V))) tmp = 0 if (l * V) <= -5e+132: tmp = t_0 elif (l * V) <= -5e-206: tmp = c0 * math.sqrt((A / (l * V))) elif (l * V) <= 0.0: tmp = t_0 elif (l * V) <= 1e+301: tmp = c0 * (math.sqrt(A) / math.sqrt((l * V))) else: tmp = c0 / math.pow((V * (l / A)), 0.5) return tmp
function code(c0, A, V, l) t_0 = Float64(c0 * Float64((l ^ -0.5) * sqrt(Float64(A / V)))) tmp = 0.0 if (Float64(l * V) <= -5e+132) tmp = t_0; elseif (Float64(l * V) <= -5e-206) tmp = Float64(c0 * sqrt(Float64(A / Float64(l * V)))); elseif (Float64(l * V) <= 0.0) tmp = t_0; elseif (Float64(l * V) <= 1e+301) tmp = Float64(c0 * Float64(sqrt(A) / sqrt(Float64(l * V)))); else tmp = Float64(c0 / (Float64(V * Float64(l / A)) ^ 0.5)); end return tmp end
function tmp_2 = code(c0, A, V, l) t_0 = c0 * ((l ^ -0.5) * sqrt((A / V))); tmp = 0.0; if ((l * V) <= -5e+132) tmp = t_0; elseif ((l * V) <= -5e-206) tmp = c0 * sqrt((A / (l * V))); elseif ((l * V) <= 0.0) tmp = t_0; elseif ((l * V) <= 1e+301) tmp = c0 * (sqrt(A) / sqrt((l * V))); else tmp = c0 / ((V * (l / A)) ^ 0.5); end tmp_2 = tmp; end
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(c0 * N[(N[Power[l, -0.5], $MachinePrecision] * N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(l * V), $MachinePrecision], -5e+132], t$95$0, If[LessEqual[N[(l * V), $MachinePrecision], -5e-206], N[(c0 * N[Sqrt[N[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 0.0], t$95$0, If[LessEqual[N[(l * V), $MachinePrecision], 1e+301], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[N[(l * V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 / N[Power[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := c0 \cdot \left({\ell}^{-0.5} \cdot \sqrt{\frac{A}{V}}\right)\\
\mathbf{if}\;\ell \cdot V \leq -5 \cdot 10^{+132}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \cdot V \leq -5 \cdot 10^{-206}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{A}{\ell \cdot V}}\\
\mathbf{elif}\;\ell \cdot V \leq 0:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \cdot V \leq 10^{+301}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{\ell \cdot V}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{{\left(V \cdot \frac{\ell}{A}\right)}^{0.5}}\\
\end{array}
\end{array}
if (*.f64 V l) < -5.0000000000000001e132 or -5e-206 < (*.f64 V l) < -0.0Initial program 55.9%
pow1/255.9%
clear-num55.4%
inv-pow55.4%
pow-pow55.4%
associate-/l*72.6%
metadata-eval72.6%
Applied egg-rr72.6%
clear-num72.6%
un-div-inv72.6%
Applied egg-rr72.6%
add-sqr-sqrt72.4%
sqrt-unprod71.8%
pow-prod-up71.7%
metadata-eval71.7%
inv-pow71.7%
associate-/r/70.5%
associate-/l/71.1%
div-inv71.1%
sqrt-prod48.1%
inv-pow48.1%
sqrt-pow148.1%
metadata-eval48.1%
clear-num48.0%
Applied egg-rr48.0%
if -5.0000000000000001e132 < (*.f64 V l) < -5e-206Initial program 93.4%
if -0.0 < (*.f64 V l) < 1.00000000000000005e301Initial program 85.2%
associate-/r*70.4%
Applied egg-rr70.4%
associate-/r*85.2%
sqrt-div99.0%
Applied egg-rr99.0%
if 1.00000000000000005e301 < (*.f64 V l) Initial program 29.8%
pow1/229.8%
add-cube-cbrt29.8%
pow329.8%
pow-pow29.8%
metadata-eval29.8%
Applied egg-rr29.8%
cbrt-div29.8%
Applied egg-rr29.8%
add-sqr-sqrt29.8%
sqrt-unprod29.8%
pow-prod-up29.8%
metadata-eval29.8%
pow329.8%
cbrt-undiv29.8%
cbrt-undiv29.8%
cbrt-undiv29.8%
add-cube-cbrt29.8%
sqrt-undiv29.8%
clear-num29.8%
sqrt-div29.8%
associate-*r/68.4%
Applied egg-rr68.5%
Final simplification79.9%
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (* (sqrt (/ A V)) (/ c0 (sqrt l)))))
(if (<= (* l V) -5e+132)
t_0
(if (<= (* l V) -5e-206)
(* c0 (sqrt (/ A (* l V))))
(if (<= (* l V) 0.0)
t_0
(if (<= (* l V) 1e+301)
(* c0 (/ (sqrt A) (sqrt (* l V))))
(/ c0 (pow (* V (/ l A)) 0.5))))))))
double code(double c0, double A, double V, double l) {
double t_0 = sqrt((A / V)) * (c0 / sqrt(l));
double tmp;
if ((l * V) <= -5e+132) {
tmp = t_0;
} else if ((l * V) <= -5e-206) {
tmp = c0 * sqrt((A / (l * V)));
} else if ((l * V) <= 0.0) {
tmp = t_0;
} else if ((l * V) <= 1e+301) {
tmp = c0 * (sqrt(A) / sqrt((l * V)));
} else {
tmp = c0 / pow((V * (l / A)), 0.5);
}
return tmp;
}
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 = sqrt((a / v)) * (c0 / sqrt(l))
if ((l * v) <= (-5d+132)) then
tmp = t_0
else if ((l * v) <= (-5d-206)) then
tmp = c0 * sqrt((a / (l * v)))
else if ((l * v) <= 0.0d0) then
tmp = t_0
else if ((l * v) <= 1d+301) then
tmp = c0 * (sqrt(a) / sqrt((l * v)))
else
tmp = c0 / ((v * (l / a)) ** 0.5d0)
end if
code = tmp
end function
public static double code(double c0, double A, double V, double l) {
double t_0 = Math.sqrt((A / V)) * (c0 / Math.sqrt(l));
double tmp;
if ((l * V) <= -5e+132) {
tmp = t_0;
} else if ((l * V) <= -5e-206) {
tmp = c0 * Math.sqrt((A / (l * V)));
} else if ((l * V) <= 0.0) {
tmp = t_0;
} else if ((l * V) <= 1e+301) {
tmp = c0 * (Math.sqrt(A) / Math.sqrt((l * V)));
} else {
tmp = c0 / Math.pow((V * (l / A)), 0.5);
}
return tmp;
}
def code(c0, A, V, l): t_0 = math.sqrt((A / V)) * (c0 / math.sqrt(l)) tmp = 0 if (l * V) <= -5e+132: tmp = t_0 elif (l * V) <= -5e-206: tmp = c0 * math.sqrt((A / (l * V))) elif (l * V) <= 0.0: tmp = t_0 elif (l * V) <= 1e+301: tmp = c0 * (math.sqrt(A) / math.sqrt((l * V))) else: tmp = c0 / math.pow((V * (l / A)), 0.5) return tmp
function code(c0, A, V, l) t_0 = Float64(sqrt(Float64(A / V)) * Float64(c0 / sqrt(l))) tmp = 0.0 if (Float64(l * V) <= -5e+132) tmp = t_0; elseif (Float64(l * V) <= -5e-206) tmp = Float64(c0 * sqrt(Float64(A / Float64(l * V)))); elseif (Float64(l * V) <= 0.0) tmp = t_0; elseif (Float64(l * V) <= 1e+301) tmp = Float64(c0 * Float64(sqrt(A) / sqrt(Float64(l * V)))); else tmp = Float64(c0 / (Float64(V * Float64(l / A)) ^ 0.5)); end return tmp end
function tmp_2 = code(c0, A, V, l) t_0 = sqrt((A / V)) * (c0 / sqrt(l)); tmp = 0.0; if ((l * V) <= -5e+132) tmp = t_0; elseif ((l * V) <= -5e-206) tmp = c0 * sqrt((A / (l * V))); elseif ((l * V) <= 0.0) tmp = t_0; elseif ((l * V) <= 1e+301) tmp = c0 * (sqrt(A) / sqrt((l * V))); else tmp = c0 / ((V * (l / A)) ^ 0.5); end tmp_2 = tmp; end
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] * N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(l * V), $MachinePrecision], -5e+132], t$95$0, If[LessEqual[N[(l * V), $MachinePrecision], -5e-206], N[(c0 * N[Sqrt[N[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 0.0], t$95$0, If[LessEqual[N[(l * V), $MachinePrecision], 1e+301], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[N[(l * V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 / N[Power[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{A}{V}} \cdot \frac{c0}{\sqrt{\ell}}\\
\mathbf{if}\;\ell \cdot V \leq -5 \cdot 10^{+132}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \cdot V \leq -5 \cdot 10^{-206}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{A}{\ell \cdot V}}\\
\mathbf{elif}\;\ell \cdot V \leq 0:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;\ell \cdot V \leq 10^{+301}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{\ell \cdot V}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{{\left(V \cdot \frac{\ell}{A}\right)}^{0.5}}\\
\end{array}
\end{array}
if (*.f64 V l) < -5.0000000000000001e132 or -5e-206 < (*.f64 V l) < -0.0Initial program 55.9%
associate-/r*71.2%
Applied egg-rr71.2%
sqrt-div48.0%
associate-*r/44.6%
pow1/244.6%
Applied egg-rr44.6%
*-commutative44.6%
associate-/l*48.0%
Simplified48.0%
*-un-lft-identity48.0%
*-commutative48.0%
Applied egg-rr48.0%
*-rgt-identity48.0%
unpow1/248.0%
Simplified48.0%
if -5.0000000000000001e132 < (*.f64 V l) < -5e-206Initial program 93.4%
if -0.0 < (*.f64 V l) < 1.00000000000000005e301Initial program 85.2%
associate-/r*70.4%
Applied egg-rr70.4%
associate-/r*85.2%
sqrt-div99.0%
Applied egg-rr99.0%
if 1.00000000000000005e301 < (*.f64 V l) Initial program 29.8%
pow1/229.8%
add-cube-cbrt29.8%
pow329.8%
pow-pow29.8%
metadata-eval29.8%
Applied egg-rr29.8%
cbrt-div29.8%
Applied egg-rr29.8%
add-sqr-sqrt29.8%
sqrt-unprod29.8%
pow-prod-up29.8%
metadata-eval29.8%
pow329.8%
cbrt-undiv29.8%
cbrt-undiv29.8%
cbrt-undiv29.8%
add-cube-cbrt29.8%
sqrt-undiv29.8%
clear-num29.8%
sqrt-div29.8%
associate-*r/68.4%
Applied egg-rr68.5%
Final simplification79.8%
(FPCore (c0 A V l)
:precision binary64
(if (<= l -5.6e-220)
(* c0 (/ (sqrt (- (/ A l))) (sqrt (- V))))
(if (<= l -2e-310)
(* c0 (/ (sqrt (/ A (- V))) (sqrt (- l))))
(if (<= l 2e+42)
(* c0 (* (pow (/ V A) -0.5) (pow l -0.5)))
(if (<= l 3.3e+130)
(* c0 (sqrt (/ A (* l V))))
(* c0 (* (pow l -0.5) (sqrt (/ A V)))))))))
double code(double c0, double A, double V, double l) {
double tmp;
if (l <= -5.6e-220) {
tmp = c0 * (sqrt(-(A / l)) / sqrt(-V));
} else if (l <= -2e-310) {
tmp = c0 * (sqrt((A / -V)) / sqrt(-l));
} else if (l <= 2e+42) {
tmp = c0 * (pow((V / A), -0.5) * pow(l, -0.5));
} else if (l <= 3.3e+130) {
tmp = c0 * sqrt((A / (l * V)));
} else {
tmp = c0 * (pow(l, -0.5) * sqrt((A / V)));
}
return tmp;
}
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 <= (-5.6d-220)) then
tmp = c0 * (sqrt(-(a / l)) / sqrt(-v))
else if (l <= (-2d-310)) then
tmp = c0 * (sqrt((a / -v)) / sqrt(-l))
else if (l <= 2d+42) then
tmp = c0 * (((v / a) ** (-0.5d0)) * (l ** (-0.5d0)))
else if (l <= 3.3d+130) then
tmp = c0 * sqrt((a / (l * v)))
else
tmp = c0 * ((l ** (-0.5d0)) * sqrt((a / v)))
end if
code = tmp
end function
public static double code(double c0, double A, double V, double l) {
double tmp;
if (l <= -5.6e-220) {
tmp = c0 * (Math.sqrt(-(A / l)) / Math.sqrt(-V));
} else if (l <= -2e-310) {
tmp = c0 * (Math.sqrt((A / -V)) / Math.sqrt(-l));
} else if (l <= 2e+42) {
tmp = c0 * (Math.pow((V / A), -0.5) * Math.pow(l, -0.5));
} else if (l <= 3.3e+130) {
tmp = c0 * Math.sqrt((A / (l * V)));
} else {
tmp = c0 * (Math.pow(l, -0.5) * Math.sqrt((A / V)));
}
return tmp;
}
def code(c0, A, V, l): tmp = 0 if l <= -5.6e-220: tmp = c0 * (math.sqrt(-(A / l)) / math.sqrt(-V)) elif l <= -2e-310: tmp = c0 * (math.sqrt((A / -V)) / math.sqrt(-l)) elif l <= 2e+42: tmp = c0 * (math.pow((V / A), -0.5) * math.pow(l, -0.5)) elif l <= 3.3e+130: tmp = c0 * math.sqrt((A / (l * V))) else: tmp = c0 * (math.pow(l, -0.5) * math.sqrt((A / V))) return tmp
function code(c0, A, V, l) tmp = 0.0 if (l <= -5.6e-220) tmp = Float64(c0 * Float64(sqrt(Float64(-Float64(A / l))) / sqrt(Float64(-V)))); elseif (l <= -2e-310) tmp = Float64(c0 * Float64(sqrt(Float64(A / Float64(-V))) / sqrt(Float64(-l)))); elseif (l <= 2e+42) tmp = Float64(c0 * Float64((Float64(V / A) ^ -0.5) * (l ^ -0.5))); elseif (l <= 3.3e+130) tmp = Float64(c0 * sqrt(Float64(A / Float64(l * V)))); else tmp = Float64(c0 * Float64((l ^ -0.5) * sqrt(Float64(A / V)))); end return tmp end
function tmp_2 = code(c0, A, V, l) tmp = 0.0; if (l <= -5.6e-220) tmp = c0 * (sqrt(-(A / l)) / sqrt(-V)); elseif (l <= -2e-310) tmp = c0 * (sqrt((A / -V)) / sqrt(-l)); elseif (l <= 2e+42) tmp = c0 * (((V / A) ^ -0.5) * (l ^ -0.5)); elseif (l <= 3.3e+130) tmp = c0 * sqrt((A / (l * V))); else tmp = c0 * ((l ^ -0.5) * sqrt((A / V))); end tmp_2 = tmp; end
code[c0_, A_, V_, l_] := If[LessEqual[l, -5.6e-220], N[(c0 * N[(N[Sqrt[(-N[(A / l), $MachinePrecision])], $MachinePrecision] / N[Sqrt[(-V)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -2e-310], N[(c0 * N[(N[Sqrt[N[(A / (-V)), $MachinePrecision]], $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2e+42], N[(c0 * N[(N[Power[N[(V / A), $MachinePrecision], -0.5], $MachinePrecision] * N[Power[l, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 3.3e+130], N[(c0 * N[Sqrt[N[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0 * N[(N[Power[l, -0.5], $MachinePrecision] * N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -5.6 \cdot 10^{-220}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{-\frac{A}{\ell}}}{\sqrt{-V}}\\
\mathbf{elif}\;\ell \leq -2 \cdot 10^{-310}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{-V}}}{\sqrt{-\ell}}\\
\mathbf{elif}\;\ell \leq 2 \cdot 10^{+42}:\\
\;\;\;\;c0 \cdot \left({\left(\frac{V}{A}\right)}^{-0.5} \cdot {\ell}^{-0.5}\right)\\
\mathbf{elif}\;\ell \leq 3.3 \cdot 10^{+130}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{A}{\ell \cdot V}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \left({\ell}^{-0.5} \cdot \sqrt{\frac{A}{V}}\right)\\
\end{array}
\end{array}
if l < -5.5999999999999998e-220Initial program 76.1%
associate-/r*72.3%
Applied egg-rr72.3%
associate-/r*76.1%
associate-/l/77.1%
frac-2neg77.1%
sqrt-div50.9%
distribute-neg-frac250.9%
Applied egg-rr50.9%
if -5.5999999999999998e-220 < l < -1.999999999999994e-310Initial program 67.1%
associate-/r*79.1%
Applied egg-rr79.1%
frac-2neg79.1%
sqrt-div91.2%
distribute-neg-frac291.2%
Applied egg-rr91.2%
if -1.999999999999994e-310 < l < 2.00000000000000009e42Initial program 78.0%
pow1/278.0%
clear-num77.4%
inv-pow77.4%
pow-pow77.6%
associate-/l*80.4%
metadata-eval80.4%
Applied egg-rr80.4%
clear-num79.9%
un-div-inv79.9%
Applied egg-rr79.9%
associate-/r/75.3%
unpow-prod-down87.2%
Applied egg-rr87.2%
if 2.00000000000000009e42 < l < 3.3e130Initial program 81.9%
if 3.3e130 < l Initial program 63.7%
pow1/263.7%
clear-num63.0%
inv-pow63.0%
pow-pow63.0%
associate-/l*68.3%
metadata-eval68.3%
Applied egg-rr68.3%
clear-num68.3%
un-div-inv68.9%
Applied egg-rr68.9%
add-sqr-sqrt68.5%
sqrt-unprod68.9%
pow-prod-up68.8%
metadata-eval68.8%
inv-pow68.8%
associate-/r/70.8%
associate-/l/71.5%
div-inv71.6%
sqrt-prod89.0%
inv-pow89.0%
sqrt-pow189.1%
metadata-eval89.1%
clear-num91.7%
Applied egg-rr91.7%
Final simplification73.1%
(FPCore (c0 A V l)
:precision binary64
(if (<= (* l V) 0.0)
(* c0 (pow (/ V (/ A l)) -0.5))
(if (<= (* l V) 1e+301)
(* c0 (/ (sqrt A) (sqrt (* l V))))
(/ c0 (pow (* V (/ l A)) 0.5)))))
double code(double c0, double A, double V, double l) {
double tmp;
if ((l * V) <= 0.0) {
tmp = c0 * pow((V / (A / l)), -0.5);
} else if ((l * V) <= 1e+301) {
tmp = c0 * (sqrt(A) / sqrt((l * V)));
} else {
tmp = c0 / pow((V * (l / A)), 0.5);
}
return tmp;
}
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: tmp
if ((l * v) <= 0.0d0) then
tmp = c0 * ((v / (a / l)) ** (-0.5d0))
else if ((l * v) <= 1d+301) then
tmp = c0 * (sqrt(a) / sqrt((l * v)))
else
tmp = c0 / ((v * (l / a)) ** 0.5d0)
end if
code = tmp
end function
public static double code(double c0, double A, double V, double l) {
double tmp;
if ((l * V) <= 0.0) {
tmp = c0 * Math.pow((V / (A / l)), -0.5);
} else if ((l * V) <= 1e+301) {
tmp = c0 * (Math.sqrt(A) / Math.sqrt((l * V)));
} else {
tmp = c0 / Math.pow((V * (l / A)), 0.5);
}
return tmp;
}
def code(c0, A, V, l): tmp = 0 if (l * V) <= 0.0: tmp = c0 * math.pow((V / (A / l)), -0.5) elif (l * V) <= 1e+301: tmp = c0 * (math.sqrt(A) / math.sqrt((l * V))) else: tmp = c0 / math.pow((V * (l / A)), 0.5) return tmp
function code(c0, A, V, l) tmp = 0.0 if (Float64(l * V) <= 0.0) tmp = Float64(c0 * (Float64(V / Float64(A / l)) ^ -0.5)); elseif (Float64(l * V) <= 1e+301) tmp = Float64(c0 * Float64(sqrt(A) / sqrt(Float64(l * V)))); else tmp = Float64(c0 / (Float64(V * Float64(l / A)) ^ 0.5)); end return tmp end
function tmp_2 = code(c0, A, V, l) tmp = 0.0; if ((l * V) <= 0.0) tmp = c0 * ((V / (A / l)) ^ -0.5); elseif ((l * V) <= 1e+301) tmp = c0 * (sqrt(A) / sqrt((l * V))); else tmp = c0 / ((V * (l / A)) ^ 0.5); end tmp_2 = tmp; end
code[c0_, A_, V_, l_] := If[LessEqual[N[(l * V), $MachinePrecision], 0.0], N[(c0 * N[Power[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 1e+301], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[N[(l * V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 / N[Power[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot V \leq 0:\\
\;\;\;\;c0 \cdot {\left(\frac{V}{\frac{A}{\ell}}\right)}^{-0.5}\\
\mathbf{elif}\;\ell \cdot V \leq 10^{+301}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{\ell \cdot V}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{{\left(V \cdot \frac{\ell}{A}\right)}^{0.5}}\\
\end{array}
\end{array}
if (*.f64 V l) < -0.0Initial program 71.3%
pow1/271.3%
clear-num70.7%
inv-pow70.7%
pow-pow70.7%
associate-/l*75.1%
metadata-eval75.1%
Applied egg-rr75.1%
clear-num74.6%
un-div-inv74.7%
Applied egg-rr74.7%
if -0.0 < (*.f64 V l) < 1.00000000000000005e301Initial program 85.2%
associate-/r*70.4%
Applied egg-rr70.4%
associate-/r*85.2%
sqrt-div99.0%
Applied egg-rr99.0%
if 1.00000000000000005e301 < (*.f64 V l) Initial program 29.8%
pow1/229.8%
add-cube-cbrt29.8%
pow329.8%
pow-pow29.8%
metadata-eval29.8%
Applied egg-rr29.8%
cbrt-div29.8%
Applied egg-rr29.8%
add-sqr-sqrt29.8%
sqrt-unprod29.8%
pow-prod-up29.8%
metadata-eval29.8%
pow329.8%
cbrt-undiv29.8%
cbrt-undiv29.8%
cbrt-undiv29.8%
add-cube-cbrt29.8%
sqrt-undiv29.8%
clear-num29.8%
sqrt-div29.8%
associate-*r/68.4%
Applied egg-rr68.5%
Final simplification84.2%
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (/ A (* l V))))
(if (<= t_0 2e-318)
(sqrt (* c0 (/ (/ (* c0 A) l) V)))
(if (<= t_0 5e+261)
(/ c0 (pow (/ (* l V) A) 0.5))
(* c0 (pow (/ V (/ A l)) -0.5))))))
double code(double c0, double A, double V, double l) {
double t_0 = A / (l * V);
double tmp;
if (t_0 <= 2e-318) {
tmp = sqrt((c0 * (((c0 * A) / l) / V)));
} else if (t_0 <= 5e+261) {
tmp = c0 / pow(((l * V) / A), 0.5);
} else {
tmp = c0 * pow((V / (A / l)), -0.5);
}
return tmp;
}
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: tmp
t_0 = a / (l * v)
if (t_0 <= 2d-318) then
tmp = sqrt((c0 * (((c0 * a) / l) / v)))
else if (t_0 <= 5d+261) then
tmp = c0 / (((l * v) / a) ** 0.5d0)
else
tmp = c0 * ((v / (a / l)) ** (-0.5d0))
end if
code = tmp
end function
public static double code(double c0, double A, double V, double l) {
double t_0 = A / (l * V);
double tmp;
if (t_0 <= 2e-318) {
tmp = Math.sqrt((c0 * (((c0 * A) / l) / V)));
} else if (t_0 <= 5e+261) {
tmp = c0 / Math.pow(((l * V) / A), 0.5);
} else {
tmp = c0 * Math.pow((V / (A / l)), -0.5);
}
return tmp;
}
def code(c0, A, V, l): t_0 = A / (l * V) tmp = 0 if t_0 <= 2e-318: tmp = math.sqrt((c0 * (((c0 * A) / l) / V))) elif t_0 <= 5e+261: tmp = c0 / math.pow(((l * V) / A), 0.5) else: tmp = c0 * math.pow((V / (A / l)), -0.5) return tmp
function code(c0, A, V, l) t_0 = Float64(A / Float64(l * V)) tmp = 0.0 if (t_0 <= 2e-318) tmp = sqrt(Float64(c0 * Float64(Float64(Float64(c0 * A) / l) / V))); elseif (t_0 <= 5e+261) tmp = Float64(c0 / (Float64(Float64(l * V) / A) ^ 0.5)); else tmp = Float64(c0 * (Float64(V / Float64(A / l)) ^ -0.5)); end return tmp end
function tmp_2 = code(c0, A, V, l) t_0 = A / (l * V); tmp = 0.0; if (t_0 <= 2e-318) tmp = sqrt((c0 * (((c0 * A) / l) / V))); elseif (t_0 <= 5e+261) tmp = c0 / (((l * V) / A) ^ 0.5); else tmp = c0 * ((V / (A / l)) ^ -0.5); end tmp_2 = tmp; end
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 2e-318], N[Sqrt[N[(c0 * N[(N[(N[(c0 * A), $MachinePrecision] / l), $MachinePrecision] / V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$0, 5e+261], N[(c0 / N[Power[N[(N[(l * V), $MachinePrecision] / A), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision], N[(c0 * N[Power[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{A}{\ell \cdot V}\\
\mathbf{if}\;t\_0 \leq 2 \cdot 10^{-318}:\\
\;\;\;\;\sqrt{c0 \cdot \frac{\frac{c0 \cdot A}{\ell}}{V}}\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+261}:\\
\;\;\;\;\frac{c0}{{\left(\frac{\ell \cdot V}{A}\right)}^{0.5}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot {\left(\frac{V}{\frac{A}{\ell}}\right)}^{-0.5}\\
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 2.0000024e-318Initial program 30.2%
pow1/230.2%
add-cube-cbrt30.2%
pow330.2%
pow-pow30.2%
metadata-eval30.2%
Applied egg-rr30.2%
cbrt-div63.4%
Applied egg-rr63.4%
*-commutative63.4%
cbrt-prod96.7%
Applied egg-rr96.7%
add-sqr-sqrt61.8%
sqrt-unprod50.8%
*-commutative50.8%
*-commutative50.8%
swap-sqr33.0%
Applied egg-rr33.2%
associate-*r*38.0%
*-commutative38.0%
associate-*l/44.7%
associate-*l/38.2%
Simplified38.2%
if 2.0000024e-318 < (/.f64 A (*.f64 V l)) < 5.0000000000000001e261Initial program 99.5%
pow1/299.5%
add-cube-cbrt98.8%
pow398.8%
pow-pow98.8%
metadata-eval98.8%
Applied egg-rr98.8%
cbrt-div98.5%
Applied egg-rr98.5%
add-sqr-sqrt98.4%
sqrt-unprod98.5%
pow-prod-up98.4%
metadata-eval98.4%
pow398.4%
cbrt-undiv98.8%
cbrt-undiv99.0%
cbrt-undiv98.8%
add-cube-cbrt99.5%
sqrt-undiv53.0%
clear-num53.0%
sqrt-div99.5%
associate-*r/91.9%
Applied egg-rr91.9%
associate-*r/99.6%
Simplified99.6%
if 5.0000000000000001e261 < (/.f64 A (*.f64 V l)) Initial program 45.6%
pow1/245.6%
clear-num45.6%
inv-pow45.6%
pow-pow45.9%
associate-/l*59.1%
metadata-eval59.1%
Applied egg-rr59.1%
clear-num59.2%
un-div-inv59.2%
Applied egg-rr59.2%
Final simplification79.2%
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (/ A (* l V))))
(if (<= t_0 0.0)
(* c0 (sqrt (/ (/ A V) l)))
(if (<= t_0 1e+263) (* c0 (sqrt t_0)) (* c0 (pow (* V (/ l A)) -0.5))))))
double code(double c0, double A, double V, double l) {
double t_0 = A / (l * V);
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * sqrt(((A / V) / l));
} else if (t_0 <= 1e+263) {
tmp = c0 * sqrt(t_0);
} else {
tmp = c0 * pow((V * (l / A)), -0.5);
}
return tmp;
}
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: tmp
t_0 = a / (l * v)
if (t_0 <= 0.0d0) then
tmp = c0 * sqrt(((a / v) / l))
else if (t_0 <= 1d+263) then
tmp = c0 * sqrt(t_0)
else
tmp = c0 * ((v * (l / a)) ** (-0.5d0))
end if
code = tmp
end function
public static double code(double c0, double A, double V, double l) {
double t_0 = A / (l * V);
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * Math.sqrt(((A / V) / l));
} else if (t_0 <= 1e+263) {
tmp = c0 * Math.sqrt(t_0);
} else {
tmp = c0 * Math.pow((V * (l / A)), -0.5);
}
return tmp;
}
def code(c0, A, V, l): t_0 = A / (l * V) tmp = 0 if t_0 <= 0.0: tmp = c0 * math.sqrt(((A / V) / l)) elif t_0 <= 1e+263: tmp = c0 * math.sqrt(t_0) else: tmp = c0 * math.pow((V * (l / A)), -0.5) return tmp
function code(c0, A, V, l) t_0 = Float64(A / Float64(l * V)) tmp = 0.0 if (t_0 <= 0.0) tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); elseif (t_0 <= 1e+263) tmp = Float64(c0 * sqrt(t_0)); else tmp = Float64(c0 * (Float64(V * Float64(l / A)) ^ -0.5)); end return tmp end
function tmp_2 = code(c0, A, V, l) t_0 = A / (l * V); tmp = 0.0; if (t_0 <= 0.0) tmp = c0 * sqrt(((A / V) / l)); elseif (t_0 <= 1e+263) tmp = c0 * sqrt(t_0); else tmp = c0 * ((V * (l / A)) ^ -0.5); end tmp_2 = tmp; end
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+263], N[(c0 * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision], N[(c0 * N[Power[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{A}{\ell \cdot V}\\
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;t\_0 \leq 10^{+263}:\\
\;\;\;\;c0 \cdot \sqrt{t\_0}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot {\left(V \cdot \frac{\ell}{A}\right)}^{-0.5}\\
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 0.0Initial program 27.8%
associate-/r*46.6%
Applied egg-rr46.6%
if 0.0 < (/.f64 A (*.f64 V l)) < 1.00000000000000002e263Initial program 98.4%
if 1.00000000000000002e263 < (/.f64 A (*.f64 V l)) Initial program 44.7%
pow1/244.7%
clear-num44.7%
inv-pow44.7%
pow-pow45.0%
associate-/l*58.5%
metadata-eval58.5%
Applied egg-rr58.5%
Final simplification80.7%
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (/ A (* l V))))
(if (<= t_0 0.0)
(* c0 (sqrt (/ (/ A V) l)))
(if (<= t_0 4e+282) (* c0 (sqrt t_0)) (* c0 (sqrt (/ (/ A l) V)))))))
double code(double c0, double A, double V, double l) {
double t_0 = A / (l * V);
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * sqrt(((A / V) / l));
} else if (t_0 <= 4e+282) {
tmp = c0 * sqrt(t_0);
} else {
tmp = c0 * sqrt(((A / l) / V));
}
return tmp;
}
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: tmp
t_0 = a / (l * v)
if (t_0 <= 0.0d0) then
tmp = c0 * sqrt(((a / v) / l))
else if (t_0 <= 4d+282) then
tmp = c0 * sqrt(t_0)
else
tmp = c0 * sqrt(((a / l) / v))
end if
code = tmp
end function
public static double code(double c0, double A, double V, double l) {
double t_0 = A / (l * V);
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * Math.sqrt(((A / V) / l));
} else if (t_0 <= 4e+282) {
tmp = c0 * Math.sqrt(t_0);
} else {
tmp = c0 * Math.sqrt(((A / l) / V));
}
return tmp;
}
def code(c0, A, V, l): t_0 = A / (l * V) tmp = 0 if t_0 <= 0.0: tmp = c0 * math.sqrt(((A / V) / l)) elif t_0 <= 4e+282: tmp = c0 * math.sqrt(t_0) else: tmp = c0 * math.sqrt(((A / l) / V)) return tmp
function code(c0, A, V, l) t_0 = Float64(A / Float64(l * V)) tmp = 0.0 if (t_0 <= 0.0) tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); elseif (t_0 <= 4e+282) tmp = Float64(c0 * sqrt(t_0)); else tmp = Float64(c0 * sqrt(Float64(Float64(A / l) / V))); end return tmp end
function tmp_2 = code(c0, A, V, l) t_0 = A / (l * V); tmp = 0.0; if (t_0 <= 0.0) tmp = c0 * sqrt(((A / V) / l)); elseif (t_0 <= 4e+282) tmp = c0 * sqrt(t_0); else tmp = c0 * sqrt(((A / l) / V)); end tmp_2 = tmp; end
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 4e+282], N[(c0 * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision], N[(c0 * N[Sqrt[N[(N[(A / l), $MachinePrecision] / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{A}{\ell \cdot V}\\
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+282}:\\
\;\;\;\;c0 \cdot \sqrt{t\_0}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 0.0Initial program 27.8%
associate-/r*46.6%
Applied egg-rr46.6%
if 0.0 < (/.f64 A (*.f64 V l)) < 4.00000000000000013e282Initial program 98.4%
if 4.00000000000000013e282 < (/.f64 A (*.f64 V l)) Initial program 43.8%
*-commutative43.8%
associate-/r*58.2%
Applied egg-rr58.2%
Final simplification80.8%
(FPCore (c0 A V l) :precision binary64 (* c0 (sqrt (/ A (* l V)))))
double code(double c0, double A, double V, double l) {
return c0 * sqrt((A / (l * V)));
}
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
code = c0 * sqrt((a / (l * v)))
end function
public static double code(double c0, double A, double V, double l) {
return c0 * Math.sqrt((A / (l * V)));
}
def code(c0, A, V, l): return c0 * math.sqrt((A / (l * V)))
function code(c0, A, V, l) return Float64(c0 * sqrt(Float64(A / Float64(l * V)))) end
function tmp = code(c0, A, V, l) tmp = c0 * sqrt((A / (l * V))); end
code[c0_, A_, V_, l_] := N[(c0 * N[Sqrt[N[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c0 \cdot \sqrt{\frac{A}{\ell \cdot V}}
\end{array}
Initial program 74.5%
Final simplification74.5%
herbie shell --seed 2024098
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))