
(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 18 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 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ t_m (cbrt l))) (t_3 (+ 2.0 (pow (/ k t_m) 2.0))))
(*
t_s
(if (<= t_m 1.2e-26)
(/ 2.0 (/ (* (tan k) (/ (* (pow k 2.0) (* t_m (sin k))) l)) l))
(if (<= t_m 1.2e+98)
(/ 2.0 (/ (* (tan k) (* t_3 (* (sin k) (/ (pow t_m 3.0) l)))) l))
(if (<= t_m 4e+176)
(/
2.0
(/ (* (tan k) (pow (* t_2 (* (cbrt (sin k)) (cbrt 2.0))) 3.0)) l))
(/
2.0
(* (* (sin k) (pow (/ t_2 (cbrt l)) 3.0)) (* (tan k) t_3)))))))))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 = t_m / cbrt(l);
double t_3 = 2.0 + pow((k / t_m), 2.0);
double tmp;
if (t_m <= 1.2e-26) {
tmp = 2.0 / ((tan(k) * ((pow(k, 2.0) * (t_m * sin(k))) / l)) / l);
} else if (t_m <= 1.2e+98) {
tmp = 2.0 / ((tan(k) * (t_3 * (sin(k) * (pow(t_m, 3.0) / l)))) / l);
} else if (t_m <= 4e+176) {
tmp = 2.0 / ((tan(k) * pow((t_2 * (cbrt(sin(k)) * cbrt(2.0))), 3.0)) / l);
} else {
tmp = 2.0 / ((sin(k) * pow((t_2 / cbrt(l)), 3.0)) * (tan(k) * t_3));
}
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 = t_m / Math.cbrt(l);
double t_3 = 2.0 + Math.pow((k / t_m), 2.0);
double tmp;
if (t_m <= 1.2e-26) {
tmp = 2.0 / ((Math.tan(k) * ((Math.pow(k, 2.0) * (t_m * Math.sin(k))) / l)) / l);
} else if (t_m <= 1.2e+98) {
tmp = 2.0 / ((Math.tan(k) * (t_3 * (Math.sin(k) * (Math.pow(t_m, 3.0) / l)))) / l);
} else if (t_m <= 4e+176) {
tmp = 2.0 / ((Math.tan(k) * Math.pow((t_2 * (Math.cbrt(Math.sin(k)) * Math.cbrt(2.0))), 3.0)) / l);
} else {
tmp = 2.0 / ((Math.sin(k) * Math.pow((t_2 / Math.cbrt(l)), 3.0)) * (Math.tan(k) * t_3));
}
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(t_m / cbrt(l)) t_3 = Float64(2.0 + (Float64(k / t_m) ^ 2.0)) tmp = 0.0 if (t_m <= 1.2e-26) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(Float64((k ^ 2.0) * Float64(t_m * sin(k))) / l)) / l)); elseif (t_m <= 1.2e+98) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(t_3 * Float64(sin(k) * Float64((t_m ^ 3.0) / l)))) / l)); elseif (t_m <= 4e+176) tmp = Float64(2.0 / Float64(Float64(tan(k) * (Float64(t_2 * Float64(cbrt(sin(k)) * cbrt(2.0))) ^ 3.0)) / l)); else tmp = Float64(2.0 / Float64(Float64(sin(k) * (Float64(t_2 / cbrt(l)) ^ 3.0)) * Float64(tan(k) * t_3))); 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[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.2e-26], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.2e+98], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(t$95$3 * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4e+176], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[Power[N[(t$95$2 * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[Power[N[(t$95$2 / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * t$95$3), $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 := \frac{t\_m}{\sqrt[3]{\ell}}\\
t_3 := 2 + {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.2 \cdot 10^{-26}:\\
\;\;\;\;\frac{2}{\frac{\tan k \cdot \frac{{k}^{2} \cdot \left(t\_m \cdot \sin k\right)}{\ell}}{\ell}}\\
\mathbf{elif}\;t\_m \leq 1.2 \cdot 10^{+98}:\\
\;\;\;\;\frac{2}{\frac{\tan k \cdot \left(t\_3 \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell}\right)\right)}{\ell}}\\
\mathbf{elif}\;t\_m \leq 4 \cdot 10^{+176}:\\
\;\;\;\;\frac{2}{\frac{\tan k \cdot {\left(t\_2 \cdot \left(\sqrt[3]{\sin k} \cdot \sqrt[3]{2}\right)\right)}^{3}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot {\left(\frac{t\_2}{\sqrt[3]{\ell}}\right)}^{3}\right) \cdot \left(\tan k \cdot t\_3\right)}\\
\end{array}
\end{array}
\end{array}
if t < 1.2e-26Initial program 46.2%
associate-/r*50.5%
+-commutative50.5%
associate-+r+50.5%
metadata-eval50.5%
associate-*r*50.9%
*-commutative50.9%
associate-*l/51.5%
associate-*r/51.8%
Applied egg-rr51.8%
associate-*l*51.9%
*-commutative51.9%
Simplified51.9%
Taylor expanded in k around inf 72.4%
if 1.2e-26 < t < 1.1999999999999999e98Initial program 89.7%
associate-/r*93.0%
+-commutative93.0%
associate-+r+93.0%
metadata-eval93.0%
associate-*r*93.0%
*-commutative93.0%
associate-*l/96.4%
associate-*r/99.7%
Applied egg-rr99.7%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
if 1.1999999999999999e98 < t < 4e176Initial program 53.7%
associate-/r*58.5%
+-commutative58.5%
associate-+r+58.5%
metadata-eval58.5%
associate-*r*58.5%
*-commutative58.5%
associate-*l/58.6%
associate-*r/58.6%
Applied egg-rr58.6%
associate-*l*58.6%
*-commutative58.6%
Simplified58.6%
add-cube-cbrt58.5%
pow358.5%
Applied egg-rr94.6%
Taylor expanded in t around inf 46.9%
unpow1/394.8%
*-lft-identity94.8%
Simplified94.8%
if 4e176 < t Initial program 70.9%
associate-*l*70.9%
sqr-neg70.9%
sqr-neg70.9%
associate-/r*72.1%
distribute-rgt-in72.1%
unpow272.1%
times-frac53.6%
sqr-neg53.6%
times-frac72.1%
unpow272.1%
distribute-rgt-in72.1%
Simplified72.1%
add-cube-cbrt72.1%
pow372.1%
cbrt-div72.1%
rem-cbrt-cube72.1%
Applied egg-rr72.1%
add-cube-cbrt72.1%
pow372.1%
cbrt-div72.1%
unpow372.1%
add-cbrt-cube93.7%
Applied egg-rr93.7%
Final simplification78.7%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (+ 1.0 (+ (pow (/ k t_m) 2.0) 1.0))))
(*
t_s
(if (<= (* t_2 (* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l))))) INFINITY)
(/ 2.0 (* t_2 (* (tan k) (* (sin k) (* (/ (pow t_m 2.0) l) (/ t_m l))))))
(/ 2.0 (/ (* (tan k) (/ (* (pow k 2.0) (* t_m (sin k))) 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 t_2 = 1.0 + (pow((k / t_m), 2.0) + 1.0);
double tmp;
if ((t_2 * (tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l))))) <= ((double) INFINITY)) {
tmp = 2.0 / (t_2 * (tan(k) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / l)))));
} else {
tmp = 2.0 / ((tan(k) * ((pow(k, 2.0) * (t_m * sin(k))) / l)) / 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 = 1.0 + (Math.pow((k / t_m), 2.0) + 1.0);
double tmp;
if ((t_2 * (Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l))))) <= Double.POSITIVE_INFINITY) {
tmp = 2.0 / (t_2 * (Math.tan(k) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / l)))));
} else {
tmp = 2.0 / ((Math.tan(k) * ((Math.pow(k, 2.0) * (t_m * Math.sin(k))) / 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): t_2 = 1.0 + (math.pow((k / t_m), 2.0) + 1.0) tmp = 0 if (t_2 * (math.tan(k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l))))) <= math.inf: tmp = 2.0 / (t_2 * (math.tan(k) * (math.sin(k) * ((math.pow(t_m, 2.0) / l) * (t_m / l))))) else: tmp = 2.0 / ((math.tan(k) * ((math.pow(k, 2.0) * (t_m * math.sin(k))) / l)) / 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(1.0 + Float64((Float64(k / t_m) ^ 2.0) + 1.0)) tmp = 0.0 if (Float64(t_2 * Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l))))) <= Inf) tmp = Float64(2.0 / Float64(t_2 * Float64(tan(k) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l)))))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(Float64((k ^ 2.0) * Float64(t_m * sin(k))) / 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) t_2 = 1.0 + (((k / t_m) ^ 2.0) + 1.0); tmp = 0.0; if ((t_2 * (tan(k) * (sin(k) * ((t_m ^ 3.0) / (l * l))))) <= Inf) tmp = 2.0 / (t_2 * (tan(k) * (sin(k) * (((t_m ^ 2.0) / l) * (t_m / l))))); else tmp = 2.0 / ((tan(k) * (((k ^ 2.0) * (t_m * sin(k))) / 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_] := Block[{t$95$2 = N[(1.0 + N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(t$95$2 * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(2.0 / N[(t$95$2 * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $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 := 1 + \left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_2 \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right) \leq \infty:\\
\;\;\;\;\frac{2}{t\_2 \cdot \left(\tan k \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\tan k \cdot \frac{{k}^{2} \cdot \left(t\_m \cdot \sin k\right)}{\ell}}{\ell}}\\
\end{array}
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1)) < +inf.0Initial program 79.6%
unpow379.6%
times-frac87.4%
pow287.4%
Applied egg-rr87.4%
if +inf.0 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1)) Initial program 0.0%
associate-/r*4.2%
+-commutative4.2%
associate-+r+4.2%
metadata-eval4.2%
associate-*r*4.2%
*-commutative4.2%
associate-*l/4.2%
associate-*r/4.3%
Applied egg-rr4.3%
associate-*l*4.3%
*-commutative4.3%
Simplified4.3%
Taylor expanded in k around inf 70.5%
Final simplification81.8%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (/ k t_m) 2.0)))
(*
t_s
(if (<=
(*
(+ 1.0 (+ t_2 1.0))
(* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l)))))
INFINITY)
(/ 2.0 (/ (* (tan k) (* (+ 2.0 t_2) (* (sin k) (/ (pow t_m 3.0) l)))) l))
(/ 2.0 (/ (* (tan k) (/ (* (pow k 2.0) (* t_m (sin k))) 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 t_2 = pow((k / t_m), 2.0);
double tmp;
if (((1.0 + (t_2 + 1.0)) * (tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l))))) <= ((double) INFINITY)) {
tmp = 2.0 / ((tan(k) * ((2.0 + t_2) * (sin(k) * (pow(t_m, 3.0) / l)))) / l);
} else {
tmp = 2.0 / ((tan(k) * ((pow(k, 2.0) * (t_m * sin(k))) / l)) / 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 tmp;
if (((1.0 + (t_2 + 1.0)) * (Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l))))) <= Double.POSITIVE_INFINITY) {
tmp = 2.0 / ((Math.tan(k) * ((2.0 + t_2) * (Math.sin(k) * (Math.pow(t_m, 3.0) / l)))) / l);
} else {
tmp = 2.0 / ((Math.tan(k) * ((Math.pow(k, 2.0) * (t_m * Math.sin(k))) / 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): t_2 = math.pow((k / t_m), 2.0) tmp = 0 if ((1.0 + (t_2 + 1.0)) * (math.tan(k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l))))) <= math.inf: tmp = 2.0 / ((math.tan(k) * ((2.0 + t_2) * (math.sin(k) * (math.pow(t_m, 3.0) / l)))) / l) else: tmp = 2.0 / ((math.tan(k) * ((math.pow(k, 2.0) * (t_m * math.sin(k))) / l)) / 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 tmp = 0.0 if (Float64(Float64(1.0 + Float64(t_2 + 1.0)) * Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l))))) <= Inf) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(Float64(2.0 + t_2) * Float64(sin(k) * Float64((t_m ^ 3.0) / l)))) / l)); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(Float64((k ^ 2.0) * Float64(t_m * sin(k))) / 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) t_2 = (k / t_m) ^ 2.0; tmp = 0.0; if (((1.0 + (t_2 + 1.0)) * (tan(k) * (sin(k) * ((t_m ^ 3.0) / (l * l))))) <= Inf) tmp = 2.0 / ((tan(k) * ((2.0 + t_2) * (sin(k) * ((t_m ^ 3.0) / l)))) / l); else tmp = 2.0 / ((tan(k) * (((k ^ 2.0) * (t_m * sin(k))) / 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_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(N[(1.0 + N[(t$95$2 + 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[(2.0 + t$95$2), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $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\_s \cdot \begin{array}{l}
\mathbf{if}\;\left(1 + \left(t\_2 + 1\right)\right) \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right) \leq \infty:\\
\;\;\;\;\frac{2}{\frac{\tan k \cdot \left(\left(2 + t\_2\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell}\right)\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\tan k \cdot \frac{{k}^{2} \cdot \left(t\_m \cdot \sin k\right)}{\ell}}{\ell}}\\
\end{array}
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1)) < +inf.0Initial program 79.6%
associate-/r*83.5%
+-commutative83.5%
associate-+r+83.5%
metadata-eval83.5%
associate-*r*84.1%
*-commutative84.1%
associate-*l/85.2%
associate-*r/86.1%
Applied egg-rr86.1%
associate-*l*86.1%
*-commutative86.1%
Simplified86.1%
if +inf.0 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1)) Initial program 0.0%
associate-/r*4.2%
+-commutative4.2%
associate-+r+4.2%
metadata-eval4.2%
associate-*r*4.2%
*-commutative4.2%
associate-*l/4.2%
associate-*r/4.3%
Applied egg-rr4.3%
associate-*l*4.3%
*-commutative4.3%
Simplified4.3%
Taylor expanded in k around inf 70.5%
Final simplification80.9%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 6.2e-27)
(/ 2.0 (/ (* (tan k) (/ (* (pow k 2.0) (* t_m (sin k))) l)) l))
(if (<= t_m 2.7e+98)
(/
2.0
(/
(*
(tan k)
(* (+ 2.0 (pow (/ k t_m) 2.0)) (* (sin k) (/ (pow t_m 3.0) l))))
l))
(/
2.0
(/
(*
(tan k)
(pow (* (/ t_m (cbrt l)) (* (cbrt (sin k)) (cbrt 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 (t_m <= 6.2e-27) {
tmp = 2.0 / ((tan(k) * ((pow(k, 2.0) * (t_m * sin(k))) / l)) / l);
} else if (t_m <= 2.7e+98) {
tmp = 2.0 / ((tan(k) * ((2.0 + pow((k / t_m), 2.0)) * (sin(k) * (pow(t_m, 3.0) / l)))) / l);
} else {
tmp = 2.0 / ((tan(k) * pow(((t_m / cbrt(l)) * (cbrt(sin(k)) * cbrt(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 (t_m <= 6.2e-27) {
tmp = 2.0 / ((Math.tan(k) * ((Math.pow(k, 2.0) * (t_m * Math.sin(k))) / l)) / l);
} else if (t_m <= 2.7e+98) {
tmp = 2.0 / ((Math.tan(k) * ((2.0 + Math.pow((k / t_m), 2.0)) * (Math.sin(k) * (Math.pow(t_m, 3.0) / l)))) / l);
} else {
tmp = 2.0 / ((Math.tan(k) * Math.pow(((t_m / Math.cbrt(l)) * (Math.cbrt(Math.sin(k)) * Math.cbrt(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 (t_m <= 6.2e-27) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(Float64((k ^ 2.0) * Float64(t_m * sin(k))) / l)) / l)); elseif (t_m <= 2.7e+98) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(Float64(2.0 + (Float64(k / t_m) ^ 2.0)) * Float64(sin(k) * Float64((t_m ^ 3.0) / l)))) / l)); else tmp = Float64(2.0 / Float64(Float64(tan(k) * (Float64(Float64(t_m / cbrt(l)) * Float64(cbrt(sin(k)) * cbrt(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[t$95$m, 6.2e-27], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.7e+98], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * 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[2.0, 1/3], $MachinePrecision]), $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}\;t\_m \leq 6.2 \cdot 10^{-27}:\\
\;\;\;\;\frac{2}{\frac{\tan k \cdot \frac{{k}^{2} \cdot \left(t\_m \cdot \sin k\right)}{\ell}}{\ell}}\\
\mathbf{elif}\;t\_m \leq 2.7 \cdot 10^{+98}:\\
\;\;\;\;\frac{2}{\frac{\tan k \cdot \left(\left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell}\right)\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\tan k \cdot {\left(\frac{t\_m}{\sqrt[3]{\ell}} \cdot \left(\sqrt[3]{\sin k} \cdot \sqrt[3]{2}\right)\right)}^{3}}{\ell}}\\
\end{array}
\end{array}
if t < 6.1999999999999997e-27Initial program 46.2%
associate-/r*50.5%
+-commutative50.5%
associate-+r+50.5%
metadata-eval50.5%
associate-*r*50.9%
*-commutative50.9%
associate-*l/51.5%
associate-*r/51.8%
Applied egg-rr51.8%
associate-*l*51.9%
*-commutative51.9%
Simplified51.9%
Taylor expanded in k around inf 72.4%
if 6.1999999999999997e-27 < t < 2.7e98Initial program 89.7%
associate-/r*93.0%
+-commutative93.0%
associate-+r+93.0%
metadata-eval93.0%
associate-*r*93.0%
*-commutative93.0%
associate-*l/96.4%
associate-*r/99.7%
Applied egg-rr99.7%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
if 2.7e98 < t Initial program 61.4%
associate-/r*64.6%
+-commutative64.6%
associate-+r+64.6%
metadata-eval64.6%
associate-*r*64.6%
*-commutative64.6%
associate-*l/64.6%
associate-*r/64.6%
Applied egg-rr64.6%
associate-*l*64.6%
*-commutative64.6%
Simplified64.6%
add-cube-cbrt64.6%
pow364.6%
Applied egg-rr87.0%
Taylor expanded in t around inf 52.1%
unpow1/387.1%
*-lft-identity87.1%
Simplified87.1%
Final simplification77.6%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 8e-26)
(/ 2.0 (/ (* (tan k) (/ (* (pow k 2.0) (* t_m (sin k))) l)) l))
(/
2.0
(/
(*
(tan k)
(pow
(* (cbrt (* (sin k) (+ 2.0 (pow (/ k t_m) 2.0)))) (/ t_m (cbrt 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 (t_m <= 8e-26) {
tmp = 2.0 / ((tan(k) * ((pow(k, 2.0) * (t_m * sin(k))) / l)) / l);
} else {
tmp = 2.0 / ((tan(k) * pow((cbrt((sin(k) * (2.0 + pow((k / t_m), 2.0)))) * (t_m / cbrt(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 (t_m <= 8e-26) {
tmp = 2.0 / ((Math.tan(k) * ((Math.pow(k, 2.0) * (t_m * Math.sin(k))) / l)) / l);
} else {
tmp = 2.0 / ((Math.tan(k) * Math.pow((Math.cbrt((Math.sin(k) * (2.0 + Math.pow((k / t_m), 2.0)))) * (t_m / Math.cbrt(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 (t_m <= 8e-26) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(Float64((k ^ 2.0) * Float64(t_m * sin(k))) / l)) / l)); else tmp = Float64(2.0 / Float64(Float64(tan(k) * (Float64(cbrt(Float64(sin(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0)))) * Float64(t_m / cbrt(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[t$95$m, 8e-26], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[Power[N[(N[Power[N[(N[Sin[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $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}\;t\_m \leq 8 \cdot 10^{-26}:\\
\;\;\;\;\frac{2}{\frac{\tan k \cdot \frac{{k}^{2} \cdot \left(t\_m \cdot \sin k\right)}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\tan k \cdot {\left(\sqrt[3]{\sin k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)} \cdot \frac{t\_m}{\sqrt[3]{\ell}}\right)}^{3}}{\ell}}\\
\end{array}
\end{array}
if t < 8.0000000000000003e-26Initial program 46.5%
associate-/r*50.7%
+-commutative50.7%
associate-+r+50.7%
metadata-eval50.7%
associate-*r*51.2%
*-commutative51.2%
associate-*l/51.7%
associate-*r/52.1%
Applied egg-rr52.1%
associate-*l*52.1%
*-commutative52.1%
Simplified52.1%
Taylor expanded in k around inf 72.6%
if 8.0000000000000003e-26 < t Initial program 73.0%
associate-/r*76.3%
+-commutative76.3%
associate-+r+76.3%
metadata-eval76.3%
associate-*r*76.3%
*-commutative76.3%
associate-*l/77.8%
associate-*r/79.2%
Applied egg-rr79.2%
associate-*l*79.2%
*-commutative79.2%
Simplified79.2%
add-cube-cbrt79.0%
pow379.0%
Applied egg-rr92.1%
Final simplification77.5%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.55e-7)
(/ 2.0 (/ (* (tan k) (/ (* (pow k 2.0) (* t_m (sin k))) l)) l))
(/
2.0
(*
(* (tan k) (* (sin k) (pow (/ (pow t_m 1.5) l) 2.0)))
(+ 1.0 (+ (pow (/ k t_m) 2.0) 1.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.55e-7) {
tmp = 2.0 / ((tan(k) * ((pow(k, 2.0) * (t_m * sin(k))) / l)) / l);
} else {
tmp = 2.0 / ((tan(k) * (sin(k) * pow((pow(t_m, 1.5) / l), 2.0))) * (1.0 + (pow((k / t_m), 2.0) + 1.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.55d-7) then
tmp = 2.0d0 / ((tan(k) * (((k ** 2.0d0) * (t_m * sin(k))) / l)) / l)
else
tmp = 2.0d0 / ((tan(k) * (sin(k) * (((t_m ** 1.5d0) / l) ** 2.0d0))) * (1.0d0 + (((k / t_m) ** 2.0d0) + 1.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.55e-7) {
tmp = 2.0 / ((Math.tan(k) * ((Math.pow(k, 2.0) * (t_m * Math.sin(k))) / l)) / l);
} else {
tmp = 2.0 / ((Math.tan(k) * (Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / l), 2.0))) * (1.0 + (Math.pow((k / t_m), 2.0) + 1.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.55e-7: tmp = 2.0 / ((math.tan(k) * ((math.pow(k, 2.0) * (t_m * math.sin(k))) / l)) / l) else: tmp = 2.0 / ((math.tan(k) * (math.sin(k) * math.pow((math.pow(t_m, 1.5) / l), 2.0))) * (1.0 + (math.pow((k / t_m), 2.0) + 1.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.55e-7) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(Float64((k ^ 2.0) * Float64(t_m * sin(k))) / l)) / l)); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(sin(k) * (Float64((t_m ^ 1.5) / l) ^ 2.0))) * Float64(1.0 + Float64((Float64(k / t_m) ^ 2.0) + 1.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.55e-7) tmp = 2.0 / ((tan(k) * (((k ^ 2.0) * (t_m * sin(k))) / l)) / l); else tmp = 2.0 / ((tan(k) * (sin(k) * (((t_m ^ 1.5) / l) ^ 2.0))) * (1.0 + (((k / t_m) ^ 2.0) + 1.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.55e-7], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.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.55 \cdot 10^{-7}:\\
\;\;\;\;\frac{2}{\frac{\tan k \cdot \frac{{k}^{2} \cdot \left(t\_m \cdot \sin k\right)}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\right)\right) \cdot \left(1 + \left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right)\right)}\\
\end{array}
\end{array}
if t < 1.55e-7Initial program 47.0%
associate-/r*51.2%
+-commutative51.2%
associate-+r+51.2%
metadata-eval51.2%
associate-*r*51.7%
*-commutative51.7%
associate-*l/52.2%
associate-*r/52.6%
Applied egg-rr52.6%
associate-*l*52.6%
*-commutative52.6%
Simplified52.6%
Taylor expanded in k around inf 72.9%
if 1.55e-7 < t Initial program 72.2%
associate-/r*75.5%
add-sqr-sqrt75.5%
pow275.5%
associate-/r*72.1%
sqrt-div72.1%
sqrt-pow181.4%
metadata-eval81.4%
sqrt-prod54.4%
add-sqr-sqrt86.2%
Applied egg-rr86.2%
Final simplification76.1%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 5.8e-27)
(/ 2.0 (/ (* (tan k) (/ (* (pow k 2.0) (* t_m (sin k))) l)) l))
(if (<= t_m 1.9e+94)
(/
2.0
(/
(*
(tan k)
(* (+ 2.0 (pow (/ k t_m) 2.0)) (* (sin k) (/ (pow t_m 3.0) l))))
l))
(/
2.0
(/
(* (tan k) (pow (* (cbrt (/ (sin k) l)) (* t_m (cbrt 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 (t_m <= 5.8e-27) {
tmp = 2.0 / ((tan(k) * ((pow(k, 2.0) * (t_m * sin(k))) / l)) / l);
} else if (t_m <= 1.9e+94) {
tmp = 2.0 / ((tan(k) * ((2.0 + pow((k / t_m), 2.0)) * (sin(k) * (pow(t_m, 3.0) / l)))) / l);
} else {
tmp = 2.0 / ((tan(k) * pow((cbrt((sin(k) / l)) * (t_m * cbrt(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 (t_m <= 5.8e-27) {
tmp = 2.0 / ((Math.tan(k) * ((Math.pow(k, 2.0) * (t_m * Math.sin(k))) / l)) / l);
} else if (t_m <= 1.9e+94) {
tmp = 2.0 / ((Math.tan(k) * ((2.0 + Math.pow((k / t_m), 2.0)) * (Math.sin(k) * (Math.pow(t_m, 3.0) / l)))) / l);
} else {
tmp = 2.0 / ((Math.tan(k) * Math.pow((Math.cbrt((Math.sin(k) / l)) * (t_m * Math.cbrt(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 (t_m <= 5.8e-27) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(Float64((k ^ 2.0) * Float64(t_m * sin(k))) / l)) / l)); elseif (t_m <= 1.9e+94) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(Float64(2.0 + (Float64(k / t_m) ^ 2.0)) * Float64(sin(k) * Float64((t_m ^ 3.0) / l)))) / l)); else tmp = Float64(2.0 / Float64(Float64(tan(k) * (Float64(cbrt(Float64(sin(k) / l)) * Float64(t_m * cbrt(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[t$95$m, 5.8e-27], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.9e+94], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[Power[N[(N[Power[N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m * N[Power[2.0, 1/3], $MachinePrecision]), $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}\;t\_m \leq 5.8 \cdot 10^{-27}:\\
\;\;\;\;\frac{2}{\frac{\tan k \cdot \frac{{k}^{2} \cdot \left(t\_m \cdot \sin k\right)}{\ell}}{\ell}}\\
\mathbf{elif}\;t\_m \leq 1.9 \cdot 10^{+94}:\\
\;\;\;\;\frac{2}{\frac{\tan k \cdot \left(\left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell}\right)\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\tan k \cdot {\left(\sqrt[3]{\frac{\sin k}{\ell}} \cdot \left(t\_m \cdot \sqrt[3]{2}\right)\right)}^{3}}{\ell}}\\
\end{array}
\end{array}
if t < 5.80000000000000008e-27Initial program 46.2%
associate-/r*50.5%
+-commutative50.5%
associate-+r+50.5%
metadata-eval50.5%
associate-*r*50.9%
*-commutative50.9%
associate-*l/51.5%
associate-*r/51.8%
Applied egg-rr51.8%
associate-*l*51.9%
*-commutative51.9%
Simplified51.9%
Taylor expanded in k around inf 72.4%
if 5.80000000000000008e-27 < t < 1.8999999999999998e94Initial program 92.2%
associate-/r*92.2%
+-commutative92.2%
associate-+r+92.2%
metadata-eval92.2%
associate-*r*92.2%
*-commutative92.2%
associate-*l/96.0%
associate-*r/99.8%
Applied egg-rr99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
if 1.8999999999999998e94 < t Initial program 61.9%
associate-/r*67.1%
+-commutative67.1%
associate-+r+67.1%
metadata-eval67.1%
associate-*r*67.1%
*-commutative67.1%
associate-*l/67.2%
associate-*r/67.1%
Applied egg-rr67.1%
associate-*l*67.1%
*-commutative67.1%
Simplified67.1%
add-cube-cbrt67.1%
pow367.1%
Applied egg-rr87.8%
Taylor expanded in t around inf 45.6%
unpow1/385.8%
*-lft-identity85.8%
*-commutative85.8%
Simplified85.8%
Final simplification77.2%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (/ k t_m) 2.0)))
(*
t_s
(if (<= t_m 6.2e-27)
(/ 2.0 (/ (* (tan k) (/ (* (pow k 2.0) (* t_m (sin k))) l)) l))
(if (<= t_m 5.2e+96)
(/
2.0
(/ (* (tan k) (* (+ 2.0 t_2) (* (sin k) (/ (pow t_m 3.0) l)))) l))
(/
2.0
(*
(+ 1.0 (+ t_2 1.0))
(* (tan k) (/ (pow (* t_m (cbrt (/ k 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 t_2 = pow((k / t_m), 2.0);
double tmp;
if (t_m <= 6.2e-27) {
tmp = 2.0 / ((tan(k) * ((pow(k, 2.0) * (t_m * sin(k))) / l)) / l);
} else if (t_m <= 5.2e+96) {
tmp = 2.0 / ((tan(k) * ((2.0 + t_2) * (sin(k) * (pow(t_m, 3.0) / l)))) / l);
} else {
tmp = 2.0 / ((1.0 + (t_2 + 1.0)) * (tan(k) * (pow((t_m * cbrt((k / 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 t_2 = Math.pow((k / t_m), 2.0);
double tmp;
if (t_m <= 6.2e-27) {
tmp = 2.0 / ((Math.tan(k) * ((Math.pow(k, 2.0) * (t_m * Math.sin(k))) / l)) / l);
} else if (t_m <= 5.2e+96) {
tmp = 2.0 / ((Math.tan(k) * ((2.0 + t_2) * (Math.sin(k) * (Math.pow(t_m, 3.0) / l)))) / l);
} else {
tmp = 2.0 / ((1.0 + (t_2 + 1.0)) * (Math.tan(k) * (Math.pow((t_m * Math.cbrt((k / 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) t_2 = Float64(k / t_m) ^ 2.0 tmp = 0.0 if (t_m <= 6.2e-27) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(Float64((k ^ 2.0) * Float64(t_m * sin(k))) / l)) / l)); elseif (t_m <= 5.2e+96) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(Float64(2.0 + t_2) * Float64(sin(k) * Float64((t_m ^ 3.0) / l)))) / l)); else tmp = Float64(2.0 / Float64(Float64(1.0 + Float64(t_2 + 1.0)) * Float64(tan(k) * Float64((Float64(t_m * cbrt(Float64(k / 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_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 6.2e-27], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.2e+96], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[(2.0 + t$95$2), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(1.0 + N[(t$95$2 + 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Power[N[(t$95$m * N[Power[N[(k / l), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / l), $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 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 6.2 \cdot 10^{-27}:\\
\;\;\;\;\frac{2}{\frac{\tan k \cdot \frac{{k}^{2} \cdot \left(t\_m \cdot \sin k\right)}{\ell}}{\ell}}\\
\mathbf{elif}\;t\_m \leq 5.2 \cdot 10^{+96}:\\
\;\;\;\;\frac{2}{\frac{\tan k \cdot \left(\left(2 + t\_2\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell}\right)\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(1 + \left(t\_2 + 1\right)\right) \cdot \left(\tan k \cdot \frac{{\left(t\_m \cdot \sqrt[3]{\frac{k}{\ell}}\right)}^{3}}{\ell}\right)}\\
\end{array}
\end{array}
\end{array}
if t < 6.1999999999999997e-27Initial program 46.2%
associate-/r*50.5%
+-commutative50.5%
associate-+r+50.5%
metadata-eval50.5%
associate-*r*50.9%
*-commutative50.9%
associate-*l/51.5%
associate-*r/51.8%
Applied egg-rr51.8%
associate-*l*51.9%
*-commutative51.9%
Simplified51.9%
Taylor expanded in k around inf 72.4%
if 6.1999999999999997e-27 < t < 5.2e96Initial program 89.3%
associate-/r*92.7%
+-commutative92.7%
associate-+r+92.7%
metadata-eval92.7%
associate-*r*92.7%
*-commutative92.7%
associate-*l/96.3%
associate-*r/99.7%
Applied egg-rr99.7%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
if 5.2e96 < t Initial program 62.4%
associate-/r*65.5%
associate-*l/65.5%
Applied egg-rr65.5%
Taylor expanded in k around 0 65.4%
associate-/l*64.7%
Simplified64.7%
add-cube-cbrt64.6%
pow364.6%
associate-/r/65.2%
cbrt-prod65.2%
unpow365.3%
add-cbrt-cube77.9%
Applied egg-rr77.9%
Final simplification76.2%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.05e-93)
(/ 2.0 (/ (pow (* k (sin k)) 2.0) (/ (pow l 2.0) t_m)))
(if (<= t_m 5.6e+102)
(/ 2.0 (/ (* (tan k) (* 2.0 (* (pow t_m 3.0) (/ k l)))) l))
(/ 2.0 (* (* (sin k) (/ (pow (/ t_m (cbrt l)) 3.0) l)) (* 2.0 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.05e-93) {
tmp = 2.0 / (pow((k * sin(k)), 2.0) / (pow(l, 2.0) / t_m));
} else if (t_m <= 5.6e+102) {
tmp = 2.0 / ((tan(k) * (2.0 * (pow(t_m, 3.0) * (k / l)))) / l);
} else {
tmp = 2.0 / ((sin(k) * (pow((t_m / cbrt(l)), 3.0) / l)) * (2.0 * 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 <= 1.05e-93) {
tmp = 2.0 / (Math.pow((k * Math.sin(k)), 2.0) / (Math.pow(l, 2.0) / t_m));
} else if (t_m <= 5.6e+102) {
tmp = 2.0 / ((Math.tan(k) * (2.0 * (Math.pow(t_m, 3.0) * (k / l)))) / l);
} else {
tmp = 2.0 / ((Math.sin(k) * (Math.pow((t_m / Math.cbrt(l)), 3.0) / l)) * (2.0 * 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.05e-93) tmp = Float64(2.0 / Float64((Float64(k * sin(k)) ^ 2.0) / Float64((l ^ 2.0) / t_m))); elseif (t_m <= 5.6e+102) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 * Float64((t_m ^ 3.0) * Float64(k / l)))) / l)); else tmp = Float64(2.0 / Float64(Float64(sin(k) * Float64((Float64(t_m / cbrt(l)) ^ 3.0) / l)) * Float64(2.0 * 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, 1.05e-93], N[(2.0 / N[(N[Power[N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.6e+102], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 * N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[(N[Power[N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(2.0 * k), $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.05 \cdot 10^{-93}:\\
\;\;\;\;\frac{2}{\frac{{\left(k \cdot \sin k\right)}^{2}}{\frac{{\ell}^{2}}{t\_m}}}\\
\mathbf{elif}\;t\_m \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;\frac{2}{\frac{\tan k \cdot \left(2 \cdot \left({t\_m}^{3} \cdot \frac{k}{\ell}\right)\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \frac{{\left(\frac{t\_m}{\sqrt[3]{\ell}}\right)}^{3}}{\ell}\right) \cdot \left(2 \cdot k\right)}\\
\end{array}
\end{array}
if t < 1.05e-93Initial program 43.4%
Taylor expanded in t around 0 65.6%
times-frac64.7%
*-commutative64.7%
associate-/l*64.8%
Simplified64.8%
expm1-log1p-u48.3%
expm1-udef22.7%
frac-times24.6%
pow-prod-down24.6%
Applied egg-rr24.6%
expm1-def47.3%
expm1-log1p64.4%
Simplified64.4%
Taylor expanded in k around 0 53.7%
if 1.05e-93 < t < 5.60000000000000037e102Initial program 81.8%
associate-/r*87.8%
+-commutative87.8%
associate-+r+87.8%
metadata-eval87.8%
associate-*r*89.8%
*-commutative89.8%
associate-*l/91.9%
associate-*r/93.8%
Applied egg-rr93.8%
associate-*l*93.9%
*-commutative93.9%
Simplified93.9%
Taylor expanded in k around 0 77.4%
associate-*l/81.6%
*-commutative81.6%
Simplified81.6%
if 5.60000000000000037e102 < t Initial program 63.5%
associate-*l*63.5%
sqr-neg63.5%
sqr-neg63.5%
associate-/r*64.2%
distribute-rgt-in64.2%
unpow264.2%
times-frac52.4%
sqr-neg52.4%
times-frac64.2%
unpow264.2%
distribute-rgt-in64.2%
Simplified64.2%
add-cube-cbrt64.2%
pow364.2%
cbrt-div64.2%
rem-cbrt-cube80.8%
Applied egg-rr80.8%
Taylor expanded in k around 0 75.5%
*-commutative75.5%
Simplified75.5%
Final simplification61.8%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 9.5e-6)
(/ 2.0 (* (* (sin k) (/ (pow (/ t_m (cbrt l)) 3.0) l)) (* 2.0 k)))
(/ 2.0 (/ (* (tan k) (/ (* (pow k 2.0) (* t_m (sin k))) 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 <= 9.5e-6) {
tmp = 2.0 / ((sin(k) * (pow((t_m / cbrt(l)), 3.0) / l)) * (2.0 * k));
} else {
tmp = 2.0 / ((tan(k) * ((pow(k, 2.0) * (t_m * sin(k))) / l)) / 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 <= 9.5e-6) {
tmp = 2.0 / ((Math.sin(k) * (Math.pow((t_m / Math.cbrt(l)), 3.0) / l)) * (2.0 * k));
} else {
tmp = 2.0 / ((Math.tan(k) * ((Math.pow(k, 2.0) * (t_m * Math.sin(k))) / 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 <= 9.5e-6) tmp = Float64(2.0 / Float64(Float64(sin(k) * Float64((Float64(t_m / cbrt(l)) ^ 3.0) / l)) * Float64(2.0 * k))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(Float64((k ^ 2.0) * Float64(t_m * sin(k))) / l)) / 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, 9.5e-6], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[(N[Power[N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $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 9.5 \cdot 10^{-6}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \frac{{\left(\frac{t\_m}{\sqrt[3]{\ell}}\right)}^{3}}{\ell}\right) \cdot \left(2 \cdot k\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\tan k \cdot \frac{{k}^{2} \cdot \left(t\_m \cdot \sin k\right)}{\ell}}{\ell}}\\
\end{array}
\end{array}
if k < 9.5000000000000005e-6Initial program 56.9%
associate-*l*57.3%
sqr-neg57.3%
sqr-neg57.3%
associate-/r*62.5%
distribute-rgt-in62.5%
unpow262.5%
times-frac48.6%
sqr-neg48.6%
times-frac62.5%
unpow262.5%
distribute-rgt-in62.5%
Simplified62.5%
add-cube-cbrt62.4%
pow362.4%
cbrt-div62.4%
rem-cbrt-cube69.7%
Applied egg-rr69.7%
Taylor expanded in k around 0 63.9%
*-commutative63.9%
Simplified63.9%
if 9.5000000000000005e-6 < k Initial program 41.3%
associate-/r*41.4%
+-commutative41.4%
associate-+r+41.4%
metadata-eval41.4%
associate-*r*41.4%
*-commutative41.4%
associate-*l/41.4%
associate-*r/42.9%
Applied egg-rr42.9%
associate-*l*42.9%
*-commutative42.9%
Simplified42.9%
Taylor expanded in k around inf 86.2%
Final simplification69.2%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.1e-93)
(/ 2.0 (/ (pow k 4.0) (* (pow l 2.0) (/ (cos k) t_m))))
(/ 2.0 (/ (* (tan k) (* 2.0 (* (pow t_m 3.0) (/ k 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-93) {
tmp = 2.0 / (pow(k, 4.0) / (pow(l, 2.0) * (cos(k) / t_m)));
} else {
tmp = 2.0 / ((tan(k) * (2.0 * (pow(t_m, 3.0) * (k / 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-93) then
tmp = 2.0d0 / ((k ** 4.0d0) / ((l ** 2.0d0) * (cos(k) / t_m)))
else
tmp = 2.0d0 / ((tan(k) * (2.0d0 * ((t_m ** 3.0d0) * (k / 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-93) {
tmp = 2.0 / (Math.pow(k, 4.0) / (Math.pow(l, 2.0) * (Math.cos(k) / t_m)));
} else {
tmp = 2.0 / ((Math.tan(k) * (2.0 * (Math.pow(t_m, 3.0) * (k / 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-93: tmp = 2.0 / (math.pow(k, 4.0) / (math.pow(l, 2.0) * (math.cos(k) / t_m))) else: tmp = 2.0 / ((math.tan(k) * (2.0 * (math.pow(t_m, 3.0) * (k / 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-93) tmp = Float64(2.0 / Float64((k ^ 4.0) / Float64((l ^ 2.0) * Float64(cos(k) / t_m)))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 * Float64((t_m ^ 3.0) * Float64(k / 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-93) tmp = 2.0 / ((k ^ 4.0) / ((l ^ 2.0) * (cos(k) / t_m))); else tmp = 2.0 / ((tan(k) * (2.0 * ((t_m ^ 3.0) * (k / 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-93], N[(2.0 / N[(N[Power[k, 4.0], $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 * N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(k / l), $MachinePrecision]), $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}\;t\_m \leq 1.1 \cdot 10^{-93}:\\
\;\;\;\;\frac{2}{\frac{{k}^{4}}{{\ell}^{2} \cdot \frac{\cos k}{t\_m}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\tan k \cdot \left(2 \cdot \left({t\_m}^{3} \cdot \frac{k}{\ell}\right)\right)}{\ell}}\\
\end{array}
\end{array}
if t < 1.09999999999999998e-93Initial program 43.4%
Taylor expanded in t around 0 65.6%
times-frac64.7%
*-commutative64.7%
associate-/l*64.8%
Simplified64.8%
expm1-log1p-u48.3%
expm1-udef22.7%
frac-times24.6%
pow-prod-down24.6%
Applied egg-rr24.6%
expm1-def47.3%
expm1-log1p64.4%
Simplified64.4%
Taylor expanded in k around 0 53.4%
if 1.09999999999999998e-93 < t Initial program 74.0%
associate-/r*77.7%
+-commutative77.7%
associate-+r+77.7%
metadata-eval77.7%
associate-*r*78.9%
*-commutative78.9%
associate-*l/80.1%
associate-*r/81.2%
Applied egg-rr81.2%
associate-*l*81.2%
*-commutative81.2%
Simplified81.2%
Taylor expanded in k around 0 71.8%
associate-*l/74.1%
*-commutative74.1%
Simplified74.1%
Final simplification60.1%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 2e-94)
(/ 2.0 (/ (pow (* k (sin k)) 2.0) (/ (pow l 2.0) t_m)))
(/ 2.0 (/ (* (tan k) (* 2.0 (* (pow t_m 3.0) (/ k 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 <= 2e-94) {
tmp = 2.0 / (pow((k * sin(k)), 2.0) / (pow(l, 2.0) / t_m));
} else {
tmp = 2.0 / ((tan(k) * (2.0 * (pow(t_m, 3.0) * (k / 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 <= 2d-94) then
tmp = 2.0d0 / (((k * sin(k)) ** 2.0d0) / ((l ** 2.0d0) / t_m))
else
tmp = 2.0d0 / ((tan(k) * (2.0d0 * ((t_m ** 3.0d0) * (k / 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 <= 2e-94) {
tmp = 2.0 / (Math.pow((k * Math.sin(k)), 2.0) / (Math.pow(l, 2.0) / t_m));
} else {
tmp = 2.0 / ((Math.tan(k) * (2.0 * (Math.pow(t_m, 3.0) * (k / 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 <= 2e-94: tmp = 2.0 / (math.pow((k * math.sin(k)), 2.0) / (math.pow(l, 2.0) / t_m)) else: tmp = 2.0 / ((math.tan(k) * (2.0 * (math.pow(t_m, 3.0) * (k / 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 <= 2e-94) tmp = Float64(2.0 / Float64((Float64(k * sin(k)) ^ 2.0) / Float64((l ^ 2.0) / t_m))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 * Float64((t_m ^ 3.0) * Float64(k / 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 <= 2e-94) tmp = 2.0 / (((k * sin(k)) ^ 2.0) / ((l ^ 2.0) / t_m)); else tmp = 2.0 / ((tan(k) * (2.0 * ((t_m ^ 3.0) * (k / 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, 2e-94], N[(2.0 / N[(N[Power[N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 * N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(k / l), $MachinePrecision]), $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}\;t\_m \leq 2 \cdot 10^{-94}:\\
\;\;\;\;\frac{2}{\frac{{\left(k \cdot \sin k\right)}^{2}}{\frac{{\ell}^{2}}{t\_m}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\tan k \cdot \left(2 \cdot \left({t\_m}^{3} \cdot \frac{k}{\ell}\right)\right)}{\ell}}\\
\end{array}
\end{array}
if t < 1.9999999999999999e-94Initial program 43.4%
Taylor expanded in t around 0 65.6%
times-frac64.7%
*-commutative64.7%
associate-/l*64.8%
Simplified64.8%
expm1-log1p-u48.3%
expm1-udef22.7%
frac-times24.6%
pow-prod-down24.6%
Applied egg-rr24.6%
expm1-def47.3%
expm1-log1p64.4%
Simplified64.4%
Taylor expanded in k around 0 53.7%
if 1.9999999999999999e-94 < t Initial program 74.0%
associate-/r*77.7%
+-commutative77.7%
associate-+r+77.7%
metadata-eval77.7%
associate-*r*78.9%
*-commutative78.9%
associate-*l/80.1%
associate-*r/81.2%
Applied egg-rr81.2%
associate-*l*81.2%
*-commutative81.2%
Simplified81.2%
Taylor expanded in k around 0 71.8%
associate-*l/74.1%
*-commutative74.1%
Simplified74.1%
Final simplification60.2%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 2e-95)
(/ (/ 2.0 t_m) (/ (pow k 4.0) (pow l 2.0)))
(/ 2.0 (/ (* (tan k) (* 2.0 (* (pow t_m 3.0) (/ k 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 <= 2e-95) {
tmp = (2.0 / t_m) / (pow(k, 4.0) / pow(l, 2.0));
} else {
tmp = 2.0 / ((tan(k) * (2.0 * (pow(t_m, 3.0) * (k / 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 <= 2d-95) then
tmp = (2.0d0 / t_m) / ((k ** 4.0d0) / (l ** 2.0d0))
else
tmp = 2.0d0 / ((tan(k) * (2.0d0 * ((t_m ** 3.0d0) * (k / 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 <= 2e-95) {
tmp = (2.0 / t_m) / (Math.pow(k, 4.0) / Math.pow(l, 2.0));
} else {
tmp = 2.0 / ((Math.tan(k) * (2.0 * (Math.pow(t_m, 3.0) * (k / 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 <= 2e-95: tmp = (2.0 / t_m) / (math.pow(k, 4.0) / math.pow(l, 2.0)) else: tmp = 2.0 / ((math.tan(k) * (2.0 * (math.pow(t_m, 3.0) * (k / 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 <= 2e-95) tmp = Float64(Float64(2.0 / t_m) / Float64((k ^ 4.0) / (l ^ 2.0))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 * Float64((t_m ^ 3.0) * Float64(k / 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 <= 2e-95) tmp = (2.0 / t_m) / ((k ^ 4.0) / (l ^ 2.0)); else tmp = 2.0 / ((tan(k) * (2.0 * ((t_m ^ 3.0) * (k / 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, 2e-95], N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[Power[k, 4.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 * N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(k / l), $MachinePrecision]), $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}\;t\_m \leq 2 \cdot 10^{-95}:\\
\;\;\;\;\frac{\frac{2}{t\_m}}{\frac{{k}^{4}}{{\ell}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\tan k \cdot \left(2 \cdot \left({t\_m}^{3} \cdot \frac{k}{\ell}\right)\right)}{\ell}}\\
\end{array}
\end{array}
if t < 1.99999999999999998e-95Initial program 43.4%
Taylor expanded in t around 0 65.6%
times-frac64.7%
*-commutative64.7%
associate-/l*64.8%
Simplified64.8%
Taylor expanded in k around 0 50.6%
associate-*r/50.6%
*-commutative50.6%
times-frac52.3%
Simplified52.3%
Taylor expanded in t around 0 50.6%
associate-*r/50.6%
*-commutative50.6%
associate-/r*52.7%
associate-*l/52.7%
associate-/l*52.3%
Simplified52.3%
if 1.99999999999999998e-95 < t Initial program 74.0%
associate-/r*77.7%
+-commutative77.7%
associate-+r+77.7%
metadata-eval77.7%
associate-*r*78.9%
*-commutative78.9%
associate-*l/80.1%
associate-*r/81.2%
Applied egg-rr81.2%
associate-*l*81.2%
*-commutative81.2%
Simplified81.2%
Taylor expanded in k around 0 71.8%
associate-*l/74.1%
*-commutative74.1%
Simplified74.1%
Final simplification59.3%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 5.3e-104)
(/ (/ 2.0 t_m) (/ (pow k 4.0) (pow l 2.0)))
(/ 2.0 (/ (* 2.0 (/ (* (pow k 2.0) (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 <= 5.3e-104) {
tmp = (2.0 / t_m) / (pow(k, 4.0) / pow(l, 2.0));
} else {
tmp = 2.0 / ((2.0 * ((pow(k, 2.0) * 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 <= 5.3d-104) then
tmp = (2.0d0 / t_m) / ((k ** 4.0d0) / (l ** 2.0d0))
else
tmp = 2.0d0 / ((2.0d0 * (((k ** 2.0d0) * (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 <= 5.3e-104) {
tmp = (2.0 / t_m) / (Math.pow(k, 4.0) / Math.pow(l, 2.0));
} else {
tmp = 2.0 / ((2.0 * ((Math.pow(k, 2.0) * 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 <= 5.3e-104: tmp = (2.0 / t_m) / (math.pow(k, 4.0) / math.pow(l, 2.0)) else: tmp = 2.0 / ((2.0 * ((math.pow(k, 2.0) * 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 <= 5.3e-104) tmp = Float64(Float64(2.0 / t_m) / Float64((k ^ 4.0) / (l ^ 2.0))); else tmp = Float64(2.0 / Float64(Float64(2.0 * Float64(Float64((k ^ 2.0) * (t_m ^ 3.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 (t_m <= 5.3e-104) tmp = (2.0 / t_m) / ((k ^ 4.0) / (l ^ 2.0)); else tmp = 2.0 / ((2.0 * (((k ^ 2.0) * (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, 5.3e-104], N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[Power[k, 4.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / l), $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}\;t\_m \leq 5.3 \cdot 10^{-104}:\\
\;\;\;\;\frac{\frac{2}{t\_m}}{\frac{{k}^{4}}{{\ell}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{2 \cdot \frac{{k}^{2} \cdot {t\_m}^{3}}{\ell}}{\ell}}\\
\end{array}
\end{array}
if t < 5.30000000000000018e-104Initial program 42.8%
Taylor expanded in t around 0 65.2%
times-frac64.3%
*-commutative64.3%
associate-/l*64.3%
Simplified64.3%
Taylor expanded in k around 0 50.1%
associate-*r/50.1%
*-commutative50.1%
times-frac51.7%
Simplified51.7%
Taylor expanded in t around 0 50.1%
associate-*r/50.1%
*-commutative50.1%
associate-/r*52.2%
associate-*l/52.2%
associate-/l*51.8%
Simplified51.8%
if 5.30000000000000018e-104 < t Initial program 74.6%
associate-/r*78.3%
+-commutative78.3%
associate-+r+78.3%
metadata-eval78.3%
associate-*r*79.4%
*-commutative79.4%
associate-*l/80.6%
associate-*r/81.6%
Applied egg-rr81.6%
associate-*l*81.7%
*-commutative81.7%
Simplified81.7%
add-cube-cbrt81.4%
pow381.4%
Applied egg-rr91.5%
Taylor expanded in k around 0 67.6%
Final simplification57.0%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.4e-78)
(/ (/ 2.0 t_m) (/ (pow k 4.0) (pow l 2.0)))
(/ (/ (pow l 2.0) (pow t_m 3.0)) (* k 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.4e-78) {
tmp = (2.0 / t_m) / (pow(k, 4.0) / pow(l, 2.0));
} else {
tmp = (pow(l, 2.0) / pow(t_m, 3.0)) / (k * 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.4d-78) then
tmp = (2.0d0 / t_m) / ((k ** 4.0d0) / (l ** 2.0d0))
else
tmp = ((l ** 2.0d0) / (t_m ** 3.0d0)) / (k * 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.4e-78) {
tmp = (2.0 / t_m) / (Math.pow(k, 4.0) / Math.pow(l, 2.0));
} else {
tmp = (Math.pow(l, 2.0) / Math.pow(t_m, 3.0)) / (k * 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.4e-78: tmp = (2.0 / t_m) / (math.pow(k, 4.0) / math.pow(l, 2.0)) else: tmp = (math.pow(l, 2.0) / math.pow(t_m, 3.0)) / (k * 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.4e-78) tmp = Float64(Float64(2.0 / t_m) / Float64((k ^ 4.0) / (l ^ 2.0))); else tmp = Float64(Float64((l ^ 2.0) / (t_m ^ 3.0)) / Float64(k * 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.4e-78) tmp = (2.0 / t_m) / ((k ^ 4.0) / (l ^ 2.0)); else tmp = ((l ^ 2.0) / (t_m ^ 3.0)) / (k * 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.4e-78], N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[Power[k, 4.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / N[(k * k), $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.4 \cdot 10^{-78}:\\
\;\;\;\;\frac{\frac{2}{t\_m}}{\frac{{k}^{4}}{{\ell}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{{\ell}^{2}}{{t\_m}^{3}}}{k \cdot k}\\
\end{array}
\end{array}
if t < 1.40000000000000012e-78Initial program 43.3%
Taylor expanded in t around 0 65.6%
times-frac64.8%
*-commutative64.8%
associate-/l*64.8%
Simplified64.8%
Taylor expanded in k around 0 50.9%
associate-*r/50.9%
*-commutative50.9%
times-frac52.5%
Simplified52.5%
Taylor expanded in t around 0 50.9%
associate-*r/50.9%
*-commutative50.9%
associate-/r*53.0%
associate-*l/53.0%
associate-/l*52.6%
Simplified52.6%
if 1.40000000000000012e-78 < t Initial program 75.4%
associate-/r*75.4%
sqr-neg75.4%
associate-*l*69.0%
sqr-neg69.0%
associate-/r*72.9%
associate-+l+72.9%
unpow272.9%
times-frac67.6%
sqr-neg67.6%
times-frac72.9%
unpow272.9%
Simplified72.9%
Taylor expanded in k around 0 66.4%
*-commutative66.4%
associate-/r*64.1%
Simplified64.1%
unpow264.1%
Applied egg-rr64.1%
Final simplification56.1%
t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* (/ 2.0 t_m) (* (pow l 2.0) (pow k -4.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 / t_m) * (pow(l, 2.0) * pow(k, -4.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) * ((l ** 2.0d0) * (k ** (-4.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 / t_m) * (Math.pow(l, 2.0) * Math.pow(k, -4.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 / t_m) * (math.pow(l, 2.0) * math.pow(k, -4.0)))
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(Float64(2.0 / t_m) * Float64((l ^ 2.0) * (k ^ -4.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) * ((l ^ 2.0) * (k ^ -4.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[(N[(2.0 / t$95$m), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] * N[Power[k, -4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(\frac{2}{t\_m} \cdot \left({\ell}^{2} \cdot {k}^{-4}\right)\right)
\end{array}
Initial program 53.2%
Taylor expanded in t around 0 63.7%
times-frac63.2%
*-commutative63.2%
associate-/l*63.3%
Simplified63.3%
Taylor expanded in k around 0 52.1%
associate-*r/52.1%
*-commutative52.1%
times-frac52.9%
Simplified52.9%
expm1-log1p-u52.8%
expm1-udef53.1%
div-inv53.1%
pow-flip53.1%
metadata-eval53.1%
Applied egg-rr53.1%
expm1-def52.8%
expm1-log1p52.8%
Simplified52.8%
Final simplification52.8%
t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* (/ 2.0 t_m) (/ (pow l 2.0) (pow k 4.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 / t_m) * (pow(l, 2.0) / pow(k, 4.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) * ((l ** 2.0d0) / (k ** 4.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 / t_m) * (Math.pow(l, 2.0) / Math.pow(k, 4.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 / t_m) * (math.pow(l, 2.0) / math.pow(k, 4.0)))
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(Float64(2.0 / t_m) * Float64((l ^ 2.0) / (k ^ 4.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) * ((l ^ 2.0) / (k ^ 4.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[(N[(2.0 / t$95$m), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(\frac{2}{t\_m} \cdot \frac{{\ell}^{2}}{{k}^{4}}\right)
\end{array}
Initial program 53.2%
Taylor expanded in t around 0 63.7%
times-frac63.2%
*-commutative63.2%
associate-/l*63.3%
Simplified63.3%
Taylor expanded in k around 0 52.1%
associate-*r/52.1%
*-commutative52.1%
times-frac52.9%
Simplified52.9%
Final simplification52.9%
t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ (/ 2.0 t_m) (/ (pow k 4.0) (pow 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) {
return t_s * ((2.0 / t_m) / (pow(k, 4.0) / pow(l, 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) / ((k ** 4.0d0) / (l ** 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 / t_m) / (Math.pow(k, 4.0) / Math.pow(l, 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 / t_m) / (math.pow(k, 4.0) / math.pow(l, 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(Float64(2.0 / t_m) / Float64((k ^ 4.0) / (l ^ 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) / ((k ^ 4.0) / (l ^ 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[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[Power[k, 4.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{\frac{2}{t\_m}}{\frac{{k}^{4}}{{\ell}^{2}}}
\end{array}
Initial program 53.2%
Taylor expanded in t around 0 63.7%
times-frac63.2%
*-commutative63.2%
associate-/l*63.3%
Simplified63.3%
Taylor expanded in k around 0 52.1%
associate-*r/52.1%
*-commutative52.1%
times-frac52.9%
Simplified52.9%
Taylor expanded in t around 0 52.1%
associate-*r/52.1%
*-commutative52.1%
associate-/r*53.1%
associate-*l/53.1%
associate-/l*52.9%
Simplified52.9%
Final simplification52.9%
herbie shell --seed 2024031
(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))))