
(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 25 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 1.65e-107)
(*
2.0
(* (/ (cos k) (* t_m (pow k 2.0))) (/ (pow l 2.0) (pow (sin k) 2.0))))
(/
2.0
(pow
(*
(* t_m (* (cbrt (sin k)) (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 <= 1.65e-107) {
tmp = 2.0 * ((cos(k) / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / pow(sin(k), 2.0)));
} else {
tmp = 2.0 / pow(((t_m * (cbrt(sin(k)) * 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 <= 1.65e-107) {
tmp = 2.0 * ((Math.cos(k) / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / Math.pow(Math.sin(k), 2.0)));
} else {
tmp = 2.0 / Math.pow(((t_m * (Math.cbrt(Math.sin(k)) * 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 <= 1.65e-107) tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / (sin(k) ^ 2.0)))); else tmp = Float64(2.0 / (Float64(Float64(t_m * Float64(cbrt(sin(k)) * (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, 1.65e-107], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(t$95$m * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * 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 1.65 \cdot 10^{-107}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{{\sin k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot \left(\sqrt[3]{\sin k} \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 < 1.65000000000000002e-107Initial program 53.8%
associate-/r*53.8%
+-commutative53.8%
unpow253.8%
sqr-neg53.8%
distribute-frac-neg253.8%
distribute-frac-neg253.8%
unpow253.8%
+-commutative53.8%
associate-*l*47.0%
associate-*l/46.4%
associate-/r/46.4%
+-commutative46.4%
associate-+r+46.4%
Simplified46.4%
unpow246.4%
Applied egg-rr46.4%
Taylor expanded in t around 0 65.1%
*-commutative65.1%
associate-*r*65.1%
times-frac66.2%
Simplified66.2%
if 1.65000000000000002e-107 < t Initial program 73.2%
Simplified73.2%
add-cube-cbrt73.2%
pow373.2%
*-commutative73.2%
cbrt-prod73.0%
cbrt-div73.0%
rem-cbrt-cube79.0%
cbrt-prod88.6%
pow288.6%
Applied egg-rr88.6%
pow188.6%
div-inv88.5%
pow-flip88.6%
metadata-eval88.6%
Applied egg-rr88.6%
unpow188.6%
associate-*r*88.6%
*-commutative88.6%
Simplified88.6%
add-cube-cbrt88.6%
pow388.6%
Applied egg-rr95.9%
Final simplification76.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (/ k t_m) 2.0)))
(*
t_s
(if (<=
(/
2.0
(*
(+ 1.0 (+ t_2 1.0))
(* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l))))))
2e+257)
(/
2.0
(*
(/ 1.0 l)
(* (* (tan k) (+ 2.0 t_2)) (* (sin k) (/ (pow t_m 3.0) l)))))
(/ 2.0 (* (pow k 2.0) (* (pow k 2.0) (/ t_m (pow l 2.0)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow((k / t_m), 2.0);
double tmp;
if ((2.0 / ((1.0 + (t_2 + 1.0)) * (tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l)))))) <= 2e+257) {
tmp = 2.0 / ((1.0 / l) * ((tan(k) * (2.0 + t_2)) * (sin(k) * (pow(t_m, 3.0) / l))));
} else {
tmp = 2.0 / (pow(k, 2.0) * (pow(k, 2.0) * (t_m / pow(l, 2.0))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: tmp
t_2 = (k / t_m) ** 2.0d0
if ((2.0d0 / ((1.0d0 + (t_2 + 1.0d0)) * (tan(k) * (sin(k) * ((t_m ** 3.0d0) / (l * l)))))) <= 2d+257) then
tmp = 2.0d0 / ((1.0d0 / l) * ((tan(k) * (2.0d0 + t_2)) * (sin(k) * ((t_m ** 3.0d0) / l))))
else
tmp = 2.0d0 / ((k ** 2.0d0) * ((k ** 2.0d0) * (t_m / (l ** 2.0d0))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.pow((k / t_m), 2.0);
double tmp;
if ((2.0 / ((1.0 + (t_2 + 1.0)) * (Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l)))))) <= 2e+257) {
tmp = 2.0 / ((1.0 / l) * ((Math.tan(k) * (2.0 + t_2)) * (Math.sin(k) * (Math.pow(t_m, 3.0) / l))));
} else {
tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(k, 2.0) * (t_m / Math.pow(l, 2.0))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = math.pow((k / t_m), 2.0) tmp = 0 if (2.0 / ((1.0 + (t_2 + 1.0)) * (math.tan(k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l)))))) <= 2e+257: tmp = 2.0 / ((1.0 / l) * ((math.tan(k) * (2.0 + t_2)) * (math.sin(k) * (math.pow(t_m, 3.0) / l)))) else: tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(k, 2.0) * (t_m / math.pow(l, 2.0)))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(k / t_m) ^ 2.0 tmp = 0.0 if (Float64(2.0 / Float64(Float64(1.0 + Float64(t_2 + 1.0)) * Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l)))))) <= 2e+257) tmp = Float64(2.0 / Float64(Float64(1.0 / l) * Float64(Float64(tan(k) * Float64(2.0 + t_2)) * Float64(sin(k) * Float64((t_m ^ 3.0) / l))))); else tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((k ^ 2.0) * Float64(t_m / (l ^ 2.0))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = (k / t_m) ^ 2.0; tmp = 0.0; if ((2.0 / ((1.0 + (t_2 + 1.0)) * (tan(k) * (sin(k) * ((t_m ^ 3.0) / (l * l)))))) <= 2e+257) tmp = 2.0 / ((1.0 / l) * ((tan(k) * (2.0 + t_2)) * (sin(k) * ((t_m ^ 3.0) / l)))); else tmp = 2.0 / ((k ^ 2.0) * ((k ^ 2.0) * (t_m / (l ^ 2.0)))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(2.0 / N[(N[(1.0 + N[(t$95$2 + 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e+257], N[(2.0 / N[(N[(1.0 / l), $MachinePrecision] * N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 2.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 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{2}{\left(1 + \left(t\_2 + 1\right)\right) \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right)} \leq 2 \cdot 10^{+257}:\\
\;\;\;\;\frac{2}{\frac{1}{\ell} \cdot \left(\left(\tan k \cdot \left(2 + t\_2\right)\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({k}^{2} \cdot \frac{t\_m}{{\ell}^{2}}\right)}\\
\end{array}
\end{array}
\end{array}
if (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))) < 2.00000000000000006e257Initial program 84.7%
Simplified84.7%
associate-*l*72.5%
associate-/r*75.0%
associate-+r+75.0%
metadata-eval75.0%
associate-*l*75.0%
associate-*l/75.5%
clear-num75.5%
associate-*l*75.4%
Applied egg-rr75.4%
associate-/r/75.4%
associate-*r*88.5%
Simplified88.5%
if 2.00000000000000006e257 < (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))) Initial program 23.6%
Simplified23.6%
add-cube-cbrt23.6%
pow323.6%
*-commutative23.6%
cbrt-prod23.6%
cbrt-div23.6%
rem-cbrt-cube36.3%
cbrt-prod47.2%
pow247.2%
Applied egg-rr47.2%
Taylor expanded in k around inf 61.1%
associate-/l*59.5%
*-commutative59.5%
*-commutative59.5%
times-frac60.1%
Simplified60.1%
Taylor expanded in k around 0 47.1%
associate-/l*47.5%
Simplified47.5%
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 (<= k 3e-115)
(/
2.0
(pow
(*
(cbrt (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0))))
(* t_m (* (pow (cbrt l) -2.0) (cbrt k))))
3.0))
(if (<= k 2.4e-26)
(pow
(/
(sqrt 2.0)
(*
(/ (pow t_m 1.5) l)
(* (hypot 1.0 (hypot 1.0 (/ k t_m))) (sqrt (* (sin k) (tan k))))))
2.0)
(*
2.0
(*
(/ (cos k) (* t_m (pow k 2.0)))
(/ (pow l 2.0) (pow (sin 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 (k <= 3e-115) {
tmp = 2.0 / pow((cbrt((tan(k) * (2.0 + pow((k / t_m), 2.0)))) * (t_m * (pow(cbrt(l), -2.0) * cbrt(k)))), 3.0);
} else if (k <= 2.4e-26) {
tmp = pow((sqrt(2.0) / ((pow(t_m, 1.5) / l) * (hypot(1.0, hypot(1.0, (k / t_m))) * sqrt((sin(k) * tan(k)))))), 2.0);
} else {
tmp = 2.0 * ((cos(k) / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / pow(sin(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 (k <= 3e-115) {
tmp = 2.0 / Math.pow((Math.cbrt((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0)))) * (t_m * (Math.pow(Math.cbrt(l), -2.0) * Math.cbrt(k)))), 3.0);
} else if (k <= 2.4e-26) {
tmp = Math.pow((Math.sqrt(2.0) / ((Math.pow(t_m, 1.5) / l) * (Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) * Math.sqrt((Math.sin(k) * Math.tan(k)))))), 2.0);
} else {
tmp = 2.0 * ((Math.cos(k) / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / Math.pow(Math.sin(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 (k <= 3e-115) tmp = Float64(2.0 / (Float64(cbrt(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0)))) * Float64(t_m * Float64((cbrt(l) ^ -2.0) * cbrt(k)))) ^ 3.0)); elseif (k <= 2.4e-26) tmp = Float64(sqrt(2.0) / Float64(Float64((t_m ^ 1.5) / l) * Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) * sqrt(Float64(sin(k) * tan(k)))))) ^ 2.0; else tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / (sin(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[k, 3e-115], N[(2.0 / N[Power[N[(N[Power[N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m * N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * N[Power[k, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.4e-26], N[Power[N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] * N[Sqrt[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 3 \cdot 10^{-115}:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)} \cdot \left(t\_m \cdot \left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \sqrt[3]{k}\right)\right)\right)}^{3}}\\
\mathbf{elif}\;k \leq 2.4 \cdot 10^{-26}:\\
\;\;\;\;{\left(\frac{\sqrt{2}}{\frac{{t\_m}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{{\sin k}^{2}}\right)\\
\end{array}
\end{array}
if k < 3.0000000000000002e-115Initial program 64.6%
Simplified64.6%
add-cube-cbrt64.6%
pow364.6%
*-commutative64.6%
cbrt-prod64.5%
cbrt-div64.5%
rem-cbrt-cube71.2%
cbrt-prod79.1%
pow279.1%
Applied egg-rr79.1%
pow179.1%
div-inv79.1%
pow-flip79.1%
metadata-eval79.1%
Applied egg-rr79.1%
unpow179.1%
associate-*r*79.2%
*-commutative79.2%
Simplified79.2%
add-cube-cbrt79.2%
pow379.2%
Applied egg-rr87.6%
Taylor expanded in k around 0 82.6%
if 3.0000000000000002e-115 < k < 2.4000000000000001e-26Initial program 56.5%
Simplified56.5%
Applied egg-rr44.2%
unpow244.2%
Simplified44.2%
if 2.4000000000000001e-26 < k Initial program 51.6%
associate-/r*51.6%
+-commutative51.6%
unpow251.6%
sqr-neg51.6%
distribute-frac-neg251.6%
distribute-frac-neg251.6%
unpow251.6%
+-commutative51.6%
associate-*l*51.6%
associate-*l/51.6%
associate-/r/51.6%
+-commutative51.6%
associate-+r+51.6%
Simplified51.6%
unpow251.6%
Applied egg-rr51.6%
Taylor expanded in t around 0 70.9%
*-commutative70.9%
associate-*r*70.9%
times-frac72.1%
Simplified72.1%
Final simplification76.9%
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.6e-107)
(*
2.0
(* (/ (cos k) (* t_m (pow k 2.0))) (/ (pow l 2.0) (pow (sin k) 2.0))))
(/
2.0
(pow
(*
t_m
(*
(* (cbrt (sin k)) (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.6e-107) {
tmp = 2.0 * ((cos(k) / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / pow(sin(k), 2.0)));
} else {
tmp = 2.0 / pow((t_m * ((cbrt(sin(k)) * 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.6e-107) {
tmp = 2.0 * ((Math.cos(k) / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / Math.pow(Math.sin(k), 2.0)));
} else {
tmp = 2.0 / Math.pow((t_m * ((Math.cbrt(Math.sin(k)) * 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.6e-107) tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / (sin(k) ^ 2.0)))); else tmp = Float64(2.0 / (Float64(t_m * Float64(Float64(cbrt(sin(k)) * (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.6e-107], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(t$95$m * N[(N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $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]), $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.6 \cdot 10^{-107}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{{\sin k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot \left(\left(\sqrt[3]{\sin k} \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)}\right)\right)}^{3}}\\
\end{array}
\end{array}
if t < 3.59999999999999976e-107Initial program 53.8%
associate-/r*53.8%
+-commutative53.8%
unpow253.8%
sqr-neg53.8%
distribute-frac-neg253.8%
distribute-frac-neg253.8%
unpow253.8%
+-commutative53.8%
associate-*l*47.0%
associate-*l/46.4%
associate-/r/46.4%
+-commutative46.4%
associate-+r+46.4%
Simplified46.4%
unpow246.4%
Applied egg-rr46.4%
Taylor expanded in t around 0 65.1%
*-commutative65.1%
associate-*r*65.1%
times-frac66.2%
Simplified66.2%
if 3.59999999999999976e-107 < t Initial program 73.2%
Simplified73.2%
add-cube-cbrt73.2%
pow373.2%
*-commutative73.2%
cbrt-prod73.0%
cbrt-div73.0%
rem-cbrt-cube79.0%
cbrt-prod88.6%
pow288.6%
Applied egg-rr88.6%
pow188.6%
div-inv88.5%
pow-flip88.6%
metadata-eval88.6%
Applied egg-rr88.6%
unpow188.6%
associate-*r*88.6%
*-commutative88.6%
Simplified88.6%
add-cube-cbrt88.6%
pow388.6%
Applied egg-rr95.9%
associate-*l*95.3%
Simplified95.3%
Final simplification76.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.35e-102)
(*
2.0
(* (/ (cos k) (* t_m (pow k 2.0))) (/ (pow l 2.0) (pow (sin k) 2.0))))
(if (<= t_m 1.2e+26)
(* t_2 (* (/ 2.0 (* (* (sin k) (tan k)) (pow t_m 3.0))) t_2))
(/
2.0
(pow
(*
(* t_m (* (cbrt (sin k)) (pow (cbrt l) -2.0)))
(* (cbrt k) (cbrt 2.0)))
3.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = l / hypot(1.0, hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 1.35e-102) {
tmp = 2.0 * ((cos(k) / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / pow(sin(k), 2.0)));
} else if (t_m <= 1.2e+26) {
tmp = t_2 * ((2.0 / ((sin(k) * tan(k)) * pow(t_m, 3.0))) * t_2);
} else {
tmp = 2.0 / pow(((t_m * (cbrt(sin(k)) * pow(cbrt(l), -2.0))) * (cbrt(k) * cbrt(2.0))), 3.0);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = l / Math.hypot(1.0, Math.hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 1.35e-102) {
tmp = 2.0 * ((Math.cos(k) / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / Math.pow(Math.sin(k), 2.0)));
} else if (t_m <= 1.2e+26) {
tmp = t_2 * ((2.0 / ((Math.sin(k) * Math.tan(k)) * Math.pow(t_m, 3.0))) * t_2);
} else {
tmp = 2.0 / Math.pow(((t_m * (Math.cbrt(Math.sin(k)) * Math.pow(Math.cbrt(l), -2.0))) * (Math.cbrt(k) * Math.cbrt(2.0))), 3.0);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(l / hypot(1.0, hypot(1.0, Float64(k / t_m)))) tmp = 0.0 if (t_m <= 1.35e-102) tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / (sin(k) ^ 2.0)))); elseif (t_m <= 1.2e+26) tmp = Float64(t_2 * Float64(Float64(2.0 / Float64(Float64(sin(k) * tan(k)) * (t_m ^ 3.0))) * t_2)); else tmp = Float64(2.0 / (Float64(Float64(t_m * Float64(cbrt(sin(k)) * (cbrt(l) ^ -2.0))) * Float64(cbrt(k) * cbrt(2.0))) ^ 3.0)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(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.35e-102], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.2e+26], N[(t$95$2 * N[(N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(t$95$m * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[k, 1/3], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\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.35 \cdot 10^{-102}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{{\sin k}^{2}}\right)\\
\mathbf{elif}\;t\_m \leq 1.2 \cdot 10^{+26}:\\
\;\;\;\;t\_2 \cdot \left(\frac{2}{\left(\sin k \cdot \tan k\right) \cdot {t\_m}^{3}} \cdot t\_2\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot \left(\sqrt[3]{\sin k} \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right) \cdot \left(\sqrt[3]{k} \cdot \sqrt[3]{2}\right)\right)}^{3}}\\
\end{array}
\end{array}
\end{array}
if t < 1.35e-102Initial program 54.6%
associate-/r*54.6%
+-commutative54.6%
unpow254.6%
sqr-neg54.6%
distribute-frac-neg254.6%
distribute-frac-neg254.6%
unpow254.6%
+-commutative54.6%
associate-*l*47.9%
associate-*l/47.4%
associate-/r/46.2%
+-commutative46.2%
associate-+r+46.2%
Simplified46.2%
unpow246.2%
Applied egg-rr46.2%
Taylor expanded in t around 0 65.7%
*-commutative65.7%
associate-*r*65.7%
times-frac66.8%
Simplified66.8%
if 1.35e-102 < t < 1.20000000000000002e26Initial program 84.5%
associate-/r*84.6%
+-commutative84.6%
unpow284.6%
sqr-neg84.6%
distribute-frac-neg284.6%
distribute-frac-neg284.6%
unpow284.6%
+-commutative84.6%
associate-*l*84.6%
associate-*l/84.6%
associate-/r/84.6%
+-commutative84.6%
associate-+r+84.6%
Simplified84.6%
associate-*r*88.3%
add-sqr-sqrt88.4%
times-frac88.6%
Applied egg-rr92.4%
associate-/l*96.1%
associate-*l*96.1%
Simplified96.1%
if 1.20000000000000002e26 < t Initial program 66.7%
Simplified66.8%
add-cube-cbrt66.7%
pow366.7%
*-commutative66.7%
cbrt-prod66.7%
cbrt-div66.7%
rem-cbrt-cube75.5%
cbrt-prod86.8%
pow286.8%
Applied egg-rr86.8%
pow186.8%
div-inv86.8%
pow-flip86.8%
metadata-eval86.8%
Applied egg-rr86.8%
unpow186.8%
associate-*r*86.9%
*-commutative86.9%
Simplified86.9%
add-cube-cbrt86.9%
pow386.9%
Applied egg-rr97.8%
Taylor expanded in k around 0 88.4%
Final simplification74.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 3.7e-105)
(*
2.0
(* (/ (cos k) (* t_m (pow k 2.0))) (/ (pow l 2.0) (pow (sin k) 2.0))))
(/
2.0
(*
(pow (* (pow (cbrt l) -2.0) (* t_m (cbrt (sin k)))) 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 <= 3.7e-105) {
tmp = 2.0 * ((cos(k) / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / pow(sin(k), 2.0)));
} else {
tmp = 2.0 / (pow((pow(cbrt(l), -2.0) * (t_m * cbrt(sin(k)))), 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 <= 3.7e-105) {
tmp = 2.0 * ((Math.cos(k) / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / Math.pow(Math.sin(k), 2.0)));
} else {
tmp = 2.0 / (Math.pow((Math.pow(Math.cbrt(l), -2.0) * (t_m * Math.cbrt(Math.sin(k)))), 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 <= 3.7e-105) tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / (sin(k) ^ 2.0)))); else tmp = Float64(2.0 / Float64((Float64((cbrt(l) ^ -2.0) * Float64(t_m * cbrt(sin(k)))) ^ 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, 3.7e-105], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $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 3.7 \cdot 10^{-105}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{{\sin k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \left(t\_m \cdot \sqrt[3]{\sin k}\right)\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 < 3.70000000000000008e-105Initial program 54.3%
associate-/r*54.3%
+-commutative54.3%
unpow254.3%
sqr-neg54.3%
distribute-frac-neg254.3%
distribute-frac-neg254.3%
unpow254.3%
+-commutative54.3%
associate-*l*47.6%
associate-*l/47.1%
associate-/r/46.5%
+-commutative46.5%
associate-+r+46.5%
Simplified46.5%
unpow246.5%
Applied egg-rr46.5%
Taylor expanded in t around 0 65.5%
*-commutative65.5%
associate-*r*65.5%
times-frac66.6%
Simplified66.6%
if 3.70000000000000008e-105 < t Initial program 72.6%
Simplified72.6%
add-cube-cbrt72.5%
pow372.6%
*-commutative72.6%
cbrt-prod72.4%
cbrt-div72.4%
rem-cbrt-cube78.5%
cbrt-prod88.3%
pow288.3%
Applied egg-rr88.3%
pow188.3%
div-inv88.2%
pow-flip88.3%
metadata-eval88.3%
Applied egg-rr88.3%
unpow188.3%
associate-*r*88.3%
*-commutative88.3%
Simplified88.3%
Final simplification73.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 4.6e-106)
(*
2.0
(* (/ (cos k) (* t_m (pow k 2.0))) (/ (pow l 2.0) (pow (sin k) 2.0))))
(if (<= t_m 3e+165)
(/
2.0
(*
(+ 2.0 (pow (/ k t_m) 2.0))
(* (tan k) (* (pow (/ (pow t_m 1.5) (sqrt l)) 2.0) (/ (sin k) l)))))
(/
2.0
(pow
(*
(* t_m (* (cbrt (sin k)) (pow (cbrt l) -2.0)))
(* (cbrt k) (cbrt 2.0)))
3.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4.6e-106) {
tmp = 2.0 * ((cos(k) / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / pow(sin(k), 2.0)));
} else if (t_m <= 3e+165) {
tmp = 2.0 / ((2.0 + pow((k / t_m), 2.0)) * (tan(k) * (pow((pow(t_m, 1.5) / sqrt(l)), 2.0) * (sin(k) / l))));
} else {
tmp = 2.0 / pow(((t_m * (cbrt(sin(k)) * pow(cbrt(l), -2.0))) * (cbrt(k) * cbrt(2.0))), 3.0);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4.6e-106) {
tmp = 2.0 * ((Math.cos(k) / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / Math.pow(Math.sin(k), 2.0)));
} else if (t_m <= 3e+165) {
tmp = 2.0 / ((2.0 + Math.pow((k / t_m), 2.0)) * (Math.tan(k) * (Math.pow((Math.pow(t_m, 1.5) / Math.sqrt(l)), 2.0) * (Math.sin(k) / l))));
} else {
tmp = 2.0 / Math.pow(((t_m * (Math.cbrt(Math.sin(k)) * Math.pow(Math.cbrt(l), -2.0))) * (Math.cbrt(k) * Math.cbrt(2.0))), 3.0);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 4.6e-106) tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / (sin(k) ^ 2.0)))); elseif (t_m <= 3e+165) tmp = Float64(2.0 / Float64(Float64(2.0 + (Float64(k / t_m) ^ 2.0)) * Float64(tan(k) * Float64((Float64((t_m ^ 1.5) / sqrt(l)) ^ 2.0) * Float64(sin(k) / l))))); else tmp = Float64(2.0 / (Float64(Float64(t_m * Float64(cbrt(sin(k)) * (cbrt(l) ^ -2.0))) * Float64(cbrt(k) * cbrt(2.0))) ^ 3.0)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 4.6e-106], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3e+165], N[(2.0 / N[(N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(t$95$m * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[k, 1/3], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.6 \cdot 10^{-106}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{{\sin k}^{2}}\right)\\
\mathbf{elif}\;t\_m \leq 3 \cdot 10^{+165}:\\
\;\;\;\;\frac{2}{\left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right) \cdot \left(\tan k \cdot \left({\left(\frac{{t\_m}^{1.5}}{\sqrt{\ell}}\right)}^{2} \cdot \frac{\sin k}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot \left(\sqrt[3]{\sin k} \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right) \cdot \left(\sqrt[3]{k} \cdot \sqrt[3]{2}\right)\right)}^{3}}\\
\end{array}
\end{array}
if t < 4.6000000000000002e-106Initial program 54.3%
associate-/r*54.3%
+-commutative54.3%
unpow254.3%
sqr-neg54.3%
distribute-frac-neg254.3%
distribute-frac-neg254.3%
unpow254.3%
+-commutative54.3%
associate-*l*47.6%
associate-*l/47.1%
associate-/r/46.5%
+-commutative46.5%
associate-+r+46.5%
Simplified46.5%
unpow246.5%
Applied egg-rr46.5%
Taylor expanded in t around 0 65.5%
*-commutative65.5%
associate-*r*65.5%
times-frac66.6%
Simplified66.6%
if 4.6000000000000002e-106 < t < 2.9999999999999999e165Initial program 77.7%
Simplified77.8%
associate-/r*82.1%
add-sqr-sqrt40.3%
*-un-lft-identity40.3%
times-frac40.3%
sqrt-div40.3%
sqrt-pow140.3%
metadata-eval40.3%
sqrt-div40.3%
sqrt-pow144.3%
metadata-eval44.3%
Applied egg-rr44.3%
/-rgt-identity44.3%
associate-*r/44.3%
unpow244.3%
Simplified44.3%
pow144.3%
associate-*l*44.3%
associate-+r+44.3%
metadata-eval44.3%
Applied egg-rr44.3%
unpow144.3%
associate-*r*44.3%
*-commutative44.3%
associate-*r*44.3%
associate-*r/44.3%
*-commutative44.3%
associate-/l*44.4%
Simplified44.4%
if 2.9999999999999999e165 < t Initial program 65.9%
Simplified65.9%
add-cube-cbrt65.9%
pow365.9%
*-commutative65.9%
cbrt-prod65.9%
cbrt-div65.9%
rem-cbrt-cube71.4%
cbrt-prod84.2%
pow284.2%
Applied egg-rr84.2%
pow184.2%
div-inv84.1%
pow-flip84.1%
metadata-eval84.1%
Applied egg-rr84.1%
unpow184.1%
associate-*r*84.2%
*-commutative84.2%
Simplified84.2%
add-cube-cbrt84.1%
pow384.1%
Applied egg-rr98.6%
Taylor expanded in k around 0 93.8%
Final simplification66.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-105)
(*
2.0
(* (/ (cos k) (* t_m (pow k 2.0))) (/ (pow l 2.0) (pow (sin k) 2.0))))
(/
2.0
(*
(* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
(pow (* t_m (* (cbrt (sin k)) (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-105) {
tmp = 2.0 * ((cos(k) / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / pow(sin(k), 2.0)));
} else {
tmp = 2.0 / ((tan(k) * (2.0 + pow((k / t_m), 2.0))) * pow((t_m * (cbrt(sin(k)) * 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-105) {
tmp = 2.0 * ((Math.cos(k) / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / Math.pow(Math.sin(k), 2.0)));
} else {
tmp = 2.0 / ((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))) * Math.pow((t_m * (Math.cbrt(Math.sin(k)) * 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-105) tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / (sin(k) ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * (Float64(t_m * Float64(cbrt(sin(k)) * (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-105], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(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[(t$95$m * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * 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 1.2 \cdot 10^{-105}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{{\sin k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right) \cdot {\left(t\_m \cdot \left(\sqrt[3]{\sin k} \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right)}^{3}}\\
\end{array}
\end{array}
if t < 1.20000000000000007e-105Initial program 54.3%
associate-/r*54.3%
+-commutative54.3%
unpow254.3%
sqr-neg54.3%
distribute-frac-neg254.3%
distribute-frac-neg254.3%
unpow254.3%
+-commutative54.3%
associate-*l*47.6%
associate-*l/47.1%
associate-/r/46.5%
+-commutative46.5%
associate-+r+46.5%
Simplified46.5%
unpow246.5%
Applied egg-rr46.5%
Taylor expanded in t around 0 65.5%
*-commutative65.5%
associate-*r*65.5%
times-frac66.6%
Simplified66.6%
if 1.20000000000000007e-105 < t Initial program 72.6%
Simplified72.6%
add-cube-cbrt72.5%
pow372.6%
*-commutative72.6%
cbrt-prod72.4%
cbrt-div72.4%
rem-cbrt-cube78.5%
cbrt-prod88.3%
pow288.3%
Applied egg-rr88.3%
pow188.3%
div-inv88.2%
pow-flip88.3%
metadata-eval88.3%
Applied egg-rr88.3%
unpow188.3%
associate-*r*88.3%
*-commutative88.3%
Simplified88.3%
add-cube-cbrt88.3%
pow388.3%
Applied egg-rr95.8%
*-commutative95.8%
cube-prod88.3%
rem-cube-cbrt88.4%
Simplified88.4%
Final simplification73.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 9e-106)
(*
2.0
(* (/ (cos k) (* t_m (pow k 2.0))) (/ (pow l 2.0) (pow (sin k) 2.0))))
(/
2.0
(*
(* (tan k) (+ 1.0 (+ (pow (/ k t_m) 2.0) 1.0)))
(* (sin k) (pow (/ (pow t_m 1.5) l) 2.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 9e-106) {
tmp = 2.0 * ((cos(k) / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / pow(sin(k), 2.0)));
} else {
tmp = 2.0 / ((tan(k) * (1.0 + (pow((k / t_m), 2.0) + 1.0))) * (sin(k) * pow((pow(t_m, 1.5) / l), 2.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 9d-106) then
tmp = 2.0d0 * ((cos(k) / (t_m * (k ** 2.0d0))) * ((l ** 2.0d0) / (sin(k) ** 2.0d0)))
else
tmp = 2.0d0 / ((tan(k) * (1.0d0 + (((k / t_m) ** 2.0d0) + 1.0d0))) * (sin(k) * (((t_m ** 1.5d0) / l) ** 2.0d0)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 9e-106) {
tmp = 2.0 * ((Math.cos(k) / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / Math.pow(Math.sin(k), 2.0)));
} else {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (Math.pow((k / t_m), 2.0) + 1.0))) * (Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / l), 2.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 9e-106: tmp = 2.0 * ((math.cos(k) / (t_m * math.pow(k, 2.0))) * (math.pow(l, 2.0) / math.pow(math.sin(k), 2.0))) else: tmp = 2.0 / ((math.tan(k) * (1.0 + (math.pow((k / t_m), 2.0) + 1.0))) * (math.sin(k) * math.pow((math.pow(t_m, 1.5) / l), 2.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 9e-106) tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / (sin(k) ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64((Float64(k / t_m) ^ 2.0) + 1.0))) * Float64(sin(k) * (Float64((t_m ^ 1.5) / l) ^ 2.0)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 9e-106) tmp = 2.0 * ((cos(k) / (t_m * (k ^ 2.0))) * ((l ^ 2.0) / (sin(k) ^ 2.0))); else tmp = 2.0 / ((tan(k) * (1.0 + (((k / t_m) ^ 2.0) + 1.0))) * (sin(k) * (((t_m ^ 1.5) / l) ^ 2.0))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 9e-106], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 9 \cdot 10^{-106}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{{\sin k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right)\right)\right) \cdot \left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\right)}\\
\end{array}
\end{array}
if t < 8.99999999999999911e-106Initial program 54.3%
associate-/r*54.3%
+-commutative54.3%
unpow254.3%
sqr-neg54.3%
distribute-frac-neg254.3%
distribute-frac-neg254.3%
unpow254.3%
+-commutative54.3%
associate-*l*47.6%
associate-*l/47.1%
associate-/r/46.5%
+-commutative46.5%
associate-+r+46.5%
Simplified46.5%
unpow246.5%
Applied egg-rr46.5%
Taylor expanded in t around 0 65.5%
*-commutative65.5%
associate-*r*65.5%
times-frac66.6%
Simplified66.6%
if 8.99999999999999911e-106 < t Initial program 72.6%
Simplified72.6%
add-sqr-sqrt72.6%
pow272.6%
sqrt-div72.6%
sqrt-pow177.4%
metadata-eval77.4%
sqrt-prod46.3%
add-sqr-sqrt86.6%
Applied egg-rr86.6%
Final simplification73.2%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.35e-105)
(*
2.0
(* (/ (cos k) (* t_m (pow k 2.0))) (/ (pow l 2.0) (pow (sin k) 2.0))))
(/
2.0
(*
(* (tan k) (+ 1.0 (+ (pow (/ k t_m) 2.0) 1.0)))
(* (sin k) (* (/ (pow t_m 2.0) l) (/ t_m l))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.35e-105) {
tmp = 2.0 * ((cos(k) / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / pow(sin(k), 2.0)));
} else {
tmp = 2.0 / ((tan(k) * (1.0 + (pow((k / t_m), 2.0) + 1.0))) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / 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.35d-105) then
tmp = 2.0d0 * ((cos(k) / (t_m * (k ** 2.0d0))) * ((l ** 2.0d0) / (sin(k) ** 2.0d0)))
else
tmp = 2.0d0 / ((tan(k) * (1.0d0 + (((k / t_m) ** 2.0d0) + 1.0d0))) * (sin(k) * (((t_m ** 2.0d0) / l) * (t_m / 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.35e-105) {
tmp = 2.0 * ((Math.cos(k) / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / Math.pow(Math.sin(k), 2.0)));
} else {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (Math.pow((k / t_m), 2.0) + 1.0))) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / 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.35e-105: tmp = 2.0 * ((math.cos(k) / (t_m * math.pow(k, 2.0))) * (math.pow(l, 2.0) / math.pow(math.sin(k), 2.0))) else: tmp = 2.0 / ((math.tan(k) * (1.0 + (math.pow((k / t_m), 2.0) + 1.0))) * (math.sin(k) * ((math.pow(t_m, 2.0) / l) * (t_m / 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.35e-105) tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / (sin(k) ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64((Float64(k / t_m) ^ 2.0) + 1.0))) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / 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.35e-105) tmp = 2.0 * ((cos(k) / (t_m * (k ^ 2.0))) * ((l ^ 2.0) / (sin(k) ^ 2.0))); else tmp = 2.0 / ((tan(k) * (1.0 + (((k / t_m) ^ 2.0) + 1.0))) * (sin(k) * (((t_m ^ 2.0) / l) * (t_m / 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.35e-105], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / 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.35 \cdot 10^{-105}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{{\sin k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right)\right)\right) \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\
\end{array}
\end{array}
if t < 1.34999999999999996e-105Initial program 54.3%
associate-/r*54.3%
+-commutative54.3%
unpow254.3%
sqr-neg54.3%
distribute-frac-neg254.3%
distribute-frac-neg254.3%
unpow254.3%
+-commutative54.3%
associate-*l*47.6%
associate-*l/47.1%
associate-/r/46.5%
+-commutative46.5%
associate-+r+46.5%
Simplified46.5%
unpow246.5%
Applied egg-rr46.5%
Taylor expanded in t around 0 65.5%
*-commutative65.5%
associate-*r*65.5%
times-frac66.6%
Simplified66.6%
if 1.34999999999999996e-105 < t Initial program 72.6%
Simplified72.6%
unpow372.6%
times-frac81.0%
pow281.0%
Applied egg-rr81.0%
Final simplification71.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-107)
(pow (* (* (/ l k) (/ (sqrt 2.0) (sin k))) (sqrt (/ (cos k) t_m))) 2.0)
(/
2.0
(*
(* (tan k) (+ 1.0 (+ (pow (/ k t_m) 2.0) 1.0)))
(* (sin k) (* (/ (pow t_m 2.0) l) (/ t_m l))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.1e-107) {
tmp = pow((((l / k) * (sqrt(2.0) / sin(k))) * sqrt((cos(k) / t_m))), 2.0);
} else {
tmp = 2.0 / ((tan(k) * (1.0 + (pow((k / t_m), 2.0) + 1.0))) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / 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 <= 2.1d-107) then
tmp = (((l / k) * (sqrt(2.0d0) / sin(k))) * sqrt((cos(k) / t_m))) ** 2.0d0
else
tmp = 2.0d0 / ((tan(k) * (1.0d0 + (((k / t_m) ** 2.0d0) + 1.0d0))) * (sin(k) * (((t_m ** 2.0d0) / l) * (t_m / 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 <= 2.1e-107) {
tmp = Math.pow((((l / k) * (Math.sqrt(2.0) / Math.sin(k))) * Math.sqrt((Math.cos(k) / t_m))), 2.0);
} else {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (Math.pow((k / t_m), 2.0) + 1.0))) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / 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 <= 2.1e-107: tmp = math.pow((((l / k) * (math.sqrt(2.0) / math.sin(k))) * math.sqrt((math.cos(k) / t_m))), 2.0) else: tmp = 2.0 / ((math.tan(k) * (1.0 + (math.pow((k / t_m), 2.0) + 1.0))) * (math.sin(k) * ((math.pow(t_m, 2.0) / l) * (t_m / 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 <= 2.1e-107) tmp = Float64(Float64(Float64(l / k) * Float64(sqrt(2.0) / sin(k))) * sqrt(Float64(cos(k) / t_m))) ^ 2.0; else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64((Float64(k / t_m) ^ 2.0) + 1.0))) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / 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 <= 2.1e-107) tmp = (((l / k) * (sqrt(2.0) / sin(k))) * sqrt((cos(k) / t_m))) ^ 2.0; else tmp = 2.0 / ((tan(k) * (1.0 + (((k / t_m) ^ 2.0) + 1.0))) * (sin(k) * (((t_m ^ 2.0) / l) * (t_m / 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, 2.1e-107], N[Power[N[(N[(N[(l / k), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / 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 2.1 \cdot 10^{-107}:\\
\;\;\;\;{\left(\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right) \cdot \sqrt{\frac{\cos k}{t\_m}}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right)\right)\right) \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\
\end{array}
\end{array}
if t < 2.0999999999999999e-107Initial program 53.8%
associate-/r*53.8%
+-commutative53.8%
unpow253.8%
sqr-neg53.8%
distribute-frac-neg253.8%
distribute-frac-neg253.8%
unpow253.8%
+-commutative53.8%
associate-*l*47.0%
associate-*l/46.4%
associate-/r/46.4%
+-commutative46.4%
associate-+r+46.4%
Simplified46.4%
add-sqr-sqrt30.4%
pow230.4%
Applied egg-rr35.5%
Taylor expanded in t around 0 40.6%
times-frac40.6%
Simplified40.6%
if 2.0999999999999999e-107 < t Initial program 73.2%
Simplified73.2%
unpow373.2%
times-frac81.5%
pow281.5%
Applied egg-rr81.5%
Final simplification54.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (+ 2.0 (pow (/ k t_m) 2.0))))
(*
t_s
(if (<= t_m 6.5e-106)
(/ 2.0 (* (pow k 2.0) (* (pow k 2.0) (/ t_m (pow l 2.0)))))
(if (<= t_m 2.3e-14)
(/ 2.0 (/ (* (/ (pow t_m 3.0) l) (* (sin k) (* (tan k) t_2))) l))
(* (/ l t_2) (* l (/ 2.0 (* (tan k) (* 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 t_2 = 2.0 + pow((k / t_m), 2.0);
double tmp;
if (t_m <= 6.5e-106) {
tmp = 2.0 / (pow(k, 2.0) * (pow(k, 2.0) * (t_m / pow(l, 2.0))));
} else if (t_m <= 2.3e-14) {
tmp = 2.0 / (((pow(t_m, 3.0) / l) * (sin(k) * (tan(k) * t_2))) / l);
} else {
tmp = (l / t_2) * (l * (2.0 / (tan(k) * (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) :: t_2
real(8) :: tmp
t_2 = 2.0d0 + ((k / t_m) ** 2.0d0)
if (t_m <= 6.5d-106) then
tmp = 2.0d0 / ((k ** 2.0d0) * ((k ** 2.0d0) * (t_m / (l ** 2.0d0))))
else if (t_m <= 2.3d-14) then
tmp = 2.0d0 / ((((t_m ** 3.0d0) / l) * (sin(k) * (tan(k) * t_2))) / l)
else
tmp = (l / t_2) * (l * (2.0d0 / (tan(k) * (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 t_2 = 2.0 + Math.pow((k / t_m), 2.0);
double tmp;
if (t_m <= 6.5e-106) {
tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(k, 2.0) * (t_m / Math.pow(l, 2.0))));
} else if (t_m <= 2.3e-14) {
tmp = 2.0 / (((Math.pow(t_m, 3.0) / l) * (Math.sin(k) * (Math.tan(k) * t_2))) / l);
} else {
tmp = (l / t_2) * (l * (2.0 / (Math.tan(k) * (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): t_2 = 2.0 + math.pow((k / t_m), 2.0) tmp = 0 if t_m <= 6.5e-106: tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(k, 2.0) * (t_m / math.pow(l, 2.0)))) elif t_m <= 2.3e-14: tmp = 2.0 / (((math.pow(t_m, 3.0) / l) * (math.sin(k) * (math.tan(k) * t_2))) / l) else: tmp = (l / t_2) * (l * (2.0 / (math.tan(k) * (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) t_2 = Float64(2.0 + (Float64(k / t_m) ^ 2.0)) tmp = 0.0 if (t_m <= 6.5e-106) tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((k ^ 2.0) * Float64(t_m / (l ^ 2.0))))); elseif (t_m <= 2.3e-14) tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 3.0) / l) * Float64(sin(k) * Float64(tan(k) * t_2))) / l)); else tmp = Float64(Float64(l / t_2) * Float64(l * Float64(2.0 / Float64(tan(k) * 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) t_2 = 2.0 + ((k / t_m) ^ 2.0); tmp = 0.0; if (t_m <= 6.5e-106) tmp = 2.0 / ((k ^ 2.0) * ((k ^ 2.0) * (t_m / (l ^ 2.0)))); elseif (t_m <= 2.3e-14) tmp = 2.0 / ((((t_m ^ 3.0) / l) * (sin(k) * (tan(k) * t_2))) / l); else tmp = (l / t_2) * (l * (2.0 / (tan(k) * (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_] := 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, 6.5e-106], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.3e-14], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(l / t$95$2), $MachinePrecision] * N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(k * N[Power[t$95$m, 3.0], $MachinePrecision]), $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 := 2 + {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 6.5 \cdot 10^{-106}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({k}^{2} \cdot \frac{t\_m}{{\ell}^{2}}\right)}\\
\mathbf{elif}\;t\_m \leq 2.3 \cdot 10^{-14}:\\
\;\;\;\;\frac{2}{\frac{\frac{{t\_m}^{3}}{\ell} \cdot \left(\sin k \cdot \left(\tan k \cdot t\_2\right)\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{t\_2} \cdot \left(\ell \cdot \frac{2}{\tan k \cdot \left(k \cdot {t\_m}^{3}\right)}\right)\\
\end{array}
\end{array}
\end{array}
if t < 6.4999999999999997e-106Initial program 54.3%
Simplified54.3%
add-cube-cbrt54.3%
pow354.3%
*-commutative54.3%
cbrt-prod54.3%
cbrt-div54.2%
rem-cbrt-cube62.6%
cbrt-prod66.9%
pow266.9%
Applied egg-rr66.9%
Taylor expanded in k around inf 65.4%
associate-/l*64.5%
*-commutative64.5%
*-commutative64.5%
times-frac65.9%
Simplified65.9%
Taylor expanded in k around 0 56.6%
associate-/l*57.9%
Simplified57.9%
if 6.4999999999999997e-106 < t < 2.29999999999999998e-14Initial program 86.4%
Simplified86.5%
associate-*l*86.4%
associate-/r*95.2%
associate-+r+95.2%
metadata-eval95.2%
associate-*l*95.2%
associate-*l/95.5%
associate-*l*95.2%
Applied egg-rr95.2%
if 2.29999999999999998e-14 < t Initial program 67.7%
associate-/r*67.8%
+-commutative67.8%
unpow267.8%
sqr-neg67.8%
distribute-frac-neg267.8%
distribute-frac-neg267.8%
unpow267.8%
+-commutative67.8%
associate-*l*55.9%
associate-*l/56.0%
associate-/r/56.0%
+-commutative56.0%
associate-+r+56.0%
Simplified56.0%
associate-*r*58.0%
*-un-lft-identity58.0%
times-frac58.0%
associate-*r*69.9%
Applied egg-rr69.9%
Taylor expanded in k around 0 65.4%
Final simplification62.9%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 7.6e-106)
(/ 2.0 (* (pow k 2.0) (* (pow k 2.0) (/ t_m (pow l 2.0)))))
(/
2.0
(*
(* (tan k) (+ 1.0 (+ (pow (/ k t_m) 2.0) 1.0)))
(* (sin k) (* (/ (pow t_m 2.0) l) (/ t_m l))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 7.6e-106) {
tmp = 2.0 / (pow(k, 2.0) * (pow(k, 2.0) * (t_m / pow(l, 2.0))));
} else {
tmp = 2.0 / ((tan(k) * (1.0 + (pow((k / t_m), 2.0) + 1.0))) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / 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 <= 7.6d-106) then
tmp = 2.0d0 / ((k ** 2.0d0) * ((k ** 2.0d0) * (t_m / (l ** 2.0d0))))
else
tmp = 2.0d0 / ((tan(k) * (1.0d0 + (((k / t_m) ** 2.0d0) + 1.0d0))) * (sin(k) * (((t_m ** 2.0d0) / l) * (t_m / 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 <= 7.6e-106) {
tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(k, 2.0) * (t_m / Math.pow(l, 2.0))));
} else {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (Math.pow((k / t_m), 2.0) + 1.0))) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / 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 <= 7.6e-106: tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(k, 2.0) * (t_m / math.pow(l, 2.0)))) else: tmp = 2.0 / ((math.tan(k) * (1.0 + (math.pow((k / t_m), 2.0) + 1.0))) * (math.sin(k) * ((math.pow(t_m, 2.0) / l) * (t_m / 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 <= 7.6e-106) tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((k ^ 2.0) * Float64(t_m / (l ^ 2.0))))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64((Float64(k / t_m) ^ 2.0) + 1.0))) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / 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 <= 7.6e-106) tmp = 2.0 / ((k ^ 2.0) * ((k ^ 2.0) * (t_m / (l ^ 2.0)))); else tmp = 2.0 / ((tan(k) * (1.0 + (((k / t_m) ^ 2.0) + 1.0))) * (sin(k) * (((t_m ^ 2.0) / l) * (t_m / 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, 7.6e-106], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / 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 7.6 \cdot 10^{-106}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({k}^{2} \cdot \frac{t\_m}{{\ell}^{2}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right)\right)\right) \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\
\end{array}
\end{array}
if t < 7.5999999999999999e-106Initial program 54.3%
Simplified54.3%
add-cube-cbrt54.3%
pow354.3%
*-commutative54.3%
cbrt-prod54.3%
cbrt-div54.2%
rem-cbrt-cube62.6%
cbrt-prod66.9%
pow266.9%
Applied egg-rr66.9%
Taylor expanded in k around inf 65.4%
associate-/l*64.5%
*-commutative64.5%
*-commutative64.5%
times-frac65.9%
Simplified65.9%
Taylor expanded in k around 0 56.6%
associate-/l*57.9%
Simplified57.9%
if 7.5999999999999999e-106 < t Initial program 72.6%
Simplified72.6%
unpow372.6%
times-frac81.0%
pow281.0%
Applied egg-rr81.0%
Final simplification65.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.7e-101)
(/ 2.0 (* (pow k 2.0) (* (pow k 2.0) (/ t_m (pow l 2.0)))))
(*
(* l (/ 2.0 (* (tan k) (* (sin k) (pow t_m 3.0)))))
(/ 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.7e-101) {
tmp = 2.0 / (pow(k, 2.0) * (pow(k, 2.0) * (t_m / pow(l, 2.0))));
} else {
tmp = (l * (2.0 / (tan(k) * (sin(k) * pow(t_m, 3.0))))) * (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.7d-101) then
tmp = 2.0d0 / ((k ** 2.0d0) * ((k ** 2.0d0) * (t_m / (l ** 2.0d0))))
else
tmp = (l * (2.0d0 / (tan(k) * (sin(k) * (t_m ** 3.0d0))))) * (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.7e-101) {
tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(k, 2.0) * (t_m / Math.pow(l, 2.0))));
} else {
tmp = (l * (2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow(t_m, 3.0))))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
}
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.7e-101: tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(k, 2.0) * (t_m / math.pow(l, 2.0)))) else: tmp = (l * (2.0 / (math.tan(k) * (math.sin(k) * math.pow(t_m, 3.0))))) * (l / (2.0 + math.pow((k / t_m), 2.0))) 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.7e-101) tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((k ^ 2.0) * Float64(t_m / (l ^ 2.0))))); else tmp = Float64(Float64(l * Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (t_m ^ 3.0))))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); 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.7e-101) tmp = 2.0 / ((k ^ 2.0) * ((k ^ 2.0) * (t_m / (l ^ 2.0)))); else tmp = (l * (2.0 / (tan(k) * (sin(k) * (t_m ^ 3.0))))) * (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.7e-101], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $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.7 \cdot 10^{-101}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({k}^{2} \cdot \frac{t\_m}{{\ell}^{2}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\end{array}
\end{array}
if t < 1.69999999999999995e-101Initial program 54.6%
Simplified54.6%
add-cube-cbrt54.5%
pow354.5%
*-commutative54.5%
cbrt-prod54.5%
cbrt-div54.5%
rem-cbrt-cube62.8%
cbrt-prod67.1%
pow267.1%
Applied egg-rr67.1%
Taylor expanded in k around inf 65.6%
associate-/l*64.7%
*-commutative64.7%
*-commutative64.7%
times-frac66.1%
Simplified66.1%
Taylor expanded in k around 0 56.9%
associate-/l*58.1%
Simplified58.1%
if 1.69999999999999995e-101 < t Initial program 72.2%
associate-/r*72.3%
+-commutative72.3%
unpow272.3%
sqr-neg72.3%
distribute-frac-neg272.3%
distribute-frac-neg272.3%
unpow272.3%
+-commutative72.3%
associate-*l*63.4%
associate-*l/63.4%
associate-/r/63.4%
+-commutative63.4%
associate-+r+63.4%
Simplified63.4%
associate-*r*66.1%
*-un-lft-identity66.1%
times-frac66.2%
associate-*r*75.0%
Applied egg-rr75.0%
Final simplification63.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 2e-105)
(/ 2.0 (* (pow k 2.0) (* (pow k 2.0) (/ t_m (pow l 2.0)))))
(if (<= t_m 7.2e-8)
(/
2.0
(*
(/ (/ (pow t_m 3.0) l) l)
(* (* (sin k) (tan k)) (+ 2.0 (* (/ k t_m) (/ k t_m))))))
(*
(/ l (+ 2.0 (pow (/ k t_m) 2.0)))
(* l (/ 2.0 (* (tan k) (* 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 <= 2e-105) {
tmp = 2.0 / (pow(k, 2.0) * (pow(k, 2.0) * (t_m / pow(l, 2.0))));
} else if (t_m <= 7.2e-8) {
tmp = 2.0 / (((pow(t_m, 3.0) / l) / l) * ((sin(k) * tan(k)) * (2.0 + ((k / t_m) * (k / t_m)))));
} else {
tmp = (l / (2.0 + pow((k / t_m), 2.0))) * (l * (2.0 / (tan(k) * (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 <= 2d-105) then
tmp = 2.0d0 / ((k ** 2.0d0) * ((k ** 2.0d0) * (t_m / (l ** 2.0d0))))
else if (t_m <= 7.2d-8) then
tmp = 2.0d0 / ((((t_m ** 3.0d0) / l) / l) * ((sin(k) * tan(k)) * (2.0d0 + ((k / t_m) * (k / t_m)))))
else
tmp = (l / (2.0d0 + ((k / t_m) ** 2.0d0))) * (l * (2.0d0 / (tan(k) * (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 <= 2e-105) {
tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(k, 2.0) * (t_m / Math.pow(l, 2.0))));
} else if (t_m <= 7.2e-8) {
tmp = 2.0 / (((Math.pow(t_m, 3.0) / l) / l) * ((Math.sin(k) * Math.tan(k)) * (2.0 + ((k / t_m) * (k / t_m)))));
} else {
tmp = (l / (2.0 + Math.pow((k / t_m), 2.0))) * (l * (2.0 / (Math.tan(k) * (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 <= 2e-105: tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(k, 2.0) * (t_m / math.pow(l, 2.0)))) elif t_m <= 7.2e-8: tmp = 2.0 / (((math.pow(t_m, 3.0) / l) / l) * ((math.sin(k) * math.tan(k)) * (2.0 + ((k / t_m) * (k / t_m))))) else: tmp = (l / (2.0 + math.pow((k / t_m), 2.0))) * (l * (2.0 / (math.tan(k) * (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 <= 2e-105) tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((k ^ 2.0) * Float64(t_m / (l ^ 2.0))))); elseif (t_m <= 7.2e-8) tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 3.0) / l) / l) * Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + Float64(Float64(k / t_m) * Float64(k / t_m)))))); else tmp = Float64(Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(l * Float64(2.0 / Float64(tan(k) * 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 <= 2e-105) tmp = 2.0 / ((k ^ 2.0) * ((k ^ 2.0) * (t_m / (l ^ 2.0)))); elseif (t_m <= 7.2e-8) tmp = 2.0 / ((((t_m ^ 3.0) / l) / l) * ((sin(k) * tan(k)) * (2.0 + ((k / t_m) * (k / t_m))))); else tmp = (l / (2.0 + ((k / t_m) ^ 2.0))) * (l * (2.0 / (tan(k) * (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, 2e-105], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 7.2e-8], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(k * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2 \cdot 10^{-105}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({k}^{2} \cdot \frac{t\_m}{{\ell}^{2}}\right)}\\
\mathbf{elif}\;t\_m \leq 7.2 \cdot 10^{-8}:\\
\;\;\;\;\frac{2}{\frac{\frac{{t\_m}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + \frac{k}{t\_m} \cdot \frac{k}{t\_m}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}} \cdot \left(\ell \cdot \frac{2}{\tan k \cdot \left(k \cdot {t\_m}^{3}\right)}\right)\\
\end{array}
\end{array}
if t < 1.99999999999999993e-105Initial program 54.3%
Simplified54.3%
add-cube-cbrt54.3%
pow354.3%
*-commutative54.3%
cbrt-prod54.3%
cbrt-div54.2%
rem-cbrt-cube62.6%
cbrt-prod66.9%
pow266.9%
Applied egg-rr66.9%
Taylor expanded in k around inf 65.4%
associate-/l*64.5%
*-commutative64.5%
*-commutative64.5%
times-frac65.9%
Simplified65.9%
Taylor expanded in k around 0 56.6%
associate-/l*57.9%
Simplified57.9%
if 1.99999999999999993e-105 < t < 7.19999999999999962e-8Initial program 86.9%
Simplified95.3%
unpow282.6%
Applied egg-rr95.3%
if 7.19999999999999962e-8 < t Initial program 67.2%
associate-/r*67.3%
+-commutative67.3%
unpow267.3%
sqr-neg67.3%
distribute-frac-neg267.3%
distribute-frac-neg267.3%
unpow267.3%
+-commutative67.3%
associate-*l*55.2%
associate-*l/55.3%
associate-/r/55.3%
+-commutative55.3%
associate-+r+55.3%
Simplified55.3%
associate-*r*57.3%
*-un-lft-identity57.3%
times-frac57.4%
associate-*r*69.4%
Applied egg-rr69.4%
Taylor expanded in k around 0 64.9%
Final simplification62.9%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.16e-107)
(/ 2.0 (* (pow k 2.0) (* (pow k 2.0) (/ t_m (pow l 2.0)))))
(*
(/ l (+ 2.0 (pow (/ k t_m) 2.0)))
(* l (/ 2.0 (* (tan k) (* 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.16e-107) {
tmp = 2.0 / (pow(k, 2.0) * (pow(k, 2.0) * (t_m / pow(l, 2.0))));
} else {
tmp = (l / (2.0 + pow((k / t_m), 2.0))) * (l * (2.0 / (tan(k) * (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.16d-107) then
tmp = 2.0d0 / ((k ** 2.0d0) * ((k ** 2.0d0) * (t_m / (l ** 2.0d0))))
else
tmp = (l / (2.0d0 + ((k / t_m) ** 2.0d0))) * (l * (2.0d0 / (tan(k) * (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.16e-107) {
tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(k, 2.0) * (t_m / Math.pow(l, 2.0))));
} else {
tmp = (l / (2.0 + Math.pow((k / t_m), 2.0))) * (l * (2.0 / (Math.tan(k) * (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.16e-107: tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(k, 2.0) * (t_m / math.pow(l, 2.0)))) else: tmp = (l / (2.0 + math.pow((k / t_m), 2.0))) * (l * (2.0 / (math.tan(k) * (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.16e-107) tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((k ^ 2.0) * Float64(t_m / (l ^ 2.0))))); else tmp = Float64(Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(l * Float64(2.0 / Float64(tan(k) * 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 <= 1.16e-107) tmp = 2.0 / ((k ^ 2.0) * ((k ^ 2.0) * (t_m / (l ^ 2.0)))); else tmp = (l / (2.0 + ((k / t_m) ^ 2.0))) * (l * (2.0 / (tan(k) * (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.16e-107], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(k * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.16 \cdot 10^{-107}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({k}^{2} \cdot \frac{t\_m}{{\ell}^{2}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}} \cdot \left(\ell \cdot \frac{2}{\tan k \cdot \left(k \cdot {t\_m}^{3}\right)}\right)\\
\end{array}
\end{array}
if t < 1.16e-107Initial program 54.1%
Simplified54.1%
add-cube-cbrt54.0%
pow354.0%
*-commutative54.0%
cbrt-prod54.0%
cbrt-div54.0%
rem-cbrt-cube62.6%
cbrt-prod66.9%
pow266.9%
Applied egg-rr66.9%
Taylor expanded in k around inf 65.4%
associate-/l*64.5%
*-commutative64.5%
*-commutative64.5%
times-frac65.9%
Simplified65.9%
Taylor expanded in k around 0 56.4%
associate-/l*57.7%
Simplified57.7%
if 1.16e-107 < t Initial program 72.3%
associate-/r*72.4%
+-commutative72.4%
unpow272.4%
sqr-neg72.4%
distribute-frac-neg272.4%
distribute-frac-neg272.4%
unpow272.4%
+-commutative72.4%
associate-*l*63.9%
associate-*l/64.0%
associate-/r/61.7%
+-commutative61.7%
associate-+r+61.7%
Simplified61.7%
associate-*r*64.2%
*-un-lft-identity64.2%
times-frac64.3%
associate-*r*72.7%
Applied egg-rr72.7%
Taylor expanded in k around 0 68.7%
Final simplification61.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.6e-105)
(/ 2.0 (* (pow k 2.0) (* (pow k 2.0) (/ t_m (pow l 2.0)))))
(/
2.0
(* (pow (* t_m (pow l -0.6666666666666666)) 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.6e-105) {
tmp = 2.0 / (pow(k, 2.0) * (pow(k, 2.0) * (t_m / pow(l, 2.0))));
} else {
tmp = 2.0 / (pow((t_m * pow(l, -0.6666666666666666)), 3.0) * (2.0 * pow(k, 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.6d-105) then
tmp = 2.0d0 / ((k ** 2.0d0) * ((k ** 2.0d0) * (t_m / (l ** 2.0d0))))
else
tmp = 2.0d0 / (((t_m * (l ** (-0.6666666666666666d0))) ** 3.0d0) * (2.0d0 * (k ** 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.6e-105) {
tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(k, 2.0) * (t_m / Math.pow(l, 2.0))));
} else {
tmp = 2.0 / (Math.pow((t_m * Math.pow(l, -0.6666666666666666)), 3.0) * (2.0 * Math.pow(k, 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.6e-105: tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(k, 2.0) * (t_m / math.pow(l, 2.0)))) else: tmp = 2.0 / (math.pow((t_m * math.pow(l, -0.6666666666666666)), 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.6e-105) tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((k ^ 2.0) * Float64(t_m / (l ^ 2.0))))); else tmp = Float64(2.0 / Float64((Float64(t_m * (l ^ -0.6666666666666666)) ^ 3.0) * Float64(2.0 * (k ^ 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.6e-105) tmp = 2.0 / ((k ^ 2.0) * ((k ^ 2.0) * (t_m / (l ^ 2.0)))); else tmp = 2.0 / (((t_m * (l ^ -0.6666666666666666)) ^ 3.0) * (2.0 * (k ^ 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.6e-105], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(t$95$m * N[Power[l, -0.6666666666666666], $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.6 \cdot 10^{-105}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({k}^{2} \cdot \frac{t\_m}{{\ell}^{2}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot {\ell}^{-0.6666666666666666}\right)}^{3} \cdot \left(2 \cdot {k}^{2}\right)}\\
\end{array}
\end{array}
if t < 1.59999999999999991e-105Initial program 54.3%
Simplified54.3%
add-cube-cbrt54.3%
pow354.3%
*-commutative54.3%
cbrt-prod54.3%
cbrt-div54.2%
rem-cbrt-cube62.6%
cbrt-prod66.9%
pow266.9%
Applied egg-rr66.9%
Taylor expanded in k around inf 65.4%
associate-/l*64.5%
*-commutative64.5%
*-commutative64.5%
times-frac65.9%
Simplified65.9%
Taylor expanded in k around 0 56.6%
associate-/l*57.9%
Simplified57.9%
if 1.59999999999999991e-105 < t Initial program 72.6%
Simplified67.6%
Taylor expanded in k around 0 61.0%
add-cube-cbrt61.0%
pow361.0%
associate-/l/57.3%
cbrt-div57.2%
unpow357.2%
add-cbrt-cube61.1%
cbrt-unprod65.6%
unpow265.6%
div-inv65.6%
unpow-prod-down57.2%
pow-flip57.3%
metadata-eval57.3%
Applied egg-rr57.3%
cube-prod65.6%
Simplified65.6%
add-exp-log65.3%
log-pow32.3%
Applied egg-rr32.3%
*-commutative32.3%
pow-to-exp65.6%
pow1/332.2%
pow-pow32.2%
metadata-eval32.2%
Applied egg-rr32.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 4e-105)
(/ 2.0 (* (pow k 2.0) (* (pow k 2.0) (/ t_m (pow l 2.0)))))
(/ 2.0 (* (* 2.0 (pow k 2.0)) (/ (* t_m (/ (pow t_m 2.0) l)) l))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4e-105) {
tmp = 2.0 / (pow(k, 2.0) * (pow(k, 2.0) * (t_m / pow(l, 2.0))));
} else {
tmp = 2.0 / ((2.0 * pow(k, 2.0)) * ((t_m * (pow(t_m, 2.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 <= 4d-105) then
tmp = 2.0d0 / ((k ** 2.0d0) * ((k ** 2.0d0) * (t_m / (l ** 2.0d0))))
else
tmp = 2.0d0 / ((2.0d0 * (k ** 2.0d0)) * ((t_m * ((t_m ** 2.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 <= 4e-105) {
tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(k, 2.0) * (t_m / Math.pow(l, 2.0))));
} else {
tmp = 2.0 / ((2.0 * Math.pow(k, 2.0)) * ((t_m * (Math.pow(t_m, 2.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 <= 4e-105: tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(k, 2.0) * (t_m / math.pow(l, 2.0)))) else: tmp = 2.0 / ((2.0 * math.pow(k, 2.0)) * ((t_m * (math.pow(t_m, 2.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 <= 4e-105) tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((k ^ 2.0) * Float64(t_m / (l ^ 2.0))))); else tmp = Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64(Float64(t_m * Float64((t_m ^ 2.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 <= 4e-105) tmp = 2.0 / ((k ^ 2.0) * ((k ^ 2.0) * (t_m / (l ^ 2.0)))); else tmp = 2.0 / ((2.0 * (k ^ 2.0)) * ((t_m * ((t_m ^ 2.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, 4e-105], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision]), $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 \cdot 10^{-105}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({k}^{2} \cdot \frac{t\_m}{{\ell}^{2}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{t\_m \cdot \frac{{t\_m}^{2}}{\ell}}{\ell}}\\
\end{array}
\end{array}
if t < 3.99999999999999986e-105Initial program 54.3%
Simplified54.3%
add-cube-cbrt54.3%
pow354.3%
*-commutative54.3%
cbrt-prod54.3%
cbrt-div54.2%
rem-cbrt-cube62.6%
cbrt-prod66.9%
pow266.9%
Applied egg-rr66.9%
Taylor expanded in k around inf 65.4%
associate-/l*64.5%
*-commutative64.5%
*-commutative64.5%
times-frac65.9%
Simplified65.9%
Taylor expanded in k around 0 56.6%
associate-/l*57.9%
Simplified57.9%
if 3.99999999999999986e-105 < t Initial program 72.6%
Simplified67.6%
Taylor expanded in k around 0 61.0%
cube-mult61.0%
*-un-lft-identity61.0%
times-frac64.5%
pow264.5%
Applied egg-rr64.5%
Final simplification60.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 3e-105)
(/ 2.0 (* (/ t_m (pow l 2.0)) (pow k 4.0)))
(/ 2.0 (* (* 2.0 (pow k 2.0)) (/ (* t_m (/ (pow t_m 2.0) l)) l))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3e-105) {
tmp = 2.0 / ((t_m / pow(l, 2.0)) * pow(k, 4.0));
} else {
tmp = 2.0 / ((2.0 * pow(k, 2.0)) * ((t_m * (pow(t_m, 2.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 <= 3d-105) then
tmp = 2.0d0 / ((t_m / (l ** 2.0d0)) * (k ** 4.0d0))
else
tmp = 2.0d0 / ((2.0d0 * (k ** 2.0d0)) * ((t_m * ((t_m ** 2.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 <= 3e-105) {
tmp = 2.0 / ((t_m / Math.pow(l, 2.0)) * Math.pow(k, 4.0));
} else {
tmp = 2.0 / ((2.0 * Math.pow(k, 2.0)) * ((t_m * (Math.pow(t_m, 2.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 <= 3e-105: tmp = 2.0 / ((t_m / math.pow(l, 2.0)) * math.pow(k, 4.0)) else: tmp = 2.0 / ((2.0 * math.pow(k, 2.0)) * ((t_m * (math.pow(t_m, 2.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 <= 3e-105) tmp = Float64(2.0 / Float64(Float64(t_m / (l ^ 2.0)) * (k ^ 4.0))); else tmp = Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64(Float64(t_m * Float64((t_m ^ 2.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 <= 3e-105) tmp = 2.0 / ((t_m / (l ^ 2.0)) * (k ^ 4.0)); else tmp = 2.0 / ((2.0 * (k ^ 2.0)) * ((t_m * ((t_m ^ 2.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, 3e-105], N[(2.0 / N[(N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision]), $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 3 \cdot 10^{-105}:\\
\;\;\;\;\frac{2}{\frac{t\_m}{{\ell}^{2}} \cdot {k}^{4}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{t\_m \cdot \frac{{t\_m}^{2}}{\ell}}{\ell}}\\
\end{array}
\end{array}
if t < 3.0000000000000001e-105Initial program 54.3%
Simplified54.3%
add-cube-cbrt54.3%
pow354.3%
*-commutative54.3%
cbrt-prod54.3%
cbrt-div54.2%
rem-cbrt-cube62.6%
cbrt-prod66.9%
pow266.9%
Applied egg-rr66.9%
Taylor expanded in k around inf 65.4%
associate-/l*64.5%
*-commutative64.5%
*-commutative64.5%
times-frac65.9%
Simplified65.9%
Taylor expanded in k around 0 54.0%
associate-/l*55.6%
Simplified55.6%
if 3.0000000000000001e-105 < t Initial program 72.6%
Simplified67.6%
Taylor expanded in k around 0 61.0%
cube-mult61.0%
*-un-lft-identity61.0%
times-frac64.5%
pow264.5%
Applied egg-rr64.5%
Final simplification58.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 2.5e-105)
(/ 2.0 (* (/ t_m (pow l 2.0)) (pow k 4.0)))
(/ 2.0 (/ (* (/ (pow t_m 3.0) l) (* 2.0 (pow k 2.0))) l)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.5e-105) {
tmp = 2.0 / ((t_m / pow(l, 2.0)) * pow(k, 4.0));
} else {
tmp = 2.0 / (((pow(t_m, 3.0) / l) * (2.0 * pow(k, 2.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 <= 2.5d-105) then
tmp = 2.0d0 / ((t_m / (l ** 2.0d0)) * (k ** 4.0d0))
else
tmp = 2.0d0 / ((((t_m ** 3.0d0) / l) * (2.0d0 * (k ** 2.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 <= 2.5e-105) {
tmp = 2.0 / ((t_m / Math.pow(l, 2.0)) * Math.pow(k, 4.0));
} else {
tmp = 2.0 / (((Math.pow(t_m, 3.0) / l) * (2.0 * Math.pow(k, 2.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 <= 2.5e-105: tmp = 2.0 / ((t_m / math.pow(l, 2.0)) * math.pow(k, 4.0)) else: tmp = 2.0 / (((math.pow(t_m, 3.0) / l) * (2.0 * math.pow(k, 2.0))) / l) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 2.5e-105) tmp = Float64(2.0 / Float64(Float64(t_m / (l ^ 2.0)) * (k ^ 4.0))); else tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 3.0) / l) * Float64(2.0 * (k ^ 2.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 <= 2.5e-105) tmp = 2.0 / ((t_m / (l ^ 2.0)) * (k ^ 4.0)); else tmp = 2.0 / ((((t_m ^ 3.0) / l) * (2.0 * (k ^ 2.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, 2.5e-105], N[(2.0 / N[(N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] * N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.5 \cdot 10^{-105}:\\
\;\;\;\;\frac{2}{\frac{t\_m}{{\ell}^{2}} \cdot {k}^{4}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\frac{{t\_m}^{3}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}}\\
\end{array}
\end{array}
if t < 2.49999999999999982e-105Initial program 54.3%
Simplified54.3%
add-cube-cbrt54.3%
pow354.3%
*-commutative54.3%
cbrt-prod54.3%
cbrt-div54.2%
rem-cbrt-cube62.6%
cbrt-prod66.9%
pow266.9%
Applied egg-rr66.9%
Taylor expanded in k around inf 65.4%
associate-/l*64.5%
*-commutative64.5%
*-commutative64.5%
times-frac65.9%
Simplified65.9%
Taylor expanded in k around 0 54.0%
associate-/l*55.6%
Simplified55.6%
if 2.49999999999999982e-105 < t Initial program 72.6%
Simplified67.6%
Taylor expanded in k around 0 61.0%
associate-*l/61.1%
Applied egg-rr61.1%
Final simplification57.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 3.5e-105)
(/ 2.0 (* (/ t_m (pow l 2.0)) (pow k 4.0)))
(/ 2.0 (* (/ (/ (pow t_m 3.0) l) l) (* 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 <= 3.5e-105) {
tmp = 2.0 / ((t_m / pow(l, 2.0)) * pow(k, 4.0));
} else {
tmp = 2.0 / (((pow(t_m, 3.0) / l) / l) * (2.0 * pow(k, 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 <= 3.5d-105) then
tmp = 2.0d0 / ((t_m / (l ** 2.0d0)) * (k ** 4.0d0))
else
tmp = 2.0d0 / ((((t_m ** 3.0d0) / l) / l) * (2.0d0 * (k ** 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 <= 3.5e-105) {
tmp = 2.0 / ((t_m / Math.pow(l, 2.0)) * Math.pow(k, 4.0));
} else {
tmp = 2.0 / (((Math.pow(t_m, 3.0) / l) / l) * (2.0 * Math.pow(k, 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 <= 3.5e-105: tmp = 2.0 / ((t_m / math.pow(l, 2.0)) * math.pow(k, 4.0)) else: tmp = 2.0 / (((math.pow(t_m, 3.0) / l) / l) * (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 <= 3.5e-105) tmp = Float64(2.0 / Float64(Float64(t_m / (l ^ 2.0)) * (k ^ 4.0))); else tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 3.0) / l) / l) * Float64(2.0 * (k ^ 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 <= 3.5e-105) tmp = 2.0 / ((t_m / (l ^ 2.0)) * (k ^ 4.0)); else tmp = 2.0 / ((((t_m ^ 3.0) / l) / l) * (2.0 * (k ^ 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, 3.5e-105], N[(2.0 / N[(N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $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 3.5 \cdot 10^{-105}:\\
\;\;\;\;\frac{2}{\frac{t\_m}{{\ell}^{2}} \cdot {k}^{4}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\frac{{t\_m}^{3}}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}\\
\end{array}
\end{array}
if t < 3.5e-105Initial program 54.3%
Simplified54.3%
add-cube-cbrt54.3%
pow354.3%
*-commutative54.3%
cbrt-prod54.3%
cbrt-div54.2%
rem-cbrt-cube62.6%
cbrt-prod66.9%
pow266.9%
Applied egg-rr66.9%
Taylor expanded in k around inf 65.4%
associate-/l*64.5%
*-commutative64.5%
*-commutative64.5%
times-frac65.9%
Simplified65.9%
Taylor expanded in k around 0 54.0%
associate-/l*55.6%
Simplified55.6%
if 3.5e-105 < t Initial program 72.6%
Simplified67.6%
Taylor expanded in k around 0 61.0%
Final simplification57.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 6e-116)
(/ 2.0 (* (/ t_m (pow l 2.0)) (pow k 4.0)))
(* l (/ 2.0 (/ (* (pow t_m 3.0) (* 2.0 (pow k 2.0))) l))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 6e-116) {
tmp = 2.0 / ((t_m / pow(l, 2.0)) * pow(k, 4.0));
} else {
tmp = l * (2.0 / ((pow(t_m, 3.0) * (2.0 * pow(k, 2.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 <= 6d-116) then
tmp = 2.0d0 / ((t_m / (l ** 2.0d0)) * (k ** 4.0d0))
else
tmp = l * (2.0d0 / (((t_m ** 3.0d0) * (2.0d0 * (k ** 2.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 <= 6e-116) {
tmp = 2.0 / ((t_m / Math.pow(l, 2.0)) * Math.pow(k, 4.0));
} else {
tmp = l * (2.0 / ((Math.pow(t_m, 3.0) * (2.0 * Math.pow(k, 2.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 <= 6e-116: tmp = 2.0 / ((t_m / math.pow(l, 2.0)) * math.pow(k, 4.0)) else: tmp = l * (2.0 / ((math.pow(t_m, 3.0) * (2.0 * math.pow(k, 2.0))) / l)) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 6e-116) tmp = Float64(2.0 / Float64(Float64(t_m / (l ^ 2.0)) * (k ^ 4.0))); else tmp = Float64(l * Float64(2.0 / Float64(Float64((t_m ^ 3.0) * Float64(2.0 * (k ^ 2.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 <= 6e-116) tmp = 2.0 / ((t_m / (l ^ 2.0)) * (k ^ 4.0)); else tmp = l * (2.0 / (((t_m ^ 3.0) * (2.0 * (k ^ 2.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, 6e-116], N[(2.0 / N[(N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(2.0 / N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $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 6 \cdot 10^{-116}:\\
\;\;\;\;\frac{2}{\frac{t\_m}{{\ell}^{2}} \cdot {k}^{4}}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{2}{\frac{{t\_m}^{3} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}}\\
\end{array}
\end{array}
if t < 6.00000000000000053e-116Initial program 54.5%
Simplified54.5%
add-cube-cbrt54.4%
pow354.4%
*-commutative54.4%
cbrt-prod54.4%
cbrt-div54.4%
rem-cbrt-cube63.1%
cbrt-prod67.6%
pow267.6%
Applied egg-rr67.6%
Taylor expanded in k around inf 64.8%
associate-/l*63.9%
*-commutative63.9%
*-commutative63.9%
times-frac65.3%
Simplified65.3%
Taylor expanded in k around 0 54.1%
associate-/l*55.8%
Simplified55.8%
if 6.00000000000000053e-116 < t Initial program 71.1%
Simplified66.4%
Taylor expanded in k around 0 60.3%
associate-*l/60.4%
Applied egg-rr60.4%
associate-/r/60.4%
associate-*l/59.4%
Applied egg-rr59.4%
Final simplification57.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(2.0 / Float64(Float64(t_m / (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[(2.0 / N[(N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $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 \frac{2}{\frac{t\_m}{{\ell}^{2}} \cdot {k}^{4}}
\end{array}
Initial program 60.4%
Simplified60.4%
add-cube-cbrt60.3%
pow360.3%
*-commutative60.3%
cbrt-prod60.3%
cbrt-div60.3%
rem-cbrt-cube67.9%
cbrt-prod74.0%
pow274.0%
Applied egg-rr74.0%
Taylor expanded in k around inf 62.8%
associate-/l*62.6%
*-commutative62.6%
*-commutative62.6%
times-frac64.2%
Simplified64.2%
Taylor expanded in k around 0 53.2%
associate-/l*53.8%
Simplified53.8%
Final simplification53.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 (/ 2.0 (* (pow k 4.0) (* t_m (pow l -2.0))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / (pow(k, 4.0) * (t_m * pow(l, -2.0))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / ((k ** 4.0d0) * (t_m * (l ** (-2.0d0)))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / (Math.pow(k, 4.0) * (t_m * Math.pow(l, -2.0))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / (math.pow(k, 4.0) * (t_m * 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(2.0 / Float64((k ^ 4.0) * Float64(t_m * (l ^ -2.0))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / ((k ^ 4.0) * (t_m * (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[(2.0 / N[(N[Power[k, 4.0], $MachinePrecision] * N[(t$95$m * 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{2}{{k}^{4} \cdot \left(t\_m \cdot {\ell}^{-2}\right)}
\end{array}
Initial program 60.4%
Simplified60.4%
add-cube-cbrt60.3%
pow360.3%
*-commutative60.3%
cbrt-prod60.3%
cbrt-div60.3%
rem-cbrt-cube67.9%
cbrt-prod74.0%
pow274.0%
Applied egg-rr74.0%
Taylor expanded in k around inf 62.8%
associate-/l*62.6%
*-commutative62.6%
*-commutative62.6%
times-frac64.2%
Simplified64.2%
Taylor expanded in k around 0 53.2%
associate-/l*53.8%
Simplified53.8%
div-inv53.4%
pow-flip53.4%
metadata-eval53.4%
Applied egg-rr53.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 (* (pow l 2.0) (/ 2.0 (* 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 * (pow(l, 2.0) * (2.0 / (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 * ((l ** 2.0d0) * (2.0d0 / (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 * (Math.pow(l, 2.0) * (2.0 / (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 * (math.pow(l, 2.0) * (2.0 / (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((l ^ 2.0) * Float64(2.0 / 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 * ((l ^ 2.0) * (2.0 / (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[Power[l, 2.0], $MachinePrecision] * N[(2.0 / N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left({\ell}^{2} \cdot \frac{2}{t\_m \cdot {k}^{4}}\right)
\end{array}
Initial program 60.4%
Simplified60.4%
add-cube-cbrt60.3%
pow360.3%
*-commutative60.3%
cbrt-prod60.3%
cbrt-div60.3%
rem-cbrt-cube67.9%
cbrt-prod74.0%
pow274.0%
Applied egg-rr74.0%
Taylor expanded in k around inf 62.8%
associate-/l*62.6%
*-commutative62.6%
*-commutative62.6%
times-frac64.2%
Simplified64.2%
Taylor expanded in k around 0 53.2%
associate-/l*53.8%
Simplified53.8%
div-inv53.8%
pow253.8%
associate-*r/53.2%
pow253.2%
Applied egg-rr53.2%
associate-*r/53.2%
metadata-eval53.2%
associate-/r/53.2%
*-commutative53.2%
Simplified53.2%
Final simplification53.2%
herbie shell --seed 2024103
(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))))