
(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 11 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 70.7%
pow1/270.7%
add-cube-cbrt70.2%
pow370.1%
pow-pow70.1%
associate-/r*73.6%
metadata-eval73.6%
Applied egg-rr73.6%
associate-/r*70.1%
cbrt-div81.3%
*-commutative81.3%
Applied egg-rr81.3%
cbrt-prod97.6%
Applied egg-rr97.6%
Final simplification97.6%
(FPCore (c0 A V l)
:precision binary64
(if (<= (* l V) -1e+282)
(/ c0 (/ (sqrt (/ (- l) A)) (sqrt (/ -1.0 V))))
(if (<= (* l V) -5e-320)
(* c0 (/ (sqrt (- A)) (sqrt (* V (- l)))))
(if (or (<= (* l V) 2e-318) (not (<= (* l V) 2e+304)))
(* c0 (pow (/ (cbrt (/ A V)) (cbrt l)) 1.5))
(/ c0 (/ (sqrt (* l V)) (sqrt A)))))))
double code(double c0, double A, double V, double l) {
double tmp;
if ((l * V) <= -1e+282) {
tmp = c0 / (sqrt((-l / A)) / sqrt((-1.0 / V)));
} else if ((l * V) <= -5e-320) {
tmp = c0 * (sqrt(-A) / sqrt((V * -l)));
} else if (((l * V) <= 2e-318) || !((l * V) <= 2e+304)) {
tmp = c0 * pow((cbrt((A / V)) / cbrt(l)), 1.5);
} else {
tmp = c0 / (sqrt((l * V)) / sqrt(A));
}
return tmp;
}
public static double code(double c0, double A, double V, double l) {
double tmp;
if ((l * V) <= -1e+282) {
tmp = c0 / (Math.sqrt((-l / A)) / Math.sqrt((-1.0 / V)));
} else if ((l * V) <= -5e-320) {
tmp = c0 * (Math.sqrt(-A) / Math.sqrt((V * -l)));
} else if (((l * V) <= 2e-318) || !((l * V) <= 2e+304)) {
tmp = c0 * Math.pow((Math.cbrt((A / V)) / Math.cbrt(l)), 1.5);
} else {
tmp = c0 / (Math.sqrt((l * V)) / Math.sqrt(A));
}
return tmp;
}
function code(c0, A, V, l) tmp = 0.0 if (Float64(l * V) <= -1e+282) tmp = Float64(c0 / Float64(sqrt(Float64(Float64(-l) / A)) / sqrt(Float64(-1.0 / V)))); elseif (Float64(l * V) <= -5e-320) tmp = Float64(c0 * Float64(sqrt(Float64(-A)) / sqrt(Float64(V * Float64(-l))))); elseif ((Float64(l * V) <= 2e-318) || !(Float64(l * V) <= 2e+304)) tmp = Float64(c0 * (Float64(cbrt(Float64(A / V)) / cbrt(l)) ^ 1.5)); else tmp = Float64(c0 / Float64(sqrt(Float64(l * V)) / sqrt(A))); end return tmp end
code[c0_, A_, V_, l_] := If[LessEqual[N[(l * V), $MachinePrecision], -1e+282], N[(c0 / N[(N[Sqrt[N[((-l) / A), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(-1.0 / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], -5e-320], N[(c0 * N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[N[(V * (-l)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(l * V), $MachinePrecision], 2e-318], N[Not[LessEqual[N[(l * V), $MachinePrecision], 2e+304]], $MachinePrecision]], N[(c0 * N[Power[N[(N[Power[N[(A / V), $MachinePrecision], 1/3], $MachinePrecision] / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision]), $MachinePrecision], N[(c0 / N[(N[Sqrt[N[(l * V), $MachinePrecision]], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot V \leq -1 \cdot 10^{+282}:\\
\;\;\;\;\frac{c0}{\frac{\sqrt{\frac{-\ell}{A}}}{\sqrt{\frac{-1}{V}}}}\\
\mathbf{elif}\;\ell \cdot V \leq -5 \cdot 10^{-320}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\
\mathbf{elif}\;\ell \cdot V \leq 2 \cdot 10^{-318} \lor \neg \left(\ell \cdot V \leq 2 \cdot 10^{+304}\right):\\
\;\;\;\;c0 \cdot {\left(\frac{\sqrt[3]{\frac{A}{V}}}{\sqrt[3]{\ell}}\right)}^{1.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\frac{\sqrt{\ell \cdot V}}{\sqrt{A}}}\\
\end{array}
\end{array}
if (*.f64 V l) < -1.00000000000000003e282Initial program 28.4%
pow1/228.4%
clear-num28.4%
inv-pow28.4%
pow-pow28.4%
*-commutative28.4%
associate-/l*48.3%
metadata-eval48.3%
Applied egg-rr48.3%
associate-/r/48.3%
Simplified48.3%
associate-/r/48.3%
metadata-eval48.3%
sqrt-pow248.2%
inv-pow48.2%
un-div-inv48.3%
associate-/l*28.4%
*-commutative28.4%
associate-*l/48.3%
*-commutative48.3%
Applied egg-rr48.3%
clear-num48.3%
*-un-lft-identity48.3%
associate-*l/48.3%
div-inv48.3%
associate-/l/48.3%
frac-2neg48.3%
sqrt-div29.2%
distribute-neg-frac29.2%
distribute-neg-frac29.2%
metadata-eval29.2%
Applied egg-rr29.2%
if -1.00000000000000003e282 < (*.f64 V l) < -4.99994e-320Initial program 87.5%
frac-2neg87.5%
sqrt-div98.9%
distribute-rgt-neg-in98.9%
Applied egg-rr98.9%
if -4.99994e-320 < (*.f64 V l) < 2.0000024e-318 or 1.9999999999999999e304 < (*.f64 V l) Initial program 38.8%
pow1/238.8%
add-cube-cbrt38.8%
pow338.8%
pow-pow38.8%
associate-/r*76.5%
metadata-eval76.5%
Applied egg-rr76.5%
cbrt-div88.6%
div-inv88.7%
Applied egg-rr88.7%
associate-*r/88.6%
*-rgt-identity88.6%
Simplified88.6%
if 2.0000024e-318 < (*.f64 V l) < 1.9999999999999999e304Initial program 79.9%
sqrt-div99.4%
associate-*r/94.2%
Applied egg-rr94.2%
associate-/l*99.4%
Simplified99.4%
Final simplification90.7%
(FPCore (c0 A V l)
:precision binary64
(if (<= (* l V) -2e+251)
(* (/ c0 (sqrt l)) (sqrt (/ A V)))
(if (<= (* l V) -5e-76)
(* c0 (sqrt (/ A (* l V))))
(if (<= (* l V) 2e-318)
(/ c0 (sqrt (/ V (/ A l))))
(if (<= (* l V) 2e+304)
(* (sqrt A) (/ c0 (sqrt (* l V))))
(* c0 (pow (/ (/ A V) l) 0.5)))))))
double code(double c0, double A, double V, double l) {
double tmp;
if ((l * V) <= -2e+251) {
tmp = (c0 / sqrt(l)) * sqrt((A / V));
} else if ((l * V) <= -5e-76) {
tmp = c0 * sqrt((A / (l * V)));
} else if ((l * V) <= 2e-318) {
tmp = c0 / sqrt((V / (A / l)));
} else if ((l * V) <= 2e+304) {
tmp = sqrt(A) * (c0 / sqrt((l * V)));
} else {
tmp = c0 * pow(((A / V) / 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) :: tmp
if ((l * v) <= (-2d+251)) then
tmp = (c0 / sqrt(l)) * sqrt((a / v))
else if ((l * v) <= (-5d-76)) then
tmp = c0 * sqrt((a / (l * v)))
else if ((l * v) <= 2d-318) then
tmp = c0 / sqrt((v / (a / l)))
else if ((l * v) <= 2d+304) then
tmp = sqrt(a) * (c0 / sqrt((l * v)))
else
tmp = c0 * (((a / v) / l) ** 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) <= -2e+251) {
tmp = (c0 / Math.sqrt(l)) * Math.sqrt((A / V));
} else if ((l * V) <= -5e-76) {
tmp = c0 * Math.sqrt((A / (l * V)));
} else if ((l * V) <= 2e-318) {
tmp = c0 / Math.sqrt((V / (A / l)));
} else if ((l * V) <= 2e+304) {
tmp = Math.sqrt(A) * (c0 / Math.sqrt((l * V)));
} else {
tmp = c0 * Math.pow(((A / V) / l), 0.5);
}
return tmp;
}
def code(c0, A, V, l): tmp = 0 if (l * V) <= -2e+251: tmp = (c0 / math.sqrt(l)) * math.sqrt((A / V)) elif (l * V) <= -5e-76: tmp = c0 * math.sqrt((A / (l * V))) elif (l * V) <= 2e-318: tmp = c0 / math.sqrt((V / (A / l))) elif (l * V) <= 2e+304: tmp = math.sqrt(A) * (c0 / math.sqrt((l * V))) else: tmp = c0 * math.pow(((A / V) / l), 0.5) return tmp
function code(c0, A, V, l) tmp = 0.0 if (Float64(l * V) <= -2e+251) tmp = Float64(Float64(c0 / sqrt(l)) * sqrt(Float64(A / V))); elseif (Float64(l * V) <= -5e-76) tmp = Float64(c0 * sqrt(Float64(A / Float64(l * V)))); elseif (Float64(l * V) <= 2e-318) tmp = Float64(c0 / sqrt(Float64(V / Float64(A / l)))); elseif (Float64(l * V) <= 2e+304) tmp = Float64(sqrt(A) * Float64(c0 / sqrt(Float64(l * V)))); else tmp = Float64(c0 * (Float64(Float64(A / V) / l) ^ 0.5)); end return tmp end
function tmp_2 = code(c0, A, V, l) tmp = 0.0; if ((l * V) <= -2e+251) tmp = (c0 / sqrt(l)) * sqrt((A / V)); elseif ((l * V) <= -5e-76) tmp = c0 * sqrt((A / (l * V))); elseif ((l * V) <= 2e-318) tmp = c0 / sqrt((V / (A / l))); elseif ((l * V) <= 2e+304) tmp = sqrt(A) * (c0 / sqrt((l * V))); else tmp = c0 * (((A / V) / l) ^ 0.5); end tmp_2 = tmp; end
code[c0_, A_, V_, l_] := If[LessEqual[N[(l * V), $MachinePrecision], -2e+251], N[(N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], -5e-76], N[(c0 * N[Sqrt[N[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 2e-318], N[(c0 / N[Sqrt[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 2e+304], N[(N[Sqrt[A], $MachinePrecision] * N[(c0 / N[Sqrt[N[(l * V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[Power[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot V \leq -2 \cdot 10^{+251}:\\
\;\;\;\;\frac{c0}{\sqrt{\ell}} \cdot \sqrt{\frac{A}{V}}\\
\mathbf{elif}\;\ell \cdot V \leq -5 \cdot 10^{-76}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{A}{\ell \cdot V}}\\
\mathbf{elif}\;\ell \cdot V \leq 2 \cdot 10^{-318}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}\\
\mathbf{elif}\;\ell \cdot V \leq 2 \cdot 10^{+304}:\\
\;\;\;\;\sqrt{A} \cdot \frac{c0}{\sqrt{\ell \cdot V}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot {\left(\frac{\frac{A}{V}}{\ell}\right)}^{0.5}\\
\end{array}
\end{array}
if (*.f64 V l) < -2.0000000000000001e251Initial program 30.2%
sqrt-div0.0%
associate-*r/0.0%
Applied egg-rr0.0%
associate-/l*0.0%
Simplified0.0%
sqrt-undiv30.2%
*-commutative30.2%
associate-/l*48.5%
sqrt-div31.4%
associate-/r/31.4%
Applied egg-rr31.4%
if -2.0000000000000001e251 < (*.f64 V l) < -4.9999999999999998e-76Initial program 93.6%
if -4.9999999999999998e-76 < (*.f64 V l) < 2.0000024e-318Initial program 62.1%
pow1/262.1%
clear-num62.1%
inv-pow62.1%
pow-pow63.1%
*-commutative63.1%
associate-/l*79.6%
metadata-eval79.6%
Applied egg-rr79.6%
associate-/r/78.3%
Simplified78.3%
associate-/r/79.6%
metadata-eval79.6%
sqrt-pow279.6%
inv-pow79.6%
un-div-inv79.7%
associate-/l*63.2%
*-commutative63.2%
associate-*l/79.7%
*-commutative79.7%
Applied egg-rr79.7%
*-commutative79.7%
associate-/r/78.5%
Simplified78.5%
if 2.0000024e-318 < (*.f64 V l) < 1.9999999999999999e304Initial program 79.9%
sqrt-div99.4%
associate-*r/94.2%
Applied egg-rr94.2%
associate-/l*99.4%
Simplified99.4%
associate-/r/98.4%
*-commutative98.4%
Applied egg-rr98.4%
if 1.9999999999999999e304 < (*.f64 V l) Initial program 34.0%
pow1/234.0%
associate-/r*76.5%
Applied egg-rr76.5%
Final simplification83.7%
(FPCore (c0 A V l)
:precision binary64
(if (<= (* l V) -2e+251)
(* (/ c0 (sqrt l)) (sqrt (/ A V)))
(if (<= (* l V) -5e-76)
(* c0 (sqrt (/ A (* l V))))
(if (<= (* l V) 2e-318)
(/ c0 (sqrt (/ V (/ A l))))
(if (<= (* l V) 2e+304)
(* c0 (/ (sqrt A) (sqrt (* l V))))
(* c0 (pow (/ (/ A V) l) 0.5)))))))
double code(double c0, double A, double V, double l) {
double tmp;
if ((l * V) <= -2e+251) {
tmp = (c0 / sqrt(l)) * sqrt((A / V));
} else if ((l * V) <= -5e-76) {
tmp = c0 * sqrt((A / (l * V)));
} else if ((l * V) <= 2e-318) {
tmp = c0 / sqrt((V / (A / l)));
} else if ((l * V) <= 2e+304) {
tmp = c0 * (sqrt(A) / sqrt((l * V)));
} else {
tmp = c0 * pow(((A / V) / 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) :: tmp
if ((l * v) <= (-2d+251)) then
tmp = (c0 / sqrt(l)) * sqrt((a / v))
else if ((l * v) <= (-5d-76)) then
tmp = c0 * sqrt((a / (l * v)))
else if ((l * v) <= 2d-318) then
tmp = c0 / sqrt((v / (a / l)))
else if ((l * v) <= 2d+304) then
tmp = c0 * (sqrt(a) / sqrt((l * v)))
else
tmp = c0 * (((a / v) / l) ** 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) <= -2e+251) {
tmp = (c0 / Math.sqrt(l)) * Math.sqrt((A / V));
} else if ((l * V) <= -5e-76) {
tmp = c0 * Math.sqrt((A / (l * V)));
} else if ((l * V) <= 2e-318) {
tmp = c0 / Math.sqrt((V / (A / l)));
} else if ((l * V) <= 2e+304) {
tmp = c0 * (Math.sqrt(A) / Math.sqrt((l * V)));
} else {
tmp = c0 * Math.pow(((A / V) / l), 0.5);
}
return tmp;
}
def code(c0, A, V, l): tmp = 0 if (l * V) <= -2e+251: tmp = (c0 / math.sqrt(l)) * math.sqrt((A / V)) elif (l * V) <= -5e-76: tmp = c0 * math.sqrt((A / (l * V))) elif (l * V) <= 2e-318: tmp = c0 / math.sqrt((V / (A / l))) elif (l * V) <= 2e+304: tmp = c0 * (math.sqrt(A) / math.sqrt((l * V))) else: tmp = c0 * math.pow(((A / V) / l), 0.5) return tmp
function code(c0, A, V, l) tmp = 0.0 if (Float64(l * V) <= -2e+251) tmp = Float64(Float64(c0 / sqrt(l)) * sqrt(Float64(A / V))); elseif (Float64(l * V) <= -5e-76) tmp = Float64(c0 * sqrt(Float64(A / Float64(l * V)))); elseif (Float64(l * V) <= 2e-318) tmp = Float64(c0 / sqrt(Float64(V / Float64(A / l)))); elseif (Float64(l * V) <= 2e+304) tmp = Float64(c0 * Float64(sqrt(A) / sqrt(Float64(l * V)))); else tmp = Float64(c0 * (Float64(Float64(A / V) / l) ^ 0.5)); end return tmp end
function tmp_2 = code(c0, A, V, l) tmp = 0.0; if ((l * V) <= -2e+251) tmp = (c0 / sqrt(l)) * sqrt((A / V)); elseif ((l * V) <= -5e-76) tmp = c0 * sqrt((A / (l * V))); elseif ((l * V) <= 2e-318) tmp = c0 / sqrt((V / (A / l))); elseif ((l * V) <= 2e+304) tmp = c0 * (sqrt(A) / sqrt((l * V))); else tmp = c0 * (((A / V) / l) ^ 0.5); end tmp_2 = tmp; end
code[c0_, A_, V_, l_] := If[LessEqual[N[(l * V), $MachinePrecision], -2e+251], N[(N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], -5e-76], N[(c0 * N[Sqrt[N[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 2e-318], N[(c0 / N[Sqrt[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 2e+304], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[N[(l * V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[Power[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot V \leq -2 \cdot 10^{+251}:\\
\;\;\;\;\frac{c0}{\sqrt{\ell}} \cdot \sqrt{\frac{A}{V}}\\
\mathbf{elif}\;\ell \cdot V \leq -5 \cdot 10^{-76}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{A}{\ell \cdot V}}\\
\mathbf{elif}\;\ell \cdot V \leq 2 \cdot 10^{-318}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}\\
\mathbf{elif}\;\ell \cdot V \leq 2 \cdot 10^{+304}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{\ell \cdot V}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot {\left(\frac{\frac{A}{V}}{\ell}\right)}^{0.5}\\
\end{array}
\end{array}
if (*.f64 V l) < -2.0000000000000001e251Initial program 30.2%
sqrt-div0.0%
associate-*r/0.0%
Applied egg-rr0.0%
associate-/l*0.0%
Simplified0.0%
sqrt-undiv30.2%
*-commutative30.2%
associate-/l*48.5%
sqrt-div31.4%
associate-/r/31.4%
Applied egg-rr31.4%
if -2.0000000000000001e251 < (*.f64 V l) < -4.9999999999999998e-76Initial program 93.6%
if -4.9999999999999998e-76 < (*.f64 V l) < 2.0000024e-318Initial program 62.1%
pow1/262.1%
clear-num62.1%
inv-pow62.1%
pow-pow63.1%
*-commutative63.1%
associate-/l*79.6%
metadata-eval79.6%
Applied egg-rr79.6%
associate-/r/78.3%
Simplified78.3%
associate-/r/79.6%
metadata-eval79.6%
sqrt-pow279.6%
inv-pow79.6%
un-div-inv79.7%
associate-/l*63.2%
*-commutative63.2%
associate-*l/79.7%
*-commutative79.7%
Applied egg-rr79.7%
*-commutative79.7%
associate-/r/78.5%
Simplified78.5%
if 2.0000024e-318 < (*.f64 V l) < 1.9999999999999999e304Initial program 79.9%
sqrt-div99.4%
associate-*r/94.2%
Applied egg-rr94.2%
*-commutative94.2%
associate-/l*98.3%
associate-/r/99.4%
Simplified99.4%
if 1.9999999999999999e304 < (*.f64 V l) Initial program 34.0%
pow1/234.0%
associate-/r*76.5%
Applied egg-rr76.5%
Final simplification84.1%
(FPCore (c0 A V l)
:precision binary64
(if (<= (* l V) -2e+251)
(* (/ c0 (sqrt l)) (sqrt (/ A V)))
(if (<= (* l V) -5e-76)
(* c0 (sqrt (/ A (* l V))))
(if (<= (* l V) 2e-318)
(/ c0 (sqrt (/ V (/ A l))))
(if (<= (* l V) 2e+304)
(/ c0 (/ (sqrt (* l V)) (sqrt A)))
(* c0 (pow (/ (/ A V) l) 0.5)))))))
double code(double c0, double A, double V, double l) {
double tmp;
if ((l * V) <= -2e+251) {
tmp = (c0 / sqrt(l)) * sqrt((A / V));
} else if ((l * V) <= -5e-76) {
tmp = c0 * sqrt((A / (l * V)));
} else if ((l * V) <= 2e-318) {
tmp = c0 / sqrt((V / (A / l)));
} else if ((l * V) <= 2e+304) {
tmp = c0 / (sqrt((l * V)) / sqrt(A));
} else {
tmp = c0 * pow(((A / V) / 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) :: tmp
if ((l * v) <= (-2d+251)) then
tmp = (c0 / sqrt(l)) * sqrt((a / v))
else if ((l * v) <= (-5d-76)) then
tmp = c0 * sqrt((a / (l * v)))
else if ((l * v) <= 2d-318) then
tmp = c0 / sqrt((v / (a / l)))
else if ((l * v) <= 2d+304) then
tmp = c0 / (sqrt((l * v)) / sqrt(a))
else
tmp = c0 * (((a / v) / l) ** 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) <= -2e+251) {
tmp = (c0 / Math.sqrt(l)) * Math.sqrt((A / V));
} else if ((l * V) <= -5e-76) {
tmp = c0 * Math.sqrt((A / (l * V)));
} else if ((l * V) <= 2e-318) {
tmp = c0 / Math.sqrt((V / (A / l)));
} else if ((l * V) <= 2e+304) {
tmp = c0 / (Math.sqrt((l * V)) / Math.sqrt(A));
} else {
tmp = c0 * Math.pow(((A / V) / l), 0.5);
}
return tmp;
}
def code(c0, A, V, l): tmp = 0 if (l * V) <= -2e+251: tmp = (c0 / math.sqrt(l)) * math.sqrt((A / V)) elif (l * V) <= -5e-76: tmp = c0 * math.sqrt((A / (l * V))) elif (l * V) <= 2e-318: tmp = c0 / math.sqrt((V / (A / l))) elif (l * V) <= 2e+304: tmp = c0 / (math.sqrt((l * V)) / math.sqrt(A)) else: tmp = c0 * math.pow(((A / V) / l), 0.5) return tmp
function code(c0, A, V, l) tmp = 0.0 if (Float64(l * V) <= -2e+251) tmp = Float64(Float64(c0 / sqrt(l)) * sqrt(Float64(A / V))); elseif (Float64(l * V) <= -5e-76) tmp = Float64(c0 * sqrt(Float64(A / Float64(l * V)))); elseif (Float64(l * V) <= 2e-318) tmp = Float64(c0 / sqrt(Float64(V / Float64(A / l)))); elseif (Float64(l * V) <= 2e+304) tmp = Float64(c0 / Float64(sqrt(Float64(l * V)) / sqrt(A))); else tmp = Float64(c0 * (Float64(Float64(A / V) / l) ^ 0.5)); end return tmp end
function tmp_2 = code(c0, A, V, l) tmp = 0.0; if ((l * V) <= -2e+251) tmp = (c0 / sqrt(l)) * sqrt((A / V)); elseif ((l * V) <= -5e-76) tmp = c0 * sqrt((A / (l * V))); elseif ((l * V) <= 2e-318) tmp = c0 / sqrt((V / (A / l))); elseif ((l * V) <= 2e+304) tmp = c0 / (sqrt((l * V)) / sqrt(A)); else tmp = c0 * (((A / V) / l) ^ 0.5); end tmp_2 = tmp; end
code[c0_, A_, V_, l_] := If[LessEqual[N[(l * V), $MachinePrecision], -2e+251], N[(N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], -5e-76], N[(c0 * N[Sqrt[N[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 2e-318], N[(c0 / N[Sqrt[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 2e+304], N[(c0 / N[(N[Sqrt[N[(l * V), $MachinePrecision]], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[Power[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot V \leq -2 \cdot 10^{+251}:\\
\;\;\;\;\frac{c0}{\sqrt{\ell}} \cdot \sqrt{\frac{A}{V}}\\
\mathbf{elif}\;\ell \cdot V \leq -5 \cdot 10^{-76}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{A}{\ell \cdot V}}\\
\mathbf{elif}\;\ell \cdot V \leq 2 \cdot 10^{-318}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}\\
\mathbf{elif}\;\ell \cdot V \leq 2 \cdot 10^{+304}:\\
\;\;\;\;\frac{c0}{\frac{\sqrt{\ell \cdot V}}{\sqrt{A}}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot {\left(\frac{\frac{A}{V}}{\ell}\right)}^{0.5}\\
\end{array}
\end{array}
if (*.f64 V l) < -2.0000000000000001e251Initial program 30.2%
sqrt-div0.0%
associate-*r/0.0%
Applied egg-rr0.0%
associate-/l*0.0%
Simplified0.0%
sqrt-undiv30.2%
*-commutative30.2%
associate-/l*48.5%
sqrt-div31.4%
associate-/r/31.4%
Applied egg-rr31.4%
if -2.0000000000000001e251 < (*.f64 V l) < -4.9999999999999998e-76Initial program 93.6%
if -4.9999999999999998e-76 < (*.f64 V l) < 2.0000024e-318Initial program 62.1%
pow1/262.1%
clear-num62.1%
inv-pow62.1%
pow-pow63.1%
*-commutative63.1%
associate-/l*79.6%
metadata-eval79.6%
Applied egg-rr79.6%
associate-/r/78.3%
Simplified78.3%
associate-/r/79.6%
metadata-eval79.6%
sqrt-pow279.6%
inv-pow79.6%
un-div-inv79.7%
associate-/l*63.2%
*-commutative63.2%
associate-*l/79.7%
*-commutative79.7%
Applied egg-rr79.7%
*-commutative79.7%
associate-/r/78.5%
Simplified78.5%
if 2.0000024e-318 < (*.f64 V l) < 1.9999999999999999e304Initial program 79.9%
sqrt-div99.4%
associate-*r/94.2%
Applied egg-rr94.2%
associate-/l*99.4%
Simplified99.4%
if 1.9999999999999999e304 < (*.f64 V l) Initial program 34.0%
pow1/234.0%
associate-/r*76.5%
Applied egg-rr76.5%
Final simplification84.1%
(FPCore (c0 A V l)
:precision binary64
(if (<= (* l V) (- INFINITY))
(* (/ c0 (sqrt l)) (sqrt (/ A V)))
(if (<= (* l V) -5e-320)
(* c0 (/ (sqrt (- A)) (sqrt (* V (- l)))))
(if (<= (* l V) 2e-318)
(/ c0 (sqrt (* V (/ l A))))
(if (<= (* l V) 2e+304)
(/ c0 (/ (sqrt (* l V)) (sqrt A)))
(* c0 (pow (/ (/ A V) l) 0.5)))))))
double code(double c0, double A, double V, double l) {
double tmp;
if ((l * V) <= -((double) INFINITY)) {
tmp = (c0 / sqrt(l)) * sqrt((A / V));
} else if ((l * V) <= -5e-320) {
tmp = c0 * (sqrt(-A) / sqrt((V * -l)));
} else if ((l * V) <= 2e-318) {
tmp = c0 / sqrt((V * (l / A)));
} else if ((l * V) <= 2e+304) {
tmp = c0 / (sqrt((l * V)) / sqrt(A));
} else {
tmp = c0 * pow(((A / V) / l), 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(l)) * Math.sqrt((A / V));
} else if ((l * V) <= -5e-320) {
tmp = c0 * (Math.sqrt(-A) / Math.sqrt((V * -l)));
} else if ((l * V) <= 2e-318) {
tmp = c0 / Math.sqrt((V * (l / A)));
} else if ((l * V) <= 2e+304) {
tmp = c0 / (Math.sqrt((l * V)) / Math.sqrt(A));
} else {
tmp = c0 * Math.pow(((A / V) / l), 0.5);
}
return tmp;
}
def code(c0, A, V, l): tmp = 0 if (l * V) <= -math.inf: tmp = (c0 / math.sqrt(l)) * math.sqrt((A / V)) elif (l * V) <= -5e-320: tmp = c0 * (math.sqrt(-A) / math.sqrt((V * -l))) elif (l * V) <= 2e-318: tmp = c0 / math.sqrt((V * (l / A))) elif (l * V) <= 2e+304: tmp = c0 / (math.sqrt((l * V)) / math.sqrt(A)) else: tmp = c0 * math.pow(((A / V) / l), 0.5) return tmp
function code(c0, A, V, l) tmp = 0.0 if (Float64(l * V) <= Float64(-Inf)) tmp = Float64(Float64(c0 / sqrt(l)) * sqrt(Float64(A / V))); elseif (Float64(l * V) <= -5e-320) tmp = Float64(c0 * Float64(sqrt(Float64(-A)) / sqrt(Float64(V * Float64(-l))))); elseif (Float64(l * V) <= 2e-318) tmp = Float64(c0 / sqrt(Float64(V * Float64(l / A)))); elseif (Float64(l * V) <= 2e+304) tmp = Float64(c0 / Float64(sqrt(Float64(l * V)) / sqrt(A))); else tmp = Float64(c0 * (Float64(Float64(A / V) / l) ^ 0.5)); end return tmp end
function tmp_2 = code(c0, A, V, l) tmp = 0.0; if ((l * V) <= -Inf) tmp = (c0 / sqrt(l)) * sqrt((A / V)); elseif ((l * V) <= -5e-320) tmp = c0 * (sqrt(-A) / sqrt((V * -l))); elseif ((l * V) <= 2e-318) tmp = c0 / sqrt((V * (l / A))); elseif ((l * V) <= 2e+304) tmp = c0 / (sqrt((l * V)) / sqrt(A)); else tmp = c0 * (((A / V) / l) ^ 0.5); end tmp_2 = tmp; end
code[c0_, A_, V_, l_] := If[LessEqual[N[(l * V), $MachinePrecision], (-Infinity)], N[(N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], -5e-320], N[(c0 * N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[N[(V * (-l)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 2e-318], N[(c0 / N[Sqrt[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 2e+304], N[(c0 / N[(N[Sqrt[N[(l * V), $MachinePrecision]], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[Power[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot V \leq -\infty:\\
\;\;\;\;\frac{c0}{\sqrt{\ell}} \cdot \sqrt{\frac{A}{V}}\\
\mathbf{elif}\;\ell \cdot V \leq -5 \cdot 10^{-320}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\
\mathbf{elif}\;\ell \cdot V \leq 2 \cdot 10^{-318}:\\
\;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\
\mathbf{elif}\;\ell \cdot V \leq 2 \cdot 10^{+304}:\\
\;\;\;\;\frac{c0}{\frac{\sqrt{\ell \cdot V}}{\sqrt{A}}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot {\left(\frac{\frac{A}{V}}{\ell}\right)}^{0.5}\\
\end{array}
\end{array}
if (*.f64 V l) < -inf.0Initial program 26.2%
sqrt-div0.0%
associate-*r/0.0%
Applied egg-rr0.0%
associate-/l*0.0%
Simplified0.0%
sqrt-undiv26.2%
*-commutative26.2%
associate-/l*47.9%
sqrt-div23.6%
associate-/r/23.6%
Applied egg-rr23.6%
if -inf.0 < (*.f64 V l) < -4.99994e-320Initial program 86.8%
frac-2neg86.8%
sqrt-div98.9%
distribute-rgt-neg-in98.9%
Applied egg-rr98.9%
if -4.99994e-320 < (*.f64 V l) < 2.0000024e-318Initial program 40.7%
pow1/240.7%
clear-num40.7%
inv-pow40.7%
pow-pow40.7%
*-commutative40.7%
associate-/l*76.7%
metadata-eval76.7%
Applied egg-rr76.7%
associate-/r/76.7%
Simplified76.7%
associate-/r/76.7%
metadata-eval76.7%
sqrt-pow276.7%
inv-pow76.7%
un-div-inv76.8%
associate-/l*40.7%
*-commutative40.7%
associate-*l/76.8%
*-commutative76.8%
Applied egg-rr76.8%
associate-*r/40.7%
associate-*l/76.8%
*-commutative76.8%
Simplified76.8%
if 2.0000024e-318 < (*.f64 V l) < 1.9999999999999999e304Initial program 79.9%
sqrt-div99.4%
associate-*r/94.2%
Applied egg-rr94.2%
associate-/l*99.4%
Simplified99.4%
if 1.9999999999999999e304 < (*.f64 V l) Initial program 34.0%
pow1/234.0%
associate-/r*76.5%
Applied egg-rr76.5%
Final simplification88.6%
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (/ c0 (/ (sqrt (/ (- l) A)) (sqrt (/ -1.0 V))))))
(if (<= (* l V) -1e+282)
t_0
(if (<= (* l V) -5e-299)
(* c0 (/ (sqrt (- A)) (sqrt (* V (- l)))))
(if (<= (* l V) 2e-318)
t_0
(if (<= (* l V) 2e+304)
(/ c0 (/ (sqrt (* l V)) (sqrt A)))
(* c0 (pow (/ (/ A V) l) 0.5))))))))
double code(double c0, double A, double V, double l) {
double t_0 = c0 / (sqrt((-l / A)) / sqrt((-1.0 / V)));
double tmp;
if ((l * V) <= -1e+282) {
tmp = t_0;
} else if ((l * V) <= -5e-299) {
tmp = c0 * (sqrt(-A) / sqrt((V * -l)));
} else if ((l * V) <= 2e-318) {
tmp = t_0;
} else if ((l * V) <= 2e+304) {
tmp = c0 / (sqrt((l * V)) / sqrt(A));
} else {
tmp = c0 * pow(((A / V) / 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((-l / a)) / sqrt(((-1.0d0) / v)))
if ((l * v) <= (-1d+282)) then
tmp = t_0
else if ((l * v) <= (-5d-299)) then
tmp = c0 * (sqrt(-a) / sqrt((v * -l)))
else if ((l * v) <= 2d-318) then
tmp = t_0
else if ((l * v) <= 2d+304) then
tmp = c0 / (sqrt((l * v)) / sqrt(a))
else
tmp = c0 * (((a / v) / 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((-l / A)) / Math.sqrt((-1.0 / V)));
double tmp;
if ((l * V) <= -1e+282) {
tmp = t_0;
} else if ((l * V) <= -5e-299) {
tmp = c0 * (Math.sqrt(-A) / Math.sqrt((V * -l)));
} else if ((l * V) <= 2e-318) {
tmp = t_0;
} else if ((l * V) <= 2e+304) {
tmp = c0 / (Math.sqrt((l * V)) / Math.sqrt(A));
} else {
tmp = c0 * Math.pow(((A / V) / l), 0.5);
}
return tmp;
}
def code(c0, A, V, l): t_0 = c0 / (math.sqrt((-l / A)) / math.sqrt((-1.0 / V))) tmp = 0 if (l * V) <= -1e+282: tmp = t_0 elif (l * V) <= -5e-299: tmp = c0 * (math.sqrt(-A) / math.sqrt((V * -l))) elif (l * V) <= 2e-318: tmp = t_0 elif (l * V) <= 2e+304: tmp = c0 / (math.sqrt((l * V)) / math.sqrt(A)) else: tmp = c0 * math.pow(((A / V) / l), 0.5) return tmp
function code(c0, A, V, l) t_0 = Float64(c0 / Float64(sqrt(Float64(Float64(-l) / A)) / sqrt(Float64(-1.0 / V)))) tmp = 0.0 if (Float64(l * V) <= -1e+282) tmp = t_0; elseif (Float64(l * V) <= -5e-299) tmp = Float64(c0 * Float64(sqrt(Float64(-A)) / sqrt(Float64(V * Float64(-l))))); elseif (Float64(l * V) <= 2e-318) tmp = t_0; elseif (Float64(l * V) <= 2e+304) tmp = Float64(c0 / Float64(sqrt(Float64(l * V)) / sqrt(A))); else tmp = Float64(c0 * (Float64(Float64(A / V) / l) ^ 0.5)); end return tmp end
function tmp_2 = code(c0, A, V, l) t_0 = c0 / (sqrt((-l / A)) / sqrt((-1.0 / V))); tmp = 0.0; if ((l * V) <= -1e+282) tmp = t_0; elseif ((l * V) <= -5e-299) tmp = c0 * (sqrt(-A) / sqrt((V * -l))); elseif ((l * V) <= 2e-318) tmp = t_0; elseif ((l * V) <= 2e+304) tmp = c0 / (sqrt((l * V)) / sqrt(A)); else tmp = c0 * (((A / V) / l) ^ 0.5); end tmp_2 = tmp; end
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(c0 / N[(N[Sqrt[N[((-l) / A), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(-1.0 / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(l * V), $MachinePrecision], -1e+282], t$95$0, If[LessEqual[N[(l * V), $MachinePrecision], -5e-299], N[(c0 * N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[N[(V * (-l)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 2e-318], t$95$0, If[LessEqual[N[(l * V), $MachinePrecision], 2e+304], N[(c0 / N[(N[Sqrt[N[(l * V), $MachinePrecision]], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[Power[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{c0}{\frac{\sqrt{\frac{-\ell}{A}}}{\sqrt{\frac{-1}{V}}}}\\
\mathbf{if}\;\ell \cdot V \leq -1 \cdot 10^{+282}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;\ell \cdot V \leq -5 \cdot 10^{-299}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\
\mathbf{elif}\;\ell \cdot V \leq 2 \cdot 10^{-318}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;\ell \cdot V \leq 2 \cdot 10^{+304}:\\
\;\;\;\;\frac{c0}{\frac{\sqrt{\ell \cdot V}}{\sqrt{A}}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot {\left(\frac{\frac{A}{V}}{\ell}\right)}^{0.5}\\
\end{array}
\end{array}
if (*.f64 V l) < -1.00000000000000003e282 or -4.99999999999999956e-299 < (*.f64 V l) < 2.0000024e-318Initial program 38.2%
pow1/238.2%
clear-num38.2%
inv-pow38.2%
pow-pow38.2%
*-commutative38.2%
associate-/l*65.5%
metadata-eval65.5%
Applied egg-rr65.5%
associate-/r/65.5%
Simplified65.5%
associate-/r/65.5%
metadata-eval65.5%
sqrt-pow265.5%
inv-pow65.5%
un-div-inv65.5%
associate-/l*38.2%
*-commutative38.2%
associate-*l/65.5%
*-commutative65.5%
Applied egg-rr65.5%
clear-num65.5%
*-un-lft-identity65.5%
associate-*l/65.5%
div-inv65.5%
associate-/l/65.6%
frac-2neg65.6%
sqrt-div47.4%
distribute-neg-frac47.4%
distribute-neg-frac47.4%
metadata-eval47.4%
Applied egg-rr47.4%
if -1.00000000000000003e282 < (*.f64 V l) < -4.99999999999999956e-299Initial program 88.0%
frac-2neg88.0%
sqrt-div99.5%
distribute-rgt-neg-in99.5%
Applied egg-rr99.5%
if 2.0000024e-318 < (*.f64 V l) < 1.9999999999999999e304Initial program 79.9%
sqrt-div99.4%
associate-*r/94.2%
Applied egg-rr94.2%
associate-/l*99.4%
Simplified99.4%
if 1.9999999999999999e304 < (*.f64 V l) Initial program 34.0%
pow1/234.0%
associate-/r*76.5%
Applied egg-rr76.5%
Final simplification85.9%
(FPCore (c0 A V l)
:precision binary64
(if (<= l -5e-310)
(* c0 (pow (/ (/ A V) l) 0.5))
(if (<= l 4.3e+217)
(* c0 (/ (sqrt (/ A V)) (sqrt l)))
(/ c0 (sqrt (/ V (/ A l)))))))
double code(double c0, double A, double V, double l) {
double tmp;
if (l <= -5e-310) {
tmp = c0 * pow(((A / V) / l), 0.5);
} else if (l <= 4.3e+217) {
tmp = c0 * (sqrt((A / V)) / sqrt(l));
} else {
tmp = c0 / sqrt((V / (A / l)));
}
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 <= (-5d-310)) then
tmp = c0 * (((a / v) / l) ** 0.5d0)
else if (l <= 4.3d+217) then
tmp = c0 * (sqrt((a / v)) / sqrt(l))
else
tmp = c0 / sqrt((v / (a / l)))
end if
code = tmp
end function
public static double code(double c0, double A, double V, double l) {
double tmp;
if (l <= -5e-310) {
tmp = c0 * Math.pow(((A / V) / l), 0.5);
} else if (l <= 4.3e+217) {
tmp = c0 * (Math.sqrt((A / V)) / Math.sqrt(l));
} else {
tmp = c0 / Math.sqrt((V / (A / l)));
}
return tmp;
}
def code(c0, A, V, l): tmp = 0 if l <= -5e-310: tmp = c0 * math.pow(((A / V) / l), 0.5) elif l <= 4.3e+217: tmp = c0 * (math.sqrt((A / V)) / math.sqrt(l)) else: tmp = c0 / math.sqrt((V / (A / l))) return tmp
function code(c0, A, V, l) tmp = 0.0 if (l <= -5e-310) tmp = Float64(c0 * (Float64(Float64(A / V) / l) ^ 0.5)); elseif (l <= 4.3e+217) tmp = Float64(c0 * Float64(sqrt(Float64(A / V)) / sqrt(l))); else tmp = Float64(c0 / sqrt(Float64(V / Float64(A / l)))); end return tmp end
function tmp_2 = code(c0, A, V, l) tmp = 0.0; if (l <= -5e-310) tmp = c0 * (((A / V) / l) ^ 0.5); elseif (l <= 4.3e+217) tmp = c0 * (sqrt((A / V)) / sqrt(l)); else tmp = c0 / sqrt((V / (A / l))); end tmp_2 = tmp; end
code[c0_, A_, V_, l_] := If[LessEqual[l, -5e-310], N[(c0 * N[Power[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 4.3e+217], N[(c0 * N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 / N[Sqrt[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -5 \cdot 10^{-310}:\\
\;\;\;\;c0 \cdot {\left(\frac{\frac{A}{V}}{\ell}\right)}^{0.5}\\
\mathbf{elif}\;\ell \leq 4.3 \cdot 10^{+217}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}\\
\end{array}
\end{array}
if l < -4.999999999999985e-310Initial program 65.6%
pow1/265.6%
associate-/r*71.1%
Applied egg-rr71.1%
if -4.999999999999985e-310 < l < 4.3000000000000001e217Initial program 77.0%
associate-/r*81.8%
sqrt-div88.4%
Applied egg-rr88.4%
if 4.3000000000000001e217 < l Initial program 76.3%
pow1/276.3%
clear-num74.9%
inv-pow74.9%
pow-pow74.9%
*-commutative74.9%
associate-/l*54.7%
metadata-eval54.7%
Applied egg-rr54.7%
associate-/r/79.9%
Simplified79.9%
associate-/r/54.7%
metadata-eval54.7%
sqrt-pow254.7%
inv-pow54.7%
un-div-inv54.7%
associate-/l*75.0%
*-commutative75.0%
associate-*l/58.6%
*-commutative58.6%
Applied egg-rr58.6%
*-commutative58.6%
associate-/r/79.7%
Simplified79.7%
Final simplification78.2%
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (/ A (* l V))))
(if (or (<= t_0 0.0) (not (<= t_0 2e+301)))
(/ c0 (sqrt (* V (/ l A))))
(* c0 (sqrt t_0)))))
double code(double c0, double A, double V, double l) {
double t_0 = A / (l * V);
double tmp;
if ((t_0 <= 0.0) || !(t_0 <= 2e+301)) {
tmp = c0 / sqrt((V * (l / A)));
} else {
tmp = c0 * sqrt(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 = a / (l * v)
if ((t_0 <= 0.0d0) .or. (.not. (t_0 <= 2d+301))) then
tmp = c0 / sqrt((v * (l / a)))
else
tmp = c0 * sqrt(t_0)
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) || !(t_0 <= 2e+301)) {
tmp = c0 / Math.sqrt((V * (l / A)));
} else {
tmp = c0 * Math.sqrt(t_0);
}
return tmp;
}
def code(c0, A, V, l): t_0 = A / (l * V) tmp = 0 if (t_0 <= 0.0) or not (t_0 <= 2e+301): tmp = c0 / math.sqrt((V * (l / A))) else: tmp = c0 * math.sqrt(t_0) return tmp
function code(c0, A, V, l) t_0 = Float64(A / Float64(l * V)) tmp = 0.0 if ((t_0 <= 0.0) || !(t_0 <= 2e+301)) tmp = Float64(c0 / sqrt(Float64(V * Float64(l / A)))); else tmp = Float64(c0 * sqrt(t_0)); 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) || ~((t_0 <= 2e+301))) tmp = c0 / sqrt((V * (l / A))); else tmp = c0 * sqrt(t_0); end tmp_2 = tmp; end
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, 0.0], N[Not[LessEqual[t$95$0, 2e+301]], $MachinePrecision]], N[(c0 / N[Sqrt[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0 * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{A}{\ell \cdot V}\\
\mathbf{if}\;t_0 \leq 0 \lor \neg \left(t_0 \leq 2 \cdot 10^{+301}\right):\\
\;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{t_0}\\
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 0.0 or 2.00000000000000011e301 < (/.f64 A (*.f64 V l)) Initial program 32.7%
pow1/232.7%
clear-num32.7%
inv-pow32.7%
pow-pow33.4%
*-commutative33.4%
associate-/l*52.6%
metadata-eval52.6%
Applied egg-rr52.6%
associate-/r/51.7%
Simplified51.7%
associate-/r/52.6%
metadata-eval52.6%
sqrt-pow252.6%
inv-pow52.6%
un-div-inv52.6%
associate-/l*33.4%
*-commutative33.4%
associate-*l/52.6%
*-commutative52.6%
Applied egg-rr52.6%
associate-*r/33.4%
associate-*l/51.8%
*-commutative51.8%
Simplified51.8%
if 0.0 < (/.f64 A (*.f64 V l)) < 2.00000000000000011e301Initial program 98.8%
Final simplification78.8%
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (/ A (* l V))))
(if (<= t_0 2e-282)
(* c0 (pow (/ (/ A V) l) 0.5))
(if (<= t_0 2e+301)
(/ c0 (sqrt (/ (* l V) A)))
(/ c0 (sqrt (* V (/ l A))))))))
double code(double c0, double A, double V, double l) {
double t_0 = A / (l * V);
double tmp;
if (t_0 <= 2e-282) {
tmp = c0 * pow(((A / V) / l), 0.5);
} else if (t_0 <= 2e+301) {
tmp = c0 / sqrt(((l * V) / A));
} else {
tmp = c0 / sqrt((V * (l / A)));
}
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-282) then
tmp = c0 * (((a / v) / l) ** 0.5d0)
else if (t_0 <= 2d+301) then
tmp = c0 / sqrt(((l * v) / a))
else
tmp = c0 / sqrt((v * (l / a)))
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-282) {
tmp = c0 * Math.pow(((A / V) / l), 0.5);
} else if (t_0 <= 2e+301) {
tmp = c0 / Math.sqrt(((l * V) / A));
} else {
tmp = c0 / Math.sqrt((V * (l / A)));
}
return tmp;
}
def code(c0, A, V, l): t_0 = A / (l * V) tmp = 0 if t_0 <= 2e-282: tmp = c0 * math.pow(((A / V) / l), 0.5) elif t_0 <= 2e+301: tmp = c0 / math.sqrt(((l * V) / A)) else: tmp = c0 / math.sqrt((V * (l / A))) return tmp
function code(c0, A, V, l) t_0 = Float64(A / Float64(l * V)) tmp = 0.0 if (t_0 <= 2e-282) tmp = Float64(c0 * (Float64(Float64(A / V) / l) ^ 0.5)); elseif (t_0 <= 2e+301) tmp = Float64(c0 / sqrt(Float64(Float64(l * V) / A))); else tmp = Float64(c0 / sqrt(Float64(V * Float64(l / A)))); end return tmp end
function tmp_2 = code(c0, A, V, l) t_0 = A / (l * V); tmp = 0.0; if (t_0 <= 2e-282) tmp = c0 * (((A / V) / l) ^ 0.5); elseif (t_0 <= 2e+301) tmp = c0 / sqrt(((l * V) / A)); else tmp = c0 / sqrt((V * (l / A))); 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-282], N[(c0 * N[Power[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+301], N[(c0 / N[Sqrt[N[(N[(l * V), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0 / N[Sqrt[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{A}{\ell \cdot V}\\
\mathbf{if}\;t_0 \leq 2 \cdot 10^{-282}:\\
\;\;\;\;c0 \cdot {\left(\frac{\frac{A}{V}}{\ell}\right)}^{0.5}\\
\mathbf{elif}\;t_0 \leq 2 \cdot 10^{+301}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{\ell \cdot V}{A}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 2e-282Initial program 30.0%
pow1/230.0%
associate-/r*49.4%
Applied egg-rr49.4%
if 2e-282 < (/.f64 A (*.f64 V l)) < 2.00000000000000011e301Initial program 99.3%
pow1/299.3%
clear-num99.2%
inv-pow99.2%
pow-pow99.3%
*-commutative99.3%
associate-/l*89.5%
metadata-eval89.5%
Applied egg-rr89.5%
associate-/r/87.2%
Simplified87.2%
associate-/r/89.5%
metadata-eval89.5%
sqrt-pow289.4%
inv-pow89.4%
un-div-inv89.5%
associate-/l*99.3%
*-commutative99.3%
associate-*l/88.8%
*-commutative88.8%
Applied egg-rr88.8%
associate-*r/99.3%
Applied egg-rr99.3%
if 2.00000000000000011e301 < (/.f64 A (*.f64 V l)) Initial program 39.2%
pow1/239.2%
clear-num39.2%
inv-pow39.2%
pow-pow40.6%
*-commutative40.6%
associate-/l*61.3%
metadata-eval61.3%
Applied egg-rr61.3%
associate-/r/59.6%
Simplified59.6%
associate-/r/61.3%
metadata-eval61.3%
sqrt-pow261.3%
inv-pow61.3%
un-div-inv61.4%
associate-/l*40.6%
*-commutative40.6%
associate-*l/61.4%
*-commutative61.4%
Applied egg-rr61.4%
associate-*r/40.6%
associate-*l/59.7%
*-commutative59.7%
Simplified59.7%
Final simplification79.5%
(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 70.7%
Final simplification70.7%
herbie shell --seed 2023305
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))