
(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}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (* c0 (/ (sqrt (/ A (- l))) (sqrt (- V))))))
(if (<= (* V l) (- INFINITY))
t_0
(if (<= (* V l) -1e-285)
(* c0 (/ (sqrt (- A)) (sqrt (* V (- l)))))
(if (<= (* V l) 0.0)
t_0
(if (<= (* V l) 5e+304)
(* c0 (/ 1.0 (/ (sqrt (* V l)) (sqrt A))))
(* c0 (sqrt (/ (/ A V) l)))))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = c0 * (sqrt((A / -l)) / sqrt(-V));
double tmp;
if ((V * l) <= -((double) INFINITY)) {
tmp = t_0;
} else if ((V * l) <= -1e-285) {
tmp = c0 * (sqrt(-A) / sqrt((V * -l)));
} else if ((V * l) <= 0.0) {
tmp = t_0;
} else if ((V * l) <= 5e+304) {
tmp = c0 * (1.0 / (sqrt((V * l)) / sqrt(A)));
} else {
tmp = c0 * sqrt(((A / V) / l));
}
return tmp;
}
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = c0 * (Math.sqrt((A / -l)) / Math.sqrt(-V));
double tmp;
if ((V * l) <= -Double.POSITIVE_INFINITY) {
tmp = t_0;
} else if ((V * l) <= -1e-285) {
tmp = c0 * (Math.sqrt(-A) / Math.sqrt((V * -l)));
} else if ((V * l) <= 0.0) {
tmp = t_0;
} else if ((V * l) <= 5e+304) {
tmp = c0 * (1.0 / (Math.sqrt((V * l)) / Math.sqrt(A)));
} else {
tmp = c0 * Math.sqrt(((A / V) / l));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = c0 * (math.sqrt((A / -l)) / math.sqrt(-V)) tmp = 0 if (V * l) <= -math.inf: tmp = t_0 elif (V * l) <= -1e-285: tmp = c0 * (math.sqrt(-A) / math.sqrt((V * -l))) elif (V * l) <= 0.0: tmp = t_0 elif (V * l) <= 5e+304: tmp = c0 * (1.0 / (math.sqrt((V * l)) / math.sqrt(A))) else: tmp = c0 * math.sqrt(((A / V) / l)) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = Float64(c0 * Float64(sqrt(Float64(A / Float64(-l))) / sqrt(Float64(-V)))) tmp = 0.0 if (Float64(V * l) <= Float64(-Inf)) tmp = t_0; elseif (Float64(V * l) <= -1e-285) tmp = Float64(c0 * Float64(sqrt(Float64(-A)) / sqrt(Float64(V * Float64(-l))))); elseif (Float64(V * l) <= 0.0) tmp = t_0; elseif (Float64(V * l) <= 5e+304) tmp = Float64(c0 * Float64(1.0 / Float64(sqrt(Float64(V * l)) / sqrt(A)))); else tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = c0 * (sqrt((A / -l)) / sqrt(-V));
tmp = 0.0;
if ((V * l) <= -Inf)
tmp = t_0;
elseif ((V * l) <= -1e-285)
tmp = c0 * (sqrt(-A) / sqrt((V * -l)));
elseif ((V * l) <= 0.0)
tmp = t_0;
elseif ((V * l) <= 5e+304)
tmp = c0 * (1.0 / (sqrt((V * l)) / sqrt(A)));
else
tmp = c0 * sqrt(((A / V) / l));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(c0 * N[(N[Sqrt[N[(A / (-l)), $MachinePrecision]], $MachinePrecision] / N[Sqrt[(-V)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(V * l), $MachinePrecision], (-Infinity)], t$95$0, If[LessEqual[N[(V * l), $MachinePrecision], -1e-285], N[(c0 * N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[N[(V * (-l)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 0.0], t$95$0, If[LessEqual[N[(V * l), $MachinePrecision], 5e+304], N[(c0 * N[(1.0 / N[(N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := c0 \cdot \frac{\sqrt{\frac{A}{-\ell}}}{\sqrt{-V}}\\
\mathbf{if}\;V \cdot \ell \leq -\infty:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-285}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\
\mathbf{elif}\;V \cdot \ell \leq 0:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{+304}:\\
\;\;\;\;c0 \cdot \frac{1}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\end{array}
\end{array}
if (*.f64 V l) < -inf.0 or -1.00000000000000007e-285 < (*.f64 V l) < -0.0Initial program 36.3%
*-un-lft-identity36.3%
times-frac59.6%
Applied egg-rr59.6%
associate-*l/59.7%
*-un-lft-identity59.7%
frac-2neg59.7%
sqrt-div36.3%
distribute-neg-frac236.3%
Applied egg-rr36.3%
distribute-frac-neg236.3%
distribute-frac-neg36.3%
Simplified36.3%
if -inf.0 < (*.f64 V l) < -1.00000000000000007e-285Initial program 88.0%
frac-2neg88.0%
sqrt-div99.4%
*-commutative99.4%
distribute-rgt-neg-in99.4%
Applied egg-rr99.4%
if -0.0 < (*.f64 V l) < 4.9999999999999997e304Initial program 77.9%
sqrt-div98.2%
clear-num98.2%
Applied egg-rr98.2%
if 4.9999999999999997e304 < (*.f64 V l) Initial program 46.3%
*-commutative46.3%
associate-/l/76.0%
Simplified76.0%
Final simplification83.7%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (* c0 (sqrt (/ A (* V l))))))
(if (<= t_0 2e-211)
(/ c0 (sqrt (* l (/ V A))))
(if (<= t_0 2e+298) t_0 (/ c0 (sqrt (* V (/ l A))))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = c0 * sqrt((A / (V * l)));
double tmp;
if (t_0 <= 2e-211) {
tmp = c0 / sqrt((l * (V / A)));
} else if (t_0 <= 2e+298) {
tmp = t_0;
} else {
tmp = c0 / sqrt((V * (l / A)));
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: tmp
t_0 = c0 * sqrt((a / (v * l)))
if (t_0 <= 2d-211) then
tmp = c0 / sqrt((l * (v / a)))
else if (t_0 <= 2d+298) then
tmp = t_0
else
tmp = c0 / sqrt((v * (l / a)))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = c0 * Math.sqrt((A / (V * l)));
double tmp;
if (t_0 <= 2e-211) {
tmp = c0 / Math.sqrt((l * (V / A)));
} else if (t_0 <= 2e+298) {
tmp = t_0;
} else {
tmp = c0 / Math.sqrt((V * (l / A)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = c0 * math.sqrt((A / (V * l))) tmp = 0 if t_0 <= 2e-211: tmp = c0 / math.sqrt((l * (V / A))) elif t_0 <= 2e+298: tmp = t_0 else: tmp = c0 / math.sqrt((V * (l / A))) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = Float64(c0 * sqrt(Float64(A / Float64(V * l)))) tmp = 0.0 if (t_0 <= 2e-211) tmp = Float64(c0 / sqrt(Float64(l * Float64(V / A)))); elseif (t_0 <= 2e+298) tmp = t_0; else tmp = Float64(c0 / sqrt(Float64(V * Float64(l / A)))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = c0 * sqrt((A / (V * l)));
tmp = 0.0;
if (t_0 <= 2e-211)
tmp = c0 / sqrt((l * (V / A)));
elseif (t_0 <= 2e+298)
tmp = t_0;
else
tmp = c0 / sqrt((V * (l / A)));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 2e-211], N[(c0 / N[Sqrt[N[(l * N[(V / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+298], t$95$0, N[(c0 / N[Sqrt[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\
\mathbf{if}\;t\_0 \leq 2 \cdot 10^{-211}:\\
\;\;\;\;\frac{c0}{\sqrt{\ell \cdot \frac{V}{A}}}\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+298}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 2.00000000000000017e-211Initial program 66.7%
*-un-lft-identity66.7%
times-frac65.9%
Applied egg-rr65.9%
frac-times66.7%
*-un-lft-identity66.7%
clear-num66.7%
Applied egg-rr66.7%
sqrt-div66.7%
metadata-eval66.7%
un-div-inv66.8%
associate-/l*65.7%
Applied egg-rr65.7%
*-commutative65.7%
associate-*l/66.8%
associate-*r/70.7%
Simplified70.7%
if 2.00000000000000017e-211 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1.9999999999999999e298Initial program 96.0%
if 1.9999999999999999e298 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 48.9%
*-un-lft-identity48.9%
times-frac58.9%
Applied egg-rr58.9%
frac-times48.9%
*-un-lft-identity48.9%
clear-num48.9%
Applied egg-rr48.9%
sqrt-div48.9%
metadata-eval48.9%
un-div-inv48.9%
associate-/l*59.0%
Applied egg-rr59.0%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (* c0 (sqrt (/ A (* V l))))))
(if (<= t_0 0.0)
(* c0 (sqrt (/ (/ A V) l)))
(if (<= t_0 2e+298) t_0 (/ c0 (sqrt (* V (/ l A))))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = c0 * sqrt((A / (V * l)));
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * sqrt(((A / V) / l));
} else if (t_0 <= 2e+298) {
tmp = t_0;
} else {
tmp = c0 / sqrt((V * (l / A)));
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: tmp
t_0 = c0 * sqrt((a / (v * l)))
if (t_0 <= 0.0d0) then
tmp = c0 * sqrt(((a / v) / l))
else if (t_0 <= 2d+298) then
tmp = t_0
else
tmp = c0 / sqrt((v * (l / a)))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = c0 * Math.sqrt((A / (V * l)));
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * Math.sqrt(((A / V) / l));
} else if (t_0 <= 2e+298) {
tmp = t_0;
} else {
tmp = c0 / Math.sqrt((V * (l / A)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = c0 * math.sqrt((A / (V * l))) tmp = 0 if t_0 <= 0.0: tmp = c0 * math.sqrt(((A / V) / l)) elif t_0 <= 2e+298: tmp = t_0 else: tmp = c0 / math.sqrt((V * (l / A))) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = Float64(c0 * sqrt(Float64(A / Float64(V * l)))) tmp = 0.0 if (t_0 <= 0.0) tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); elseif (t_0 <= 2e+298) tmp = t_0; else tmp = Float64(c0 / sqrt(Float64(V * Float64(l / A)))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = c0 * sqrt((A / (V * l)));
tmp = 0.0;
if (t_0 <= 0.0)
tmp = c0 * sqrt(((A / V) / l));
elseif (t_0 <= 2e+298)
tmp = t_0;
else
tmp = c0 / sqrt((V * (l / A)));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+298], t$95$0, N[(c0 / N[Sqrt[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+298}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 0.0Initial program 64.9%
*-commutative64.9%
associate-/l/69.6%
Simplified69.6%
if 0.0 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1.9999999999999999e298Initial program 96.5%
if 1.9999999999999999e298 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 48.9%
*-un-lft-identity48.9%
times-frac58.9%
Applied egg-rr58.9%
frac-times48.9%
*-un-lft-identity48.9%
clear-num48.9%
Applied egg-rr48.9%
sqrt-div48.9%
metadata-eval48.9%
un-div-inv48.9%
associate-/l*59.0%
Applied egg-rr59.0%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. (FPCore (c0 A V l) :precision binary64 (if (<= A -5e-310) (* (/ (sqrt (- A)) (sqrt (- V))) (/ c0 (sqrt l))) (* c0 (/ 1.0 (/ (sqrt (* V l)) (sqrt A))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if (A <= -5e-310) {
tmp = (sqrt(-A) / sqrt(-V)) * (c0 / sqrt(l));
} else {
tmp = c0 * (1.0 / (sqrt((V * l)) / sqrt(A)));
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: tmp
if (a <= (-5d-310)) then
tmp = (sqrt(-a) / sqrt(-v)) * (c0 / sqrt(l))
else
tmp = c0 * (1.0d0 / (sqrt((v * l)) / sqrt(a)))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if (A <= -5e-310) {
tmp = (Math.sqrt(-A) / Math.sqrt(-V)) * (c0 / Math.sqrt(l));
} else {
tmp = c0 * (1.0 / (Math.sqrt((V * l)) / Math.sqrt(A)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if A <= -5e-310: tmp = (math.sqrt(-A) / math.sqrt(-V)) * (c0 / math.sqrt(l)) else: tmp = c0 * (1.0 / (math.sqrt((V * l)) / math.sqrt(A))) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (A <= -5e-310) tmp = Float64(Float64(sqrt(Float64(-A)) / sqrt(Float64(-V))) * Float64(c0 / sqrt(l))); else tmp = Float64(c0 * Float64(1.0 / Float64(sqrt(Float64(V * l)) / sqrt(A)))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
tmp = 0.0;
if (A <= -5e-310)
tmp = (sqrt(-A) / sqrt(-V)) * (c0 / sqrt(l));
else
tmp = c0 * (1.0 / (sqrt((V * l)) / sqrt(A)));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := If[LessEqual[A, -5e-310], N[(N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[(-V)], $MachinePrecision]), $MachinePrecision] * N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[(1.0 / N[(N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{\sqrt{-A}}{\sqrt{-V}} \cdot \frac{c0}{\sqrt{\ell}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{1}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\
\end{array}
\end{array}
if A < -4.999999999999985e-310Initial program 69.8%
associate-/r*68.9%
sqrt-div32.6%
associate-*r/32.5%
Applied egg-rr32.5%
*-commutative32.5%
associate-/l*32.6%
Simplified32.6%
frac-2neg32.6%
sqrt-div40.0%
Applied egg-rr40.0%
if -4.999999999999985e-310 < A Initial program 70.6%
sqrt-div86.1%
clear-num86.0%
Applied egg-rr86.0%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(if (<= (* V l) -1e+251)
(/ (sqrt (/ A V)) (/ (sqrt l) c0))
(if (<= (* V l) -1e-285)
(* c0 (/ (sqrt (- A)) (sqrt (* V (- l)))))
(if (<= (* V l) 0.0)
(/ c0 (sqrt (* V (/ l A))))
(if (<= (* V l) 5e+304)
(* c0 (/ 1.0 (/ (sqrt (* V l)) (sqrt A))))
(* c0 (sqrt (/ (/ A V) l))))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -1e+251) {
tmp = sqrt((A / V)) / (sqrt(l) / c0);
} else if ((V * l) <= -1e-285) {
tmp = c0 * (sqrt(-A) / sqrt((V * -l)));
} else if ((V * l) <= 0.0) {
tmp = c0 / sqrt((V * (l / A)));
} else if ((V * l) <= 5e+304) {
tmp = c0 * (1.0 / (sqrt((V * l)) / sqrt(A)));
} else {
tmp = c0 * sqrt(((A / V) / l));
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: tmp
if ((v * l) <= (-1d+251)) then
tmp = sqrt((a / v)) / (sqrt(l) / c0)
else if ((v * l) <= (-1d-285)) then
tmp = c0 * (sqrt(-a) / sqrt((v * -l)))
else if ((v * l) <= 0.0d0) then
tmp = c0 / sqrt((v * (l / a)))
else if ((v * l) <= 5d+304) then
tmp = c0 * (1.0d0 / (sqrt((v * l)) / sqrt(a)))
else
tmp = c0 * sqrt(((a / v) / l))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -1e+251) {
tmp = Math.sqrt((A / V)) / (Math.sqrt(l) / c0);
} else if ((V * l) <= -1e-285) {
tmp = c0 * (Math.sqrt(-A) / Math.sqrt((V * -l)));
} else if ((V * l) <= 0.0) {
tmp = c0 / Math.sqrt((V * (l / A)));
} else if ((V * l) <= 5e+304) {
tmp = c0 * (1.0 / (Math.sqrt((V * l)) / Math.sqrt(A)));
} else {
tmp = c0 * Math.sqrt(((A / V) / l));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if (V * l) <= -1e+251: tmp = math.sqrt((A / V)) / (math.sqrt(l) / c0) elif (V * l) <= -1e-285: tmp = c0 * (math.sqrt(-A) / math.sqrt((V * -l))) elif (V * l) <= 0.0: tmp = c0 / math.sqrt((V * (l / A))) elif (V * l) <= 5e+304: tmp = c0 * (1.0 / (math.sqrt((V * l)) / math.sqrt(A))) else: tmp = c0 * math.sqrt(((A / V) / l)) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (Float64(V * l) <= -1e+251) tmp = Float64(sqrt(Float64(A / V)) / Float64(sqrt(l) / c0)); elseif (Float64(V * l) <= -1e-285) tmp = Float64(c0 * Float64(sqrt(Float64(-A)) / sqrt(Float64(V * Float64(-l))))); elseif (Float64(V * l) <= 0.0) tmp = Float64(c0 / sqrt(Float64(V * Float64(l / A)))); elseif (Float64(V * l) <= 5e+304) tmp = Float64(c0 * Float64(1.0 / Float64(sqrt(Float64(V * l)) / sqrt(A)))); else tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
tmp = 0.0;
if ((V * l) <= -1e+251)
tmp = sqrt((A / V)) / (sqrt(l) / c0);
elseif ((V * l) <= -1e-285)
tmp = c0 * (sqrt(-A) / sqrt((V * -l)));
elseif ((V * l) <= 0.0)
tmp = c0 / sqrt((V * (l / A)));
elseif ((V * l) <= 5e+304)
tmp = c0 * (1.0 / (sqrt((V * l)) / sqrt(A)));
else
tmp = c0 * sqrt(((A / V) / l));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := If[LessEqual[N[(V * l), $MachinePrecision], -1e+251], N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[(N[Sqrt[l], $MachinePrecision] / c0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -1e-285], N[(c0 * N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[N[(V * (-l)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 0.0], N[(c0 / N[Sqrt[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 5e+304], N[(c0 * N[(1.0 / N[(N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -1 \cdot 10^{+251}:\\
\;\;\;\;\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}\\
\mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-285}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\
\mathbf{elif}\;V \cdot \ell \leq 0:\\
\;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\
\mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{+304}:\\
\;\;\;\;c0 \cdot \frac{1}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\end{array}
\end{array}
if (*.f64 V l) < -1e251Initial program 38.4%
*-un-lft-identity38.4%
times-frac55.0%
Applied egg-rr55.0%
frac-times38.4%
*-un-lft-identity38.4%
clear-num38.4%
Applied egg-rr38.4%
clear-num38.4%
*-un-lft-identity38.4%
*-commutative38.4%
times-frac55.1%
inv-pow55.1%
metadata-eval55.1%
pow-prod-up13.5%
add-sqr-sqrt13.5%
swap-sqr13.5%
sqrt-unprod26.0%
add-sqr-sqrt26.0%
associate-*r*25.8%
*-commutative25.8%
metadata-eval25.8%
pow-flip25.8%
pow1/225.8%
associate-/r/26.0%
associate-*l/26.0%
*-un-lft-identity26.0%
Applied egg-rr26.0%
if -1e251 < (*.f64 V l) < -1.00000000000000007e-285Initial program 89.5%
frac-2neg89.5%
sqrt-div99.3%
*-commutative99.3%
distribute-rgt-neg-in99.3%
Applied egg-rr99.3%
if -1.00000000000000007e-285 < (*.f64 V l) < -0.0Initial program 39.8%
*-un-lft-identity39.8%
times-frac63.6%
Applied egg-rr63.6%
frac-times39.8%
*-un-lft-identity39.8%
clear-num39.8%
Applied egg-rr39.8%
sqrt-div39.8%
metadata-eval39.8%
un-div-inv39.8%
associate-/l*63.8%
Applied egg-rr63.8%
if -0.0 < (*.f64 V l) < 4.9999999999999997e304Initial program 77.9%
sqrt-div98.2%
clear-num98.2%
Applied egg-rr98.2%
if 4.9999999999999997e304 < (*.f64 V l) Initial program 46.3%
*-commutative46.3%
associate-/l/76.0%
Simplified76.0%
Final simplification85.4%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(if (<= (* V l) -1e+138)
(/ (sqrt (/ A V)) (/ (sqrt l) c0))
(if (<= (* V l) -1e-158)
(/ c0 (sqrt (/ (* V l) A)))
(if (<= (* V l) 0.0)
(/ c0 (sqrt (* V (/ l A))))
(if (<= (* V l) 5e+304)
(* c0 (/ 1.0 (/ (sqrt (* V l)) (sqrt A))))
(* c0 (sqrt (/ (/ A V) l))))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -1e+138) {
tmp = sqrt((A / V)) / (sqrt(l) / c0);
} else if ((V * l) <= -1e-158) {
tmp = c0 / sqrt(((V * l) / A));
} else if ((V * l) <= 0.0) {
tmp = c0 / sqrt((V * (l / A)));
} else if ((V * l) <= 5e+304) {
tmp = c0 * (1.0 / (sqrt((V * l)) / sqrt(A)));
} else {
tmp = c0 * sqrt(((A / V) / l));
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: tmp
if ((v * l) <= (-1d+138)) then
tmp = sqrt((a / v)) / (sqrt(l) / c0)
else if ((v * l) <= (-1d-158)) then
tmp = c0 / sqrt(((v * l) / a))
else if ((v * l) <= 0.0d0) then
tmp = c0 / sqrt((v * (l / a)))
else if ((v * l) <= 5d+304) then
tmp = c0 * (1.0d0 / (sqrt((v * l)) / sqrt(a)))
else
tmp = c0 * sqrt(((a / v) / l))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -1e+138) {
tmp = Math.sqrt((A / V)) / (Math.sqrt(l) / c0);
} else if ((V * l) <= -1e-158) {
tmp = c0 / Math.sqrt(((V * l) / A));
} else if ((V * l) <= 0.0) {
tmp = c0 / Math.sqrt((V * (l / A)));
} else if ((V * l) <= 5e+304) {
tmp = c0 * (1.0 / (Math.sqrt((V * l)) / Math.sqrt(A)));
} else {
tmp = c0 * Math.sqrt(((A / V) / l));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if (V * l) <= -1e+138: tmp = math.sqrt((A / V)) / (math.sqrt(l) / c0) elif (V * l) <= -1e-158: tmp = c0 / math.sqrt(((V * l) / A)) elif (V * l) <= 0.0: tmp = c0 / math.sqrt((V * (l / A))) elif (V * l) <= 5e+304: tmp = c0 * (1.0 / (math.sqrt((V * l)) / math.sqrt(A))) else: tmp = c0 * math.sqrt(((A / V) / l)) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (Float64(V * l) <= -1e+138) tmp = Float64(sqrt(Float64(A / V)) / Float64(sqrt(l) / c0)); elseif (Float64(V * l) <= -1e-158) tmp = Float64(c0 / sqrt(Float64(Float64(V * l) / A))); elseif (Float64(V * l) <= 0.0) tmp = Float64(c0 / sqrt(Float64(V * Float64(l / A)))); elseif (Float64(V * l) <= 5e+304) tmp = Float64(c0 * Float64(1.0 / Float64(sqrt(Float64(V * l)) / sqrt(A)))); else tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
tmp = 0.0;
if ((V * l) <= -1e+138)
tmp = sqrt((A / V)) / (sqrt(l) / c0);
elseif ((V * l) <= -1e-158)
tmp = c0 / sqrt(((V * l) / A));
elseif ((V * l) <= 0.0)
tmp = c0 / sqrt((V * (l / A)));
elseif ((V * l) <= 5e+304)
tmp = c0 * (1.0 / (sqrt((V * l)) / sqrt(A)));
else
tmp = c0 * sqrt(((A / V) / l));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := If[LessEqual[N[(V * l), $MachinePrecision], -1e+138], N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[(N[Sqrt[l], $MachinePrecision] / c0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -1e-158], N[(c0 / N[Sqrt[N[(N[(V * l), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 0.0], N[(c0 / N[Sqrt[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 5e+304], N[(c0 * N[(1.0 / N[(N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -1 \cdot 10^{+138}:\\
\;\;\;\;\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}\\
\mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-158}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}\\
\mathbf{elif}\;V \cdot \ell \leq 0:\\
\;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\
\mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{+304}:\\
\;\;\;\;c0 \cdot \frac{1}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\end{array}
\end{array}
if (*.f64 V l) < -1e138Initial program 51.2%
*-un-lft-identity51.2%
times-frac58.3%
Applied egg-rr58.3%
frac-times51.2%
*-un-lft-identity51.2%
clear-num51.2%
Applied egg-rr51.2%
clear-num51.2%
*-un-lft-identity51.2%
*-commutative51.2%
times-frac60.7%
inv-pow60.7%
metadata-eval60.7%
pow-prod-up24.0%
add-sqr-sqrt23.9%
swap-sqr23.9%
sqrt-unprod33.3%
add-sqr-sqrt33.5%
associate-*r*33.4%
*-commutative33.4%
metadata-eval33.4%
pow-flip33.4%
pow1/233.4%
associate-/r/33.5%
associate-*l/33.5%
*-un-lft-identity33.5%
Applied egg-rr33.5%
if -1e138 < (*.f64 V l) < -1.00000000000000006e-158Initial program 95.8%
*-un-lft-identity95.8%
times-frac69.8%
Applied egg-rr69.8%
frac-times95.8%
*-un-lft-identity95.8%
clear-num95.8%
Applied egg-rr95.8%
sqrt-div95.8%
metadata-eval95.8%
un-div-inv95.9%
associate-/l*68.3%
Applied egg-rr68.3%
*-commutative68.3%
associate-*l/95.9%
associate-*r/77.5%
Simplified77.5%
associate-*r/95.9%
Applied egg-rr95.9%
if -1.00000000000000006e-158 < (*.f64 V l) < -0.0Initial program 52.0%
*-un-lft-identity52.0%
times-frac70.1%
Applied egg-rr70.1%
frac-times52.0%
*-un-lft-identity52.0%
clear-num52.0%
Applied egg-rr52.0%
sqrt-div52.1%
metadata-eval52.1%
un-div-inv52.0%
associate-/l*70.3%
Applied egg-rr70.3%
if -0.0 < (*.f64 V l) < 4.9999999999999997e304Initial program 77.9%
sqrt-div98.2%
clear-num98.2%
Applied egg-rr98.2%
if 4.9999999999999997e304 < (*.f64 V l) Initial program 46.3%
*-commutative46.3%
associate-/l/76.0%
Simplified76.0%
Final simplification80.7%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(if (<= (* V l) -1e+138)
(/ (sqrt (/ A V)) (/ (sqrt l) c0))
(if (<= (* V l) -1e-158)
(/ c0 (sqrt (/ (* V l) A)))
(if (<= (* V l) 0.0)
(/ c0 (sqrt (* V (/ l A))))
(if (<= (* V l) 5e+304)
(/ (* c0 (sqrt A)) (sqrt (* V l)))
(* c0 (sqrt (/ (/ A V) l))))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -1e+138) {
tmp = sqrt((A / V)) / (sqrt(l) / c0);
} else if ((V * l) <= -1e-158) {
tmp = c0 / sqrt(((V * l) / A));
} else if ((V * l) <= 0.0) {
tmp = c0 / sqrt((V * (l / A)));
} else if ((V * l) <= 5e+304) {
tmp = (c0 * sqrt(A)) / sqrt((V * l));
} else {
tmp = c0 * sqrt(((A / V) / l));
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: tmp
if ((v * l) <= (-1d+138)) then
tmp = sqrt((a / v)) / (sqrt(l) / c0)
else if ((v * l) <= (-1d-158)) then
tmp = c0 / sqrt(((v * l) / a))
else if ((v * l) <= 0.0d0) then
tmp = c0 / sqrt((v * (l / a)))
else if ((v * l) <= 5d+304) then
tmp = (c0 * sqrt(a)) / sqrt((v * l))
else
tmp = c0 * sqrt(((a / v) / l))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double tmp;
if ((V * l) <= -1e+138) {
tmp = Math.sqrt((A / V)) / (Math.sqrt(l) / c0);
} else if ((V * l) <= -1e-158) {
tmp = c0 / Math.sqrt(((V * l) / A));
} else if ((V * l) <= 0.0) {
tmp = c0 / Math.sqrt((V * (l / A)));
} else if ((V * l) <= 5e+304) {
tmp = (c0 * Math.sqrt(A)) / Math.sqrt((V * l));
} else {
tmp = c0 * Math.sqrt(((A / V) / l));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): tmp = 0 if (V * l) <= -1e+138: tmp = math.sqrt((A / V)) / (math.sqrt(l) / c0) elif (V * l) <= -1e-158: tmp = c0 / math.sqrt(((V * l) / A)) elif (V * l) <= 0.0: tmp = c0 / math.sqrt((V * (l / A))) elif (V * l) <= 5e+304: tmp = (c0 * math.sqrt(A)) / math.sqrt((V * l)) else: tmp = c0 * math.sqrt(((A / V) / l)) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) tmp = 0.0 if (Float64(V * l) <= -1e+138) tmp = Float64(sqrt(Float64(A / V)) / Float64(sqrt(l) / c0)); elseif (Float64(V * l) <= -1e-158) tmp = Float64(c0 / sqrt(Float64(Float64(V * l) / A))); elseif (Float64(V * l) <= 0.0) tmp = Float64(c0 / sqrt(Float64(V * Float64(l / A)))); elseif (Float64(V * l) <= 5e+304) tmp = Float64(Float64(c0 * sqrt(A)) / sqrt(Float64(V * l))); else tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
tmp = 0.0;
if ((V * l) <= -1e+138)
tmp = sqrt((A / V)) / (sqrt(l) / c0);
elseif ((V * l) <= -1e-158)
tmp = c0 / sqrt(((V * l) / A));
elseif ((V * l) <= 0.0)
tmp = c0 / sqrt((V * (l / A)));
elseif ((V * l) <= 5e+304)
tmp = (c0 * sqrt(A)) / sqrt((V * l));
else
tmp = c0 * sqrt(((A / V) / l));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := If[LessEqual[N[(V * l), $MachinePrecision], -1e+138], N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[(N[Sqrt[l], $MachinePrecision] / c0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -1e-158], N[(c0 / N[Sqrt[N[(N[(V * l), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 0.0], N[(c0 / N[Sqrt[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 5e+304], N[(N[(c0 * N[Sqrt[A], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -1 \cdot 10^{+138}:\\
\;\;\;\;\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}\\
\mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-158}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}\\
\mathbf{elif}\;V \cdot \ell \leq 0:\\
\;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\
\mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{+304}:\\
\;\;\;\;\frac{c0 \cdot \sqrt{A}}{\sqrt{V \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\end{array}
\end{array}
if (*.f64 V l) < -1e138Initial program 51.2%
*-un-lft-identity51.2%
times-frac58.3%
Applied egg-rr58.3%
frac-times51.2%
*-un-lft-identity51.2%
clear-num51.2%
Applied egg-rr51.2%
clear-num51.2%
*-un-lft-identity51.2%
*-commutative51.2%
times-frac60.7%
inv-pow60.7%
metadata-eval60.7%
pow-prod-up24.0%
add-sqr-sqrt23.9%
swap-sqr23.9%
sqrt-unprod33.3%
add-sqr-sqrt33.5%
associate-*r*33.4%
*-commutative33.4%
metadata-eval33.4%
pow-flip33.4%
pow1/233.4%
associate-/r/33.5%
associate-*l/33.5%
*-un-lft-identity33.5%
Applied egg-rr33.5%
if -1e138 < (*.f64 V l) < -1.00000000000000006e-158Initial program 95.8%
*-un-lft-identity95.8%
times-frac69.8%
Applied egg-rr69.8%
frac-times95.8%
*-un-lft-identity95.8%
clear-num95.8%
Applied egg-rr95.8%
sqrt-div95.8%
metadata-eval95.8%
un-div-inv95.9%
associate-/l*68.3%
Applied egg-rr68.3%
*-commutative68.3%
associate-*l/95.9%
associate-*r/77.5%
Simplified77.5%
associate-*r/95.9%
Applied egg-rr95.9%
if -1.00000000000000006e-158 < (*.f64 V l) < -0.0Initial program 52.0%
*-un-lft-identity52.0%
times-frac70.1%
Applied egg-rr70.1%
frac-times52.0%
*-un-lft-identity52.0%
clear-num52.0%
Applied egg-rr52.0%
sqrt-div52.1%
metadata-eval52.1%
un-div-inv52.0%
associate-/l*70.3%
Applied egg-rr70.3%
if -0.0 < (*.f64 V l) < 4.9999999999999997e304Initial program 77.9%
*-commutative77.9%
sqrt-div98.2%
associate-*l/96.7%
Applied egg-rr96.7%
if 4.9999999999999997e304 < (*.f64 V l) Initial program 46.3%
*-commutative46.3%
associate-/l/76.0%
Simplified76.0%
Final simplification80.1%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (/ A (* V l))))
(if (<= t_0 0.0)
(/ (sqrt (/ A V)) (/ (sqrt l) c0))
(if (<= t_0 4e+301)
(* c0 (sqrt t_0))
(sqrt (/ (* c0 (* A (/ c0 l))) V))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = A / (V * l);
double tmp;
if (t_0 <= 0.0) {
tmp = sqrt((A / V)) / (sqrt(l) / c0);
} else if (t_0 <= 4e+301) {
tmp = c0 * sqrt(t_0);
} else {
tmp = sqrt(((c0 * (A * (c0 / l))) / V));
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: tmp
t_0 = a / (v * l)
if (t_0 <= 0.0d0) then
tmp = sqrt((a / v)) / (sqrt(l) / c0)
else if (t_0 <= 4d+301) then
tmp = c0 * sqrt(t_0)
else
tmp = sqrt(((c0 * (a * (c0 / l))) / v))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = A / (V * l);
double tmp;
if (t_0 <= 0.0) {
tmp = Math.sqrt((A / V)) / (Math.sqrt(l) / c0);
} else if (t_0 <= 4e+301) {
tmp = c0 * Math.sqrt(t_0);
} else {
tmp = Math.sqrt(((c0 * (A * (c0 / l))) / V));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = A / (V * l) tmp = 0 if t_0 <= 0.0: tmp = math.sqrt((A / V)) / (math.sqrt(l) / c0) elif t_0 <= 4e+301: tmp = c0 * math.sqrt(t_0) else: tmp = math.sqrt(((c0 * (A * (c0 / l))) / V)) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = Float64(A / Float64(V * l)) tmp = 0.0 if (t_0 <= 0.0) tmp = Float64(sqrt(Float64(A / V)) / Float64(sqrt(l) / c0)); elseif (t_0 <= 4e+301) tmp = Float64(c0 * sqrt(t_0)); else tmp = sqrt(Float64(Float64(c0 * Float64(A * Float64(c0 / l))) / V)); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = A / (V * l);
tmp = 0.0;
if (t_0 <= 0.0)
tmp = sqrt((A / V)) / (sqrt(l) / c0);
elseif (t_0 <= 4e+301)
tmp = c0 * sqrt(t_0);
else
tmp = sqrt(((c0 * (A * (c0 / l))) / V));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[(N[Sqrt[l], $MachinePrecision] / c0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 4e+301], N[(c0 * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(c0 * N[(A * N[(c0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / V), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \frac{A}{V \cdot \ell}\\
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}\\
\mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+301}:\\
\;\;\;\;c0 \cdot \sqrt{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{c0 \cdot \left(A \cdot \frac{c0}{\ell}\right)}{V}}\\
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 0.0Initial program 34.5%
*-un-lft-identity34.5%
times-frac49.0%
Applied egg-rr49.0%
frac-times34.5%
*-un-lft-identity34.5%
clear-num34.5%
Applied egg-rr34.5%
clear-num34.5%
*-un-lft-identity34.5%
*-commutative34.5%
times-frac49.0%
inv-pow49.0%
metadata-eval49.0%
pow-prod-up21.9%
add-sqr-sqrt22.0%
swap-sqr22.0%
sqrt-unprod39.7%
add-sqr-sqrt39.9%
associate-*r*39.9%
*-commutative39.9%
metadata-eval39.9%
pow-flip39.8%
pow1/239.8%
associate-/r/39.8%
associate-*l/39.8%
*-un-lft-identity39.8%
Applied egg-rr39.8%
if 0.0 < (/.f64 A (*.f64 V l)) < 4.00000000000000021e301Initial program 98.2%
if 4.00000000000000021e301 < (/.f64 A (*.f64 V l)) Initial program 35.1%
add-sqr-sqrt20.5%
sqrt-unprod20.7%
*-commutative20.7%
*-commutative20.7%
swap-sqr20.4%
add-sqr-sqrt20.4%
pow220.4%
Applied egg-rr20.4%
associate-*l/26.0%
*-commutative26.0%
times-frac31.3%
Simplified31.3%
unpow231.3%
associate-/l*31.3%
Applied egg-rr31.3%
associate-*r*33.2%
associate-*r/33.3%
*-commutative33.3%
Applied egg-rr33.3%
Taylor expanded in c0 around 0 40.5%
associate-/l*38.8%
Simplified38.8%
Final simplification72.2%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (/ A (* V l))))
(if (<= t_0 0.0)
(* (/ c0 (sqrt l)) (sqrt (/ A V)))
(if (<= t_0 4e+301)
(* c0 (sqrt t_0))
(sqrt (/ (* c0 (* A (/ c0 l))) V))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = A / (V * l);
double tmp;
if (t_0 <= 0.0) {
tmp = (c0 / sqrt(l)) * sqrt((A / V));
} else if (t_0 <= 4e+301) {
tmp = c0 * sqrt(t_0);
} else {
tmp = sqrt(((c0 * (A * (c0 / l))) / V));
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: tmp
t_0 = a / (v * l)
if (t_0 <= 0.0d0) then
tmp = (c0 / sqrt(l)) * sqrt((a / v))
else if (t_0 <= 4d+301) then
tmp = c0 * sqrt(t_0)
else
tmp = sqrt(((c0 * (a * (c0 / l))) / v))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = A / (V * l);
double tmp;
if (t_0 <= 0.0) {
tmp = (c0 / Math.sqrt(l)) * Math.sqrt((A / V));
} else if (t_0 <= 4e+301) {
tmp = c0 * Math.sqrt(t_0);
} else {
tmp = Math.sqrt(((c0 * (A * (c0 / l))) / V));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = A / (V * l) tmp = 0 if t_0 <= 0.0: tmp = (c0 / math.sqrt(l)) * math.sqrt((A / V)) elif t_0 <= 4e+301: tmp = c0 * math.sqrt(t_0) else: tmp = math.sqrt(((c0 * (A * (c0 / l))) / V)) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = Float64(A / Float64(V * l)) tmp = 0.0 if (t_0 <= 0.0) tmp = Float64(Float64(c0 / sqrt(l)) * sqrt(Float64(A / V))); elseif (t_0 <= 4e+301) tmp = Float64(c0 * sqrt(t_0)); else tmp = sqrt(Float64(Float64(c0 * Float64(A * Float64(c0 / l))) / V)); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = A / (V * l);
tmp = 0.0;
if (t_0 <= 0.0)
tmp = (c0 / sqrt(l)) * sqrt((A / V));
elseif (t_0 <= 4e+301)
tmp = c0 * sqrt(t_0);
else
tmp = sqrt(((c0 * (A * (c0 / l))) / V));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], N[(N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 4e+301], N[(c0 * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(c0 * N[(A * N[(c0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / V), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \frac{A}{V \cdot \ell}\\
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;\frac{c0}{\sqrt{\ell}} \cdot \sqrt{\frac{A}{V}}\\
\mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+301}:\\
\;\;\;\;c0 \cdot \sqrt{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{c0 \cdot \left(A \cdot \frac{c0}{\ell}\right)}{V}}\\
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 0.0Initial program 34.5%
associate-/r*49.0%
sqrt-div39.8%
associate-*r/38.3%
Applied egg-rr38.3%
*-commutative38.3%
associate-/l*39.8%
Simplified39.8%
if 0.0 < (/.f64 A (*.f64 V l)) < 4.00000000000000021e301Initial program 98.2%
if 4.00000000000000021e301 < (/.f64 A (*.f64 V l)) Initial program 35.1%
add-sqr-sqrt20.5%
sqrt-unprod20.7%
*-commutative20.7%
*-commutative20.7%
swap-sqr20.4%
add-sqr-sqrt20.4%
pow220.4%
Applied egg-rr20.4%
associate-*l/26.0%
*-commutative26.0%
times-frac31.3%
Simplified31.3%
unpow231.3%
associate-/l*31.3%
Applied egg-rr31.3%
associate-*r*33.2%
associate-*r/33.3%
*-commutative33.3%
Applied egg-rr33.3%
Taylor expanded in c0 around 0 40.5%
associate-/l*38.8%
Simplified38.8%
Final simplification72.2%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (/ A (* V l))))
(if (<= t_0 0.0)
(* c0 (/ (sqrt (/ A V)) (sqrt l)))
(if (<= t_0 4e+301)
(* c0 (sqrt t_0))
(sqrt (/ (* c0 (* A (/ c0 l))) V))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = A / (V * l);
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * (sqrt((A / V)) / sqrt(l));
} else if (t_0 <= 4e+301) {
tmp = c0 * sqrt(t_0);
} else {
tmp = sqrt(((c0 * (A * (c0 / l))) / V));
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: tmp
t_0 = a / (v * l)
if (t_0 <= 0.0d0) then
tmp = c0 * (sqrt((a / v)) / sqrt(l))
else if (t_0 <= 4d+301) then
tmp = c0 * sqrt(t_0)
else
tmp = sqrt(((c0 * (a * (c0 / l))) / v))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = A / (V * l);
double tmp;
if (t_0 <= 0.0) {
tmp = c0 * (Math.sqrt((A / V)) / Math.sqrt(l));
} else if (t_0 <= 4e+301) {
tmp = c0 * Math.sqrt(t_0);
} else {
tmp = Math.sqrt(((c0 * (A * (c0 / l))) / V));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = A / (V * l) tmp = 0 if t_0 <= 0.0: tmp = c0 * (math.sqrt((A / V)) / math.sqrt(l)) elif t_0 <= 4e+301: tmp = c0 * math.sqrt(t_0) else: tmp = math.sqrt(((c0 * (A * (c0 / l))) / V)) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = Float64(A / Float64(V * l)) tmp = 0.0 if (t_0 <= 0.0) tmp = Float64(c0 * Float64(sqrt(Float64(A / V)) / sqrt(l))); elseif (t_0 <= 4e+301) tmp = Float64(c0 * sqrt(t_0)); else tmp = sqrt(Float64(Float64(c0 * Float64(A * Float64(c0 / l))) / V)); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = A / (V * l);
tmp = 0.0;
if (t_0 <= 0.0)
tmp = c0 * (sqrt((A / V)) / sqrt(l));
elseif (t_0 <= 4e+301)
tmp = c0 * sqrt(t_0);
else
tmp = sqrt(((c0 * (A * (c0 / l))) / V));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], N[(c0 * N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 4e+301], N[(c0 * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(c0 * N[(A * N[(c0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / V), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \frac{A}{V \cdot \ell}\\
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\
\mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+301}:\\
\;\;\;\;c0 \cdot \sqrt{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{c0 \cdot \left(A \cdot \frac{c0}{\ell}\right)}{V}}\\
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 0.0Initial program 34.5%
associate-/r*49.0%
sqrt-div39.8%
associate-*r/38.3%
Applied egg-rr38.3%
associate-/l*39.8%
Simplified39.8%
if 0.0 < (/.f64 A (*.f64 V l)) < 4.00000000000000021e301Initial program 98.2%
if 4.00000000000000021e301 < (/.f64 A (*.f64 V l)) Initial program 35.1%
add-sqr-sqrt20.5%
sqrt-unprod20.7%
*-commutative20.7%
*-commutative20.7%
swap-sqr20.4%
add-sqr-sqrt20.4%
pow220.4%
Applied egg-rr20.4%
associate-*l/26.0%
*-commutative26.0%
times-frac31.3%
Simplified31.3%
unpow231.3%
associate-/l*31.3%
Applied egg-rr31.3%
associate-*r*33.2%
associate-*r/33.3%
*-commutative33.3%
Applied egg-rr33.3%
Taylor expanded in c0 around 0 40.5%
associate-/l*38.8%
Simplified38.8%
Final simplification72.2%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (/ A (* V l))))
(if (or (<= t_0 2e-235) (not (<= t_0 1e+308)))
(sqrt (* (* c0 (/ A l)) (/ c0 V)))
(/ c0 (sqrt (/ (* V l) A))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = A / (V * l);
double tmp;
if ((t_0 <= 2e-235) || !(t_0 <= 1e+308)) {
tmp = sqrt(((c0 * (A / l)) * (c0 / V)));
} else {
tmp = c0 / sqrt(((V * l) / A));
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: tmp
t_0 = a / (v * l)
if ((t_0 <= 2d-235) .or. (.not. (t_0 <= 1d+308))) then
tmp = sqrt(((c0 * (a / l)) * (c0 / v)))
else
tmp = c0 / sqrt(((v * l) / a))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = A / (V * l);
double tmp;
if ((t_0 <= 2e-235) || !(t_0 <= 1e+308)) {
tmp = Math.sqrt(((c0 * (A / l)) * (c0 / V)));
} else {
tmp = c0 / Math.sqrt(((V * l) / A));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = A / (V * l) tmp = 0 if (t_0 <= 2e-235) or not (t_0 <= 1e+308): tmp = math.sqrt(((c0 * (A / l)) * (c0 / V))) else: tmp = c0 / math.sqrt(((V * l) / A)) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = Float64(A / Float64(V * l)) tmp = 0.0 if ((t_0 <= 2e-235) || !(t_0 <= 1e+308)) tmp = sqrt(Float64(Float64(c0 * Float64(A / l)) * Float64(c0 / V))); else tmp = Float64(c0 / sqrt(Float64(Float64(V * l) / A))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = A / (V * l);
tmp = 0.0;
if ((t_0 <= 2e-235) || ~((t_0 <= 1e+308)))
tmp = sqrt(((c0 * (A / l)) * (c0 / V)));
else
tmp = c0 / sqrt(((V * l) / A));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, 2e-235], N[Not[LessEqual[t$95$0, 1e+308]], $MachinePrecision]], N[Sqrt[N[(N[(c0 * N[(A / l), $MachinePrecision]), $MachinePrecision] * N[(c0 / V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(c0 / N[Sqrt[N[(N[(V * l), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \frac{A}{V \cdot \ell}\\
\mathbf{if}\;t\_0 \leq 2 \cdot 10^{-235} \lor \neg \left(t\_0 \leq 10^{+308}\right):\\
\;\;\;\;\sqrt{\left(c0 \cdot \frac{A}{\ell}\right) \cdot \frac{c0}{V}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}\\
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 1.9999999999999999e-235 or 1e308 < (/.f64 A (*.f64 V l)) Initial program 38.3%
add-sqr-sqrt29.4%
sqrt-unprod29.5%
*-commutative29.5%
*-commutative29.5%
swap-sqr27.4%
add-sqr-sqrt27.4%
pow227.4%
Applied egg-rr27.4%
associate-*l/32.9%
*-commutative32.9%
times-frac35.2%
Simplified35.2%
unpow235.2%
associate-/l*36.9%
Applied egg-rr36.9%
associate-*r*41.0%
associate-*r/39.9%
*-commutative39.9%
Applied egg-rr39.9%
associate-/l*41.0%
Applied egg-rr41.0%
if 1.9999999999999999e-235 < (/.f64 A (*.f64 V l)) < 1e308Initial program 99.3%
*-un-lft-identity99.3%
times-frac84.5%
Applied egg-rr84.5%
frac-times99.3%
*-un-lft-identity99.3%
clear-num99.2%
Applied egg-rr99.2%
sqrt-div99.2%
metadata-eval99.2%
un-div-inv99.3%
associate-/l*84.2%
Applied egg-rr84.2%
*-commutative84.2%
associate-*l/99.3%
associate-*r/86.5%
Simplified86.5%
associate-*r/99.3%
Applied egg-rr99.3%
Final simplification71.5%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (/ A (* V l))))
(if (<= t_0 2e-235)
(sqrt (/ (* c0 (/ A l)) (/ V c0)))
(if (<= t_0 4e+301)
(/ c0 (sqrt (/ (* V l) A)))
(sqrt (/ (* c0 (* A (/ c0 l))) V))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = A / (V * l);
double tmp;
if (t_0 <= 2e-235) {
tmp = sqrt(((c0 * (A / l)) / (V / c0)));
} else if (t_0 <= 4e+301) {
tmp = c0 / sqrt(((V * l) / A));
} else {
tmp = sqrt(((c0 * (A * (c0 / l))) / V));
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: tmp
t_0 = a / (v * l)
if (t_0 <= 2d-235) then
tmp = sqrt(((c0 * (a / l)) / (v / c0)))
else if (t_0 <= 4d+301) then
tmp = c0 / sqrt(((v * l) / a))
else
tmp = sqrt(((c0 * (a * (c0 / l))) / v))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = A / (V * l);
double tmp;
if (t_0 <= 2e-235) {
tmp = Math.sqrt(((c0 * (A / l)) / (V / c0)));
} else if (t_0 <= 4e+301) {
tmp = c0 / Math.sqrt(((V * l) / A));
} else {
tmp = Math.sqrt(((c0 * (A * (c0 / l))) / V));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = A / (V * l) tmp = 0 if t_0 <= 2e-235: tmp = math.sqrt(((c0 * (A / l)) / (V / c0))) elif t_0 <= 4e+301: tmp = c0 / math.sqrt(((V * l) / A)) else: tmp = math.sqrt(((c0 * (A * (c0 / l))) / V)) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = Float64(A / Float64(V * l)) tmp = 0.0 if (t_0 <= 2e-235) tmp = sqrt(Float64(Float64(c0 * Float64(A / l)) / Float64(V / c0))); elseif (t_0 <= 4e+301) tmp = Float64(c0 / sqrt(Float64(Float64(V * l) / A))); else tmp = sqrt(Float64(Float64(c0 * Float64(A * Float64(c0 / l))) / V)); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = A / (V * l);
tmp = 0.0;
if (t_0 <= 2e-235)
tmp = sqrt(((c0 * (A / l)) / (V / c0)));
elseif (t_0 <= 4e+301)
tmp = c0 / sqrt(((V * l) / A));
else
tmp = sqrt(((c0 * (A * (c0 / l))) / V));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 2e-235], N[Sqrt[N[(N[(c0 * N[(A / l), $MachinePrecision]), $MachinePrecision] / N[(V / c0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$0, 4e+301], N[(c0 / N[Sqrt[N[(N[(V * l), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(c0 * N[(A * N[(c0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / V), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \frac{A}{V \cdot \ell}\\
\mathbf{if}\;t\_0 \leq 2 \cdot 10^{-235}:\\
\;\;\;\;\sqrt{\frac{c0 \cdot \frac{A}{\ell}}{\frac{V}{c0}}}\\
\mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+301}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{c0 \cdot \left(A \cdot \frac{c0}{\ell}\right)}{V}}\\
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 1.9999999999999999e-235Initial program 41.7%
add-sqr-sqrt35.9%
sqrt-unprod36.0%
*-commutative36.0%
*-commutative36.0%
swap-sqr32.5%
add-sqr-sqrt32.5%
pow232.5%
Applied egg-rr32.5%
associate-*l/37.8%
*-commutative37.8%
times-frac37.9%
Simplified37.9%
unpow237.9%
associate-/l*40.7%
Applied egg-rr40.7%
associate-*r*46.6%
clear-num46.5%
un-div-inv46.6%
*-commutative46.6%
Applied egg-rr46.6%
if 1.9999999999999999e-235 < (/.f64 A (*.f64 V l)) < 4.00000000000000021e301Initial program 99.3%
*-un-lft-identity99.3%
times-frac84.4%
Applied egg-rr84.4%
frac-times99.3%
*-un-lft-identity99.3%
clear-num99.2%
Applied egg-rr99.2%
sqrt-div99.2%
metadata-eval99.2%
un-div-inv99.3%
associate-/l*84.1%
Applied egg-rr84.1%
*-commutative84.1%
associate-*l/99.3%
associate-*r/86.9%
Simplified86.9%
associate-*r/99.3%
Applied egg-rr99.3%
if 4.00000000000000021e301 < (/.f64 A (*.f64 V l)) Initial program 35.1%
add-sqr-sqrt20.5%
sqrt-unprod20.7%
*-commutative20.7%
*-commutative20.7%
swap-sqr20.4%
add-sqr-sqrt20.4%
pow220.4%
Applied egg-rr20.4%
associate-*l/26.0%
*-commutative26.0%
times-frac31.3%
Simplified31.3%
unpow231.3%
associate-/l*31.3%
Applied egg-rr31.3%
associate-*r*33.2%
associate-*r/33.3%
*-commutative33.3%
Applied egg-rr33.3%
Taylor expanded in c0 around 0 40.5%
associate-/l*38.8%
Simplified38.8%
Final simplification72.3%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (/ A (* V l))) (t_1 (* c0 (/ A l))))
(if (<= t_0 2e-235)
(sqrt (/ t_1 (/ V c0)))
(if (<= t_0 1e+308)
(/ c0 (sqrt (/ (* V l) A)))
(sqrt (* t_1 (/ c0 V)))))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = A / (V * l);
double t_1 = c0 * (A / l);
double tmp;
if (t_0 <= 2e-235) {
tmp = sqrt((t_1 / (V / c0)));
} else if (t_0 <= 1e+308) {
tmp = c0 / sqrt(((V * l) / A));
} else {
tmp = sqrt((t_1 * (c0 / V)));
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = a / (v * l)
t_1 = c0 * (a / l)
if (t_0 <= 2d-235) then
tmp = sqrt((t_1 / (v / c0)))
else if (t_0 <= 1d+308) then
tmp = c0 / sqrt(((v * l) / a))
else
tmp = sqrt((t_1 * (c0 / v)))
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = A / (V * l);
double t_1 = c0 * (A / l);
double tmp;
if (t_0 <= 2e-235) {
tmp = Math.sqrt((t_1 / (V / c0)));
} else if (t_0 <= 1e+308) {
tmp = c0 / Math.sqrt(((V * l) / A));
} else {
tmp = Math.sqrt((t_1 * (c0 / V)));
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = A / (V * l) t_1 = c0 * (A / l) tmp = 0 if t_0 <= 2e-235: tmp = math.sqrt((t_1 / (V / c0))) elif t_0 <= 1e+308: tmp = c0 / math.sqrt(((V * l) / A)) else: tmp = math.sqrt((t_1 * (c0 / V))) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = Float64(A / Float64(V * l)) t_1 = Float64(c0 * Float64(A / l)) tmp = 0.0 if (t_0 <= 2e-235) tmp = sqrt(Float64(t_1 / Float64(V / c0))); elseif (t_0 <= 1e+308) tmp = Float64(c0 / sqrt(Float64(Float64(V * l) / A))); else tmp = sqrt(Float64(t_1 * Float64(c0 / V))); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = A / (V * l);
t_1 = c0 * (A / l);
tmp = 0.0;
if (t_0 <= 2e-235)
tmp = sqrt((t_1 / (V / c0)));
elseif (t_0 <= 1e+308)
tmp = c0 / sqrt(((V * l) / A));
else
tmp = sqrt((t_1 * (c0 / V)));
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(c0 * N[(A / l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 2e-235], N[Sqrt[N[(t$95$1 / N[(V / c0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$0, 1e+308], N[(c0 / N[Sqrt[N[(N[(V * l), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(t$95$1 * N[(c0 / V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \frac{A}{V \cdot \ell}\\
t_1 := c0 \cdot \frac{A}{\ell}\\
\mathbf{if}\;t\_0 \leq 2 \cdot 10^{-235}:\\
\;\;\;\;\sqrt{\frac{t\_1}{\frac{V}{c0}}}\\
\mathbf{elif}\;t\_0 \leq 10^{+308}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t\_1 \cdot \frac{c0}{V}}\\
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 1.9999999999999999e-235Initial program 41.7%
add-sqr-sqrt35.9%
sqrt-unprod36.0%
*-commutative36.0%
*-commutative36.0%
swap-sqr32.5%
add-sqr-sqrt32.5%
pow232.5%
Applied egg-rr32.5%
associate-*l/37.8%
*-commutative37.8%
times-frac37.9%
Simplified37.9%
unpow237.9%
associate-/l*40.7%
Applied egg-rr40.7%
associate-*r*46.6%
clear-num46.5%
un-div-inv46.6%
*-commutative46.6%
Applied egg-rr46.6%
if 1.9999999999999999e-235 < (/.f64 A (*.f64 V l)) < 1e308Initial program 99.3%
*-un-lft-identity99.3%
times-frac84.5%
Applied egg-rr84.5%
frac-times99.3%
*-un-lft-identity99.3%
clear-num99.2%
Applied egg-rr99.2%
sqrt-div99.2%
metadata-eval99.2%
un-div-inv99.3%
associate-/l*84.2%
Applied egg-rr84.2%
*-commutative84.2%
associate-*l/99.3%
associate-*r/86.5%
Simplified86.5%
associate-*r/99.3%
Applied egg-rr99.3%
if 1e308 < (/.f64 A (*.f64 V l)) Initial program 33.9%
add-sqr-sqrt20.9%
sqrt-unprod21.1%
*-commutative21.1%
*-commutative21.1%
swap-sqr20.7%
add-sqr-sqrt20.7%
pow220.7%
Applied egg-rr20.7%
associate-*l/26.4%
*-commutative26.4%
times-frac31.8%
Simplified31.8%
unpow231.8%
associate-/l*31.8%
Applied egg-rr31.8%
associate-*r*33.8%
associate-*r/33.9%
*-commutative33.9%
Applied egg-rr33.9%
associate-/l*33.8%
Applied egg-rr33.8%
Final simplification71.5%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (/ A (* V l))))
(if (or (<= t_0 1e-204) (not (<= t_0 1e+308)))
(* c0 (sqrt (/ (/ A l) V)))
(* c0 (sqrt t_0)))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = A / (V * l);
double tmp;
if ((t_0 <= 1e-204) || !(t_0 <= 1e+308)) {
tmp = c0 * sqrt(((A / l) / V));
} else {
tmp = c0 * sqrt(t_0);
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: tmp
t_0 = a / (v * l)
if ((t_0 <= 1d-204) .or. (.not. (t_0 <= 1d+308))) then
tmp = c0 * sqrt(((a / l) / v))
else
tmp = c0 * sqrt(t_0)
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = A / (V * l);
double tmp;
if ((t_0 <= 1e-204) || !(t_0 <= 1e+308)) {
tmp = c0 * Math.sqrt(((A / l) / V));
} else {
tmp = c0 * Math.sqrt(t_0);
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = A / (V * l) tmp = 0 if (t_0 <= 1e-204) or not (t_0 <= 1e+308): tmp = c0 * math.sqrt(((A / l) / V)) else: tmp = c0 * math.sqrt(t_0) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = Float64(A / Float64(V * l)) tmp = 0.0 if ((t_0 <= 1e-204) || !(t_0 <= 1e+308)) tmp = Float64(c0 * sqrt(Float64(Float64(A / l) / V))); else tmp = Float64(c0 * sqrt(t_0)); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = A / (V * l);
tmp = 0.0;
if ((t_0 <= 1e-204) || ~((t_0 <= 1e+308)))
tmp = c0 * sqrt(((A / l) / V));
else
tmp = c0 * sqrt(t_0);
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, 1e-204], N[Not[LessEqual[t$95$0, 1e+308]], $MachinePrecision]], N[(c0 * N[Sqrt[N[(N[(A / l), $MachinePrecision] / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0 * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \frac{A}{V \cdot \ell}\\
\mathbf{if}\;t\_0 \leq 10^{-204} \lor \neg \left(t\_0 \leq 10^{+308}\right):\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{t\_0}\\
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 1e-204 or 1e308 < (/.f64 A (*.f64 V l)) Initial program 40.7%
Taylor expanded in c0 around 0 40.7%
*-commutative40.7%
associate-/r*52.6%
Simplified52.6%
if 1e-204 < (/.f64 A (*.f64 V l)) < 1e308Initial program 99.3%
Final simplification76.1%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
:precision binary64
(let* ((t_0 (/ A (* V l))))
(if (or (<= t_0 5e-323) (not (<= t_0 5e+294)))
(* c0 (sqrt (/ (/ A V) l)))
(* c0 (sqrt t_0)))))assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
double t_0 = A / (V * l);
double tmp;
if ((t_0 <= 5e-323) || !(t_0 <= 5e+294)) {
tmp = c0 * sqrt(((A / V) / l));
} else {
tmp = c0 * sqrt(t_0);
}
return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: tmp
t_0 = a / (v * l)
if ((t_0 <= 5d-323) .or. (.not. (t_0 <= 5d+294))) then
tmp = c0 * sqrt(((a / v) / l))
else
tmp = c0 * sqrt(t_0)
end if
code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
double t_0 = A / (V * l);
double tmp;
if ((t_0 <= 5e-323) || !(t_0 <= 5e+294)) {
tmp = c0 * Math.sqrt(((A / V) / l));
} else {
tmp = c0 * Math.sqrt(t_0);
}
return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): t_0 = A / (V * l) tmp = 0 if (t_0 <= 5e-323) or not (t_0 <= 5e+294): tmp = c0 * math.sqrt(((A / V) / l)) else: tmp = c0 * math.sqrt(t_0) return tmp
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) t_0 = Float64(A / Float64(V * l)) tmp = 0.0 if ((t_0 <= 5e-323) || !(t_0 <= 5e+294)) tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l))); else tmp = Float64(c0 * sqrt(t_0)); end return tmp end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
t_0 = A / (V * l);
tmp = 0.0;
if ((t_0 <= 5e-323) || ~((t_0 <= 5e+294)))
tmp = c0 * sqrt(((A / V) / l));
else
tmp = c0 * sqrt(t_0);
end
tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, 5e-323], N[Not[LessEqual[t$95$0, 5e+294]], $MachinePrecision]], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0 * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \frac{A}{V \cdot \ell}\\
\mathbf{if}\;t\_0 \leq 5 \cdot 10^{-323} \lor \neg \left(t\_0 \leq 5 \cdot 10^{+294}\right):\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{t\_0}\\
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 4.94066e-323 or 4.9999999999999999e294 < (/.f64 A (*.f64 V l)) Initial program 35.7%
*-commutative35.7%
associate-/l/49.4%
Simplified49.4%
if 4.94066e-323 < (/.f64 A (*.f64 V l)) < 4.9999999999999999e294Initial program 99.2%
Final simplification76.5%
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. (FPCore (c0 A V l) :precision binary64 (* c0 (sqrt (/ A (* V l)))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
return c0 * sqrt((A / (V * l)));
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
code = c0 * sqrt((a / (v * l)))
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
return c0 * Math.sqrt((A / (V * l)));
}
[c0, A, V, l] = sort([c0, A, V, l]) def code(c0, A, V, l): return c0 * math.sqrt((A / (V * l)))
c0, A, V, l = sort([c0, A, V, l]) function code(c0, A, V, l) return Float64(c0 * sqrt(Float64(A / Float64(V * l)))) end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp = code(c0, A, V, l)
tmp = c0 * sqrt((A / (V * l)));
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function. code[c0_, A_, V_, l_] := N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\end{array}
Initial program 70.2%
herbie shell --seed 2024181
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))