
(FPCore (c0 A V l) :precision binary64 (* c0 (sqrt (/ A (* V l)))))
double code(double c0, double A, double V, double l) {
return c0 * sqrt((A / (V * l)));
}
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
code = c0 * sqrt((a / (v * l)))
end function
public static double code(double c0, double A, double V, double l) {
return c0 * Math.sqrt((A / (V * l)));
}
def code(c0, A, V, l): return c0 * math.sqrt((A / (V * l)))
function code(c0, A, V, l) return Float64(c0 * sqrt(Float64(A / Float64(V * l)))) end
function tmp = code(c0, A, V, l) tmp = c0 * sqrt((A / (V * l))); end
code[c0_, A_, V_, l_] := N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (c0 A V l) :precision binary64 (* c0 (sqrt (/ A (* V l)))))
double code(double c0, double A, double V, double l) {
return c0 * sqrt((A / (V * l)));
}
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
code = c0 * sqrt((a / (v * l)))
end function
public static double code(double c0, double A, double V, double l) {
return c0 * Math.sqrt((A / (V * l)));
}
def code(c0, A, V, l): return c0 * math.sqrt((A / (V * l)))
function code(c0, A, V, l) return Float64(c0 * sqrt(Float64(A / Float64(V * l)))) end
function tmp = code(c0, A, V, l) tmp = c0 * sqrt((A / (V * l))); end
code[c0_, A_, V_, l_] := N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\end{array}
c0\_m = (fabs.f64 c0)
c0\_s = (copysign.f64 #s(literal 1 binary64) c0)
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0_s c0_m A V l)
:precision binary64
(let* ((t_0 (* c0_m (/ (sqrt (/ A (- l))) (sqrt (- V))))))
(*
c0_s
(if (<= (* V l) (- INFINITY))
t_0
(if (<= (* V l) -1e-297)
(* c0_m (/ (sqrt (- A)) (sqrt (* V (- l)))))
(if (<= (* V l) 0.0)
t_0
(if (<= (* V l) 4e+296)
(* c0_m (/ 1.0 (/ (sqrt (* V l)) (sqrt A))))
(* (sqrt (/ (* A (/ c0_m l)) V)) (sqrt c0_m)))))))))c0\_m = fabs(c0);
c0\_s = copysign(1.0, c0);
assert(c0_m < A && A < V && V < l);
double code(double c0_s, double c0_m, double A, double V, double l) {
double t_0 = c0_m * (sqrt((A / -l)) / sqrt(-V));
double tmp;
if ((V * l) <= -((double) INFINITY)) {
tmp = t_0;
} else if ((V * l) <= -1e-297) {
tmp = c0_m * (sqrt(-A) / sqrt((V * -l)));
} else if ((V * l) <= 0.0) {
tmp = t_0;
} else if ((V * l) <= 4e+296) {
tmp = c0_m * (1.0 / (sqrt((V * l)) / sqrt(A)));
} else {
tmp = sqrt(((A * (c0_m / l)) / V)) * sqrt(c0_m);
}
return c0_s * tmp;
}
c0\_m = Math.abs(c0);
c0\_s = Math.copySign(1.0, c0);
assert c0_m < A && A < V && V < l;
public static double code(double c0_s, double c0_m, double A, double V, double l) {
double t_0 = c0_m * (Math.sqrt((A / -l)) / Math.sqrt(-V));
double tmp;
if ((V * l) <= -Double.POSITIVE_INFINITY) {
tmp = t_0;
} else if ((V * l) <= -1e-297) {
tmp = c0_m * (Math.sqrt(-A) / Math.sqrt((V * -l)));
} else if ((V * l) <= 0.0) {
tmp = t_0;
} else if ((V * l) <= 4e+296) {
tmp = c0_m * (1.0 / (Math.sqrt((V * l)) / Math.sqrt(A)));
} else {
tmp = Math.sqrt(((A * (c0_m / l)) / V)) * Math.sqrt(c0_m);
}
return c0_s * tmp;
}
c0\_m = math.fabs(c0) c0\_s = math.copysign(1.0, c0) [c0_m, A, V, l] = sort([c0_m, A, V, l]) def code(c0_s, c0_m, A, V, l): t_0 = c0_m * (math.sqrt((A / -l)) / math.sqrt(-V)) tmp = 0 if (V * l) <= -math.inf: tmp = t_0 elif (V * l) <= -1e-297: tmp = c0_m * (math.sqrt(-A) / math.sqrt((V * -l))) elif (V * l) <= 0.0: tmp = t_0 elif (V * l) <= 4e+296: tmp = c0_m * (1.0 / (math.sqrt((V * l)) / math.sqrt(A))) else: tmp = math.sqrt(((A * (c0_m / l)) / V)) * math.sqrt(c0_m) return c0_s * tmp
c0\_m = abs(c0) c0\_s = copysign(1.0, c0) c0_m, A, V, l = sort([c0_m, A, V, l]) function code(c0_s, c0_m, A, V, l) t_0 = Float64(c0_m * 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-297) tmp = Float64(c0_m * Float64(sqrt(Float64(-A)) / sqrt(Float64(V * Float64(-l))))); elseif (Float64(V * l) <= 0.0) tmp = t_0; elseif (Float64(V * l) <= 4e+296) tmp = Float64(c0_m * Float64(1.0 / Float64(sqrt(Float64(V * l)) / sqrt(A)))); else tmp = Float64(sqrt(Float64(Float64(A * Float64(c0_m / l)) / V)) * sqrt(c0_m)); end return Float64(c0_s * tmp) end
c0\_m = abs(c0);
c0\_s = sign(c0) * abs(1.0);
c0_m, A, V, l = num2cell(sort([c0_m, A, V, l])){:}
function tmp_2 = code(c0_s, c0_m, A, V, l)
t_0 = c0_m * (sqrt((A / -l)) / sqrt(-V));
tmp = 0.0;
if ((V * l) <= -Inf)
tmp = t_0;
elseif ((V * l) <= -1e-297)
tmp = c0_m * (sqrt(-A) / sqrt((V * -l)));
elseif ((V * l) <= 0.0)
tmp = t_0;
elseif ((V * l) <= 4e+296)
tmp = c0_m * (1.0 / (sqrt((V * l)) / sqrt(A)));
else
tmp = sqrt(((A * (c0_m / l)) / V)) * sqrt(c0_m);
end
tmp_2 = c0_s * tmp;
end
c0\_m = N[Abs[c0], $MachinePrecision]
c0\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c0]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
code[c0$95$s_, c0$95$m_, A_, V_, l_] := Block[{t$95$0 = N[(c0$95$m * N[(N[Sqrt[N[(A / (-l)), $MachinePrecision]], $MachinePrecision] / N[Sqrt[(-V)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c0$95$s * If[LessEqual[N[(V * l), $MachinePrecision], (-Infinity)], t$95$0, If[LessEqual[N[(V * l), $MachinePrecision], -1e-297], N[(c0$95$m * 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], 4e+296], N[(c0$95$m * N[(1.0 / N[(N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(N[(A * N[(c0$95$m / l), $MachinePrecision]), $MachinePrecision] / V), $MachinePrecision]], $MachinePrecision] * N[Sqrt[c0$95$m], $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]
\begin{array}{l}
c0\_m = \left|c0\right|
\\
c0\_s = \mathsf{copysign}\left(1, c0\right)
\\
[c0_m, A, V, l] = \mathsf{sort}([c0_m, A, V, l])\\
\\
\begin{array}{l}
t_0 := c0\_m \cdot \frac{\sqrt{\frac{A}{-\ell}}}{\sqrt{-V}}\\
c0\_s \cdot \begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -\infty:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-297}:\\
\;\;\;\;c0\_m \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 4 \cdot 10^{+296}:\\
\;\;\;\;c0\_m \cdot \frac{1}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{A \cdot \frac{c0\_m}{\ell}}{V}} \cdot \sqrt{c0\_m}\\
\end{array}
\end{array}
\end{array}
if (*.f64 V l) < -inf.0 or -1.00000000000000004e-297 < (*.f64 V l) < -0.0Initial program 30.0%
associate-/r*51.2%
div-inv51.2%
Applied egg-rr51.2%
associate-*l/51.2%
div-inv51.2%
Applied egg-rr51.2%
frac-2neg51.2%
sqrt-div55.2%
distribute-neg-frac255.2%
Applied egg-rr55.2%
if -inf.0 < (*.f64 V l) < -1.00000000000000004e-297Initial program 87.8%
frac-2neg87.8%
sqrt-div99.5%
distribute-rgt-neg-in99.5%
Applied egg-rr99.5%
if -0.0 < (*.f64 V l) < 3.99999999999999993e296Initial program 83.8%
sqrt-div99.4%
clear-num99.3%
Applied egg-rr99.3%
if 3.99999999999999993e296 < (*.f64 V l) Initial program 47.9%
*-commutative47.9%
sqrt-div47.9%
associate-*l/47.9%
Applied egg-rr47.9%
*-commutative47.9%
associate-/l*47.9%
*-rgt-identity47.9%
sqrt-div47.9%
frac-times81.4%
*-commutative81.4%
add-sqr-sqrt40.2%
associate-*r*40.2%
frac-times34.6%
sqrt-div34.6%
*-rgt-identity34.6%
sqrt-div34.6%
Applied egg-rr34.6%
Taylor expanded in A around 0 34.4%
times-frac45.9%
Simplified45.9%
associate-*l/45.9%
Applied egg-rr45.9%
c0\_m = (fabs.f64 c0)
c0\_s = (copysign.f64 #s(literal 1 binary64) c0)
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0_s c0_m A V l)
:precision binary64
(let* ((t_0 (* c0_m (sqrt (/ A (* V l))))))
(*
c0_s
(if (<= t_0 1e-261)
(/ c0_m (sqrt (/ l (/ A V))))
(if (<= t_0 1e+269) t_0 (/ c0_m (sqrt (* V (/ l A)))))))))c0\_m = fabs(c0);
c0\_s = copysign(1.0, c0);
assert(c0_m < A && A < V && V < l);
double code(double c0_s, double c0_m, double A, double V, double l) {
double t_0 = c0_m * sqrt((A / (V * l)));
double tmp;
if (t_0 <= 1e-261) {
tmp = c0_m / sqrt((l / (A / V)));
} else if (t_0 <= 1e+269) {
tmp = t_0;
} else {
tmp = c0_m / sqrt((V * (l / A)));
}
return c0_s * tmp;
}
c0\_m = abs(c0)
c0\_s = copysign(1.0d0, c0)
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0_s, c0_m, a, v, l)
real(8), intent (in) :: c0_s
real(8), intent (in) :: c0_m
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_m * sqrt((a / (v * l)))
if (t_0 <= 1d-261) then
tmp = c0_m / sqrt((l / (a / v)))
else if (t_0 <= 1d+269) then
tmp = t_0
else
tmp = c0_m / sqrt((v * (l / a)))
end if
code = c0_s * tmp
end function
c0\_m = Math.abs(c0);
c0\_s = Math.copySign(1.0, c0);
assert c0_m < A && A < V && V < l;
public static double code(double c0_s, double c0_m, double A, double V, double l) {
double t_0 = c0_m * Math.sqrt((A / (V * l)));
double tmp;
if (t_0 <= 1e-261) {
tmp = c0_m / Math.sqrt((l / (A / V)));
} else if (t_0 <= 1e+269) {
tmp = t_0;
} else {
tmp = c0_m / Math.sqrt((V * (l / A)));
}
return c0_s * tmp;
}
c0\_m = math.fabs(c0) c0\_s = math.copysign(1.0, c0) [c0_m, A, V, l] = sort([c0_m, A, V, l]) def code(c0_s, c0_m, A, V, l): t_0 = c0_m * math.sqrt((A / (V * l))) tmp = 0 if t_0 <= 1e-261: tmp = c0_m / math.sqrt((l / (A / V))) elif t_0 <= 1e+269: tmp = t_0 else: tmp = c0_m / math.sqrt((V * (l / A))) return c0_s * tmp
c0\_m = abs(c0) c0\_s = copysign(1.0, c0) c0_m, A, V, l = sort([c0_m, A, V, l]) function code(c0_s, c0_m, A, V, l) t_0 = Float64(c0_m * sqrt(Float64(A / Float64(V * l)))) tmp = 0.0 if (t_0 <= 1e-261) tmp = Float64(c0_m / sqrt(Float64(l / Float64(A / V)))); elseif (t_0 <= 1e+269) tmp = t_0; else tmp = Float64(c0_m / sqrt(Float64(V * Float64(l / A)))); end return Float64(c0_s * tmp) end
c0\_m = abs(c0);
c0\_s = sign(c0) * abs(1.0);
c0_m, A, V, l = num2cell(sort([c0_m, A, V, l])){:}
function tmp_2 = code(c0_s, c0_m, A, V, l)
t_0 = c0_m * sqrt((A / (V * l)));
tmp = 0.0;
if (t_0 <= 1e-261)
tmp = c0_m / sqrt((l / (A / V)));
elseif (t_0 <= 1e+269)
tmp = t_0;
else
tmp = c0_m / sqrt((V * (l / A)));
end
tmp_2 = c0_s * tmp;
end
c0\_m = N[Abs[c0], $MachinePrecision]
c0\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c0]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
code[c0$95$s_, c0$95$m_, A_, V_, l_] := Block[{t$95$0 = N[(c0$95$m * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, N[(c0$95$s * If[LessEqual[t$95$0, 1e-261], N[(c0$95$m / N[Sqrt[N[(l / N[(A / V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+269], t$95$0, N[(c0$95$m / N[Sqrt[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
c0\_m = \left|c0\right|
\\
c0\_s = \mathsf{copysign}\left(1, c0\right)
\\
[c0_m, A, V, l] = \mathsf{sort}([c0_m, A, V, l])\\
\\
\begin{array}{l}
t_0 := c0\_m \cdot \sqrt{\frac{A}{V \cdot \ell}}\\
c0\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq 10^{-261}:\\
\;\;\;\;\frac{c0\_m}{\sqrt{\frac{\ell}{\frac{A}{V}}}}\\
\mathbf{elif}\;t\_0 \leq 10^{+269}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{c0\_m}{\sqrt{V \cdot \frac{\ell}{A}}}\\
\end{array}
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 9.99999999999999984e-262Initial program 68.5%
*-commutative68.5%
sqrt-div38.1%
associate-*l/38.1%
Applied egg-rr38.1%
*-commutative38.1%
associate-/l*38.1%
*-rgt-identity38.1%
sqrt-div68.5%
frac-times73.7%
*-commutative73.7%
add-sqr-sqrt12.1%
associate-*r*12.1%
frac-times10.3%
sqrt-div9.5%
*-rgt-identity9.5%
sqrt-div10.3%
Applied egg-rr10.3%
associate-*l*10.3%
associate-/r*12.1%
sqrt-undiv12.9%
clear-num12.9%
add-sqr-sqrt45.4%
associate-*l/45.4%
*-un-lft-identity45.4%
sqrt-undiv73.5%
Applied egg-rr73.5%
if 9.99999999999999984e-262 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1e269Initial program 97.5%
if 1e269 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 40.9%
associate-/r*47.1%
div-inv47.2%
Applied egg-rr47.2%
frac-times40.9%
sqrt-div39.0%
*-rgt-identity39.0%
associate-/l*39.1%
*-commutative39.1%
clear-num39.1%
associate-/r*39.1%
Applied egg-rr41.0%
associate-/r/41.0%
associate-*l/41.0%
*-lft-identity41.0%
associate-*r/47.2%
Simplified47.2%
c0\_m = (fabs.f64 c0)
c0\_s = (copysign.f64 #s(literal 1 binary64) c0)
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0_s c0_m A V l)
:precision binary64
(let* ((t_0 (* c0_m (sqrt (/ A (* V l))))))
(*
c0_s
(if (<= t_0 0.0)
(* c0_m (sqrt (/ (/ A V) l)))
(if (<= t_0 1e+269) t_0 (/ c0_m (sqrt (* V (/ l A)))))))))c0\_m = fabs(c0);
c0\_s = copysign(1.0, c0);
assert(c0_m < A && A < V && V < l);
double code(double c0_s, double c0_m, double A, double V, double l) {
double t_0 = c0_m * sqrt((A / (V * l)));
double tmp;
if (t_0 <= 0.0) {
tmp = c0_m * sqrt(((A / V) / l));
} else if (t_0 <= 1e+269) {
tmp = t_0;
} else {
tmp = c0_m / sqrt((V * (l / A)));
}
return c0_s * tmp;
}
c0\_m = abs(c0)
c0\_s = copysign(1.0d0, c0)
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0_s, c0_m, a, v, l)
real(8), intent (in) :: c0_s
real(8), intent (in) :: c0_m
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_m * sqrt((a / (v * l)))
if (t_0 <= 0.0d0) then
tmp = c0_m * sqrt(((a / v) / l))
else if (t_0 <= 1d+269) then
tmp = t_0
else
tmp = c0_m / sqrt((v * (l / a)))
end if
code = c0_s * tmp
end function
c0\_m = Math.abs(c0);
c0\_s = Math.copySign(1.0, c0);
assert c0_m < A && A < V && V < l;
public static double code(double c0_s, double c0_m, double A, double V, double l) {
double t_0 = c0_m * Math.sqrt((A / (V * l)));
double tmp;
if (t_0 <= 0.0) {
tmp = c0_m * Math.sqrt(((A / V) / l));
} else if (t_0 <= 1e+269) {
tmp = t_0;
} else {
tmp = c0_m / Math.sqrt((V * (l / A)));
}
return c0_s * tmp;
}
c0\_m = math.fabs(c0) c0\_s = math.copysign(1.0, c0) [c0_m, A, V, l] = sort([c0_m, A, V, l]) def code(c0_s, c0_m, A, V, l): t_0 = c0_m * math.sqrt((A / (V * l))) tmp = 0 if t_0 <= 0.0: tmp = c0_m * math.sqrt(((A / V) / l)) elif t_0 <= 1e+269: tmp = t_0 else: tmp = c0_m / math.sqrt((V * (l / A))) return c0_s * tmp
c0\_m = abs(c0) c0\_s = copysign(1.0, c0) c0_m, A, V, l = sort([c0_m, A, V, l]) function code(c0_s, c0_m, A, V, l) t_0 = Float64(c0_m * sqrt(Float64(A / Float64(V * l)))) tmp = 0.0 if (t_0 <= 0.0) tmp = Float64(c0_m * sqrt(Float64(Float64(A / V) / l))); elseif (t_0 <= 1e+269) tmp = t_0; else tmp = Float64(c0_m / sqrt(Float64(V * Float64(l / A)))); end return Float64(c0_s * tmp) end
c0\_m = abs(c0);
c0\_s = sign(c0) * abs(1.0);
c0_m, A, V, l = num2cell(sort([c0_m, A, V, l])){:}
function tmp_2 = code(c0_s, c0_m, A, V, l)
t_0 = c0_m * sqrt((A / (V * l)));
tmp = 0.0;
if (t_0 <= 0.0)
tmp = c0_m * sqrt(((A / V) / l));
elseif (t_0 <= 1e+269)
tmp = t_0;
else
tmp = c0_m / sqrt((V * (l / A)));
end
tmp_2 = c0_s * tmp;
end
c0\_m = N[Abs[c0], $MachinePrecision]
c0\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c0]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
code[c0$95$s_, c0$95$m_, A_, V_, l_] := Block[{t$95$0 = N[(c0$95$m * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, N[(c0$95$s * If[LessEqual[t$95$0, 0.0], N[(c0$95$m * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+269], t$95$0, N[(c0$95$m / N[Sqrt[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
c0\_m = \left|c0\right|
\\
c0\_s = \mathsf{copysign}\left(1, c0\right)
\\
[c0_m, A, V, l] = \mathsf{sort}([c0_m, A, V, l])\\
\\
\begin{array}{l}
t_0 := c0\_m \cdot \sqrt{\frac{A}{V \cdot \ell}}\\
c0\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;c0\_m \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;t\_0 \leq 10^{+269}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{c0\_m}{\sqrt{V \cdot \frac{\ell}{A}}}\\
\end{array}
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 0.0Initial program 67.9%
associate-/r*73.2%
Simplified73.2%
if 0.0 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1e269Initial program 97.6%
if 1e269 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 40.9%
associate-/r*47.1%
div-inv47.2%
Applied egg-rr47.2%
frac-times40.9%
sqrt-div39.0%
*-rgt-identity39.0%
associate-/l*39.1%
*-commutative39.1%
clear-num39.1%
associate-/r*39.1%
Applied egg-rr41.0%
associate-/r/41.0%
associate-*l/41.0%
*-lft-identity41.0%
associate-*r/47.2%
Simplified47.2%
c0\_m = (fabs.f64 c0)
c0\_s = (copysign.f64 #s(literal 1 binary64) c0)
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0_s c0_m A V l)
:precision binary64
(let* ((t_0 (* c0_m (sqrt (/ A (* V l))))))
(*
c0_s
(if (<= t_0 0.0)
(* c0_m (sqrt (/ (/ A V) l)))
(if (<= t_0 1e+269) t_0 (* c0_m (sqrt (/ (/ A l) V))))))))c0\_m = fabs(c0);
c0\_s = copysign(1.0, c0);
assert(c0_m < A && A < V && V < l);
double code(double c0_s, double c0_m, double A, double V, double l) {
double t_0 = c0_m * sqrt((A / (V * l)));
double tmp;
if (t_0 <= 0.0) {
tmp = c0_m * sqrt(((A / V) / l));
} else if (t_0 <= 1e+269) {
tmp = t_0;
} else {
tmp = c0_m * sqrt(((A / l) / V));
}
return c0_s * tmp;
}
c0\_m = abs(c0)
c0\_s = copysign(1.0d0, c0)
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0_s, c0_m, a, v, l)
real(8), intent (in) :: c0_s
real(8), intent (in) :: c0_m
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_m * sqrt((a / (v * l)))
if (t_0 <= 0.0d0) then
tmp = c0_m * sqrt(((a / v) / l))
else if (t_0 <= 1d+269) then
tmp = t_0
else
tmp = c0_m * sqrt(((a / l) / v))
end if
code = c0_s * tmp
end function
c0\_m = Math.abs(c0);
c0\_s = Math.copySign(1.0, c0);
assert c0_m < A && A < V && V < l;
public static double code(double c0_s, double c0_m, double A, double V, double l) {
double t_0 = c0_m * Math.sqrt((A / (V * l)));
double tmp;
if (t_0 <= 0.0) {
tmp = c0_m * Math.sqrt(((A / V) / l));
} else if (t_0 <= 1e+269) {
tmp = t_0;
} else {
tmp = c0_m * Math.sqrt(((A / l) / V));
}
return c0_s * tmp;
}
c0\_m = math.fabs(c0) c0\_s = math.copysign(1.0, c0) [c0_m, A, V, l] = sort([c0_m, A, V, l]) def code(c0_s, c0_m, A, V, l): t_0 = c0_m * math.sqrt((A / (V * l))) tmp = 0 if t_0 <= 0.0: tmp = c0_m * math.sqrt(((A / V) / l)) elif t_0 <= 1e+269: tmp = t_0 else: tmp = c0_m * math.sqrt(((A / l) / V)) return c0_s * tmp
c0\_m = abs(c0) c0\_s = copysign(1.0, c0) c0_m, A, V, l = sort([c0_m, A, V, l]) function code(c0_s, c0_m, A, V, l) t_0 = Float64(c0_m * sqrt(Float64(A / Float64(V * l)))) tmp = 0.0 if (t_0 <= 0.0) tmp = Float64(c0_m * sqrt(Float64(Float64(A / V) / l))); elseif (t_0 <= 1e+269) tmp = t_0; else tmp = Float64(c0_m * sqrt(Float64(Float64(A / l) / V))); end return Float64(c0_s * tmp) end
c0\_m = abs(c0);
c0\_s = sign(c0) * abs(1.0);
c0_m, A, V, l = num2cell(sort([c0_m, A, V, l])){:}
function tmp_2 = code(c0_s, c0_m, A, V, l)
t_0 = c0_m * sqrt((A / (V * l)));
tmp = 0.0;
if (t_0 <= 0.0)
tmp = c0_m * sqrt(((A / V) / l));
elseif (t_0 <= 1e+269)
tmp = t_0;
else
tmp = c0_m * sqrt(((A / l) / V));
end
tmp_2 = c0_s * tmp;
end
c0\_m = N[Abs[c0], $MachinePrecision]
c0\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c0]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
code[c0$95$s_, c0$95$m_, A_, V_, l_] := Block[{t$95$0 = N[(c0$95$m * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, N[(c0$95$s * If[LessEqual[t$95$0, 0.0], N[(c0$95$m * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+269], t$95$0, N[(c0$95$m * N[Sqrt[N[(N[(A / l), $MachinePrecision] / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
c0\_m = \left|c0\right|
\\
c0\_s = \mathsf{copysign}\left(1, c0\right)
\\
[c0_m, A, V, l] = \mathsf{sort}([c0_m, A, V, l])\\
\\
\begin{array}{l}
t_0 := c0\_m \cdot \sqrt{\frac{A}{V \cdot \ell}}\\
c0\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;c0\_m \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;t\_0 \leq 10^{+269}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;c0\_m \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\
\end{array}
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 0.0Initial program 67.9%
associate-/r*73.2%
Simplified73.2%
if 0.0 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1e269Initial program 97.6%
if 1e269 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 40.9%
associate-/r*47.1%
div-inv47.2%
Applied egg-rr47.2%
associate-*l/47.2%
div-inv47.2%
Applied egg-rr47.2%
c0\_m = (fabs.f64 c0)
c0\_s = (copysign.f64 #s(literal 1 binary64) c0)
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0_s c0_m A V l)
:precision binary64
(let* ((t_0 (* c0_m (/ (sqrt (/ A (- l))) (sqrt (- V))))))
(*
c0_s
(if (<= (* V l) (- INFINITY))
t_0
(if (<= (* V l) -1e-297)
(* c0_m (/ (sqrt (- A)) (sqrt (* V (- l)))))
(if (<= (* V l) 0.0)
t_0
(if (<= (* V l) 4e+296)
(* c0_m (/ 1.0 (/ (sqrt (* V l)) (sqrt A))))
(* (sqrt c0_m) (sqrt (* (/ c0_m l) (/ A V)))))))))))c0\_m = fabs(c0);
c0\_s = copysign(1.0, c0);
assert(c0_m < A && A < V && V < l);
double code(double c0_s, double c0_m, double A, double V, double l) {
double t_0 = c0_m * (sqrt((A / -l)) / sqrt(-V));
double tmp;
if ((V * l) <= -((double) INFINITY)) {
tmp = t_0;
} else if ((V * l) <= -1e-297) {
tmp = c0_m * (sqrt(-A) / sqrt((V * -l)));
} else if ((V * l) <= 0.0) {
tmp = t_0;
} else if ((V * l) <= 4e+296) {
tmp = c0_m * (1.0 / (sqrt((V * l)) / sqrt(A)));
} else {
tmp = sqrt(c0_m) * sqrt(((c0_m / l) * (A / V)));
}
return c0_s * tmp;
}
c0\_m = Math.abs(c0);
c0\_s = Math.copySign(1.0, c0);
assert c0_m < A && A < V && V < l;
public static double code(double c0_s, double c0_m, double A, double V, double l) {
double t_0 = c0_m * (Math.sqrt((A / -l)) / Math.sqrt(-V));
double tmp;
if ((V * l) <= -Double.POSITIVE_INFINITY) {
tmp = t_0;
} else if ((V * l) <= -1e-297) {
tmp = c0_m * (Math.sqrt(-A) / Math.sqrt((V * -l)));
} else if ((V * l) <= 0.0) {
tmp = t_0;
} else if ((V * l) <= 4e+296) {
tmp = c0_m * (1.0 / (Math.sqrt((V * l)) / Math.sqrt(A)));
} else {
tmp = Math.sqrt(c0_m) * Math.sqrt(((c0_m / l) * (A / V)));
}
return c0_s * tmp;
}
c0\_m = math.fabs(c0) c0\_s = math.copysign(1.0, c0) [c0_m, A, V, l] = sort([c0_m, A, V, l]) def code(c0_s, c0_m, A, V, l): t_0 = c0_m * (math.sqrt((A / -l)) / math.sqrt(-V)) tmp = 0 if (V * l) <= -math.inf: tmp = t_0 elif (V * l) <= -1e-297: tmp = c0_m * (math.sqrt(-A) / math.sqrt((V * -l))) elif (V * l) <= 0.0: tmp = t_0 elif (V * l) <= 4e+296: tmp = c0_m * (1.0 / (math.sqrt((V * l)) / math.sqrt(A))) else: tmp = math.sqrt(c0_m) * math.sqrt(((c0_m / l) * (A / V))) return c0_s * tmp
c0\_m = abs(c0) c0\_s = copysign(1.0, c0) c0_m, A, V, l = sort([c0_m, A, V, l]) function code(c0_s, c0_m, A, V, l) t_0 = Float64(c0_m * 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-297) tmp = Float64(c0_m * Float64(sqrt(Float64(-A)) / sqrt(Float64(V * Float64(-l))))); elseif (Float64(V * l) <= 0.0) tmp = t_0; elseif (Float64(V * l) <= 4e+296) tmp = Float64(c0_m * Float64(1.0 / Float64(sqrt(Float64(V * l)) / sqrt(A)))); else tmp = Float64(sqrt(c0_m) * sqrt(Float64(Float64(c0_m / l) * Float64(A / V)))); end return Float64(c0_s * tmp) end
c0\_m = abs(c0);
c0\_s = sign(c0) * abs(1.0);
c0_m, A, V, l = num2cell(sort([c0_m, A, V, l])){:}
function tmp_2 = code(c0_s, c0_m, A, V, l)
t_0 = c0_m * (sqrt((A / -l)) / sqrt(-V));
tmp = 0.0;
if ((V * l) <= -Inf)
tmp = t_0;
elseif ((V * l) <= -1e-297)
tmp = c0_m * (sqrt(-A) / sqrt((V * -l)));
elseif ((V * l) <= 0.0)
tmp = t_0;
elseif ((V * l) <= 4e+296)
tmp = c0_m * (1.0 / (sqrt((V * l)) / sqrt(A)));
else
tmp = sqrt(c0_m) * sqrt(((c0_m / l) * (A / V)));
end
tmp_2 = c0_s * tmp;
end
c0\_m = N[Abs[c0], $MachinePrecision]
c0\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c0]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
code[c0$95$s_, c0$95$m_, A_, V_, l_] := Block[{t$95$0 = N[(c0$95$m * N[(N[Sqrt[N[(A / (-l)), $MachinePrecision]], $MachinePrecision] / N[Sqrt[(-V)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c0$95$s * If[LessEqual[N[(V * l), $MachinePrecision], (-Infinity)], t$95$0, If[LessEqual[N[(V * l), $MachinePrecision], -1e-297], N[(c0$95$m * 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], 4e+296], N[(c0$95$m * N[(1.0 / N[(N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[c0$95$m], $MachinePrecision] * N[Sqrt[N[(N[(c0$95$m / l), $MachinePrecision] * N[(A / V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]
\begin{array}{l}
c0\_m = \left|c0\right|
\\
c0\_s = \mathsf{copysign}\left(1, c0\right)
\\
[c0_m, A, V, l] = \mathsf{sort}([c0_m, A, V, l])\\
\\
\begin{array}{l}
t_0 := c0\_m \cdot \frac{\sqrt{\frac{A}{-\ell}}}{\sqrt{-V}}\\
c0\_s \cdot \begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -\infty:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-297}:\\
\;\;\;\;c0\_m \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 4 \cdot 10^{+296}:\\
\;\;\;\;c0\_m \cdot \frac{1}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{c0\_m} \cdot \sqrt{\frac{c0\_m}{\ell} \cdot \frac{A}{V}}\\
\end{array}
\end{array}
\end{array}
if (*.f64 V l) < -inf.0 or -1.00000000000000004e-297 < (*.f64 V l) < -0.0Initial program 30.0%
associate-/r*51.2%
div-inv51.2%
Applied egg-rr51.2%
associate-*l/51.2%
div-inv51.2%
Applied egg-rr51.2%
frac-2neg51.2%
sqrt-div55.2%
distribute-neg-frac255.2%
Applied egg-rr55.2%
if -inf.0 < (*.f64 V l) < -1.00000000000000004e-297Initial program 87.8%
frac-2neg87.8%
sqrt-div99.5%
distribute-rgt-neg-in99.5%
Applied egg-rr99.5%
if -0.0 < (*.f64 V l) < 3.99999999999999993e296Initial program 83.8%
sqrt-div99.4%
clear-num99.3%
Applied egg-rr99.3%
if 3.99999999999999993e296 < (*.f64 V l) Initial program 47.9%
*-commutative47.9%
sqrt-div47.9%
associate-*l/47.9%
Applied egg-rr47.9%
*-commutative47.9%
associate-/l*47.9%
*-rgt-identity47.9%
sqrt-div47.9%
frac-times81.4%
*-commutative81.4%
add-sqr-sqrt40.2%
associate-*r*40.2%
frac-times34.6%
sqrt-div34.6%
*-rgt-identity34.6%
sqrt-div34.6%
Applied egg-rr34.6%
Taylor expanded in A around 0 34.4%
times-frac45.9%
Simplified45.9%
Final simplification87.8%
c0\_m = (fabs.f64 c0)
c0\_s = (copysign.f64 #s(literal 1 binary64) c0)
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0_s c0_m A V l)
:precision binary64
(let* ((t_0 (* c0_m (/ (sqrt (/ A (- l))) (sqrt (- V))))))
(*
c0_s
(if (<= (* V l) (- INFINITY))
t_0
(if (<= (* V l) -1e-297)
(* c0_m (/ (sqrt (- A)) (sqrt (* V (- l)))))
(if (<= (* V l) 0.0)
t_0
(if (<= (* V l) 4e+296)
(* c0_m (/ 1.0 (/ (sqrt (* V l)) (sqrt A))))
(/ c0_m (sqrt (/ l (/ A V)))))))))))c0\_m = fabs(c0);
c0\_s = copysign(1.0, c0);
assert(c0_m < A && A < V && V < l);
double code(double c0_s, double c0_m, double A, double V, double l) {
double t_0 = c0_m * (sqrt((A / -l)) / sqrt(-V));
double tmp;
if ((V * l) <= -((double) INFINITY)) {
tmp = t_0;
} else if ((V * l) <= -1e-297) {
tmp = c0_m * (sqrt(-A) / sqrt((V * -l)));
} else if ((V * l) <= 0.0) {
tmp = t_0;
} else if ((V * l) <= 4e+296) {
tmp = c0_m * (1.0 / (sqrt((V * l)) / sqrt(A)));
} else {
tmp = c0_m / sqrt((l / (A / V)));
}
return c0_s * tmp;
}
c0\_m = Math.abs(c0);
c0\_s = Math.copySign(1.0, c0);
assert c0_m < A && A < V && V < l;
public static double code(double c0_s, double c0_m, double A, double V, double l) {
double t_0 = c0_m * (Math.sqrt((A / -l)) / Math.sqrt(-V));
double tmp;
if ((V * l) <= -Double.POSITIVE_INFINITY) {
tmp = t_0;
} else if ((V * l) <= -1e-297) {
tmp = c0_m * (Math.sqrt(-A) / Math.sqrt((V * -l)));
} else if ((V * l) <= 0.0) {
tmp = t_0;
} else if ((V * l) <= 4e+296) {
tmp = c0_m * (1.0 / (Math.sqrt((V * l)) / Math.sqrt(A)));
} else {
tmp = c0_m / Math.sqrt((l / (A / V)));
}
return c0_s * tmp;
}
c0\_m = math.fabs(c0) c0\_s = math.copysign(1.0, c0) [c0_m, A, V, l] = sort([c0_m, A, V, l]) def code(c0_s, c0_m, A, V, l): t_0 = c0_m * (math.sqrt((A / -l)) / math.sqrt(-V)) tmp = 0 if (V * l) <= -math.inf: tmp = t_0 elif (V * l) <= -1e-297: tmp = c0_m * (math.sqrt(-A) / math.sqrt((V * -l))) elif (V * l) <= 0.0: tmp = t_0 elif (V * l) <= 4e+296: tmp = c0_m * (1.0 / (math.sqrt((V * l)) / math.sqrt(A))) else: tmp = c0_m / math.sqrt((l / (A / V))) return c0_s * tmp
c0\_m = abs(c0) c0\_s = copysign(1.0, c0) c0_m, A, V, l = sort([c0_m, A, V, l]) function code(c0_s, c0_m, A, V, l) t_0 = Float64(c0_m * 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-297) tmp = Float64(c0_m * Float64(sqrt(Float64(-A)) / sqrt(Float64(V * Float64(-l))))); elseif (Float64(V * l) <= 0.0) tmp = t_0; elseif (Float64(V * l) <= 4e+296) tmp = Float64(c0_m * Float64(1.0 / Float64(sqrt(Float64(V * l)) / sqrt(A)))); else tmp = Float64(c0_m / sqrt(Float64(l / Float64(A / V)))); end return Float64(c0_s * tmp) end
c0\_m = abs(c0);
c0\_s = sign(c0) * abs(1.0);
c0_m, A, V, l = num2cell(sort([c0_m, A, V, l])){:}
function tmp_2 = code(c0_s, c0_m, A, V, l)
t_0 = c0_m * (sqrt((A / -l)) / sqrt(-V));
tmp = 0.0;
if ((V * l) <= -Inf)
tmp = t_0;
elseif ((V * l) <= -1e-297)
tmp = c0_m * (sqrt(-A) / sqrt((V * -l)));
elseif ((V * l) <= 0.0)
tmp = t_0;
elseif ((V * l) <= 4e+296)
tmp = c0_m * (1.0 / (sqrt((V * l)) / sqrt(A)));
else
tmp = c0_m / sqrt((l / (A / V)));
end
tmp_2 = c0_s * tmp;
end
c0\_m = N[Abs[c0], $MachinePrecision]
c0\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c0]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
code[c0$95$s_, c0$95$m_, A_, V_, l_] := Block[{t$95$0 = N[(c0$95$m * N[(N[Sqrt[N[(A / (-l)), $MachinePrecision]], $MachinePrecision] / N[Sqrt[(-V)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(c0$95$s * If[LessEqual[N[(V * l), $MachinePrecision], (-Infinity)], t$95$0, If[LessEqual[N[(V * l), $MachinePrecision], -1e-297], N[(c0$95$m * 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], 4e+296], N[(c0$95$m * N[(1.0 / N[(N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0$95$m / N[Sqrt[N[(l / N[(A / V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]
\begin{array}{l}
c0\_m = \left|c0\right|
\\
c0\_s = \mathsf{copysign}\left(1, c0\right)
\\
[c0_m, A, V, l] = \mathsf{sort}([c0_m, A, V, l])\\
\\
\begin{array}{l}
t_0 := c0\_m \cdot \frac{\sqrt{\frac{A}{-\ell}}}{\sqrt{-V}}\\
c0\_s \cdot \begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -\infty:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-297}:\\
\;\;\;\;c0\_m \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 4 \cdot 10^{+296}:\\
\;\;\;\;c0\_m \cdot \frac{1}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0\_m}{\sqrt{\frac{\ell}{\frac{A}{V}}}}\\
\end{array}
\end{array}
\end{array}
if (*.f64 V l) < -inf.0 or -1.00000000000000004e-297 < (*.f64 V l) < -0.0Initial program 30.0%
associate-/r*51.2%
div-inv51.2%
Applied egg-rr51.2%
associate-*l/51.2%
div-inv51.2%
Applied egg-rr51.2%
frac-2neg51.2%
sqrt-div55.2%
distribute-neg-frac255.2%
Applied egg-rr55.2%
if -inf.0 < (*.f64 V l) < -1.00000000000000004e-297Initial program 87.8%
frac-2neg87.8%
sqrt-div99.5%
distribute-rgt-neg-in99.5%
Applied egg-rr99.5%
if -0.0 < (*.f64 V l) < 3.99999999999999993e296Initial program 83.8%
sqrt-div99.4%
clear-num99.3%
Applied egg-rr99.3%
if 3.99999999999999993e296 < (*.f64 V l) Initial program 47.9%
*-commutative47.9%
sqrt-div47.9%
associate-*l/47.9%
Applied egg-rr47.9%
*-commutative47.9%
associate-/l*47.9%
*-rgt-identity47.9%
sqrt-div47.9%
frac-times81.4%
*-commutative81.4%
add-sqr-sqrt40.2%
associate-*r*40.2%
frac-times34.6%
sqrt-div34.6%
*-rgt-identity34.6%
sqrt-div34.6%
Applied egg-rr34.6%
associate-*l*34.6%
associate-/r*40.2%
sqrt-undiv46.8%
clear-num46.8%
add-sqr-sqrt70.3%
associate-*l/70.4%
*-un-lft-identity70.4%
sqrt-undiv81.6%
Applied egg-rr81.6%
c0\_m = (fabs.f64 c0)
c0\_s = (copysign.f64 #s(literal 1 binary64) c0)
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0_s c0_m A V l)
:precision binary64
(*
c0_s
(if (<= (* V l) -2e+250)
(* c0_m (/ 1.0 (/ (sqrt l) (sqrt (/ A V)))))
(if (<= (* V l) -1e-297)
(* c0_m (/ (sqrt (- A)) (sqrt (* V (- l)))))
(if (<= (* V l) 0.0)
(sqrt (* (/ A V) (* c0_m (/ c0_m l))))
(if (<= (* V l) 4e+296)
(* c0_m (/ 1.0 (/ (sqrt (* V l)) (sqrt A))))
(/ c0_m (sqrt (/ l (/ A V))))))))))c0\_m = fabs(c0);
c0\_s = copysign(1.0, c0);
assert(c0_m < A && A < V && V < l);
double code(double c0_s, double c0_m, double A, double V, double l) {
double tmp;
if ((V * l) <= -2e+250) {
tmp = c0_m * (1.0 / (sqrt(l) / sqrt((A / V))));
} else if ((V * l) <= -1e-297) {
tmp = c0_m * (sqrt(-A) / sqrt((V * -l)));
} else if ((V * l) <= 0.0) {
tmp = sqrt(((A / V) * (c0_m * (c0_m / l))));
} else if ((V * l) <= 4e+296) {
tmp = c0_m * (1.0 / (sqrt((V * l)) / sqrt(A)));
} else {
tmp = c0_m / sqrt((l / (A / V)));
}
return c0_s * tmp;
}
c0\_m = abs(c0)
c0\_s = copysign(1.0d0, c0)
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0_s, c0_m, a, v, l)
real(8), intent (in) :: c0_s
real(8), intent (in) :: c0_m
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: tmp
if ((v * l) <= (-2d+250)) then
tmp = c0_m * (1.0d0 / (sqrt(l) / sqrt((a / v))))
else if ((v * l) <= (-1d-297)) then
tmp = c0_m * (sqrt(-a) / sqrt((v * -l)))
else if ((v * l) <= 0.0d0) then
tmp = sqrt(((a / v) * (c0_m * (c0_m / l))))
else if ((v * l) <= 4d+296) then
tmp = c0_m * (1.0d0 / (sqrt((v * l)) / sqrt(a)))
else
tmp = c0_m / sqrt((l / (a / v)))
end if
code = c0_s * tmp
end function
c0\_m = Math.abs(c0);
c0\_s = Math.copySign(1.0, c0);
assert c0_m < A && A < V && V < l;
public static double code(double c0_s, double c0_m, double A, double V, double l) {
double tmp;
if ((V * l) <= -2e+250) {
tmp = c0_m * (1.0 / (Math.sqrt(l) / Math.sqrt((A / V))));
} else if ((V * l) <= -1e-297) {
tmp = c0_m * (Math.sqrt(-A) / Math.sqrt((V * -l)));
} else if ((V * l) <= 0.0) {
tmp = Math.sqrt(((A / V) * (c0_m * (c0_m / l))));
} else if ((V * l) <= 4e+296) {
tmp = c0_m * (1.0 / (Math.sqrt((V * l)) / Math.sqrt(A)));
} else {
tmp = c0_m / Math.sqrt((l / (A / V)));
}
return c0_s * tmp;
}
c0\_m = math.fabs(c0) c0\_s = math.copysign(1.0, c0) [c0_m, A, V, l] = sort([c0_m, A, V, l]) def code(c0_s, c0_m, A, V, l): tmp = 0 if (V * l) <= -2e+250: tmp = c0_m * (1.0 / (math.sqrt(l) / math.sqrt((A / V)))) elif (V * l) <= -1e-297: tmp = c0_m * (math.sqrt(-A) / math.sqrt((V * -l))) elif (V * l) <= 0.0: tmp = math.sqrt(((A / V) * (c0_m * (c0_m / l)))) elif (V * l) <= 4e+296: tmp = c0_m * (1.0 / (math.sqrt((V * l)) / math.sqrt(A))) else: tmp = c0_m / math.sqrt((l / (A / V))) return c0_s * tmp
c0\_m = abs(c0) c0\_s = copysign(1.0, c0) c0_m, A, V, l = sort([c0_m, A, V, l]) function code(c0_s, c0_m, A, V, l) tmp = 0.0 if (Float64(V * l) <= -2e+250) tmp = Float64(c0_m * Float64(1.0 / Float64(sqrt(l) / sqrt(Float64(A / V))))); elseif (Float64(V * l) <= -1e-297) tmp = Float64(c0_m * Float64(sqrt(Float64(-A)) / sqrt(Float64(V * Float64(-l))))); elseif (Float64(V * l) <= 0.0) tmp = sqrt(Float64(Float64(A / V) * Float64(c0_m * Float64(c0_m / l)))); elseif (Float64(V * l) <= 4e+296) tmp = Float64(c0_m * Float64(1.0 / Float64(sqrt(Float64(V * l)) / sqrt(A)))); else tmp = Float64(c0_m / sqrt(Float64(l / Float64(A / V)))); end return Float64(c0_s * tmp) end
c0\_m = abs(c0);
c0\_s = sign(c0) * abs(1.0);
c0_m, A, V, l = num2cell(sort([c0_m, A, V, l])){:}
function tmp_2 = code(c0_s, c0_m, A, V, l)
tmp = 0.0;
if ((V * l) <= -2e+250)
tmp = c0_m * (1.0 / (sqrt(l) / sqrt((A / V))));
elseif ((V * l) <= -1e-297)
tmp = c0_m * (sqrt(-A) / sqrt((V * -l)));
elseif ((V * l) <= 0.0)
tmp = sqrt(((A / V) * (c0_m * (c0_m / l))));
elseif ((V * l) <= 4e+296)
tmp = c0_m * (1.0 / (sqrt((V * l)) / sqrt(A)));
else
tmp = c0_m / sqrt((l / (A / V)));
end
tmp_2 = c0_s * tmp;
end
c0\_m = N[Abs[c0], $MachinePrecision]
c0\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c0]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
code[c0$95$s_, c0$95$m_, A_, V_, l_] := N[(c0$95$s * If[LessEqual[N[(V * l), $MachinePrecision], -2e+250], N[(c0$95$m * N[(1.0 / N[(N[Sqrt[l], $MachinePrecision] / N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -1e-297], N[(c0$95$m * N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[N[(V * (-l)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 0.0], N[Sqrt[N[(N[(A / V), $MachinePrecision] * N[(c0$95$m * N[(c0$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 4e+296], N[(c0$95$m * N[(1.0 / N[(N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0$95$m / N[Sqrt[N[(l / N[(A / V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]
\begin{array}{l}
c0\_m = \left|c0\right|
\\
c0\_s = \mathsf{copysign}\left(1, c0\right)
\\
[c0_m, A, V, l] = \mathsf{sort}([c0_m, A, V, l])\\
\\
c0\_s \cdot \begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -2 \cdot 10^{+250}:\\
\;\;\;\;c0\_m \cdot \frac{1}{\frac{\sqrt{\ell}}{\sqrt{\frac{A}{V}}}}\\
\mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-297}:\\
\;\;\;\;c0\_m \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\
\mathbf{elif}\;V \cdot \ell \leq 0:\\
\;\;\;\;\sqrt{\frac{A}{V} \cdot \left(c0\_m \cdot \frac{c0\_m}{\ell}\right)}\\
\mathbf{elif}\;V \cdot \ell \leq 4 \cdot 10^{+296}:\\
\;\;\;\;c0\_m \cdot \frac{1}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0\_m}{\sqrt{\frac{\ell}{\frac{A}{V}}}}\\
\end{array}
\end{array}
if (*.f64 V l) < -1.9999999999999998e250Initial program 38.6%
associate-/r*58.0%
sqrt-div46.9%
div-inv46.8%
Applied egg-rr46.8%
*-commutative46.8%
associate-/r/46.9%
Simplified46.9%
if -1.9999999999999998e250 < (*.f64 V l) < -1.00000000000000004e-297Initial program 88.1%
frac-2neg88.1%
sqrt-div99.5%
distribute-rgt-neg-in99.5%
Applied egg-rr99.5%
if -1.00000000000000004e-297 < (*.f64 V l) < -0.0Initial program 32.7%
*-commutative32.7%
sqrt-div16.5%
associate-*l/16.5%
Applied egg-rr16.5%
*-commutative16.5%
associate-/l*16.5%
*-rgt-identity16.5%
sqrt-div32.7%
frac-times51.7%
*-commutative51.7%
add-sqr-sqrt22.9%
associate-*r*22.9%
frac-times15.7%
sqrt-div9.8%
*-rgt-identity9.8%
sqrt-div15.7%
Applied egg-rr15.7%
Taylor expanded in A around 0 15.7%
times-frac43.9%
Simplified43.9%
sqrt-unprod44.5%
associate-*l*41.5%
Applied egg-rr41.5%
if -0.0 < (*.f64 V l) < 3.99999999999999993e296Initial program 83.8%
sqrt-div99.4%
clear-num99.3%
Applied egg-rr99.3%
if 3.99999999999999993e296 < (*.f64 V l) Initial program 47.9%
*-commutative47.9%
sqrt-div47.9%
associate-*l/47.9%
Applied egg-rr47.9%
*-commutative47.9%
associate-/l*47.9%
*-rgt-identity47.9%
sqrt-div47.9%
frac-times81.4%
*-commutative81.4%
add-sqr-sqrt40.2%
associate-*r*40.2%
frac-times34.6%
sqrt-div34.6%
*-rgt-identity34.6%
sqrt-div34.6%
Applied egg-rr34.6%
associate-*l*34.6%
associate-/r*40.2%
sqrt-undiv46.8%
clear-num46.8%
add-sqr-sqrt70.3%
associate-*l/70.4%
*-un-lft-identity70.4%
sqrt-undiv81.6%
Applied egg-rr81.6%
Final simplification86.9%
c0\_m = (fabs.f64 c0)
c0\_s = (copysign.f64 #s(literal 1 binary64) c0)
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0_s c0_m A V l)
:precision binary64
(*
c0_s
(if (<= l -5e-310)
(* c0_m (/ (sqrt (/ A (- V))) (sqrt (- l))))
(* c0_m (/ (sqrt (/ A V)) (sqrt l))))))c0\_m = fabs(c0);
c0\_s = copysign(1.0, c0);
assert(c0_m < A && A < V && V < l);
double code(double c0_s, double c0_m, double A, double V, double l) {
double tmp;
if (l <= -5e-310) {
tmp = c0_m * (sqrt((A / -V)) / sqrt(-l));
} else {
tmp = c0_m * (sqrt((A / V)) / sqrt(l));
}
return c0_s * tmp;
}
c0\_m = abs(c0)
c0\_s = copysign(1.0d0, c0)
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0_s, c0_m, a, v, l)
real(8), intent (in) :: c0_s
real(8), intent (in) :: c0_m
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_m * (sqrt((a / -v)) / sqrt(-l))
else
tmp = c0_m * (sqrt((a / v)) / sqrt(l))
end if
code = c0_s * tmp
end function
c0\_m = Math.abs(c0);
c0\_s = Math.copySign(1.0, c0);
assert c0_m < A && A < V && V < l;
public static double code(double c0_s, double c0_m, double A, double V, double l) {
double tmp;
if (l <= -5e-310) {
tmp = c0_m * (Math.sqrt((A / -V)) / Math.sqrt(-l));
} else {
tmp = c0_m * (Math.sqrt((A / V)) / Math.sqrt(l));
}
return c0_s * tmp;
}
c0\_m = math.fabs(c0) c0\_s = math.copysign(1.0, c0) [c0_m, A, V, l] = sort([c0_m, A, V, l]) def code(c0_s, c0_m, A, V, l): tmp = 0 if l <= -5e-310: tmp = c0_m * (math.sqrt((A / -V)) / math.sqrt(-l)) else: tmp = c0_m * (math.sqrt((A / V)) / math.sqrt(l)) return c0_s * tmp
c0\_m = abs(c0) c0\_s = copysign(1.0, c0) c0_m, A, V, l = sort([c0_m, A, V, l]) function code(c0_s, c0_m, A, V, l) tmp = 0.0 if (l <= -5e-310) tmp = Float64(c0_m * Float64(sqrt(Float64(A / Float64(-V))) / sqrt(Float64(-l)))); else tmp = Float64(c0_m * Float64(sqrt(Float64(A / V)) / sqrt(l))); end return Float64(c0_s * tmp) end
c0\_m = abs(c0);
c0\_s = sign(c0) * abs(1.0);
c0_m, A, V, l = num2cell(sort([c0_m, A, V, l])){:}
function tmp_2 = code(c0_s, c0_m, A, V, l)
tmp = 0.0;
if (l <= -5e-310)
tmp = c0_m * (sqrt((A / -V)) / sqrt(-l));
else
tmp = c0_m * (sqrt((A / V)) / sqrt(l));
end
tmp_2 = c0_s * tmp;
end
c0\_m = N[Abs[c0], $MachinePrecision]
c0\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c0]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
code[c0$95$s_, c0$95$m_, A_, V_, l_] := N[(c0$95$s * If[LessEqual[l, -5e-310], N[(c0$95$m * N[(N[Sqrt[N[(A / (-V)), $MachinePrecision]], $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0$95$m * N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c0\_m = \left|c0\right|
\\
c0\_s = \mathsf{copysign}\left(1, c0\right)
\\
[c0_m, A, V, l] = \mathsf{sort}([c0_m, A, V, l])\\
\\
c0\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq -5 \cdot 10^{-310}:\\
\;\;\;\;c0\_m \cdot \frac{\sqrt{\frac{A}{-V}}}{\sqrt{-\ell}}\\
\mathbf{else}:\\
\;\;\;\;c0\_m \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\
\end{array}
\end{array}
if l < -4.999999999999985e-310Initial program 70.1%
associate-/r*73.1%
frac-2neg73.1%
sqrt-div88.5%
distribute-neg-frac288.5%
Applied egg-rr88.5%
if -4.999999999999985e-310 < l Initial program 75.9%
associate-/r*76.9%
sqrt-div89.6%
div-inv89.6%
Applied egg-rr89.6%
associate-*r/89.6%
*-rgt-identity89.6%
Simplified89.6%
c0\_m = (fabs.f64 c0)
c0\_s = (copysign.f64 #s(literal 1 binary64) c0)
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0_s c0_m A V l)
:precision binary64
(*
c0_s
(if (<= l -5e-310)
(* c0_m (/ 1.0 (/ (sqrt (* V l)) (sqrt A))))
(* c0_m (/ (sqrt (/ A V)) (sqrt l))))))c0\_m = fabs(c0);
c0\_s = copysign(1.0, c0);
assert(c0_m < A && A < V && V < l);
double code(double c0_s, double c0_m, double A, double V, double l) {
double tmp;
if (l <= -5e-310) {
tmp = c0_m * (1.0 / (sqrt((V * l)) / sqrt(A)));
} else {
tmp = c0_m * (sqrt((A / V)) / sqrt(l));
}
return c0_s * tmp;
}
c0\_m = abs(c0)
c0\_s = copysign(1.0d0, c0)
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0_s, c0_m, a, v, l)
real(8), intent (in) :: c0_s
real(8), intent (in) :: c0_m
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_m * (1.0d0 / (sqrt((v * l)) / sqrt(a)))
else
tmp = c0_m * (sqrt((a / v)) / sqrt(l))
end if
code = c0_s * tmp
end function
c0\_m = Math.abs(c0);
c0\_s = Math.copySign(1.0, c0);
assert c0_m < A && A < V && V < l;
public static double code(double c0_s, double c0_m, double A, double V, double l) {
double tmp;
if (l <= -5e-310) {
tmp = c0_m * (1.0 / (Math.sqrt((V * l)) / Math.sqrt(A)));
} else {
tmp = c0_m * (Math.sqrt((A / V)) / Math.sqrt(l));
}
return c0_s * tmp;
}
c0\_m = math.fabs(c0) c0\_s = math.copysign(1.0, c0) [c0_m, A, V, l] = sort([c0_m, A, V, l]) def code(c0_s, c0_m, A, V, l): tmp = 0 if l <= -5e-310: tmp = c0_m * (1.0 / (math.sqrt((V * l)) / math.sqrt(A))) else: tmp = c0_m * (math.sqrt((A / V)) / math.sqrt(l)) return c0_s * tmp
c0\_m = abs(c0) c0\_s = copysign(1.0, c0) c0_m, A, V, l = sort([c0_m, A, V, l]) function code(c0_s, c0_m, A, V, l) tmp = 0.0 if (l <= -5e-310) tmp = Float64(c0_m * Float64(1.0 / Float64(sqrt(Float64(V * l)) / sqrt(A)))); else tmp = Float64(c0_m * Float64(sqrt(Float64(A / V)) / sqrt(l))); end return Float64(c0_s * tmp) end
c0\_m = abs(c0);
c0\_s = sign(c0) * abs(1.0);
c0_m, A, V, l = num2cell(sort([c0_m, A, V, l])){:}
function tmp_2 = code(c0_s, c0_m, A, V, l)
tmp = 0.0;
if (l <= -5e-310)
tmp = c0_m * (1.0 / (sqrt((V * l)) / sqrt(A)));
else
tmp = c0_m * (sqrt((A / V)) / sqrt(l));
end
tmp_2 = c0_s * tmp;
end
c0\_m = N[Abs[c0], $MachinePrecision]
c0\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c0]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
code[c0$95$s_, c0$95$m_, A_, V_, l_] := N[(c0$95$s * If[LessEqual[l, -5e-310], N[(c0$95$m * N[(1.0 / N[(N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0$95$m * N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c0\_m = \left|c0\right|
\\
c0\_s = \mathsf{copysign}\left(1, c0\right)
\\
[c0_m, A, V, l] = \mathsf{sort}([c0_m, A, V, l])\\
\\
c0\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq -5 \cdot 10^{-310}:\\
\;\;\;\;c0\_m \cdot \frac{1}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\
\mathbf{else}:\\
\;\;\;\;c0\_m \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\
\end{array}
\end{array}
if l < -4.999999999999985e-310Initial program 70.1%
sqrt-div39.2%
clear-num39.2%
Applied egg-rr39.2%
if -4.999999999999985e-310 < l Initial program 75.9%
associate-/r*76.9%
sqrt-div89.6%
div-inv89.6%
Applied egg-rr89.6%
associate-*r/89.6%
*-rgt-identity89.6%
Simplified89.6%
c0\_m = (fabs.f64 c0)
c0\_s = (copysign.f64 #s(literal 1 binary64) c0)
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0_s c0_m A V l)
:precision binary64
(*
c0_s
(if (<= l -5e-310)
(* (sqrt A) (/ c0_m (sqrt (* V l))))
(* c0_m (/ (sqrt (/ A V)) (sqrt l))))))c0\_m = fabs(c0);
c0\_s = copysign(1.0, c0);
assert(c0_m < A && A < V && V < l);
double code(double c0_s, double c0_m, double A, double V, double l) {
double tmp;
if (l <= -5e-310) {
tmp = sqrt(A) * (c0_m / sqrt((V * l)));
} else {
tmp = c0_m * (sqrt((A / V)) / sqrt(l));
}
return c0_s * tmp;
}
c0\_m = abs(c0)
c0\_s = copysign(1.0d0, c0)
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0_s, c0_m, a, v, l)
real(8), intent (in) :: c0_s
real(8), intent (in) :: c0_m
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: tmp
if (l <= (-5d-310)) then
tmp = sqrt(a) * (c0_m / sqrt((v * l)))
else
tmp = c0_m * (sqrt((a / v)) / sqrt(l))
end if
code = c0_s * tmp
end function
c0\_m = Math.abs(c0);
c0\_s = Math.copySign(1.0, c0);
assert c0_m < A && A < V && V < l;
public static double code(double c0_s, double c0_m, double A, double V, double l) {
double tmp;
if (l <= -5e-310) {
tmp = Math.sqrt(A) * (c0_m / Math.sqrt((V * l)));
} else {
tmp = c0_m * (Math.sqrt((A / V)) / Math.sqrt(l));
}
return c0_s * tmp;
}
c0\_m = math.fabs(c0) c0\_s = math.copysign(1.0, c0) [c0_m, A, V, l] = sort([c0_m, A, V, l]) def code(c0_s, c0_m, A, V, l): tmp = 0 if l <= -5e-310: tmp = math.sqrt(A) * (c0_m / math.sqrt((V * l))) else: tmp = c0_m * (math.sqrt((A / V)) / math.sqrt(l)) return c0_s * tmp
c0\_m = abs(c0) c0\_s = copysign(1.0, c0) c0_m, A, V, l = sort([c0_m, A, V, l]) function code(c0_s, c0_m, A, V, l) tmp = 0.0 if (l <= -5e-310) tmp = Float64(sqrt(A) * Float64(c0_m / sqrt(Float64(V * l)))); else tmp = Float64(c0_m * Float64(sqrt(Float64(A / V)) / sqrt(l))); end return Float64(c0_s * tmp) end
c0\_m = abs(c0);
c0\_s = sign(c0) * abs(1.0);
c0_m, A, V, l = num2cell(sort([c0_m, A, V, l])){:}
function tmp_2 = code(c0_s, c0_m, A, V, l)
tmp = 0.0;
if (l <= -5e-310)
tmp = sqrt(A) * (c0_m / sqrt((V * l)));
else
tmp = c0_m * (sqrt((A / V)) / sqrt(l));
end
tmp_2 = c0_s * tmp;
end
c0\_m = N[Abs[c0], $MachinePrecision]
c0\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c0]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
code[c0$95$s_, c0$95$m_, A_, V_, l_] := N[(c0$95$s * If[LessEqual[l, -5e-310], N[(N[Sqrt[A], $MachinePrecision] * N[(c0$95$m / N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0$95$m * N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c0\_m = \left|c0\right|
\\
c0\_s = \mathsf{copysign}\left(1, c0\right)
\\
[c0_m, A, V, l] = \mathsf{sort}([c0_m, A, V, l])\\
\\
c0\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\sqrt{A} \cdot \frac{c0\_m}{\sqrt{V \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;c0\_m \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\
\end{array}
\end{array}
if l < -4.999999999999985e-310Initial program 70.1%
*-commutative70.1%
sqrt-div39.2%
associate-*l/38.5%
Applied egg-rr38.5%
associate-/l*39.2%
*-commutative39.2%
Applied egg-rr39.2%
if -4.999999999999985e-310 < l Initial program 75.9%
associate-/r*76.9%
sqrt-div89.6%
div-inv89.6%
Applied egg-rr89.6%
associate-*r/89.6%
*-rgt-identity89.6%
Simplified89.6%
Final simplification65.0%
c0\_m = (fabs.f64 c0)
c0\_s = (copysign.f64 #s(literal 1 binary64) c0)
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0_s c0_m A V l)
:precision binary64
(*
c0_s
(if (<= l 4e-309)
(* c0_m (sqrt (* A (/ (/ 1.0 V) l))))
(* c0_m (/ (sqrt (/ A V)) (sqrt l))))))c0\_m = fabs(c0);
c0\_s = copysign(1.0, c0);
assert(c0_m < A && A < V && V < l);
double code(double c0_s, double c0_m, double A, double V, double l) {
double tmp;
if (l <= 4e-309) {
tmp = c0_m * sqrt((A * ((1.0 / V) / l)));
} else {
tmp = c0_m * (sqrt((A / V)) / sqrt(l));
}
return c0_s * tmp;
}
c0\_m = abs(c0)
c0\_s = copysign(1.0d0, c0)
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0_s, c0_m, a, v, l)
real(8), intent (in) :: c0_s
real(8), intent (in) :: c0_m
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
real(8) :: tmp
if (l <= 4d-309) then
tmp = c0_m * sqrt((a * ((1.0d0 / v) / l)))
else
tmp = c0_m * (sqrt((a / v)) / sqrt(l))
end if
code = c0_s * tmp
end function
c0\_m = Math.abs(c0);
c0\_s = Math.copySign(1.0, c0);
assert c0_m < A && A < V && V < l;
public static double code(double c0_s, double c0_m, double A, double V, double l) {
double tmp;
if (l <= 4e-309) {
tmp = c0_m * Math.sqrt((A * ((1.0 / V) / l)));
} else {
tmp = c0_m * (Math.sqrt((A / V)) / Math.sqrt(l));
}
return c0_s * tmp;
}
c0\_m = math.fabs(c0) c0\_s = math.copysign(1.0, c0) [c0_m, A, V, l] = sort([c0_m, A, V, l]) def code(c0_s, c0_m, A, V, l): tmp = 0 if l <= 4e-309: tmp = c0_m * math.sqrt((A * ((1.0 / V) / l))) else: tmp = c0_m * (math.sqrt((A / V)) / math.sqrt(l)) return c0_s * tmp
c0\_m = abs(c0) c0\_s = copysign(1.0, c0) c0_m, A, V, l = sort([c0_m, A, V, l]) function code(c0_s, c0_m, A, V, l) tmp = 0.0 if (l <= 4e-309) tmp = Float64(c0_m * sqrt(Float64(A * Float64(Float64(1.0 / V) / l)))); else tmp = Float64(c0_m * Float64(sqrt(Float64(A / V)) / sqrt(l))); end return Float64(c0_s * tmp) end
c0\_m = abs(c0);
c0\_s = sign(c0) * abs(1.0);
c0_m, A, V, l = num2cell(sort([c0_m, A, V, l])){:}
function tmp_2 = code(c0_s, c0_m, A, V, l)
tmp = 0.0;
if (l <= 4e-309)
tmp = c0_m * sqrt((A * ((1.0 / V) / l)));
else
tmp = c0_m * (sqrt((A / V)) / sqrt(l));
end
tmp_2 = c0_s * tmp;
end
c0\_m = N[Abs[c0], $MachinePrecision]
c0\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c0]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
code[c0$95$s_, c0$95$m_, A_, V_, l_] := N[(c0$95$s * If[LessEqual[l, 4e-309], N[(c0$95$m * N[Sqrt[N[(A * N[(N[(1.0 / V), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0$95$m * N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
c0\_m = \left|c0\right|
\\
c0\_s = \mathsf{copysign}\left(1, c0\right)
\\
[c0_m, A, V, l] = \mathsf{sort}([c0_m, A, V, l])\\
\\
c0\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 4 \cdot 10^{-309}:\\
\;\;\;\;c0\_m \cdot \sqrt{A \cdot \frac{\frac{1}{V}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;c0\_m \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\
\end{array}
\end{array}
if l < 3.9999999999999977e-309Initial program 70.1%
clear-num69.5%
associate-/r/69.6%
associate-/r*69.8%
Applied egg-rr69.8%
if 3.9999999999999977e-309 < l Initial program 75.9%
associate-/r*76.9%
sqrt-div89.6%
div-inv89.6%
Applied egg-rr89.6%
associate-*r/89.6%
*-rgt-identity89.6%
Simplified89.6%
Final simplification79.9%
c0\_m = (fabs.f64 c0)
c0\_s = (copysign.f64 #s(literal 1 binary64) c0)
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0_s c0_m A V l)
:precision binary64
(let* ((t_0 (/ A (* V l))))
(*
c0_s
(if (or (<= t_0 1e-320) (not (<= t_0 2e+297)))
(sqrt (* (/ A V) (* c0_m (/ c0_m l))))
(* c0_m (sqrt t_0))))))c0\_m = fabs(c0);
c0\_s = copysign(1.0, c0);
assert(c0_m < A && A < V && V < l);
double code(double c0_s, double c0_m, double A, double V, double l) {
double t_0 = A / (V * l);
double tmp;
if ((t_0 <= 1e-320) || !(t_0 <= 2e+297)) {
tmp = sqrt(((A / V) * (c0_m * (c0_m / l))));
} else {
tmp = c0_m * sqrt(t_0);
}
return c0_s * tmp;
}
c0\_m = abs(c0)
c0\_s = copysign(1.0d0, c0)
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0_s, c0_m, a, v, l)
real(8), intent (in) :: c0_s
real(8), intent (in) :: c0_m
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-320) .or. (.not. (t_0 <= 2d+297))) then
tmp = sqrt(((a / v) * (c0_m * (c0_m / l))))
else
tmp = c0_m * sqrt(t_0)
end if
code = c0_s * tmp
end function
c0\_m = Math.abs(c0);
c0\_s = Math.copySign(1.0, c0);
assert c0_m < A && A < V && V < l;
public static double code(double c0_s, double c0_m, double A, double V, double l) {
double t_0 = A / (V * l);
double tmp;
if ((t_0 <= 1e-320) || !(t_0 <= 2e+297)) {
tmp = Math.sqrt(((A / V) * (c0_m * (c0_m / l))));
} else {
tmp = c0_m * Math.sqrt(t_0);
}
return c0_s * tmp;
}
c0\_m = math.fabs(c0) c0\_s = math.copysign(1.0, c0) [c0_m, A, V, l] = sort([c0_m, A, V, l]) def code(c0_s, c0_m, A, V, l): t_0 = A / (V * l) tmp = 0 if (t_0 <= 1e-320) or not (t_0 <= 2e+297): tmp = math.sqrt(((A / V) * (c0_m * (c0_m / l)))) else: tmp = c0_m * math.sqrt(t_0) return c0_s * tmp
c0\_m = abs(c0) c0\_s = copysign(1.0, c0) c0_m, A, V, l = sort([c0_m, A, V, l]) function code(c0_s, c0_m, A, V, l) t_0 = Float64(A / Float64(V * l)) tmp = 0.0 if ((t_0 <= 1e-320) || !(t_0 <= 2e+297)) tmp = sqrt(Float64(Float64(A / V) * Float64(c0_m * Float64(c0_m / l)))); else tmp = Float64(c0_m * sqrt(t_0)); end return Float64(c0_s * tmp) end
c0\_m = abs(c0);
c0\_s = sign(c0) * abs(1.0);
c0_m, A, V, l = num2cell(sort([c0_m, A, V, l])){:}
function tmp_2 = code(c0_s, c0_m, A, V, l)
t_0 = A / (V * l);
tmp = 0.0;
if ((t_0 <= 1e-320) || ~((t_0 <= 2e+297)))
tmp = sqrt(((A / V) * (c0_m * (c0_m / l))));
else
tmp = c0_m * sqrt(t_0);
end
tmp_2 = c0_s * tmp;
end
c0\_m = N[Abs[c0], $MachinePrecision]
c0\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c0]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
code[c0$95$s_, c0$95$m_, A_, V_, l_] := Block[{t$95$0 = N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]}, N[(c0$95$s * If[Or[LessEqual[t$95$0, 1e-320], N[Not[LessEqual[t$95$0, 2e+297]], $MachinePrecision]], N[Sqrt[N[(N[(A / V), $MachinePrecision] * N[(c0$95$m * N[(c0$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(c0$95$m * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
c0\_m = \left|c0\right|
\\
c0\_s = \mathsf{copysign}\left(1, c0\right)
\\
[c0_m, A, V, l] = \mathsf{sort}([c0_m, A, V, l])\\
\\
\begin{array}{l}
t_0 := \frac{A}{V \cdot \ell}\\
c0\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq 10^{-320} \lor \neg \left(t\_0 \leq 2 \cdot 10^{+297}\right):\\
\;\;\;\;\sqrt{\frac{A}{V} \cdot \left(c0\_m \cdot \frac{c0\_m}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;c0\_m \cdot \sqrt{t\_0}\\
\end{array}
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 9.99989e-321 or 2e297 < (/.f64 A (*.f64 V l)) Initial program 35.5%
*-commutative35.5%
sqrt-div33.0%
associate-*l/33.1%
Applied egg-rr33.1%
*-commutative33.1%
associate-/l*33.0%
*-rgt-identity33.0%
sqrt-div35.5%
frac-times50.2%
*-commutative50.2%
add-sqr-sqrt21.9%
associate-*r*21.9%
frac-times17.3%
sqrt-div18.2%
*-rgt-identity18.2%
sqrt-div17.3%
Applied egg-rr17.3%
Taylor expanded in A around 0 26.2%
times-frac35.4%
Simplified35.4%
sqrt-unprod45.1%
associate-*l*39.6%
Applied egg-rr39.6%
if 9.99989e-321 < (/.f64 A (*.f64 V l)) < 2e297Initial program 98.8%
Final simplification74.8%
c0\_m = (fabs.f64 c0)
c0\_s = (copysign.f64 #s(literal 1 binary64) c0)
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0_s c0_m A V l)
:precision binary64
(let* ((t_0 (/ A (* V l))))
(*
c0_s
(if (or (<= t_0 1e-320) (not (<= t_0 2e+254)))
(* c0_m (sqrt (/ (/ A V) l)))
(* c0_m (sqrt t_0))))))c0\_m = fabs(c0);
c0\_s = copysign(1.0, c0);
assert(c0_m < A && A < V && V < l);
double code(double c0_s, double c0_m, double A, double V, double l) {
double t_0 = A / (V * l);
double tmp;
if ((t_0 <= 1e-320) || !(t_0 <= 2e+254)) {
tmp = c0_m * sqrt(((A / V) / l));
} else {
tmp = c0_m * sqrt(t_0);
}
return c0_s * tmp;
}
c0\_m = abs(c0)
c0\_s = copysign(1.0d0, c0)
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0_s, c0_m, a, v, l)
real(8), intent (in) :: c0_s
real(8), intent (in) :: c0_m
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-320) .or. (.not. (t_0 <= 2d+254))) then
tmp = c0_m * sqrt(((a / v) / l))
else
tmp = c0_m * sqrt(t_0)
end if
code = c0_s * tmp
end function
c0\_m = Math.abs(c0);
c0\_s = Math.copySign(1.0, c0);
assert c0_m < A && A < V && V < l;
public static double code(double c0_s, double c0_m, double A, double V, double l) {
double t_0 = A / (V * l);
double tmp;
if ((t_0 <= 1e-320) || !(t_0 <= 2e+254)) {
tmp = c0_m * Math.sqrt(((A / V) / l));
} else {
tmp = c0_m * Math.sqrt(t_0);
}
return c0_s * tmp;
}
c0\_m = math.fabs(c0) c0\_s = math.copysign(1.0, c0) [c0_m, A, V, l] = sort([c0_m, A, V, l]) def code(c0_s, c0_m, A, V, l): t_0 = A / (V * l) tmp = 0 if (t_0 <= 1e-320) or not (t_0 <= 2e+254): tmp = c0_m * math.sqrt(((A / V) / l)) else: tmp = c0_m * math.sqrt(t_0) return c0_s * tmp
c0\_m = abs(c0) c0\_s = copysign(1.0, c0) c0_m, A, V, l = sort([c0_m, A, V, l]) function code(c0_s, c0_m, A, V, l) t_0 = Float64(A / Float64(V * l)) tmp = 0.0 if ((t_0 <= 1e-320) || !(t_0 <= 2e+254)) tmp = Float64(c0_m * sqrt(Float64(Float64(A / V) / l))); else tmp = Float64(c0_m * sqrt(t_0)); end return Float64(c0_s * tmp) end
c0\_m = abs(c0);
c0\_s = sign(c0) * abs(1.0);
c0_m, A, V, l = num2cell(sort([c0_m, A, V, l])){:}
function tmp_2 = code(c0_s, c0_m, A, V, l)
t_0 = A / (V * l);
tmp = 0.0;
if ((t_0 <= 1e-320) || ~((t_0 <= 2e+254)))
tmp = c0_m * sqrt(((A / V) / l));
else
tmp = c0_m * sqrt(t_0);
end
tmp_2 = c0_s * tmp;
end
c0\_m = N[Abs[c0], $MachinePrecision]
c0\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c0]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
code[c0$95$s_, c0$95$m_, A_, V_, l_] := Block[{t$95$0 = N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]}, N[(c0$95$s * If[Or[LessEqual[t$95$0, 1e-320], N[Not[LessEqual[t$95$0, 2e+254]], $MachinePrecision]], N[(c0$95$m * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0$95$m * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
c0\_m = \left|c0\right|
\\
c0\_s = \mathsf{copysign}\left(1, c0\right)
\\
[c0_m, A, V, l] = \mathsf{sort}([c0_m, A, V, l])\\
\\
\begin{array}{l}
t_0 := \frac{A}{V \cdot \ell}\\
c0\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq 10^{-320} \lor \neg \left(t\_0 \leq 2 \cdot 10^{+254}\right):\\
\;\;\;\;c0\_m \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;c0\_m \cdot \sqrt{t\_0}\\
\end{array}
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 9.99989e-321 or 1.9999999999999999e254 < (/.f64 A (*.f64 V l)) Initial program 39.5%
associate-/r*53.3%
Simplified53.3%
if 9.99989e-321 < (/.f64 A (*.f64 V l)) < 1.9999999999999999e254Initial program 98.8%
Final simplification79.1%
c0\_m = (fabs.f64 c0) c0\_s = (copysign.f64 #s(literal 1 binary64) c0) NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function. (FPCore (c0_s c0_m A V l) :precision binary64 (* c0_s (* c0_m (sqrt (/ A (* V l))))))
c0\_m = fabs(c0);
c0\_s = copysign(1.0, c0);
assert(c0_m < A && A < V && V < l);
double code(double c0_s, double c0_m, double A, double V, double l) {
return c0_s * (c0_m * sqrt((A / (V * l))));
}
c0\_m = abs(c0)
c0\_s = copysign(1.0d0, c0)
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0_s, c0_m, a, v, l)
real(8), intent (in) :: c0_s
real(8), intent (in) :: c0_m
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
code = c0_s * (c0_m * sqrt((a / (v * l))))
end function
c0\_m = Math.abs(c0);
c0\_s = Math.copySign(1.0, c0);
assert c0_m < A && A < V && V < l;
public static double code(double c0_s, double c0_m, double A, double V, double l) {
return c0_s * (c0_m * Math.sqrt((A / (V * l))));
}
c0\_m = math.fabs(c0) c0\_s = math.copysign(1.0, c0) [c0_m, A, V, l] = sort([c0_m, A, V, l]) def code(c0_s, c0_m, A, V, l): return c0_s * (c0_m * math.sqrt((A / (V * l))))
c0\_m = abs(c0) c0\_s = copysign(1.0, c0) c0_m, A, V, l = sort([c0_m, A, V, l]) function code(c0_s, c0_m, A, V, l) return Float64(c0_s * Float64(c0_m * sqrt(Float64(A / Float64(V * l))))) end
c0\_m = abs(c0);
c0\_s = sign(c0) * abs(1.0);
c0_m, A, V, l = num2cell(sort([c0_m, A, V, l])){:}
function tmp = code(c0_s, c0_m, A, V, l)
tmp = c0_s * (c0_m * sqrt((A / (V * l))));
end
c0\_m = N[Abs[c0], $MachinePrecision]
c0\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c0]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: c0_m, A, V, and l should be sorted in increasing order before calling this function.
code[c0$95$s_, c0$95$m_, A_, V_, l_] := N[(c0$95$s * N[(c0$95$m * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
c0\_m = \left|c0\right|
\\
c0\_s = \mathsf{copysign}\left(1, c0\right)
\\
[c0_m, A, V, l] = \mathsf{sort}([c0_m, A, V, l])\\
\\
c0\_s \cdot \left(c0\_m \cdot \sqrt{\frac{A}{V \cdot \ell}}\right)
\end{array}
Initial program 73.1%
herbie shell --seed 2024118
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))