
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 6.2e-241)
(*
2.0
(/ (* (pow l 2.0) (cos k)) (* (pow k 2.0) (* t_m (pow (sin k) 2.0)))))
(if (<= t_m 4.5e-86)
(/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
(/
2.0
(pow
(*
(/ t_m (pow (cbrt l) 2.0))
(* (cbrt (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))) (cbrt (sin k))))
3.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 6.2e-241) {
tmp = 2.0 * ((pow(l, 2.0) * cos(k)) / (pow(k, 2.0) * (t_m * pow(sin(k), 2.0))));
} else if (t_m <= 4.5e-86) {
tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
} else {
tmp = 2.0 / pow(((t_m / pow(cbrt(l), 2.0)) * (cbrt((tan(k) * (2.0 + pow((k / t_m), 2.0)))) * cbrt(sin(k)))), 3.0);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 6.2e-241) {
tmp = 2.0 * ((Math.pow(l, 2.0) * Math.cos(k)) / (Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0))));
} else if (t_m <= 4.5e-86) {
tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
} else {
tmp = 2.0 / Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * (Math.cbrt((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0)))) * Math.cbrt(Math.sin(k)))), 3.0);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 6.2e-241) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) * cos(k)) / Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0))))); elseif (t_m <= 4.5e-86) tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)); else tmp = Float64(2.0 / (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * Float64(cbrt(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0)))) * cbrt(sin(k)))) ^ 3.0)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 6.2e-241], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.5e-86], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 6.2 \cdot 10^{-241}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}\\
\mathbf{elif}\;t\_m \leq 4.5 \cdot 10^{-86}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \left(\sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)} \cdot \sqrt[3]{\sin k}\right)\right)}^{3}}\\
\end{array}
\end{array}
if t < 6.1999999999999998e-241Initial program 51.7%
Simplified51.7%
Taylor expanded in t around 0 61.6%
if 6.1999999999999998e-241 < t < 4.4999999999999998e-86Initial program 42.1%
Simplified42.1%
Applied egg-rr66.7%
Taylor expanded in t around 0 80.5%
if 4.4999999999999998e-86 < t Initial program 68.0%
Simplified68.0%
add-cube-cbrt67.9%
pow367.9%
Applied egg-rr83.6%
*-commutative83.6%
cbrt-prod95.5%
Applied egg-rr95.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (sin k) 2.0))
(t_3 (/ l (hypot 1.0 (hypot 1.0 (/ k t_m)))))
(t_4 (* (pow l 2.0) (cos k))))
(*
t_s
(if (<= t_m 1.9e-240)
(* 2.0 (/ t_4 (* (pow k 2.0) (* t_m t_2))))
(if (<= t_m 1.05e-132)
(/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
(if (<= t_m 2.9e-92)
(* 2.0 (/ t_4 (* t_2 (* t_m (pow k 2.0)))))
(if (<= t_m 2.7e+62)
(* t_3 (* t_3 (/ 2.0 (* (pow t_m 3.0) (* (sin k) (tan k))))))
(/
2.0
(pow
(*
(/ t_m (pow (cbrt l) 2.0))
(* (cbrt (sin k)) (* (cbrt k) (cbrt 2.0))))
3.0)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow(sin(k), 2.0);
double t_3 = l / hypot(1.0, hypot(1.0, (k / t_m)));
double t_4 = pow(l, 2.0) * cos(k);
double tmp;
if (t_m <= 1.9e-240) {
tmp = 2.0 * (t_4 / (pow(k, 2.0) * (t_m * t_2)));
} else if (t_m <= 1.05e-132) {
tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
} else if (t_m <= 2.9e-92) {
tmp = 2.0 * (t_4 / (t_2 * (t_m * pow(k, 2.0))));
} else if (t_m <= 2.7e+62) {
tmp = t_3 * (t_3 * (2.0 / (pow(t_m, 3.0) * (sin(k) * tan(k)))));
} else {
tmp = 2.0 / pow(((t_m / pow(cbrt(l), 2.0)) * (cbrt(sin(k)) * (cbrt(k) * cbrt(2.0)))), 3.0);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.pow(Math.sin(k), 2.0);
double t_3 = l / Math.hypot(1.0, Math.hypot(1.0, (k / t_m)));
double t_4 = Math.pow(l, 2.0) * Math.cos(k);
double tmp;
if (t_m <= 1.9e-240) {
tmp = 2.0 * (t_4 / (Math.pow(k, 2.0) * (t_m * t_2)));
} else if (t_m <= 1.05e-132) {
tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
} else if (t_m <= 2.9e-92) {
tmp = 2.0 * (t_4 / (t_2 * (t_m * Math.pow(k, 2.0))));
} else if (t_m <= 2.7e+62) {
tmp = t_3 * (t_3 * (2.0 / (Math.pow(t_m, 3.0) * (Math.sin(k) * Math.tan(k)))));
} else {
tmp = 2.0 / Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * (Math.cbrt(Math.sin(k)) * (Math.cbrt(k) * Math.cbrt(2.0)))), 3.0);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = sin(k) ^ 2.0 t_3 = Float64(l / hypot(1.0, hypot(1.0, Float64(k / t_m)))) t_4 = Float64((l ^ 2.0) * cos(k)) tmp = 0.0 if (t_m <= 1.9e-240) tmp = Float64(2.0 * Float64(t_4 / Float64((k ^ 2.0) * Float64(t_m * t_2)))); elseif (t_m <= 1.05e-132) tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)); elseif (t_m <= 2.9e-92) tmp = Float64(2.0 * Float64(t_4 / Float64(t_2 * Float64(t_m * (k ^ 2.0))))); elseif (t_m <= 2.7e+62) tmp = Float64(t_3 * Float64(t_3 * Float64(2.0 / Float64((t_m ^ 3.0) * Float64(sin(k) * tan(k)))))); else tmp = Float64(2.0 / (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * Float64(cbrt(sin(k)) * Float64(cbrt(k) * cbrt(2.0)))) ^ 3.0)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(l / N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.9e-240], N[(2.0 * N[(t$95$4 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.05e-132], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.9e-92], N[(2.0 * N[(t$95$4 / N[(t$95$2 * N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.7e+62], N[(t$95$3 * N[(t$95$3 * N[(2.0 / N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(N[Power[k, 1/3], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {\sin k}^{2}\\
t_3 := \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)}\\
t_4 := {\ell}^{2} \cdot \cos k\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.9 \cdot 10^{-240}:\\
\;\;\;\;2 \cdot \frac{t\_4}{{k}^{2} \cdot \left(t\_m \cdot t\_2\right)}\\
\mathbf{elif}\;t\_m \leq 1.05 \cdot 10^{-132}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 2.9 \cdot 10^{-92}:\\
\;\;\;\;2 \cdot \frac{t\_4}{t\_2 \cdot \left(t\_m \cdot {k}^{2}\right)}\\
\mathbf{elif}\;t\_m \leq 2.7 \cdot 10^{+62}:\\
\;\;\;\;t\_3 \cdot \left(t\_3 \cdot \frac{2}{{t\_m}^{3} \cdot \left(\sin k \cdot \tan k\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \left(\sqrt[3]{\sin k} \cdot \left(\sqrt[3]{k} \cdot \sqrt[3]{2}\right)\right)\right)}^{3}}\\
\end{array}
\end{array}
\end{array}
if t < 1.89999999999999994e-240Initial program 51.7%
Simplified51.7%
Taylor expanded in t around 0 61.6%
if 1.89999999999999994e-240 < t < 1.05e-132Initial program 36.6%
Simplified36.6%
Applied egg-rr66.8%
Taylor expanded in t around 0 86.2%
if 1.05e-132 < t < 2.89999999999999985e-92Initial program 57.1%
Simplified57.1%
add-cube-cbrt57.1%
pow357.1%
Applied egg-rr59.1%
*-commutative59.1%
cbrt-prod59.1%
Applied egg-rr59.1%
Taylor expanded in t around 0 86.2%
*-commutative86.2%
associate-*r*86.2%
Simplified86.2%
if 2.89999999999999985e-92 < t < 2.7e62Initial program 76.9%
Simplified76.3%
associate-*r*79.3%
add-sqr-sqrt79.3%
times-frac84.2%
Applied egg-rr89.3%
associate-/l*94.4%
associate-*l*94.5%
Simplified94.5%
if 2.7e62 < t Initial program 59.7%
Simplified59.7%
add-cube-cbrt59.7%
pow359.7%
Applied egg-rr81.6%
*-commutative81.6%
cbrt-prod99.0%
Applied egg-rr99.0%
Taylor expanded in k around 0 90.4%
Final simplification74.1%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (hypot 1.0 (hypot 1.0 (/ k t_m)))))
(*
t_s
(if (<= t_m 3e-238)
(*
2.0
(/ (* (pow l 2.0) (cos k)) (* (pow k 2.0) (* t_m (pow (sin k) 2.0)))))
(if (<= t_m 4.3e-86)
(/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
(if (<= t_m 6.5e+97)
(*
(/ (* l (/ 2.0 (* (tan k) (* (sin k) (pow t_m 3.0))))) t_2)
(/ l t_2))
(/
2.0
(*
(* (tan k) (+ 1.0 (+ (pow (/ k t_m) 2.0) 1.0)))
(* (sin k) (pow (* t_m (pow (cbrt l) -2.0)) 3.0))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = hypot(1.0, hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 3e-238) {
tmp = 2.0 * ((pow(l, 2.0) * cos(k)) / (pow(k, 2.0) * (t_m * pow(sin(k), 2.0))));
} else if (t_m <= 4.3e-86) {
tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
} else if (t_m <= 6.5e+97) {
tmp = ((l * (2.0 / (tan(k) * (sin(k) * pow(t_m, 3.0))))) / t_2) * (l / t_2);
} else {
tmp = 2.0 / ((tan(k) * (1.0 + (pow((k / t_m), 2.0) + 1.0))) * (sin(k) * pow((t_m * pow(cbrt(l), -2.0)), 3.0)));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.hypot(1.0, Math.hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 3e-238) {
tmp = 2.0 * ((Math.pow(l, 2.0) * Math.cos(k)) / (Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0))));
} else if (t_m <= 4.3e-86) {
tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
} else if (t_m <= 6.5e+97) {
tmp = ((l * (2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow(t_m, 3.0))))) / t_2) * (l / t_2);
} else {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (Math.pow((k / t_m), 2.0) + 1.0))) * (Math.sin(k) * Math.pow((t_m * Math.pow(Math.cbrt(l), -2.0)), 3.0)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = hypot(1.0, hypot(1.0, Float64(k / t_m))) tmp = 0.0 if (t_m <= 3e-238) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) * cos(k)) / Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0))))); elseif (t_m <= 4.3e-86) tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)); elseif (t_m <= 6.5e+97) tmp = Float64(Float64(Float64(l * Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (t_m ^ 3.0))))) / t_2) * Float64(l / t_2)); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64((Float64(k / t_m) ^ 2.0) + 1.0))) * Float64(sin(k) * (Float64(t_m * (cbrt(l) ^ -2.0)) ^ 3.0)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 3e-238], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.3e-86], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 6.5e+97], N[(N[(N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision] * N[(l / t$95$2), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3 \cdot 10^{-238}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}\\
\mathbf{elif}\;t\_m \leq 4.3 \cdot 10^{-86}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 6.5 \cdot 10^{+97}:\\
\;\;\;\;\frac{\ell \cdot \frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)}}{t\_2} \cdot \frac{\ell}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right)\right)\right) \cdot \left(\sin k \cdot {\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3}\right)}\\
\end{array}
\end{array}
\end{array}
if t < 3e-238Initial program 51.7%
Simplified51.7%
Taylor expanded in t around 0 61.6%
if 3e-238 < t < 4.30000000000000013e-86Initial program 42.1%
Simplified42.1%
Applied egg-rr66.7%
Taylor expanded in t around 0 80.5%
if 4.30000000000000013e-86 < t < 6.4999999999999999e97Initial program 76.8%
Simplified76.3%
associate-*r*79.0%
add-sqr-sqrt79.0%
times-frac83.5%
Applied egg-rr90.4%
if 6.4999999999999999e97 < t Initial program 58.5%
Simplified58.5%
associate-/r*67.1%
add-cube-cbrt67.1%
*-un-lft-identity67.1%
times-frac67.1%
pow267.1%
cbrt-div67.1%
rem-cbrt-cube67.1%
cbrt-div67.1%
rem-cbrt-cube89.8%
Applied egg-rr89.8%
frac-times84.9%
*-un-lft-identity84.9%
pow-plus84.9%
add-cbrt-cube67.1%
unpow367.1%
cbrt-div67.1%
metadata-eval67.1%
pow367.1%
add-cube-cbrt67.1%
associate-/r*58.5%
unpow358.5%
unpow258.5%
frac-times85.0%
add-cube-cbrt84.9%
pow384.9%
Applied egg-rr94.5%
Final simplification73.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (sin k) 2.0)))
(*
t_s
(if (<= t_m 3.8e-242)
(* 2.0 (/ (* (pow l 2.0) (cos k)) (* (pow k 2.0) (* t_m t_2))))
(if (<= t_m 9.6e-133)
(/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
(if (<= t_m 5.6e-66)
(* 2.0 (* (/ (cos k) (* t_m (pow k 2.0))) (/ (pow l 2.0) t_2)))
(if (<= t_m 1.55e+170)
(/
2.0
(*
(* (tan k) (+ 1.0 (+ (pow (/ k t_m) 2.0) 1.0)))
(/ (* (sin k) (pow (/ (pow t_m 1.5) (sqrt l)) 2.0)) l)))
(/
2.0
(pow
(*
(/ t_m (pow (cbrt l) 2.0))
(* (cbrt (sin k)) (* (cbrt k) (cbrt 2.0))))
3.0)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow(sin(k), 2.0);
double tmp;
if (t_m <= 3.8e-242) {
tmp = 2.0 * ((pow(l, 2.0) * cos(k)) / (pow(k, 2.0) * (t_m * t_2)));
} else if (t_m <= 9.6e-133) {
tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
} else if (t_m <= 5.6e-66) {
tmp = 2.0 * ((cos(k) / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / t_2));
} else if (t_m <= 1.55e+170) {
tmp = 2.0 / ((tan(k) * (1.0 + (pow((k / t_m), 2.0) + 1.0))) * ((sin(k) * pow((pow(t_m, 1.5) / sqrt(l)), 2.0)) / l));
} else {
tmp = 2.0 / pow(((t_m / pow(cbrt(l), 2.0)) * (cbrt(sin(k)) * (cbrt(k) * cbrt(2.0)))), 3.0);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.pow(Math.sin(k), 2.0);
double tmp;
if (t_m <= 3.8e-242) {
tmp = 2.0 * ((Math.pow(l, 2.0) * Math.cos(k)) / (Math.pow(k, 2.0) * (t_m * t_2)));
} else if (t_m <= 9.6e-133) {
tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
} else if (t_m <= 5.6e-66) {
tmp = 2.0 * ((Math.cos(k) / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / t_2));
} else if (t_m <= 1.55e+170) {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (Math.pow((k / t_m), 2.0) + 1.0))) * ((Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / Math.sqrt(l)), 2.0)) / l));
} else {
tmp = 2.0 / Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * (Math.cbrt(Math.sin(k)) * (Math.cbrt(k) * Math.cbrt(2.0)))), 3.0);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = sin(k) ^ 2.0 tmp = 0.0 if (t_m <= 3.8e-242) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) * cos(k)) / Float64((k ^ 2.0) * Float64(t_m * t_2)))); elseif (t_m <= 9.6e-133) tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)); elseif (t_m <= 5.6e-66) tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / t_2))); elseif (t_m <= 1.55e+170) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64((Float64(k / t_m) ^ 2.0) + 1.0))) * Float64(Float64(sin(k) * (Float64((t_m ^ 1.5) / sqrt(l)) ^ 2.0)) / l))); else tmp = Float64(2.0 / (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * Float64(cbrt(sin(k)) * Float64(cbrt(k) * cbrt(2.0)))) ^ 3.0)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 3.8e-242], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 9.6e-133], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.6e-66], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.55e+170], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(N[Power[k, 1/3], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {\sin k}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.8 \cdot 10^{-242}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t\_m \cdot t\_2\right)}\\
\mathbf{elif}\;t\_m \leq 9.6 \cdot 10^{-133}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 5.6 \cdot 10^{-66}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{t\_2}\right)\\
\mathbf{elif}\;t\_m \leq 1.55 \cdot 10^{+170}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right)\right)\right) \cdot \frac{\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\sqrt{\ell}}\right)}^{2}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \left(\sqrt[3]{\sin k} \cdot \left(\sqrt[3]{k} \cdot \sqrt[3]{2}\right)\right)\right)}^{3}}\\
\end{array}
\end{array}
\end{array}
if t < 3.8000000000000002e-242Initial program 51.7%
Simplified51.7%
Taylor expanded in t around 0 61.6%
if 3.8000000000000002e-242 < t < 9.6e-133Initial program 36.6%
Simplified36.6%
Applied egg-rr66.8%
Taylor expanded in t around 0 86.2%
if 9.6e-133 < t < 5.6000000000000001e-66Initial program 66.7%
Simplified66.7%
add-cube-cbrt66.7%
pow366.7%
Applied egg-rr68.1%
*-commutative68.1%
cbrt-prod68.1%
Applied egg-rr68.1%
Taylor expanded in t around 0 91.8%
*-commutative91.8%
associate-*r*92.0%
times-frac91.7%
Simplified91.7%
if 5.6000000000000001e-66 < t < 1.55e170Initial program 65.2%
Simplified65.2%
associate-/r*71.0%
add-sqr-sqrt24.6%
*-un-lft-identity24.6%
times-frac24.6%
sqrt-div24.6%
sqrt-pow124.6%
metadata-eval24.6%
sqrt-div24.6%
sqrt-pow132.3%
metadata-eval32.3%
Applied egg-rr32.3%
/-rgt-identity32.3%
associate-*r/32.4%
unpow232.4%
Simplified32.4%
associate-*l/34.3%
Applied egg-rr34.3%
if 1.55e170 < t Initial program 69.6%
Simplified69.6%
add-cube-cbrt69.6%
pow369.6%
Applied egg-rr84.4%
*-commutative84.4%
cbrt-prod99.2%
Applied egg-rr99.2%
Taylor expanded in k around 0 95.7%
Final simplification63.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (sin k) 2.0)) (t_3 (pow (/ k t_m) 2.0)))
(*
t_s
(if (<= t_m 3.6e-241)
(* 2.0 (/ (* (pow l 2.0) (cos k)) (* (pow k 2.0) (* t_m t_2))))
(if (<= t_m 8.5e-133)
(/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
(if (<= t_m 1.08e-66)
(* 2.0 (* (/ (cos k) (* t_m (pow k 2.0))) (/ (pow l 2.0) t_2)))
(if (<= t_m 5.5e-21)
(/
2.0
(*
(* (sin k) (* (/ 1.0 (/ l (pow t_m 2.0))) (/ t_m l)))
(* (tan k) (+ 1.0 (+ 1.0 (/ (/ k t_m) (/ t_m k)))))))
(if (<= t_m 6.5e+97)
(*
(* l (/ 2.0 (* (tan k) (* (sin k) (pow t_m 3.0)))))
(/ l (+ 2.0 t_3)))
(/
2.0
(*
(* (tan k) (+ 1.0 (+ t_3 1.0)))
(* (sin k) (pow (* t_m (pow (cbrt l) -2.0)) 3.0))))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow(sin(k), 2.0);
double t_3 = pow((k / t_m), 2.0);
double tmp;
if (t_m <= 3.6e-241) {
tmp = 2.0 * ((pow(l, 2.0) * cos(k)) / (pow(k, 2.0) * (t_m * t_2)));
} else if (t_m <= 8.5e-133) {
tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
} else if (t_m <= 1.08e-66) {
tmp = 2.0 * ((cos(k) / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / t_2));
} else if (t_m <= 5.5e-21) {
tmp = 2.0 / ((sin(k) * ((1.0 / (l / pow(t_m, 2.0))) * (t_m / l))) * (tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k))))));
} else if (t_m <= 6.5e+97) {
tmp = (l * (2.0 / (tan(k) * (sin(k) * pow(t_m, 3.0))))) * (l / (2.0 + t_3));
} else {
tmp = 2.0 / ((tan(k) * (1.0 + (t_3 + 1.0))) * (sin(k) * pow((t_m * pow(cbrt(l), -2.0)), 3.0)));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.pow(Math.sin(k), 2.0);
double t_3 = Math.pow((k / t_m), 2.0);
double tmp;
if (t_m <= 3.6e-241) {
tmp = 2.0 * ((Math.pow(l, 2.0) * Math.cos(k)) / (Math.pow(k, 2.0) * (t_m * t_2)));
} else if (t_m <= 8.5e-133) {
tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
} else if (t_m <= 1.08e-66) {
tmp = 2.0 * ((Math.cos(k) / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / t_2));
} else if (t_m <= 5.5e-21) {
tmp = 2.0 / ((Math.sin(k) * ((1.0 / (l / Math.pow(t_m, 2.0))) * (t_m / l))) * (Math.tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k))))));
} else if (t_m <= 6.5e+97) {
tmp = (l * (2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow(t_m, 3.0))))) * (l / (2.0 + t_3));
} else {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (t_3 + 1.0))) * (Math.sin(k) * Math.pow((t_m * Math.pow(Math.cbrt(l), -2.0)), 3.0)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = sin(k) ^ 2.0 t_3 = Float64(k / t_m) ^ 2.0 tmp = 0.0 if (t_m <= 3.6e-241) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) * cos(k)) / Float64((k ^ 2.0) * Float64(t_m * t_2)))); elseif (t_m <= 8.5e-133) tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)); elseif (t_m <= 1.08e-66) tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / t_2))); elseif (t_m <= 5.5e-21) tmp = Float64(2.0 / Float64(Float64(sin(k) * Float64(Float64(1.0 / Float64(l / (t_m ^ 2.0))) * Float64(t_m / l))) * Float64(tan(k) * Float64(1.0 + Float64(1.0 + Float64(Float64(k / t_m) / Float64(t_m / k))))))); elseif (t_m <= 6.5e+97) tmp = Float64(Float64(l * Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (t_m ^ 3.0))))) * Float64(l / Float64(2.0 + t_3))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(t_3 + 1.0))) * Float64(sin(k) * (Float64(t_m * (cbrt(l) ^ -2.0)) ^ 3.0)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 3.6e-241], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 8.5e-133], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.08e-66], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.5e-21], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[(N[(1.0 / N[(l / N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 6.5e+97], N[(N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(t$95$3 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {\sin k}^{2}\\
t_3 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.6 \cdot 10^{-241}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t\_m \cdot t\_2\right)}\\
\mathbf{elif}\;t\_m \leq 8.5 \cdot 10^{-133}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 1.08 \cdot 10^{-66}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{t\_2}\right)\\
\mathbf{elif}\;t\_m \leq 5.5 \cdot 10^{-21}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \left(\frac{1}{\frac{\ell}{{t\_m}^{2}}} \cdot \frac{t\_m}{\ell}\right)\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\right)\right)}\\
\mathbf{elif}\;t\_m \leq 6.5 \cdot 10^{+97}:\\
\;\;\;\;\left(\ell \cdot \frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)}\right) \cdot \frac{\ell}{2 + t\_3}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(t\_3 + 1\right)\right)\right) \cdot \left(\sin k \cdot {\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3}\right)}\\
\end{array}
\end{array}
\end{array}
if t < 3.5999999999999999e-241Initial program 51.7%
Simplified51.7%
Taylor expanded in t around 0 61.6%
if 3.5999999999999999e-241 < t < 8.49999999999999957e-133Initial program 36.6%
Simplified36.6%
Applied egg-rr66.8%
Taylor expanded in t around 0 86.2%
if 8.49999999999999957e-133 < t < 1.08000000000000006e-66Initial program 60.0%
Simplified60.0%
add-cube-cbrt60.0%
pow360.0%
Applied egg-rr61.8%
*-commutative61.8%
cbrt-prod61.8%
Applied egg-rr61.8%
Taylor expanded in t around 0 90.1%
*-commutative90.1%
associate-*r*90.4%
times-frac90.0%
Simplified90.0%
if 1.08000000000000006e-66 < t < 5.49999999999999977e-21Initial program 66.5%
Simplified66.5%
unpow266.5%
clear-num66.5%
un-div-inv66.5%
Applied egg-rr66.5%
unpow366.5%
times-frac82.1%
pow282.1%
Applied egg-rr82.1%
clear-num82.2%
inv-pow82.2%
Applied egg-rr82.2%
unpow-182.2%
Simplified82.2%
if 5.49999999999999977e-21 < t < 6.4999999999999999e97Initial program 79.9%
Simplified79.8%
associate-*r*83.5%
*-un-lft-identity83.5%
times-frac86.8%
associate-*r*90.1%
Applied egg-rr90.1%
if 6.4999999999999999e97 < t Initial program 58.5%
Simplified58.5%
associate-/r*67.1%
add-cube-cbrt67.1%
*-un-lft-identity67.1%
times-frac67.1%
pow267.1%
cbrt-div67.1%
rem-cbrt-cube67.1%
cbrt-div67.1%
rem-cbrt-cube89.8%
Applied egg-rr89.8%
frac-times84.9%
*-un-lft-identity84.9%
pow-plus84.9%
add-cbrt-cube67.1%
unpow367.1%
cbrt-div67.1%
metadata-eval67.1%
pow367.1%
add-cube-cbrt67.1%
associate-/r*58.5%
unpow358.5%
unpow258.5%
frac-times85.0%
add-cube-cbrt84.9%
pow384.9%
Applied egg-rr94.5%
Final simplification73.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (sin k) 2.0)))
(*
t_s
(if (<= t_m 2.65e-242)
(* 2.0 (/ (* (pow l 2.0) (cos k)) (* (pow k 2.0) (* t_m t_2))))
(if (<= t_m 5.6e-133)
(/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
(if (<= t_m 5.6e-66)
(* 2.0 (* (/ (cos k) (* t_m (pow k 2.0))) (/ (pow l 2.0) t_2)))
(if (<= t_m 1.52e+171)
(/
2.0
(*
(* (tan k) (+ 1.0 (+ (pow (/ k t_m) 2.0) 1.0)))
(/ (* (sin k) (pow (/ (pow t_m 1.5) (sqrt l)) 2.0)) l)))
(/
2.0
(pow
(* (* t_m (cbrt 2.0)) (/ (pow (cbrt k) 2.0) (pow (cbrt l) 2.0)))
3.0)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow(sin(k), 2.0);
double tmp;
if (t_m <= 2.65e-242) {
tmp = 2.0 * ((pow(l, 2.0) * cos(k)) / (pow(k, 2.0) * (t_m * t_2)));
} else if (t_m <= 5.6e-133) {
tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
} else if (t_m <= 5.6e-66) {
tmp = 2.0 * ((cos(k) / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / t_2));
} else if (t_m <= 1.52e+171) {
tmp = 2.0 / ((tan(k) * (1.0 + (pow((k / t_m), 2.0) + 1.0))) * ((sin(k) * pow((pow(t_m, 1.5) / sqrt(l)), 2.0)) / l));
} else {
tmp = 2.0 / pow(((t_m * cbrt(2.0)) * (pow(cbrt(k), 2.0) / pow(cbrt(l), 2.0))), 3.0);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.pow(Math.sin(k), 2.0);
double tmp;
if (t_m <= 2.65e-242) {
tmp = 2.0 * ((Math.pow(l, 2.0) * Math.cos(k)) / (Math.pow(k, 2.0) * (t_m * t_2)));
} else if (t_m <= 5.6e-133) {
tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
} else if (t_m <= 5.6e-66) {
tmp = 2.0 * ((Math.cos(k) / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / t_2));
} else if (t_m <= 1.52e+171) {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (Math.pow((k / t_m), 2.0) + 1.0))) * ((Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / Math.sqrt(l)), 2.0)) / l));
} else {
tmp = 2.0 / Math.pow(((t_m * Math.cbrt(2.0)) * (Math.pow(Math.cbrt(k), 2.0) / Math.pow(Math.cbrt(l), 2.0))), 3.0);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = sin(k) ^ 2.0 tmp = 0.0 if (t_m <= 2.65e-242) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) * cos(k)) / Float64((k ^ 2.0) * Float64(t_m * t_2)))); elseif (t_m <= 5.6e-133) tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)); elseif (t_m <= 5.6e-66) tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / t_2))); elseif (t_m <= 1.52e+171) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64((Float64(k / t_m) ^ 2.0) + 1.0))) * Float64(Float64(sin(k) * (Float64((t_m ^ 1.5) / sqrt(l)) ^ 2.0)) / l))); else tmp = Float64(2.0 / (Float64(Float64(t_m * cbrt(2.0)) * Float64((cbrt(k) ^ 2.0) / (cbrt(l) ^ 2.0))) ^ 3.0)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.65e-242], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.6e-133], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.6e-66], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.52e+171], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(t$95$m * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {\sin k}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.65 \cdot 10^{-242}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t\_m \cdot t\_2\right)}\\
\mathbf{elif}\;t\_m \leq 5.6 \cdot 10^{-133}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 5.6 \cdot 10^{-66}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{t\_2}\right)\\
\mathbf{elif}\;t\_m \leq 1.52 \cdot 10^{+171}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right)\right)\right) \cdot \frac{\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\sqrt{\ell}}\right)}^{2}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot \sqrt[3]{2}\right) \cdot \frac{{\left(\sqrt[3]{k}\right)}^{2}}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}}\\
\end{array}
\end{array}
\end{array}
if t < 2.6500000000000001e-242Initial program 51.7%
Simplified51.7%
Taylor expanded in t around 0 61.6%
if 2.6500000000000001e-242 < t < 5.5999999999999997e-133Initial program 36.6%
Simplified36.6%
Applied egg-rr66.8%
Taylor expanded in t around 0 86.2%
if 5.5999999999999997e-133 < t < 5.6000000000000001e-66Initial program 66.7%
Simplified66.7%
add-cube-cbrt66.7%
pow366.7%
Applied egg-rr68.1%
*-commutative68.1%
cbrt-prod68.1%
Applied egg-rr68.1%
Taylor expanded in t around 0 91.8%
*-commutative91.8%
associate-*r*92.0%
times-frac91.7%
Simplified91.7%
if 5.6000000000000001e-66 < t < 1.5199999999999999e171Initial program 65.2%
Simplified65.2%
associate-/r*71.0%
add-sqr-sqrt24.6%
*-un-lft-identity24.6%
times-frac24.6%
sqrt-div24.6%
sqrt-pow124.6%
metadata-eval24.6%
sqrt-div24.6%
sqrt-pow132.3%
metadata-eval32.3%
Applied egg-rr32.3%
/-rgt-identity32.3%
associate-*r/32.4%
unpow232.4%
Simplified32.4%
associate-*l/34.3%
Applied egg-rr34.3%
if 1.5199999999999999e171 < t Initial program 69.6%
Simplified69.6%
add-cube-cbrt69.6%
pow369.6%
Applied egg-rr84.4%
Taylor expanded in k around 0 62.2%
*-commutative62.2%
*-commutative62.2%
Simplified62.2%
cbrt-div62.2%
unpow262.2%
cbrt-prod73.5%
pow273.5%
unpow273.5%
cbrt-prod92.3%
unpow292.3%
Applied egg-rr92.3%
Final simplification62.9%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (sin k) 2.0))
(t_3 (* (tan k) (+ 1.0 (+ 1.0 (/ (/ k t_m) (/ t_m k)))))))
(*
t_s
(if (<= t_m 9e-242)
(* 2.0 (/ (* (pow l 2.0) (cos k)) (* (pow k 2.0) (* t_m t_2))))
(if (<= t_m 5e-133)
(/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
(if (<= t_m 1.5e-66)
(* 2.0 (* (/ (cos k) (* t_m (pow k 2.0))) (/ (pow l 2.0) t_2)))
(if (<= t_m 5.1e-20)
(/
2.0
(* (* (sin k) (* (/ 1.0 (/ l (pow t_m 2.0))) (/ t_m l))) t_3))
(if (<= t_m 6.5e+97)
(*
(* l (/ 2.0 (* (tan k) (* (sin k) (pow t_m 3.0)))))
(/ l (+ 2.0 (pow (/ k t_m) 2.0))))
(/
2.0
(*
t_3
(* (sin k) (pow (* t_m (pow (cbrt l) -2.0)) 3.0))))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow(sin(k), 2.0);
double t_3 = tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k))));
double tmp;
if (t_m <= 9e-242) {
tmp = 2.0 * ((pow(l, 2.0) * cos(k)) / (pow(k, 2.0) * (t_m * t_2)));
} else if (t_m <= 5e-133) {
tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
} else if (t_m <= 1.5e-66) {
tmp = 2.0 * ((cos(k) / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / t_2));
} else if (t_m <= 5.1e-20) {
tmp = 2.0 / ((sin(k) * ((1.0 / (l / pow(t_m, 2.0))) * (t_m / l))) * t_3);
} else if (t_m <= 6.5e+97) {
tmp = (l * (2.0 / (tan(k) * (sin(k) * pow(t_m, 3.0))))) * (l / (2.0 + pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / (t_3 * (sin(k) * pow((t_m * pow(cbrt(l), -2.0)), 3.0)));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.pow(Math.sin(k), 2.0);
double t_3 = Math.tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k))));
double tmp;
if (t_m <= 9e-242) {
tmp = 2.0 * ((Math.pow(l, 2.0) * Math.cos(k)) / (Math.pow(k, 2.0) * (t_m * t_2)));
} else if (t_m <= 5e-133) {
tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
} else if (t_m <= 1.5e-66) {
tmp = 2.0 * ((Math.cos(k) / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / t_2));
} else if (t_m <= 5.1e-20) {
tmp = 2.0 / ((Math.sin(k) * ((1.0 / (l / Math.pow(t_m, 2.0))) * (t_m / l))) * t_3);
} else if (t_m <= 6.5e+97) {
tmp = (l * (2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow(t_m, 3.0))))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / (t_3 * (Math.sin(k) * Math.pow((t_m * Math.pow(Math.cbrt(l), -2.0)), 3.0)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = sin(k) ^ 2.0 t_3 = Float64(tan(k) * Float64(1.0 + Float64(1.0 + Float64(Float64(k / t_m) / Float64(t_m / k))))) tmp = 0.0 if (t_m <= 9e-242) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) * cos(k)) / Float64((k ^ 2.0) * Float64(t_m * t_2)))); elseif (t_m <= 5e-133) tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)); elseif (t_m <= 1.5e-66) tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / t_2))); elseif (t_m <= 5.1e-20) tmp = Float64(2.0 / Float64(Float64(sin(k) * Float64(Float64(1.0 / Float64(l / (t_m ^ 2.0))) * Float64(t_m / l))) * t_3)); elseif (t_m <= 6.5e+97) tmp = Float64(Float64(l * Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (t_m ^ 3.0))))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); else tmp = Float64(2.0 / Float64(t_3 * Float64(sin(k) * (Float64(t_m * (cbrt(l) ^ -2.0)) ^ 3.0)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 9e-242], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5e-133], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.5e-66], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.1e-20], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[(N[(1.0 / N[(l / N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 6.5e+97], N[(N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$3 * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {\sin k}^{2}\\
t_3 := \tan k \cdot \left(1 + \left(1 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 9 \cdot 10^{-242}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t\_m \cdot t\_2\right)}\\
\mathbf{elif}\;t\_m \leq 5 \cdot 10^{-133}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 1.5 \cdot 10^{-66}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{t\_2}\right)\\
\mathbf{elif}\;t\_m \leq 5.1 \cdot 10^{-20}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \left(\frac{1}{\frac{\ell}{{t\_m}^{2}}} \cdot \frac{t\_m}{\ell}\right)\right) \cdot t\_3}\\
\mathbf{elif}\;t\_m \leq 6.5 \cdot 10^{+97}:\\
\;\;\;\;\left(\ell \cdot \frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_3 \cdot \left(\sin k \cdot {\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3}\right)}\\
\end{array}
\end{array}
\end{array}
if t < 8.9999999999999997e-242Initial program 51.7%
Simplified51.7%
Taylor expanded in t around 0 61.6%
if 8.9999999999999997e-242 < t < 4.9999999999999999e-133Initial program 36.6%
Simplified36.6%
Applied egg-rr66.8%
Taylor expanded in t around 0 86.2%
if 4.9999999999999999e-133 < t < 1.5000000000000001e-66Initial program 60.0%
Simplified60.0%
add-cube-cbrt60.0%
pow360.0%
Applied egg-rr61.8%
*-commutative61.8%
cbrt-prod61.8%
Applied egg-rr61.8%
Taylor expanded in t around 0 90.1%
*-commutative90.1%
associate-*r*90.4%
times-frac90.0%
Simplified90.0%
if 1.5000000000000001e-66 < t < 5.10000000000000019e-20Initial program 66.5%
Simplified66.5%
unpow266.5%
clear-num66.5%
un-div-inv66.5%
Applied egg-rr66.5%
unpow366.5%
times-frac82.1%
pow282.1%
Applied egg-rr82.1%
clear-num82.2%
inv-pow82.2%
Applied egg-rr82.2%
unpow-182.2%
Simplified82.2%
if 5.10000000000000019e-20 < t < 6.4999999999999999e97Initial program 79.9%
Simplified79.8%
associate-*r*83.5%
*-un-lft-identity83.5%
times-frac86.8%
associate-*r*90.1%
Applied egg-rr90.1%
if 6.4999999999999999e97 < t Initial program 58.5%
Simplified58.5%
unpow258.5%
clear-num58.5%
un-div-inv58.5%
Applied egg-rr58.5%
unpow358.5%
times-frac85.0%
pow285.0%
Applied egg-rr85.0%
Applied egg-rr94.5%
*-commutative94.5%
cube-prod94.5%
rem-cube-cbrt94.5%
Simplified94.5%
Final simplification73.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (sin k) 2.0)) (t_3 (pow (/ k t_m) 2.0)))
(*
t_s
(if (<= t_m 1.9e-238)
(* 2.0 (/ (* (pow l 2.0) (cos k)) (* (pow k 2.0) (* t_m t_2))))
(if (<= t_m 4.6e-133)
(/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
(if (<= t_m 1.4e-66)
(* 2.0 (* (/ (cos k) (* t_m (pow k 2.0))) (/ (pow l 2.0) t_2)))
(if (<= t_m 5.2e-21)
(/
2.0
(*
(* (sin k) (* (/ 1.0 (/ l (pow t_m 2.0))) (/ t_m l)))
(* (tan k) (+ 1.0 (+ 1.0 (/ (/ k t_m) (/ t_m k)))))))
(if (<= t_m 2.1e+97)
(*
(* l (/ 2.0 (* (tan k) (* (sin k) (pow t_m 3.0)))))
(/ l (+ 2.0 t_3)))
(/
2.0
(*
(* (tan k) (+ 1.0 (+ t_3 1.0)))
(* (sin k) (pow (/ (pow t_m 1.5) l) 2.0))))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow(sin(k), 2.0);
double t_3 = pow((k / t_m), 2.0);
double tmp;
if (t_m <= 1.9e-238) {
tmp = 2.0 * ((pow(l, 2.0) * cos(k)) / (pow(k, 2.0) * (t_m * t_2)));
} else if (t_m <= 4.6e-133) {
tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
} else if (t_m <= 1.4e-66) {
tmp = 2.0 * ((cos(k) / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / t_2));
} else if (t_m <= 5.2e-21) {
tmp = 2.0 / ((sin(k) * ((1.0 / (l / pow(t_m, 2.0))) * (t_m / l))) * (tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k))))));
} else if (t_m <= 2.1e+97) {
tmp = (l * (2.0 / (tan(k) * (sin(k) * pow(t_m, 3.0))))) * (l / (2.0 + t_3));
} else {
tmp = 2.0 / ((tan(k) * (1.0 + (t_3 + 1.0))) * (sin(k) * pow((pow(t_m, 1.5) / l), 2.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_2 = sin(k) ** 2.0d0
t_3 = (k / t_m) ** 2.0d0
if (t_m <= 1.9d-238) then
tmp = 2.0d0 * (((l ** 2.0d0) * cos(k)) / ((k ** 2.0d0) * (t_m * t_2)))
else if (t_m <= 4.6d-133) then
tmp = 2.0d0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ** 2.0d0)
else if (t_m <= 1.4d-66) then
tmp = 2.0d0 * ((cos(k) / (t_m * (k ** 2.0d0))) * ((l ** 2.0d0) / t_2))
else if (t_m <= 5.2d-21) then
tmp = 2.0d0 / ((sin(k) * ((1.0d0 / (l / (t_m ** 2.0d0))) * (t_m / l))) * (tan(k) * (1.0d0 + (1.0d0 + ((k / t_m) / (t_m / k))))))
else if (t_m <= 2.1d+97) then
tmp = (l * (2.0d0 / (tan(k) * (sin(k) * (t_m ** 3.0d0))))) * (l / (2.0d0 + t_3))
else
tmp = 2.0d0 / ((tan(k) * (1.0d0 + (t_3 + 1.0d0))) * (sin(k) * (((t_m ** 1.5d0) / l) ** 2.0d0)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.pow(Math.sin(k), 2.0);
double t_3 = Math.pow((k / t_m), 2.0);
double tmp;
if (t_m <= 1.9e-238) {
tmp = 2.0 * ((Math.pow(l, 2.0) * Math.cos(k)) / (Math.pow(k, 2.0) * (t_m * t_2)));
} else if (t_m <= 4.6e-133) {
tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
} else if (t_m <= 1.4e-66) {
tmp = 2.0 * ((Math.cos(k) / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / t_2));
} else if (t_m <= 5.2e-21) {
tmp = 2.0 / ((Math.sin(k) * ((1.0 / (l / Math.pow(t_m, 2.0))) * (t_m / l))) * (Math.tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k))))));
} else if (t_m <= 2.1e+97) {
tmp = (l * (2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow(t_m, 3.0))))) * (l / (2.0 + t_3));
} else {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (t_3 + 1.0))) * (Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / l), 2.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = math.pow(math.sin(k), 2.0) t_3 = math.pow((k / t_m), 2.0) tmp = 0 if t_m <= 1.9e-238: tmp = 2.0 * ((math.pow(l, 2.0) * math.cos(k)) / (math.pow(k, 2.0) * (t_m * t_2))) elif t_m <= 4.6e-133: tmp = 2.0 / math.pow((((k * math.sin(k)) / l) * math.sqrt((t_m / math.cos(k)))), 2.0) elif t_m <= 1.4e-66: tmp = 2.0 * ((math.cos(k) / (t_m * math.pow(k, 2.0))) * (math.pow(l, 2.0) / t_2)) elif t_m <= 5.2e-21: tmp = 2.0 / ((math.sin(k) * ((1.0 / (l / math.pow(t_m, 2.0))) * (t_m / l))) * (math.tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k)))))) elif t_m <= 2.1e+97: tmp = (l * (2.0 / (math.tan(k) * (math.sin(k) * math.pow(t_m, 3.0))))) * (l / (2.0 + t_3)) else: tmp = 2.0 / ((math.tan(k) * (1.0 + (t_3 + 1.0))) * (math.sin(k) * math.pow((math.pow(t_m, 1.5) / l), 2.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = sin(k) ^ 2.0 t_3 = Float64(k / t_m) ^ 2.0 tmp = 0.0 if (t_m <= 1.9e-238) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) * cos(k)) / Float64((k ^ 2.0) * Float64(t_m * t_2)))); elseif (t_m <= 4.6e-133) tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)); elseif (t_m <= 1.4e-66) tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / t_2))); elseif (t_m <= 5.2e-21) tmp = Float64(2.0 / Float64(Float64(sin(k) * Float64(Float64(1.0 / Float64(l / (t_m ^ 2.0))) * Float64(t_m / l))) * Float64(tan(k) * Float64(1.0 + Float64(1.0 + Float64(Float64(k / t_m) / Float64(t_m / k))))))); elseif (t_m <= 2.1e+97) tmp = Float64(Float64(l * Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (t_m ^ 3.0))))) * Float64(l / Float64(2.0 + t_3))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(t_3 + 1.0))) * Float64(sin(k) * (Float64((t_m ^ 1.5) / l) ^ 2.0)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = sin(k) ^ 2.0; t_3 = (k / t_m) ^ 2.0; tmp = 0.0; if (t_m <= 1.9e-238) tmp = 2.0 * (((l ^ 2.0) * cos(k)) / ((k ^ 2.0) * (t_m * t_2))); elseif (t_m <= 4.6e-133) tmp = 2.0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ^ 2.0); elseif (t_m <= 1.4e-66) tmp = 2.0 * ((cos(k) / (t_m * (k ^ 2.0))) * ((l ^ 2.0) / t_2)); elseif (t_m <= 5.2e-21) tmp = 2.0 / ((sin(k) * ((1.0 / (l / (t_m ^ 2.0))) * (t_m / l))) * (tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k)))))); elseif (t_m <= 2.1e+97) tmp = (l * (2.0 / (tan(k) * (sin(k) * (t_m ^ 3.0))))) * (l / (2.0 + t_3)); else tmp = 2.0 / ((tan(k) * (1.0 + (t_3 + 1.0))) * (sin(k) * (((t_m ^ 1.5) / l) ^ 2.0))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.9e-238], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.6e-133], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.4e-66], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.2e-21], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[(N[(1.0 / N[(l / N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.1e+97], N[(N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(t$95$3 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {\sin k}^{2}\\
t_3 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.9 \cdot 10^{-238}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t\_m \cdot t\_2\right)}\\
\mathbf{elif}\;t\_m \leq 4.6 \cdot 10^{-133}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 1.4 \cdot 10^{-66}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{t\_2}\right)\\
\mathbf{elif}\;t\_m \leq 5.2 \cdot 10^{-21}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \left(\frac{1}{\frac{\ell}{{t\_m}^{2}}} \cdot \frac{t\_m}{\ell}\right)\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\right)\right)}\\
\mathbf{elif}\;t\_m \leq 2.1 \cdot 10^{+97}:\\
\;\;\;\;\left(\ell \cdot \frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)}\right) \cdot \frac{\ell}{2 + t\_3}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(t\_3 + 1\right)\right)\right) \cdot \left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\right)}\\
\end{array}
\end{array}
\end{array}
if t < 1.8999999999999998e-238Initial program 51.7%
Simplified51.7%
Taylor expanded in t around 0 61.6%
if 1.8999999999999998e-238 < t < 4.6000000000000001e-133Initial program 36.6%
Simplified36.6%
Applied egg-rr66.8%
Taylor expanded in t around 0 86.2%
if 4.6000000000000001e-133 < t < 1.4e-66Initial program 60.0%
Simplified60.0%
add-cube-cbrt60.0%
pow360.0%
Applied egg-rr61.8%
*-commutative61.8%
cbrt-prod61.8%
Applied egg-rr61.8%
Taylor expanded in t around 0 90.1%
*-commutative90.1%
associate-*r*90.4%
times-frac90.0%
Simplified90.0%
if 1.4e-66 < t < 5.20000000000000035e-21Initial program 66.5%
Simplified66.5%
unpow266.5%
clear-num66.5%
un-div-inv66.5%
Applied egg-rr66.5%
unpow366.5%
times-frac82.1%
pow282.1%
Applied egg-rr82.1%
clear-num82.2%
inv-pow82.2%
Applied egg-rr82.2%
unpow-182.2%
Simplified82.2%
if 5.20000000000000035e-21 < t < 2.10000000000000012e97Initial program 79.9%
Simplified79.8%
associate-*r*83.5%
*-un-lft-identity83.5%
times-frac86.8%
associate-*r*90.1%
Applied egg-rr90.1%
if 2.10000000000000012e97 < t Initial program 58.5%
Simplified58.5%
add-sqr-sqrt58.5%
pow258.5%
sqrt-div58.5%
sqrt-pow169.3%
metadata-eval69.3%
sqrt-prod31.9%
add-sqr-sqrt87.5%
Applied egg-rr87.5%
Final simplification72.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (sin k) 2.0))
(t_3 (* (tan k) (+ 1.0 (+ 1.0 (/ (/ k t_m) (/ t_m k)))))))
(*
t_s
(if (<= t_m 1.75e-241)
(* 2.0 (/ (* (pow l 2.0) (cos k)) (* (pow k 2.0) (* t_m t_2))))
(if (<= t_m 6.2e-133)
(/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
(if (<= t_m 1.3e-66)
(* 2.0 (* (/ (cos k) (* t_m (pow k 2.0))) (/ (pow l 2.0) t_2)))
(if (<= t_m 4.9e-20)
(/
2.0
(* (* (sin k) (* (/ 1.0 (/ l (pow t_m 2.0))) (/ t_m l))) t_3))
(if (<= t_m 6.5e+97)
(*
(* l (/ 2.0 (* (tan k) (* (sin k) (pow t_m 3.0)))))
(/ l (+ 2.0 (pow (/ k t_m) 2.0))))
(/ 2.0 (* t_3 (* (sin k) (pow (/ (pow t_m 1.5) l) 2.0))))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow(sin(k), 2.0);
double t_3 = tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k))));
double tmp;
if (t_m <= 1.75e-241) {
tmp = 2.0 * ((pow(l, 2.0) * cos(k)) / (pow(k, 2.0) * (t_m * t_2)));
} else if (t_m <= 6.2e-133) {
tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
} else if (t_m <= 1.3e-66) {
tmp = 2.0 * ((cos(k) / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / t_2));
} else if (t_m <= 4.9e-20) {
tmp = 2.0 / ((sin(k) * ((1.0 / (l / pow(t_m, 2.0))) * (t_m / l))) * t_3);
} else if (t_m <= 6.5e+97) {
tmp = (l * (2.0 / (tan(k) * (sin(k) * pow(t_m, 3.0))))) * (l / (2.0 + pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / (t_3 * (sin(k) * pow((pow(t_m, 1.5) / l), 2.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_2 = sin(k) ** 2.0d0
t_3 = tan(k) * (1.0d0 + (1.0d0 + ((k / t_m) / (t_m / k))))
if (t_m <= 1.75d-241) then
tmp = 2.0d0 * (((l ** 2.0d0) * cos(k)) / ((k ** 2.0d0) * (t_m * t_2)))
else if (t_m <= 6.2d-133) then
tmp = 2.0d0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ** 2.0d0)
else if (t_m <= 1.3d-66) then
tmp = 2.0d0 * ((cos(k) / (t_m * (k ** 2.0d0))) * ((l ** 2.0d0) / t_2))
else if (t_m <= 4.9d-20) then
tmp = 2.0d0 / ((sin(k) * ((1.0d0 / (l / (t_m ** 2.0d0))) * (t_m / l))) * t_3)
else if (t_m <= 6.5d+97) then
tmp = (l * (2.0d0 / (tan(k) * (sin(k) * (t_m ** 3.0d0))))) * (l / (2.0d0 + ((k / t_m) ** 2.0d0)))
else
tmp = 2.0d0 / (t_3 * (sin(k) * (((t_m ** 1.5d0) / l) ** 2.0d0)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.pow(Math.sin(k), 2.0);
double t_3 = Math.tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k))));
double tmp;
if (t_m <= 1.75e-241) {
tmp = 2.0 * ((Math.pow(l, 2.0) * Math.cos(k)) / (Math.pow(k, 2.0) * (t_m * t_2)));
} else if (t_m <= 6.2e-133) {
tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
} else if (t_m <= 1.3e-66) {
tmp = 2.0 * ((Math.cos(k) / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / t_2));
} else if (t_m <= 4.9e-20) {
tmp = 2.0 / ((Math.sin(k) * ((1.0 / (l / Math.pow(t_m, 2.0))) * (t_m / l))) * t_3);
} else if (t_m <= 6.5e+97) {
tmp = (l * (2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow(t_m, 3.0))))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / (t_3 * (Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / l), 2.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = math.pow(math.sin(k), 2.0) t_3 = math.tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k)))) tmp = 0 if t_m <= 1.75e-241: tmp = 2.0 * ((math.pow(l, 2.0) * math.cos(k)) / (math.pow(k, 2.0) * (t_m * t_2))) elif t_m <= 6.2e-133: tmp = 2.0 / math.pow((((k * math.sin(k)) / l) * math.sqrt((t_m / math.cos(k)))), 2.0) elif t_m <= 1.3e-66: tmp = 2.0 * ((math.cos(k) / (t_m * math.pow(k, 2.0))) * (math.pow(l, 2.0) / t_2)) elif t_m <= 4.9e-20: tmp = 2.0 / ((math.sin(k) * ((1.0 / (l / math.pow(t_m, 2.0))) * (t_m / l))) * t_3) elif t_m <= 6.5e+97: tmp = (l * (2.0 / (math.tan(k) * (math.sin(k) * math.pow(t_m, 3.0))))) * (l / (2.0 + math.pow((k / t_m), 2.0))) else: tmp = 2.0 / (t_3 * (math.sin(k) * math.pow((math.pow(t_m, 1.5) / l), 2.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = sin(k) ^ 2.0 t_3 = Float64(tan(k) * Float64(1.0 + Float64(1.0 + Float64(Float64(k / t_m) / Float64(t_m / k))))) tmp = 0.0 if (t_m <= 1.75e-241) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) * cos(k)) / Float64((k ^ 2.0) * Float64(t_m * t_2)))); elseif (t_m <= 6.2e-133) tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)); elseif (t_m <= 1.3e-66) tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / t_2))); elseif (t_m <= 4.9e-20) tmp = Float64(2.0 / Float64(Float64(sin(k) * Float64(Float64(1.0 / Float64(l / (t_m ^ 2.0))) * Float64(t_m / l))) * t_3)); elseif (t_m <= 6.5e+97) tmp = Float64(Float64(l * Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (t_m ^ 3.0))))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); else tmp = Float64(2.0 / Float64(t_3 * Float64(sin(k) * (Float64((t_m ^ 1.5) / l) ^ 2.0)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = sin(k) ^ 2.0; t_3 = tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k)))); tmp = 0.0; if (t_m <= 1.75e-241) tmp = 2.0 * (((l ^ 2.0) * cos(k)) / ((k ^ 2.0) * (t_m * t_2))); elseif (t_m <= 6.2e-133) tmp = 2.0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ^ 2.0); elseif (t_m <= 1.3e-66) tmp = 2.0 * ((cos(k) / (t_m * (k ^ 2.0))) * ((l ^ 2.0) / t_2)); elseif (t_m <= 4.9e-20) tmp = 2.0 / ((sin(k) * ((1.0 / (l / (t_m ^ 2.0))) * (t_m / l))) * t_3); elseif (t_m <= 6.5e+97) tmp = (l * (2.0 / (tan(k) * (sin(k) * (t_m ^ 3.0))))) * (l / (2.0 + ((k / t_m) ^ 2.0))); else tmp = 2.0 / (t_3 * (sin(k) * (((t_m ^ 1.5) / l) ^ 2.0))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.75e-241], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 6.2e-133], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.3e-66], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.9e-20], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[(N[(1.0 / N[(l / N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 6.5e+97], N[(N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$3 * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {\sin k}^{2}\\
t_3 := \tan k \cdot \left(1 + \left(1 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.75 \cdot 10^{-241}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t\_m \cdot t\_2\right)}\\
\mathbf{elif}\;t\_m \leq 6.2 \cdot 10^{-133}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 1.3 \cdot 10^{-66}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{t\_2}\right)\\
\mathbf{elif}\;t\_m \leq 4.9 \cdot 10^{-20}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \left(\frac{1}{\frac{\ell}{{t\_m}^{2}}} \cdot \frac{t\_m}{\ell}\right)\right) \cdot t\_3}\\
\mathbf{elif}\;t\_m \leq 6.5 \cdot 10^{+97}:\\
\;\;\;\;\left(\ell \cdot \frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_3 \cdot \left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\right)}\\
\end{array}
\end{array}
\end{array}
if t < 1.7499999999999999e-241Initial program 51.7%
Simplified51.7%
Taylor expanded in t around 0 61.6%
if 1.7499999999999999e-241 < t < 6.20000000000000032e-133Initial program 36.6%
Simplified36.6%
Applied egg-rr66.8%
Taylor expanded in t around 0 86.2%
if 6.20000000000000032e-133 < t < 1.2999999999999999e-66Initial program 60.0%
Simplified60.0%
add-cube-cbrt60.0%
pow360.0%
Applied egg-rr61.8%
*-commutative61.8%
cbrt-prod61.8%
Applied egg-rr61.8%
Taylor expanded in t around 0 90.1%
*-commutative90.1%
associate-*r*90.4%
times-frac90.0%
Simplified90.0%
if 1.2999999999999999e-66 < t < 4.9000000000000002e-20Initial program 66.5%
Simplified66.5%
unpow266.5%
clear-num66.5%
un-div-inv66.5%
Applied egg-rr66.5%
unpow366.5%
times-frac82.1%
pow282.1%
Applied egg-rr82.1%
clear-num82.2%
inv-pow82.2%
Applied egg-rr82.2%
unpow-182.2%
Simplified82.2%
if 4.9000000000000002e-20 < t < 6.4999999999999999e97Initial program 79.9%
Simplified79.8%
associate-*r*83.5%
*-un-lft-identity83.5%
times-frac86.8%
associate-*r*90.1%
Applied egg-rr90.1%
if 6.4999999999999999e97 < t Initial program 58.5%
Simplified58.5%
unpow258.5%
clear-num58.5%
un-div-inv58.5%
Applied egg-rr58.5%
add-sqr-sqrt58.5%
pow258.5%
sqrt-div58.5%
sqrt-pow169.3%
metadata-eval69.3%
sqrt-prod31.9%
add-sqr-sqrt87.5%
Applied egg-rr87.5%
Final simplification72.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (* (tan k) (+ 1.0 (+ 1.0 (/ (/ k t_m) (/ t_m k))))))
(t_3
(*
2.0
(*
(/ (cos k) (* t_m (pow k 2.0)))
(/ (pow l 2.0) (pow (sin k) 2.0))))))
(*
t_s
(if (<= t_m 3.8e-241)
t_3
(if (<= t_m 6e-133)
(/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
(if (<= t_m 1.75e-66)
t_3
(if (<= t_m 3e-20)
(/
2.0
(* (* (sin k) (* (/ 1.0 (/ l (pow t_m 2.0))) (/ t_m l))) t_2))
(if (<= t_m 6.5e+97)
(*
(* l (/ 2.0 (* (tan k) (* (sin k) (pow t_m 3.0)))))
(/ l (+ 2.0 (pow (/ k t_m) 2.0))))
(/ 2.0 (* t_2 (* (sin k) (pow (/ (pow t_m 1.5) l) 2.0))))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k))));
double t_3 = 2.0 * ((cos(k) / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / pow(sin(k), 2.0)));
double tmp;
if (t_m <= 3.8e-241) {
tmp = t_3;
} else if (t_m <= 6e-133) {
tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
} else if (t_m <= 1.75e-66) {
tmp = t_3;
} else if (t_m <= 3e-20) {
tmp = 2.0 / ((sin(k) * ((1.0 / (l / pow(t_m, 2.0))) * (t_m / l))) * t_2);
} else if (t_m <= 6.5e+97) {
tmp = (l * (2.0 / (tan(k) * (sin(k) * pow(t_m, 3.0))))) * (l / (2.0 + pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / (t_2 * (sin(k) * pow((pow(t_m, 1.5) / l), 2.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_2 = tan(k) * (1.0d0 + (1.0d0 + ((k / t_m) / (t_m / k))))
t_3 = 2.0d0 * ((cos(k) / (t_m * (k ** 2.0d0))) * ((l ** 2.0d0) / (sin(k) ** 2.0d0)))
if (t_m <= 3.8d-241) then
tmp = t_3
else if (t_m <= 6d-133) then
tmp = 2.0d0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ** 2.0d0)
else if (t_m <= 1.75d-66) then
tmp = t_3
else if (t_m <= 3d-20) then
tmp = 2.0d0 / ((sin(k) * ((1.0d0 / (l / (t_m ** 2.0d0))) * (t_m / l))) * t_2)
else if (t_m <= 6.5d+97) then
tmp = (l * (2.0d0 / (tan(k) * (sin(k) * (t_m ** 3.0d0))))) * (l / (2.0d0 + ((k / t_m) ** 2.0d0)))
else
tmp = 2.0d0 / (t_2 * (sin(k) * (((t_m ** 1.5d0) / l) ** 2.0d0)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k))));
double t_3 = 2.0 * ((Math.cos(k) / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / Math.pow(Math.sin(k), 2.0)));
double tmp;
if (t_m <= 3.8e-241) {
tmp = t_3;
} else if (t_m <= 6e-133) {
tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
} else if (t_m <= 1.75e-66) {
tmp = t_3;
} else if (t_m <= 3e-20) {
tmp = 2.0 / ((Math.sin(k) * ((1.0 / (l / Math.pow(t_m, 2.0))) * (t_m / l))) * t_2);
} else if (t_m <= 6.5e+97) {
tmp = (l * (2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow(t_m, 3.0))))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / (t_2 * (Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / l), 2.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = math.tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k)))) t_3 = 2.0 * ((math.cos(k) / (t_m * math.pow(k, 2.0))) * (math.pow(l, 2.0) / math.pow(math.sin(k), 2.0))) tmp = 0 if t_m <= 3.8e-241: tmp = t_3 elif t_m <= 6e-133: tmp = 2.0 / math.pow((((k * math.sin(k)) / l) * math.sqrt((t_m / math.cos(k)))), 2.0) elif t_m <= 1.75e-66: tmp = t_3 elif t_m <= 3e-20: tmp = 2.0 / ((math.sin(k) * ((1.0 / (l / math.pow(t_m, 2.0))) * (t_m / l))) * t_2) elif t_m <= 6.5e+97: tmp = (l * (2.0 / (math.tan(k) * (math.sin(k) * math.pow(t_m, 3.0))))) * (l / (2.0 + math.pow((k / t_m), 2.0))) else: tmp = 2.0 / (t_2 * (math.sin(k) * math.pow((math.pow(t_m, 1.5) / l), 2.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(tan(k) * Float64(1.0 + Float64(1.0 + Float64(Float64(k / t_m) / Float64(t_m / k))))) t_3 = Float64(2.0 * Float64(Float64(cos(k) / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / (sin(k) ^ 2.0)))) tmp = 0.0 if (t_m <= 3.8e-241) tmp = t_3; elseif (t_m <= 6e-133) tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)); elseif (t_m <= 1.75e-66) tmp = t_3; elseif (t_m <= 3e-20) tmp = Float64(2.0 / Float64(Float64(sin(k) * Float64(Float64(1.0 / Float64(l / (t_m ^ 2.0))) * Float64(t_m / l))) * t_2)); elseif (t_m <= 6.5e+97) tmp = Float64(Float64(l * Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (t_m ^ 3.0))))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); else tmp = Float64(2.0 / Float64(t_2 * Float64(sin(k) * (Float64((t_m ^ 1.5) / l) ^ 2.0)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k)))); t_3 = 2.0 * ((cos(k) / (t_m * (k ^ 2.0))) * ((l ^ 2.0) / (sin(k) ^ 2.0))); tmp = 0.0; if (t_m <= 3.8e-241) tmp = t_3; elseif (t_m <= 6e-133) tmp = 2.0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ^ 2.0); elseif (t_m <= 1.75e-66) tmp = t_3; elseif (t_m <= 3e-20) tmp = 2.0 / ((sin(k) * ((1.0 / (l / (t_m ^ 2.0))) * (t_m / l))) * t_2); elseif (t_m <= 6.5e+97) tmp = (l * (2.0 / (tan(k) * (sin(k) * (t_m ^ 3.0))))) * (l / (2.0 + ((k / t_m) ^ 2.0))); else tmp = 2.0 / (t_2 * (sin(k) * (((t_m ^ 1.5) / l) ^ 2.0))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 3.8e-241], t$95$3, If[LessEqual[t$95$m, 6e-133], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.75e-66], t$95$3, If[LessEqual[t$95$m, 3e-20], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[(N[(1.0 / N[(l / N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 6.5e+97], N[(N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$2 * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \tan k \cdot \left(1 + \left(1 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\right)\\
t_3 := 2 \cdot \left(\frac{\cos k}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{{\sin k}^{2}}\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.8 \cdot 10^{-241}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_m \leq 6 \cdot 10^{-133}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 1.75 \cdot 10^{-66}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_m \leq 3 \cdot 10^{-20}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \left(\frac{1}{\frac{\ell}{{t\_m}^{2}}} \cdot \frac{t\_m}{\ell}\right)\right) \cdot t\_2}\\
\mathbf{elif}\;t\_m \leq 6.5 \cdot 10^{+97}:\\
\;\;\;\;\left(\ell \cdot \frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_2 \cdot \left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\right)}\\
\end{array}
\end{array}
\end{array}
if t < 3.7999999999999999e-241 or 6.00000000000000038e-133 < t < 1.75e-66Initial program 52.2%
Simplified52.2%
add-cube-cbrt52.2%
pow352.2%
Applied egg-rr65.0%
*-commutative65.0%
cbrt-prod75.6%
Applied egg-rr75.6%
Taylor expanded in t around 0 63.5%
*-commutative63.5%
associate-*r*63.5%
times-frac64.1%
Simplified64.1%
if 3.7999999999999999e-241 < t < 6.00000000000000038e-133Initial program 36.6%
Simplified36.6%
Applied egg-rr66.8%
Taylor expanded in t around 0 86.2%
if 1.75e-66 < t < 3.00000000000000029e-20Initial program 66.5%
Simplified66.5%
unpow266.5%
clear-num66.5%
un-div-inv66.5%
Applied egg-rr66.5%
unpow366.5%
times-frac82.1%
pow282.1%
Applied egg-rr82.1%
clear-num82.2%
inv-pow82.2%
Applied egg-rr82.2%
unpow-182.2%
Simplified82.2%
if 3.00000000000000029e-20 < t < 6.4999999999999999e97Initial program 79.9%
Simplified79.8%
associate-*r*83.5%
*-un-lft-identity83.5%
times-frac86.8%
associate-*r*90.1%
Applied egg-rr90.1%
if 6.4999999999999999e97 < t Initial program 58.5%
Simplified58.5%
unpow258.5%
clear-num58.5%
un-div-inv58.5%
Applied egg-rr58.5%
add-sqr-sqrt58.5%
pow258.5%
sqrt-div58.5%
sqrt-pow169.3%
metadata-eval69.3%
sqrt-prod31.9%
add-sqr-sqrt87.5%
Applied egg-rr87.5%
Final simplification73.2%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.15e-65)
(/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
(/
2.0
(*
(* (tan k) (+ 1.0 (+ 1.0 (/ (/ k t_m) (/ t_m k)))))
(* (sin k) (pow (/ (pow t_m 1.5) l) 2.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.15e-65) {
tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
} else {
tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k))))) * (sin(k) * pow((pow(t_m, 1.5) / l), 2.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1.15d-65) then
tmp = 2.0d0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ** 2.0d0)
else
tmp = 2.0d0 / ((tan(k) * (1.0d0 + (1.0d0 + ((k / t_m) / (t_m / k))))) * (sin(k) * (((t_m ** 1.5d0) / l) ** 2.0d0)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.15e-65) {
tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
} else {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k))))) * (Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / l), 2.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 1.15e-65: tmp = 2.0 / math.pow((((k * math.sin(k)) / l) * math.sqrt((t_m / math.cos(k)))), 2.0) else: tmp = 2.0 / ((math.tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k))))) * (math.sin(k) * math.pow((math.pow(t_m, 1.5) / l), 2.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.15e-65) tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(1.0 + Float64(Float64(k / t_m) / Float64(t_m / k))))) * Float64(sin(k) * (Float64((t_m ^ 1.5) / l) ^ 2.0)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 1.15e-65) tmp = 2.0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ^ 2.0); else tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k))))) * (sin(k) * (((t_m ^ 1.5) / l) ^ 2.0))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.15e-65], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.15 \cdot 10^{-65}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(1 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\right)\right) \cdot \left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\right)}\\
\end{array}
\end{array}
if t < 1.15e-65Initial program 50.9%
Simplified50.8%
Applied egg-rr14.9%
Taylor expanded in t around 0 32.1%
if 1.15e-65 < t Initial program 66.7%
Simplified66.7%
unpow266.7%
clear-num66.7%
un-div-inv66.7%
Applied egg-rr66.7%
add-sqr-sqrt66.8%
pow266.8%
sqrt-div66.7%
sqrt-pow172.2%
metadata-eval72.2%
sqrt-prod29.2%
add-sqr-sqrt84.8%
Applied egg-rr84.8%
Final simplification47.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 8e-67)
(/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
(/
2.0
(*
(* (sin k) (* (/ 1.0 (/ l (pow t_m 2.0))) (/ t_m l)))
(* (tan k) (+ 1.0 (+ 1.0 (/ (/ k t_m) (/ t_m k))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 8e-67) {
tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
} else {
tmp = 2.0 / ((sin(k) * ((1.0 / (l / pow(t_m, 2.0))) * (t_m / l))) * (tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k))))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 8d-67) then
tmp = 2.0d0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ** 2.0d0)
else
tmp = 2.0d0 / ((sin(k) * ((1.0d0 / (l / (t_m ** 2.0d0))) * (t_m / l))) * (tan(k) * (1.0d0 + (1.0d0 + ((k / t_m) / (t_m / k))))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 8e-67) {
tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
} else {
tmp = 2.0 / ((Math.sin(k) * ((1.0 / (l / Math.pow(t_m, 2.0))) * (t_m / l))) * (Math.tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k))))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 8e-67: tmp = 2.0 / math.pow((((k * math.sin(k)) / l) * math.sqrt((t_m / math.cos(k)))), 2.0) else: tmp = 2.0 / ((math.sin(k) * ((1.0 / (l / math.pow(t_m, 2.0))) * (t_m / l))) * (math.tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k)))))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 8e-67) tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)); else tmp = Float64(2.0 / Float64(Float64(sin(k) * Float64(Float64(1.0 / Float64(l / (t_m ^ 2.0))) * Float64(t_m / l))) * Float64(tan(k) * Float64(1.0 + Float64(1.0 + Float64(Float64(k / t_m) / Float64(t_m / k))))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 8e-67) tmp = 2.0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ^ 2.0); else tmp = 2.0 / ((sin(k) * ((1.0 / (l / (t_m ^ 2.0))) * (t_m / l))) * (tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k)))))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 8e-67], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[(N[(1.0 / N[(l / N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 8 \cdot 10^{-67}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \left(\frac{1}{\frac{\ell}{{t\_m}^{2}}} \cdot \frac{t\_m}{\ell}\right)\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\right)\right)}\\
\end{array}
\end{array}
if t < 7.99999999999999954e-67Initial program 50.3%
Simplified50.3%
Applied egg-rr13.9%
Taylor expanded in t around 0 31.3%
if 7.99999999999999954e-67 < t Initial program 67.6%
Simplified67.6%
unpow267.6%
clear-num67.6%
un-div-inv67.6%
Applied egg-rr67.6%
unpow367.6%
times-frac84.0%
pow284.0%
Applied egg-rr84.0%
clear-num84.1%
inv-pow84.1%
Applied egg-rr84.1%
unpow-184.1%
Simplified84.1%
Final simplification47.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.02e-66)
(/ 2.0 (pow (* (sqrt (/ t_m (cos k))) (* k (/ (sin k) l))) 2.0))
(/
2.0
(*
(* (sin k) (* (/ 1.0 (/ l (pow t_m 2.0))) (/ t_m l)))
(* (tan k) (+ 1.0 (+ 1.0 (/ (/ k t_m) (/ t_m k))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.02e-66) {
tmp = 2.0 / pow((sqrt((t_m / cos(k))) * (k * (sin(k) / l))), 2.0);
} else {
tmp = 2.0 / ((sin(k) * ((1.0 / (l / pow(t_m, 2.0))) * (t_m / l))) * (tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k))))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1.02d-66) then
tmp = 2.0d0 / ((sqrt((t_m / cos(k))) * (k * (sin(k) / l))) ** 2.0d0)
else
tmp = 2.0d0 / ((sin(k) * ((1.0d0 / (l / (t_m ** 2.0d0))) * (t_m / l))) * (tan(k) * (1.0d0 + (1.0d0 + ((k / t_m) / (t_m / k))))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.02e-66) {
tmp = 2.0 / Math.pow((Math.sqrt((t_m / Math.cos(k))) * (k * (Math.sin(k) / l))), 2.0);
} else {
tmp = 2.0 / ((Math.sin(k) * ((1.0 / (l / Math.pow(t_m, 2.0))) * (t_m / l))) * (Math.tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k))))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 1.02e-66: tmp = 2.0 / math.pow((math.sqrt((t_m / math.cos(k))) * (k * (math.sin(k) / l))), 2.0) else: tmp = 2.0 / ((math.sin(k) * ((1.0 / (l / math.pow(t_m, 2.0))) * (t_m / l))) * (math.tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k)))))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.02e-66) tmp = Float64(2.0 / (Float64(sqrt(Float64(t_m / cos(k))) * Float64(k * Float64(sin(k) / l))) ^ 2.0)); else tmp = Float64(2.0 / Float64(Float64(sin(k) * Float64(Float64(1.0 / Float64(l / (t_m ^ 2.0))) * Float64(t_m / l))) * Float64(tan(k) * Float64(1.0 + Float64(1.0 + Float64(Float64(k / t_m) / Float64(t_m / k))))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 1.02e-66) tmp = 2.0 / ((sqrt((t_m / cos(k))) * (k * (sin(k) / l))) ^ 2.0); else tmp = 2.0 / ((sin(k) * ((1.0 / (l / (t_m ^ 2.0))) * (t_m / l))) * (tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k)))))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.02e-66], N[(2.0 / N[Power[N[(N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[(N[(1.0 / N[(l / N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.02 \cdot 10^{-66}:\\
\;\;\;\;\frac{2}{{\left(\sqrt{\frac{t\_m}{\cos k}} \cdot \left(k \cdot \frac{\sin k}{\ell}\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \left(\frac{1}{\frac{\ell}{{t\_m}^{2}}} \cdot \frac{t\_m}{\ell}\right)\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\right)\right)}\\
\end{array}
\end{array}
if t < 1.01999999999999996e-66Initial program 50.3%
Simplified50.3%
Applied egg-rr13.9%
Taylor expanded in t around 0 31.3%
associate-/l*31.3%
Simplified31.3%
if 1.01999999999999996e-66 < t Initial program 67.6%
Simplified67.6%
unpow267.6%
clear-num67.6%
un-div-inv67.6%
Applied egg-rr67.6%
unpow367.6%
times-frac84.0%
pow284.0%
Applied egg-rr84.0%
clear-num84.1%
inv-pow84.1%
Applied egg-rr84.1%
unpow-184.1%
Simplified84.1%
Final simplification47.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 8.2e-126)
(* l (/ 2.0 (pow (* t_m (cbrt (/ (* 2.0 (pow k 2.0)) l))) 3.0)))
(/
2.0
(*
(* (sin k) (* (/ 1.0 (/ l (pow t_m 2.0))) (/ t_m l)))
(* (tan k) (+ 1.0 (+ 1.0 (/ (/ k t_m) (/ t_m k))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 8.2e-126) {
tmp = l * (2.0 / pow((t_m * cbrt(((2.0 * pow(k, 2.0)) / l))), 3.0));
} else {
tmp = 2.0 / ((sin(k) * ((1.0 / (l / pow(t_m, 2.0))) * (t_m / l))) * (tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k))))));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 8.2e-126) {
tmp = l * (2.0 / Math.pow((t_m * Math.cbrt(((2.0 * Math.pow(k, 2.0)) / l))), 3.0));
} else {
tmp = 2.0 / ((Math.sin(k) * ((1.0 / (l / Math.pow(t_m, 2.0))) * (t_m / l))) * (Math.tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k))))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 8.2e-126) tmp = Float64(l * Float64(2.0 / (Float64(t_m * cbrt(Float64(Float64(2.0 * (k ^ 2.0)) / l))) ^ 3.0))); else tmp = Float64(2.0 / Float64(Float64(sin(k) * Float64(Float64(1.0 / Float64(l / (t_m ^ 2.0))) * Float64(t_m / l))) * Float64(tan(k) * Float64(1.0 + Float64(1.0 + Float64(Float64(k / t_m) / Float64(t_m / k))))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 8.2e-126], N[(l * N[(2.0 / N[Power[N[(t$95$m * N[Power[N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[(N[(1.0 / N[(l / N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 8.2 \cdot 10^{-126}:\\
\;\;\;\;\ell \cdot \frac{2}{{\left(t\_m \cdot \sqrt[3]{\frac{2 \cdot {k}^{2}}{\ell}}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \left(\frac{1}{\frac{\ell}{{t\_m}^{2}}} \cdot \frac{t\_m}{\ell}\right)\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\right)\right)}\\
\end{array}
\end{array}
if t < 8.1999999999999995e-126Initial program 49.4%
Simplified48.2%
Taylor expanded in k around 0 49.1%
associate-*l/49.3%
Applied egg-rr49.3%
associate-/r/49.3%
associate-*l/49.9%
Applied egg-rr49.9%
add-cube-cbrt49.8%
pow349.8%
associate-/l*49.9%
cbrt-prod49.8%
unpow349.8%
add-cbrt-cube61.4%
Applied egg-rr61.4%
if 8.1999999999999995e-126 < t Initial program 67.5%
Simplified67.5%
unpow267.5%
clear-num67.5%
un-div-inv67.5%
Applied egg-rr67.5%
unpow367.5%
times-frac82.3%
pow282.3%
Applied egg-rr82.3%
clear-num82.4%
inv-pow82.4%
Applied egg-rr82.4%
unpow-182.4%
Simplified82.4%
Final simplification68.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 4.4e-131)
(* l (/ 2.0 (pow (* t_m (cbrt (/ (* 2.0 (pow k 2.0)) l))) 3.0)))
(/
2.0
(*
(* (tan k) (+ 1.0 (+ 1.0 (/ (/ k t_m) (/ t_m k)))))
(* (sin k) (* (/ t_m l) (/ (pow t_m 2.0) l))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4.4e-131) {
tmp = l * (2.0 / pow((t_m * cbrt(((2.0 * pow(k, 2.0)) / l))), 3.0));
} else {
tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k))))) * (sin(k) * ((t_m / l) * (pow(t_m, 2.0) / l))));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4.4e-131) {
tmp = l * (2.0 / Math.pow((t_m * Math.cbrt(((2.0 * Math.pow(k, 2.0)) / l))), 3.0));
} else {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k))))) * (Math.sin(k) * ((t_m / l) * (Math.pow(t_m, 2.0) / l))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 4.4e-131) tmp = Float64(l * Float64(2.0 / (Float64(t_m * cbrt(Float64(Float64(2.0 * (k ^ 2.0)) / l))) ^ 3.0))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(1.0 + Float64(Float64(k / t_m) / Float64(t_m / k))))) * Float64(sin(k) * Float64(Float64(t_m / l) * Float64((t_m ^ 2.0) / l))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 4.4e-131], N[(l * N[(2.0 / N[Power[N[(t$95$m * N[Power[N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.4 \cdot 10^{-131}:\\
\;\;\;\;\ell \cdot \frac{2}{{\left(t\_m \cdot \sqrt[3]{\frac{2 \cdot {k}^{2}}{\ell}}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(1 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\right)\right) \cdot \left(\sin k \cdot \left(\frac{t\_m}{\ell} \cdot \frac{{t\_m}^{2}}{\ell}\right)\right)}\\
\end{array}
\end{array}
if t < 4.3999999999999999e-131Initial program 49.4%
Simplified48.2%
Taylor expanded in k around 0 49.1%
associate-*l/49.3%
Applied egg-rr49.3%
associate-/r/49.3%
associate-*l/49.9%
Applied egg-rr49.9%
add-cube-cbrt49.8%
pow349.8%
associate-/l*49.9%
cbrt-prod49.8%
unpow349.8%
add-cbrt-cube61.4%
Applied egg-rr61.4%
if 4.3999999999999999e-131 < t Initial program 67.5%
Simplified67.5%
unpow267.5%
clear-num67.5%
un-div-inv67.5%
Applied egg-rr67.5%
unpow367.5%
times-frac82.3%
pow282.3%
Applied egg-rr82.3%
Final simplification68.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 6.8e-55)
(/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 2.0))
(* l (/ 2.0 (pow (* t_m (cbrt (/ (* 2.0 (pow k 2.0)) l))) 3.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 6.8e-55) {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 2.0);
} else {
tmp = l * (2.0 / pow((t_m * cbrt(((2.0 * pow(k, 2.0)) / l))), 3.0));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 6.8e-55) {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 2.0);
} else {
tmp = l * (2.0 / Math.pow((t_m * Math.cbrt(((2.0 * Math.pow(k, 2.0)) / l))), 3.0));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 6.8e-55) tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0)); else tmp = Float64(l * Float64(2.0 / (Float64(t_m * cbrt(Float64(Float64(2.0 * (k ^ 2.0)) / l))) ^ 3.0))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 6.8e-55], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(l * N[(2.0 / N[Power[N[(t$95$m * N[Power[N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 6.8 \cdot 10^{-55}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{2}{{\left(t\_m \cdot \sqrt[3]{\frac{2 \cdot {k}^{2}}{\ell}}\right)}^{3}}\\
\end{array}
\end{array}
if k < 6.79999999999999946e-55Initial program 57.7%
Simplified57.7%
Applied egg-rr27.7%
Taylor expanded in k around 0 33.2%
if 6.79999999999999946e-55 < k Initial program 50.2%
Simplified54.6%
Taylor expanded in k around 0 50.9%
associate-*l/51.0%
Applied egg-rr51.0%
associate-/r/51.0%
associate-*l/52.4%
Applied egg-rr52.4%
add-cube-cbrt52.4%
pow352.3%
associate-/l*52.4%
cbrt-prod52.3%
unpow352.3%
add-cbrt-cube63.7%
Applied egg-rr63.7%
Final simplification41.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 3e+151)
(/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 2.0))
(* l (/ 2.0 (/ (pow (* t_m (cbrt (* 2.0 (pow k 2.0)))) 3.0) l))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 3e+151) {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 2.0);
} else {
tmp = l * (2.0 / (pow((t_m * cbrt((2.0 * pow(k, 2.0)))), 3.0) / l));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 3e+151) {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 2.0);
} else {
tmp = l * (2.0 / (Math.pow((t_m * Math.cbrt((2.0 * Math.pow(k, 2.0)))), 3.0) / l));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 3e+151) tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0)); else tmp = Float64(l * Float64(2.0 / Float64((Float64(t_m * cbrt(Float64(2.0 * (k ^ 2.0)))) ^ 3.0) / l))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 3e+151], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(l * N[(2.0 / N[(N[Power[N[(t$95$m * N[Power[N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 3 \cdot 10^{+151}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{2}{\frac{{\left(t\_m \cdot \sqrt[3]{2 \cdot {k}^{2}}\right)}^{3}}{\ell}}\\
\end{array}
\end{array}
if k < 2.9999999999999999e151Initial program 58.4%
Simplified58.4%
Applied egg-rr26.0%
Taylor expanded in k around 0 32.4%
if 2.9999999999999999e151 < k Initial program 36.5%
Simplified46.0%
Taylor expanded in k around 0 46.0%
associate-*l/46.1%
Applied egg-rr46.1%
associate-/r/46.1%
associate-*l/49.1%
Applied egg-rr49.1%
add-cube-cbrt49.1%
pow349.1%
cbrt-prod49.1%
unpow349.1%
add-cbrt-cube73.9%
Applied egg-rr73.9%
Final simplification37.7%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 2.0))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 2.0));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / ((((t_m ** 1.5d0) / l) * (k * sqrt(2.0d0))) ** 2.0d0))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 2.0));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / math.pow(((math.pow(t_m, 1.5) / l) * (k * math.sqrt(2.0))), 2.0))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / ((((t_m ^ 1.5) / l) * (k * sqrt(2.0))) ^ 2.0)); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}
\end{array}
Initial program 55.6%
Simplified55.6%
Applied egg-rr25.0%
Taylor expanded in k around 0 32.2%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 320000000.0)
(/ 2.0 (* (* (sin k) (* (/ t_m l) (/ (pow t_m 2.0) l))) (* 2.0 k)))
(* l (/ l (* (pow k 2.0) (pow t_m 3.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 320000000.0) {
tmp = 2.0 / ((sin(k) * ((t_m / l) * (pow(t_m, 2.0) / l))) * (2.0 * k));
} else {
tmp = l * (l / (pow(k, 2.0) * pow(t_m, 3.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 320000000.0d0) then
tmp = 2.0d0 / ((sin(k) * ((t_m / l) * ((t_m ** 2.0d0) / l))) * (2.0d0 * k))
else
tmp = l * (l / ((k ** 2.0d0) * (t_m ** 3.0d0)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 320000000.0) {
tmp = 2.0 / ((Math.sin(k) * ((t_m / l) * (Math.pow(t_m, 2.0) / l))) * (2.0 * k));
} else {
tmp = l * (l / (Math.pow(k, 2.0) * Math.pow(t_m, 3.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 320000000.0: tmp = 2.0 / ((math.sin(k) * ((t_m / l) * (math.pow(t_m, 2.0) / l))) * (2.0 * k)) else: tmp = l * (l / (math.pow(k, 2.0) * math.pow(t_m, 3.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 320000000.0) tmp = Float64(2.0 / Float64(Float64(sin(k) * Float64(Float64(t_m / l) * Float64((t_m ^ 2.0) / l))) * Float64(2.0 * k))); else tmp = Float64(l * Float64(l / Float64((k ^ 2.0) * (t_m ^ 3.0)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 320000000.0) tmp = 2.0 / ((sin(k) * ((t_m / l) * ((t_m ^ 2.0) / l))) * (2.0 * k)); else tmp = l * (l / ((k ^ 2.0) * (t_m ^ 3.0))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 320000000.0], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(l / N[(N[Power[k, 2.0], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 320000000:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \left(\frac{t\_m}{\ell} \cdot \frac{{t\_m}^{2}}{\ell}\right)\right) \cdot \left(2 \cdot k\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\ell}{{k}^{2} \cdot {t\_m}^{3}}\\
\end{array}
\end{array}
if k < 3.2e8Initial program 58.5%
Simplified58.4%
unpow258.4%
clear-num58.4%
un-div-inv58.4%
Applied egg-rr58.4%
unpow358.5%
times-frac68.6%
pow268.6%
Applied egg-rr68.6%
Taylor expanded in k around 0 65.4%
*-commutative65.4%
Simplified65.4%
if 3.2e8 < k Initial program 45.9%
Simplified51.2%
Taylor expanded in k around 0 50.0%
associate-*l/50.0%
Applied egg-rr50.0%
associate-/r/50.0%
associate-*l/51.7%
Applied egg-rr51.7%
Taylor expanded in t around 0 51.7%
Final simplification62.3%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 2.0 (* (* 2.0 (pow k 2.0)) (* (pow t_m 2.0) (/ (/ t_m l) l))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((2.0 * pow(k, 2.0)) * (pow(t_m, 2.0) * ((t_m / l) / l))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / ((2.0d0 * (k ** 2.0d0)) * ((t_m ** 2.0d0) * ((t_m / l) / l))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((2.0 * Math.pow(k, 2.0)) * (Math.pow(t_m, 2.0) * ((t_m / l) / l))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / ((2.0 * math.pow(k, 2.0)) * (math.pow(t_m, 2.0) * ((t_m / l) / l))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64((t_m ^ 2.0) * Float64(Float64(t_m / l) / l))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / ((2.0 * (k ^ 2.0)) * ((t_m ^ 2.0) * ((t_m / l) / l)))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \left({t\_m}^{2} \cdot \frac{\frac{t\_m}{\ell}}{\ell}\right)}
\end{array}
Initial program 55.6%
Simplified55.1%
Taylor expanded in k around 0 54.2%
unpow354.2%
unpow254.2%
associate-*r/56.5%
associate-/l*55.6%
Applied egg-rr55.6%
Final simplification55.6%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 2.0 (/ (* (pow t_m 3.0) (* 2.0 (/ (pow k 2.0) l))) l))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((pow(t_m, 3.0) * (2.0 * (pow(k, 2.0) / l))) / l));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / (((t_m ** 3.0d0) * (2.0d0 * ((k ** 2.0d0) / l))) / l))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((Math.pow(t_m, 3.0) * (2.0 * (Math.pow(k, 2.0) / l))) / l));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / ((math.pow(t_m, 3.0) * (2.0 * (math.pow(k, 2.0) / l))) / l))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64(Float64((t_m ^ 3.0) * Float64(2.0 * Float64((k ^ 2.0) / l))) / l))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / (((t_m ^ 3.0) * (2.0 * ((k ^ 2.0) / l))) / l)); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(2.0 * N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{2}{\frac{{t\_m}^{3} \cdot \left(2 \cdot \frac{{k}^{2}}{\ell}\right)}{\ell}}
\end{array}
Initial program 55.6%
Simplified55.1%
Taylor expanded in k around 0 54.2%
associate-*l/54.3%
Applied egg-rr54.3%
associate-*l/54.7%
Applied egg-rr54.7%
associate-/l*54.7%
associate-/l*54.7%
Simplified54.7%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* l (/ l (* (pow k 2.0) (pow t_m 3.0))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (l * (l / (pow(k, 2.0) * pow(t_m, 3.0))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (l * (l / ((k ** 2.0d0) * (t_m ** 3.0d0))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (l * (l / (Math.pow(k, 2.0) * Math.pow(t_m, 3.0))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (l * (l / (math.pow(k, 2.0) * math.pow(t_m, 3.0))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(l * Float64(l / Float64((k ^ 2.0) * (t_m ^ 3.0))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (l * (l / ((k ^ 2.0) * (t_m ^ 3.0)))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(l * N[(l / N[(N[Power[k, 2.0], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(\ell \cdot \frac{\ell}{{k}^{2} \cdot {t\_m}^{3}}\right)
\end{array}
Initial program 55.6%
Simplified55.1%
Taylor expanded in k around 0 54.2%
associate-*l/54.3%
Applied egg-rr54.3%
associate-/r/54.3%
associate-*l/54.7%
Applied egg-rr54.7%
Taylor expanded in t around 0 54.7%
Final simplification54.7%
herbie shell --seed 2024100
(FPCore (t l k)
:name "Toniolo and Linder, Equation (10+)"
:precision binary64
(/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))