
(FPCore (c0 A V l) :precision binary64 (* c0 (sqrt (/ A (* V l)))))
double code(double c0, double A, double V, double l) {
return c0 * sqrt((A / (V * l)));
}
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
code = c0 * sqrt((a / (v * l)))
end function
public static double code(double c0, double A, double V, double l) {
return c0 * Math.sqrt((A / (V * l)));
}
def code(c0, A, V, l): return c0 * math.sqrt((A / (V * l)))
function code(c0, A, V, l) return Float64(c0 * sqrt(Float64(A / Float64(V * l)))) end
function tmp = code(c0, A, V, l) tmp = c0 * sqrt((A / (V * l))); end
code[c0_, A_, V_, l_] := N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (c0 A V l) :precision binary64 (* c0 (sqrt (/ A (* V l)))))
double code(double c0, double A, double V, double l) {
return c0 * sqrt((A / (V * l)));
}
real(8) function code(c0, a, v, l)
real(8), intent (in) :: c0
real(8), intent (in) :: a
real(8), intent (in) :: v
real(8), intent (in) :: l
code = c0 * sqrt((a / (v * l)))
end function
public static double code(double c0, double A, double V, double l) {
return c0 * Math.sqrt((A / (V * l)));
}
def code(c0, A, V, l): return c0 * math.sqrt((A / (V * l)))
function code(c0, A, V, l) return Float64(c0 * sqrt(Float64(A / Float64(V * l)))) end
function tmp = code(c0, A, V, l) tmp = c0 * sqrt((A / (V * l))); end
code[c0_, A_, V_, l_] := N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\end{array}
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) (- INFINITY))
(/ c0_m (/ (sqrt (- V)) (sqrt (/ A (- l)))))
(if (<= (* V l) -5e-322)
(* c0_m (/ (sqrt (- A)) (sqrt (* V (- l)))))
(if (<= (* V l) 2e-311)
(/ (* c0_m (sqrt (/ A V))) (sqrt l))
(if (<= (* V l) 2e+296)
(* c0_m (* (sqrt A) (sqrt (/ (/ 1.0 V) l))))
(sqrt (* (/ c0_m V) (* c0_m (/ 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) <= -((double) INFINITY)) {
tmp = c0_m / (sqrt(-V) / sqrt((A / -l)));
} else if ((V * l) <= -5e-322) {
tmp = c0_m * (sqrt(-A) / sqrt((V * -l)));
} else if ((V * l) <= 2e-311) {
tmp = (c0_m * sqrt((A / V))) / sqrt(l);
} else if ((V * l) <= 2e+296) {
tmp = c0_m * (sqrt(A) * sqrt(((1.0 / V) / l)));
} else {
tmp = sqrt(((c0_m / V) * (c0_m * (A / l))));
}
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 tmp;
if ((V * l) <= -Double.POSITIVE_INFINITY) {
tmp = c0_m / (Math.sqrt(-V) / Math.sqrt((A / -l)));
} else if ((V * l) <= -5e-322) {
tmp = c0_m * (Math.sqrt(-A) / Math.sqrt((V * -l)));
} else if ((V * l) <= 2e-311) {
tmp = (c0_m * Math.sqrt((A / V))) / Math.sqrt(l);
} else if ((V * l) <= 2e+296) {
tmp = c0_m * (Math.sqrt(A) * Math.sqrt(((1.0 / V) / l)));
} else {
tmp = Math.sqrt(((c0_m / V) * (c0_m * (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) <= -math.inf: tmp = c0_m / (math.sqrt(-V) / math.sqrt((A / -l))) elif (V * l) <= -5e-322: tmp = c0_m * (math.sqrt(-A) / math.sqrt((V * -l))) elif (V * l) <= 2e-311: tmp = (c0_m * math.sqrt((A / V))) / math.sqrt(l) elif (V * l) <= 2e+296: tmp = c0_m * (math.sqrt(A) * math.sqrt(((1.0 / V) / l))) else: tmp = math.sqrt(((c0_m / V) * (c0_m * (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) <= Float64(-Inf)) tmp = Float64(c0_m / Float64(sqrt(Float64(-V)) / sqrt(Float64(A / Float64(-l))))); elseif (Float64(V * l) <= -5e-322) tmp = Float64(c0_m * Float64(sqrt(Float64(-A)) / sqrt(Float64(V * Float64(-l))))); elseif (Float64(V * l) <= 2e-311) tmp = Float64(Float64(c0_m * sqrt(Float64(A / V))) / sqrt(l)); elseif (Float64(V * l) <= 2e+296) tmp = Float64(c0_m * Float64(sqrt(A) * sqrt(Float64(Float64(1.0 / V) / l)))); else tmp = sqrt(Float64(Float64(c0_m / V) * Float64(c0_m * 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) <= -Inf)
tmp = c0_m / (sqrt(-V) / sqrt((A / -l)));
elseif ((V * l) <= -5e-322)
tmp = c0_m * (sqrt(-A) / sqrt((V * -l)));
elseif ((V * l) <= 2e-311)
tmp = (c0_m * sqrt((A / V))) / sqrt(l);
elseif ((V * l) <= 2e+296)
tmp = c0_m * (sqrt(A) * sqrt(((1.0 / V) / l)));
else
tmp = sqrt(((c0_m / V) * (c0_m * (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], (-Infinity)], N[(c0$95$m / N[(N[Sqrt[(-V)], $MachinePrecision] / N[Sqrt[N[(A / (-l)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -5e-322], N[(c0$95$m * N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[N[(V * (-l)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 2e-311], N[(N[(c0$95$m * N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 2e+296], N[(c0$95$m * N[(N[Sqrt[A], $MachinePrecision] * N[Sqrt[N[(N[(1.0 / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(c0$95$m / V), $MachinePrecision] * N[(c0$95$m * 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 -\infty:\\
\;\;\;\;\frac{c0\_m}{\frac{\sqrt{-V}}{\sqrt{\frac{A}{-\ell}}}}\\
\mathbf{elif}\;V \cdot \ell \leq -5 \cdot 10^{-322}:\\
\;\;\;\;c0\_m \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\
\mathbf{elif}\;V \cdot \ell \leq 2 \cdot 10^{-311}:\\
\;\;\;\;\frac{c0\_m \cdot \sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 2 \cdot 10^{+296}:\\
\;\;\;\;c0\_m \cdot \left(\sqrt{A} \cdot \sqrt{\frac{\frac{1}{V}}{\ell}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{c0\_m}{V} \cdot \left(c0\_m \cdot \frac{A}{\ell}\right)}\\
\end{array}
\end{array}
if (*.f64 V l) < -inf.0Initial program 26.0%
associate-/r*42.2%
clear-num42.2%
sqrt-div42.2%
metadata-eval42.2%
clear-num42.2%
associate-/r*26.0%
clear-num26.0%
associate-/l*42.2%
Applied egg-rr42.2%
un-div-inv42.2%
clear-num42.2%
div-inv42.2%
Applied egg-rr42.2%
frac-2neg42.2%
sqrt-div40.2%
distribute-neg-frac40.2%
Applied egg-rr40.2%
if -inf.0 < (*.f64 V l) < -4.99006e-322Initial program 85.2%
frac-2neg85.2%
sqrt-div98.6%
*-commutative98.6%
distribute-rgt-neg-in98.6%
Applied egg-rr98.6%
if -4.99006e-322 < (*.f64 V l) < 1.9999999999999e-311Initial program 44.7%
*-commutative44.7%
associate-/r*71.7%
sqrt-div48.0%
associate-*l/47.9%
Applied egg-rr47.9%
if 1.9999999999999e-311 < (*.f64 V l) < 1.99999999999999996e296Initial program 87.4%
pow1/287.4%
div-inv87.5%
unpow-prod-down99.3%
pow1/299.3%
Applied egg-rr99.3%
unpow1/299.3%
associate-/r*99.3%
Simplified99.3%
if 1.99999999999999996e296 < (*.f64 V l) Initial program 43.7%
add-sqr-sqrt32.1%
sqrt-unprod32.3%
*-commutative32.3%
*-commutative32.3%
swap-sqr31.5%
add-sqr-sqrt31.5%
pow231.5%
Applied egg-rr31.5%
associate-*l/31.5%
*-commutative31.5%
times-frac37.2%
Simplified37.2%
*-commutative37.2%
clear-num37.2%
frac-times32.0%
*-un-lft-identity32.0%
Applied egg-rr32.0%
*-un-lft-identity32.0%
times-frac37.2%
clear-num37.2%
unpow237.2%
associate-*r/37.6%
/-rgt-identity37.6%
clear-num37.6%
/-rgt-identity37.6%
/-rgt-identity37.6%
*-commutative37.6%
associate-*l*43.3%
Applied egg-rr43.3%
Final simplification85.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)
(sqrt (* c0_m (* A (/ c0_m (* V l)))))
(if (<= t_0 1e+289)
(/ c0_m (sqrt (/ (* V l) A)))
(* c0_m (pow (* V (/ l A)) -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 t_0 = c0_m * sqrt((A / (V * l)));
double tmp;
if (t_0 <= 0.0) {
tmp = sqrt((c0_m * (A * (c0_m / (V * l)))));
} else if (t_0 <= 1e+289) {
tmp = c0_m / sqrt(((V * l) / A));
} else {
tmp = c0_m * pow((V * (l / A)), -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) :: t_0
real(8) :: tmp
t_0 = c0_m * sqrt((a / (v * l)))
if (t_0 <= 0.0d0) then
tmp = sqrt((c0_m * (a * (c0_m / (v * l)))))
else if (t_0 <= 1d+289) then
tmp = c0_m / sqrt(((v * l) / a))
else
tmp = c0_m * ((v * (l / a)) ** (-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 t_0 = c0_m * Math.sqrt((A / (V * l)));
double tmp;
if (t_0 <= 0.0) {
tmp = Math.sqrt((c0_m * (A * (c0_m / (V * l)))));
} else if (t_0 <= 1e+289) {
tmp = c0_m / Math.sqrt(((V * l) / A));
} else {
tmp = c0_m * Math.pow((V * (l / A)), -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): t_0 = c0_m * math.sqrt((A / (V * l))) tmp = 0 if t_0 <= 0.0: tmp = math.sqrt((c0_m * (A * (c0_m / (V * l))))) elif t_0 <= 1e+289: tmp = c0_m / math.sqrt(((V * l) / A)) else: tmp = c0_m * math.pow((V * (l / A)), -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) t_0 = Float64(c0_m * sqrt(Float64(A / Float64(V * l)))) tmp = 0.0 if (t_0 <= 0.0) tmp = sqrt(Float64(c0_m * Float64(A * Float64(c0_m / Float64(V * l))))); elseif (t_0 <= 1e+289) tmp = Float64(c0_m / sqrt(Float64(Float64(V * l) / A))); else tmp = Float64(c0_m * (Float64(V * Float64(l / A)) ^ -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)
t_0 = c0_m * sqrt((A / (V * l)));
tmp = 0.0;
if (t_0 <= 0.0)
tmp = sqrt((c0_m * (A * (c0_m / (V * l)))));
elseif (t_0 <= 1e+289)
tmp = c0_m / sqrt(((V * l) / A));
else
tmp = c0_m * ((V * (l / A)) ^ -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_] := 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[Sqrt[N[(c0$95$m * N[(A * N[(c0$95$m / N[(V * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$0, 1e+289], N[(c0$95$m / N[Sqrt[N[(N[(V * l), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0$95$m * N[Power[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision], -0.5], $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:\\
\;\;\;\;\sqrt{c0\_m \cdot \left(A \cdot \frac{c0\_m}{V \cdot \ell}\right)}\\
\mathbf{elif}\;t\_0 \leq 10^{+289}:\\
\;\;\;\;\frac{c0\_m}{\sqrt{\frac{V \cdot \ell}{A}}}\\
\mathbf{else}:\\
\;\;\;\;c0\_m \cdot {\left(V \cdot \frac{\ell}{A}\right)}^{-0.5}\\
\end{array}
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 0.0Initial program 66.3%
add-sqr-sqrt11.4%
sqrt-unprod13.1%
*-commutative13.1%
*-commutative13.1%
swap-sqr12.8%
add-sqr-sqrt12.8%
pow212.8%
Applied egg-rr12.8%
associate-*l/14.2%
*-commutative14.2%
times-frac15.4%
Simplified15.4%
*-commutative15.4%
clear-num15.4%
frac-times15.9%
*-un-lft-identity15.9%
Applied egg-rr15.9%
associate-*l/14.2%
unpow214.2%
associate-/r*16.9%
Applied egg-rr16.9%
associate-/r/16.5%
div-inv16.5%
clear-num16.5%
Applied egg-rr16.5%
if 0.0 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1.0000000000000001e289Initial program 99.2%
associate-/r*89.7%
clear-num89.7%
sqrt-div89.6%
metadata-eval89.6%
clear-num89.6%
associate-/r*99.0%
clear-num99.0%
associate-/l*86.0%
Applied egg-rr86.0%
un-div-inv86.4%
clear-num86.4%
div-inv87.0%
Applied egg-rr87.0%
Taylor expanded in V around 0 99.4%
if 1.0000000000000001e289 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 47.4%
associate-/r*61.8%
clear-num61.8%
sqrt-div64.9%
metadata-eval64.9%
clear-num61.8%
associate-/r*47.4%
clear-num50.5%
associate-/l*64.9%
Applied egg-rr64.9%
un-div-inv64.9%
clear-num64.9%
div-inv64.9%
Applied egg-rr64.9%
clear-num64.9%
associate-/r/64.9%
pow1/264.9%
pow-flip64.8%
div-inv64.8%
clear-num64.8%
metadata-eval64.8%
Applied egg-rr64.8%
Final simplification45.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
(let* ((t_0 (* c0_m (sqrt (/ A (* V l))))))
(*
c0_s
(if (<= t_0 2e-298)
(* c0_m (sqrt (/ (/ A V) l)))
(if (<= t_0 1e+289)
(/ c0_m (sqrt (/ (* V l) A)))
(* c0_m (pow (* V (/ l A)) -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 t_0 = c0_m * sqrt((A / (V * l)));
double tmp;
if (t_0 <= 2e-298) {
tmp = c0_m * sqrt(((A / V) / l));
} else if (t_0 <= 1e+289) {
tmp = c0_m / sqrt(((V * l) / A));
} else {
tmp = c0_m * pow((V * (l / A)), -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) :: t_0
real(8) :: tmp
t_0 = c0_m * sqrt((a / (v * l)))
if (t_0 <= 2d-298) then
tmp = c0_m * sqrt(((a / v) / l))
else if (t_0 <= 1d+289) then
tmp = c0_m / sqrt(((v * l) / a))
else
tmp = c0_m * ((v * (l / a)) ** (-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 t_0 = c0_m * Math.sqrt((A / (V * l)));
double tmp;
if (t_0 <= 2e-298) {
tmp = c0_m * Math.sqrt(((A / V) / l));
} else if (t_0 <= 1e+289) {
tmp = c0_m / Math.sqrt(((V * l) / A));
} else {
tmp = c0_m * Math.pow((V * (l / A)), -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): t_0 = c0_m * math.sqrt((A / (V * l))) tmp = 0 if t_0 <= 2e-298: tmp = c0_m * math.sqrt(((A / V) / l)) elif t_0 <= 1e+289: tmp = c0_m / math.sqrt(((V * l) / A)) else: tmp = c0_m * math.pow((V * (l / A)), -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) t_0 = Float64(c0_m * sqrt(Float64(A / Float64(V * l)))) tmp = 0.0 if (t_0 <= 2e-298) tmp = Float64(c0_m * sqrt(Float64(Float64(A / V) / l))); elseif (t_0 <= 1e+289) tmp = Float64(c0_m / sqrt(Float64(Float64(V * l) / A))); else tmp = Float64(c0_m * (Float64(V * Float64(l / A)) ^ -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)
t_0 = c0_m * sqrt((A / (V * l)));
tmp = 0.0;
if (t_0 <= 2e-298)
tmp = c0_m * sqrt(((A / V) / l));
elseif (t_0 <= 1e+289)
tmp = c0_m / sqrt(((V * l) / A));
else
tmp = c0_m * ((V * (l / A)) ^ -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_] := 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, 2e-298], N[(c0$95$m * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+289], N[(c0$95$m / N[Sqrt[N[(N[(V * l), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0$95$m * N[Power[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision], -0.5], $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 2 \cdot 10^{-298}:\\
\;\;\;\;c0\_m \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;t\_0 \leq 10^{+289}:\\
\;\;\;\;\frac{c0\_m}{\sqrt{\frac{V \cdot \ell}{A}}}\\
\mathbf{else}:\\
\;\;\;\;c0\_m \cdot {\left(V \cdot \frac{\ell}{A}\right)}^{-0.5}\\
\end{array}
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1.99999999999999982e-298Initial program 66.9%
*-commutative66.9%
associate-/l/67.9%
Simplified67.9%
if 1.99999999999999982e-298 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1.0000000000000001e289Initial program 99.2%
associate-/r*89.3%
clear-num89.3%
sqrt-div89.2%
metadata-eval89.2%
clear-num89.1%
associate-/r*98.9%
clear-num99.0%
associate-/l*87.8%
Applied egg-rr87.8%
un-div-inv88.2%
clear-num88.2%
div-inv88.2%
Applied egg-rr88.2%
Taylor expanded in V around 0 99.4%
if 1.0000000000000001e289 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 47.4%
associate-/r*61.8%
clear-num61.8%
sqrt-div64.9%
metadata-eval64.9%
clear-num61.8%
associate-/r*47.4%
clear-num50.5%
associate-/l*64.9%
Applied egg-rr64.9%
un-div-inv64.9%
clear-num64.9%
div-inv64.9%
Applied egg-rr64.9%
clear-num64.9%
associate-/r/64.9%
pow1/264.9%
pow-flip64.8%
div-inv64.8%
clear-num64.8%
metadata-eval64.8%
Applied egg-rr64.8%
Final simplification76.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 2e-298)
(* c0_m (sqrt (/ (/ A V) l)))
(if (<= t_0 1e+289)
(/ c0_m (sqrt (/ (* V l) A)))
(* c0_m (pow (/ V (/ A 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 t_0 = c0_m * sqrt((A / (V * l)));
double tmp;
if (t_0 <= 2e-298) {
tmp = c0_m * sqrt(((A / V) / l));
} else if (t_0 <= 1e+289) {
tmp = c0_m / sqrt(((V * l) / A));
} else {
tmp = c0_m * pow((V / (A / 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) :: t_0
real(8) :: tmp
t_0 = c0_m * sqrt((a / (v * l)))
if (t_0 <= 2d-298) then
tmp = c0_m * sqrt(((a / v) / l))
else if (t_0 <= 1d+289) then
tmp = c0_m / sqrt(((v * l) / a))
else
tmp = c0_m * ((v / (a / 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 t_0 = c0_m * Math.sqrt((A / (V * l)));
double tmp;
if (t_0 <= 2e-298) {
tmp = c0_m * Math.sqrt(((A / V) / l));
} else if (t_0 <= 1e+289) {
tmp = c0_m / Math.sqrt(((V * l) / A));
} else {
tmp = c0_m * Math.pow((V / (A / 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): t_0 = c0_m * math.sqrt((A / (V * l))) tmp = 0 if t_0 <= 2e-298: tmp = c0_m * math.sqrt(((A / V) / l)) elif t_0 <= 1e+289: tmp = c0_m / math.sqrt(((V * l) / A)) else: tmp = c0_m * math.pow((V / (A / 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) t_0 = Float64(c0_m * sqrt(Float64(A / Float64(V * l)))) tmp = 0.0 if (t_0 <= 2e-298) tmp = Float64(c0_m * sqrt(Float64(Float64(A / V) / l))); elseif (t_0 <= 1e+289) tmp = Float64(c0_m / sqrt(Float64(Float64(V * l) / A))); else tmp = Float64(c0_m * (Float64(V / Float64(A / 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)
t_0 = c0_m * sqrt((A / (V * l)));
tmp = 0.0;
if (t_0 <= 2e-298)
tmp = c0_m * sqrt(((A / V) / l));
elseif (t_0 <= 1e+289)
tmp = c0_m / sqrt(((V * l) / A));
else
tmp = c0_m * ((V / (A / 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_] := 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, 2e-298], N[(c0$95$m * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+289], N[(c0$95$m / N[Sqrt[N[(N[(V * l), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0$95$m * N[Power[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision], -0.5], $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 2 \cdot 10^{-298}:\\
\;\;\;\;c0\_m \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;t\_0 \leq 10^{+289}:\\
\;\;\;\;\frac{c0\_m}{\sqrt{\frac{V \cdot \ell}{A}}}\\
\mathbf{else}:\\
\;\;\;\;c0\_m \cdot {\left(\frac{V}{\frac{A}{\ell}}\right)}^{-0.5}\\
\end{array}
\end{array}
\end{array}
if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1.99999999999999982e-298Initial program 66.9%
*-commutative66.9%
associate-/l/67.9%
Simplified67.9%
if 1.99999999999999982e-298 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1.0000000000000001e289Initial program 99.2%
associate-/r*89.3%
clear-num89.3%
sqrt-div89.2%
metadata-eval89.2%
clear-num89.1%
associate-/r*98.9%
clear-num99.0%
associate-/l*87.8%
Applied egg-rr87.8%
un-div-inv88.2%
clear-num88.2%
div-inv88.2%
Applied egg-rr88.2%
Taylor expanded in V around 0 99.4%
if 1.0000000000000001e289 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 47.4%
associate-/r*61.8%
clear-num61.8%
sqrt-div64.9%
metadata-eval64.9%
clear-num61.8%
associate-/r*47.4%
clear-num50.5%
associate-/l*64.9%
Applied egg-rr64.9%
inv-pow64.9%
sqrt-pow264.8%
clear-num64.8%
div-inv64.8%
metadata-eval64.8%
Applied egg-rr64.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 (* V l))))))
(*
c0_s
(if (or (<= t_0 2e-298) (not (<= t_0 1e+279)))
(* 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 <= 2e-298) || !(t_0 <= 1e+279)) {
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 <= 2d-298) .or. (.not. (t_0 <= 1d+279))) 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 <= 2e-298) || !(t_0 <= 1e+279)) {
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 <= 2e-298) or not (t_0 <= 1e+279): 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 <= 2e-298) || !(t_0 <= 1e+279)) 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 <= 2e-298) || ~((t_0 <= 1e+279)))
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, 2e-298], N[Not[LessEqual[t$95$0, 1e+279]], $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 2 \cdot 10^{-298} \lor \neg \left(t\_0 \leq 10^{+279}\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)))) < 1.99999999999999982e-298 or 1.00000000000000006e279 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 65.1%
*-commutative65.1%
associate-/l/67.1%
Simplified67.1%
if 1.99999999999999982e-298 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1.00000000000000006e279Initial program 99.2%
Final simplification76.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 2e-298)
(* c0_m (sqrt (/ (/ A V) l)))
(if (<= t_0 2e+271) 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 <= 2e-298) {
tmp = c0_m * sqrt(((A / V) / l));
} else if (t_0 <= 2e+271) {
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 <= 2d-298) then
tmp = c0_m * sqrt(((a / v) / l))
else if (t_0 <= 2d+271) 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 <= 2e-298) {
tmp = c0_m * Math.sqrt(((A / V) / l));
} else if (t_0 <= 2e+271) {
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 <= 2e-298: tmp = c0_m * math.sqrt(((A / V) / l)) elif t_0 <= 2e+271: 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 <= 2e-298) tmp = Float64(c0_m * sqrt(Float64(Float64(A / V) / l))); elseif (t_0 <= 2e+271) 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 <= 2e-298)
tmp = c0_m * sqrt(((A / V) / l));
elseif (t_0 <= 2e+271)
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, 2e-298], N[(c0$95$m * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+271], 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 2 \cdot 10^{-298}:\\
\;\;\;\;c0\_m \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+271}:\\
\;\;\;\;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)))) < 1.99999999999999982e-298Initial program 66.9%
*-commutative66.9%
associate-/l/67.9%
Simplified67.9%
if 1.99999999999999982e-298 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1.99999999999999991e271Initial program 99.2%
if 1.99999999999999991e271 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 56.0%
associate-/r*64.3%
clear-num64.2%
sqrt-div66.7%
metadata-eval66.7%
clear-num64.1%
associate-/r*55.9%
clear-num58.5%
associate-/l*70.5%
Applied egg-rr70.5%
un-div-inv70.7%
clear-num70.7%
div-inv70.7%
Applied egg-rr70.7%
associate-/r/69.8%
Simplified69.8%
*-commutative69.8%
clear-num66.8%
un-div-inv66.8%
Applied egg-rr66.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 (* V l))))))
(*
c0_s
(if (<= t_0 2e-298)
(* c0_m (sqrt (/ (/ A V) l)))
(if (<= t_0 2e+271) 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 <= 2e-298) {
tmp = c0_m * sqrt(((A / V) / l));
} else if (t_0 <= 2e+271) {
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 <= 2d-298) then
tmp = c0_m * sqrt(((a / v) / l))
else if (t_0 <= 2d+271) 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 <= 2e-298) {
tmp = c0_m * Math.sqrt(((A / V) / l));
} else if (t_0 <= 2e+271) {
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 <= 2e-298: tmp = c0_m * math.sqrt(((A / V) / l)) elif t_0 <= 2e+271: 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 <= 2e-298) tmp = Float64(c0_m * sqrt(Float64(Float64(A / V) / l))); elseif (t_0 <= 2e+271) 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 <= 2e-298)
tmp = c0_m * sqrt(((A / V) / l));
elseif (t_0 <= 2e+271)
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, 2e-298], N[(c0$95$m * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+271], 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 2 \cdot 10^{-298}:\\
\;\;\;\;c0\_m \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+271}:\\
\;\;\;\;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)))) < 1.99999999999999982e-298Initial program 66.9%
*-commutative66.9%
associate-/l/67.9%
Simplified67.9%
if 1.99999999999999982e-298 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1.99999999999999991e271Initial program 99.2%
if 1.99999999999999991e271 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 56.0%
associate-/r*64.3%
clear-num64.2%
sqrt-div66.7%
metadata-eval66.7%
clear-num64.1%
associate-/r*55.9%
clear-num58.5%
associate-/l*70.5%
Applied egg-rr70.5%
un-div-inv70.7%
clear-num70.7%
div-inv70.7%
Applied egg-rr70.7%
associate-/r/69.8%
Simplified69.8%
Final simplification76.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 2e-298)
(* c0_m (sqrt (/ (/ A V) l)))
(if (<= t_0 1e+289) 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 <= 2e-298) {
tmp = c0_m * sqrt(((A / V) / l));
} else if (t_0 <= 1e+289) {
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 <= 2d-298) then
tmp = c0_m * sqrt(((a / v) / l))
else if (t_0 <= 1d+289) 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 <= 2e-298) {
tmp = c0_m * Math.sqrt(((A / V) / l));
} else if (t_0 <= 1e+289) {
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 <= 2e-298: tmp = c0_m * math.sqrt(((A / V) / l)) elif t_0 <= 1e+289: 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 <= 2e-298) tmp = Float64(c0_m * sqrt(Float64(Float64(A / V) / l))); elseif (t_0 <= 1e+289) 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 <= 2e-298)
tmp = c0_m * sqrt(((A / V) / l));
elseif (t_0 <= 1e+289)
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, 2e-298], N[(c0$95$m * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+289], 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 2 \cdot 10^{-298}:\\
\;\;\;\;c0\_m \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;t\_0 \leq 10^{+289}:\\
\;\;\;\;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)))) < 1.99999999999999982e-298Initial program 66.9%
*-commutative66.9%
associate-/l/67.9%
Simplified67.9%
if 1.99999999999999982e-298 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1.0000000000000001e289Initial program 99.2%
if 1.0000000000000001e289 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) Initial program 47.4%
Taylor expanded in c0 around 0 47.4%
*-commutative47.4%
associate-/r*61.8%
Simplified61.8%
Final simplification76.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 -5e-310)
(/ c0_m (/ (sqrt (- V)) (sqrt (/ A (- l)))))
(* (sqrt A) (/ c0_m (* (sqrt l) (sqrt 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 <= -5e-310) {
tmp = c0_m / (sqrt(-V) / sqrt((A / -l)));
} else {
tmp = sqrt(A) * (c0_m / (sqrt(l) * sqrt(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 <= (-5d-310)) then
tmp = c0_m / (sqrt(-v) / sqrt((a / -l)))
else
tmp = sqrt(a) * (c0_m / (sqrt(l) * sqrt(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 <= -5e-310) {
tmp = c0_m / (Math.sqrt(-V) / Math.sqrt((A / -l)));
} else {
tmp = Math.sqrt(A) * (c0_m / (Math.sqrt(l) * Math.sqrt(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 <= -5e-310: tmp = c0_m / (math.sqrt(-V) / math.sqrt((A / -l))) else: tmp = math.sqrt(A) * (c0_m / (math.sqrt(l) * math.sqrt(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 (V <= -5e-310) tmp = Float64(c0_m / Float64(sqrt(Float64(-V)) / sqrt(Float64(A / Float64(-l))))); else tmp = Float64(sqrt(A) * Float64(c0_m / Float64(sqrt(l) * sqrt(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 <= -5e-310)
tmp = c0_m / (sqrt(-V) / sqrt((A / -l)));
else
tmp = sqrt(A) * (c0_m / (sqrt(l) * sqrt(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[V, -5e-310], N[(c0$95$m / N[(N[Sqrt[(-V)], $MachinePrecision] / N[Sqrt[N[(A / (-l)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[A], $MachinePrecision] * N[(c0$95$m / N[(N[Sqrt[l], $MachinePrecision] * N[Sqrt[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 \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{c0\_m}{\frac{\sqrt{-V}}{\sqrt{\frac{A}{-\ell}}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{A} \cdot \frac{c0\_m}{\sqrt{\ell} \cdot \sqrt{V}}\\
\end{array}
\end{array}
if V < -4.999999999999985e-310Initial program 75.5%
associate-/r*70.8%
clear-num70.9%
sqrt-div71.3%
metadata-eval71.3%
clear-num70.8%
associate-/r*75.4%
clear-num76.0%
associate-/l*75.2%
Applied egg-rr75.2%
un-div-inv75.3%
clear-num75.3%
div-inv75.4%
Applied egg-rr75.4%
frac-2neg75.4%
sqrt-div84.8%
distribute-neg-frac84.8%
Applied egg-rr84.8%
if -4.999999999999985e-310 < V Initial program 74.2%
sqrt-div37.6%
associate-*r/37.0%
Applied egg-rr37.0%
*-commutative37.0%
associate-/l*36.4%
Simplified36.4%
*-commutative36.4%
sqrt-prod41.5%
Applied egg-rr41.5%
Final simplification62.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
(if (<= (* V l) (- INFINITY))
(sqrt (/ A (* l (* (/ 1.0 c0_m) (/ V c0_m)))))
(if (<= (* V l) -5e-322)
(* c0_m (/ (sqrt (- A)) (sqrt (* V (- l)))))
(if (<= (* V l) 2e-311)
(/ (* c0_m (sqrt (/ A V))) (sqrt l))
(if (<= (* V l) 2e+296)
(* c0_m (* (sqrt A) (sqrt (/ (/ 1.0 V) l))))
(sqrt (* (/ c0_m V) (* c0_m (/ 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) <= -((double) INFINITY)) {
tmp = sqrt((A / (l * ((1.0 / c0_m) * (V / c0_m)))));
} else if ((V * l) <= -5e-322) {
tmp = c0_m * (sqrt(-A) / sqrt((V * -l)));
} else if ((V * l) <= 2e-311) {
tmp = (c0_m * sqrt((A / V))) / sqrt(l);
} else if ((V * l) <= 2e+296) {
tmp = c0_m * (sqrt(A) * sqrt(((1.0 / V) / l)));
} else {
tmp = sqrt(((c0_m / V) * (c0_m * (A / l))));
}
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 tmp;
if ((V * l) <= -Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((A / (l * ((1.0 / c0_m) * (V / c0_m)))));
} else if ((V * l) <= -5e-322) {
tmp = c0_m * (Math.sqrt(-A) / Math.sqrt((V * -l)));
} else if ((V * l) <= 2e-311) {
tmp = (c0_m * Math.sqrt((A / V))) / Math.sqrt(l);
} else if ((V * l) <= 2e+296) {
tmp = c0_m * (Math.sqrt(A) * Math.sqrt(((1.0 / V) / l)));
} else {
tmp = Math.sqrt(((c0_m / V) * (c0_m * (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) <= -math.inf: tmp = math.sqrt((A / (l * ((1.0 / c0_m) * (V / c0_m))))) elif (V * l) <= -5e-322: tmp = c0_m * (math.sqrt(-A) / math.sqrt((V * -l))) elif (V * l) <= 2e-311: tmp = (c0_m * math.sqrt((A / V))) / math.sqrt(l) elif (V * l) <= 2e+296: tmp = c0_m * (math.sqrt(A) * math.sqrt(((1.0 / V) / l))) else: tmp = math.sqrt(((c0_m / V) * (c0_m * (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) <= Float64(-Inf)) tmp = sqrt(Float64(A / Float64(l * Float64(Float64(1.0 / c0_m) * Float64(V / c0_m))))); elseif (Float64(V * l) <= -5e-322) tmp = Float64(c0_m * Float64(sqrt(Float64(-A)) / sqrt(Float64(V * Float64(-l))))); elseif (Float64(V * l) <= 2e-311) tmp = Float64(Float64(c0_m * sqrt(Float64(A / V))) / sqrt(l)); elseif (Float64(V * l) <= 2e+296) tmp = Float64(c0_m * Float64(sqrt(A) * sqrt(Float64(Float64(1.0 / V) / l)))); else tmp = sqrt(Float64(Float64(c0_m / V) * Float64(c0_m * 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) <= -Inf)
tmp = sqrt((A / (l * ((1.0 / c0_m) * (V / c0_m)))));
elseif ((V * l) <= -5e-322)
tmp = c0_m * (sqrt(-A) / sqrt((V * -l)));
elseif ((V * l) <= 2e-311)
tmp = (c0_m * sqrt((A / V))) / sqrt(l);
elseif ((V * l) <= 2e+296)
tmp = c0_m * (sqrt(A) * sqrt(((1.0 / V) / l)));
else
tmp = sqrt(((c0_m / V) * (c0_m * (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], (-Infinity)], N[Sqrt[N[(A / N[(l * N[(N[(1.0 / c0$95$m), $MachinePrecision] * N[(V / c0$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -5e-322], N[(c0$95$m * N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[N[(V * (-l)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 2e-311], N[(N[(c0$95$m * N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 2e+296], N[(c0$95$m * N[(N[Sqrt[A], $MachinePrecision] * N[Sqrt[N[(N[(1.0 / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(c0$95$m / V), $MachinePrecision] * N[(c0$95$m * 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 -\infty:\\
\;\;\;\;\sqrt{\frac{A}{\ell \cdot \left(\frac{1}{c0\_m} \cdot \frac{V}{c0\_m}\right)}}\\
\mathbf{elif}\;V \cdot \ell \leq -5 \cdot 10^{-322}:\\
\;\;\;\;c0\_m \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\
\mathbf{elif}\;V \cdot \ell \leq 2 \cdot 10^{-311}:\\
\;\;\;\;\frac{c0\_m \cdot \sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\
\mathbf{elif}\;V \cdot \ell \leq 2 \cdot 10^{+296}:\\
\;\;\;\;c0\_m \cdot \left(\sqrt{A} \cdot \sqrt{\frac{\frac{1}{V}}{\ell}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{c0\_m}{V} \cdot \left(c0\_m \cdot \frac{A}{\ell}\right)}\\
\end{array}
\end{array}
if (*.f64 V l) < -inf.0Initial program 26.0%
add-sqr-sqrt26.0%
sqrt-unprod26.0%
*-commutative26.0%
*-commutative26.0%
swap-sqr24.7%
add-sqr-sqrt24.7%
pow224.7%
Applied egg-rr24.7%
associate-*l/24.3%
*-commutative24.3%
times-frac35.7%
Simplified35.7%
*-commutative35.7%
clear-num35.7%
frac-times43.5%
*-un-lft-identity43.5%
Applied egg-rr43.5%
*-un-lft-identity43.5%
unpow243.5%
times-frac49.3%
Applied egg-rr49.3%
if -inf.0 < (*.f64 V l) < -4.99006e-322Initial program 85.2%
frac-2neg85.2%
sqrt-div98.6%
*-commutative98.6%
distribute-rgt-neg-in98.6%
Applied egg-rr98.6%
if -4.99006e-322 < (*.f64 V l) < 1.9999999999999e-311Initial program 44.7%
*-commutative44.7%
associate-/r*71.7%
sqrt-div48.0%
associate-*l/47.9%
Applied egg-rr47.9%
if 1.9999999999999e-311 < (*.f64 V l) < 1.99999999999999996e296Initial program 87.4%
pow1/287.4%
div-inv87.5%
unpow-prod-down99.3%
pow1/299.3%
Applied egg-rr99.3%
unpow1/299.3%
associate-/r*99.3%
Simplified99.3%
if 1.99999999999999996e296 < (*.f64 V l) Initial program 43.7%
add-sqr-sqrt32.1%
sqrt-unprod32.3%
*-commutative32.3%
*-commutative32.3%
swap-sqr31.5%
add-sqr-sqrt31.5%
pow231.5%
Applied egg-rr31.5%
associate-*l/31.5%
*-commutative31.5%
times-frac37.2%
Simplified37.2%
*-commutative37.2%
clear-num37.2%
frac-times32.0%
*-un-lft-identity32.0%
Applied egg-rr32.0%
*-un-lft-identity32.0%
times-frac37.2%
clear-num37.2%
unpow237.2%
associate-*r/37.6%
/-rgt-identity37.6%
clear-num37.6%
/-rgt-identity37.6%
/-rgt-identity37.6%
*-commutative37.6%
associate-*l*43.3%
Applied egg-rr43.3%
Final simplification86.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
(let* ((t_0 (/ A (* V l))))
(*
c0_s
(if (<= t_0 0.0)
(sqrt (/ A (/ (* V (/ l c0_m)) c0_m)))
(if (<= t_0 5e+298)
(/ c0_m (sqrt (/ (* V l) A)))
(sqrt (* (/ A l) (* c0_m (* c0_m (/ 1.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 = A / (V * l);
double tmp;
if (t_0 <= 0.0) {
tmp = sqrt((A / ((V * (l / c0_m)) / c0_m)));
} else if (t_0 <= 5e+298) {
tmp = c0_m / sqrt(((V * l) / A));
} else {
tmp = sqrt(((A / l) * (c0_m * (c0_m * (1.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 = a / (v * l)
if (t_0 <= 0.0d0) then
tmp = sqrt((a / ((v * (l / c0_m)) / c0_m)))
else if (t_0 <= 5d+298) then
tmp = c0_m / sqrt(((v * l) / a))
else
tmp = sqrt(((a / l) * (c0_m * (c0_m * (1.0d0 / 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 = A / (V * l);
double tmp;
if (t_0 <= 0.0) {
tmp = Math.sqrt((A / ((V * (l / c0_m)) / c0_m)));
} else if (t_0 <= 5e+298) {
tmp = c0_m / Math.sqrt(((V * l) / A));
} else {
tmp = Math.sqrt(((A / l) * (c0_m * (c0_m * (1.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 = A / (V * l) tmp = 0 if t_0 <= 0.0: tmp = math.sqrt((A / ((V * (l / c0_m)) / c0_m))) elif t_0 <= 5e+298: tmp = c0_m / math.sqrt(((V * l) / A)) else: tmp = math.sqrt(((A / l) * (c0_m * (c0_m * (1.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(A / Float64(V * l)) tmp = 0.0 if (t_0 <= 0.0) tmp = sqrt(Float64(A / Float64(Float64(V * Float64(l / c0_m)) / c0_m))); elseif (t_0 <= 5e+298) tmp = Float64(c0_m / sqrt(Float64(Float64(V * l) / A))); else tmp = sqrt(Float64(Float64(A / l) * Float64(c0_m * Float64(c0_m * Float64(1.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 = A / (V * l);
tmp = 0.0;
if (t_0 <= 0.0)
tmp = sqrt((A / ((V * (l / c0_m)) / c0_m)));
elseif (t_0 <= 5e+298)
tmp = c0_m / sqrt(((V * l) / A));
else
tmp = sqrt(((A / l) * (c0_m * (c0_m * (1.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[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]}, N[(c0$95$s * If[LessEqual[t$95$0, 0.0], N[Sqrt[N[(A / N[(N[(V * N[(l / c0$95$m), $MachinePrecision]), $MachinePrecision] / c0$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$0, 5e+298], N[(c0$95$m / N[Sqrt[N[(N[(V * l), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(A / l), $MachinePrecision] * N[(c0$95$m * N[(c0$95$m * N[(1.0 / V), $MachinePrecision]), $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 := \frac{A}{V \cdot \ell}\\
c0\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;\sqrt{\frac{A}{\frac{V \cdot \frac{\ell}{c0\_m}}{c0\_m}}}\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+298}:\\
\;\;\;\;\frac{c0\_m}{\sqrt{\frac{V \cdot \ell}{A}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{A}{\ell} \cdot \left(c0\_m \cdot \left(c0\_m \cdot \frac{1}{V}\right)\right)}\\
\end{array}
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 0.0Initial program 26.0%
add-sqr-sqrt26.0%
sqrt-unprod26.0%
*-commutative26.0%
*-commutative26.0%
swap-sqr24.9%
add-sqr-sqrt24.9%
pow224.9%
Applied egg-rr24.9%
associate-*l/29.0%
*-commutative29.0%
times-frac32.7%
Simplified32.7%
*-commutative32.7%
clear-num32.7%
frac-times33.8%
*-un-lft-identity33.8%
Applied egg-rr33.8%
associate-*l/29.2%
unpow229.2%
associate-/r*37.0%
Applied egg-rr37.0%
associate-/l*45.5%
Applied egg-rr45.5%
if 0.0 < (/.f64 A (*.f64 V l)) < 5.0000000000000003e298Initial program 99.1%
associate-/r*90.3%
clear-num90.3%
sqrt-div90.2%
metadata-eval90.2%
clear-num90.2%
associate-/r*98.9%
clear-num99.0%
associate-/l*88.5%
Applied egg-rr88.5%
un-div-inv88.6%
clear-num88.7%
div-inv89.0%
Applied egg-rr89.0%
Taylor expanded in V around 0 99.2%
if 5.0000000000000003e298 < (/.f64 A (*.f64 V l)) Initial program 39.7%
add-sqr-sqrt19.7%
sqrt-unprod19.8%
*-commutative19.8%
*-commutative19.8%
swap-sqr19.3%
add-sqr-sqrt19.3%
pow219.3%
Applied egg-rr19.3%
associate-*l/19.5%
*-commutative19.5%
times-frac22.4%
Simplified22.4%
div-inv22.4%
unpow222.4%
associate-*l*31.9%
Applied egg-rr31.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 0.0) (not (<= t_0 2e+288)))
(sqrt (* (/ c0_m V) (* c0_m (/ A l))))
(/ 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 = A / (V * l);
double tmp;
if ((t_0 <= 0.0) || !(t_0 <= 2e+288)) {
tmp = sqrt(((c0_m / V) * (c0_m * (A / l))));
} 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 = a / (v * l)
if ((t_0 <= 0.0d0) .or. (.not. (t_0 <= 2d+288))) then
tmp = sqrt(((c0_m / v) * (c0_m * (a / l))))
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 = A / (V * l);
double tmp;
if ((t_0 <= 0.0) || !(t_0 <= 2e+288)) {
tmp = Math.sqrt(((c0_m / V) * (c0_m * (A / l))));
} 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 = A / (V * l) tmp = 0 if (t_0 <= 0.0) or not (t_0 <= 2e+288): tmp = math.sqrt(((c0_m / V) * (c0_m * (A / l)))) 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(A / Float64(V * l)) tmp = 0.0 if ((t_0 <= 0.0) || !(t_0 <= 2e+288)) tmp = sqrt(Float64(Float64(c0_m / V) * Float64(c0_m * Float64(A / l)))); else tmp = Float64(c0_m / sqrt(Float64(Float64(V * 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 = A / (V * l);
tmp = 0.0;
if ((t_0 <= 0.0) || ~((t_0 <= 2e+288)))
tmp = sqrt(((c0_m / V) * (c0_m * (A / l))));
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[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]}, N[(c0$95$s * If[Or[LessEqual[t$95$0, 0.0], N[Not[LessEqual[t$95$0, 2e+288]], $MachinePrecision]], N[Sqrt[N[(N[(c0$95$m / V), $MachinePrecision] * N[(c0$95$m * N[(A / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(c0$95$m / N[Sqrt[N[(N[(V * l), $MachinePrecision] / A), $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 := \frac{A}{V \cdot \ell}\\
c0\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq 0 \lor \neg \left(t\_0 \leq 2 \cdot 10^{+288}\right):\\
\;\;\;\;\sqrt{\frac{c0\_m}{V} \cdot \left(c0\_m \cdot \frac{A}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0\_m}{\sqrt{\frac{V \cdot \ell}{A}}}\\
\end{array}
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 0.0 or 2e288 < (/.f64 A (*.f64 V l)) Initial program 32.4%
add-sqr-sqrt23.1%
sqrt-unprod23.2%
*-commutative23.2%
*-commutative23.2%
swap-sqr22.4%
add-sqr-sqrt22.4%
pow222.4%
Applied egg-rr22.4%
associate-*l/24.9%
*-commutative24.9%
times-frac28.1%
Simplified28.1%
*-commutative28.1%
clear-num28.1%
frac-times27.9%
*-un-lft-identity27.9%
Applied egg-rr27.9%
*-un-lft-identity27.9%
times-frac28.1%
clear-num28.1%
unpow228.1%
associate-*r/34.3%
/-rgt-identity34.3%
clear-num34.3%
/-rgt-identity34.3%
/-rgt-identity34.3%
*-commutative34.3%
associate-*l*36.5%
Applied egg-rr36.5%
if 0.0 < (/.f64 A (*.f64 V l)) < 2e288Initial program 99.0%
associate-/r*90.2%
clear-num90.2%
sqrt-div90.1%
metadata-eval90.1%
clear-num90.1%
associate-/r*98.9%
clear-num99.0%
associate-/l*89.0%
Applied egg-rr89.0%
un-div-inv89.2%
clear-num89.2%
div-inv89.5%
Applied egg-rr89.5%
Taylor expanded in V around 0 99.2%
Final simplification76.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
(let* ((t_0 (/ A (* V l))))
(*
c0_s
(if (<= t_0 0.0)
(sqrt (/ A (/ (* V (/ l c0_m)) c0_m)))
(if (<= t_0 5e+298)
(/ c0_m (sqrt (/ (* V l) A)))
(sqrt (* (/ A l) (* c0_m (/ c0_m 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 = A / (V * l);
double tmp;
if (t_0 <= 0.0) {
tmp = sqrt((A / ((V * (l / c0_m)) / c0_m)));
} else if (t_0 <= 5e+298) {
tmp = c0_m / sqrt(((V * l) / A));
} else {
tmp = sqrt(((A / l) * (c0_m * (c0_m / 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 = a / (v * l)
if (t_0 <= 0.0d0) then
tmp = sqrt((a / ((v * (l / c0_m)) / c0_m)))
else if (t_0 <= 5d+298) then
tmp = c0_m / sqrt(((v * l) / a))
else
tmp = sqrt(((a / l) * (c0_m * (c0_m / 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 = A / (V * l);
double tmp;
if (t_0 <= 0.0) {
tmp = Math.sqrt((A / ((V * (l / c0_m)) / c0_m)));
} else if (t_0 <= 5e+298) {
tmp = c0_m / Math.sqrt(((V * l) / A));
} else {
tmp = Math.sqrt(((A / l) * (c0_m * (c0_m / 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 = A / (V * l) tmp = 0 if t_0 <= 0.0: tmp = math.sqrt((A / ((V * (l / c0_m)) / c0_m))) elif t_0 <= 5e+298: tmp = c0_m / math.sqrt(((V * l) / A)) else: tmp = math.sqrt(((A / l) * (c0_m * (c0_m / 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(A / Float64(V * l)) tmp = 0.0 if (t_0 <= 0.0) tmp = sqrt(Float64(A / Float64(Float64(V * Float64(l / c0_m)) / c0_m))); elseif (t_0 <= 5e+298) tmp = Float64(c0_m / sqrt(Float64(Float64(V * l) / A))); else tmp = sqrt(Float64(Float64(A / l) * Float64(c0_m * Float64(c0_m / 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 = A / (V * l);
tmp = 0.0;
if (t_0 <= 0.0)
tmp = sqrt((A / ((V * (l / c0_m)) / c0_m)));
elseif (t_0 <= 5e+298)
tmp = c0_m / sqrt(((V * l) / A));
else
tmp = sqrt(((A / l) * (c0_m * (c0_m / 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[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]}, N[(c0$95$s * If[LessEqual[t$95$0, 0.0], N[Sqrt[N[(A / N[(N[(V * N[(l / c0$95$m), $MachinePrecision]), $MachinePrecision] / c0$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$0, 5e+298], N[(c0$95$m / N[Sqrt[N[(N[(V * l), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(A / l), $MachinePrecision] * N[(c0$95$m * N[(c0$95$m / 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 := \frac{A}{V \cdot \ell}\\
c0\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;\sqrt{\frac{A}{\frac{V \cdot \frac{\ell}{c0\_m}}{c0\_m}}}\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+298}:\\
\;\;\;\;\frac{c0\_m}{\sqrt{\frac{V \cdot \ell}{A}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{A}{\ell} \cdot \left(c0\_m \cdot \frac{c0\_m}{V}\right)}\\
\end{array}
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 0.0Initial program 26.0%
add-sqr-sqrt26.0%
sqrt-unprod26.0%
*-commutative26.0%
*-commutative26.0%
swap-sqr24.9%
add-sqr-sqrt24.9%
pow224.9%
Applied egg-rr24.9%
associate-*l/29.0%
*-commutative29.0%
times-frac32.7%
Simplified32.7%
*-commutative32.7%
clear-num32.7%
frac-times33.8%
*-un-lft-identity33.8%
Applied egg-rr33.8%
associate-*l/29.2%
unpow229.2%
associate-/r*37.0%
Applied egg-rr37.0%
associate-/l*45.5%
Applied egg-rr45.5%
if 0.0 < (/.f64 A (*.f64 V l)) < 5.0000000000000003e298Initial program 99.1%
associate-/r*90.3%
clear-num90.3%
sqrt-div90.2%
metadata-eval90.2%
clear-num90.2%
associate-/r*98.9%
clear-num99.0%
associate-/l*88.5%
Applied egg-rr88.5%
un-div-inv88.6%
clear-num88.7%
div-inv89.0%
Applied egg-rr89.0%
Taylor expanded in V around 0 99.2%
if 5.0000000000000003e298 < (/.f64 A (*.f64 V l)) Initial program 39.7%
add-sqr-sqrt19.7%
sqrt-unprod19.8%
*-commutative19.8%
*-commutative19.8%
swap-sqr19.3%
add-sqr-sqrt19.3%
pow219.3%
Applied egg-rr19.3%
associate-*l/19.5%
*-commutative19.5%
times-frac22.4%
Simplified22.4%
unpow222.4%
*-un-lft-identity22.4%
times-frac31.9%
Applied egg-rr31.9%
Final simplification77.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 (<= t_0 0.0)
(sqrt (/ A (/ (* V (/ l c0_m)) c0_m)))
(if (<= t_0 2e+288)
(/ c0_m (sqrt (/ (* V l) A)))
(sqrt (* (/ c0_m V) (* c0_m (/ 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 t_0 = A / (V * l);
double tmp;
if (t_0 <= 0.0) {
tmp = sqrt((A / ((V * (l / c0_m)) / c0_m)));
} else if (t_0 <= 2e+288) {
tmp = c0_m / sqrt(((V * l) / A));
} else {
tmp = sqrt(((c0_m / V) * (c0_m * (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) :: t_0
real(8) :: tmp
t_0 = a / (v * l)
if (t_0 <= 0.0d0) then
tmp = sqrt((a / ((v * (l / c0_m)) / c0_m)))
else if (t_0 <= 2d+288) then
tmp = c0_m / sqrt(((v * l) / a))
else
tmp = sqrt(((c0_m / v) * (c0_m * (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 t_0 = A / (V * l);
double tmp;
if (t_0 <= 0.0) {
tmp = Math.sqrt((A / ((V * (l / c0_m)) / c0_m)));
} else if (t_0 <= 2e+288) {
tmp = c0_m / Math.sqrt(((V * l) / A));
} else {
tmp = Math.sqrt(((c0_m / V) * (c0_m * (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): t_0 = A / (V * l) tmp = 0 if t_0 <= 0.0: tmp = math.sqrt((A / ((V * (l / c0_m)) / c0_m))) elif t_0 <= 2e+288: tmp = c0_m / math.sqrt(((V * l) / A)) else: tmp = math.sqrt(((c0_m / V) * (c0_m * (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) t_0 = Float64(A / Float64(V * l)) tmp = 0.0 if (t_0 <= 0.0) tmp = sqrt(Float64(A / Float64(Float64(V * Float64(l / c0_m)) / c0_m))); elseif (t_0 <= 2e+288) tmp = Float64(c0_m / sqrt(Float64(Float64(V * l) / A))); else tmp = sqrt(Float64(Float64(c0_m / V) * Float64(c0_m * 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)
t_0 = A / (V * l);
tmp = 0.0;
if (t_0 <= 0.0)
tmp = sqrt((A / ((V * (l / c0_m)) / c0_m)));
elseif (t_0 <= 2e+288)
tmp = c0_m / sqrt(((V * l) / A));
else
tmp = sqrt(((c0_m / V) * (c0_m * (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_] := Block[{t$95$0 = N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]}, N[(c0$95$s * If[LessEqual[t$95$0, 0.0], N[Sqrt[N[(A / N[(N[(V * N[(l / c0$95$m), $MachinePrecision]), $MachinePrecision] / c0$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$0, 2e+288], N[(c0$95$m / N[Sqrt[N[(N[(V * l), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(c0$95$m / V), $MachinePrecision] * N[(c0$95$m * 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])\\
\\
\begin{array}{l}
t_0 := \frac{A}{V \cdot \ell}\\
c0\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;\sqrt{\frac{A}{\frac{V \cdot \frac{\ell}{c0\_m}}{c0\_m}}}\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+288}:\\
\;\;\;\;\frac{c0\_m}{\sqrt{\frac{V \cdot \ell}{A}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{c0\_m}{V} \cdot \left(c0\_m \cdot \frac{A}{\ell}\right)}\\
\end{array}
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 0.0Initial program 26.0%
add-sqr-sqrt26.0%
sqrt-unprod26.0%
*-commutative26.0%
*-commutative26.0%
swap-sqr24.9%
add-sqr-sqrt24.9%
pow224.9%
Applied egg-rr24.9%
associate-*l/29.0%
*-commutative29.0%
times-frac32.7%
Simplified32.7%
*-commutative32.7%
clear-num32.7%
frac-times33.8%
*-un-lft-identity33.8%
Applied egg-rr33.8%
associate-*l/29.2%
unpow229.2%
associate-/r*37.0%
Applied egg-rr37.0%
associate-/l*45.5%
Applied egg-rr45.5%
if 0.0 < (/.f64 A (*.f64 V l)) < 2e288Initial program 99.0%
associate-/r*90.2%
clear-num90.2%
sqrt-div90.1%
metadata-eval90.1%
clear-num90.1%
associate-/r*98.9%
clear-num99.0%
associate-/l*89.0%
Applied egg-rr89.0%
un-div-inv89.2%
clear-num89.2%
div-inv89.5%
Applied egg-rr89.5%
Taylor expanded in V around 0 99.2%
if 2e288 < (/.f64 A (*.f64 V l)) Initial program 41.2%
add-sqr-sqrt19.2%
sqrt-unprod19.4%
*-commutative19.4%
*-commutative19.4%
swap-sqr18.9%
add-sqr-sqrt18.9%
pow218.9%
Applied egg-rr18.9%
associate-*l/19.2%
*-commutative19.2%
times-frac21.9%
Simplified21.9%
*-commutative21.9%
clear-num21.9%
frac-times19.6%
*-un-lft-identity19.6%
Applied egg-rr19.6%
*-un-lft-identity19.6%
times-frac21.9%
clear-num21.9%
unpow221.9%
associate-*r/31.0%
/-rgt-identity31.0%
clear-num31.0%
/-rgt-identity31.0%
/-rgt-identity31.0%
*-commutative31.0%
associate-*l*33.5%
Applied egg-rr33.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
(let* ((t_0 (/ A (* V l))))
(*
c0_s
(if (<= t_0 5e-300)
(* c0_m (sqrt (/ (/ A V) l)))
(if (<= t_0 5e+298)
(/ c0_m (sqrt (/ (* V l) 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 = A / (V * l);
double tmp;
if (t_0 <= 5e-300) {
tmp = c0_m * sqrt(((A / V) / l));
} else if (t_0 <= 5e+298) {
tmp = c0_m / sqrt(((V * l) / 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) :: t_0
real(8) :: tmp
t_0 = a / (v * l)
if (t_0 <= 5d-300) then
tmp = c0_m * sqrt(((a / v) / l))
else if (t_0 <= 5d+298) then
tmp = c0_m / sqrt(((v * l) / 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 t_0 = A / (V * l);
double tmp;
if (t_0 <= 5e-300) {
tmp = c0_m * Math.sqrt(((A / V) / l));
} else if (t_0 <= 5e+298) {
tmp = c0_m / Math.sqrt(((V * l) / 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 = A / (V * l) tmp = 0 if t_0 <= 5e-300: tmp = c0_m * math.sqrt(((A / V) / l)) elif t_0 <= 5e+298: tmp = c0_m / math.sqrt(((V * l) / 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(A / Float64(V * l)) tmp = 0.0 if (t_0 <= 5e-300) tmp = Float64(c0_m * sqrt(Float64(Float64(A / V) / l))); elseif (t_0 <= 5e+298) tmp = Float64(c0_m / sqrt(Float64(Float64(V * l) / 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 = A / (V * l);
tmp = 0.0;
if (t_0 <= 5e-300)
tmp = c0_m * sqrt(((A / V) / l));
elseif (t_0 <= 5e+298)
tmp = c0_m / sqrt(((V * l) / 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[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]}, N[(c0$95$s * If[LessEqual[t$95$0, 5e-300], N[(c0$95$m * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+298], N[(c0$95$m / N[Sqrt[N[(N[(V * l), $MachinePrecision] / A), $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 := \frac{A}{V \cdot \ell}\\
c0\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq 5 \cdot 10^{-300}:\\
\;\;\;\;c0\_m \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+298}:\\
\;\;\;\;\frac{c0\_m}{\sqrt{\frac{V \cdot \ell}{A}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{c0\_m}{\sqrt{\frac{\ell}{\frac{A}{V}}}}\\
\end{array}
\end{array}
\end{array}
if (/.f64 A (*.f64 V l)) < 4.99999999999999996e-300Initial program 28.6%
*-commutative28.6%
associate-/l/37.2%
Simplified37.2%
if 4.99999999999999996e-300 < (/.f64 A (*.f64 V l)) < 5.0000000000000003e298Initial program 99.0%
associate-/r*90.2%
clear-num90.2%
sqrt-div90.1%
metadata-eval90.1%
clear-num90.1%
associate-/r*98.9%
clear-num99.0%
associate-/l*88.9%
Applied egg-rr88.9%
un-div-inv89.1%
clear-num89.1%
div-inv89.5%
Applied egg-rr89.5%
Taylor expanded in V around 0 99.2%
if 5.0000000000000003e298 < (/.f64 A (*.f64 V l)) Initial program 39.7%
associate-/r*57.3%
clear-num57.3%
sqrt-div58.8%
metadata-eval58.8%
clear-num57.2%
associate-/r*39.7%
clear-num41.3%
associate-/l*58.8%
Applied egg-rr58.8%
un-div-inv58.9%
clear-num58.9%
div-inv58.9%
Applied egg-rr58.9%
associate-/r/58.9%
Simplified58.9%
*-commutative58.9%
clear-num58.9%
un-div-inv58.9%
Applied egg-rr58.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 (* 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 74.8%
herbie shell --seed 2024177
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))