
(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 19 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
(let* ((t_2 (* (tan k) (+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0)))))
(t_3 (/ l (hypot 1.0 (hypot 1.0 (/ k t_m))))))
(*
t_s
(if (<= t_m 3.6e-151)
(/ 2.0 (/ (* (pow k 2.0) (/ (* (/ t_m l) (pow (sin k) 2.0)) (cos k))) l))
(if (<= t_m 5.4e-76)
(/ 2.0 (* (* (sin k) (* (/ t_m l) (/ 1.0 (/ l (pow t_m 2.0))))) t_2))
(if (<= t_m 1.4e+99)
(* t_3 (* (/ (/ 2.0 (tan k)) (* (sin k) (pow t_m 3.0))) t_3))
(/
2.0
(*
t_2
(pow (* (cbrt (sin k)) (/ 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 = tan(k) * (1.0 + (1.0 + pow((k / t_m), 2.0)));
double t_3 = l / hypot(1.0, hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 3.6e-151) {
tmp = 2.0 / ((pow(k, 2.0) * (((t_m / l) * pow(sin(k), 2.0)) / cos(k))) / l);
} else if (t_m <= 5.4e-76) {
tmp = 2.0 / ((sin(k) * ((t_m / l) * (1.0 / (l / pow(t_m, 2.0))))) * t_2);
} else if (t_m <= 1.4e+99) {
tmp = t_3 * (((2.0 / tan(k)) / (sin(k) * pow(t_m, 3.0))) * t_3);
} else {
tmp = 2.0 / (t_2 * pow((cbrt(sin(k)) * (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.tan(k) * (1.0 + (1.0 + Math.pow((k / t_m), 2.0)));
double t_3 = l / Math.hypot(1.0, Math.hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 3.6e-151) {
tmp = 2.0 / ((Math.pow(k, 2.0) * (((t_m / l) * Math.pow(Math.sin(k), 2.0)) / Math.cos(k))) / l);
} else if (t_m <= 5.4e-76) {
tmp = 2.0 / ((Math.sin(k) * ((t_m / l) * (1.0 / (l / Math.pow(t_m, 2.0))))) * t_2);
} else if (t_m <= 1.4e+99) {
tmp = t_3 * (((2.0 / Math.tan(k)) / (Math.sin(k) * Math.pow(t_m, 3.0))) * t_3);
} else {
tmp = 2.0 / (t_2 * Math.pow((Math.cbrt(Math.sin(k)) * (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 = Float64(tan(k) * Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0)))) t_3 = Float64(l / hypot(1.0, hypot(1.0, Float64(k / t_m)))) tmp = 0.0 if (t_m <= 3.6e-151) tmp = Float64(2.0 / Float64(Float64((k ^ 2.0) * Float64(Float64(Float64(t_m / l) * (sin(k) ^ 2.0)) / cos(k))) / l)); elseif (t_m <= 5.4e-76) tmp = Float64(2.0 / Float64(Float64(sin(k) * Float64(Float64(t_m / l) * Float64(1.0 / Float64(l / (t_m ^ 2.0))))) * t_2)); elseif (t_m <= 1.4e+99) tmp = Float64(t_3 * Float64(Float64(Float64(2.0 / tan(k)) / Float64(sin(k) * (t_m ^ 3.0))) * t_3)); else tmp = Float64(2.0 / Float64(t_2 * (Float64(cbrt(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[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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]}, N[(t$95$s * If[LessEqual[t$95$m, 3.6e-151], N[(2.0 / N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[(N[(t$95$m / l), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.4e-76], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(1.0 / N[(l / N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.4e+99], N[(t$95$3 * N[(N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$2 * N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $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 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)\\
t_3 := \frac{\ell}{\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.6 \cdot 10^{-151}:\\
\;\;\;\;\frac{2}{\frac{{k}^{2} \cdot \frac{\frac{t\_m}{\ell} \cdot {\sin k}^{2}}{\cos k}}{\ell}}\\
\mathbf{elif}\;t\_m \leq 5.4 \cdot 10^{-76}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \left(\frac{t\_m}{\ell} \cdot \frac{1}{\frac{\ell}{{t\_m}^{2}}}\right)\right) \cdot t\_2}\\
\mathbf{elif}\;t\_m \leq 1.4 \cdot 10^{+99}:\\
\;\;\;\;t\_3 \cdot \left(\frac{\frac{2}{\tan k}}{\sin k \cdot {t\_m}^{3}} \cdot t\_3\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_2 \cdot {\left(\sqrt[3]{\sin k} \cdot \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}}\\
\end{array}
\end{array}
\end{array}
if t < 3.60000000000000032e-151Initial program 57.4%
Simplified57.4%
associate-*l*51.0%
associate-/r*56.1%
associate-+r+56.1%
metadata-eval56.1%
associate-*l*56.1%
associate-*l/59.1%
associate-*r*59.0%
Applied egg-rr59.0%
Taylor expanded in t around 0 68.2%
associate-/l*68.2%
times-frac71.0%
associate-*r/71.0%
Simplified71.0%
if 3.60000000000000032e-151 < t < 5.4000000000000001e-76Initial program 47.1%
Simplified47.1%
unpow347.1%
times-frac80.6%
pow280.6%
Applied egg-rr80.6%
clear-num80.7%
inv-pow80.7%
Applied egg-rr80.7%
unpow-180.7%
Simplified80.7%
if 5.4000000000000001e-76 < t < 1.4e99Initial program 73.8%
Simplified76.6%
associate-*r*79.4%
add-sqr-sqrt79.4%
times-frac85.4%
Applied egg-rr96.6%
associate-/l*96.7%
metadata-eval96.7%
distribute-neg-frac96.7%
associate-/l/96.8%
distribute-neg-frac96.8%
distribute-neg-frac96.8%
metadata-eval96.8%
Simplified96.8%
if 1.4e99 < t Initial program 53.9%
Simplified53.9%
add-cube-cbrt53.9%
pow353.9%
*-commutative53.9%
cbrt-prod53.9%
cbrt-div53.9%
rem-cbrt-cube68.5%
cbrt-prod93.8%
pow293.8%
Applied egg-rr93.8%
Final simplification78.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 (/ k t_m) 2.0))
(t_3 (/ l (hypot 1.0 (hypot 1.0 (/ k t_m))))))
(*
t_s
(if (<= t_m 3.6e-151)
(/ 2.0 (/ (* (pow k 2.0) (/ (* (/ t_m l) (pow (sin k) 2.0)) (cos k))) l))
(if (<= t_m 2e-81)
(/
2.0
(*
(* (sin k) (* (/ t_m l) (/ 1.0 (/ l (pow t_m 2.0)))))
(* (tan k) (+ 1.0 (+ 1.0 t_2)))))
(if (<= t_m 1.6e+24)
(* t_3 (* t_3 (/ 2.0 (* (pow t_m 3.0) (* (sin k) (tan k))))))
(/
2.0
(/
(pow
(*
(/ t_m (cbrt l))
(* (cbrt (sin k)) (cbrt (* (tan k) (+ 2.0 t_2)))))
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 t_2 = pow((k / t_m), 2.0);
double t_3 = l / hypot(1.0, hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 3.6e-151) {
tmp = 2.0 / ((pow(k, 2.0) * (((t_m / l) * pow(sin(k), 2.0)) / cos(k))) / l);
} else if (t_m <= 2e-81) {
tmp = 2.0 / ((sin(k) * ((t_m / l) * (1.0 / (l / pow(t_m, 2.0))))) * (tan(k) * (1.0 + (1.0 + t_2))));
} else if (t_m <= 1.6e+24) {
tmp = t_3 * (t_3 * (2.0 / (pow(t_m, 3.0) * (sin(k) * tan(k)))));
} else {
tmp = 2.0 / (pow(((t_m / cbrt(l)) * (cbrt(sin(k)) * cbrt((tan(k) * (2.0 + t_2))))), 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 t_2 = Math.pow((k / t_m), 2.0);
double t_3 = l / Math.hypot(1.0, Math.hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 3.6e-151) {
tmp = 2.0 / ((Math.pow(k, 2.0) * (((t_m / l) * Math.pow(Math.sin(k), 2.0)) / Math.cos(k))) / l);
} else if (t_m <= 2e-81) {
tmp = 2.0 / ((Math.sin(k) * ((t_m / l) * (1.0 / (l / Math.pow(t_m, 2.0))))) * (Math.tan(k) * (1.0 + (1.0 + t_2))));
} else if (t_m <= 1.6e+24) {
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.cbrt(l)) * (Math.cbrt(Math.sin(k)) * Math.cbrt((Math.tan(k) * (2.0 + t_2))))), 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) t_2 = Float64(k / t_m) ^ 2.0 t_3 = Float64(l / hypot(1.0, hypot(1.0, Float64(k / t_m)))) tmp = 0.0 if (t_m <= 3.6e-151) tmp = Float64(2.0 / Float64(Float64((k ^ 2.0) * Float64(Float64(Float64(t_m / l) * (sin(k) ^ 2.0)) / cos(k))) / l)); elseif (t_m <= 2e-81) tmp = Float64(2.0 / Float64(Float64(sin(k) * Float64(Float64(t_m / l) * Float64(1.0 / Float64(l / (t_m ^ 2.0))))) * Float64(tan(k) * Float64(1.0 + Float64(1.0 + t_2))))); elseif (t_m <= 1.6e+24) 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(Float64(t_m / cbrt(l)) * Float64(cbrt(sin(k)) * cbrt(Float64(tan(k) * Float64(2.0 + t_2))))) ^ 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_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $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]}, N[(t$95$s * If[LessEqual[t$95$m, 3.6e-151], N[(2.0 / N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[(N[(t$95$m / l), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2e-81], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(1.0 / N[(l / N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.6e+24], 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[(N[Power[N[(N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[(N[Tan[k], $MachinePrecision] * N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t_3 := \frac{\ell}{\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.6 \cdot 10^{-151}:\\
\;\;\;\;\frac{2}{\frac{{k}^{2} \cdot \frac{\frac{t\_m}{\ell} \cdot {\sin k}^{2}}{\cos k}}{\ell}}\\
\mathbf{elif}\;t\_m \leq 2 \cdot 10^{-81}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \left(\frac{t\_m}{\ell} \cdot \frac{1}{\frac{\ell}{{t\_m}^{2}}}\right)\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + t\_2\right)\right)\right)}\\
\mathbf{elif}\;t\_m \leq 1.6 \cdot 10^{+24}:\\
\;\;\;\;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}{\frac{{\left(\frac{t\_m}{\sqrt[3]{\ell}} \cdot \left(\sqrt[3]{\sin k} \cdot \sqrt[3]{\tan k \cdot \left(2 + t\_2\right)}\right)\right)}^{3}}{\ell}}\\
\end{array}
\end{array}
\end{array}
if t < 3.60000000000000032e-151Initial program 57.4%
Simplified57.4%
associate-*l*51.0%
associate-/r*56.1%
associate-+r+56.1%
metadata-eval56.1%
associate-*l*56.1%
associate-*l/59.1%
associate-*r*59.0%
Applied egg-rr59.0%
Taylor expanded in t around 0 68.2%
associate-/l*68.2%
times-frac71.0%
associate-*r/71.0%
Simplified71.0%
if 3.60000000000000032e-151 < t < 1.9999999999999999e-81Initial program 47.1%
Simplified47.1%
unpow347.1%
times-frac80.6%
pow280.6%
Applied egg-rr80.6%
clear-num80.7%
inv-pow80.7%
Applied egg-rr80.7%
unpow-180.7%
Simplified80.7%
if 1.9999999999999999e-81 < t < 1.5999999999999999e24Initial program 66.2%
Simplified66.2%
associate-*r*66.4%
add-sqr-sqrt66.4%
times-frac76.2%
Applied egg-rr94.8%
associate-/l*95.0%
associate-*l*95.0%
Simplified95.0%
if 1.5999999999999999e24 < t Initial program 62.6%
Simplified62.6%
associate-*l*55.9%
associate-/r*60.9%
associate-+r+60.9%
metadata-eval60.9%
associate-*l*60.9%
associate-*l/62.8%
associate-*r*62.8%
Applied egg-rr62.8%
add-cube-cbrt62.7%
pow362.7%
associate-*l*62.7%
cbrt-prod62.6%
cbrt-div62.7%
unpow362.7%
add-cbrt-cube71.3%
associate-*l*71.3%
Applied egg-rr71.3%
*-commutative71.3%
metadata-eval71.3%
associate-+r+71.3%
cbrt-prod89.4%
associate-+r+89.4%
metadata-eval89.4%
Applied egg-rr89.4%
Final simplification77.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 2e-147)
(/
2.0
(*
(* (tan k) (+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0))))
(pow (* (/ t_m (pow (cbrt l) 2.0)) (cbrt k)) 3.0)))
(if (<= k 26.5)
(/
2.0
(pow
(*
(/ (pow t_m 1.5) l)
(* (hypot 1.0 (hypot 1.0 (/ k t_m))) (sqrt (* (sin k) (tan k)))))
2.0))
(/
2.0
(/ (/ (* (pow k 2.0) (* t_m (pow (sin k) 2.0))) (* l (cos k))) 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 <= 2e-147) {
tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + pow((k / t_m), 2.0)))) * pow(((t_m / pow(cbrt(l), 2.0)) * cbrt(k)), 3.0));
} else if (k <= 26.5) {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (hypot(1.0, hypot(1.0, (k / t_m))) * sqrt((sin(k) * tan(k))))), 2.0);
} else {
tmp = 2.0 / (((pow(k, 2.0) * (t_m * pow(sin(k), 2.0))) / (l * cos(k))) / 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 <= 2e-147) {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (1.0 + Math.pow((k / t_m), 2.0)))) * Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * Math.cbrt(k)), 3.0));
} else if (k <= 26.5) {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) * Math.sqrt((Math.sin(k) * Math.tan(k))))), 2.0);
} else {
tmp = 2.0 / (((Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0))) / (l * Math.cos(k))) / 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 <= 2e-147) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0)))) * (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * cbrt(k)) ^ 3.0))); elseif (k <= 26.5) tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) * sqrt(Float64(sin(k) * tan(k))))) ^ 2.0)); else tmp = Float64(2.0 / Float64(Float64(Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0))) / Float64(l * cos(k))) / 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, 2e-147], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[k, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 26.5], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] * N[Sqrt[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * N[Cos[k], $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 \begin{array}{l}
\mathbf{if}\;k \leq 2 \cdot 10^{-147}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)\right) \cdot {\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{k}\right)}^{3}}\\
\mathbf{elif}\;k \leq 26.5:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\frac{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}{\ell \cdot \cos k}}{\ell}}\\
\end{array}
\end{array}
if k < 1.9999999999999999e-147Initial program 59.5%
Simplified59.5%
add-cube-cbrt59.4%
pow359.4%
*-commutative59.4%
cbrt-prod59.4%
cbrt-div59.9%
rem-cbrt-cube67.8%
cbrt-prod80.3%
pow280.3%
Applied egg-rr80.3%
Taylor expanded in k around 0 78.9%
if 1.9999999999999999e-147 < k < 26.5Initial program 64.8%
Simplified64.8%
Applied egg-rr32.1%
if 26.5 < k Initial program 51.3%
Simplified51.3%
associate-*l*51.3%
associate-/r*56.3%
associate-+r+56.3%
metadata-eval56.3%
associate-*l*56.3%
associate-*l/57.9%
associate-*r*57.8%
Applied egg-rr57.8%
Taylor expanded in t around 0 83.0%
Final simplification75.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 (/ k t_m) 2.0))
(t_3
(/
2.0
(/ (* (pow k 2.0) (/ (* (/ t_m l) (pow (sin k) 2.0)) (cos k))) l))))
(*
t_s
(if (<= t_m 3.5e-151)
t_3
(if (<= t_m 9e-75)
(/
2.0
(*
(* (sin k) (* (/ t_m l) (/ 1.0 (/ l (pow t_m 2.0)))))
(* (tan k) (+ 1.0 (+ 1.0 t_2)))))
(if (<= t_m 1.2e-18)
t_3
(*
(/ l (+ 2.0 t_2))
(*
l
(pow (/ (cbrt (/ 2.0 (tan k))) (* t_m (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 t_2 = pow((k / t_m), 2.0);
double t_3 = 2.0 / ((pow(k, 2.0) * (((t_m / l) * pow(sin(k), 2.0)) / cos(k))) / l);
double tmp;
if (t_m <= 3.5e-151) {
tmp = t_3;
} else if (t_m <= 9e-75) {
tmp = 2.0 / ((sin(k) * ((t_m / l) * (1.0 / (l / pow(t_m, 2.0))))) * (tan(k) * (1.0 + (1.0 + t_2))));
} else if (t_m <= 1.2e-18) {
tmp = t_3;
} else {
tmp = (l / (2.0 + t_2)) * (l * pow((cbrt((2.0 / tan(k))) / (t_m * 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 t_2 = Math.pow((k / t_m), 2.0);
double t_3 = 2.0 / ((Math.pow(k, 2.0) * (((t_m / l) * Math.pow(Math.sin(k), 2.0)) / Math.cos(k))) / l);
double tmp;
if (t_m <= 3.5e-151) {
tmp = t_3;
} else if (t_m <= 9e-75) {
tmp = 2.0 / ((Math.sin(k) * ((t_m / l) * (1.0 / (l / Math.pow(t_m, 2.0))))) * (Math.tan(k) * (1.0 + (1.0 + t_2))));
} else if (t_m <= 1.2e-18) {
tmp = t_3;
} else {
tmp = (l / (2.0 + t_2)) * (l * Math.pow((Math.cbrt((2.0 / Math.tan(k))) / (t_m * 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) t_2 = Float64(k / t_m) ^ 2.0 t_3 = Float64(2.0 / Float64(Float64((k ^ 2.0) * Float64(Float64(Float64(t_m / l) * (sin(k) ^ 2.0)) / cos(k))) / l)) tmp = 0.0 if (t_m <= 3.5e-151) tmp = t_3; elseif (t_m <= 9e-75) tmp = Float64(2.0 / Float64(Float64(sin(k) * Float64(Float64(t_m / l) * Float64(1.0 / Float64(l / (t_m ^ 2.0))))) * Float64(tan(k) * Float64(1.0 + Float64(1.0 + t_2))))); elseif (t_m <= 1.2e-18) tmp = t_3; else tmp = Float64(Float64(l / Float64(2.0 + t_2)) * Float64(l * (Float64(cbrt(Float64(2.0 / tan(k))) / Float64(t_m * 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_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(2.0 / N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[(N[(t$95$m / l), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 3.5e-151], t$95$3, If[LessEqual[t$95$m, 9e-75], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(1.0 / N[(l / N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.2e-18], t$95$3, N[(N[(l / N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision] * N[(l * N[Power[N[(N[Power[N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $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 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t_3 := \frac{2}{\frac{{k}^{2} \cdot \frac{\frac{t\_m}{\ell} \cdot {\sin k}^{2}}{\cos k}}{\ell}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.5 \cdot 10^{-151}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_m \leq 9 \cdot 10^{-75}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \left(\frac{t\_m}{\ell} \cdot \frac{1}{\frac{\ell}{{t\_m}^{2}}}\right)\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + t\_2\right)\right)\right)}\\
\mathbf{elif}\;t\_m \leq 1.2 \cdot 10^{-18}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{2 + t\_2} \cdot \left(\ell \cdot {\left(\frac{\sqrt[3]{\frac{2}{\tan k}}}{t\_m \cdot \sqrt[3]{\sin k}}\right)}^{3}\right)\\
\end{array}
\end{array}
\end{array}
if t < 3.49999999999999995e-151 or 9.0000000000000006e-75 < t < 1.19999999999999997e-18Initial program 58.0%
Simplified58.0%
associate-*l*52.2%
associate-/r*56.9%
associate-+r+56.9%
metadata-eval56.9%
associate-*l*56.9%
associate-*l/60.1%
associate-*r*60.1%
Applied egg-rr60.1%
Taylor expanded in t around 0 69.6%
associate-/l*69.6%
times-frac72.2%
associate-*r/72.2%
Simplified72.2%
if 3.49999999999999995e-151 < t < 9.0000000000000006e-75Initial program 47.1%
Simplified47.1%
unpow347.1%
times-frac80.6%
pow280.6%
Applied egg-rr80.6%
clear-num80.7%
inv-pow80.7%
Applied egg-rr80.7%
unpow-180.7%
Simplified80.7%
if 1.19999999999999997e-18 < t Initial program 63.1%
Simplified65.0%
associate-*r*71.2%
*-un-lft-identity71.2%
times-frac73.1%
associate-/l/73.1%
Applied egg-rr73.1%
/-rgt-identity73.1%
*-commutative73.1%
metadata-eval73.1%
distribute-neg-frac73.1%
associate-/l/73.1%
distribute-neg-frac73.1%
distribute-neg-frac73.1%
metadata-eval73.1%
Simplified73.1%
add-cube-cbrt73.0%
pow373.0%
cbrt-div72.9%
cbrt-prod72.8%
rem-cbrt-cube83.4%
Applied egg-rr83.4%
Final simplification75.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 (/ k t_m) 2.0))
(t_3
(/
2.0
(/ (* (pow k 2.0) (/ (* (/ t_m l) (pow (sin k) 2.0)) (cos k))) l))))
(*
t_s
(if (<= t_m 3.6e-151)
t_3
(if (<= t_m 1.25e-79)
(/
2.0
(*
(* (sin k) (* (/ t_m l) (/ 1.0 (/ l (pow t_m 2.0)))))
(* (tan k) (+ 1.0 (+ 1.0 t_2)))))
(if (<= t_m 1.3e-18)
t_3
(*
(pow (/ (cbrt (* l (/ 2.0 (tan k)))) (* t_m (cbrt (sin k)))) 3.0)
(/ l (+ 2.0 t_2)))))))))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((k / t_m), 2.0);
double t_3 = 2.0 / ((pow(k, 2.0) * (((t_m / l) * pow(sin(k), 2.0)) / cos(k))) / l);
double tmp;
if (t_m <= 3.6e-151) {
tmp = t_3;
} else if (t_m <= 1.25e-79) {
tmp = 2.0 / ((sin(k) * ((t_m / l) * (1.0 / (l / pow(t_m, 2.0))))) * (tan(k) * (1.0 + (1.0 + t_2))));
} else if (t_m <= 1.3e-18) {
tmp = t_3;
} else {
tmp = pow((cbrt((l * (2.0 / tan(k)))) / (t_m * cbrt(sin(k)))), 3.0) * (l / (2.0 + t_2));
}
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((k / t_m), 2.0);
double t_3 = 2.0 / ((Math.pow(k, 2.0) * (((t_m / l) * Math.pow(Math.sin(k), 2.0)) / Math.cos(k))) / l);
double tmp;
if (t_m <= 3.6e-151) {
tmp = t_3;
} else if (t_m <= 1.25e-79) {
tmp = 2.0 / ((Math.sin(k) * ((t_m / l) * (1.0 / (l / Math.pow(t_m, 2.0))))) * (Math.tan(k) * (1.0 + (1.0 + t_2))));
} else if (t_m <= 1.3e-18) {
tmp = t_3;
} else {
tmp = Math.pow((Math.cbrt((l * (2.0 / Math.tan(k)))) / (t_m * Math.cbrt(Math.sin(k)))), 3.0) * (l / (2.0 + t_2));
}
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(k / t_m) ^ 2.0 t_3 = Float64(2.0 / Float64(Float64((k ^ 2.0) * Float64(Float64(Float64(t_m / l) * (sin(k) ^ 2.0)) / cos(k))) / l)) tmp = 0.0 if (t_m <= 3.6e-151) tmp = t_3; elseif (t_m <= 1.25e-79) tmp = Float64(2.0 / Float64(Float64(sin(k) * Float64(Float64(t_m / l) * Float64(1.0 / Float64(l / (t_m ^ 2.0))))) * Float64(tan(k) * Float64(1.0 + Float64(1.0 + t_2))))); elseif (t_m <= 1.3e-18) tmp = t_3; else tmp = Float64((Float64(cbrt(Float64(l * Float64(2.0 / tan(k)))) / Float64(t_m * cbrt(sin(k)))) ^ 3.0) * Float64(l / Float64(2.0 + t_2))); 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[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(2.0 / N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[(N[(t$95$m / l), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 3.6e-151], t$95$3, If[LessEqual[t$95$m, 1.25e-79], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(1.0 / N[(l / N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.3e-18], t$95$3, N[(N[Power[N[(N[Power[N[(l * N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(l / N[(2.0 + t$95$2), $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 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t_3 := \frac{2}{\frac{{k}^{2} \cdot \frac{\frac{t\_m}{\ell} \cdot {\sin k}^{2}}{\cos k}}{\ell}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.6 \cdot 10^{-151}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_m \leq 1.25 \cdot 10^{-79}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \left(\frac{t\_m}{\ell} \cdot \frac{1}{\frac{\ell}{{t\_m}^{2}}}\right)\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + t\_2\right)\right)\right)}\\
\mathbf{elif}\;t\_m \leq 1.3 \cdot 10^{-18}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{\sqrt[3]{\ell \cdot \frac{2}{\tan k}}}{t\_m \cdot \sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{\ell}{2 + t\_2}\\
\end{array}
\end{array}
\end{array}
if t < 3.60000000000000032e-151 or 1.25e-79 < t < 1.3e-18Initial program 58.0%
Simplified58.0%
associate-*l*52.2%
associate-/r*56.9%
associate-+r+56.9%
metadata-eval56.9%
associate-*l*56.9%
associate-*l/60.1%
associate-*r*60.1%
Applied egg-rr60.1%
Taylor expanded in t around 0 69.6%
associate-/l*69.6%
times-frac72.2%
associate-*r/72.2%
Simplified72.2%
if 3.60000000000000032e-151 < t < 1.25e-79Initial program 47.1%
Simplified47.1%
unpow347.1%
times-frac80.6%
pow280.6%
Applied egg-rr80.6%
clear-num80.7%
inv-pow80.7%
Applied egg-rr80.7%
unpow-180.7%
Simplified80.7%
if 1.3e-18 < t Initial program 63.1%
Simplified65.0%
associate-*r*71.2%
*-un-lft-identity71.2%
times-frac73.1%
associate-/l/73.1%
Applied egg-rr73.1%
/-rgt-identity73.1%
*-commutative73.1%
metadata-eval73.1%
distribute-neg-frac73.1%
associate-/l/73.1%
distribute-neg-frac73.1%
distribute-neg-frac73.1%
metadata-eval73.1%
Simplified73.1%
add-cube-cbrt73.0%
pow373.0%
associate-*r/72.6%
cbrt-div72.6%
cbrt-prod72.5%
unpow372.5%
add-cbrt-cube83.4%
Applied egg-rr83.4%
Final simplification75.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 (<= k 4e-143)
(/
2.0
(*
(* (tan k) (+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0))))
(pow (* (/ t_m (pow (cbrt l) 2.0)) (cbrt k)) 3.0)))
(if (<= k 3.5e-5)
(/
2.0
(/
(*
t_m
(+ (* 2.0 (/ (* (pow k 2.0) (pow t_m 2.0)) l)) (/ (pow k 4.0) l)))
l))
(/
2.0
(/ (/ (* (pow k 2.0) (* t_m (pow (sin k) 2.0))) (* l (cos k))) 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 <= 4e-143) {
tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + pow((k / t_m), 2.0)))) * pow(((t_m / pow(cbrt(l), 2.0)) * cbrt(k)), 3.0));
} else if (k <= 3.5e-5) {
tmp = 2.0 / ((t_m * ((2.0 * ((pow(k, 2.0) * pow(t_m, 2.0)) / l)) + (pow(k, 4.0) / l))) / l);
} else {
tmp = 2.0 / (((pow(k, 2.0) * (t_m * pow(sin(k), 2.0))) / (l * cos(k))) / 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 <= 4e-143) {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (1.0 + Math.pow((k / t_m), 2.0)))) * Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * Math.cbrt(k)), 3.0));
} else if (k <= 3.5e-5) {
tmp = 2.0 / ((t_m * ((2.0 * ((Math.pow(k, 2.0) * Math.pow(t_m, 2.0)) / l)) + (Math.pow(k, 4.0) / l))) / l);
} else {
tmp = 2.0 / (((Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0))) / (l * Math.cos(k))) / 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 <= 4e-143) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0)))) * (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * cbrt(k)) ^ 3.0))); elseif (k <= 3.5e-5) tmp = Float64(2.0 / Float64(Float64(t_m * Float64(Float64(2.0 * Float64(Float64((k ^ 2.0) * (t_m ^ 2.0)) / l)) + Float64((k ^ 4.0) / l))) / l)); else tmp = Float64(2.0 / Float64(Float64(Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0))) / Float64(l * cos(k))) / 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, 4e-143], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[k, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3.5e-5], N[(2.0 / N[(N[(t$95$m * N[(N[(2.0 * N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] + N[(N[Power[k, 4.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * N[Cos[k], $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 \begin{array}{l}
\mathbf{if}\;k \leq 4 \cdot 10^{-143}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)\right) \cdot {\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{k}\right)}^{3}}\\
\mathbf{elif}\;k \leq 3.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot \left(2 \cdot \frac{{k}^{2} \cdot {t\_m}^{2}}{\ell} + \frac{{k}^{4}}{\ell}\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\frac{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}{\ell \cdot \cos k}}{\ell}}\\
\end{array}
\end{array}
if k < 3.9999999999999998e-143Initial program 59.5%
Simplified59.5%
add-cube-cbrt59.4%
pow359.4%
*-commutative59.4%
cbrt-prod59.4%
cbrt-div59.9%
rem-cbrt-cube67.8%
cbrt-prod80.3%
pow280.3%
Applied egg-rr80.3%
Taylor expanded in k around 0 78.9%
if 3.9999999999999998e-143 < k < 3.4999999999999997e-5Initial program 64.8%
Simplified64.8%
associate-*l*64.8%
associate-/r*65.1%
associate-+r+65.1%
metadata-eval65.1%
associate-*l*65.1%
associate-*l/69.0%
associate-*r*69.0%
Applied egg-rr69.0%
Taylor expanded in k around 0 69.0%
Taylor expanded in t around 0 95.7%
if 3.4999999999999997e-5 < k Initial program 51.3%
Simplified51.3%
associate-*l*51.3%
associate-/r*56.3%
associate-+r+56.3%
metadata-eval56.3%
associate-*l*56.3%
associate-*l/57.9%
associate-*r*57.8%
Applied egg-rr57.8%
Taylor expanded in t around 0 83.0%
Final simplification81.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 4e-5)
(/
2.0
(/
(pow
(*
(/ t_m (cbrt l))
(* (cbrt (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))) (cbrt k)))
3.0)
l))
(/
2.0
(/ (/ (* (pow k 2.0) (* t_m (pow (sin k) 2.0))) (* l (cos k))) 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 <= 4e-5) {
tmp = 2.0 / (pow(((t_m / cbrt(l)) * (cbrt((tan(k) * (2.0 + pow((k / t_m), 2.0)))) * cbrt(k))), 3.0) / l);
} else {
tmp = 2.0 / (((pow(k, 2.0) * (t_m * pow(sin(k), 2.0))) / (l * cos(k))) / 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 <= 4e-5) {
tmp = 2.0 / (Math.pow(((t_m / Math.cbrt(l)) * (Math.cbrt((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0)))) * Math.cbrt(k))), 3.0) / l);
} else {
tmp = 2.0 / (((Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0))) / (l * Math.cos(k))) / 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 <= 4e-5) tmp = Float64(2.0 / Float64((Float64(Float64(t_m / cbrt(l)) * Float64(cbrt(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0)))) * cbrt(k))) ^ 3.0) / l)); else tmp = Float64(2.0 / Float64(Float64(Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0))) / Float64(l * cos(k))) / 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, 4e-5], N[(2.0 / N[(N[Power[N[(N[(t$95$m / N[Power[l, 1/3], $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[k, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * N[Cos[k], $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 \begin{array}{l}
\mathbf{if}\;k \leq 4 \cdot 10^{-5}:\\
\;\;\;\;\frac{2}{\frac{{\left(\frac{t\_m}{\sqrt[3]{\ell}} \cdot \left(\sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)} \cdot \sqrt[3]{k}\right)\right)}^{3}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\frac{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}{\ell \cdot \cos k}}{\ell}}\\
\end{array}
\end{array}
if k < 4.00000000000000033e-5Initial program 60.2%
Simplified60.2%
associate-*l*53.2%
associate-/r*58.5%
associate-+r+58.5%
metadata-eval58.5%
associate-*l*58.5%
associate-*l/61.9%
associate-*r*61.9%
Applied egg-rr61.9%
add-cube-cbrt61.8%
pow361.8%
associate-*l*61.8%
cbrt-prod61.7%
cbrt-div61.8%
unpow361.8%
add-cbrt-cube71.9%
associate-*l*71.9%
Applied egg-rr71.9%
*-commutative71.9%
metadata-eval71.9%
associate-+r+71.9%
cbrt-prod82.5%
associate-+r+82.5%
metadata-eval82.5%
Applied egg-rr82.5%
Taylor expanded in k around 0 79.6%
if 4.00000000000000033e-5 < k Initial program 51.3%
Simplified51.3%
associate-*l*51.3%
associate-/r*56.3%
associate-+r+56.3%
metadata-eval56.3%
associate-*l*56.3%
associate-*l/57.9%
associate-*r*57.8%
Applied egg-rr57.8%
Taylor expanded in t around 0 83.0%
Final simplification80.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 (<= k 4e-143)
(/ l (pow (* (/ t_m (cbrt l)) (pow (cbrt k) 2.0)) 3.0))
(if (<= k 3.2e-7)
(/
2.0
(/
(*
t_m
(+ (* 2.0 (/ (* (pow k 2.0) (pow t_m 2.0)) l)) (/ (pow k 4.0) l)))
l))
(/
2.0
(/ (/ (* (pow k 2.0) (* t_m (pow (sin k) 2.0))) (* l (cos k))) 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 <= 4e-143) {
tmp = l / pow(((t_m / cbrt(l)) * pow(cbrt(k), 2.0)), 3.0);
} else if (k <= 3.2e-7) {
tmp = 2.0 / ((t_m * ((2.0 * ((pow(k, 2.0) * pow(t_m, 2.0)) / l)) + (pow(k, 4.0) / l))) / l);
} else {
tmp = 2.0 / (((pow(k, 2.0) * (t_m * pow(sin(k), 2.0))) / (l * cos(k))) / 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 <= 4e-143) {
tmp = l / Math.pow(((t_m / Math.cbrt(l)) * Math.pow(Math.cbrt(k), 2.0)), 3.0);
} else if (k <= 3.2e-7) {
tmp = 2.0 / ((t_m * ((2.0 * ((Math.pow(k, 2.0) * Math.pow(t_m, 2.0)) / l)) + (Math.pow(k, 4.0) / l))) / l);
} else {
tmp = 2.0 / (((Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0))) / (l * Math.cos(k))) / 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 <= 4e-143) tmp = Float64(l / (Float64(Float64(t_m / cbrt(l)) * (cbrt(k) ^ 2.0)) ^ 3.0)); elseif (k <= 3.2e-7) tmp = Float64(2.0 / Float64(Float64(t_m * Float64(Float64(2.0 * Float64(Float64((k ^ 2.0) * (t_m ^ 2.0)) / l)) + Float64((k ^ 4.0) / l))) / l)); else tmp = Float64(2.0 / Float64(Float64(Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0))) / Float64(l * cos(k))) / 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, 4e-143], N[(l / N[Power[N[(N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision] * N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3.2e-7], N[(2.0 / N[(N[(t$95$m * N[(N[(2.0 * N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] + N[(N[Power[k, 4.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * N[Cos[k], $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 \begin{array}{l}
\mathbf{if}\;k \leq 4 \cdot 10^{-143}:\\
\;\;\;\;\frac{\ell}{{\left(\frac{t\_m}{\sqrt[3]{\ell}} \cdot {\left(\sqrt[3]{k}\right)}^{2}\right)}^{3}}\\
\mathbf{elif}\;k \leq 3.2 \cdot 10^{-7}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot \left(2 \cdot \frac{{k}^{2} \cdot {t\_m}^{2}}{\ell} + \frac{{k}^{4}}{\ell}\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\frac{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}{\ell \cdot \cos k}}{\ell}}\\
\end{array}
\end{array}
if k < 3.9999999999999998e-143Initial program 59.5%
Simplified59.5%
associate-*l*51.4%
associate-/r*57.6%
associate-+r+57.6%
metadata-eval57.6%
associate-*l*57.6%
associate-*l/60.8%
associate-*r*60.8%
Applied egg-rr60.8%
Taylor expanded in k around 0 57.1%
*-commutative57.1%
associate-/l*57.2%
Simplified57.2%
*-un-lft-identity57.2%
associate-/r/56.7%
associate-*r*56.7%
Applied egg-rr56.7%
*-lft-identity56.7%
associate-*l/57.2%
associate-*l*57.2%
times-frac57.2%
metadata-eval57.2%
associate-*r/57.1%
*-commutative57.1%
associate-/l*57.7%
Simplified57.7%
associate-*r/57.1%
add-cube-cbrt57.0%
pow357.0%
associate-*r/57.7%
*-commutative57.7%
cbrt-prod57.6%
cbrt-div57.7%
unpow357.7%
add-cbrt-cube62.8%
unpow262.8%
cbrt-prod72.2%
pow272.2%
Applied egg-rr72.2%
if 3.9999999999999998e-143 < k < 3.2000000000000001e-7Initial program 64.8%
Simplified64.8%
associate-*l*64.8%
associate-/r*65.1%
associate-+r+65.1%
metadata-eval65.1%
associate-*l*65.1%
associate-*l/69.0%
associate-*r*69.0%
Applied egg-rr69.0%
Taylor expanded in k around 0 69.0%
Taylor expanded in t around 0 95.7%
if 3.2000000000000001e-7 < k Initial program 51.3%
Simplified51.3%
associate-*l*51.3%
associate-/r*56.3%
associate-+r+56.3%
metadata-eval56.3%
associate-*l*56.3%
associate-*l/57.9%
associate-*r*57.8%
Applied egg-rr57.8%
Taylor expanded in t around 0 83.0%
Final simplification77.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.22e-18)
(/ 2.0 (/ (* (/ (pow k 2.0) l) (/ (* t_m (pow (sin k) 2.0)) (cos k))) l))
(/ l (pow (* (/ t_m (cbrt l)) (pow (cbrt k) 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 tmp;
if (t_m <= 1.22e-18) {
tmp = 2.0 / (((pow(k, 2.0) / l) * ((t_m * pow(sin(k), 2.0)) / cos(k))) / l);
} else {
tmp = l / pow(((t_m / cbrt(l)) * pow(cbrt(k), 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 tmp;
if (t_m <= 1.22e-18) {
tmp = 2.0 / (((Math.pow(k, 2.0) / l) * ((t_m * Math.pow(Math.sin(k), 2.0)) / Math.cos(k))) / l);
} else {
tmp = l / Math.pow(((t_m / Math.cbrt(l)) * Math.pow(Math.cbrt(k), 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) tmp = 0.0 if (t_m <= 1.22e-18) tmp = Float64(2.0 / Float64(Float64(Float64((k ^ 2.0) / l) * Float64(Float64(t_m * (sin(k) ^ 2.0)) / cos(k))) / l)); else tmp = Float64(l / (Float64(Float64(t_m / cbrt(l)) * (cbrt(k) ^ 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_] := N[(t$95$s * If[LessEqual[t$95$m, 1.22e-18], N[(2.0 / N[(N[(N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(l / N[Power[N[(N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision] * N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $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 1.22 \cdot 10^{-18}:\\
\;\;\;\;\frac{2}{\frac{\frac{{k}^{2}}{\ell} \cdot \frac{t\_m \cdot {\sin k}^{2}}{\cos k}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{{\left(\frac{t\_m}{\sqrt[3]{\ell}} \cdot {\left(\sqrt[3]{k}\right)}^{2}\right)}^{3}}\\
\end{array}
\end{array}
if t < 1.2200000000000001e-18Initial program 56.6%
Simplified56.6%
associate-*l*51.5%
associate-/r*57.0%
associate-+r+57.0%
metadata-eval57.0%
associate-*l*57.0%
associate-*l/59.8%
associate-*r*59.8%
Applied egg-rr59.8%
Taylor expanded in t around 0 71.6%
times-frac70.3%
Simplified70.3%
if 1.2200000000000001e-18 < t Initial program 63.1%
Simplified63.2%
associate-*l*57.2%
associate-/r*61.6%
associate-+r+61.6%
metadata-eval61.6%
associate-*l*61.6%
associate-*l/65.1%
associate-*r*65.1%
Applied egg-rr65.1%
Taylor expanded in k around 0 59.6%
*-commutative59.6%
associate-/l*58.0%
Simplified58.0%
*-un-lft-identity58.0%
associate-/r/58.0%
associate-*r*58.0%
Applied egg-rr58.0%
*-lft-identity58.0%
associate-*l/58.0%
associate-*l*58.0%
times-frac58.0%
metadata-eval58.0%
associate-*r/59.7%
*-commutative59.7%
associate-/l*59.7%
Simplified59.7%
associate-*r/59.7%
add-cube-cbrt59.6%
pow359.6%
associate-*r/59.6%
*-commutative59.6%
cbrt-prod59.6%
cbrt-div59.7%
unpow359.6%
add-cbrt-cube65.5%
unpow265.5%
cbrt-prod81.3%
pow281.3%
Applied egg-rr81.3%
Final simplification72.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
(if (<= t_m 1.35e-18)
(/ 2.0 (/ (* (pow k 2.0) (/ (* (/ t_m l) (pow (sin k) 2.0)) (cos k))) l))
(/ l (pow (* (/ t_m (cbrt l)) (pow (cbrt k) 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 tmp;
if (t_m <= 1.35e-18) {
tmp = 2.0 / ((pow(k, 2.0) * (((t_m / l) * pow(sin(k), 2.0)) / cos(k))) / l);
} else {
tmp = l / pow(((t_m / cbrt(l)) * pow(cbrt(k), 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 tmp;
if (t_m <= 1.35e-18) {
tmp = 2.0 / ((Math.pow(k, 2.0) * (((t_m / l) * Math.pow(Math.sin(k), 2.0)) / Math.cos(k))) / l);
} else {
tmp = l / Math.pow(((t_m / Math.cbrt(l)) * Math.pow(Math.cbrt(k), 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) tmp = 0.0 if (t_m <= 1.35e-18) tmp = Float64(2.0 / Float64(Float64((k ^ 2.0) * Float64(Float64(Float64(t_m / l) * (sin(k) ^ 2.0)) / cos(k))) / l)); else tmp = Float64(l / (Float64(Float64(t_m / cbrt(l)) * (cbrt(k) ^ 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_] := N[(t$95$s * If[LessEqual[t$95$m, 1.35e-18], N[(2.0 / N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[(N[(t$95$m / l), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(l / N[Power[N[(N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision] * N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $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 1.35 \cdot 10^{-18}:\\
\;\;\;\;\frac{2}{\frac{{k}^{2} \cdot \frac{\frac{t\_m}{\ell} \cdot {\sin k}^{2}}{\cos k}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{{\left(\frac{t\_m}{\sqrt[3]{\ell}} \cdot {\left(\sqrt[3]{k}\right)}^{2}\right)}^{3}}\\
\end{array}
\end{array}
if t < 1.34999999999999994e-18Initial program 56.6%
Simplified56.6%
associate-*l*51.5%
associate-/r*57.0%
associate-+r+57.0%
metadata-eval57.0%
associate-*l*57.0%
associate-*l/59.8%
associate-*r*59.8%
Applied egg-rr59.8%
Taylor expanded in t around 0 71.6%
associate-/l*71.3%
times-frac73.5%
associate-*r/73.5%
Simplified73.5%
if 1.34999999999999994e-18 < t Initial program 63.1%
Simplified63.2%
associate-*l*57.2%
associate-/r*61.6%
associate-+r+61.6%
metadata-eval61.6%
associate-*l*61.6%
associate-*l/65.1%
associate-*r*65.1%
Applied egg-rr65.1%
Taylor expanded in k around 0 59.6%
*-commutative59.6%
associate-/l*58.0%
Simplified58.0%
*-un-lft-identity58.0%
associate-/r/58.0%
associate-*r*58.0%
Applied egg-rr58.0%
*-lft-identity58.0%
associate-*l/58.0%
associate-*l*58.0%
times-frac58.0%
metadata-eval58.0%
associate-*r/59.7%
*-commutative59.7%
associate-/l*59.7%
Simplified59.7%
associate-*r/59.7%
add-cube-cbrt59.6%
pow359.6%
associate-*r/59.6%
*-commutative59.6%
cbrt-prod59.6%
cbrt-div59.7%
unpow359.6%
add-cbrt-cube65.5%
unpow265.5%
cbrt-prod81.3%
pow281.3%
Applied egg-rr81.3%
Final simplification75.1%
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-18)
(/ 2.0 (/ (* (/ t_m l) (pow k 4.0)) l))
(/ l (pow (* (/ t_m (cbrt l)) (pow (cbrt k) 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 tmp;
if (t_m <= 1.15e-18) {
tmp = 2.0 / (((t_m / l) * pow(k, 4.0)) / l);
} else {
tmp = l / pow(((t_m / cbrt(l)) * pow(cbrt(k), 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 tmp;
if (t_m <= 1.15e-18) {
tmp = 2.0 / (((t_m / l) * Math.pow(k, 4.0)) / l);
} else {
tmp = l / Math.pow(((t_m / Math.cbrt(l)) * Math.pow(Math.cbrt(k), 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) tmp = 0.0 if (t_m <= 1.15e-18) tmp = Float64(2.0 / Float64(Float64(Float64(t_m / l) * (k ^ 4.0)) / l)); else tmp = Float64(l / (Float64(Float64(t_m / cbrt(l)) * (cbrt(k) ^ 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_] := N[(t$95$s * If[LessEqual[t$95$m, 1.15e-18], N[(2.0 / N[(N[(N[(t$95$m / l), $MachinePrecision] * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(l / N[Power[N[(N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision] * N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $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 1.15 \cdot 10^{-18}:\\
\;\;\;\;\frac{2}{\frac{\frac{t\_m}{\ell} \cdot {k}^{4}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{{\left(\frac{t\_m}{\sqrt[3]{\ell}} \cdot {\left(\sqrt[3]{k}\right)}^{2}\right)}^{3}}\\
\end{array}
\end{array}
if t < 1.15e-18Initial program 56.6%
Simplified56.6%
associate-*l*51.5%
associate-/r*57.0%
associate-+r+57.0%
metadata-eval57.0%
associate-*l*57.0%
associate-*l/59.8%
associate-*r*59.8%
Applied egg-rr59.8%
Taylor expanded in k around 0 53.6%
Taylor expanded in k around inf 59.2%
associate-/l*60.5%
Simplified60.5%
if 1.15e-18 < t Initial program 63.1%
Simplified63.2%
associate-*l*57.2%
associate-/r*61.6%
associate-+r+61.6%
metadata-eval61.6%
associate-*l*61.6%
associate-*l/65.1%
associate-*r*65.1%
Applied egg-rr65.1%
Taylor expanded in k around 0 59.6%
*-commutative59.6%
associate-/l*58.0%
Simplified58.0%
*-un-lft-identity58.0%
associate-/r/58.0%
associate-*r*58.0%
Applied egg-rr58.0%
*-lft-identity58.0%
associate-*l/58.0%
associate-*l*58.0%
times-frac58.0%
metadata-eval58.0%
associate-*r/59.7%
*-commutative59.7%
associate-/l*59.7%
Simplified59.7%
associate-*r/59.7%
add-cube-cbrt59.6%
pow359.6%
associate-*r/59.6%
*-commutative59.6%
cbrt-prod59.6%
cbrt-div59.7%
unpow359.6%
add-cbrt-cube65.5%
unpow265.5%
cbrt-prod81.3%
pow281.3%
Applied egg-rr81.3%
Final simplification64.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 3.5e-146)
(/ 2.0 (* (* (sin k) (* (/ t_m l) (/ (pow t_m 2.0) l))) (* 2.0 k)))
(if (<= k 1.15e+49)
(/
2.0
(/
(*
t_m
(+ (* 2.0 (/ (* (pow k 2.0) (pow t_m 2.0)) l)) (/ (pow k 4.0) l)))
l))
(/ 2.0 (/ (* 2.0 (pow (* t_m (cbrt (/ (pow k 2.0) l))) 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 <= 3.5e-146) {
tmp = 2.0 / ((sin(k) * ((t_m / l) * (pow(t_m, 2.0) / l))) * (2.0 * k));
} else if (k <= 1.15e+49) {
tmp = 2.0 / ((t_m * ((2.0 * ((pow(k, 2.0) * pow(t_m, 2.0)) / l)) + (pow(k, 4.0) / l))) / l);
} else {
tmp = 2.0 / ((2.0 * pow((t_m * cbrt((pow(k, 2.0) / l))), 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 <= 3.5e-146) {
tmp = 2.0 / ((Math.sin(k) * ((t_m / l) * (Math.pow(t_m, 2.0) / l))) * (2.0 * k));
} else if (k <= 1.15e+49) {
tmp = 2.0 / ((t_m * ((2.0 * ((Math.pow(k, 2.0) * Math.pow(t_m, 2.0)) / l)) + (Math.pow(k, 4.0) / l))) / l);
} else {
tmp = 2.0 / ((2.0 * Math.pow((t_m * Math.cbrt((Math.pow(k, 2.0) / l))), 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 <= 3.5e-146) tmp = Float64(2.0 / Float64(Float64(sin(k) * Float64(Float64(t_m / l) * Float64((t_m ^ 2.0) / l))) * Float64(2.0 * k))); elseif (k <= 1.15e+49) tmp = Float64(2.0 / Float64(Float64(t_m * Float64(Float64(2.0 * Float64(Float64((k ^ 2.0) * (t_m ^ 2.0)) / l)) + Float64((k ^ 4.0) / l))) / l)); else tmp = Float64(2.0 / Float64(Float64(2.0 * (Float64(t_m * cbrt(Float64((k ^ 2.0) / l))) ^ 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, 3.5e-146], 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], If[LessEqual[k, 1.15e+49], N[(2.0 / N[(N[(t$95$m * N[(N[(2.0 * N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] + N[(N[Power[k, 4.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[Power[N[(t$95$m * N[Power[N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $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 \begin{array}{l}
\mathbf{if}\;k \leq 3.5 \cdot 10^{-146}:\\
\;\;\;\;\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{elif}\;k \leq 1.15 \cdot 10^{+49}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot \left(2 \cdot \frac{{k}^{2} \cdot {t\_m}^{2}}{\ell} + \frac{{k}^{4}}{\ell}\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{2 \cdot {\left(t\_m \cdot \sqrt[3]{\frac{{k}^{2}}{\ell}}\right)}^{3}}{\ell}}\\
\end{array}
\end{array}
if k < 3.5000000000000001e-146Initial program 59.5%
Simplified59.5%
unpow359.5%
times-frac72.5%
pow272.5%
Applied egg-rr72.5%
Taylor expanded in k around 0 69.1%
if 3.5000000000000001e-146 < k < 1.15000000000000001e49Initial program 61.2%
Simplified61.2%
associate-*l*61.2%
associate-/r*61.5%
associate-+r+61.5%
metadata-eval61.5%
associate-*l*61.5%
associate-*l/64.5%
associate-*r*64.5%
Applied egg-rr64.5%
Taylor expanded in k around 0 55.7%
Taylor expanded in t around 0 79.1%
if 1.15000000000000001e49 < k Initial program 51.5%
Simplified51.5%
associate-*l*51.5%
associate-/r*57.2%
associate-+r+57.2%
metadata-eval57.2%
associate-*l*57.2%
associate-*l/59.0%
associate-*r*58.9%
Applied egg-rr58.9%
Taylor expanded in k around 0 50.5%
*-commutative50.5%
associate-/l*50.4%
Simplified50.4%
add-cube-cbrt50.4%
pow350.4%
cbrt-prod50.4%
unpow350.4%
add-cbrt-cube63.5%
Applied egg-rr63.5%
Final simplification69.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 4e-144)
(/ 2.0 (* (* (sin k) (* (/ t_m l) (/ (pow t_m 2.0) l))) (* 2.0 k)))
(/ 2.0 (/ (* 2.0 (pow (* t_m (cbrt (/ (pow k 2.0) l))) 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 <= 4e-144) {
tmp = 2.0 / ((sin(k) * ((t_m / l) * (pow(t_m, 2.0) / l))) * (2.0 * k));
} else {
tmp = 2.0 / ((2.0 * pow((t_m * cbrt((pow(k, 2.0) / l))), 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 <= 4e-144) {
tmp = 2.0 / ((Math.sin(k) * ((t_m / l) * (Math.pow(t_m, 2.0) / l))) * (2.0 * k));
} else {
tmp = 2.0 / ((2.0 * Math.pow((t_m * Math.cbrt((Math.pow(k, 2.0) / l))), 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 <= 4e-144) 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(2.0 / Float64(Float64(2.0 * (Float64(t_m * cbrt(Float64((k ^ 2.0) / l))) ^ 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, 4e-144], 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[(2.0 / N[(N[(2.0 * N[Power[N[(t$95$m * N[Power[N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $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 \begin{array}{l}
\mathbf{if}\;k \leq 4 \cdot 10^{-144}:\\
\;\;\;\;\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}:\\
\;\;\;\;\frac{2}{\frac{2 \cdot {\left(t\_m \cdot \sqrt[3]{\frac{{k}^{2}}{\ell}}\right)}^{3}}{\ell}}\\
\end{array}
\end{array}
if k < 3.9999999999999998e-144Initial program 59.5%
Simplified59.5%
unpow359.5%
times-frac72.5%
pow272.5%
Applied egg-rr72.5%
Taylor expanded in k around 0 69.1%
if 3.9999999999999998e-144 < k Initial program 55.2%
Simplified55.2%
associate-*l*55.1%
associate-/r*58.8%
associate-+r+58.8%
metadata-eval58.8%
associate-*l*58.8%
associate-*l/61.0%
associate-*r*61.0%
Applied egg-rr61.0%
Taylor expanded in k around 0 53.6%
*-commutative53.6%
associate-/l*53.5%
Simplified53.5%
add-cube-cbrt53.5%
pow353.5%
cbrt-prod53.4%
unpow353.4%
add-cbrt-cube67.0%
Applied egg-rr67.0%
Final simplification68.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 (<= k 3.15e+56)
(/ 2.0 (* (* (sin k) (* (/ t_m l) (/ (pow t_m 2.0) l))) (* 2.0 k)))
(/ 2.0 (/ (/ (* t_m (pow k 4.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) {
double tmp;
if (k <= 3.15e+56) {
tmp = 2.0 / ((sin(k) * ((t_m / l) * (pow(t_m, 2.0) / l))) * (2.0 * k));
} else {
tmp = 2.0 / (((t_m * pow(k, 4.0)) / l) / l);
}
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 <= 3.15d+56) then
tmp = 2.0d0 / ((sin(k) * ((t_m / l) * ((t_m ** 2.0d0) / l))) * (2.0d0 * k))
else
tmp = 2.0d0 / (((t_m * (k ** 4.0d0)) / l) / l)
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 <= 3.15e+56) {
tmp = 2.0 / ((Math.sin(k) * ((t_m / l) * (Math.pow(t_m, 2.0) / l))) * (2.0 * k));
} else {
tmp = 2.0 / (((t_m * Math.pow(k, 4.0)) / l) / l);
}
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 <= 3.15e+56: tmp = 2.0 / ((math.sin(k) * ((t_m / l) * (math.pow(t_m, 2.0) / l))) * (2.0 * k)) else: tmp = 2.0 / (((t_m * math.pow(k, 4.0)) / l) / 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 <= 3.15e+56) 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(2.0 / Float64(Float64(Float64(t_m * (k ^ 4.0)) / l) / l)); 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 <= 3.15e+56) tmp = 2.0 / ((sin(k) * ((t_m / l) * ((t_m ^ 2.0) / l))) * (2.0 * k)); else tmp = 2.0 / (((t_m * (k ^ 4.0)) / l) / l); 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, 3.15e+56], 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[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] / l), $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.15 \cdot 10^{+56}:\\
\;\;\;\;\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}:\\
\;\;\;\;\frac{2}{\frac{\frac{t\_m \cdot {k}^{4}}{\ell}}{\ell}}\\
\end{array}
\end{array}
if k < 3.15e56Initial program 59.9%
Simplified59.9%
unpow359.9%
times-frac72.1%
pow272.1%
Applied egg-rr72.1%
Taylor expanded in k around 0 68.4%
if 3.15e56 < k Initial program 50.6%
Simplified50.6%
associate-*l*50.5%
associate-/r*56.5%
associate-+r+56.5%
metadata-eval56.5%
associate-*l*56.6%
associate-*l/56.6%
associate-*r*56.6%
Applied egg-rr56.6%
Taylor expanded in k around 0 51.2%
Taylor expanded in k around inf 65.2%
Final simplification67.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 (<= t_m 1.1e-35)
(/ 2.0 (/ (* (/ t_m l) (pow k 4.0)) l))
(/ 2.0 (* (* 2.0 k) (* (sin k) (/ (pow t_m 3.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) {
double tmp;
if (t_m <= 1.1e-35) {
tmp = 2.0 / (((t_m / l) * pow(k, 4.0)) / l);
} else {
tmp = 2.0 / ((2.0 * k) * (sin(k) * (pow(t_m, 3.0) / (l * l))));
}
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.1d-35) then
tmp = 2.0d0 / (((t_m / l) * (k ** 4.0d0)) / l)
else
tmp = 2.0d0 / ((2.0d0 * k) * (sin(k) * ((t_m ** 3.0d0) / (l * l))))
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.1e-35) {
tmp = 2.0 / (((t_m / l) * Math.pow(k, 4.0)) / l);
} else {
tmp = 2.0 / ((2.0 * k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l))));
}
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.1e-35: tmp = 2.0 / (((t_m / l) * math.pow(k, 4.0)) / l) else: tmp = 2.0 / ((2.0 * k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * 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 <= 1.1e-35) tmp = Float64(2.0 / Float64(Float64(Float64(t_m / l) * (k ^ 4.0)) / l)); else tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l))))); 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.1e-35) tmp = 2.0 / (((t_m / l) * (k ^ 4.0)) / l); else tmp = 2.0 / ((2.0 * k) * (sin(k) * ((t_m ^ 3.0) / (l * l)))); 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.1e-35], N[(2.0 / N[(N[(N[(t$95$m / l), $MachinePrecision] * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * 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 1.1 \cdot 10^{-35}:\\
\;\;\;\;\frac{2}{\frac{\frac{t\_m}{\ell} \cdot {k}^{4}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)}\\
\end{array}
\end{array}
if t < 1.09999999999999997e-35Initial program 56.0%
Simplified56.0%
associate-*l*50.8%
associate-/r*56.4%
associate-+r+56.4%
metadata-eval56.4%
associate-*l*56.4%
associate-*l/59.2%
associate-*r*59.2%
Applied egg-rr59.2%
Taylor expanded in k around 0 53.4%
Taylor expanded in k around inf 59.1%
associate-/l*60.4%
Simplified60.4%
if 1.09999999999999997e-35 < t Initial program 65.1%
Simplified65.2%
Taylor expanded in k around 0 63.5%
Final simplification61.0%
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.2e-18)
(/ 2.0 (/ (* (/ t_m l) (pow k 4.0)) l))
(/ l (* (pow k 2.0) (/ 1.0 (/ l (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 (t_m <= 1.2e-18) {
tmp = 2.0 / (((t_m / l) * pow(k, 4.0)) / l);
} else {
tmp = l / (pow(k, 2.0) * (1.0 / (l / 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 (t_m <= 1.2d-18) then
tmp = 2.0d0 / (((t_m / l) * (k ** 4.0d0)) / l)
else
tmp = l / ((k ** 2.0d0) * (1.0d0 / (l / (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 (t_m <= 1.2e-18) {
tmp = 2.0 / (((t_m / l) * Math.pow(k, 4.0)) / l);
} else {
tmp = l / (Math.pow(k, 2.0) * (1.0 / (l / 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 t_m <= 1.2e-18: tmp = 2.0 / (((t_m / l) * math.pow(k, 4.0)) / l) else: tmp = l / (math.pow(k, 2.0) * (1.0 / (l / 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 (t_m <= 1.2e-18) tmp = Float64(2.0 / Float64(Float64(Float64(t_m / l) * (k ^ 4.0)) / l)); else tmp = Float64(l / Float64((k ^ 2.0) * Float64(1.0 / Float64(l / (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 (t_m <= 1.2e-18) tmp = 2.0 / (((t_m / l) * (k ^ 4.0)) / l); else tmp = l / ((k ^ 2.0) * (1.0 / (l / (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[t$95$m, 1.2e-18], N[(2.0 / N[(N[(N[(t$95$m / l), $MachinePrecision] * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(l / N[(N[Power[k, 2.0], $MachinePrecision] * N[(1.0 / N[(l / N[Power[t$95$m, 3.0], $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.2 \cdot 10^{-18}:\\
\;\;\;\;\frac{2}{\frac{\frac{t\_m}{\ell} \cdot {k}^{4}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{{k}^{2} \cdot \frac{1}{\frac{\ell}{{t\_m}^{3}}}}\\
\end{array}
\end{array}
if t < 1.19999999999999997e-18Initial program 56.6%
Simplified56.6%
associate-*l*51.5%
associate-/r*57.0%
associate-+r+57.0%
metadata-eval57.0%
associate-*l*57.0%
associate-*l/59.8%
associate-*r*59.8%
Applied egg-rr59.8%
Taylor expanded in k around 0 53.6%
Taylor expanded in k around inf 59.2%
associate-/l*60.5%
Simplified60.5%
if 1.19999999999999997e-18 < t Initial program 63.1%
Simplified63.2%
associate-*l*57.2%
associate-/r*61.6%
associate-+r+61.6%
metadata-eval61.6%
associate-*l*61.6%
associate-*l/65.1%
associate-*r*65.1%
Applied egg-rr65.1%
Taylor expanded in k around 0 59.6%
*-commutative59.6%
associate-/l*58.0%
Simplified58.0%
*-un-lft-identity58.0%
associate-/r/58.0%
associate-*r*58.0%
Applied egg-rr58.0%
*-lft-identity58.0%
associate-*l/58.0%
associate-*l*58.0%
times-frac58.0%
metadata-eval58.0%
associate-*r/59.7%
*-commutative59.7%
associate-/l*59.7%
Simplified59.7%
clear-num59.8%
inv-pow59.8%
Applied egg-rr59.8%
unpow-159.8%
Simplified59.8%
Final simplification60.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
(if (<= t_m 1.35e-18)
(/ 2.0 (/ (* (/ t_m l) (pow k 4.0)) l))
(* 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 (t_m <= 1.35e-18) {
tmp = 2.0 / (((t_m / l) * pow(k, 4.0)) / l);
} 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 (t_m <= 1.35d-18) then
tmp = 2.0d0 / (((t_m / l) * (k ** 4.0d0)) / l)
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 (t_m <= 1.35e-18) {
tmp = 2.0 / (((t_m / l) * Math.pow(k, 4.0)) / l);
} 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 t_m <= 1.35e-18: tmp = 2.0 / (((t_m / l) * math.pow(k, 4.0)) / l) 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 (t_m <= 1.35e-18) tmp = Float64(2.0 / Float64(Float64(Float64(t_m / l) * (k ^ 4.0)) / l)); 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 (t_m <= 1.35e-18) tmp = 2.0 / (((t_m / l) * (k ^ 4.0)) / l); 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[t$95$m, 1.35e-18], N[(2.0 / N[(N[(N[(t$95$m / l), $MachinePrecision] * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / l), $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}\;t\_m \leq 1.35 \cdot 10^{-18}:\\
\;\;\;\;\frac{2}{\frac{\frac{t\_m}{\ell} \cdot {k}^{4}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\ell}{{k}^{2} \cdot {t\_m}^{3}}\\
\end{array}
\end{array}
if t < 1.34999999999999994e-18Initial program 56.6%
Simplified56.6%
associate-*l*51.5%
associate-/r*57.0%
associate-+r+57.0%
metadata-eval57.0%
associate-*l*57.0%
associate-*l/59.8%
associate-*r*59.8%
Applied egg-rr59.8%
Taylor expanded in k around 0 53.6%
Taylor expanded in k around inf 59.2%
associate-/l*60.5%
Simplified60.5%
if 1.34999999999999994e-18 < t Initial program 63.1%
Simplified63.2%
associate-*l*57.2%
associate-/r*61.6%
associate-+r+61.6%
metadata-eval61.6%
associate-*l*61.6%
associate-*l/65.1%
associate-*r*65.1%
Applied egg-rr65.1%
Taylor expanded in k around 0 59.6%
*-commutative59.6%
associate-/l*58.0%
Simplified58.0%
*-un-lft-identity58.0%
associate-/r/58.0%
associate-*r*58.0%
Applied egg-rr58.0%
*-lft-identity58.0%
associate-*l/58.0%
associate-*l*58.0%
times-frac58.0%
metadata-eval58.0%
associate-*r/59.7%
*-commutative59.7%
associate-/l*59.7%
Simplified59.7%
div-inv59.7%
Applied egg-rr59.7%
associate-*r/59.7%
*-commutative59.7%
*-rgt-identity59.7%
associate-/l/57.9%
associate-/r/58.0%
associate-/r*59.7%
Simplified59.7%
Final simplification60.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
(if (<= t_m 1.3e-18)
(/ 2.0 (/ (* (/ t_m l) (pow k 4.0)) l))
(/ l (* (pow k 2.0) (/ (pow t_m 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 (t_m <= 1.3e-18) {
tmp = 2.0 / (((t_m / l) * pow(k, 4.0)) / l);
} else {
tmp = l / (pow(k, 2.0) * (pow(t_m, 3.0) / l));
}
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.3d-18) then
tmp = 2.0d0 / (((t_m / l) * (k ** 4.0d0)) / l)
else
tmp = l / ((k ** 2.0d0) * ((t_m ** 3.0d0) / l))
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.3e-18) {
tmp = 2.0 / (((t_m / l) * Math.pow(k, 4.0)) / l);
} else {
tmp = l / (Math.pow(k, 2.0) * (Math.pow(t_m, 3.0) / l));
}
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.3e-18: tmp = 2.0 / (((t_m / l) * math.pow(k, 4.0)) / l) else: tmp = l / (math.pow(k, 2.0) * (math.pow(t_m, 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 (t_m <= 1.3e-18) tmp = Float64(2.0 / Float64(Float64(Float64(t_m / l) * (k ^ 4.0)) / l)); else tmp = Float64(l / Float64((k ^ 2.0) * Float64((t_m ^ 3.0) / l))); 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.3e-18) tmp = 2.0 / (((t_m / l) * (k ^ 4.0)) / l); else tmp = l / ((k ^ 2.0) * ((t_m ^ 3.0) / l)); 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.3e-18], N[(2.0 / N[(N[(N[(t$95$m / l), $MachinePrecision] * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(l / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[t$95$m, 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}\;t\_m \leq 1.3 \cdot 10^{-18}:\\
\;\;\;\;\frac{2}{\frac{\frac{t\_m}{\ell} \cdot {k}^{4}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{{k}^{2} \cdot \frac{{t\_m}^{3}}{\ell}}\\
\end{array}
\end{array}
if t < 1.3e-18Initial program 56.6%
Simplified56.6%
associate-*l*51.5%
associate-/r*57.0%
associate-+r+57.0%
metadata-eval57.0%
associate-*l*57.0%
associate-*l/59.8%
associate-*r*59.8%
Applied egg-rr59.8%
Taylor expanded in k around 0 53.6%
Taylor expanded in k around inf 59.2%
associate-/l*60.5%
Simplified60.5%
if 1.3e-18 < t Initial program 63.1%
Simplified63.2%
associate-*l*57.2%
associate-/r*61.6%
associate-+r+61.6%
metadata-eval61.6%
associate-*l*61.6%
associate-*l/65.1%
associate-*r*65.1%
Applied egg-rr65.1%
Taylor expanded in k around 0 59.6%
*-commutative59.6%
associate-/l*58.0%
Simplified58.0%
*-un-lft-identity58.0%
associate-/r/58.0%
associate-*r*58.0%
Applied egg-rr58.0%
*-lft-identity58.0%
associate-*l/58.0%
associate-*l*58.0%
times-frac58.0%
metadata-eval58.0%
associate-*r/59.7%
*-commutative59.7%
associate-/l*59.7%
Simplified59.7%
Final simplification60.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 (/ (* (/ t_m l) (pow k 4.0)) 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 / (((t_m / l) * pow(k, 4.0)) / 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 / l) * (k ** 4.0d0)) / 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 / (((t_m / l) * Math.pow(k, 4.0)) / 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 / (((t_m / l) * math.pow(k, 4.0)) / 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(Float64(t_m / l) * (k ^ 4.0)) / 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 / l) * (k ^ 4.0)) / 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[(t$95$m / l), $MachinePrecision] * N[Power[k, 4.0], $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{\frac{t\_m}{\ell} \cdot {k}^{4}}{\ell}}
\end{array}
Initial program 58.0%
Simplified58.0%
associate-*l*52.7%
associate-/r*58.0%
associate-+r+58.0%
metadata-eval58.0%
associate-*l*58.0%
associate-*l/60.9%
associate-*r*60.9%
Applied egg-rr60.9%
Taylor expanded in k around 0 54.9%
Taylor expanded in k around inf 56.7%
associate-/l*57.6%
Simplified57.6%
Final simplification57.6%
herbie shell --seed 2024076
(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))))