
(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 15 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))))
(*
c0_s
(if (<= (* V l) -5e-254)
(* c0_m (/ (/ (sqrt (- A)) (sqrt (- V))) (sqrt l)))
(if (<= (* V l) 0.0)
(* c0_m (* (/ 1.0 (sqrt (/ V A))) (/ 1.0 (sqrt l))))
(if (<= (* V l) 5e+294)
(* c0_m (* (pow (* V l) -0.5) (sqrt A)))
(sqrt (* (/ t_0 l) (/ t_0 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);
double tmp;
if ((V * l) <= -5e-254) {
tmp = c0_m * ((sqrt(-A) / sqrt(-V)) / sqrt(l));
} else if ((V * l) <= 0.0) {
tmp = c0_m * ((1.0 / sqrt((V / A))) * (1.0 / sqrt(l)));
} else if ((V * l) <= 5e+294) {
tmp = c0_m * (pow((V * l), -0.5) * sqrt(A));
} else {
tmp = sqrt(((t_0 / l) * (t_0 / 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)
if ((v * l) <= (-5d-254)) then
tmp = c0_m * ((sqrt(-a) / sqrt(-v)) / sqrt(l))
else if ((v * l) <= 0.0d0) then
tmp = c0_m * ((1.0d0 / sqrt((v / a))) * (1.0d0 / sqrt(l)))
else if ((v * l) <= 5d+294) then
tmp = c0_m * (((v * l) ** (-0.5d0)) * sqrt(a))
else
tmp = sqrt(((t_0 / l) * (t_0 / 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);
double tmp;
if ((V * l) <= -5e-254) {
tmp = c0_m * ((Math.sqrt(-A) / Math.sqrt(-V)) / Math.sqrt(l));
} else if ((V * l) <= 0.0) {
tmp = c0_m * ((1.0 / Math.sqrt((V / A))) * (1.0 / Math.sqrt(l)));
} else if ((V * l) <= 5e+294) {
tmp = c0_m * (Math.pow((V * l), -0.5) * Math.sqrt(A));
} else {
tmp = Math.sqrt(((t_0 / l) * (t_0 / 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) tmp = 0 if (V * l) <= -5e-254: tmp = c0_m * ((math.sqrt(-A) / math.sqrt(-V)) / math.sqrt(l)) elif (V * l) <= 0.0: tmp = c0_m * ((1.0 / math.sqrt((V / A))) * (1.0 / math.sqrt(l))) elif (V * l) <= 5e+294: tmp = c0_m * (math.pow((V * l), -0.5) * math.sqrt(A)) else: tmp = math.sqrt(((t_0 / l) * (t_0 / 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(A)) tmp = 0.0 if (Float64(V * l) <= -5e-254) tmp = Float64(c0_m * Float64(Float64(sqrt(Float64(-A)) / sqrt(Float64(-V))) / sqrt(l))); elseif (Float64(V * l) <= 0.0) tmp = Float64(c0_m * Float64(Float64(1.0 / sqrt(Float64(V / A))) * Float64(1.0 / sqrt(l)))); elseif (Float64(V * l) <= 5e+294) tmp = Float64(c0_m * Float64((Float64(V * l) ^ -0.5) * sqrt(A))); else tmp = sqrt(Float64(Float64(t_0 / l) * Float64(t_0 / 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);
tmp = 0.0;
if ((V * l) <= -5e-254)
tmp = c0_m * ((sqrt(-A) / sqrt(-V)) / sqrt(l));
elseif ((V * l) <= 0.0)
tmp = c0_m * ((1.0 / sqrt((V / A))) * (1.0 / sqrt(l)));
elseif ((V * l) <= 5e+294)
tmp = c0_m * (((V * l) ^ -0.5) * sqrt(A));
else
tmp = sqrt(((t_0 / l) * (t_0 / 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[A], $MachinePrecision]), $MachinePrecision]}, N[(c0$95$s * If[LessEqual[N[(V * l), $MachinePrecision], -5e-254], N[(c0$95$m * N[(N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[(-V)], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 0.0], N[(c0$95$m * N[(N[(1.0 / N[Sqrt[N[(V / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 5e+294], N[(c0$95$m * N[(N[Power[N[(V * l), $MachinePrecision], -0.5], $MachinePrecision] * N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(t$95$0 / l), $MachinePrecision] * N[(t$95$0 / 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{A}\\
c0\_s \cdot \begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -5 \cdot 10^{-254}:\\
\;\;\;\;c0\_m \cdot \frac{\frac{\sqrt{-A}}{\sqrt{-V}}}{\sqrt{\ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 0:\\
\;\;\;\;c0\_m \cdot \left(\frac{1}{\sqrt{\frac{V}{A}}} \cdot \frac{1}{\sqrt{\ell}}\right)\\
\mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{+294}:\\
\;\;\;\;c0\_m \cdot \left({\left(V \cdot \ell\right)}^{-0.5} \cdot \sqrt{A}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{t\_0}{\ell} \cdot \frac{t\_0}{V}}\\
\end{array}
\end{array}
\end{array}
if (*.f64 V l) < -5.0000000000000003e-254Initial program 81.6%
associate-/r*73.5%
sqrt-div35.8%
div-inv35.7%
Applied egg-rr35.7%
associate-*r/35.8%
*-rgt-identity35.8%
Simplified35.8%
frac-2neg35.8%
sqrt-div47.5%
Applied egg-rr47.5%
if -5.0000000000000003e-254 < (*.f64 V l) < 0.0Initial program 42.5%
associate-/r*63.6%
sqrt-div44.7%
div-inv44.7%
Applied egg-rr44.7%
clear-num44.8%
sqrt-div46.5%
metadata-eval46.5%
Applied egg-rr46.5%
if 0.0 < (*.f64 V l) < 4.9999999999999999e294Initial program 91.6%
associate-/r*75.6%
div-inv75.5%
Applied egg-rr75.5%
un-div-inv75.6%
associate-/r*91.6%
sqrt-undiv98.4%
div-inv98.3%
*-commutative98.3%
pow1/298.3%
pow-flip98.5%
metadata-eval98.5%
Applied egg-rr98.5%
if 4.9999999999999999e294 < (*.f64 V l) Initial program 36.7%
associate-/r*68.5%
div-inv68.5%
Applied egg-rr68.5%
un-div-inv68.5%
associate-/r*36.7%
sqrt-undiv36.7%
add-sqr-sqrt36.7%
sqrt-unprod36.7%
*-commutative36.7%
*-commutative36.7%
swap-sqr36.1%
frac-times36.1%
add-sqr-sqrt36.1%
add-sqr-sqrt36.1%
pow236.1%
Applied egg-rr36.1%
associate-*l/35.7%
times-frac48.2%
Simplified48.2%
*-commutative48.2%
frac-times35.7%
Applied egg-rr35.7%
unpow235.7%
add-sqr-sqrt35.7%
swap-sqr36.0%
times-frac52.4%
Applied egg-rr52.4%
Final simplification66.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 (or (<= t_0 0.0) (not (<= t_0 5e+192)))
(* c0_m (sqrt (/ (/ A V) l)))
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 = c0_m * sqrt((A / (V * l)));
double tmp;
if ((t_0 <= 0.0) || !(t_0 <= 5e+192)) {
tmp = c0_m * sqrt(((A / V) / l));
} else {
tmp = 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 = c0_m * sqrt((a / (v * l)))
if ((t_0 <= 0.0d0) .or. (.not. (t_0 <= 5d+192))) then
tmp = c0_m * sqrt(((a / v) / l))
else
tmp = 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 = c0_m * Math.sqrt((A / (V * l)));
double tmp;
if ((t_0 <= 0.0) || !(t_0 <= 5e+192)) {
tmp = c0_m * Math.sqrt(((A / V) / l));
} else {
tmp = 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 = c0_m * math.sqrt((A / (V * l))) tmp = 0 if (t_0 <= 0.0) or not (t_0 <= 5e+192): tmp = c0_m * math.sqrt(((A / V) / l)) else: tmp = 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(c0_m * sqrt(Float64(A / Float64(V * l)))) tmp = 0.0 if ((t_0 <= 0.0) || !(t_0 <= 5e+192)) tmp = Float64(c0_m * sqrt(Float64(Float64(A / V) / l))); else tmp = 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 = c0_m * sqrt((A / (V * l)));
tmp = 0.0;
if ((t_0 <= 0.0) || ~((t_0 <= 5e+192)))
tmp = c0_m * sqrt(((A / V) / l));
else
tmp = 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[(c0$95$m * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, N[(c0$95$s * If[Or[LessEqual[t$95$0, 0.0], N[Not[LessEqual[t$95$0, 5e+192]], $MachinePrecision]], N[(c0$95$m * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$0]), $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 \lor \neg \left(t\_0 \leq 5 \cdot 10^{+192}\right):\\
\;\;\;\;c0\_m \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 0.0 or 5.00000000000000033e192 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 65.8%
associate-/r*71.8%
Simplified71.8%
if 0.0 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 5.00000000000000033e192Initial program 98.6%
Final simplification80.7%
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 5e+230) 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 <= 5e+230) {
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 <= 5d+230) 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 <= 5e+230) {
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 <= 5e+230: 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 <= 5e+230) 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 <= 5e+230)
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, 5e+230], 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 5 \cdot 10^{+230}:\\
\;\;\;\;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.4%
associate-/r*72.7%
Simplified72.7%
if 0.0 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 5.0000000000000003e230Initial program 98.7%
if 5.0000000000000003e230 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 53.2%
associate-/r*66.3%
div-inv66.3%
Applied egg-rr66.3%
associate-*l/66.2%
div-inv66.3%
Applied egg-rr66.3%
Final simplification81.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
(let* ((t_0 (* c0_m (sqrt (/ A (* V l))))))
(*
c0_s
(if (<= t_0 0.0)
(/ c0_m (sqrt (* V (/ l A))))
(if (<= t_0 5e+230) 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((V * (l / A)));
} else if (t_0 <= 5e+230) {
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((v * (l / a)))
else if (t_0 <= 5d+230) 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((V * (l / A)));
} else if (t_0 <= 5e+230) {
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((V * (l / A))) elif t_0 <= 5e+230: 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(V * Float64(l / A)))); elseif (t_0 <= 5e+230) 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((V * (l / A)));
elseif (t_0 <= 5e+230)
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[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+230], 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:\\
\;\;\;\;\frac{c0\_m}{\sqrt{V \cdot \frac{\ell}{A}}}\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+230}:\\
\;\;\;\;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.4%
associate-/r*72.7%
div-inv72.6%
Applied egg-rr72.6%
un-div-inv72.7%
associate-/r*67.4%
sqrt-undiv36.8%
clear-num36.8%
un-div-inv36.8%
sqrt-undiv67.4%
associate-/l*74.3%
Applied egg-rr74.3%
if 0.0 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 5.0000000000000003e230Initial program 98.7%
if 5.0000000000000003e230 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 53.2%
associate-/r*66.3%
div-inv66.3%
Applied egg-rr66.3%
associate-*l/66.2%
div-inv66.3%
Applied egg-rr66.3%
Final simplification81.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 0.0)
(/ c0_m (sqrt (* V (/ l A))))
(if (<= t_0 5e+230) t_0 (/ c0_m (sqrt (* l (/ V 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((V * (l / A)));
} else if (t_0 <= 5e+230) {
tmp = t_0;
} else {
tmp = c0_m / sqrt((l * (V / 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((v * (l / a)))
else if (t_0 <= 5d+230) then
tmp = t_0
else
tmp = c0_m / sqrt((l * (v / 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((V * (l / A)));
} else if (t_0 <= 5e+230) {
tmp = t_0;
} else {
tmp = c0_m / Math.sqrt((l * (V / 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((V * (l / A))) elif t_0 <= 5e+230: tmp = t_0 else: tmp = c0_m / math.sqrt((l * (V / 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(V * Float64(l / A)))); elseif (t_0 <= 5e+230) tmp = t_0; else tmp = Float64(c0_m / sqrt(Float64(l * Float64(V / 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((V * (l / A)));
elseif (t_0 <= 5e+230)
tmp = t_0;
else
tmp = c0_m / sqrt((l * (V / 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[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+230], t$95$0, N[(c0$95$m / N[Sqrt[N[(l * N[(V / 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:\\
\;\;\;\;\frac{c0\_m}{\sqrt{V \cdot \frac{\ell}{A}}}\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+230}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{c0\_m}{\sqrt{\ell \cdot \frac{V}{A}}}\\
\end{array}
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 0.0Initial program 67.4%
associate-/r*72.7%
div-inv72.6%
Applied egg-rr72.6%
un-div-inv72.7%
associate-/r*67.4%
sqrt-undiv36.8%
clear-num36.8%
un-div-inv36.8%
sqrt-undiv67.4%
associate-/l*74.3%
Applied egg-rr74.3%
if 0.0 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 5.0000000000000003e230Initial program 98.7%
if 5.0000000000000003e230 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 53.2%
associate-/r*66.3%
div-inv66.3%
Applied egg-rr66.3%
un-div-inv66.3%
associate-/r*53.2%
sqrt-undiv25.4%
clear-num25.4%
un-div-inv25.4%
sqrt-undiv53.1%
associate-/l*66.2%
Applied egg-rr66.2%
associate-*r/53.1%
associate-*l/66.1%
*-commutative66.1%
Simplified66.1%
Final simplification81.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 0.0)
(/ c0_m (sqrt (* V (/ l A))))
(if (<= t_0 5e+240) t_0 (/ 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 / (V * l)));
double tmp;
if (t_0 <= 0.0) {
tmp = c0_m / sqrt((V * (l / A)));
} else if (t_0 <= 5e+240) {
tmp = t_0;
} 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) :: t_0
real(8) :: tmp
t_0 = c0_m * sqrt((a / (v * l)))
if (t_0 <= 0.0d0) then
tmp = c0_m / sqrt((v * (l / a)))
else if (t_0 <= 5d+240) then
tmp = t_0
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 t_0 = c0_m * Math.sqrt((A / (V * l)));
double tmp;
if (t_0 <= 0.0) {
tmp = c0_m / Math.sqrt((V * (l / A)));
} else if (t_0 <= 5e+240) {
tmp = t_0;
} 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 / (V * l))) tmp = 0 if t_0 <= 0.0: tmp = c0_m / math.sqrt((V * (l / A))) elif t_0 <= 5e+240: tmp = t_0 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 * sqrt(Float64(A / Float64(V * l)))) tmp = 0.0 if (t_0 <= 0.0) tmp = Float64(c0_m / sqrt(Float64(V * Float64(l / A)))); elseif (t_0 <= 5e+240) tmp = t_0; 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 / (V * l)));
tmp = 0.0;
if (t_0 <= 0.0)
tmp = c0_m / sqrt((V * (l / A)));
elseif (t_0 <= 5e+240)
tmp = t_0;
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[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[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+240], t$95$0, 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 \sqrt{\frac{A}{V \cdot \ell}}\\
c0\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;\frac{c0\_m}{\sqrt{V \cdot \frac{\ell}{A}}}\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+240}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{c0\_m}{\sqrt{\frac{\ell}{\frac{A}{V}}}}\\
\end{array}
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 0.0Initial program 67.4%
associate-/r*72.7%
div-inv72.6%
Applied egg-rr72.6%
un-div-inv72.7%
associate-/r*67.4%
sqrt-undiv36.8%
clear-num36.8%
un-div-inv36.8%
sqrt-undiv67.4%
associate-/l*74.3%
Applied egg-rr74.3%
if 0.0 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 5.0000000000000003e240Initial program 98.7%
if 5.0000000000000003e240 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 50.0%
associate-/r*64.0%
div-inv64.0%
Applied egg-rr64.0%
un-div-inv64.0%
associate-/r*50.0%
sqrt-undiv23.8%
clear-num23.8%
un-div-inv23.8%
sqrt-undiv49.9%
associate-/l*63.9%
Applied egg-rr63.9%
*-commutative63.9%
associate-/r/64.0%
Simplified64.0%
Final simplification81.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 (<= (* V l) -5e-254)
(* c0_m (/ (/ (sqrt (- A)) (sqrt (- V))) (sqrt l)))
(if (<= (* V l) 0.0)
(* c0_m (* (/ 1.0 (sqrt (/ V A))) (/ 1.0 (sqrt l))))
(if (<= (* V l) 5e+294)
(* c0_m (* (pow (* V l) -0.5) (sqrt A)))
(/ c0_m (sqrt (/ V (/ A 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 ((V * l) <= -5e-254) {
tmp = c0_m * ((sqrt(-A) / sqrt(-V)) / sqrt(l));
} else if ((V * l) <= 0.0) {
tmp = c0_m * ((1.0 / sqrt((V / A))) * (1.0 / sqrt(l)));
} else if ((V * l) <= 5e+294) {
tmp = c0_m * (pow((V * l), -0.5) * sqrt(A));
} else {
tmp = c0_m / sqrt((V / (A / 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 ((v * l) <= (-5d-254)) then
tmp = c0_m * ((sqrt(-a) / sqrt(-v)) / sqrt(l))
else if ((v * l) <= 0.0d0) then
tmp = c0_m * ((1.0d0 / sqrt((v / a))) * (1.0d0 / sqrt(l)))
else if ((v * l) <= 5d+294) then
tmp = c0_m * (((v * l) ** (-0.5d0)) * sqrt(a))
else
tmp = c0_m / sqrt((v / (a / 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 ((V * l) <= -5e-254) {
tmp = c0_m * ((Math.sqrt(-A) / Math.sqrt(-V)) / Math.sqrt(l));
} else if ((V * l) <= 0.0) {
tmp = c0_m * ((1.0 / Math.sqrt((V / A))) * (1.0 / Math.sqrt(l)));
} else if ((V * l) <= 5e+294) {
tmp = c0_m * (Math.pow((V * l), -0.5) * Math.sqrt(A));
} else {
tmp = c0_m / Math.sqrt((V / (A / 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 (V * l) <= -5e-254: tmp = c0_m * ((math.sqrt(-A) / math.sqrt(-V)) / math.sqrt(l)) elif (V * l) <= 0.0: tmp = c0_m * ((1.0 / math.sqrt((V / A))) * (1.0 / math.sqrt(l))) elif (V * l) <= 5e+294: tmp = c0_m * (math.pow((V * l), -0.5) * math.sqrt(A)) else: tmp = c0_m / math.sqrt((V / (A / 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 (Float64(V * l) <= -5e-254) tmp = Float64(c0_m * Float64(Float64(sqrt(Float64(-A)) / sqrt(Float64(-V))) / sqrt(l))); elseif (Float64(V * l) <= 0.0) tmp = Float64(c0_m * Float64(Float64(1.0 / sqrt(Float64(V / A))) * Float64(1.0 / sqrt(l)))); elseif (Float64(V * l) <= 5e+294) tmp = Float64(c0_m * Float64((Float64(V * l) ^ -0.5) * sqrt(A))); else tmp = Float64(c0_m / sqrt(Float64(V / Float64(A / 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 ((V * l) <= -5e-254)
tmp = c0_m * ((sqrt(-A) / sqrt(-V)) / sqrt(l));
elseif ((V * l) <= 0.0)
tmp = c0_m * ((1.0 / sqrt((V / A))) * (1.0 / sqrt(l)));
elseif ((V * l) <= 5e+294)
tmp = c0_m * (((V * l) ^ -0.5) * sqrt(A));
else
tmp = c0_m / sqrt((V / (A / 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[N[(V * l), $MachinePrecision], -5e-254], N[(c0$95$m * N[(N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[(-V)], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 0.0], N[(c0$95$m * N[(N[(1.0 / N[Sqrt[N[(V / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 5e+294], N[(c0$95$m * N[(N[Power[N[(V * l), $MachinePrecision], -0.5], $MachinePrecision] * N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0$95$m / N[Sqrt[N[(V / N[(A / 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 \begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -5 \cdot 10^{-254}:\\
\;\;\;\;c0\_m \cdot \frac{\frac{\sqrt{-A}}{\sqrt{-V}}}{\sqrt{\ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 0:\\
\;\;\;\;c0\_m \cdot \left(\frac{1}{\sqrt{\frac{V}{A}}} \cdot \frac{1}{\sqrt{\ell}}\right)\\
\mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{+294}:\\
\;\;\;\;c0\_m \cdot \left({\left(V \cdot \ell\right)}^{-0.5} \cdot \sqrt{A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{c0\_m}{\sqrt{\frac{V}{\frac{A}{\ell}}}}\\
\end{array}
\end{array}
if (*.f64 V l) < -5.0000000000000003e-254Initial program 81.6%
associate-/r*73.5%
sqrt-div35.8%
div-inv35.7%
Applied egg-rr35.7%
associate-*r/35.8%
*-rgt-identity35.8%
Simplified35.8%
frac-2neg35.8%
sqrt-div47.5%
Applied egg-rr47.5%
if -5.0000000000000003e-254 < (*.f64 V l) < 0.0Initial program 42.5%
associate-/r*63.6%
sqrt-div44.7%
div-inv44.7%
Applied egg-rr44.7%
clear-num44.8%
sqrt-div46.5%
metadata-eval46.5%
Applied egg-rr46.5%
if 0.0 < (*.f64 V l) < 4.9999999999999999e294Initial program 91.6%
associate-/r*75.6%
div-inv75.5%
Applied egg-rr75.5%
un-div-inv75.6%
associate-/r*91.6%
sqrt-undiv98.4%
div-inv98.3%
*-commutative98.3%
pow1/298.3%
pow-flip98.5%
metadata-eval98.5%
Applied egg-rr98.5%
if 4.9999999999999999e294 < (*.f64 V l) Initial program 36.7%
associate-/r*68.5%
div-inv68.5%
Applied egg-rr68.5%
un-div-inv68.5%
associate-/r*36.7%
sqrt-undiv36.7%
clear-num36.7%
un-div-inv36.7%
sqrt-undiv36.7%
associate-/l*68.7%
Applied egg-rr68.7%
associate-*r/36.7%
associate-*l/68.7%
*-commutative68.7%
Simplified68.7%
/-rgt-identity68.7%
clear-num68.7%
frac-2neg68.7%
times-frac68.7%
*-un-lft-identity68.7%
neg-mul-168.7%
*-commutative68.7%
times-frac36.7%
metadata-eval36.7%
frac-2neg36.7%
times-frac68.7%
*-un-lft-identity68.7%
div-inv68.6%
Applied egg-rr68.6%
Final simplification68.5%
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) -4e+238)
(* c0_m (/ (sqrt (/ A V)) (sqrt l)))
(if (<= (* V l) -1e-235)
(* c0_m (/ (sqrt (- A)) (sqrt (* l (- V)))))
(if (<= (* V l) 0.0)
(/ (/ c0_m (sqrt l)) (sqrt (/ V A)))
(if (<= (* V l) 5e+294)
(* c0_m (* (pow (* V l) -0.5) (sqrt A)))
(/ c0_m (sqrt (/ V (/ A 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 ((V * l) <= -4e+238) {
tmp = c0_m * (sqrt((A / V)) / sqrt(l));
} else if ((V * l) <= -1e-235) {
tmp = c0_m * (sqrt(-A) / sqrt((l * -V)));
} else if ((V * l) <= 0.0) {
tmp = (c0_m / sqrt(l)) / sqrt((V / A));
} else if ((V * l) <= 5e+294) {
tmp = c0_m * (pow((V * l), -0.5) * sqrt(A));
} else {
tmp = c0_m / sqrt((V / (A / 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 ((v * l) <= (-4d+238)) then
tmp = c0_m * (sqrt((a / v)) / sqrt(l))
else if ((v * l) <= (-1d-235)) then
tmp = c0_m * (sqrt(-a) / sqrt((l * -v)))
else if ((v * l) <= 0.0d0) then
tmp = (c0_m / sqrt(l)) / sqrt((v / a))
else if ((v * l) <= 5d+294) then
tmp = c0_m * (((v * l) ** (-0.5d0)) * sqrt(a))
else
tmp = c0_m / sqrt((v / (a / 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 ((V * l) <= -4e+238) {
tmp = c0_m * (Math.sqrt((A / V)) / Math.sqrt(l));
} else if ((V * l) <= -1e-235) {
tmp = c0_m * (Math.sqrt(-A) / Math.sqrt((l * -V)));
} else if ((V * l) <= 0.0) {
tmp = (c0_m / Math.sqrt(l)) / Math.sqrt((V / A));
} else if ((V * l) <= 5e+294) {
tmp = c0_m * (Math.pow((V * l), -0.5) * Math.sqrt(A));
} else {
tmp = c0_m / Math.sqrt((V / (A / 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 (V * l) <= -4e+238: tmp = c0_m * (math.sqrt((A / V)) / math.sqrt(l)) elif (V * l) <= -1e-235: tmp = c0_m * (math.sqrt(-A) / math.sqrt((l * -V))) elif (V * l) <= 0.0: tmp = (c0_m / math.sqrt(l)) / math.sqrt((V / A)) elif (V * l) <= 5e+294: tmp = c0_m * (math.pow((V * l), -0.5) * math.sqrt(A)) else: tmp = c0_m / math.sqrt((V / (A / 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 (Float64(V * l) <= -4e+238) tmp = Float64(c0_m * Float64(sqrt(Float64(A / V)) / sqrt(l))); elseif (Float64(V * l) <= -1e-235) tmp = Float64(c0_m * Float64(sqrt(Float64(-A)) / sqrt(Float64(l * Float64(-V))))); elseif (Float64(V * l) <= 0.0) tmp = Float64(Float64(c0_m / sqrt(l)) / sqrt(Float64(V / A))); elseif (Float64(V * l) <= 5e+294) tmp = Float64(c0_m * Float64((Float64(V * l) ^ -0.5) * sqrt(A))); else tmp = Float64(c0_m / sqrt(Float64(V / Float64(A / 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 ((V * l) <= -4e+238)
tmp = c0_m * (sqrt((A / V)) / sqrt(l));
elseif ((V * l) <= -1e-235)
tmp = c0_m * (sqrt(-A) / sqrt((l * -V)));
elseif ((V * l) <= 0.0)
tmp = (c0_m / sqrt(l)) / sqrt((V / A));
elseif ((V * l) <= 5e+294)
tmp = c0_m * (((V * l) ^ -0.5) * sqrt(A));
else
tmp = c0_m / sqrt((V / (A / 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[N[(V * l), $MachinePrecision], -4e+238], N[(c0$95$m * N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -1e-235], N[(c0$95$m * N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[N[(l * (-V)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 0.0], N[(N[(c0$95$m / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(V / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 5e+294], N[(c0$95$m * N[(N[Power[N[(V * l), $MachinePrecision], -0.5], $MachinePrecision] * N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0$95$m / N[Sqrt[N[(V / N[(A / 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 \begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -4 \cdot 10^{+238}:\\
\;\;\;\;c0\_m \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\
\mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-235}:\\
\;\;\;\;c0\_m \cdot \frac{\sqrt{-A}}{\sqrt{\ell \cdot \left(-V\right)}}\\
\mathbf{elif}\;V \cdot \ell \leq 0:\\
\;\;\;\;\frac{\frac{c0\_m}{\sqrt{\ell}}}{\sqrt{\frac{V}{A}}}\\
\mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{+294}:\\
\;\;\;\;c0\_m \cdot \left({\left(V \cdot \ell\right)}^{-0.5} \cdot \sqrt{A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{c0\_m}{\sqrt{\frac{V}{\frac{A}{\ell}}}}\\
\end{array}
\end{array}
if (*.f64 V l) < -4.0000000000000002e238Initial program 58.9%
associate-/r*72.2%
sqrt-div32.4%
div-inv32.3%
Applied egg-rr32.3%
associate-*r/32.4%
*-rgt-identity32.4%
Simplified32.4%
if -4.0000000000000002e238 < (*.f64 V l) < -9.9999999999999996e-236Initial program 87.1%
frac-2neg87.1%
sqrt-div99.5%
distribute-rgt-neg-in99.5%
Applied egg-rr99.5%
distribute-rgt-neg-out99.5%
*-commutative99.5%
distribute-rgt-neg-in99.5%
Simplified99.5%
if -9.9999999999999996e-236 < (*.f64 V l) < 0.0Initial program 46.2%
associate-/r*62.8%
div-inv62.8%
Applied egg-rr62.8%
un-div-inv62.8%
associate-/r*46.2%
sqrt-undiv7.2%
clear-num7.2%
un-div-inv7.2%
sqrt-undiv46.2%
associate-/l*66.0%
Applied egg-rr66.0%
associate-*r/46.2%
associate-*l/64.4%
*-commutative64.4%
Simplified64.4%
add-cbrt-cube31.6%
unpow231.6%
cbrt-prod42.6%
sqrt-prod28.2%
times-frac28.2%
unpow228.2%
cbrt-prod42.9%
pow242.9%
Applied egg-rr42.9%
associate-*r/40.0%
associate-*l/40.1%
unpow240.1%
rem-3cbrt-lft40.6%
Simplified40.6%
if 0.0 < (*.f64 V l) < 4.9999999999999999e294Initial program 91.6%
associate-/r*75.6%
div-inv75.5%
Applied egg-rr75.5%
un-div-inv75.6%
associate-/r*91.6%
sqrt-undiv98.4%
div-inv98.3%
*-commutative98.3%
pow1/298.3%
pow-flip98.5%
metadata-eval98.5%
Applied egg-rr98.5%
if 4.9999999999999999e294 < (*.f64 V l) Initial program 36.7%
associate-/r*68.5%
div-inv68.5%
Applied egg-rr68.5%
un-div-inv68.5%
associate-/r*36.7%
sqrt-undiv36.7%
clear-num36.7%
un-div-inv36.7%
sqrt-undiv36.7%
associate-/l*68.7%
Applied egg-rr68.7%
associate-*r/36.7%
associate-*l/68.7%
*-commutative68.7%
Simplified68.7%
/-rgt-identity68.7%
clear-num68.7%
frac-2neg68.7%
times-frac68.7%
*-un-lft-identity68.7%
neg-mul-168.7%
*-commutative68.7%
times-frac36.7%
metadata-eval36.7%
frac-2neg36.7%
times-frac68.7%
*-un-lft-identity68.7%
div-inv68.6%
Applied egg-rr68.6%
Final simplification83.3%
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) -4e+238)
(* c0_m (/ (sqrt (/ A V)) (sqrt l)))
(if (<= (* V l) -5e-254)
(* c0_m (/ (sqrt (- A)) (sqrt (* l (- V)))))
(if (<= (* V l) 0.0)
(* c0_m (* (/ 1.0 (sqrt (/ V A))) (/ 1.0 (sqrt l))))
(if (<= (* V l) 5e+294)
(* c0_m (* (pow (* V l) -0.5) (sqrt A)))
(/ c0_m (sqrt (/ V (/ A 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 ((V * l) <= -4e+238) {
tmp = c0_m * (sqrt((A / V)) / sqrt(l));
} else if ((V * l) <= -5e-254) {
tmp = c0_m * (sqrt(-A) / sqrt((l * -V)));
} else if ((V * l) <= 0.0) {
tmp = c0_m * ((1.0 / sqrt((V / A))) * (1.0 / sqrt(l)));
} else if ((V * l) <= 5e+294) {
tmp = c0_m * (pow((V * l), -0.5) * sqrt(A));
} else {
tmp = c0_m / sqrt((V / (A / 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 ((v * l) <= (-4d+238)) then
tmp = c0_m * (sqrt((a / v)) / sqrt(l))
else if ((v * l) <= (-5d-254)) then
tmp = c0_m * (sqrt(-a) / sqrt((l * -v)))
else if ((v * l) <= 0.0d0) then
tmp = c0_m * ((1.0d0 / sqrt((v / a))) * (1.0d0 / sqrt(l)))
else if ((v * l) <= 5d+294) then
tmp = c0_m * (((v * l) ** (-0.5d0)) * sqrt(a))
else
tmp = c0_m / sqrt((v / (a / 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 ((V * l) <= -4e+238) {
tmp = c0_m * (Math.sqrt((A / V)) / Math.sqrt(l));
} else if ((V * l) <= -5e-254) {
tmp = c0_m * (Math.sqrt(-A) / Math.sqrt((l * -V)));
} else if ((V * l) <= 0.0) {
tmp = c0_m * ((1.0 / Math.sqrt((V / A))) * (1.0 / Math.sqrt(l)));
} else if ((V * l) <= 5e+294) {
tmp = c0_m * (Math.pow((V * l), -0.5) * Math.sqrt(A));
} else {
tmp = c0_m / Math.sqrt((V / (A / 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 (V * l) <= -4e+238: tmp = c0_m * (math.sqrt((A / V)) / math.sqrt(l)) elif (V * l) <= -5e-254: tmp = c0_m * (math.sqrt(-A) / math.sqrt((l * -V))) elif (V * l) <= 0.0: tmp = c0_m * ((1.0 / math.sqrt((V / A))) * (1.0 / math.sqrt(l))) elif (V * l) <= 5e+294: tmp = c0_m * (math.pow((V * l), -0.5) * math.sqrt(A)) else: tmp = c0_m / math.sqrt((V / (A / 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 (Float64(V * l) <= -4e+238) tmp = Float64(c0_m * Float64(sqrt(Float64(A / V)) / sqrt(l))); elseif (Float64(V * l) <= -5e-254) tmp = Float64(c0_m * Float64(sqrt(Float64(-A)) / sqrt(Float64(l * Float64(-V))))); elseif (Float64(V * l) <= 0.0) tmp = Float64(c0_m * Float64(Float64(1.0 / sqrt(Float64(V / A))) * Float64(1.0 / sqrt(l)))); elseif (Float64(V * l) <= 5e+294) tmp = Float64(c0_m * Float64((Float64(V * l) ^ -0.5) * sqrt(A))); else tmp = Float64(c0_m / sqrt(Float64(V / Float64(A / 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 ((V * l) <= -4e+238)
tmp = c0_m * (sqrt((A / V)) / sqrt(l));
elseif ((V * l) <= -5e-254)
tmp = c0_m * (sqrt(-A) / sqrt((l * -V)));
elseif ((V * l) <= 0.0)
tmp = c0_m * ((1.0 / sqrt((V / A))) * (1.0 / sqrt(l)));
elseif ((V * l) <= 5e+294)
tmp = c0_m * (((V * l) ^ -0.5) * sqrt(A));
else
tmp = c0_m / sqrt((V / (A / 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[N[(V * l), $MachinePrecision], -4e+238], N[(c0$95$m * N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -5e-254], N[(c0$95$m * N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[N[(l * (-V)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 0.0], N[(c0$95$m * N[(N[(1.0 / N[Sqrt[N[(V / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 5e+294], N[(c0$95$m * N[(N[Power[N[(V * l), $MachinePrecision], -0.5], $MachinePrecision] * N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0$95$m / N[Sqrt[N[(V / N[(A / 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 \begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -4 \cdot 10^{+238}:\\
\;\;\;\;c0\_m \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\
\mathbf{elif}\;V \cdot \ell \leq -5 \cdot 10^{-254}:\\
\;\;\;\;c0\_m \cdot \frac{\sqrt{-A}}{\sqrt{\ell \cdot \left(-V\right)}}\\
\mathbf{elif}\;V \cdot \ell \leq 0:\\
\;\;\;\;c0\_m \cdot \left(\frac{1}{\sqrt{\frac{V}{A}}} \cdot \frac{1}{\sqrt{\ell}}\right)\\
\mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{+294}:\\
\;\;\;\;c0\_m \cdot \left({\left(V \cdot \ell\right)}^{-0.5} \cdot \sqrt{A}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{c0\_m}{\sqrt{\frac{V}{\frac{A}{\ell}}}}\\
\end{array}
\end{array}
if (*.f64 V l) < -4.0000000000000002e238Initial program 58.9%
associate-/r*72.2%
sqrt-div32.4%
div-inv32.3%
Applied egg-rr32.3%
associate-*r/32.4%
*-rgt-identity32.4%
Simplified32.4%
if -4.0000000000000002e238 < (*.f64 V l) < -5.0000000000000003e-254Initial program 87.4%
frac-2neg87.4%
sqrt-div99.4%
distribute-rgt-neg-in99.4%
Applied egg-rr99.4%
distribute-rgt-neg-out99.4%
*-commutative99.4%
distribute-rgt-neg-in99.4%
Simplified99.4%
if -5.0000000000000003e-254 < (*.f64 V l) < 0.0Initial program 42.5%
associate-/r*63.6%
sqrt-div44.7%
div-inv44.7%
Applied egg-rr44.7%
clear-num44.8%
sqrt-div46.5%
metadata-eval46.5%
Applied egg-rr46.5%
if 0.0 < (*.f64 V l) < 4.9999999999999999e294Initial program 91.6%
associate-/r*75.6%
div-inv75.5%
Applied egg-rr75.5%
un-div-inv75.6%
associate-/r*91.6%
sqrt-undiv98.4%
div-inv98.3%
*-commutative98.3%
pow1/298.3%
pow-flip98.5%
metadata-eval98.5%
Applied egg-rr98.5%
if 4.9999999999999999e294 < (*.f64 V l) Initial program 36.7%
associate-/r*68.5%
div-inv68.5%
Applied egg-rr68.5%
un-div-inv68.5%
associate-/r*36.7%
sqrt-undiv36.7%
clear-num36.7%
un-div-inv36.7%
sqrt-undiv36.7%
associate-/l*68.7%
Applied egg-rr68.7%
associate-*r/36.7%
associate-*l/68.7%
*-commutative68.7%
Simplified68.7%
/-rgt-identity68.7%
clear-num68.7%
frac-2neg68.7%
times-frac68.7%
*-un-lft-identity68.7%
neg-mul-168.7%
*-commutative68.7%
times-frac36.7%
metadata-eval36.7%
frac-2neg36.7%
times-frac68.7%
*-un-lft-identity68.7%
div-inv68.6%
Applied egg-rr68.6%
Final simplification84.4%
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 (* (pow (* V l) -0.5) (sqrt A)))
(* c0_m (* (sqrt (/ A V)) (sqrt (/ 1.0 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 * (pow((V * l), -0.5) * sqrt(A));
} else {
tmp = c0_m * (sqrt((A / V)) * sqrt((1.0 / 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 * (((v * l) ** (-0.5d0)) * sqrt(a))
else
tmp = c0_m * (sqrt((a / v)) * sqrt((1.0d0 / 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.pow((V * l), -0.5) * Math.sqrt(A));
} else {
tmp = c0_m * (Math.sqrt((A / V)) * Math.sqrt((1.0 / 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.pow((V * l), -0.5) * math.sqrt(A)) else: tmp = c0_m * (math.sqrt((A / V)) * math.sqrt((1.0 / 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((Float64(V * l) ^ -0.5) * sqrt(A))); else tmp = Float64(c0_m * Float64(sqrt(Float64(A / V)) * sqrt(Float64(1.0 / 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 * (((V * l) ^ -0.5) * sqrt(A));
else
tmp = c0_m * (sqrt((A / V)) * sqrt((1.0 / 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[Power[N[(V * l), $MachinePrecision], -0.5], $MachinePrecision] * N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0$95$m * N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(1.0 / 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 \begin{array}{l}
\mathbf{if}\;\ell \leq -5 \cdot 10^{-310}:\\
\;\;\;\;c0\_m \cdot \left({\left(V \cdot \ell\right)}^{-0.5} \cdot \sqrt{A}\right)\\
\mathbf{else}:\\
\;\;\;\;c0\_m \cdot \left(\sqrt{\frac{A}{V}} \cdot \sqrt{\frac{1}{\ell}}\right)\\
\end{array}
\end{array}
if l < -4.999999999999985e-310Initial program 78.3%
associate-/r*73.0%
div-inv72.9%
Applied egg-rr72.9%
un-div-inv73.0%
associate-/r*78.3%
sqrt-undiv44.9%
div-inv44.9%
*-commutative44.9%
pow1/244.9%
pow-flip44.9%
metadata-eval44.9%
Applied egg-rr44.9%
if -4.999999999999985e-310 < l Initial program 74.7%
pow1/274.7%
associate-/r*72.3%
div-inv72.3%
unpow-prod-down81.1%
pow1/281.1%
Applied egg-rr81.1%
unpow1/281.1%
Simplified81.1%
Final simplification61.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
(*
c0_s
(if (<= l -5e-310)
(* c0_m (/ (sqrt A) (sqrt (* V l))))
(* c0_m (* (sqrt (/ A V)) (pow l -0.5))))))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) / sqrt((V * l)));
} else {
tmp = c0_m * (sqrt((A / V)) * pow(l, -0.5));
}
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) / sqrt((v * l)))
else
tmp = c0_m * (sqrt((a / v)) * (l ** (-0.5d0)))
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) / Math.sqrt((V * l)));
} else {
tmp = c0_m * (Math.sqrt((A / V)) * Math.pow(l, -0.5));
}
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) / math.sqrt((V * l))) else: tmp = c0_m * (math.sqrt((A / V)) * math.pow(l, -0.5)) 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(A) / sqrt(Float64(V * l)))); else tmp = Float64(c0_m * Float64(sqrt(Float64(A / V)) * (l ^ -0.5))); 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) / sqrt((V * l)));
else
tmp = c0_m * (sqrt((A / V)) * (l ^ -0.5));
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[A], $MachinePrecision] / N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0$95$m * N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] * N[Power[l, -0.5], $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{A}}{\sqrt{V \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;c0\_m \cdot \left(\sqrt{\frac{A}{V}} \cdot {\ell}^{-0.5}\right)\\
\end{array}
\end{array}
if l < -4.999999999999985e-310Initial program 78.3%
sqrt-div44.9%
div-inv44.9%
Applied egg-rr44.9%
associate-*r/44.9%
*-rgt-identity44.9%
Simplified44.9%
if -4.999999999999985e-310 < l Initial program 74.7%
associate-/r*72.3%
div-inv72.3%
Applied egg-rr72.3%
*-commutative72.3%
sqrt-prod81.1%
inv-pow81.1%
sqrt-pow181.1%
metadata-eval81.1%
Applied egg-rr81.1%
Final simplification61.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
(*
c0_s
(if (<= l -5e-310)
(* c0_m (* (pow (* V l) -0.5) (sqrt A)))
(* c0_m (* (sqrt (/ A V)) (pow l -0.5))))))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 * (pow((V * l), -0.5) * sqrt(A));
} else {
tmp = c0_m * (sqrt((A / V)) * pow(l, -0.5));
}
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 * (((v * l) ** (-0.5d0)) * sqrt(a))
else
tmp = c0_m * (sqrt((a / v)) * (l ** (-0.5d0)))
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.pow((V * l), -0.5) * Math.sqrt(A));
} else {
tmp = c0_m * (Math.sqrt((A / V)) * Math.pow(l, -0.5));
}
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.pow((V * l), -0.5) * math.sqrt(A)) else: tmp = c0_m * (math.sqrt((A / V)) * math.pow(l, -0.5)) 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((Float64(V * l) ^ -0.5) * sqrt(A))); else tmp = Float64(c0_m * Float64(sqrt(Float64(A / V)) * (l ^ -0.5))); 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 * (((V * l) ^ -0.5) * sqrt(A));
else
tmp = c0_m * (sqrt((A / V)) * (l ^ -0.5));
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[Power[N[(V * l), $MachinePrecision], -0.5], $MachinePrecision] * N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0$95$m * N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] * N[Power[l, -0.5], $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 \left({\left(V \cdot \ell\right)}^{-0.5} \cdot \sqrt{A}\right)\\
\mathbf{else}:\\
\;\;\;\;c0\_m \cdot \left(\sqrt{\frac{A}{V}} \cdot {\ell}^{-0.5}\right)\\
\end{array}
\end{array}
if l < -4.999999999999985e-310Initial program 78.3%
associate-/r*73.0%
div-inv72.9%
Applied egg-rr72.9%
un-div-inv73.0%
associate-/r*78.3%
sqrt-undiv44.9%
div-inv44.9%
*-commutative44.9%
pow1/244.9%
pow-flip44.9%
metadata-eval44.9%
Applied egg-rr44.9%
if -4.999999999999985e-310 < l Initial program 74.7%
associate-/r*72.3%
div-inv72.3%
Applied egg-rr72.3%
*-commutative72.3%
sqrt-prod81.1%
inv-pow81.1%
sqrt-pow181.1%
metadata-eval81.1%
Applied egg-rr81.1%
Final simplification61.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
(*
c0_s
(if (<= l -5e-310)
(* c0_m (/ (sqrt A) (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 = c0_m * (sqrt(A) / 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 = c0_m * (sqrt(a) / 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 = c0_m * (Math.sqrt(A) / 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 = c0_m * (math.sqrt(A) / 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(c0_m * Float64(sqrt(A) / 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 = c0_m * (sqrt(A) / 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[(c0$95$m * N[(N[Sqrt[A], $MachinePrecision] / 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}:\\
\;\;\;\;c0\_m \cdot \frac{\sqrt{A}}{\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 78.3%
sqrt-div44.9%
div-inv44.9%
Applied egg-rr44.9%
associate-*r/44.9%
*-rgt-identity44.9%
Simplified44.9%
if -4.999999999999985e-310 < l Initial program 74.7%
associate-/r*72.3%
sqrt-div81.2%
div-inv81.1%
Applied egg-rr81.1%
associate-*r/81.2%
*-rgt-identity81.2%
Simplified81.2%
Final simplification61.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 (/ A (* V l))))
(*
c0_s
(if (or (<= t_0 0.0) (not (<= t_0 1e+293)))
(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 <= 0.0) || !(t_0 <= 1e+293)) {
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 <= 0.0d0) .or. (.not. (t_0 <= 1d+293))) 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 <= 0.0) || !(t_0 <= 1e+293)) {
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 <= 0.0) or not (t_0 <= 1e+293): 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 <= 0.0) || !(t_0 <= 1e+293)) 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 <= 0.0) || ~((t_0 <= 1e+293)))
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, 0.0], N[Not[LessEqual[t$95$0, 1e+293]], $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 0 \lor \neg \left(t\_0 \leq 10^{+293}\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)) < 0.0 or 9.9999999999999992e292 < (/.f64 A (*.f64 V l)) Initial program 36.1%
associate-/r*53.1%
div-inv53.0%
Applied egg-rr53.0%
un-div-inv53.1%
associate-/r*36.1%
sqrt-undiv23.3%
add-sqr-sqrt17.7%
sqrt-unprod15.8%
*-commutative15.8%
*-commutative15.8%
swap-sqr12.3%
frac-times12.3%
add-sqr-sqrt12.3%
add-sqr-sqrt29.3%
pow229.3%
Applied egg-rr29.3%
associate-*l/29.3%
times-frac37.1%
Simplified37.1%
unpow237.1%
*-un-lft-identity37.1%
times-frac38.3%
Applied egg-rr38.3%
if 0.0 < (/.f64 A (*.f64 V l)) < 9.9999999999999992e292Initial program 98.7%
Final simplification77.5%
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 76.7%
Final simplification76.7%
herbie shell --seed 2024058
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))