
(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 29 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 3.2e-125)
(*
(/ 2.0 (pow k 2.0))
(* (/ (cos k) (pow (sin k) 2.0)) (/ (pow l 2.0) t_m)))
(/
2.0
(pow
(*
(* (cbrt (sin k)) (* t_m (pow (cbrt l) -2.0)))
(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 <= 3.2e-125) {
tmp = (2.0 / pow(k, 2.0)) * ((cos(k) / pow(sin(k), 2.0)) * (pow(l, 2.0) / t_m));
} else {
tmp = 2.0 / pow(((cbrt(sin(k)) * (t_m * pow(cbrt(l), -2.0))) * 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 <= 3.2e-125) {
tmp = (2.0 / Math.pow(k, 2.0)) * ((Math.cos(k) / Math.pow(Math.sin(k), 2.0)) * (Math.pow(l, 2.0) / t_m));
} else {
tmp = 2.0 / Math.pow(((Math.cbrt(Math.sin(k)) * (t_m * Math.pow(Math.cbrt(l), -2.0))) * 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 <= 3.2e-125) tmp = Float64(Float64(2.0 / (k ^ 2.0)) * Float64(Float64(cos(k) / (sin(k) ^ 2.0)) * Float64((l ^ 2.0) / t_m))); else tmp = Float64(2.0 / (Float64(Float64(cbrt(sin(k)) * Float64(t_m * (cbrt(l) ^ -2.0))) * 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, 3.2e-125], N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(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] * 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], 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 3.2 \cdot 10^{-125}:\\
\;\;\;\;\frac{2}{{k}^{2}} \cdot \left(\frac{\cos k}{{\sin k}^{2}} \cdot \frac{{\ell}^{2}}{t\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(\sqrt[3]{\sin k} \cdot \left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right) \cdot \sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)}\right)}^{3}}\\
\end{array}
\end{array}
if t < 3.1999999999999998e-125Initial program 50.2%
Simplified50.5%
Taylor expanded in k around inf 60.7%
associate-*r/60.7%
times-frac61.5%
*-commutative61.5%
*-commutative61.5%
times-frac63.8%
Simplified63.8%
if 3.1999999999999998e-125 < t Initial program 75.2%
Simplified75.2%
add-cube-cbrt75.0%
pow375.0%
*-commutative75.0%
cbrt-prod75.0%
cbrt-div76.3%
rem-cbrt-cube84.0%
cbrt-prod90.5%
pow290.5%
Applied egg-rr90.5%
add-sqr-sqrt55.9%
pow255.9%
associate-+r+55.9%
metadata-eval55.9%
sqrt-prod55.9%
metadata-eval55.9%
associate-+r+55.9%
add-sqr-sqrt55.9%
hypot-1-def55.9%
unpow255.9%
hypot-1-def55.9%
Applied egg-rr55.9%
unpow255.9%
swap-sqr55.9%
rem-square-sqrt90.4%
unpow290.4%
Simplified90.4%
Applied egg-rr95.1%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ l (hypot 1.0 (hypot 1.0 (/ k t_m))))))
(*
t_s
(if (<= t_m 1.2e-114)
(*
(/ 2.0 (pow k 2.0))
(* (/ (cos k) (pow (sin k) 2.0)) (/ (pow l 2.0) t_m)))
(if (<= t_m 820000000.0)
(* t_2 (* (/ (/ 2.0 (tan k)) (* (sin k) (pow t_m 3.0))) t_2))
(/
2.0
(*
(pow (* (cbrt (sin k)) (/ t_m (pow (cbrt l) 2.0))) 3.0)
(* (tan k) (+ 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 t_2 = l / hypot(1.0, hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 1.2e-114) {
tmp = (2.0 / pow(k, 2.0)) * ((cos(k) / pow(sin(k), 2.0)) * (pow(l, 2.0) / t_m));
} else if (t_m <= 820000000.0) {
tmp = t_2 * (((2.0 / tan(k)) / (sin(k) * pow(t_m, 3.0))) * t_2);
} else {
tmp = 2.0 / (pow((cbrt(sin(k)) * (t_m / pow(cbrt(l), 2.0))), 3.0) * (tan(k) * (1.0 + (pow((k / t_m), 2.0) + 1.0))));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = l / Math.hypot(1.0, Math.hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 1.2e-114) {
tmp = (2.0 / Math.pow(k, 2.0)) * ((Math.cos(k) / Math.pow(Math.sin(k), 2.0)) * (Math.pow(l, 2.0) / t_m));
} else if (t_m <= 820000000.0) {
tmp = t_2 * (((2.0 / Math.tan(k)) / (Math.sin(k) * Math.pow(t_m, 3.0))) * t_2);
} else {
tmp = 2.0 / (Math.pow((Math.cbrt(Math.sin(k)) * (t_m / Math.pow(Math.cbrt(l), 2.0))), 3.0) * (Math.tan(k) * (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) t_2 = Float64(l / hypot(1.0, hypot(1.0, Float64(k / t_m)))) tmp = 0.0 if (t_m <= 1.2e-114) tmp = Float64(Float64(2.0 / (k ^ 2.0)) * Float64(Float64(cos(k) / (sin(k) ^ 2.0)) * Float64((l ^ 2.0) / t_m))); elseif (t_m <= 820000000.0) tmp = Float64(t_2 * Float64(Float64(Float64(2.0 / tan(k)) / Float64(sin(k) * (t_m ^ 3.0))) * t_2)); else tmp = Float64(2.0 / Float64((Float64(cbrt(sin(k)) * Float64(t_m / (cbrt(l) ^ 2.0))) ^ 3.0) * Float64(tan(k) * Float64(1.0 + Float64((Float64(k / t_m) ^ 2.0) + 1.0))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(l / N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.2e-114], N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 820000000.0], N[(t$95$2 * N[(N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $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[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $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 := \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.2 \cdot 10^{-114}:\\
\;\;\;\;\frac{2}{{k}^{2}} \cdot \left(\frac{\cos k}{{\sin k}^{2}} \cdot \frac{{\ell}^{2}}{t\_m}\right)\\
\mathbf{elif}\;t\_m \leq 820000000:\\
\;\;\;\;t\_2 \cdot \left(\frac{\frac{2}{\tan k}}{\sin k \cdot {t\_m}^{3}} \cdot t\_2\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right)\right)\right)}\\
\end{array}
\end{array}
\end{array}
if t < 1.2000000000000001e-114Initial program 50.0%
Simplified50.2%
Taylor expanded in k around inf 61.4%
associate-*r/61.4%
times-frac62.1%
*-commutative62.1%
*-commutative62.1%
times-frac64.4%
Simplified64.4%
if 1.2000000000000001e-114 < t < 8.2e8Initial program 85.8%
Simplified81.5%
associate-*r*81.4%
add-sqr-sqrt81.4%
times-frac81.6%
Applied egg-rr95.2%
associate-/l*95.2%
metadata-eval95.2%
associate-*r/95.2%
associate-/l/95.3%
associate-*r/95.3%
associate-*r/95.3%
metadata-eval95.3%
*-commutative95.3%
Simplified95.3%
if 8.2e8 < t Initial program 73.3%
Simplified73.3%
add-cube-cbrt73.1%
pow373.1%
*-commutative73.1%
cbrt-prod73.1%
cbrt-div75.0%
rem-cbrt-cube82.4%
cbrt-prod92.0%
pow292.0%
Applied egg-rr92.0%
Final simplification72.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 4.3e-125)
(*
(/ 2.0 (pow k 2.0))
(* (/ (cos k) (pow (sin k) 2.0)) (/ (pow l 2.0) t_m)))
(/
2.0
(*
(pow (* (cbrt (sin k)) (/ t_m (pow (cbrt l) 2.0))) 3.0)
(* (tan k) (+ 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 <= 4.3e-125) {
tmp = (2.0 / pow(k, 2.0)) * ((cos(k) / pow(sin(k), 2.0)) * (pow(l, 2.0) / t_m));
} else {
tmp = 2.0 / (pow((cbrt(sin(k)) * (t_m / pow(cbrt(l), 2.0))), 3.0) * (tan(k) * (1.0 + (pow((k / t_m), 2.0) + 1.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.3e-125) {
tmp = (2.0 / Math.pow(k, 2.0)) * ((Math.cos(k) / Math.pow(Math.sin(k), 2.0)) * (Math.pow(l, 2.0) / t_m));
} else {
tmp = 2.0 / (Math.pow((Math.cbrt(Math.sin(k)) * (t_m / Math.pow(Math.cbrt(l), 2.0))), 3.0) * (Math.tan(k) * (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 <= 4.3e-125) tmp = Float64(Float64(2.0 / (k ^ 2.0)) * Float64(Float64(cos(k) / (sin(k) ^ 2.0)) * Float64((l ^ 2.0) / t_m))); else tmp = Float64(2.0 / Float64((Float64(cbrt(sin(k)) * Float64(t_m / (cbrt(l) ^ 2.0))) ^ 3.0) * Float64(tan(k) * Float64(1.0 + Float64((Float64(k / t_m) ^ 2.0) + 1.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.3e-125], N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / t$95$m), $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[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.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.3 \cdot 10^{-125}:\\
\;\;\;\;\frac{2}{{k}^{2}} \cdot \left(\frac{\cos k}{{\sin k}^{2}} \cdot \frac{{\ell}^{2}}{t\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right)\right)\right)}\\
\end{array}
\end{array}
if t < 4.3000000000000002e-125Initial program 50.2%
Simplified50.5%
Taylor expanded in k around inf 60.7%
associate-*r/60.7%
times-frac61.5%
*-commutative61.5%
*-commutative61.5%
times-frac63.8%
Simplified63.8%
if 4.3000000000000002e-125 < t Initial program 75.2%
Simplified75.2%
add-cube-cbrt75.0%
pow375.0%
*-commutative75.0%
cbrt-prod75.0%
cbrt-div76.3%
rem-cbrt-cube84.0%
cbrt-prod90.5%
pow290.5%
Applied egg-rr90.5%
Final simplification71.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 4.25e-125)
(*
(/ 2.0 (pow k 2.0))
(* (/ (cos k) (pow (sin k) 2.0)) (/ (pow l 2.0) t_m)))
(/
2.0
(*
(* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
(pow (* (cbrt (sin k)) (* t_m (pow (cbrt l) -2.0))) 3.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4.25e-125) {
tmp = (2.0 / pow(k, 2.0)) * ((cos(k) / pow(sin(k), 2.0)) * (pow(l, 2.0) / t_m));
} else {
tmp = 2.0 / ((tan(k) * (2.0 + pow((k / t_m), 2.0))) * pow((cbrt(sin(k)) * (t_m * pow(cbrt(l), -2.0))), 3.0));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4.25e-125) {
tmp = (2.0 / Math.pow(k, 2.0)) * ((Math.cos(k) / Math.pow(Math.sin(k), 2.0)) * (Math.pow(l, 2.0) / t_m));
} else {
tmp = 2.0 / ((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))) * Math.pow((Math.cbrt(Math.sin(k)) * (t_m * Math.pow(Math.cbrt(l), -2.0))), 3.0));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 4.25e-125) tmp = Float64(Float64(2.0 / (k ^ 2.0)) * Float64(Float64(cos(k) / (sin(k) ^ 2.0)) * Float64((l ^ 2.0) / t_m))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * (Float64(cbrt(sin(k)) * Float64(t_m * (cbrt(l) ^ -2.0))) ^ 3.0))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 4.25e-125], N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $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[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.25 \cdot 10^{-125}:\\
\;\;\;\;\frac{2}{{k}^{2}} \cdot \left(\frac{\cos k}{{\sin k}^{2}} \cdot \frac{{\ell}^{2}}{t\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right) \cdot {\left(\sqrt[3]{\sin k} \cdot \left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right)}^{3}}\\
\end{array}
\end{array}
if t < 4.2500000000000001e-125Initial program 50.2%
Simplified50.5%
Taylor expanded in k around inf 60.7%
associate-*r/60.7%
times-frac61.5%
*-commutative61.5%
*-commutative61.5%
times-frac63.8%
Simplified63.8%
if 4.2500000000000001e-125 < t Initial program 75.2%
Simplified75.2%
add-cube-cbrt75.0%
pow375.0%
*-commutative75.0%
cbrt-prod75.0%
cbrt-div76.3%
rem-cbrt-cube84.0%
cbrt-prod90.5%
pow290.5%
Applied egg-rr90.5%
add-sqr-sqrt55.9%
pow255.9%
associate-+r+55.9%
metadata-eval55.9%
sqrt-prod55.9%
metadata-eval55.9%
associate-+r+55.9%
add-sqr-sqrt55.9%
hypot-1-def55.9%
unpow255.9%
hypot-1-def55.9%
Applied egg-rr55.9%
unpow255.9%
swap-sqr55.9%
rem-square-sqrt90.4%
unpow290.4%
Simplified90.4%
Applied egg-rr95.1%
cube-prod90.4%
rem-cube-cbrt90.4%
Simplified90.4%
Final simplification71.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 0.044)
(pow
(/
(cbrt 2.0)
(* (* t_m (pow (cbrt l) -2.0)) (* (cbrt 2.0) (pow (cbrt k) 2.0))))
3.0)
(* (/ 2.0 (tan k)) (/ (pow l 2.0) (* (pow k 2.0) (* t_m (sin 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 (k <= 0.044) {
tmp = pow((cbrt(2.0) / ((t_m * pow(cbrt(l), -2.0)) * (cbrt(2.0) * pow(cbrt(k), 2.0)))), 3.0);
} else {
tmp = (2.0 / tan(k)) * (pow(l, 2.0) / (pow(k, 2.0) * (t_m * sin(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 (k <= 0.044) {
tmp = Math.pow((Math.cbrt(2.0) / ((t_m * Math.pow(Math.cbrt(l), -2.0)) * (Math.cbrt(2.0) * Math.pow(Math.cbrt(k), 2.0)))), 3.0);
} else {
tmp = (2.0 / Math.tan(k)) * (Math.pow(l, 2.0) / (Math.pow(k, 2.0) * (t_m * Math.sin(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 (k <= 0.044) tmp = Float64(cbrt(2.0) / Float64(Float64(t_m * (cbrt(l) ^ -2.0)) * Float64(cbrt(2.0) * (cbrt(k) ^ 2.0)))) ^ 3.0; else tmp = Float64(Float64(2.0 / tan(k)) * Float64((l ^ 2.0) / Float64((k ^ 2.0) * Float64(t_m * sin(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[k, 0.044], N[Power[N[(N[Power[2.0, 1/3], $MachinePrecision] / N[(N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[2.0, 1/3], $MachinePrecision] * N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Sin[k], $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}\;k \leq 0.044:\\
\;\;\;\;{\left(\frac{\sqrt[3]{2}}{\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \left(\sqrt[3]{2} \cdot {\left(\sqrt[3]{k}\right)}^{2}\right)}\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\tan k} \cdot \frac{{\ell}^{2}}{{k}^{2} \cdot \left(t\_m \cdot \sin k\right)}\\
\end{array}
\end{array}
if k < 0.043999999999999997Initial program 59.6%
Simplified57.1%
Taylor expanded in k around 0 56.4%
add-cube-cbrt56.3%
pow356.3%
associate-/l/53.9%
cbrt-div53.9%
unpow353.9%
add-cbrt-cube59.3%
cbrt-prod63.8%
unpow263.8%
div-inv63.8%
unpow-prod-down53.4%
pow-flip53.4%
metadata-eval53.4%
Applied egg-rr53.4%
cube-prod63.8%
Simplified63.8%
add-cube-cbrt63.8%
pow263.8%
cbrt-div63.8%
cbrt-prod63.8%
unpow363.8%
add-cbrt-cube63.8%
cbrt-div63.8%
cbrt-prod63.8%
Applied egg-rr68.0%
unpow268.0%
unpow368.0%
Simplified68.0%
*-commutative68.0%
cbrt-prod68.0%
unpow268.0%
cbrt-prod81.0%
pow281.0%
Applied egg-rr81.0%
if 0.043999999999999997 < k Initial program 50.9%
Simplified49.3%
associate-*r*52.5%
*-un-lft-identity52.5%
times-frac55.8%
associate-/l/55.8%
Applied egg-rr55.8%
/-rgt-identity55.8%
associate-*l/55.8%
*-commutative55.8%
times-frac55.8%
*-commutative55.8%
Simplified55.8%
associate-*r/52.5%
Applied egg-rr52.5%
associate-/l*55.8%
associate-*r*55.8%
*-commutative55.8%
Simplified55.8%
Taylor expanded in t around 0 74.3%
Final simplification79.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 2.1e-88)
(*
(/ 2.0 (pow k 2.0))
(* (/ (cos k) (pow (sin k) 2.0)) (/ (pow l 2.0) t_m)))
(if (<= t_m 9.5e+174)
(*
(pow (* (cbrt (/ 2.0 (tan k))) (/ (cbrt (/ l (sin k))) t_m)) 3.0)
(/ l (+ 2.0 (pow (/ k t_m) 2.0))))
(/
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 <= 2.1e-88) {
tmp = (2.0 / pow(k, 2.0)) * ((cos(k) / pow(sin(k), 2.0)) * (pow(l, 2.0) / t_m));
} else if (t_m <= 9.5e+174) {
tmp = pow((cbrt((2.0 / tan(k))) * (cbrt((l / sin(k))) / t_m)), 3.0) * (l / (2.0 + pow((k / t_m), 2.0)));
} 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 <= 2.1e-88) {
tmp = (2.0 / Math.pow(k, 2.0)) * ((Math.cos(k) / Math.pow(Math.sin(k), 2.0)) * (Math.pow(l, 2.0) / t_m));
} else if (t_m <= 9.5e+174) {
tmp = Math.pow((Math.cbrt((2.0 / Math.tan(k))) * (Math.cbrt((l / Math.sin(k))) / t_m)), 3.0) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
} 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 <= 2.1e-88) tmp = Float64(Float64(2.0 / (k ^ 2.0)) * Float64(Float64(cos(k) / (sin(k) ^ 2.0)) * Float64((l ^ 2.0) / t_m))); elseif (t_m <= 9.5e+174) tmp = Float64((Float64(cbrt(Float64(2.0 / tan(k))) * Float64(cbrt(Float64(l / sin(k))) / t_m)) ^ 3.0) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); 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, 2.1e-88], N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 9.5e+174], N[(N[Power[N[(N[Power[N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[(N[Power[N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $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.1 \cdot 10^{-88}:\\
\;\;\;\;\frac{2}{{k}^{2}} \cdot \left(\frac{\cos k}{{\sin k}^{2}} \cdot \frac{{\ell}^{2}}{t\_m}\right)\\
\mathbf{elif}\;t\_m \leq 9.5 \cdot 10^{+174}:\\
\;\;\;\;{\left(\sqrt[3]{\frac{2}{\tan k}} \cdot \frac{\sqrt[3]{\frac{\ell}{\sin k}}}{t\_m}\right)}^{3} \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot k\right)}\\
\end{array}
\end{array}
if t < 2.1e-88Initial program 51.0%
Simplified51.3%
Taylor expanded in k around inf 62.6%
associate-*r/62.6%
times-frac63.3%
*-commutative63.3%
*-commutative63.3%
times-frac65.5%
Simplified65.5%
if 2.1e-88 < t < 9.4999999999999992e174Initial program 78.6%
Simplified76.5%
associate-*r*76.5%
*-un-lft-identity76.5%
times-frac76.5%
associate-/l/76.5%
Applied egg-rr76.5%
/-rgt-identity76.5%
associate-*l/76.6%
*-commutative76.6%
times-frac76.6%
*-commutative76.6%
Simplified76.6%
add-cube-cbrt76.4%
pow376.3%
cbrt-prod76.3%
associate-/r*76.3%
cbrt-div76.3%
unpow376.3%
add-cbrt-cube89.9%
Applied egg-rr89.9%
if 9.4999999999999992e174 < t Initial program 72.6%
Simplified72.6%
add-cube-cbrt72.6%
pow372.6%
*-commutative72.6%
cbrt-prod72.6%
cbrt-div72.6%
rem-cbrt-cube72.9%
cbrt-prod92.2%
pow292.2%
Applied egg-rr92.2%
Taylor expanded in k around 0 88.7%
*-commutative88.7%
Simplified88.7%
Final simplification71.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (+ 2.0 (pow (/ k t_m) 2.0))))
(*
t_s
(if (<= t_m 2e-79)
(*
(/ 2.0 (pow k 2.0))
(* (/ (cos k) (pow (sin k) 2.0)) (/ (pow l 2.0) t_m)))
(if (<= t_m 5.6e+102)
(* 2.0 (/ (/ (* l (/ (/ l (sin k)) (pow t_m 3.0))) t_2) (tan k)))
(/
2.0
(*
(sin k)
(* (* (tan k) t_2) (pow (* t_m (pow (cbrt l) -2.0)) 3.0)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = 2.0 + pow((k / t_m), 2.0);
double tmp;
if (t_m <= 2e-79) {
tmp = (2.0 / pow(k, 2.0)) * ((cos(k) / pow(sin(k), 2.0)) * (pow(l, 2.0) / t_m));
} else if (t_m <= 5.6e+102) {
tmp = 2.0 * (((l * ((l / sin(k)) / pow(t_m, 3.0))) / t_2) / tan(k));
} else {
tmp = 2.0 / (sin(k) * ((tan(k) * t_2) * pow((t_m * pow(cbrt(l), -2.0)), 3.0)));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = 2.0 + Math.pow((k / t_m), 2.0);
double tmp;
if (t_m <= 2e-79) {
tmp = (2.0 / Math.pow(k, 2.0)) * ((Math.cos(k) / Math.pow(Math.sin(k), 2.0)) * (Math.pow(l, 2.0) / t_m));
} else if (t_m <= 5.6e+102) {
tmp = 2.0 * (((l * ((l / Math.sin(k)) / Math.pow(t_m, 3.0))) / t_2) / Math.tan(k));
} else {
tmp = 2.0 / (Math.sin(k) * ((Math.tan(k) * t_2) * Math.pow((t_m * Math.pow(Math.cbrt(l), -2.0)), 3.0)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(2.0 + (Float64(k / t_m) ^ 2.0)) tmp = 0.0 if (t_m <= 2e-79) tmp = Float64(Float64(2.0 / (k ^ 2.0)) * Float64(Float64(cos(k) / (sin(k) ^ 2.0)) * Float64((l ^ 2.0) / t_m))); elseif (t_m <= 5.6e+102) tmp = Float64(2.0 * Float64(Float64(Float64(l * Float64(Float64(l / sin(k)) / (t_m ^ 3.0))) / t_2) / tan(k))); else tmp = Float64(2.0 / Float64(sin(k) * Float64(Float64(tan(k) * t_2) * (Float64(t_m * (cbrt(l) ^ -2.0)) ^ 3.0)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2e-79], N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $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[(l * N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Tan[k], $MachinePrecision] * t$95$2), $MachinePrecision] * N[Power[N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := 2 + {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2 \cdot 10^{-79}:\\
\;\;\;\;\frac{2}{{k}^{2}} \cdot \left(\frac{\cos k}{{\sin k}^{2}} \cdot \frac{{\ell}^{2}}{t\_m}\right)\\
\mathbf{elif}\;t\_m \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;2 \cdot \frac{\frac{\ell \cdot \frac{\frac{\ell}{\sin k}}{{t\_m}^{3}}}{t\_2}}{\tan k}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\sin k \cdot \left(\left(\tan k \cdot t\_2\right) \cdot {\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3}\right)}\\
\end{array}
\end{array}
\end{array}
if t < 2e-79Initial program 51.5%
Simplified51.8%
Taylor expanded in k around inf 63.0%
associate-*r/63.0%
times-frac63.7%
*-commutative63.7%
*-commutative63.7%
times-frac65.9%
Simplified65.9%
if 2e-79 < t < 5.60000000000000037e102Initial program 89.1%
Simplified86.0%
associate-*r*85.9%
*-un-lft-identity85.9%
times-frac86.0%
associate-/l/86.0%
Applied egg-rr86.0%
/-rgt-identity86.0%
associate-*l/86.0%
*-commutative86.0%
times-frac86.1%
*-commutative86.1%
Simplified86.1%
associate-*r/86.0%
Applied egg-rr86.0%
associate-/l*86.1%
associate-*r*89.5%
associate-*l/89.5%
*-lft-identity89.5%
times-frac89.5%
metadata-eval89.5%
associate-*r/89.4%
associate-/r*92.8%
Simplified92.8%
if 5.60000000000000037e102 < t Initial program 65.1%
Simplified65.1%
add-cube-cbrt65.1%
pow365.1%
*-commutative65.1%
cbrt-prod65.1%
cbrt-div65.1%
rem-cbrt-cube75.7%
cbrt-prod89.2%
pow289.2%
Applied egg-rr89.2%
add-sqr-sqrt52.8%
pow252.8%
associate-+r+52.8%
metadata-eval52.8%
sqrt-prod52.8%
metadata-eval52.8%
associate-+r+52.8%
add-sqr-sqrt52.8%
hypot-1-def52.8%
unpow252.8%
hypot-1-def52.8%
Applied egg-rr52.8%
unpow252.8%
swap-sqr52.8%
rem-square-sqrt89.1%
unpow289.1%
Simplified89.1%
Applied egg-rr99.0%
div-inv99.0%
*-commutative99.0%
unpow-prod-down89.0%
pow389.1%
add-cube-cbrt89.1%
unpow-prod-down89.2%
pow389.2%
add-cube-cbrt89.2%
Applied egg-rr89.2%
associate-*r/89.2%
metadata-eval89.2%
*-commutative89.2%
associate-*l*89.2%
Simplified89.2%
Final simplification72.1%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 7.5e-87)
(*
(/ 2.0 (pow k 2.0))
(* (/ (cos k) (pow (sin k) 2.0)) (/ (pow l 2.0) t_m)))
(if (<= t_m 1.52e+137)
(*
(/ l (+ 2.0 (pow (/ k t_m) 2.0)))
(* (/ 2.0 (tan k)) (pow (/ (cbrt (/ l (sin k))) t_m) 3.0)))
(/
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 <= 7.5e-87) {
tmp = (2.0 / pow(k, 2.0)) * ((cos(k) / pow(sin(k), 2.0)) * (pow(l, 2.0) / t_m));
} else if (t_m <= 1.52e+137) {
tmp = (l / (2.0 + pow((k / t_m), 2.0))) * ((2.0 / tan(k)) * pow((cbrt((l / sin(k))) / t_m), 3.0));
} 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 <= 7.5e-87) {
tmp = (2.0 / Math.pow(k, 2.0)) * ((Math.cos(k) / Math.pow(Math.sin(k), 2.0)) * (Math.pow(l, 2.0) / t_m));
} else if (t_m <= 1.52e+137) {
tmp = (l / (2.0 + Math.pow((k / t_m), 2.0))) * ((2.0 / Math.tan(k)) * Math.pow((Math.cbrt((l / Math.sin(k))) / t_m), 3.0));
} 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 <= 7.5e-87) tmp = Float64(Float64(2.0 / (k ^ 2.0)) * Float64(Float64(cos(k) / (sin(k) ^ 2.0)) * Float64((l ^ 2.0) / t_m))); elseif (t_m <= 1.52e+137) tmp = Float64(Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(Float64(2.0 / tan(k)) * (Float64(cbrt(Float64(l / sin(k))) / t_m) ^ 3.0))); 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, 7.5e-87], N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.52e+137], N[(N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[Power[N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / t$95$m), $MachinePrecision], 3.0], $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 7.5 \cdot 10^{-87}:\\
\;\;\;\;\frac{2}{{k}^{2}} \cdot \left(\frac{\cos k}{{\sin k}^{2}} \cdot \frac{{\ell}^{2}}{t\_m}\right)\\
\mathbf{elif}\;t\_m \leq 1.52 \cdot 10^{+137}:\\
\;\;\;\;\frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}} \cdot \left(\frac{2}{\tan k} \cdot {\left(\frac{\sqrt[3]{\frac{\ell}{\sin k}}}{t\_m}\right)}^{3}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot k\right)}\\
\end{array}
\end{array}
if t < 7.5000000000000002e-87Initial program 51.0%
Simplified51.3%
Taylor expanded in k around inf 62.6%
associate-*r/62.6%
times-frac63.3%
*-commutative63.3%
*-commutative63.3%
times-frac65.5%
Simplified65.5%
if 7.5000000000000002e-87 < t < 1.52000000000000006e137Initial program 81.5%
Simplified79.1%
associate-*r*79.0%
*-un-lft-identity79.0%
times-frac79.1%
associate-/l/79.1%
Applied egg-rr79.1%
/-rgt-identity79.1%
associate-*l/79.2%
*-commutative79.2%
times-frac79.2%
*-commutative79.2%
Simplified79.2%
add-cube-cbrt79.0%
pow379.1%
associate-/r*79.1%
cbrt-div79.1%
unpow379.0%
add-cbrt-cube88.2%
Applied egg-rr88.2%
if 1.52000000000000006e137 < t Initial program 69.7%
Simplified69.7%
add-cube-cbrt69.7%
pow369.7%
*-commutative69.7%
cbrt-prod69.7%
cbrt-div69.7%
rem-cbrt-cube73.5%
cbrt-prod90.1%
pow290.1%
Applied egg-rr90.1%
Taylor expanded in k around 0 87.1%
*-commutative87.1%
Simplified87.1%
Final simplification71.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 3.2e-80)
(*
(/ 2.0 (pow k 2.0))
(* (/ (cos k) (pow (sin k) 2.0)) (/ (pow l 2.0) t_m)))
(if (<= t_m 5.6e+102)
(*
2.0
(/
(/ (* l (/ (/ l (sin k)) (pow t_m 3.0))) (+ 2.0 (pow (/ k t_m) 2.0)))
(tan k)))
(/
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 <= 3.2e-80) {
tmp = (2.0 / pow(k, 2.0)) * ((cos(k) / pow(sin(k), 2.0)) * (pow(l, 2.0) / t_m));
} else if (t_m <= 5.6e+102) {
tmp = 2.0 * (((l * ((l / sin(k)) / pow(t_m, 3.0))) / (2.0 + pow((k / t_m), 2.0))) / tan(k));
} 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 <= 3.2e-80) {
tmp = (2.0 / Math.pow(k, 2.0)) * ((Math.cos(k) / Math.pow(Math.sin(k), 2.0)) * (Math.pow(l, 2.0) / t_m));
} else if (t_m <= 5.6e+102) {
tmp = 2.0 * (((l * ((l / Math.sin(k)) / Math.pow(t_m, 3.0))) / (2.0 + Math.pow((k / t_m), 2.0))) / Math.tan(k));
} 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 <= 3.2e-80) tmp = Float64(Float64(2.0 / (k ^ 2.0)) * Float64(Float64(cos(k) / (sin(k) ^ 2.0)) * Float64((l ^ 2.0) / t_m))); elseif (t_m <= 5.6e+102) tmp = Float64(2.0 * Float64(Float64(Float64(l * Float64(Float64(l / sin(k)) / (t_m ^ 3.0))) / Float64(2.0 + (Float64(k / t_m) ^ 2.0))) / tan(k))); 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, 3.2e-80], N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $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[(l * N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Tan[k], $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 3.2 \cdot 10^{-80}:\\
\;\;\;\;\frac{2}{{k}^{2}} \cdot \left(\frac{\cos k}{{\sin k}^{2}} \cdot \frac{{\ell}^{2}}{t\_m}\right)\\
\mathbf{elif}\;t\_m \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;2 \cdot \frac{\frac{\ell \cdot \frac{\frac{\ell}{\sin k}}{{t\_m}^{3}}}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}}{\tan k}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot k\right)}\\
\end{array}
\end{array}
if t < 3.1999999999999999e-80Initial program 51.5%
Simplified51.8%
Taylor expanded in k around inf 63.0%
associate-*r/63.0%
times-frac63.7%
*-commutative63.7%
*-commutative63.7%
times-frac65.9%
Simplified65.9%
if 3.1999999999999999e-80 < t < 5.60000000000000037e102Initial program 89.1%
Simplified86.0%
associate-*r*85.9%
*-un-lft-identity85.9%
times-frac86.0%
associate-/l/86.0%
Applied egg-rr86.0%
/-rgt-identity86.0%
associate-*l/86.0%
*-commutative86.0%
times-frac86.1%
*-commutative86.1%
Simplified86.1%
associate-*r/86.0%
Applied egg-rr86.0%
associate-/l*86.1%
associate-*r*89.5%
associate-*l/89.5%
*-lft-identity89.5%
times-frac89.5%
metadata-eval89.5%
associate-*r/89.4%
associate-/r*92.8%
Simplified92.8%
if 5.60000000000000037e102 < t Initial program 65.1%
Simplified65.1%
add-cube-cbrt65.1%
pow365.1%
*-commutative65.1%
cbrt-prod65.1%
cbrt-div65.1%
rem-cbrt-cube75.7%
cbrt-prod89.2%
pow289.2%
Applied egg-rr89.2%
Taylor expanded in k around 0 86.3%
*-commutative86.3%
Simplified86.3%
Final simplification71.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.12e-79)
(* (/ 2.0 (tan k)) (/ (pow l 2.0) (* (pow k 2.0) (* t_m (sin k)))))
(if (<= t_m 5.6e+102)
(*
2.0
(/
(/ (* l (/ (/ l (sin k)) (pow t_m 3.0))) (+ 2.0 (pow (/ k t_m) 2.0)))
(tan k)))
(/
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 <= 1.12e-79) {
tmp = (2.0 / tan(k)) * (pow(l, 2.0) / (pow(k, 2.0) * (t_m * sin(k))));
} else if (t_m <= 5.6e+102) {
tmp = 2.0 * (((l * ((l / sin(k)) / pow(t_m, 3.0))) / (2.0 + pow((k / t_m), 2.0))) / tan(k));
} 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 <= 1.12e-79) {
tmp = (2.0 / Math.tan(k)) * (Math.pow(l, 2.0) / (Math.pow(k, 2.0) * (t_m * Math.sin(k))));
} else if (t_m <= 5.6e+102) {
tmp = 2.0 * (((l * ((l / Math.sin(k)) / Math.pow(t_m, 3.0))) / (2.0 + Math.pow((k / t_m), 2.0))) / Math.tan(k));
} 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 <= 1.12e-79) tmp = Float64(Float64(2.0 / tan(k)) * Float64((l ^ 2.0) / Float64((k ^ 2.0) * Float64(t_m * sin(k))))); elseif (t_m <= 5.6e+102) tmp = Float64(2.0 * Float64(Float64(Float64(l * Float64(Float64(l / sin(k)) / (t_m ^ 3.0))) / Float64(2.0 + (Float64(k / t_m) ^ 2.0))) / tan(k))); 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, 1.12e-79], N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.6e+102], N[(2.0 * N[(N[(N[(l * N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Tan[k], $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 1.12 \cdot 10^{-79}:\\
\;\;\;\;\frac{2}{\tan k} \cdot \frac{{\ell}^{2}}{{k}^{2} \cdot \left(t\_m \cdot \sin k\right)}\\
\mathbf{elif}\;t\_m \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;2 \cdot \frac{\frac{\ell \cdot \frac{\frac{\ell}{\sin k}}{{t\_m}^{3}}}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}}{\tan k}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot k\right)}\\
\end{array}
\end{array}
if t < 1.11999999999999996e-79Initial program 51.5%
Simplified51.8%
associate-*r*56.3%
*-un-lft-identity56.3%
times-frac56.2%
associate-/l/56.2%
Applied egg-rr56.2%
/-rgt-identity56.2%
associate-*l/56.3%
*-commutative56.3%
times-frac56.7%
*-commutative56.7%
Simplified56.7%
associate-*r/56.8%
Applied egg-rr56.8%
associate-/l*56.7%
associate-*r*56.3%
*-commutative56.3%
Simplified56.3%
Taylor expanded in t around 0 63.0%
if 1.11999999999999996e-79 < t < 5.60000000000000037e102Initial program 89.1%
Simplified86.0%
associate-*r*85.9%
*-un-lft-identity85.9%
times-frac86.0%
associate-/l/86.0%
Applied egg-rr86.0%
/-rgt-identity86.0%
associate-*l/86.0%
*-commutative86.0%
times-frac86.1%
*-commutative86.1%
Simplified86.1%
associate-*r/86.0%
Applied egg-rr86.0%
associate-/l*86.1%
associate-*r*89.5%
associate-*l/89.5%
*-lft-identity89.5%
times-frac89.5%
metadata-eval89.5%
associate-*r/89.4%
associate-/r*92.8%
Simplified92.8%
if 5.60000000000000037e102 < t Initial program 65.1%
Simplified65.1%
add-cube-cbrt65.1%
pow365.1%
*-commutative65.1%
cbrt-prod65.1%
cbrt-div65.1%
rem-cbrt-cube75.7%
cbrt-prod89.2%
pow289.2%
Applied egg-rr89.2%
Taylor expanded in k around 0 86.3%
*-commutative86.3%
Simplified86.3%
Final simplification69.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 2.1e-151)
(/ 2.0 (* (* 2.0 k) (pow (* (/ (pow t_m 1.5) l) (sqrt (sin k))) 2.0)))
(if (<= k 12.0)
(/
2.0
(pow (* (* t_m (pow (cbrt l) -2.0)) (cbrt (* 2.0 (pow k 2.0)))) 3.0))
(* (/ 2.0 (tan k)) (/ (pow l 2.0) (* (pow k 2.0) (* t_m (sin 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 (k <= 2.1e-151) {
tmp = 2.0 / ((2.0 * k) * pow(((pow(t_m, 1.5) / l) * sqrt(sin(k))), 2.0));
} else if (k <= 12.0) {
tmp = 2.0 / pow(((t_m * pow(cbrt(l), -2.0)) * cbrt((2.0 * pow(k, 2.0)))), 3.0);
} else {
tmp = (2.0 / tan(k)) * (pow(l, 2.0) / (pow(k, 2.0) * (t_m * sin(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 (k <= 2.1e-151) {
tmp = 2.0 / ((2.0 * k) * Math.pow(((Math.pow(t_m, 1.5) / l) * Math.sqrt(Math.sin(k))), 2.0));
} else if (k <= 12.0) {
tmp = 2.0 / Math.pow(((t_m * Math.pow(Math.cbrt(l), -2.0)) * Math.cbrt((2.0 * Math.pow(k, 2.0)))), 3.0);
} else {
tmp = (2.0 / Math.tan(k)) * (Math.pow(l, 2.0) / (Math.pow(k, 2.0) * (t_m * Math.sin(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 (k <= 2.1e-151) tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(Float64((t_m ^ 1.5) / l) * sqrt(sin(k))) ^ 2.0))); elseif (k <= 12.0) tmp = Float64(2.0 / (Float64(Float64(t_m * (cbrt(l) ^ -2.0)) * cbrt(Float64(2.0 * (k ^ 2.0)))) ^ 3.0)); else tmp = Float64(Float64(2.0 / tan(k)) * Float64((l ^ 2.0) / Float64((k ^ 2.0) * Float64(t_m * sin(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[k, 2.1e-151], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Sin[k], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 12.0], N[(2.0 / N[Power[N[(N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Sin[k], $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}\;k \leq 2.1 \cdot 10^{-151}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2}}\\
\mathbf{elif}\;k \leq 12:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \sqrt[3]{2 \cdot {k}^{2}}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\tan k} \cdot \frac{{\ell}^{2}}{{k}^{2} \cdot \left(t\_m \cdot \sin k\right)}\\
\end{array}
\end{array}
if k < 2.0999999999999999e-151Initial program 59.8%
Simplified59.8%
add-sqr-sqrt28.5%
pow228.5%
*-commutative28.5%
sqrt-prod10.3%
sqrt-div10.3%
sqrt-pow110.9%
metadata-eval10.9%
sqrt-prod9.0%
add-sqr-sqrt12.7%
Applied egg-rr12.7%
*-commutative12.7%
Simplified12.7%
Taylor expanded in k around 0 11.6%
*-commutative74.8%
Simplified11.6%
if 2.0999999999999999e-151 < k < 12Initial program 58.4%
Simplified59.1%
Taylor expanded in k around 0 62.9%
add-cube-cbrt62.7%
pow362.7%
associate-/l/62.0%
cbrt-div62.0%
unpow362.0%
add-cbrt-cube68.7%
cbrt-prod81.9%
unpow281.9%
div-inv81.9%
unpow-prod-down61.9%
pow-flip61.9%
metadata-eval61.9%
Applied egg-rr61.9%
cube-prod81.9%
Simplified81.9%
add-cube-cbrt82.0%
pow382.1%
cbrt-prod82.0%
unpow382.0%
add-cbrt-cube91.4%
Applied egg-rr91.4%
if 12 < k Initial program 50.9%
Simplified49.3%
associate-*r*52.5%
*-un-lft-identity52.5%
times-frac55.8%
associate-/l/55.8%
Applied egg-rr55.8%
/-rgt-identity55.8%
associate-*l/55.8%
*-commutative55.8%
times-frac55.8%
*-commutative55.8%
Simplified55.8%
associate-*r/52.5%
Applied egg-rr52.5%
associate-/l*55.8%
associate-*r*55.8%
*-commutative55.8%
Simplified55.8%
Taylor expanded in t around 0 74.3%
Final simplification35.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 2.15e-151)
(/ 2.0 (* (* 2.0 k) (pow (* (/ (pow t_m 1.5) l) (sqrt (sin k))) 2.0)))
(if (<= k 0.00185)
(/
2.0
(pow (* t_m (* (pow (cbrt l) -2.0) (cbrt (* 2.0 (pow k 2.0))))) 3.0))
(* (/ 2.0 (tan k)) (/ (pow l 2.0) (* (pow k 2.0) (* t_m (sin 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 (k <= 2.15e-151) {
tmp = 2.0 / ((2.0 * k) * pow(((pow(t_m, 1.5) / l) * sqrt(sin(k))), 2.0));
} else if (k <= 0.00185) {
tmp = 2.0 / pow((t_m * (pow(cbrt(l), -2.0) * cbrt((2.0 * pow(k, 2.0))))), 3.0);
} else {
tmp = (2.0 / tan(k)) * (pow(l, 2.0) / (pow(k, 2.0) * (t_m * sin(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 (k <= 2.15e-151) {
tmp = 2.0 / ((2.0 * k) * Math.pow(((Math.pow(t_m, 1.5) / l) * Math.sqrt(Math.sin(k))), 2.0));
} else if (k <= 0.00185) {
tmp = 2.0 / Math.pow((t_m * (Math.pow(Math.cbrt(l), -2.0) * Math.cbrt((2.0 * Math.pow(k, 2.0))))), 3.0);
} else {
tmp = (2.0 / Math.tan(k)) * (Math.pow(l, 2.0) / (Math.pow(k, 2.0) * (t_m * Math.sin(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 (k <= 2.15e-151) tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(Float64((t_m ^ 1.5) / l) * sqrt(sin(k))) ^ 2.0))); elseif (k <= 0.00185) tmp = Float64(2.0 / (Float64(t_m * Float64((cbrt(l) ^ -2.0) * cbrt(Float64(2.0 * (k ^ 2.0))))) ^ 3.0)); else tmp = Float64(Float64(2.0 / tan(k)) * Float64((l ^ 2.0) / Float64((k ^ 2.0) * Float64(t_m * sin(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[k, 2.15e-151], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Sin[k], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 0.00185], N[(2.0 / N[Power[N[(t$95$m * N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * N[Power[N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Sin[k], $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}\;k \leq 2.15 \cdot 10^{-151}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2}}\\
\mathbf{elif}\;k \leq 0.00185:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot \left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \sqrt[3]{2 \cdot {k}^{2}}\right)\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\tan k} \cdot \frac{{\ell}^{2}}{{k}^{2} \cdot \left(t\_m \cdot \sin k\right)}\\
\end{array}
\end{array}
if k < 2.15000000000000009e-151Initial program 59.8%
Simplified59.8%
add-sqr-sqrt28.5%
pow228.5%
*-commutative28.5%
sqrt-prod10.3%
sqrt-div10.3%
sqrt-pow110.9%
metadata-eval10.9%
sqrt-prod9.0%
add-sqr-sqrt12.7%
Applied egg-rr12.7%
*-commutative12.7%
Simplified12.7%
Taylor expanded in k around 0 11.6%
*-commutative74.8%
Simplified11.6%
if 2.15000000000000009e-151 < k < 0.0018500000000000001Initial program 58.4%
Simplified59.1%
Taylor expanded in k around 0 62.9%
add-cube-cbrt62.7%
pow362.7%
cbrt-prod62.7%
associate-/l/62.0%
cbrt-div62.0%
unpow362.0%
add-cbrt-cube71.9%
cbrt-prod91.3%
unpow291.3%
div-inv91.3%
pow-flip91.4%
metadata-eval91.4%
Applied egg-rr91.4%
associate-*l*91.4%
Simplified91.4%
if 0.0018500000000000001 < k Initial program 50.9%
Simplified49.3%
associate-*r*52.5%
*-un-lft-identity52.5%
times-frac55.8%
associate-/l/55.8%
Applied egg-rr55.8%
/-rgt-identity55.8%
associate-*l/55.8%
*-commutative55.8%
times-frac55.8%
*-commutative55.8%
Simplified55.8%
associate-*r/52.5%
Applied egg-rr52.5%
associate-/l*55.8%
associate-*r*55.8%
*-commutative55.8%
Simplified55.8%
Taylor expanded in t around 0 74.3%
Final simplification35.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ 2.0 (tan k))))
(*
t_s
(if (<= k 1.02e-162)
(* t_2 (* (/ l (+ 2.0 (pow (/ k t_m) 2.0))) (/ (/ l k) (pow t_m 3.0))))
(if (<= k 0.018)
(/ 2.0 (* (* 2.0 (pow k 2.0)) (pow (/ t_m (pow (cbrt l) 2.0)) 3.0)))
(* t_2 (/ (pow l 2.0) (* (pow k 2.0) (* t_m (sin k))))))))))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 = 2.0 / tan(k);
double tmp;
if (k <= 1.02e-162) {
tmp = t_2 * ((l / (2.0 + pow((k / t_m), 2.0))) * ((l / k) / pow(t_m, 3.0)));
} else if (k <= 0.018) {
tmp = 2.0 / ((2.0 * pow(k, 2.0)) * pow((t_m / pow(cbrt(l), 2.0)), 3.0));
} else {
tmp = t_2 * (pow(l, 2.0) / (pow(k, 2.0) * (t_m * sin(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 t_2 = 2.0 / Math.tan(k);
double tmp;
if (k <= 1.02e-162) {
tmp = t_2 * ((l / (2.0 + Math.pow((k / t_m), 2.0))) * ((l / k) / Math.pow(t_m, 3.0)));
} else if (k <= 0.018) {
tmp = 2.0 / ((2.0 * Math.pow(k, 2.0)) * Math.pow((t_m / Math.pow(Math.cbrt(l), 2.0)), 3.0));
} else {
tmp = t_2 * (Math.pow(l, 2.0) / (Math.pow(k, 2.0) * (t_m * Math.sin(k))));
}
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(2.0 / tan(k)) tmp = 0.0 if (k <= 1.02e-162) tmp = Float64(t_2 * Float64(Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(Float64(l / k) / (t_m ^ 3.0)))); elseif (k <= 0.018) tmp = Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * (Float64(t_m / (cbrt(l) ^ 2.0)) ^ 3.0))); else tmp = Float64(t_2 * Float64((l ^ 2.0) / Float64((k ^ 2.0) * Float64(t_m * sin(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_] := Block[{t$95$2 = N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 1.02e-162], N[(t$95$2 * N[(N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 0.018], N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Sin[k], $MachinePrecision]), $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 := \frac{2}{\tan k}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.02 \cdot 10^{-162}:\\
\;\;\;\;t\_2 \cdot \left(\frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}} \cdot \frac{\frac{\ell}{k}}{{t\_m}^{3}}\right)\\
\mathbf{elif}\;k \leq 0.018:\\
\;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot {\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \frac{{\ell}^{2}}{{k}^{2} \cdot \left(t\_m \cdot \sin k\right)}\\
\end{array}
\end{array}
\end{array}
if k < 1.01999999999999998e-162Initial program 59.2%
Simplified59.6%
associate-*r*63.2%
*-un-lft-identity63.2%
times-frac62.5%
associate-/l/62.5%
Applied egg-rr62.5%
/-rgt-identity62.5%
associate-*l/62.6%
*-commutative62.6%
times-frac63.2%
*-commutative63.2%
Simplified63.2%
associate-*r/63.8%
Applied egg-rr63.8%
associate-/l*63.2%
associate-*r*64.3%
*-commutative64.3%
Simplified64.3%
Taylor expanded in k around 0 59.8%
associate-/r*61.9%
Simplified61.9%
if 1.01999999999999998e-162 < k < 0.0179999999999999986Initial program 61.6%
Simplified65.3%
Taylor expanded in k around 0 68.5%
add-cube-cbrt68.4%
pow368.4%
associate-/l/64.7%
cbrt-div64.7%
unpow364.7%
add-cbrt-cube70.5%
cbrt-prod84.6%
unpow284.6%
div-inv84.6%
unpow-prod-down64.7%
pow-flip64.7%
metadata-eval64.7%
Applied egg-rr64.7%
cube-prod84.6%
Simplified84.6%
metadata-eval84.6%
pow-flip84.6%
div-inv84.6%
Applied egg-rr84.6%
if 0.0179999999999999986 < k Initial program 50.9%
Simplified49.3%
associate-*r*52.5%
*-un-lft-identity52.5%
times-frac55.8%
associate-/l/55.8%
Applied egg-rr55.8%
/-rgt-identity55.8%
associate-*l/55.8%
*-commutative55.8%
times-frac55.8%
*-commutative55.8%
Simplified55.8%
associate-*r/52.5%
Applied egg-rr52.5%
associate-/l*55.8%
associate-*r*55.8%
*-commutative55.8%
Simplified55.8%
Taylor expanded in t around 0 74.3%
Final simplification67.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.2e-114)
(/ 1.0 (* (/ t_m 2.0) (/ (pow k 4.0) (pow l 2.0))))
(if (<= t_m 1.05e+101)
(*
(/ 2.0 (tan k))
(* (/ l (+ 2.0 (pow (/ k t_m) 2.0))) (/ (/ l k) (pow t_m 3.0))))
(/ 2.0 (* (* 2.0 (pow k 2.0)) (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.2e-114) {
tmp = 1.0 / ((t_m / 2.0) * (pow(k, 4.0) / pow(l, 2.0)));
} else if (t_m <= 1.05e+101) {
tmp = (2.0 / tan(k)) * ((l / (2.0 + pow((k / t_m), 2.0))) * ((l / k) / pow(t_m, 3.0)));
} else {
tmp = 2.0 / ((2.0 * pow(k, 2.0)) * 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.2e-114) {
tmp = 1.0 / ((t_m / 2.0) * (Math.pow(k, 4.0) / Math.pow(l, 2.0)));
} else if (t_m <= 1.05e+101) {
tmp = (2.0 / Math.tan(k)) * ((l / (2.0 + Math.pow((k / t_m), 2.0))) * ((l / k) / Math.pow(t_m, 3.0)));
} else {
tmp = 2.0 / ((2.0 * Math.pow(k, 2.0)) * 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.2e-114) tmp = Float64(1.0 / Float64(Float64(t_m / 2.0) * Float64((k ^ 4.0) / (l ^ 2.0)))); elseif (t_m <= 1.05e+101) tmp = Float64(Float64(2.0 / tan(k)) * Float64(Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(Float64(l / k) / (t_m ^ 3.0)))); else tmp = Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * (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.2e-114], N[(1.0 / N[(N[(t$95$m / 2.0), $MachinePrecision] * N[(N[Power[k, 4.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.05e+101], N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $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]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.2 \cdot 10^{-114}:\\
\;\;\;\;\frac{1}{\frac{t\_m}{2} \cdot \frac{{k}^{4}}{{\ell}^{2}}}\\
\mathbf{elif}\;t\_m \leq 1.05 \cdot 10^{+101}:\\
\;\;\;\;\frac{2}{\tan k} \cdot \left(\frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}} \cdot \frac{\frac{\ell}{k}}{{t\_m}^{3}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot {\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}}\\
\end{array}
\end{array}
if t < 1.2000000000000001e-114Initial program 50.0%
Simplified50.2%
Taylor expanded in k around inf 61.4%
Taylor expanded in k around 0 52.6%
associate-*r/52.6%
*-commutative52.6%
Simplified52.6%
clear-num52.6%
inv-pow52.6%
Applied egg-rr52.6%
unpow-152.6%
times-frac53.7%
Simplified53.7%
if 1.2000000000000001e-114 < t < 1.05e101Initial program 88.8%
Simplified86.4%
associate-*r*86.3%
*-un-lft-identity86.3%
times-frac86.4%
associate-/l/86.4%
Applied egg-rr86.4%
/-rgt-identity86.4%
associate-*l/86.4%
*-commutative86.4%
times-frac86.5%
*-commutative86.5%
Simplified86.5%
associate-*r/86.4%
Applied egg-rr86.4%
associate-/l*86.5%
associate-*r*89.2%
*-commutative89.2%
Simplified89.2%
Taylor expanded in k around 0 71.5%
associate-/r*74.1%
Simplified74.1%
if 1.05e101 < t Initial program 65.1%
Simplified56.4%
Taylor expanded in k around 0 56.4%
add-cube-cbrt56.4%
pow356.4%
associate-/l/50.4%
cbrt-div50.4%
unpow350.4%
add-cbrt-cube58.3%
cbrt-prod69.2%
unpow269.2%
div-inv69.2%
unpow-prod-down50.4%
pow-flip50.4%
metadata-eval50.4%
Applied egg-rr50.4%
cube-prod69.2%
Simplified69.2%
metadata-eval69.2%
pow-flip69.2%
div-inv69.2%
Applied egg-rr69.2%
Final simplification58.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.2e-114)
(/ 1.0 (* (/ t_m 2.0) (/ (pow k 4.0) (pow l 2.0))))
(if (<= t_m 1.05e+101)
(*
(/ 2.0 (tan k))
(* (/ l (+ 2.0 (pow (/ k t_m) 2.0))) (/ (/ l k) (pow t_m 3.0))))
(/ 2.0 (* (pow (* t_m (pow (cbrt l) -2.0)) 3.0) (* 2.0 (pow k 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.2e-114) {
tmp = 1.0 / ((t_m / 2.0) * (pow(k, 4.0) / pow(l, 2.0)));
} else if (t_m <= 1.05e+101) {
tmp = (2.0 / tan(k)) * ((l / (2.0 + pow((k / t_m), 2.0))) * ((l / k) / pow(t_m, 3.0)));
} else {
tmp = 2.0 / (pow((t_m * pow(cbrt(l), -2.0)), 3.0) * (2.0 * pow(k, 2.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.2e-114) {
tmp = 1.0 / ((t_m / 2.0) * (Math.pow(k, 4.0) / Math.pow(l, 2.0)));
} else if (t_m <= 1.05e+101) {
tmp = (2.0 / Math.tan(k)) * ((l / (2.0 + Math.pow((k / t_m), 2.0))) * ((l / k) / Math.pow(t_m, 3.0)));
} else {
tmp = 2.0 / (Math.pow((t_m * Math.pow(Math.cbrt(l), -2.0)), 3.0) * (2.0 * Math.pow(k, 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.2e-114) tmp = Float64(1.0 / Float64(Float64(t_m / 2.0) * Float64((k ^ 4.0) / (l ^ 2.0)))); elseif (t_m <= 1.05e+101) tmp = Float64(Float64(2.0 / tan(k)) * Float64(Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(Float64(l / k) / (t_m ^ 3.0)))); else tmp = Float64(2.0 / Float64((Float64(t_m * (cbrt(l) ^ -2.0)) ^ 3.0) * Float64(2.0 * (k ^ 2.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.2e-114], N[(1.0 / N[(N[(t$95$m / 2.0), $MachinePrecision] * N[(N[Power[k, 4.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.05e+101], N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * N[Power[k, 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.2 \cdot 10^{-114}:\\
\;\;\;\;\frac{1}{\frac{t\_m}{2} \cdot \frac{{k}^{4}}{{\ell}^{2}}}\\
\mathbf{elif}\;t\_m \leq 1.05 \cdot 10^{+101}:\\
\;\;\;\;\frac{2}{\tan k} \cdot \left(\frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}} \cdot \frac{\frac{\ell}{k}}{{t\_m}^{3}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3} \cdot \left(2 \cdot {k}^{2}\right)}\\
\end{array}
\end{array}
if t < 1.2000000000000001e-114Initial program 50.0%
Simplified50.2%
Taylor expanded in k around inf 61.4%
Taylor expanded in k around 0 52.6%
associate-*r/52.6%
*-commutative52.6%
Simplified52.6%
clear-num52.6%
inv-pow52.6%
Applied egg-rr52.6%
unpow-152.6%
times-frac53.7%
Simplified53.7%
if 1.2000000000000001e-114 < t < 1.05e101Initial program 88.8%
Simplified86.4%
associate-*r*86.3%
*-un-lft-identity86.3%
times-frac86.4%
associate-/l/86.4%
Applied egg-rr86.4%
/-rgt-identity86.4%
associate-*l/86.4%
*-commutative86.4%
times-frac86.5%
*-commutative86.5%
Simplified86.5%
associate-*r/86.4%
Applied egg-rr86.4%
associate-/l*86.5%
associate-*r*89.2%
*-commutative89.2%
Simplified89.2%
Taylor expanded in k around 0 71.5%
associate-/r*74.1%
Simplified74.1%
if 1.05e101 < t Initial program 65.1%
Simplified56.4%
Taylor expanded in k around 0 56.4%
add-cube-cbrt56.4%
pow356.4%
associate-/l/50.4%
cbrt-div50.4%
unpow350.4%
add-cbrt-cube58.3%
cbrt-prod69.2%
unpow269.2%
div-inv69.2%
unpow-prod-down50.4%
pow-flip50.4%
metadata-eval50.4%
Applied egg-rr50.4%
cube-prod69.2%
Simplified69.2%
Final simplification58.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 0.7)
(/ 2.0 (* (* 2.0 k) (pow (* (/ (pow t_m 1.5) l) (sqrt (sin k))) 2.0)))
(* (/ 2.0 (tan k)) (/ (pow l 2.0) (* (pow k 2.0) (* t_m (sin 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 (k <= 0.7) {
tmp = 2.0 / ((2.0 * k) * pow(((pow(t_m, 1.5) / l) * sqrt(sin(k))), 2.0));
} else {
tmp = (2.0 / tan(k)) * (pow(l, 2.0) / (pow(k, 2.0) * (t_m * sin(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 (k <= 0.7d0) then
tmp = 2.0d0 / ((2.0d0 * k) * ((((t_m ** 1.5d0) / l) * sqrt(sin(k))) ** 2.0d0))
else
tmp = (2.0d0 / tan(k)) * ((l ** 2.0d0) / ((k ** 2.0d0) * (t_m * sin(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 (k <= 0.7) {
tmp = 2.0 / ((2.0 * k) * Math.pow(((Math.pow(t_m, 1.5) / l) * Math.sqrt(Math.sin(k))), 2.0));
} else {
tmp = (2.0 / Math.tan(k)) * (Math.pow(l, 2.0) / (Math.pow(k, 2.0) * (t_m * Math.sin(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 k <= 0.7: tmp = 2.0 / ((2.0 * k) * math.pow(((math.pow(t_m, 1.5) / l) * math.sqrt(math.sin(k))), 2.0)) else: tmp = (2.0 / math.tan(k)) * (math.pow(l, 2.0) / (math.pow(k, 2.0) * (t_m * math.sin(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 (k <= 0.7) tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(Float64((t_m ^ 1.5) / l) * sqrt(sin(k))) ^ 2.0))); else tmp = Float64(Float64(2.0 / tan(k)) * Float64((l ^ 2.0) / Float64((k ^ 2.0) * Float64(t_m * sin(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 (k <= 0.7) tmp = 2.0 / ((2.0 * k) * ((((t_m ^ 1.5) / l) * sqrt(sin(k))) ^ 2.0)); else tmp = (2.0 / tan(k)) * ((l ^ 2.0) / ((k ^ 2.0) * (t_m * sin(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[k, 0.7], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Sin[k], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Sin[k], $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}\;k \leq 0.7:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\tan k} \cdot \frac{{\ell}^{2}}{{k}^{2} \cdot \left(t\_m \cdot \sin k\right)}\\
\end{array}
\end{array}
if k < 0.69999999999999996Initial program 59.6%
Simplified59.6%
add-sqr-sqrt29.6%
pow229.6%
*-commutative29.6%
sqrt-prod14.0%
sqrt-div14.0%
sqrt-pow115.5%
metadata-eval15.5%
sqrt-prod9.8%
add-sqr-sqrt17.5%
Applied egg-rr17.5%
*-commutative17.5%
Simplified17.5%
Taylor expanded in k around 0 16.1%
*-commutative76.3%
Simplified16.1%
if 0.69999999999999996 < k Initial program 50.9%
Simplified49.3%
associate-*r*52.5%
*-un-lft-identity52.5%
times-frac55.8%
associate-/l/55.8%
Applied egg-rr55.8%
/-rgt-identity55.8%
associate-*l/55.8%
*-commutative55.8%
times-frac55.8%
*-commutative55.8%
Simplified55.8%
associate-*r/52.5%
Applied egg-rr52.5%
associate-/l*55.8%
associate-*r*55.8%
*-commutative55.8%
Simplified55.8%
Taylor expanded in t around 0 74.3%
Final simplification30.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.2e-114)
(/ 1.0 (* (/ t_m 2.0) (/ (pow k 4.0) (pow l 2.0))))
(*
(/ 2.0 (tan k))
(* (/ l (+ 2.0 (pow (/ k t_m) 2.0))) (/ (/ l k) (pow t_m 3.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.2e-114) {
tmp = 1.0 / ((t_m / 2.0) * (pow(k, 4.0) / pow(l, 2.0)));
} else {
tmp = (2.0 / tan(k)) * ((l / (2.0 + pow((k / t_m), 2.0))) * ((l / k) / pow(t_m, 3.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1.2d-114) then
tmp = 1.0d0 / ((t_m / 2.0d0) * ((k ** 4.0d0) / (l ** 2.0d0)))
else
tmp = (2.0d0 / tan(k)) * ((l / (2.0d0 + ((k / t_m) ** 2.0d0))) * ((l / k) / (t_m ** 3.0d0)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.2e-114) {
tmp = 1.0 / ((t_m / 2.0) * (Math.pow(k, 4.0) / Math.pow(l, 2.0)));
} else {
tmp = (2.0 / Math.tan(k)) * ((l / (2.0 + Math.pow((k / t_m), 2.0))) * ((l / k) / Math.pow(t_m, 3.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 1.2e-114: tmp = 1.0 / ((t_m / 2.0) * (math.pow(k, 4.0) / math.pow(l, 2.0))) else: tmp = (2.0 / math.tan(k)) * ((l / (2.0 + math.pow((k / t_m), 2.0))) * ((l / k) / math.pow(t_m, 3.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.2e-114) tmp = Float64(1.0 / Float64(Float64(t_m / 2.0) * Float64((k ^ 4.0) / (l ^ 2.0)))); else tmp = Float64(Float64(2.0 / tan(k)) * Float64(Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(Float64(l / k) / (t_m ^ 3.0)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 1.2e-114) tmp = 1.0 / ((t_m / 2.0) * ((k ^ 4.0) / (l ^ 2.0))); else tmp = (2.0 / tan(k)) * ((l / (2.0 + ((k / t_m) ^ 2.0))) * ((l / k) / (t_m ^ 3.0))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.2e-114], N[(1.0 / N[(N[(t$95$m / 2.0), $MachinePrecision] * N[(N[Power[k, 4.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.2 \cdot 10^{-114}:\\
\;\;\;\;\frac{1}{\frac{t\_m}{2} \cdot \frac{{k}^{4}}{{\ell}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\tan k} \cdot \left(\frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}} \cdot \frac{\frac{\ell}{k}}{{t\_m}^{3}}\right)\\
\end{array}
\end{array}
if t < 1.2000000000000001e-114Initial program 50.0%
Simplified50.2%
Taylor expanded in k around inf 61.4%
Taylor expanded in k around 0 52.6%
associate-*r/52.6%
*-commutative52.6%
Simplified52.6%
clear-num52.6%
inv-pow52.6%
Applied egg-rr52.6%
unpow-152.6%
times-frac53.7%
Simplified53.7%
if 1.2000000000000001e-114 < t Initial program 77.0%
Simplified75.7%
associate-*r*78.8%
*-un-lft-identity78.8%
times-frac78.8%
associate-/l/78.8%
Applied egg-rr78.8%
/-rgt-identity78.8%
associate-*l/78.8%
*-commutative78.8%
times-frac78.8%
*-commutative78.8%
Simplified78.8%
associate-*r/78.8%
Applied egg-rr78.8%
associate-/l*78.8%
associate-*r*80.2%
*-commutative80.2%
Simplified80.2%
Taylor expanded in k around 0 71.4%
associate-/r*72.6%
Simplified72.6%
Final simplification59.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 2.3e-14)
(* 2.0 (/ (* (cos k) (pow l 2.0)) (* t_m (pow k 4.0))))
(*
(/ l (+ 2.0 (pow (/ k t_m) 2.0)))
(* (/ 2.0 k) (/ l (* (sin k) (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 <= 2.3e-14) {
tmp = 2.0 * ((cos(k) * pow(l, 2.0)) / (t_m * pow(k, 4.0)));
} else {
tmp = (l / (2.0 + pow((k / t_m), 2.0))) * ((2.0 / k) * (l / (sin(k) * 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 <= 2.3d-14) then
tmp = 2.0d0 * ((cos(k) * (l ** 2.0d0)) / (t_m * (k ** 4.0d0)))
else
tmp = (l / (2.0d0 + ((k / t_m) ** 2.0d0))) * ((2.0d0 / k) * (l / (sin(k) * (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 <= 2.3e-14) {
tmp = 2.0 * ((Math.cos(k) * Math.pow(l, 2.0)) / (t_m * Math.pow(k, 4.0)));
} else {
tmp = (l / (2.0 + Math.pow((k / t_m), 2.0))) * ((2.0 / k) * (l / (Math.sin(k) * 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 <= 2.3e-14: tmp = 2.0 * ((math.cos(k) * math.pow(l, 2.0)) / (t_m * math.pow(k, 4.0))) else: tmp = (l / (2.0 + math.pow((k / t_m), 2.0))) * ((2.0 / k) * (l / (math.sin(k) * 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 <= 2.3e-14) tmp = Float64(2.0 * Float64(Float64(cos(k) * (l ^ 2.0)) / Float64(t_m * (k ^ 4.0)))); else tmp = Float64(Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(Float64(2.0 / k) * Float64(l / Float64(sin(k) * (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 <= 2.3e-14) tmp = 2.0 * ((cos(k) * (l ^ 2.0)) / (t_m * (k ^ 4.0))); else tmp = (l / (2.0 + ((k / t_m) ^ 2.0))) * ((2.0 / k) * (l / (sin(k) * (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, 2.3e-14], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 / k), $MachinePrecision] * N[(l / N[(N[Sin[k], $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 2.3 \cdot 10^{-14}:\\
\;\;\;\;2 \cdot \frac{\cos k \cdot {\ell}^{2}}{t\_m \cdot {k}^{4}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}} \cdot \left(\frac{2}{k} \cdot \frac{\ell}{\sin k \cdot {t\_m}^{3}}\right)\\
\end{array}
\end{array}
if t < 2.29999999999999998e-14Initial program 52.5%
Simplified52.3%
Taylor expanded in k around inf 63.0%
Taylor expanded in k around 0 54.6%
if 2.29999999999999998e-14 < t Initial program 75.7%
Simplified75.8%
associate-*r*79.6%
*-un-lft-identity79.6%
times-frac79.6%
associate-/l/79.6%
Applied egg-rr79.6%
/-rgt-identity79.6%
associate-*l/79.7%
*-commutative79.7%
times-frac79.7%
*-commutative79.7%
Simplified79.7%
Taylor expanded in k around 0 71.4%
Final simplification58.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 2.3e-14)
(* 2.0 (/ (* (cos k) (pow l 2.0)) (* t_m (pow k 4.0))))
(* (/ 2.0 (tan k)) (* 0.5 (/ (pow l 2.0) (* k (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 <= 2.3e-14) {
tmp = 2.0 * ((cos(k) * pow(l, 2.0)) / (t_m * pow(k, 4.0)));
} else {
tmp = (2.0 / tan(k)) * (0.5 * (pow(l, 2.0) / (k * 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 <= 2.3d-14) then
tmp = 2.0d0 * ((cos(k) * (l ** 2.0d0)) / (t_m * (k ** 4.0d0)))
else
tmp = (2.0d0 / tan(k)) * (0.5d0 * ((l ** 2.0d0) / (k * (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 <= 2.3e-14) {
tmp = 2.0 * ((Math.cos(k) * Math.pow(l, 2.0)) / (t_m * Math.pow(k, 4.0)));
} else {
tmp = (2.0 / Math.tan(k)) * (0.5 * (Math.pow(l, 2.0) / (k * 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 <= 2.3e-14: tmp = 2.0 * ((math.cos(k) * math.pow(l, 2.0)) / (t_m * math.pow(k, 4.0))) else: tmp = (2.0 / math.tan(k)) * (0.5 * (math.pow(l, 2.0) / (k * 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 <= 2.3e-14) tmp = Float64(2.0 * Float64(Float64(cos(k) * (l ^ 2.0)) / Float64(t_m * (k ^ 4.0)))); else tmp = Float64(Float64(2.0 / tan(k)) * Float64(0.5 * Float64((l ^ 2.0) / Float64(k * (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 <= 2.3e-14) tmp = 2.0 * ((cos(k) * (l ^ 2.0)) / (t_m * (k ^ 4.0))); else tmp = (2.0 / tan(k)) * (0.5 * ((l ^ 2.0) / (k * (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, 2.3e-14], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(0.5 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(k * 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 2.3 \cdot 10^{-14}:\\
\;\;\;\;2 \cdot \frac{\cos k \cdot {\ell}^{2}}{t\_m \cdot {k}^{4}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\tan k} \cdot \left(0.5 \cdot \frac{{\ell}^{2}}{k \cdot {t\_m}^{3}}\right)\\
\end{array}
\end{array}
if t < 2.29999999999999998e-14Initial program 52.5%
Simplified52.3%
Taylor expanded in k around inf 63.0%
Taylor expanded in k around 0 54.6%
if 2.29999999999999998e-14 < t Initial program 75.7%
Simplified75.8%
associate-*r*79.6%
*-un-lft-identity79.6%
times-frac79.6%
associate-/l/79.6%
Applied egg-rr79.6%
/-rgt-identity79.6%
associate-*l/79.7%
*-commutative79.7%
times-frac79.7%
*-commutative79.7%
Simplified79.7%
associate-*r/79.7%
Applied egg-rr79.7%
associate-/l*79.7%
associate-*r*81.4%
*-commutative81.4%
Simplified81.4%
Taylor expanded in k around 0 70.9%
Final simplification58.2%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 2.3e-14)
(* 2.0 (/ (* (cos k) (pow l 2.0)) (* t_m (pow k 4.0))))
(/
(* (/ (/ 2.0 k) (* k (pow t_m 3.0))) (* l l))
(+ 2.0 (pow (/ k t_m) 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-14) {
tmp = 2.0 * ((cos(k) * pow(l, 2.0)) / (t_m * pow(k, 4.0)));
} else {
tmp = (((2.0 / k) / (k * pow(t_m, 3.0))) * (l * l)) / (2.0 + pow((k / t_m), 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-14) then
tmp = 2.0d0 * ((cos(k) * (l ** 2.0d0)) / (t_m * (k ** 4.0d0)))
else
tmp = (((2.0d0 / k) / (k * (t_m ** 3.0d0))) * (l * l)) / (2.0d0 + ((k / t_m) ** 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-14) {
tmp = 2.0 * ((Math.cos(k) * Math.pow(l, 2.0)) / (t_m * Math.pow(k, 4.0)));
} else {
tmp = (((2.0 / k) / (k * Math.pow(t_m, 3.0))) * (l * l)) / (2.0 + Math.pow((k / t_m), 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-14: tmp = 2.0 * ((math.cos(k) * math.pow(l, 2.0)) / (t_m * math.pow(k, 4.0))) else: tmp = (((2.0 / k) / (k * math.pow(t_m, 3.0))) * (l * l)) / (2.0 + math.pow((k / t_m), 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-14) tmp = Float64(2.0 * Float64(Float64(cos(k) * (l ^ 2.0)) / Float64(t_m * (k ^ 4.0)))); else tmp = Float64(Float64(Float64(Float64(2.0 / k) / Float64(k * (t_m ^ 3.0))) * Float64(l * l)) / Float64(2.0 + (Float64(k / t_m) ^ 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-14) tmp = 2.0 * ((cos(k) * (l ^ 2.0)) / (t_m * (k ^ 4.0))); else tmp = (((2.0 / k) / (k * (t_m ^ 3.0))) * (l * l)) / (2.0 + ((k / t_m) ^ 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-14], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(2.0 / k), $MachinePrecision] / N[(k * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $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.3 \cdot 10^{-14}:\\
\;\;\;\;2 \cdot \frac{\cos k \cdot {\ell}^{2}}{t\_m \cdot {k}^{4}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{2}{k}}{k \cdot {t\_m}^{3}} \cdot \left(\ell \cdot \ell\right)}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\end{array}
\end{array}
if t < 2.29999999999999998e-14Initial program 52.5%
Simplified52.3%
Taylor expanded in k around inf 63.0%
Taylor expanded in k around 0 54.6%
if 2.29999999999999998e-14 < t Initial program 75.7%
Simplified75.8%
Taylor expanded in k around 0 69.3%
Taylor expanded in k around 0 69.0%
Final simplification57.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 8e-150)
(/ 1.0 (* (/ t_m 2.0) (/ (pow k 4.0) (pow l 2.0))))
(if (<= t_m 2.1e+25)
(/ 2.0 (* (* t_m (/ (pow t_m 2.0) l)) (/ (* 2.0 (pow k 2.0)) l)))
(/ 2.0 (* (* 2.0 k) (* (sin k) (/ (pow t_m 3.0) (* l l)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 8e-150) {
tmp = 1.0 / ((t_m / 2.0) * (pow(k, 4.0) / pow(l, 2.0)));
} else if (t_m <= 2.1e+25) {
tmp = 2.0 / ((t_m * (pow(t_m, 2.0) / l)) * ((2.0 * pow(k, 2.0)) / l));
} else {
tmp = 2.0 / ((2.0 * k) * (sin(k) * (pow(t_m, 3.0) / (l * l))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 8d-150) then
tmp = 1.0d0 / ((t_m / 2.0d0) * ((k ** 4.0d0) / (l ** 2.0d0)))
else if (t_m <= 2.1d+25) then
tmp = 2.0d0 / ((t_m * ((t_m ** 2.0d0) / l)) * ((2.0d0 * (k ** 2.0d0)) / l))
else
tmp = 2.0d0 / ((2.0d0 * k) * (sin(k) * ((t_m ** 3.0d0) / (l * l))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 8e-150) {
tmp = 1.0 / ((t_m / 2.0) * (Math.pow(k, 4.0) / Math.pow(l, 2.0)));
} else if (t_m <= 2.1e+25) {
tmp = 2.0 / ((t_m * (Math.pow(t_m, 2.0) / l)) * ((2.0 * Math.pow(k, 2.0)) / l));
} else {
tmp = 2.0 / ((2.0 * k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 8e-150: tmp = 1.0 / ((t_m / 2.0) * (math.pow(k, 4.0) / math.pow(l, 2.0))) elif t_m <= 2.1e+25: tmp = 2.0 / ((t_m * (math.pow(t_m, 2.0) / l)) * ((2.0 * math.pow(k, 2.0)) / l)) else: tmp = 2.0 / ((2.0 * k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l)))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 8e-150) tmp = Float64(1.0 / Float64(Float64(t_m / 2.0) * Float64((k ^ 4.0) / (l ^ 2.0)))); elseif (t_m <= 2.1e+25) tmp = Float64(2.0 / Float64(Float64(t_m * Float64((t_m ^ 2.0) / l)) * Float64(Float64(2.0 * (k ^ 2.0)) / l))); else tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 8e-150) tmp = 1.0 / ((t_m / 2.0) * ((k ^ 4.0) / (l ^ 2.0))); elseif (t_m <= 2.1e+25) tmp = 2.0 / ((t_m * ((t_m ^ 2.0) / l)) * ((2.0 * (k ^ 2.0)) / l)); else tmp = 2.0 / ((2.0 * k) * (sin(k) * ((t_m ^ 3.0) / (l * l)))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 8e-150], N[(1.0 / N[(N[(t$95$m / 2.0), $MachinePrecision] * N[(N[Power[k, 4.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.1e+25], N[(2.0 / N[(N[(t$95$m * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 8 \cdot 10^{-150}:\\
\;\;\;\;\frac{1}{\frac{t\_m}{2} \cdot \frac{{k}^{4}}{{\ell}^{2}}}\\
\mathbf{elif}\;t\_m \leq 2.1 \cdot 10^{+25}:\\
\;\;\;\;\frac{2}{\left(t\_m \cdot \frac{{t\_m}^{2}}{\ell}\right) \cdot \frac{2 \cdot {k}^{2}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)}\\
\end{array}
\end{array}
if t < 8.00000000000000005e-150Initial program 50.8%
Simplified51.1%
Taylor expanded in k around inf 60.5%
Taylor expanded in k around 0 51.3%
associate-*r/51.3%
*-commutative51.3%
Simplified51.3%
clear-num51.3%
inv-pow51.3%
Applied egg-rr51.3%
unpow-151.3%
times-frac52.4%
Simplified52.4%
if 8.00000000000000005e-150 < t < 2.0999999999999999e25Initial program 71.5%
Simplified74.4%
Taylor expanded in k around 0 57.8%
associate-*l/55.4%
Applied egg-rr55.4%
associate-/l*58.0%
Simplified58.0%
cube-mult58.0%
*-un-lft-identity58.0%
times-frac69.4%
pow269.4%
Applied egg-rr69.4%
if 2.0999999999999999e25 < t Initial program 72.6%
Simplified72.6%
Taylor expanded in k around 0 70.6%
*-commutative87.1%
Simplified70.6%
Final simplification58.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.2e-114)
(/ 1.0 (* (/ t_m 2.0) (/ (pow k 4.0) (pow l 2.0))))
(if (<= t_m 8e+25)
(/ 2.0 (* (/ (* 2.0 (pow k 2.0)) l) (* (pow t_m 3.0) (/ 1.0 l))))
(/ 2.0 (* (* 2.0 k) (* (sin k) (/ (pow t_m 3.0) (* l l)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.2e-114) {
tmp = 1.0 / ((t_m / 2.0) * (pow(k, 4.0) / pow(l, 2.0)));
} else if (t_m <= 8e+25) {
tmp = 2.0 / (((2.0 * pow(k, 2.0)) / l) * (pow(t_m, 3.0) * (1.0 / l)));
} else {
tmp = 2.0 / ((2.0 * k) * (sin(k) * (pow(t_m, 3.0) / (l * l))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1.2d-114) then
tmp = 1.0d0 / ((t_m / 2.0d0) * ((k ** 4.0d0) / (l ** 2.0d0)))
else if (t_m <= 8d+25) then
tmp = 2.0d0 / (((2.0d0 * (k ** 2.0d0)) / l) * ((t_m ** 3.0d0) * (1.0d0 / l)))
else
tmp = 2.0d0 / ((2.0d0 * k) * (sin(k) * ((t_m ** 3.0d0) / (l * l))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.2e-114) {
tmp = 1.0 / ((t_m / 2.0) * (Math.pow(k, 4.0) / Math.pow(l, 2.0)));
} else if (t_m <= 8e+25) {
tmp = 2.0 / (((2.0 * Math.pow(k, 2.0)) / l) * (Math.pow(t_m, 3.0) * (1.0 / l)));
} else {
tmp = 2.0 / ((2.0 * k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 1.2e-114: tmp = 1.0 / ((t_m / 2.0) * (math.pow(k, 4.0) / math.pow(l, 2.0))) elif t_m <= 8e+25: tmp = 2.0 / (((2.0 * math.pow(k, 2.0)) / l) * (math.pow(t_m, 3.0) * (1.0 / l))) else: tmp = 2.0 / ((2.0 * k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l)))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.2e-114) tmp = Float64(1.0 / Float64(Float64(t_m / 2.0) * Float64((k ^ 4.0) / (l ^ 2.0)))); elseif (t_m <= 8e+25) tmp = Float64(2.0 / Float64(Float64(Float64(2.0 * (k ^ 2.0)) / l) * Float64((t_m ^ 3.0) * Float64(1.0 / l)))); else tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 1.2e-114) tmp = 1.0 / ((t_m / 2.0) * ((k ^ 4.0) / (l ^ 2.0))); elseif (t_m <= 8e+25) tmp = 2.0 / (((2.0 * (k ^ 2.0)) / l) * ((t_m ^ 3.0) * (1.0 / l))); else tmp = 2.0 / ((2.0 * k) * (sin(k) * ((t_m ^ 3.0) / (l * l)))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.2e-114], N[(1.0 / N[(N[(t$95$m / 2.0), $MachinePrecision] * N[(N[Power[k, 4.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 8e+25], N[(2.0 / N[(N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(1.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.2 \cdot 10^{-114}:\\
\;\;\;\;\frac{1}{\frac{t\_m}{2} \cdot \frac{{k}^{4}}{{\ell}^{2}}}\\
\mathbf{elif}\;t\_m \leq 8 \cdot 10^{+25}:\\
\;\;\;\;\frac{2}{\frac{2 \cdot {k}^{2}}{\ell} \cdot \left({t\_m}^{3} \cdot \frac{1}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)}\\
\end{array}
\end{array}
if t < 1.2000000000000001e-114Initial program 50.0%
Simplified50.2%
Taylor expanded in k around inf 61.4%
Taylor expanded in k around 0 52.6%
associate-*r/52.6%
*-commutative52.6%
Simplified52.6%
clear-num52.6%
inv-pow52.6%
Applied egg-rr52.6%
unpow-152.6%
times-frac53.7%
Simplified53.7%
if 1.2000000000000001e-114 < t < 8.00000000000000072e25Initial program 84.7%
Simplified84.7%
Taylor expanded in k around 0 62.3%
associate-*l/59.1%
Applied egg-rr59.1%
associate-/l*62.6%
Simplified62.6%
div-inv62.7%
Applied egg-rr62.7%
if 8.00000000000000072e25 < t Initial program 72.6%
Simplified72.6%
Taylor expanded in k around 0 70.6%
*-commutative87.1%
Simplified70.6%
Final simplification57.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.2e-114)
(/ 1.0 (* (/ t_m 2.0) (/ (pow k 4.0) (pow l 2.0))))
(if (<= t_m 9e+24)
(/ 2.0 (* (/ (* 2.0 (pow k 2.0)) l) (/ (pow t_m 3.0) l)))
(/ 2.0 (* (* 2.0 k) (* (sin k) (/ (pow t_m 3.0) (* l l)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.2e-114) {
tmp = 1.0 / ((t_m / 2.0) * (pow(k, 4.0) / pow(l, 2.0)));
} else if (t_m <= 9e+24) {
tmp = 2.0 / (((2.0 * pow(k, 2.0)) / l) * (pow(t_m, 3.0) / l));
} else {
tmp = 2.0 / ((2.0 * k) * (sin(k) * (pow(t_m, 3.0) / (l * l))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1.2d-114) then
tmp = 1.0d0 / ((t_m / 2.0d0) * ((k ** 4.0d0) / (l ** 2.0d0)))
else if (t_m <= 9d+24) then
tmp = 2.0d0 / (((2.0d0 * (k ** 2.0d0)) / l) * ((t_m ** 3.0d0) / l))
else
tmp = 2.0d0 / ((2.0d0 * k) * (sin(k) * ((t_m ** 3.0d0) / (l * l))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.2e-114) {
tmp = 1.0 / ((t_m / 2.0) * (Math.pow(k, 4.0) / Math.pow(l, 2.0)));
} else if (t_m <= 9e+24) {
tmp = 2.0 / (((2.0 * Math.pow(k, 2.0)) / l) * (Math.pow(t_m, 3.0) / l));
} else {
tmp = 2.0 / ((2.0 * k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 1.2e-114: tmp = 1.0 / ((t_m / 2.0) * (math.pow(k, 4.0) / math.pow(l, 2.0))) elif t_m <= 9e+24: tmp = 2.0 / (((2.0 * math.pow(k, 2.0)) / l) * (math.pow(t_m, 3.0) / l)) else: tmp = 2.0 / ((2.0 * k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l)))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.2e-114) tmp = Float64(1.0 / Float64(Float64(t_m / 2.0) * Float64((k ^ 4.0) / (l ^ 2.0)))); elseif (t_m <= 9e+24) tmp = Float64(2.0 / Float64(Float64(Float64(2.0 * (k ^ 2.0)) / l) * Float64((t_m ^ 3.0) / l))); else tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 1.2e-114) tmp = 1.0 / ((t_m / 2.0) * ((k ^ 4.0) / (l ^ 2.0))); elseif (t_m <= 9e+24) tmp = 2.0 / (((2.0 * (k ^ 2.0)) / l) * ((t_m ^ 3.0) / l)); else tmp = 2.0 / ((2.0 * k) * (sin(k) * ((t_m ^ 3.0) / (l * l)))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.2e-114], N[(1.0 / N[(N[(t$95$m / 2.0), $MachinePrecision] * N[(N[Power[k, 4.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 9e+24], N[(2.0 / N[(N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.2 \cdot 10^{-114}:\\
\;\;\;\;\frac{1}{\frac{t\_m}{2} \cdot \frac{{k}^{4}}{{\ell}^{2}}}\\
\mathbf{elif}\;t\_m \leq 9 \cdot 10^{+24}:\\
\;\;\;\;\frac{2}{\frac{2 \cdot {k}^{2}}{\ell} \cdot \frac{{t\_m}^{3}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)}\\
\end{array}
\end{array}
if t < 1.2000000000000001e-114Initial program 50.0%
Simplified50.2%
Taylor expanded in k around inf 61.4%
Taylor expanded in k around 0 52.6%
associate-*r/52.6%
*-commutative52.6%
Simplified52.6%
clear-num52.6%
inv-pow52.6%
Applied egg-rr52.6%
unpow-152.6%
times-frac53.7%
Simplified53.7%
if 1.2000000000000001e-114 < t < 9.00000000000000039e24Initial program 84.7%
Simplified84.7%
Taylor expanded in k around 0 62.3%
associate-*l/59.1%
Applied egg-rr59.1%
associate-/l*62.6%
Simplified62.6%
if 9.00000000000000039e24 < t Initial program 72.6%
Simplified72.6%
Taylor expanded in k around 0 70.6%
*-commutative87.1%
Simplified70.6%
Final simplification57.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.2e-114)
(/ 1.0 (* (/ t_m 2.0) (/ (pow k 4.0) (pow l 2.0))))
(/
(* (/ (/ 2.0 k) (* k (pow t_m 3.0))) (* l l))
(+ 2.0 (pow (/ k t_m) 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.2e-114) {
tmp = 1.0 / ((t_m / 2.0) * (pow(k, 4.0) / pow(l, 2.0)));
} else {
tmp = (((2.0 / k) / (k * pow(t_m, 3.0))) * (l * l)) / (2.0 + pow((k / t_m), 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.2d-114) then
tmp = 1.0d0 / ((t_m / 2.0d0) * ((k ** 4.0d0) / (l ** 2.0d0)))
else
tmp = (((2.0d0 / k) / (k * (t_m ** 3.0d0))) * (l * l)) / (2.0d0 + ((k / t_m) ** 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.2e-114) {
tmp = 1.0 / ((t_m / 2.0) * (Math.pow(k, 4.0) / Math.pow(l, 2.0)));
} else {
tmp = (((2.0 / k) / (k * Math.pow(t_m, 3.0))) * (l * l)) / (2.0 + Math.pow((k / t_m), 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.2e-114: tmp = 1.0 / ((t_m / 2.0) * (math.pow(k, 4.0) / math.pow(l, 2.0))) else: tmp = (((2.0 / k) / (k * math.pow(t_m, 3.0))) * (l * l)) / (2.0 + math.pow((k / t_m), 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.2e-114) tmp = Float64(1.0 / Float64(Float64(t_m / 2.0) * Float64((k ^ 4.0) / (l ^ 2.0)))); else tmp = Float64(Float64(Float64(Float64(2.0 / k) / Float64(k * (t_m ^ 3.0))) * Float64(l * l)) / Float64(2.0 + (Float64(k / t_m) ^ 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.2e-114) tmp = 1.0 / ((t_m / 2.0) * ((k ^ 4.0) / (l ^ 2.0))); else tmp = (((2.0 / k) / (k * (t_m ^ 3.0))) * (l * l)) / (2.0 + ((k / t_m) ^ 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.2e-114], N[(1.0 / N[(N[(t$95$m / 2.0), $MachinePrecision] * N[(N[Power[k, 4.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(2.0 / k), $MachinePrecision] / N[(k * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $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 1.2 \cdot 10^{-114}:\\
\;\;\;\;\frac{1}{\frac{t\_m}{2} \cdot \frac{{k}^{4}}{{\ell}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{2}{k}}{k \cdot {t\_m}^{3}} \cdot \left(\ell \cdot \ell\right)}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\end{array}
\end{array}
if t < 1.2000000000000001e-114Initial program 50.0%
Simplified50.2%
Taylor expanded in k around inf 61.4%
Taylor expanded in k around 0 52.6%
associate-*r/52.6%
*-commutative52.6%
Simplified52.6%
clear-num52.6%
inv-pow52.6%
Applied egg-rr52.6%
unpow-152.6%
times-frac53.7%
Simplified53.7%
if 1.2000000000000001e-114 < t Initial program 77.0%
Simplified75.7%
Taylor expanded in k around 0 68.2%
Taylor expanded in k around 0 66.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.2e-114)
(/ 1.0 (* (/ t_m 2.0) (/ (pow k 4.0) (pow l 2.0))))
(/ 2.0 (* (/ (* 2.0 (pow k 2.0)) l) (/ (pow t_m 3.0) l))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.2e-114) {
tmp = 1.0 / ((t_m / 2.0) * (pow(k, 4.0) / pow(l, 2.0)));
} else {
tmp = 2.0 / (((2.0 * pow(k, 2.0)) / l) * (pow(t_m, 3.0) / l));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1.2d-114) then
tmp = 1.0d0 / ((t_m / 2.0d0) * ((k ** 4.0d0) / (l ** 2.0d0)))
else
tmp = 2.0d0 / (((2.0d0 * (k ** 2.0d0)) / l) * ((t_m ** 3.0d0) / l))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.2e-114) {
tmp = 1.0 / ((t_m / 2.0) * (Math.pow(k, 4.0) / Math.pow(l, 2.0)));
} else {
tmp = 2.0 / (((2.0 * Math.pow(k, 2.0)) / l) * (Math.pow(t_m, 3.0) / l));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 1.2e-114: tmp = 1.0 / ((t_m / 2.0) * (math.pow(k, 4.0) / math.pow(l, 2.0))) else: tmp = 2.0 / (((2.0 * math.pow(k, 2.0)) / l) * (math.pow(t_m, 3.0) / l)) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.2e-114) tmp = Float64(1.0 / Float64(Float64(t_m / 2.0) * Float64((k ^ 4.0) / (l ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(Float64(2.0 * (k ^ 2.0)) / l) * Float64((t_m ^ 3.0) / l))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 1.2e-114) tmp = 1.0 / ((t_m / 2.0) * ((k ^ 4.0) / (l ^ 2.0))); else tmp = 2.0 / (((2.0 * (k ^ 2.0)) / l) * ((t_m ^ 3.0) / l)); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.2e-114], N[(1.0 / N[(N[(t$95$m / 2.0), $MachinePrecision] * N[(N[Power[k, 4.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.2 \cdot 10^{-114}:\\
\;\;\;\;\frac{1}{\frac{t\_m}{2} \cdot \frac{{k}^{4}}{{\ell}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{2 \cdot {k}^{2}}{\ell} \cdot \frac{{t\_m}^{3}}{\ell}}\\
\end{array}
\end{array}
if t < 1.2000000000000001e-114Initial program 50.0%
Simplified50.2%
Taylor expanded in k around inf 61.4%
Taylor expanded in k around 0 52.6%
associate-*r/52.6%
*-commutative52.6%
Simplified52.6%
clear-num52.6%
inv-pow52.6%
Applied egg-rr52.6%
unpow-152.6%
times-frac53.7%
Simplified53.7%
if 1.2000000000000001e-114 < t Initial program 77.0%
Simplified70.0%
Taylor expanded in k around 0 60.7%
associate-*l/58.2%
Applied egg-rr58.2%
associate-/l*59.4%
Simplified59.4%
Final simplification55.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 4.6e-116)
(/ 1.0 (* (/ t_m 2.0) (/ (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 <= 4.6e-116) {
tmp = 1.0 / ((t_m / 2.0) * (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 <= 4.6d-116) then
tmp = 1.0d0 / ((t_m / 2.0d0) * ((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 <= 4.6e-116) {
tmp = 1.0 / ((t_m / 2.0) * (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 <= 4.6e-116: tmp = 1.0 / ((t_m / 2.0) * (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 <= 4.6e-116) tmp = Float64(1.0 / Float64(Float64(t_m / 2.0) * Float64((k ^ 4.0) / (l ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64(Float64((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 <= 4.6e-116) tmp = 1.0 / ((t_m / 2.0) * ((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, 4.6e-116], N[(1.0 / N[(N[(t$95$m / 2.0), $MachinePrecision] * N[(N[Power[k, 4.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.6 \cdot 10^{-116}:\\
\;\;\;\;\frac{1}{\frac{t\_m}{2} \cdot \frac{{k}^{4}}{{\ell}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{\frac{{t\_m}^{3}}{\ell}}{\ell}}\\
\end{array}
\end{array}
if t < 4.60000000000000003e-116Initial program 50.0%
Simplified50.2%
Taylor expanded in k around inf 61.4%
Taylor expanded in k around 0 52.6%
associate-*r/52.6%
*-commutative52.6%
Simplified52.6%
clear-num52.6%
inv-pow52.6%
Applied egg-rr52.6%
unpow-152.6%
times-frac53.7%
Simplified53.7%
if 4.60000000000000003e-116 < t Initial program 77.0%
Simplified70.0%
Taylor expanded in k around 0 60.7%
Final simplification55.6%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 1.0 (* (/ t_m 2.0) (/ (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 * (1.0 / ((t_m / 2.0) * (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 * (1.0d0 / ((t_m / 2.0d0) * ((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 * (1.0 / ((t_m / 2.0) * (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 * (1.0 / ((t_m / 2.0) * (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(1.0 / Float64(Float64(t_m / 2.0) * 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 * (1.0 / ((t_m / 2.0) * ((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[(1.0 / N[(N[(t$95$m / 2.0), $MachinePrecision] * N[(N[Power[k, 4.0], $MachinePrecision] / 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 \frac{1}{\frac{t\_m}{2} \cdot \frac{{k}^{4}}{{\ell}^{2}}}
\end{array}
Initial program 57.6%
Simplified57.4%
Taylor expanded in k around inf 59.1%
Taylor expanded in k around 0 50.3%
associate-*r/50.3%
*-commutative50.3%
Simplified50.3%
clear-num50.3%
inv-pow50.3%
Applied egg-rr50.3%
unpow-150.3%
times-frac51.1%
Simplified51.1%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* (/ 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 57.6%
Simplified57.4%
Taylor expanded in k around inf 59.1%
Taylor expanded in k around 0 50.3%
associate-*r/50.3%
*-commutative50.3%
Simplified50.3%
pow250.3%
times-frac51.1%
pow251.1%
Applied egg-rr51.1%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ (* 2.0 (* l l)) (* t_m (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 * (l * l)) / (t_m * 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 * (l * l)) / (t_m * (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 * (l * l)) / (t_m * 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 * (l * l)) / (t_m * 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 * Float64(l * l)) / Float64(t_m * (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 * (l * l)) / (t_m * (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 * N[(l * l), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * 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 \frac{2 \cdot \left(\ell \cdot \ell\right)}{t\_m \cdot {k}^{4}}
\end{array}
Initial program 57.6%
Simplified57.4%
Taylor expanded in k around inf 59.1%
Taylor expanded in k around 0 50.3%
associate-*r/50.3%
*-commutative50.3%
Simplified50.3%
unpow250.3%
Applied egg-rr50.3%
herbie shell --seed 2024139
(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))))