
(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 17 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
(*
t_s
(if (<= t_m 1.4e-81)
(/ 2.0 (/ (* (* t_m (/ (pow k 2.0) (cos k))) (/ (pow (sin k) 2.0) l)) l))
(/
2.0
(pow
(*
(/ t_m (pow (cbrt l) 2.0))
(* (cbrt (sin k)) (cbrt (* (tan k) (+ 2.0 (pow (/ k t_m) 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.4e-81) {
tmp = 2.0 / (((t_m * (pow(k, 2.0) / cos(k))) * (pow(sin(k), 2.0) / l)) / l);
} else {
tmp = 2.0 / pow(((t_m / pow(cbrt(l), 2.0)) * (cbrt(sin(k)) * cbrt((tan(k) * (2.0 + pow((k / t_m), 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.4e-81) {
tmp = 2.0 / (((t_m * (Math.pow(k, 2.0) / Math.cos(k))) * (Math.pow(Math.sin(k), 2.0) / l)) / l);
} else {
tmp = 2.0 / Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * (Math.cbrt(Math.sin(k)) * Math.cbrt((Math.tan(k) * (2.0 + Math.pow((k / t_m), 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.4e-81) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * Float64((k ^ 2.0) / cos(k))) * Float64((sin(k) ^ 2.0) / l)) / l)); else tmp = Float64(2.0 / (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * Float64(cbrt(sin(k)) * cbrt(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 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.4e-81], N[(2.0 / N[(N[(N[(t$95$m * N[(N[Power[k, 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[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]), $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.4 \cdot 10^{-81}:\\
\;\;\;\;\frac{2}{\frac{\left(t_m \cdot \frac{{k}^{2}}{\cos k}\right) \cdot \frac{{\sin k}^{2}}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \left(\sqrt[3]{\sin k} \cdot \sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)}\right)\right)}^{3}}\\
\end{array}
\end{array}
if t < 1.3999999999999999e-81Initial program 56.4%
associate-*l*56.4%
sqr-neg56.4%
sqr-neg56.4%
associate-/r*61.2%
distribute-rgt-in61.2%
unpow261.2%
times-frac38.4%
sqr-neg38.4%
times-frac61.2%
unpow261.2%
distribute-rgt-in61.2%
Simplified61.2%
associate-*r*61.2%
associate-*r*60.0%
*-commutative60.0%
associate-*l/60.6%
associate-*r/60.6%
*-commutative60.6%
associate-*r*61.8%
Applied egg-rr61.8%
Taylor expanded in k around inf 73.4%
associate-*r*73.4%
*-commutative73.4%
times-frac73.6%
Simplified73.6%
expm1-log1p-u57.5%
expm1-udef36.1%
associate-/l*36.1%
Applied egg-rr36.1%
expm1-def57.5%
expm1-log1p73.6%
associate-/r/73.6%
Simplified73.6%
if 1.3999999999999999e-81 < t Initial program 69.5%
associate-*l*69.5%
sqr-neg69.5%
sqr-neg69.5%
associate-/r*73.7%
distribute-rgt-in73.7%
unpow273.7%
times-frac62.5%
sqr-neg62.5%
times-frac73.7%
unpow273.7%
distribute-rgt-in73.7%
Simplified73.7%
add-cube-cbrt73.6%
pow373.6%
Applied egg-rr83.7%
associate-*l*83.7%
cbrt-prod96.6%
Applied egg-rr96.6%
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 4.5e-70)
(/ 2.0 (/ (* (* t_m (/ (pow k 2.0) (cos k))) (/ (pow (sin k) 2.0) l)) l))
(/
2.0
(*
(* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
(pow (* (/ t_m (pow (cbrt l) 2.0)) (cbrt (sin k))) 3.0))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4.5e-70) {
tmp = 2.0 / (((t_m * (pow(k, 2.0) / cos(k))) * (pow(sin(k), 2.0) / l)) / l);
} else {
tmp = 2.0 / ((tan(k) * (2.0 + pow((k / t_m), 2.0))) * pow(((t_m / pow(cbrt(l), 2.0)) * cbrt(sin(k))), 3.0));
}
return t_s * tmp;
}
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4.5e-70) {
tmp = 2.0 / (((t_m * (Math.pow(k, 2.0) / Math.cos(k))) * (Math.pow(Math.sin(k), 2.0) / l)) / l);
} else {
tmp = 2.0 / ((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))) * Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * Math.cbrt(Math.sin(k))), 3.0));
}
return t_s * tmp;
}
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 4.5e-70) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * Float64((k ^ 2.0) / cos(k))) * Float64((sin(k) ^ 2.0) / l)) / l)); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * cbrt(sin(k))) ^ 3.0))); end return Float64(t_s * tmp) end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 4.5e-70], N[(2.0 / N[(N[(N[(t$95$m * N[(N[Power[k, 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 4.5 \cdot 10^{-70}:\\
\;\;\;\;\frac{2}{\frac{\left(t_m \cdot \frac{{k}^{2}}{\cos k}\right) \cdot \frac{{\sin k}^{2}}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right) \cdot {\left(\frac{t_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k}\right)}^{3}}\\
\end{array}
\end{array}
if t < 4.50000000000000022e-70Initial program 56.6%
associate-*l*56.6%
sqr-neg56.6%
sqr-neg56.6%
associate-/r*61.4%
distribute-rgt-in61.4%
unpow261.4%
times-frac38.7%
sqr-neg38.7%
times-frac61.4%
unpow261.4%
distribute-rgt-in61.4%
Simplified61.4%
associate-*r*61.4%
associate-*r*60.3%
*-commutative60.3%
associate-*l/60.8%
associate-*r/60.9%
*-commutative60.9%
associate-*r*62.0%
Applied egg-rr62.0%
Taylor expanded in k around inf 73.6%
associate-*r*73.6%
*-commutative73.6%
times-frac73.7%
Simplified73.7%
expm1-log1p-u57.8%
expm1-udef36.5%
associate-/l*36.5%
Applied egg-rr36.5%
expm1-def57.8%
expm1-log1p73.7%
associate-/r/73.8%
Simplified73.8%
if 4.50000000000000022e-70 < t Initial program 69.2%
associate-*l*69.2%
sqr-neg69.2%
sqr-neg69.2%
associate-/r*73.4%
distribute-rgt-in73.4%
unpow273.4%
times-frac62.1%
sqr-neg62.1%
times-frac73.4%
unpow273.4%
distribute-rgt-in73.4%
Simplified73.4%
associate-/r*69.2%
add-cube-cbrt69.0%
pow369.1%
associate-/r*73.3%
*-commutative73.3%
cbrt-prod73.2%
associate-/r*69.0%
cbrt-div69.0%
rem-cbrt-cube74.6%
cbrt-prod92.1%
pow292.1%
Applied egg-rr92.1%
Final simplification79.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 6.8e-18)
(/ 2.0 (/ (* (* t_m (/ (pow k 2.0) (cos k))) (/ (pow (sin k) 2.0) l)) l))
(/
2.0
(*
(* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
(* (sin k) (pow (/ t_m (pow (cbrt l) 2.0)) 3.0)))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 6.8e-18) {
tmp = 2.0 / (((t_m * (pow(k, 2.0) / cos(k))) * (pow(sin(k), 2.0) / l)) / l);
} else {
tmp = 2.0 / ((tan(k) * (2.0 + pow((k / t_m), 2.0))) * (sin(k) * pow((t_m / pow(cbrt(l), 2.0)), 3.0)));
}
return t_s * tmp;
}
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 6.8e-18) {
tmp = 2.0 / (((t_m * (Math.pow(k, 2.0) / Math.cos(k))) * (Math.pow(Math.sin(k), 2.0) / l)) / l);
} else {
tmp = 2.0 / ((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))) * (Math.sin(k) * Math.pow((t_m / Math.pow(Math.cbrt(l), 2.0)), 3.0)));
}
return t_s * tmp;
}
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 6.8e-18) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * Float64((k ^ 2.0) / cos(k))) * Float64((sin(k) ^ 2.0) / l)) / l)); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(sin(k) * (Float64(t_m / (cbrt(l) ^ 2.0)) ^ 3.0)))); end return Float64(t_s * tmp) end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 6.8e-18], N[(2.0 / N[(N[(N[(t$95$m * N[(N[Power[k, 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 6.8 \cdot 10^{-18}:\\
\;\;\;\;\frac{2}{\frac{\left(t_m \cdot \frac{{k}^{2}}{\cos k}\right) \cdot \frac{{\sin k}^{2}}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right) \cdot \left(\sin k \cdot {\left(\frac{t_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}\right)}\\
\end{array}
\end{array}
if t < 6.80000000000000002e-18Initial program 58.3%
associate-*l*58.3%
sqr-neg58.3%
sqr-neg58.3%
associate-/r*62.8%
distribute-rgt-in62.8%
unpow262.8%
times-frac41.6%
sqr-neg41.6%
times-frac62.8%
unpow262.8%
distribute-rgt-in62.8%
Simplified62.8%
associate-*r*62.8%
associate-*r*61.8%
*-commutative61.8%
associate-*l/62.3%
associate-*r/62.3%
*-commutative62.3%
associate-*r*63.4%
Applied egg-rr63.4%
Taylor expanded in k around inf 73.8%
associate-*r*73.8%
*-commutative73.8%
times-frac73.9%
Simplified73.9%
expm1-log1p-u58.3%
expm1-udef37.9%
associate-/l*37.9%
Applied egg-rr37.9%
expm1-def58.4%
expm1-log1p73.9%
associate-/r/74.0%
Simplified74.0%
if 6.80000000000000002e-18 < t Initial program 66.6%
associate-*l*66.6%
sqr-neg66.6%
sqr-neg66.6%
associate-/r*71.6%
distribute-rgt-in71.6%
unpow271.6%
times-frac58.3%
sqr-neg58.3%
times-frac71.6%
unpow271.6%
distribute-rgt-in71.6%
Simplified71.6%
add-cube-cbrt71.5%
pow371.5%
associate-/r*66.6%
cbrt-div66.4%
rem-cbrt-cube70.2%
cbrt-prod89.5%
pow289.5%
Applied egg-rr89.5%
Final simplification78.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-17)
(/ 2.0 (/ (* (* t_m (/ (pow k 2.0) (cos k))) (/ (pow (sin k) 2.0) l)) l))
(if (<= t_m 1.22e+154)
(/
2.0
(*
(* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
(* (sin k) (* (/ (pow t_m 2.0) l) (/ t_m l)))))
(/
2.0
(*
(pow (* (cbrt (sin k)) (* t_m (pow (cbrt l) -2.0))) 3.0)
(* 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 <= 2e-17) {
tmp = 2.0 / (((t_m * (pow(k, 2.0) / cos(k))) * (pow(sin(k), 2.0) / l)) / l);
} else if (t_m <= 1.22e+154) {
tmp = 2.0 / ((tan(k) * (2.0 + pow((k / t_m), 2.0))) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / l))));
} else {
tmp = 2.0 / (pow((cbrt(sin(k)) * (t_m * pow(cbrt(l), -2.0))), 3.0) * (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 <= 2e-17) {
tmp = 2.0 / (((t_m * (Math.pow(k, 2.0) / Math.cos(k))) * (Math.pow(Math.sin(k), 2.0) / l)) / l);
} else if (t_m <= 1.22e+154) {
tmp = 2.0 / ((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / l))));
} else {
tmp = 2.0 / (Math.pow((Math.cbrt(Math.sin(k)) * (t_m * Math.pow(Math.cbrt(l), -2.0))), 3.0) * (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 <= 2e-17) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * Float64((k ^ 2.0) / cos(k))) * Float64((sin(k) ^ 2.0) / l)) / l)); elseif (t_m <= 1.22e+154) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l))))); else tmp = Float64(2.0 / Float64((Float64(cbrt(sin(k)) * Float64(t_m * (cbrt(l) ^ -2.0))) ^ 3.0) * 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, 2e-17], N[(2.0 / N[(N[(N[(t$95$m * N[(N[Power[k, 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.22e+154], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $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], N[(2.0 / N[(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] * 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 2 \cdot 10^{-17}:\\
\;\;\;\;\frac{2}{\frac{\left(t_m \cdot \frac{{k}^{2}}{\cos k}\right) \cdot \frac{{\sin k}^{2}}{\ell}}{\ell}}\\
\mathbf{elif}\;t_m \leq 1.22 \cdot 10^{+154}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right) \cdot \left(\sin k \cdot \left(\frac{{t_m}^{2}}{\ell} \cdot \frac{t_m}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{\sin k} \cdot \left(t_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right)}^{3} \cdot \left(2 \cdot k\right)}\\
\end{array}
\end{array}
if t < 2.00000000000000014e-17Initial program 58.3%
associate-*l*58.3%
sqr-neg58.3%
sqr-neg58.3%
associate-/r*62.8%
distribute-rgt-in62.8%
unpow262.8%
times-frac41.6%
sqr-neg41.6%
times-frac62.8%
unpow262.8%
distribute-rgt-in62.8%
Simplified62.8%
associate-*r*62.8%
associate-*r*61.8%
*-commutative61.8%
associate-*l/62.3%
associate-*r/62.3%
*-commutative62.3%
associate-*r*63.4%
Applied egg-rr63.4%
Taylor expanded in k around inf 73.8%
associate-*r*73.8%
*-commutative73.8%
times-frac73.9%
Simplified73.9%
expm1-log1p-u58.3%
expm1-udef37.9%
associate-/l*37.9%
Applied egg-rr37.9%
expm1-def58.4%
expm1-log1p73.9%
associate-/r/74.0%
Simplified74.0%
if 2.00000000000000014e-17 < t < 1.22e154Initial program 69.4%
associate-*l*69.4%
sqr-neg69.4%
sqr-neg69.4%
associate-/r*75.8%
distribute-rgt-in75.8%
unpow275.8%
times-frac72.8%
sqr-neg72.8%
times-frac75.8%
unpow275.8%
distribute-rgt-in75.8%
Simplified75.8%
associate-/r*69.4%
unpow369.3%
times-frac90.8%
pow290.8%
Applied egg-rr90.8%
if 1.22e154 < t Initial program 64.1%
*-commutative64.1%
sqr-neg64.1%
*-commutative64.1%
associate-*l*64.1%
*-commutative64.1%
sqr-neg64.1%
Simplified64.1%
Taylor expanded in k around 0 64.1%
*-commutative64.1%
Simplified64.1%
*-commutative64.1%
rem-cube-cbrt64.1%
rem-cube-cbrt64.1%
cbrt-div64.1%
rem-cbrt-cube67.9%
cbrt-prod83.9%
unpow283.9%
unpow-prod-down89.0%
rem-cube-cbrt88.8%
rem-cbrt-cube89.0%
div-inv89.1%
pow-flip89.1%
metadata-eval89.1%
Applied egg-rr89.1%
Final simplification78.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.9e-21)
(/ 2.0 (/ (* (* t_m (/ (pow k 2.0) (cos k))) (/ (pow (sin k) 2.0) l)) l))
(if (<= t_m 1.35e+154)
(/
2.0
(*
(* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
(* (sin k) (* (/ (pow t_m 2.0) l) (/ t_m l)))))
(/
2.0
(* (* 2.0 k) (* (sin k) (pow (* t_m (pow (cbrt l) -2.0)) 3.0))))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.9e-21) {
tmp = 2.0 / (((t_m * (pow(k, 2.0) / cos(k))) * (pow(sin(k), 2.0) / l)) / l);
} else if (t_m <= 1.35e+154) {
tmp = 2.0 / ((tan(k) * (2.0 + pow((k / t_m), 2.0))) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / l))));
} else {
tmp = 2.0 / ((2.0 * k) * (sin(k) * pow((t_m * pow(cbrt(l), -2.0)), 3.0)));
}
return t_s * tmp;
}
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.9e-21) {
tmp = 2.0 / (((t_m * (Math.pow(k, 2.0) / Math.cos(k))) * (Math.pow(Math.sin(k), 2.0) / l)) / l);
} else if (t_m <= 1.35e+154) {
tmp = 2.0 / ((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / l))));
} else {
tmp = 2.0 / ((2.0 * k) * (Math.sin(k) * Math.pow((t_m * Math.pow(Math.cbrt(l), -2.0)), 3.0)));
}
return t_s * tmp;
}
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.9e-21) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * Float64((k ^ 2.0) / cos(k))) * Float64((sin(k) ^ 2.0) / l)) / l)); elseif (t_m <= 1.35e+154) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l))))); else tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(sin(k) * (Float64(t_m * (cbrt(l) ^ -2.0)) ^ 3.0)))); end return Float64(t_s * tmp) end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.9e-21], N[(2.0 / N[(N[(N[(t$95$m * N[(N[Power[k, 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.35e+154], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $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], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 1.9 \cdot 10^{-21}:\\
\;\;\;\;\frac{2}{\frac{\left(t_m \cdot \frac{{k}^{2}}{\cos k}\right) \cdot \frac{{\sin k}^{2}}{\ell}}{\ell}}\\
\mathbf{elif}\;t_m \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right) \cdot \left(\sin k \cdot \left(\frac{{t_m}^{2}}{\ell} \cdot \frac{t_m}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot {\left(t_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3}\right)}\\
\end{array}
\end{array}
if t < 1.8999999999999999e-21Initial program 58.3%
associate-*l*58.3%
sqr-neg58.3%
sqr-neg58.3%
associate-/r*62.8%
distribute-rgt-in62.8%
unpow262.8%
times-frac41.6%
sqr-neg41.6%
times-frac62.8%
unpow262.8%
distribute-rgt-in62.8%
Simplified62.8%
associate-*r*62.8%
associate-*r*61.8%
*-commutative61.8%
associate-*l/62.3%
associate-*r/62.3%
*-commutative62.3%
associate-*r*63.4%
Applied egg-rr63.4%
Taylor expanded in k around inf 73.8%
associate-*r*73.8%
*-commutative73.8%
times-frac73.9%
Simplified73.9%
expm1-log1p-u58.3%
expm1-udef37.9%
associate-/l*37.9%
Applied egg-rr37.9%
expm1-def58.4%
expm1-log1p73.9%
associate-/r/74.0%
Simplified74.0%
if 1.8999999999999999e-21 < t < 1.35000000000000003e154Initial program 69.4%
associate-*l*69.4%
sqr-neg69.4%
sqr-neg69.4%
associate-/r*75.8%
distribute-rgt-in75.8%
unpow275.8%
times-frac72.8%
sqr-neg72.8%
times-frac75.8%
unpow275.8%
distribute-rgt-in75.8%
Simplified75.8%
associate-/r*69.4%
unpow369.3%
times-frac90.8%
pow290.8%
Applied egg-rr90.8%
if 1.35000000000000003e154 < t Initial program 64.1%
*-commutative64.1%
sqr-neg64.1%
*-commutative64.1%
associate-*l*64.1%
*-commutative64.1%
sqr-neg64.1%
Simplified64.1%
Taylor expanded in k around 0 64.1%
*-commutative64.1%
Simplified64.1%
rem-cube-cbrt64.1%
cbrt-div64.1%
rem-cbrt-cube67.9%
cbrt-prod83.8%
unpow283.8%
cube-mult83.7%
div-inv83.8%
pow-flip83.8%
metadata-eval83.8%
pow283.8%
div-inv83.8%
pow-flip83.8%
metadata-eval83.8%
Applied egg-rr83.8%
unpow283.8%
cube-mult83.8%
Simplified83.8%
Final simplification77.4%
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.35e-16)
(/ 2.0 (/ (* (* t_m (/ (pow k 2.0) (cos k))) (/ (pow (sin k) 2.0) l)) l))
(if (<= t_m 5.5e+102)
(/
2.0
(*
(* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
(* (sin k) (/ (/ (pow t_m 3.0) l) l))))
(/
2.0
(* (* 2.0 k) (* (sin k) (pow (* t_m (pow (cbrt l) -2.0)) 3.0))))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.35e-16) {
tmp = 2.0 / (((t_m * (pow(k, 2.0) / cos(k))) * (pow(sin(k), 2.0) / l)) / l);
} else if (t_m <= 5.5e+102) {
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 / ((2.0 * k) * (sin(k) * pow((t_m * pow(cbrt(l), -2.0)), 3.0)));
}
return t_s * tmp;
}
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.35e-16) {
tmp = 2.0 / (((t_m * (Math.pow(k, 2.0) / Math.cos(k))) * (Math.pow(Math.sin(k), 2.0) / l)) / l);
} else if (t_m <= 5.5e+102) {
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 / ((2.0 * k) * (Math.sin(k) * Math.pow((t_m * Math.pow(Math.cbrt(l), -2.0)), 3.0)));
}
return t_s * tmp;
}
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.35e-16) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * Float64((k ^ 2.0) / cos(k))) * Float64((sin(k) ^ 2.0) / l)) / l)); elseif (t_m <= 5.5e+102) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(sin(k) * Float64(Float64((t_m ^ 3.0) / l) / l)))); else tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(sin(k) * (Float64(t_m * (cbrt(l) ^ -2.0)) ^ 3.0)))); end return Float64(t_s * tmp) end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.35e-16], N[(2.0 / N[(N[(N[(t$95$m * N[(N[Power[k, 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.5e+102], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 1.35 \cdot 10^{-16}:\\
\;\;\;\;\frac{2}{\frac{\left(t_m \cdot \frac{{k}^{2}}{\cos k}\right) \cdot \frac{{\sin k}^{2}}{\ell}}{\ell}}\\
\mathbf{elif}\;t_m \leq 5.5 \cdot 10^{+102}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right) \cdot \left(\sin k \cdot \frac{\frac{{t_m}^{3}}{\ell}}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot {\left(t_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3}\right)}\\
\end{array}
\end{array}
if t < 1.35e-16Initial program 58.3%
associate-*l*58.3%
sqr-neg58.3%
sqr-neg58.3%
associate-/r*62.8%
distribute-rgt-in62.8%
unpow262.8%
times-frac41.6%
sqr-neg41.6%
times-frac62.8%
unpow262.8%
distribute-rgt-in62.8%
Simplified62.8%
associate-*r*62.8%
associate-*r*61.8%
*-commutative61.8%
associate-*l/62.3%
associate-*r/62.3%
*-commutative62.3%
associate-*r*63.4%
Applied egg-rr63.4%
Taylor expanded in k around inf 73.8%
associate-*r*73.8%
*-commutative73.8%
times-frac73.9%
Simplified73.9%
expm1-log1p-u58.3%
expm1-udef37.9%
associate-/l*37.9%
Applied egg-rr37.9%
expm1-def58.4%
expm1-log1p73.9%
associate-/r/74.0%
Simplified74.0%
if 1.35e-16 < t < 5.49999999999999981e102Initial program 89.7%
associate-*l*89.7%
sqr-neg89.7%
sqr-neg89.7%
associate-/r*99.8%
distribute-rgt-in99.8%
unpow299.8%
times-frac94.7%
sqr-neg94.7%
times-frac99.8%
unpow299.8%
distribute-rgt-in99.8%
Simplified99.8%
if 5.49999999999999981e102 < t Initial program 57.6%
*-commutative57.6%
sqr-neg57.6%
*-commutative57.6%
associate-*l*57.6%
*-commutative57.6%
sqr-neg57.6%
Simplified57.6%
Taylor expanded in k around 0 57.6%
*-commutative57.6%
Simplified57.6%
rem-cube-cbrt57.6%
cbrt-div57.6%
rem-cbrt-cube62.6%
cbrt-prod76.2%
unpow276.2%
cube-mult76.2%
div-inv76.2%
pow-flip76.2%
metadata-eval76.2%
pow276.2%
div-inv76.3%
pow-flip76.2%
metadata-eval76.2%
Applied egg-rr76.2%
unpow276.2%
cube-mult76.2%
Simplified76.2%
Final simplification76.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 3.8e-70)
(/ 2.0 (/ (* (* t_m (/ (pow k 2.0) (cos k))) (/ (pow (sin k) 2.0) l)) l))
(if (<= t_m 5.5e+102)
(/
2.0
(*
(* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
(/ (/ (pow t_m 3.0) l) (/ l (sin k)))))
(/
2.0
(* (* 2.0 k) (* (sin k) (pow (* t_m (pow (cbrt l) -2.0)) 3.0))))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3.8e-70) {
tmp = 2.0 / (((t_m * (pow(k, 2.0) / cos(k))) * (pow(sin(k), 2.0) / l)) / l);
} else if (t_m <= 5.5e+102) {
tmp = 2.0 / ((tan(k) * (2.0 + pow((k / t_m), 2.0))) * ((pow(t_m, 3.0) / l) / (l / sin(k))));
} else {
tmp = 2.0 / ((2.0 * k) * (sin(k) * pow((t_m * pow(cbrt(l), -2.0)), 3.0)));
}
return t_s * tmp;
}
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3.8e-70) {
tmp = 2.0 / (((t_m * (Math.pow(k, 2.0) / Math.cos(k))) * (Math.pow(Math.sin(k), 2.0) / l)) / l);
} else if (t_m <= 5.5e+102) {
tmp = 2.0 / ((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))) * ((Math.pow(t_m, 3.0) / l) / (l / Math.sin(k))));
} else {
tmp = 2.0 / ((2.0 * k) * (Math.sin(k) * Math.pow((t_m * Math.pow(Math.cbrt(l), -2.0)), 3.0)));
}
return t_s * tmp;
}
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 3.8e-70) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * Float64((k ^ 2.0) / cos(k))) * Float64((sin(k) ^ 2.0) / l)) / l)); elseif (t_m <= 5.5e+102) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(Float64((t_m ^ 3.0) / l) / Float64(l / sin(k))))); else tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(sin(k) * (Float64(t_m * (cbrt(l) ^ -2.0)) ^ 3.0)))); end return Float64(t_s * tmp) end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3.8e-70], N[(2.0 / N[(N[(N[(t$95$m * N[(N[Power[k, 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.5e+102], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 3.8 \cdot 10^{-70}:\\
\;\;\;\;\frac{2}{\frac{\left(t_m \cdot \frac{{k}^{2}}{\cos k}\right) \cdot \frac{{\sin k}^{2}}{\ell}}{\ell}}\\
\mathbf{elif}\;t_m \leq 5.5 \cdot 10^{+102}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right) \cdot \frac{\frac{{t_m}^{3}}{\ell}}{\frac{\ell}{\sin k}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot {\left(t_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3}\right)}\\
\end{array}
\end{array}
if t < 3.7999999999999998e-70Initial program 56.6%
associate-*l*56.6%
sqr-neg56.6%
sqr-neg56.6%
associate-/r*61.4%
distribute-rgt-in61.4%
unpow261.4%
times-frac38.7%
sqr-neg38.7%
times-frac61.4%
unpow261.4%
distribute-rgt-in61.4%
Simplified61.4%
associate-*r*61.4%
associate-*r*60.3%
*-commutative60.3%
associate-*l/60.8%
associate-*r/60.9%
*-commutative60.9%
associate-*r*62.0%
Applied egg-rr62.0%
Taylor expanded in k around inf 73.6%
associate-*r*73.6%
*-commutative73.6%
times-frac73.7%
Simplified73.7%
expm1-log1p-u57.8%
expm1-udef36.5%
associate-/l*36.5%
Applied egg-rr36.5%
expm1-def57.8%
expm1-log1p73.7%
associate-/r/73.8%
Simplified73.8%
if 3.7999999999999998e-70 < t < 5.49999999999999981e102Initial program 87.4%
associate-*l*87.4%
sqr-neg87.4%
sqr-neg87.4%
associate-/r*93.6%
distribute-rgt-in93.6%
unpow293.6%
times-frac90.5%
sqr-neg90.5%
times-frac93.6%
unpow293.6%
distribute-rgt-in93.6%
Simplified93.6%
associate-*l/93.5%
associate-/l*93.5%
Applied egg-rr93.5%
if 5.49999999999999981e102 < t Initial program 57.6%
*-commutative57.6%
sqr-neg57.6%
*-commutative57.6%
associate-*l*57.6%
*-commutative57.6%
sqr-neg57.6%
Simplified57.6%
Taylor expanded in k around 0 57.6%
*-commutative57.6%
Simplified57.6%
rem-cube-cbrt57.6%
cbrt-div57.6%
rem-cbrt-cube62.6%
cbrt-prod76.2%
unpow276.2%
cube-mult76.2%
div-inv76.2%
pow-flip76.2%
metadata-eval76.2%
pow276.2%
div-inv76.3%
pow-flip76.2%
metadata-eval76.2%
Applied egg-rr76.2%
unpow276.2%
cube-mult76.2%
Simplified76.2%
Final simplification76.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 2.5e+35)
(/ 2.0 (/ (* (* t_m (/ (pow k 2.0) (cos k))) (/ (pow (sin k) 2.0) l)) l))
(/ 2.0 (* (* 2.0 k) (pow (* (pow t_m 1.5) (/ (sqrt k) l)) 2.0))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.5e+35) {
tmp = 2.0 / (((t_m * (pow(k, 2.0) / cos(k))) * (pow(sin(k), 2.0) / l)) / l);
} else {
tmp = 2.0 / ((2.0 * k) * pow((pow(t_m, 1.5) * (sqrt(k) / l)), 2.0));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 2.5d+35) then
tmp = 2.0d0 / (((t_m * ((k ** 2.0d0) / cos(k))) * ((sin(k) ** 2.0d0) / l)) / l)
else
tmp = 2.0d0 / ((2.0d0 * k) * (((t_m ** 1.5d0) * (sqrt(k) / l)) ** 2.0d0))
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.5e+35) {
tmp = 2.0 / (((t_m * (Math.pow(k, 2.0) / Math.cos(k))) * (Math.pow(Math.sin(k), 2.0) / l)) / l);
} else {
tmp = 2.0 / ((2.0 * k) * Math.pow((Math.pow(t_m, 1.5) * (Math.sqrt(k) / l)), 2.0));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 2.5e+35: tmp = 2.0 / (((t_m * (math.pow(k, 2.0) / math.cos(k))) * (math.pow(math.sin(k), 2.0) / l)) / l) else: tmp = 2.0 / ((2.0 * k) * math.pow((math.pow(t_m, 1.5) * (math.sqrt(k) / l)), 2.0)) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 2.5e+35) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * Float64((k ^ 2.0) / cos(k))) * Float64((sin(k) ^ 2.0) / l)) / l)); else tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64((t_m ^ 1.5) * Float64(sqrt(k) / l)) ^ 2.0))); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 2.5e+35) tmp = 2.0 / (((t_m * ((k ^ 2.0) / cos(k))) * ((sin(k) ^ 2.0) / l)) / l); else tmp = 2.0 / ((2.0 * k) * (((t_m ^ 1.5) * (sqrt(k) / l)) ^ 2.0)); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.5e+35], N[(2.0 / N[(N[(N[(t$95$m * N[(N[Power[k, 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] * N[(N[Sqrt[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 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 \begin{array}{l}
\mathbf{if}\;t_m \leq 2.5 \cdot 10^{+35}:\\
\;\;\;\;\frac{2}{\frac{\left(t_m \cdot \frac{{k}^{2}}{\cos k}\right) \cdot \frac{{\sin k}^{2}}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left({t_m}^{1.5} \cdot \frac{\sqrt{k}}{\ell}\right)}^{2}}\\
\end{array}
\end{array}
if t < 2.50000000000000011e35Initial program 60.2%
associate-*l*60.2%
sqr-neg60.2%
sqr-neg60.2%
associate-/r*64.5%
distribute-rgt-in64.5%
unpow264.5%
times-frac44.3%
sqr-neg44.3%
times-frac64.5%
unpow264.5%
distribute-rgt-in64.5%
Simplified64.5%
associate-*r*64.5%
associate-*r*63.5%
*-commutative63.5%
associate-*l/64.0%
associate-*r/64.0%
*-commutative64.0%
associate-*r*65.1%
Applied egg-rr65.1%
Taylor expanded in k around inf 75.0%
associate-*r*75.0%
*-commutative75.0%
times-frac75.1%
Simplified75.1%
expm1-log1p-u58.7%
expm1-udef38.6%
associate-/l*38.6%
Applied egg-rr38.6%
expm1-def58.7%
expm1-log1p75.1%
associate-/r/75.1%
Simplified75.1%
if 2.50000000000000011e35 < t Initial program 61.5%
*-commutative61.5%
sqr-neg61.5%
*-commutative61.5%
associate-*l*61.5%
*-commutative61.5%
sqr-neg61.5%
Simplified61.5%
Taylor expanded in k around 0 57.3%
*-commutative57.3%
Simplified57.3%
Taylor expanded in k around 0 57.1%
associate-/l*57.2%
Simplified57.2%
add-sqr-sqrt24.6%
sqrt-div24.6%
sqrt-div24.6%
unpow224.6%
sqrt-prod10.8%
add-sqr-sqrt24.5%
sqrt-pow124.5%
metadata-eval24.5%
sqrt-div24.5%
sqrt-div24.5%
unpow224.5%
sqrt-prod11.0%
add-sqr-sqrt24.9%
sqrt-pow131.5%
metadata-eval31.5%
Applied egg-rr31.5%
unpow231.5%
associate-/r/30.9%
*-commutative30.9%
Simplified30.9%
Final simplification65.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 2.3e+80)
(/ 2.0 (/ (* (/ (pow k 2.0) l) (/ (* t_m (pow (sin k) 2.0)) (cos k))) l))
(/ 2.0 (* (* 2.0 k) (* (sin k) (pow (* t_m (pow (cbrt l) -2.0)) 3.0)))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.3e+80) {
tmp = 2.0 / (((pow(k, 2.0) / l) * ((t_m * pow(sin(k), 2.0)) / cos(k))) / l);
} else {
tmp = 2.0 / ((2.0 * k) * (sin(k) * pow((t_m * pow(cbrt(l), -2.0)), 3.0)));
}
return t_s * tmp;
}
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.3e+80) {
tmp = 2.0 / (((Math.pow(k, 2.0) / l) * ((t_m * Math.pow(Math.sin(k), 2.0)) / Math.cos(k))) / l);
} else {
tmp = 2.0 / ((2.0 * k) * (Math.sin(k) * Math.pow((t_m * Math.pow(Math.cbrt(l), -2.0)), 3.0)));
}
return t_s * tmp;
}
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 2.3e+80) 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(2.0 / Float64(Float64(2.0 * k) * Float64(sin(k) * (Float64(t_m * (cbrt(l) ^ -2.0)) ^ 3.0)))); end return Float64(t_s * tmp) end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.3e+80], 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[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 2.3 \cdot 10^{+80}:\\
\;\;\;\;\frac{2}{\frac{\frac{{k}^{2}}{\ell} \cdot \frac{t_m \cdot {\sin k}^{2}}{\cos k}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot {\left(t_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3}\right)}\\
\end{array}
\end{array}
if t < 2.30000000000000004e80Initial program 61.1%
associate-*l*61.1%
sqr-neg61.1%
sqr-neg61.1%
associate-/r*65.7%
distribute-rgt-in65.7%
unpow265.7%
times-frac46.2%
sqr-neg46.2%
times-frac65.7%
unpow265.7%
distribute-rgt-in65.7%
Simplified65.7%
associate-*r*65.7%
associate-*r*64.7%
*-commutative64.7%
associate-*l/65.2%
associate-*r/65.2%
*-commutative65.2%
associate-*r*66.2%
Applied egg-rr66.2%
Taylor expanded in k around inf 73.9%
times-frac74.6%
Simplified74.6%
if 2.30000000000000004e80 < t Initial program 58.2%
*-commutative58.2%
sqr-neg58.2%
*-commutative58.2%
associate-*l*58.2%
*-commutative58.2%
sqr-neg58.2%
Simplified58.2%
Taylor expanded in k around 0 58.2%
*-commutative58.2%
Simplified58.2%
rem-cube-cbrt58.2%
cbrt-div58.2%
rem-cbrt-cube62.9%
cbrt-prod75.8%
unpow275.8%
cube-mult75.8%
div-inv75.8%
pow-flip75.8%
metadata-eval75.8%
pow275.8%
div-inv75.9%
pow-flip75.8%
metadata-eval75.8%
Applied egg-rr75.8%
unpow275.8%
cube-mult75.8%
Simplified75.8%
Final simplification74.8%
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 8.8e-28)
(/ 2.0 (/ (/ (pow k 3.0) (/ l (* t_m (sin k)))) l))
(/ 2.0 (* (* 2.0 k) (pow (* (pow t_m 1.5) (/ (sqrt k) l)) 2.0))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 8.8e-28) {
tmp = 2.0 / ((pow(k, 3.0) / (l / (t_m * sin(k)))) / l);
} else {
tmp = 2.0 / ((2.0 * k) * pow((pow(t_m, 1.5) * (sqrt(k) / l)), 2.0));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 8.8d-28) then
tmp = 2.0d0 / (((k ** 3.0d0) / (l / (t_m * sin(k)))) / l)
else
tmp = 2.0d0 / ((2.0d0 * k) * (((t_m ** 1.5d0) * (sqrt(k) / l)) ** 2.0d0))
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 8.8e-28) {
tmp = 2.0 / ((Math.pow(k, 3.0) / (l / (t_m * Math.sin(k)))) / l);
} else {
tmp = 2.0 / ((2.0 * k) * Math.pow((Math.pow(t_m, 1.5) * (Math.sqrt(k) / l)), 2.0));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 8.8e-28: tmp = 2.0 / ((math.pow(k, 3.0) / (l / (t_m * math.sin(k)))) / l) else: tmp = 2.0 / ((2.0 * k) * math.pow((math.pow(t_m, 1.5) * (math.sqrt(k) / l)), 2.0)) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 8.8e-28) tmp = Float64(2.0 / Float64(Float64((k ^ 3.0) / Float64(l / Float64(t_m * sin(k)))) / l)); else tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64((t_m ^ 1.5) * Float64(sqrt(k) / l)) ^ 2.0))); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 8.8e-28) tmp = 2.0 / (((k ^ 3.0) / (l / (t_m * sin(k)))) / l); else tmp = 2.0 / ((2.0 * k) * (((t_m ^ 1.5) * (sqrt(k) / l)) ^ 2.0)); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 8.8e-28], N[(2.0 / N[(N[(N[Power[k, 3.0], $MachinePrecision] / N[(l / N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] * N[(N[Sqrt[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 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 \begin{array}{l}
\mathbf{if}\;t_m \leq 8.8 \cdot 10^{-28}:\\
\;\;\;\;\frac{2}{\frac{\frac{{k}^{3}}{\frac{\ell}{t_m \cdot \sin k}}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left({t_m}^{1.5} \cdot \frac{\sqrt{k}}{\ell}\right)}^{2}}\\
\end{array}
\end{array}
if t < 8.79999999999999984e-28Initial program 58.4%
associate-*l*58.4%
sqr-neg58.4%
sqr-neg58.4%
associate-/r*62.9%
distribute-rgt-in62.9%
unpow262.9%
times-frac41.5%
sqr-neg41.5%
times-frac62.9%
unpow262.9%
distribute-rgt-in62.9%
Simplified62.9%
associate-*r*62.9%
associate-*r*61.9%
*-commutative61.9%
associate-*l/62.4%
associate-*r/62.4%
*-commutative62.4%
associate-*r*63.5%
Applied egg-rr63.5%
Taylor expanded in k around 0 59.0%
associate-/l*58.9%
Simplified58.9%
Taylor expanded in k around inf 66.7%
associate-/l*67.8%
*-commutative67.8%
Simplified67.8%
if 8.79999999999999984e-28 < t Initial program 66.2%
*-commutative66.2%
sqr-neg66.2%
*-commutative66.2%
associate-*l*66.2%
*-commutative66.2%
sqr-neg66.2%
Simplified66.2%
Taylor expanded in k around 0 61.3%
*-commutative61.3%
Simplified61.3%
Taylor expanded in k around 0 61.1%
associate-/l*61.2%
Simplified61.2%
add-sqr-sqrt25.1%
sqrt-div25.1%
sqrt-div25.1%
unpow225.1%
sqrt-prod12.0%
add-sqr-sqrt23.6%
sqrt-pow123.6%
metadata-eval23.6%
sqrt-div23.6%
sqrt-div23.6%
unpow223.6%
sqrt-prod12.2%
add-sqr-sqrt25.4%
sqrt-pow131.0%
metadata-eval31.0%
Applied egg-rr31.0%
unpow231.0%
associate-/r/30.4%
*-commutative30.4%
Simplified30.4%
Final simplification57.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 4.9e-27)
(/ 2.0 (/ (/ (pow k 3.0) (/ l (* t_m (sin k)))) l))
(/ 2.0 (* (* 2.0 k) (/ k (/ (pow l 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 <= 4.9e-27) {
tmp = 2.0 / ((pow(k, 3.0) / (l / (t_m * sin(k)))) / l);
} else {
tmp = 2.0 / ((2.0 * k) * (k / (pow(l, 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 <= 4.9d-27) then
tmp = 2.0d0 / (((k ** 3.0d0) / (l / (t_m * sin(k)))) / l)
else
tmp = 2.0d0 / ((2.0d0 * k) * (k / ((l ** 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 <= 4.9e-27) {
tmp = 2.0 / ((Math.pow(k, 3.0) / (l / (t_m * Math.sin(k)))) / l);
} else {
tmp = 2.0 / ((2.0 * k) * (k / (Math.pow(l, 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 <= 4.9e-27: tmp = 2.0 / ((math.pow(k, 3.0) / (l / (t_m * math.sin(k)))) / l) else: tmp = 2.0 / ((2.0 * k) * (k / (math.pow(l, 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 <= 4.9e-27) tmp = Float64(2.0 / Float64(Float64((k ^ 3.0) / Float64(l / Float64(t_m * sin(k)))) / l)); else tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(k / Float64((l ^ 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 <= 4.9e-27) tmp = 2.0 / (((k ^ 3.0) / (l / (t_m * sin(k)))) / l); else tmp = 2.0 / ((2.0 * k) * (k / ((l ^ 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, 4.9e-27], N[(2.0 / N[(N[(N[Power[k, 3.0], $MachinePrecision] / N[(l / N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(k / N[(N[Power[l, 2.0], $MachinePrecision] / 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 4.9 \cdot 10^{-27}:\\
\;\;\;\;\frac{2}{\frac{\frac{{k}^{3}}{\frac{\ell}{t_m \cdot \sin k}}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \frac{k}{\frac{{\ell}^{2}}{{t_m}^{3}}}}\\
\end{array}
\end{array}
if t < 4.89999999999999976e-27Initial program 58.4%
associate-*l*58.4%
sqr-neg58.4%
sqr-neg58.4%
associate-/r*62.9%
distribute-rgt-in62.9%
unpow262.9%
times-frac41.5%
sqr-neg41.5%
times-frac62.9%
unpow262.9%
distribute-rgt-in62.9%
Simplified62.9%
associate-*r*62.9%
associate-*r*61.9%
*-commutative61.9%
associate-*l/62.4%
associate-*r/62.4%
*-commutative62.4%
associate-*r*63.5%
Applied egg-rr63.5%
Taylor expanded in k around 0 59.0%
associate-/l*58.9%
Simplified58.9%
Taylor expanded in k around inf 66.7%
associate-/l*67.8%
*-commutative67.8%
Simplified67.8%
if 4.89999999999999976e-27 < t Initial program 66.2%
*-commutative66.2%
sqr-neg66.2%
*-commutative66.2%
associate-*l*66.2%
*-commutative66.2%
sqr-neg66.2%
Simplified66.2%
Taylor expanded in k around 0 61.3%
*-commutative61.3%
Simplified61.3%
Taylor expanded in k around 0 61.1%
associate-/l*61.2%
Simplified61.2%
Final simplification66.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 5.6e-27)
(/ 2.0 (/ (/ (pow k 3.0) (/ l (* t_m (sin k)))) l))
(/ 2.0 (* (* 2.0 k) (/ k (pow (/ l (pow t_m 1.5)) 2.0)))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5.6e-27) {
tmp = 2.0 / ((pow(k, 3.0) / (l / (t_m * sin(k)))) / l);
} else {
tmp = 2.0 / ((2.0 * k) * (k / pow((l / pow(t_m, 1.5)), 2.0)));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 5.6d-27) then
tmp = 2.0d0 / (((k ** 3.0d0) / (l / (t_m * sin(k)))) / l)
else
tmp = 2.0d0 / ((2.0d0 * k) * (k / ((l / (t_m ** 1.5d0)) ** 2.0d0)))
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5.6e-27) {
tmp = 2.0 / ((Math.pow(k, 3.0) / (l / (t_m * Math.sin(k)))) / l);
} else {
tmp = 2.0 / ((2.0 * k) * (k / Math.pow((l / Math.pow(t_m, 1.5)), 2.0)));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 5.6e-27: tmp = 2.0 / ((math.pow(k, 3.0) / (l / (t_m * math.sin(k)))) / l) else: tmp = 2.0 / ((2.0 * k) * (k / math.pow((l / math.pow(t_m, 1.5)), 2.0))) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 5.6e-27) tmp = Float64(2.0 / Float64(Float64((k ^ 3.0) / Float64(l / Float64(t_m * sin(k)))) / l)); else tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(k / (Float64(l / (t_m ^ 1.5)) ^ 2.0)))); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 5.6e-27) tmp = 2.0 / (((k ^ 3.0) / (l / (t_m * sin(k)))) / l); else tmp = 2.0 / ((2.0 * k) * (k / ((l / (t_m ^ 1.5)) ^ 2.0))); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 5.6e-27], N[(2.0 / N[(N[(N[Power[k, 3.0], $MachinePrecision] / N[(l / N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(k / N[Power[N[(l / N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 5.6 \cdot 10^{-27}:\\
\;\;\;\;\frac{2}{\frac{\frac{{k}^{3}}{\frac{\ell}{t_m \cdot \sin k}}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \frac{k}{{\left(\frac{\ell}{{t_m}^{1.5}}\right)}^{2}}}\\
\end{array}
\end{array}
if t < 5.5999999999999999e-27Initial program 58.4%
associate-*l*58.4%
sqr-neg58.4%
sqr-neg58.4%
associate-/r*62.9%
distribute-rgt-in62.9%
unpow262.9%
times-frac41.5%
sqr-neg41.5%
times-frac62.9%
unpow262.9%
distribute-rgt-in62.9%
Simplified62.9%
associate-*r*62.9%
associate-*r*61.9%
*-commutative61.9%
associate-*l/62.4%
associate-*r/62.4%
*-commutative62.4%
associate-*r*63.5%
Applied egg-rr63.5%
Taylor expanded in k around 0 59.0%
associate-/l*58.9%
Simplified58.9%
Taylor expanded in k around inf 66.7%
associate-/l*67.8%
*-commutative67.8%
Simplified67.8%
if 5.5999999999999999e-27 < t Initial program 66.2%
*-commutative66.2%
sqr-neg66.2%
*-commutative66.2%
associate-*l*66.2%
*-commutative66.2%
sqr-neg66.2%
Simplified66.2%
Taylor expanded in k around 0 61.3%
*-commutative61.3%
Simplified61.3%
Taylor expanded in k around 0 61.1%
associate-/l*61.2%
Simplified61.2%
add-sqr-sqrt61.2%
pow261.2%
sqrt-div61.2%
unpow261.2%
sqrt-prod38.2%
add-sqr-sqrt63.3%
sqrt-pow171.7%
metadata-eval71.7%
Applied egg-rr71.7%
Final simplification68.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 2.3e-30)
(/ 2.0 (/ (/ (pow k 3.0) (/ l (* t_m (sin k)))) l))
(/ (/ 1.0 k) (* (pow t_m 3.0) (/ k (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) {
double tmp;
if (t_m <= 2.3e-30) {
tmp = 2.0 / ((pow(k, 3.0) / (l / (t_m * sin(k)))) / l);
} else {
tmp = (1.0 / k) / (pow(t_m, 3.0) * (k / pow(l, 2.0)));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 2.3d-30) then
tmp = 2.0d0 / (((k ** 3.0d0) / (l / (t_m * sin(k)))) / l)
else
tmp = (1.0d0 / k) / ((t_m ** 3.0d0) * (k / (l ** 2.0d0)))
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.3e-30) {
tmp = 2.0 / ((Math.pow(k, 3.0) / (l / (t_m * Math.sin(k)))) / l);
} else {
tmp = (1.0 / k) / (Math.pow(t_m, 3.0) * (k / Math.pow(l, 2.0)));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 2.3e-30: tmp = 2.0 / ((math.pow(k, 3.0) / (l / (t_m * math.sin(k)))) / l) else: tmp = (1.0 / k) / (math.pow(t_m, 3.0) * (k / math.pow(l, 2.0))) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 2.3e-30) tmp = Float64(2.0 / Float64(Float64((k ^ 3.0) / Float64(l / Float64(t_m * sin(k)))) / l)); else tmp = Float64(Float64(1.0 / k) / Float64((t_m ^ 3.0) * Float64(k / (l ^ 2.0)))); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 2.3e-30) tmp = 2.0 / (((k ^ 3.0) / (l / (t_m * sin(k)))) / l); else tmp = (1.0 / k) / ((t_m ^ 3.0) * (k / (l ^ 2.0))); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.3e-30], N[(2.0 / N[(N[(N[Power[k, 3.0], $MachinePrecision] / N[(l / N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / k), $MachinePrecision] / N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(k / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 2.3 \cdot 10^{-30}:\\
\;\;\;\;\frac{2}{\frac{\frac{{k}^{3}}{\frac{\ell}{t_m \cdot \sin k}}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{k}}{{t_m}^{3} \cdot \frac{k}{{\ell}^{2}}}\\
\end{array}
\end{array}
if t < 2.29999999999999984e-30Initial program 58.2%
associate-*l*58.2%
sqr-neg58.2%
sqr-neg58.2%
associate-/r*62.7%
distribute-rgt-in62.7%
unpow262.7%
times-frac41.2%
sqr-neg41.2%
times-frac62.7%
unpow262.7%
distribute-rgt-in62.7%
Simplified62.7%
associate-*r*62.7%
associate-*r*61.6%
*-commutative61.6%
associate-*l/62.2%
associate-*r/62.2%
*-commutative62.2%
associate-*r*63.3%
Applied egg-rr63.3%
Taylor expanded in k around 0 58.8%
associate-/l*58.7%
Simplified58.7%
Taylor expanded in k around inf 66.6%
associate-/l*67.6%
*-commutative67.6%
Simplified67.6%
if 2.29999999999999984e-30 < t Initial program 66.7%
*-commutative66.7%
sqr-neg66.7%
*-commutative66.7%
associate-*l*66.7%
*-commutative66.7%
sqr-neg66.7%
Simplified66.7%
Taylor expanded in k around 0 60.6%
*-commutative60.6%
Simplified60.6%
Taylor expanded in k around 0 60.3%
associate-/l*60.4%
Simplified60.4%
expm1-log1p-u60.3%
expm1-udef61.5%
associate-/r/61.4%
Applied egg-rr61.4%
expm1-def61.5%
expm1-log1p61.7%
*-commutative61.7%
associate-/r*61.6%
*-commutative61.6%
associate-/r*61.6%
metadata-eval61.6%
*-commutative61.6%
Simplified61.6%
Final simplification66.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 2.75e-95)
(/ 2.0 (/ (/ (pow k 4.0) (/ l t_m)) l))
(/ (/ 1.0 k) (* (pow t_m 3.0) (* k (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) {
double tmp;
if (t_m <= 2.75e-95) {
tmp = 2.0 / ((pow(k, 4.0) / (l / t_m)) / l);
} else {
tmp = (1.0 / k) / (pow(t_m, 3.0) * (k * pow(l, -2.0)));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 2.75d-95) then
tmp = 2.0d0 / (((k ** 4.0d0) / (l / t_m)) / l)
else
tmp = (1.0d0 / k) / ((t_m ** 3.0d0) * (k * (l ** (-2.0d0))))
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.75e-95) {
tmp = 2.0 / ((Math.pow(k, 4.0) / (l / t_m)) / l);
} else {
tmp = (1.0 / k) / (Math.pow(t_m, 3.0) * (k * Math.pow(l, -2.0)));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 2.75e-95: tmp = 2.0 / ((math.pow(k, 4.0) / (l / t_m)) / l) else: tmp = (1.0 / k) / (math.pow(t_m, 3.0) * (k * math.pow(l, -2.0))) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 2.75e-95) tmp = Float64(2.0 / Float64(Float64((k ^ 4.0) / Float64(l / t_m)) / l)); else tmp = Float64(Float64(1.0 / k) / Float64((t_m ^ 3.0) * Float64(k * (l ^ -2.0)))); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 2.75e-95) tmp = 2.0 / (((k ^ 4.0) / (l / t_m)) / l); else tmp = (1.0 / k) / ((t_m ^ 3.0) * (k * (l ^ -2.0))); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.75e-95], N[(2.0 / N[(N[(N[Power[k, 4.0], $MachinePrecision] / N[(l / t$95$m), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / k), $MachinePrecision] / N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(k * N[Power[l, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 2.75 \cdot 10^{-95}:\\
\;\;\;\;\frac{2}{\frac{\frac{{k}^{4}}{\frac{\ell}{t_m}}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{k}}{{t_m}^{3} \cdot \left(k \cdot {\ell}^{-2}\right)}\\
\end{array}
\end{array}
if t < 2.75000000000000001e-95Initial program 55.9%
associate-*l*55.9%
sqr-neg55.9%
sqr-neg55.9%
associate-/r*60.9%
distribute-rgt-in60.9%
unpow260.9%
times-frac37.5%
sqr-neg37.5%
times-frac60.9%
unpow260.9%
distribute-rgt-in60.9%
Simplified60.9%
associate-*r*60.9%
associate-*r*59.7%
*-commutative59.7%
associate-*l/60.3%
associate-*r/60.3%
*-commutative60.3%
associate-*r*61.5%
Applied egg-rr61.5%
Taylor expanded in k around inf 72.8%
associate-*r*72.8%
*-commutative72.8%
times-frac73.0%
Simplified73.0%
Taylor expanded in k around 0 64.4%
associate-/l*65.9%
Simplified65.9%
if 2.75000000000000001e-95 < t Initial program 69.8%
*-commutative69.8%
sqr-neg69.8%
*-commutative69.8%
associate-*l*69.8%
*-commutative69.8%
sqr-neg69.8%
Simplified69.8%
Taylor expanded in k around 0 60.2%
*-commutative60.2%
Simplified60.2%
Taylor expanded in k around 0 61.2%
associate-/l*61.3%
Simplified61.3%
expm1-log1p-u61.2%
expm1-udef64.3%
associate-/r/64.3%
Applied egg-rr64.3%
expm1-def63.3%
expm1-log1p63.5%
*-commutative63.5%
associate-/r*63.4%
*-commutative63.4%
associate-/r*63.4%
metadata-eval63.4%
*-commutative63.4%
Simplified63.4%
expm1-log1p-u39.6%
expm1-udef27.4%
div-inv27.4%
pow-flip27.4%
metadata-eval27.4%
Applied egg-rr27.4%
expm1-def39.6%
expm1-log1p63.4%
Simplified63.4%
Final simplification65.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 1.5e-95)
(/ 2.0 (/ (/ (pow k 4.0) (/ l t_m)) l))
(/ (/ 1.0 k) (* (pow t_m 3.0) (/ k (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) {
double tmp;
if (t_m <= 1.5e-95) {
tmp = 2.0 / ((pow(k, 4.0) / (l / t_m)) / l);
} else {
tmp = (1.0 / k) / (pow(t_m, 3.0) * (k / pow(l, 2.0)));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1.5d-95) then
tmp = 2.0d0 / (((k ** 4.0d0) / (l / t_m)) / l)
else
tmp = (1.0d0 / k) / ((t_m ** 3.0d0) * (k / (l ** 2.0d0)))
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.5e-95) {
tmp = 2.0 / ((Math.pow(k, 4.0) / (l / t_m)) / l);
} else {
tmp = (1.0 / k) / (Math.pow(t_m, 3.0) * (k / Math.pow(l, 2.0)));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 1.5e-95: tmp = 2.0 / ((math.pow(k, 4.0) / (l / t_m)) / l) else: tmp = (1.0 / k) / (math.pow(t_m, 3.0) * (k / math.pow(l, 2.0))) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.5e-95) tmp = Float64(2.0 / Float64(Float64((k ^ 4.0) / Float64(l / t_m)) / l)); else tmp = Float64(Float64(1.0 / k) / Float64((t_m ^ 3.0) * Float64(k / (l ^ 2.0)))); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 1.5e-95) tmp = 2.0 / (((k ^ 4.0) / (l / t_m)) / l); else tmp = (1.0 / k) / ((t_m ^ 3.0) * (k / (l ^ 2.0))); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.5e-95], N[(2.0 / N[(N[(N[Power[k, 4.0], $MachinePrecision] / N[(l / t$95$m), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / k), $MachinePrecision] / N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(k / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 1.5 \cdot 10^{-95}:\\
\;\;\;\;\frac{2}{\frac{\frac{{k}^{4}}{\frac{\ell}{t_m}}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{k}}{{t_m}^{3} \cdot \frac{k}{{\ell}^{2}}}\\
\end{array}
\end{array}
if t < 1.5e-95Initial program 55.9%
associate-*l*55.9%
sqr-neg55.9%
sqr-neg55.9%
associate-/r*60.9%
distribute-rgt-in60.9%
unpow260.9%
times-frac37.5%
sqr-neg37.5%
times-frac60.9%
unpow260.9%
distribute-rgt-in60.9%
Simplified60.9%
associate-*r*60.9%
associate-*r*59.7%
*-commutative59.7%
associate-*l/60.3%
associate-*r/60.3%
*-commutative60.3%
associate-*r*61.5%
Applied egg-rr61.5%
Taylor expanded in k around inf 72.8%
associate-*r*72.8%
*-commutative72.8%
times-frac73.0%
Simplified73.0%
Taylor expanded in k around 0 64.4%
associate-/l*65.9%
Simplified65.9%
if 1.5e-95 < t Initial program 69.8%
*-commutative69.8%
sqr-neg69.8%
*-commutative69.8%
associate-*l*69.8%
*-commutative69.8%
sqr-neg69.8%
Simplified69.8%
Taylor expanded in k around 0 60.2%
*-commutative60.2%
Simplified60.2%
Taylor expanded in k around 0 61.2%
associate-/l*61.3%
Simplified61.3%
expm1-log1p-u61.2%
expm1-udef64.3%
associate-/r/64.3%
Applied egg-rr64.3%
expm1-def63.3%
expm1-log1p63.5%
*-commutative63.5%
associate-/r*63.4%
*-commutative63.4%
associate-/r*63.4%
metadata-eval63.4%
*-commutative63.4%
Simplified63.4%
Final simplification65.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 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) {
return t_s * (2.0 / (((t_m * pow(k, 4.0)) / l) / l));
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / (((t_m * (k ** 4.0d0)) / l) / l))
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / (((t_m * Math.pow(k, 4.0)) / l) / l));
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / (((t_m * math.pow(k, 4.0)) / l) / l))
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 4.0)) / l) / l))) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / (((t_m * (k ^ 4.0)) / l) / l)); end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(N[(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 \frac{2}{\frac{\frac{t_m \cdot {k}^{4}}{\ell}}{\ell}}
\end{array}
Initial program 60.5%
associate-*l*60.5%
sqr-neg60.5%
sqr-neg60.5%
associate-/r*65.2%
distribute-rgt-in65.2%
unpow265.2%
times-frac46.0%
sqr-neg46.0%
times-frac65.2%
unpow265.2%
distribute-rgt-in65.2%
Simplified65.2%
associate-*r*65.1%
associate-*r*62.3%
*-commutative62.3%
associate-*l/62.7%
associate-*r/62.7%
*-commutative62.7%
associate-*r*65.6%
Applied egg-rr65.6%
Taylor expanded in k around inf 67.6%
associate-*r*67.6%
*-commutative67.6%
times-frac67.7%
Simplified67.7%
Taylor expanded in k around 0 60.8%
Final simplification60.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 (/ (/ (pow k 4.0) (/ l t_m)) l))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((pow(k, 4.0) / (l / t_m)) / 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 / (((k ** 4.0d0) / (l / t_m)) / l))
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((Math.pow(k, 4.0) / (l / t_m)) / l));
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / ((math.pow(k, 4.0) / (l / t_m)) / 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((k ^ 4.0) / Float64(l / t_m)) / 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 / (((k ^ 4.0) / (l / t_m)) / l)); end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(N[Power[k, 4.0], $MachinePrecision] / N[(l / t$95$m), $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{{k}^{4}}{\frac{\ell}{t_m}}}{\ell}}
\end{array}
Initial program 60.5%
associate-*l*60.5%
sqr-neg60.5%
sqr-neg60.5%
associate-/r*65.2%
distribute-rgt-in65.2%
unpow265.2%
times-frac46.0%
sqr-neg46.0%
times-frac65.2%
unpow265.2%
distribute-rgt-in65.2%
Simplified65.2%
associate-*r*65.1%
associate-*r*62.3%
*-commutative62.3%
associate-*l/62.7%
associate-*r/62.7%
*-commutative62.7%
associate-*r*65.6%
Applied egg-rr65.6%
Taylor expanded in k around inf 67.6%
associate-*r*67.6%
*-commutative67.6%
times-frac67.7%
Simplified67.7%
Taylor expanded in k around 0 60.8%
associate-/l*61.7%
Simplified61.7%
Final simplification61.7%
herbie shell --seed 2024021
(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))))