
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (hypot 1.0 (hypot 1.0 (/ k t_m)))))
(*
t_s
(if (<= t_m 1.3e-89)
(*
2.0
(/ (* (pow l 2.0) (cos k)) (* (pow k 2.0) (* t_m (pow (sin k) 2.0)))))
(if (<= t_m 3.5e+99)
(*
(/ (/ (* 2.0 l) (* (pow t_m 3.0) (* (sin k) (tan k)))) t_2)
(/ l t_2))
(/
2.0
(*
(pow (* (/ t_m (pow (cbrt l) 2.0)) (cbrt (sin k))) 3.0)
(* (tan k) (+ 1.0 (+ 1.0 (* (/ k t_m) (/ k t_m))))))))))))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 = hypot(1.0, hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 1.3e-89) {
tmp = 2.0 * ((pow(l, 2.0) * cos(k)) / (pow(k, 2.0) * (t_m * pow(sin(k), 2.0))));
} else if (t_m <= 3.5e+99) {
tmp = (((2.0 * l) / (pow(t_m, 3.0) * (sin(k) * tan(k)))) / t_2) * (l / t_2);
} else {
tmp = 2.0 / (pow(((t_m / pow(cbrt(l), 2.0)) * cbrt(sin(k))), 3.0) * (tan(k) * (1.0 + (1.0 + ((k / t_m) * (k / t_m))))));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.hypot(1.0, Math.hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 1.3e-89) {
tmp = 2.0 * ((Math.pow(l, 2.0) * Math.cos(k)) / (Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0))));
} else if (t_m <= 3.5e+99) {
tmp = (((2.0 * l) / (Math.pow(t_m, 3.0) * (Math.sin(k) * Math.tan(k)))) / t_2) * (l / t_2);
} else {
tmp = 2.0 / (Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * Math.cbrt(Math.sin(k))), 3.0) * (Math.tan(k) * (1.0 + (1.0 + ((k / t_m) * (k / t_m))))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = hypot(1.0, hypot(1.0, Float64(k / t_m))) tmp = 0.0 if (t_m <= 1.3e-89) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) * cos(k)) / Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0))))); elseif (t_m <= 3.5e+99) tmp = Float64(Float64(Float64(Float64(2.0 * l) / Float64((t_m ^ 3.0) * Float64(sin(k) * tan(k)))) / t_2) * Float64(l / t_2)); else tmp = Float64(2.0 / Float64((Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * cbrt(sin(k))) ^ 3.0) * Float64(tan(k) * Float64(1.0 + Float64(1.0 + Float64(Float64(k / t_m) * Float64(k / t_m))))))); 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[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.3e-89], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.5e+99], N[(N[(N[(N[(2.0 * l), $MachinePrecision] / N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision] * N[(l / t$95$2), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision]), $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 := \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.3 \cdot 10^{-89}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}\\
\mathbf{elif}\;t\_m \leq 3.5 \cdot 10^{+99}:\\
\;\;\;\;\frac{\frac{2 \cdot \ell}{{t\_m}^{3} \cdot \left(\sin k \cdot \tan k\right)}}{t\_2} \cdot \frac{\ell}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + \frac{k}{t\_m} \cdot \frac{k}{t\_m}\right)\right)\right)}\\
\end{array}
\end{array}
\end{array}
if t < 1.2999999999999999e-89Initial program 49.1%
associate-/r*49.1%
+-commutative49.1%
unpow249.1%
sqr-neg49.1%
distribute-frac-neg249.1%
distribute-frac-neg249.1%
unpow249.1%
+-commutative49.1%
associate-*l*44.3%
associate-*l/44.4%
associate-/r/44.2%
+-commutative44.2%
associate-+r+44.2%
Simplified44.2%
Taylor expanded in t around 0 63.3%
if 1.2999999999999999e-89 < t < 3.4999999999999998e99Initial program 85.5%
associate-/r*86.0%
+-commutative86.0%
unpow286.0%
sqr-neg86.0%
distribute-frac-neg286.0%
distribute-frac-neg286.0%
unpow286.0%
+-commutative86.0%
associate-*l*83.1%
associate-*l/83.1%
associate-/r/83.3%
+-commutative83.3%
associate-+r+83.3%
Simplified83.3%
associate-*r*86.1%
add-sqr-sqrt85.9%
times-frac85.9%
metadata-eval85.9%
associate-+r+85.9%
add-sqr-sqrt85.9%
hypot-1-def85.9%
unpow285.9%
hypot-1-def85.9%
metadata-eval85.9%
Applied egg-rr94.0%
associate-*l/94.1%
Simplified94.1%
if 3.4999999999999998e99 < t Initial program 78.6%
Simplified78.6%
unpow278.6%
Applied egg-rr78.6%
add-cube-cbrt78.6%
pow378.6%
*-commutative78.6%
cbrt-prod78.6%
cbrt-div78.6%
rem-cbrt-cube89.2%
cbrt-prod99.4%
pow299.4%
Applied egg-rr99.4%
*-commutative99.4%
Simplified99.4%
Final simplification72.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (/ k t_m) 2.0)))
(*
t_s
(if (<= t_m 1.1e-66)
(*
2.0
(/ (* (pow l 2.0) (cos k)) (* (pow k 2.0) (* t_m (pow (sin k) 2.0)))))
(if (<= t_m 2.6e+97)
(*
(* (* 2.0 (pow t_m -3.0)) (/ (/ l (tan k)) (sin k)))
(/ l (+ 2.0 t_2)))
(/
2.0
(*
(pow (/ (* t_m (cbrt (sin k))) (pow (cbrt l) 2.0)) 3.0)
(* (tan k) (+ 1.0 (+ 1.0 t_2))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow((k / t_m), 2.0);
double tmp;
if (t_m <= 1.1e-66) {
tmp = 2.0 * ((pow(l, 2.0) * cos(k)) / (pow(k, 2.0) * (t_m * pow(sin(k), 2.0))));
} else if (t_m <= 2.6e+97) {
tmp = ((2.0 * pow(t_m, -3.0)) * ((l / tan(k)) / sin(k))) * (l / (2.0 + t_2));
} else {
tmp = 2.0 / (pow(((t_m * cbrt(sin(k))) / pow(cbrt(l), 2.0)), 3.0) * (tan(k) * (1.0 + (1.0 + t_2))));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.pow((k / t_m), 2.0);
double tmp;
if (t_m <= 1.1e-66) {
tmp = 2.0 * ((Math.pow(l, 2.0) * Math.cos(k)) / (Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0))));
} else if (t_m <= 2.6e+97) {
tmp = ((2.0 * Math.pow(t_m, -3.0)) * ((l / Math.tan(k)) / Math.sin(k))) * (l / (2.0 + t_2));
} else {
tmp = 2.0 / (Math.pow(((t_m * Math.cbrt(Math.sin(k))) / Math.pow(Math.cbrt(l), 2.0)), 3.0) * (Math.tan(k) * (1.0 + (1.0 + t_2))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(k / t_m) ^ 2.0 tmp = 0.0 if (t_m <= 1.1e-66) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) * cos(k)) / Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0))))); elseif (t_m <= 2.6e+97) tmp = Float64(Float64(Float64(2.0 * (t_m ^ -3.0)) * Float64(Float64(l / tan(k)) / sin(k))) * Float64(l / Float64(2.0 + t_2))); else tmp = Float64(2.0 / Float64((Float64(Float64(t_m * cbrt(sin(k))) / (cbrt(l) ^ 2.0)) ^ 3.0) * Float64(tan(k) * Float64(1.0 + Float64(1.0 + t_2))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.1e-66], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.6e+97], N[(N[(N[(2.0 * N[Power[t$95$m, -3.0], $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + t$95$2), $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}\;t\_m \leq 1.1 \cdot 10^{-66}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}\\
\mathbf{elif}\;t\_m \leq 2.6 \cdot 10^{+97}:\\
\;\;\;\;\left(\left(2 \cdot {t\_m}^{-3}\right) \cdot \frac{\frac{\ell}{\tan k}}{\sin k}\right) \cdot \frac{\ell}{2 + t\_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m \cdot \sqrt[3]{\sin k}}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + t\_2\right)\right)\right)}\\
\end{array}
\end{array}
\end{array}
if t < 1.1000000000000001e-66Initial program 50.2%
associate-/r*50.2%
+-commutative50.2%
unpow250.2%
sqr-neg50.2%
distribute-frac-neg250.2%
distribute-frac-neg250.2%
unpow250.2%
+-commutative50.2%
associate-*l*45.4%
associate-*l/45.6%
associate-/r/45.4%
+-commutative45.4%
associate-+r+45.4%
Simplified45.4%
Taylor expanded in t around 0 64.1%
if 1.1000000000000001e-66 < t < 2.6e97Initial program 86.3%
associate-/r*86.1%
+-commutative86.1%
unpow286.2%
sqr-neg86.2%
distribute-frac-neg286.2%
distribute-frac-neg286.2%
unpow286.1%
+-commutative86.1%
associate-*l*82.6%
associate-*l/82.6%
associate-/r/82.8%
+-commutative82.8%
associate-+r+82.8%
Simplified82.8%
div-inv82.8%
associate-*r*86.1%
associate-*l*86.1%
Applied egg-rr86.1%
associate-*l/86.2%
times-frac86.1%
associate-*r/86.1%
*-rgt-identity86.1%
Simplified86.1%
associate-*r/86.0%
div-inv86.0%
pow-flip86.1%
metadata-eval86.1%
Applied egg-rr86.1%
associate-/l*86.1%
*-commutative86.1%
associate-/r*89.6%
Simplified89.6%
if 2.6e97 < t Initial program 77.2%
Simplified77.2%
add-cube-cbrt77.2%
pow377.2%
*-commutative77.2%
cbrt-prod77.2%
cbrt-div77.2%
rem-cbrt-cube87.0%
cbrt-prod96.4%
pow296.4%
Applied egg-rr96.4%
*-commutative96.4%
Simplified96.4%
associate-*l/96.5%
Applied egg-rr96.5%
Final simplification71.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 5.7e-67)
(*
2.0
(/ (* (pow l 2.0) (cos k)) (* (pow k 2.0) (* t_m (pow (sin k) 2.0)))))
(if (<= t_m 1.1e+96)
(*
(* (* 2.0 (pow t_m -3.0)) (/ (/ l (tan k)) (sin k)))
(/ l (+ 2.0 (pow (/ k t_m) 2.0))))
(/
2.0
(*
(pow (* (/ t_m (pow (cbrt l) 2.0)) (cbrt (sin k))) 3.0)
(* (tan k) (+ 1.0 (+ 1.0 (* (/ k t_m) (/ k t_m)))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5.7e-67) {
tmp = 2.0 * ((pow(l, 2.0) * cos(k)) / (pow(k, 2.0) * (t_m * pow(sin(k), 2.0))));
} else if (t_m <= 1.1e+96) {
tmp = ((2.0 * pow(t_m, -3.0)) * ((l / tan(k)) / sin(k))) * (l / (2.0 + pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / (pow(((t_m / pow(cbrt(l), 2.0)) * cbrt(sin(k))), 3.0) * (tan(k) * (1.0 + (1.0 + ((k / t_m) * (k / t_m))))));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5.7e-67) {
tmp = 2.0 * ((Math.pow(l, 2.0) * Math.cos(k)) / (Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0))));
} else if (t_m <= 1.1e+96) {
tmp = ((2.0 * Math.pow(t_m, -3.0)) * ((l / Math.tan(k)) / Math.sin(k))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / (Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * Math.cbrt(Math.sin(k))), 3.0) * (Math.tan(k) * (1.0 + (1.0 + ((k / t_m) * (k / t_m))))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 5.7e-67) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) * cos(k)) / Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0))))); elseif (t_m <= 1.1e+96) tmp = Float64(Float64(Float64(2.0 * (t_m ^ -3.0)) * Float64(Float64(l / tan(k)) / sin(k))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); else tmp = Float64(2.0 / Float64((Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * cbrt(sin(k))) ^ 3.0) * Float64(tan(k) * Float64(1.0 + Float64(1.0 + Float64(Float64(k / t_m) * Float64(k / t_m))))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 5.7e-67], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.1e+96], N[(N[(N[(2.0 * N[Power[t$95$m, -3.0], $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision]), $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 5.7 \cdot 10^{-67}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}\\
\mathbf{elif}\;t\_m \leq 1.1 \cdot 10^{+96}:\\
\;\;\;\;\left(\left(2 \cdot {t\_m}^{-3}\right) \cdot \frac{\frac{\ell}{\tan k}}{\sin k}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + \frac{k}{t\_m} \cdot \frac{k}{t\_m}\right)\right)\right)}\\
\end{array}
\end{array}
if t < 5.7000000000000002e-67Initial program 50.2%
associate-/r*50.2%
+-commutative50.2%
unpow250.2%
sqr-neg50.2%
distribute-frac-neg250.2%
distribute-frac-neg250.2%
unpow250.2%
+-commutative50.2%
associate-*l*45.4%
associate-*l/45.6%
associate-/r/45.4%
+-commutative45.4%
associate-+r+45.4%
Simplified45.4%
Taylor expanded in t around 0 64.1%
if 5.7000000000000002e-67 < t < 1.0999999999999999e96Initial program 86.3%
associate-/r*86.1%
+-commutative86.1%
unpow286.2%
sqr-neg86.2%
distribute-frac-neg286.2%
distribute-frac-neg286.2%
unpow286.1%
+-commutative86.1%
associate-*l*82.6%
associate-*l/82.6%
associate-/r/82.8%
+-commutative82.8%
associate-+r+82.8%
Simplified82.8%
div-inv82.8%
associate-*r*86.1%
associate-*l*86.1%
Applied egg-rr86.1%
associate-*l/86.2%
times-frac86.1%
associate-*r/86.1%
*-rgt-identity86.1%
Simplified86.1%
associate-*r/86.0%
div-inv86.0%
pow-flip86.1%
metadata-eval86.1%
Applied egg-rr86.1%
associate-/l*86.1%
*-commutative86.1%
associate-/r*89.6%
Simplified89.6%
if 1.0999999999999999e96 < t Initial program 77.2%
Simplified77.2%
unpow277.2%
Applied egg-rr77.2%
add-cube-cbrt77.2%
pow377.2%
*-commutative77.2%
cbrt-prod77.2%
cbrt-div77.2%
rem-cbrt-cube87.0%
cbrt-prod96.4%
pow296.4%
Applied egg-rr96.4%
*-commutative96.4%
Simplified96.4%
Final simplification71.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 8.5e-67)
(* (* 2.0 (pow l 2.0)) (/ (cos k) (* t_m (pow (* k (sin k)) 2.0))))
(if (<= t_m 4e+95)
(*
(* (* 2.0 (pow t_m -3.0)) (/ (/ l (tan k)) (sin k)))
(/ l (+ 2.0 (pow (/ k t_m) 2.0))))
(/
2.0
(*
(pow (* (/ t_m (pow (cbrt l) 2.0)) (cbrt (sin k))) 3.0)
(* 2.0 k)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 8.5e-67) {
tmp = (2.0 * pow(l, 2.0)) * (cos(k) / (t_m * pow((k * sin(k)), 2.0)));
} else if (t_m <= 4e+95) {
tmp = ((2.0 * pow(t_m, -3.0)) * ((l / tan(k)) / sin(k))) * (l / (2.0 + pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / (pow(((t_m / pow(cbrt(l), 2.0)) * cbrt(sin(k))), 3.0) * (2.0 * k));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 8.5e-67) {
tmp = (2.0 * Math.pow(l, 2.0)) * (Math.cos(k) / (t_m * Math.pow((k * Math.sin(k)), 2.0)));
} else if (t_m <= 4e+95) {
tmp = ((2.0 * Math.pow(t_m, -3.0)) * ((l / Math.tan(k)) / Math.sin(k))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / (Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * Math.cbrt(Math.sin(k))), 3.0) * (2.0 * k));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 8.5e-67) tmp = Float64(Float64(2.0 * (l ^ 2.0)) * Float64(cos(k) / Float64(t_m * (Float64(k * sin(k)) ^ 2.0)))); elseif (t_m <= 4e+95) tmp = Float64(Float64(Float64(2.0 * (t_m ^ -3.0)) * Float64(Float64(l / tan(k)) / sin(k))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); else tmp = Float64(2.0 / Float64((Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * cbrt(sin(k))) ^ 3.0) * Float64(2.0 * k))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 8.5e-67], N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4e+95], N[(N[(N[(2.0 * N[Power[t$95$m, -3.0], $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 8.5 \cdot 10^{-67}:\\
\;\;\;\;\left(2 \cdot {\ell}^{2}\right) \cdot \frac{\cos k}{t\_m \cdot {\left(k \cdot \sin k\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 4 \cdot 10^{+95}:\\
\;\;\;\;\left(\left(2 \cdot {t\_m}^{-3}\right) \cdot \frac{\frac{\ell}{\tan k}}{\sin k}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \left(2 \cdot k\right)}\\
\end{array}
\end{array}
if t < 8.49999999999999993e-67Initial program 50.2%
associate-/r*50.2%
+-commutative50.2%
unpow250.2%
sqr-neg50.2%
distribute-frac-neg250.2%
distribute-frac-neg250.2%
unpow250.2%
+-commutative50.2%
associate-*l*45.4%
associate-*l/45.6%
associate-/r/45.4%
+-commutative45.4%
associate-+r+45.4%
Simplified45.4%
Taylor expanded in t around 0 64.1%
associate-*r/64.1%
times-frac63.2%
associate-/r*64.8%
Simplified64.8%
Taylor expanded in k around inf 64.1%
associate-/l*63.5%
associate-*r*63.5%
*-commutative63.5%
associate-*l*62.4%
*-commutative62.4%
unpow262.4%
unpow262.4%
swap-sqr62.4%
unpow262.4%
Simplified62.4%
if 8.49999999999999993e-67 < t < 4.00000000000000008e95Initial program 86.3%
associate-/r*86.1%
+-commutative86.1%
unpow286.2%
sqr-neg86.2%
distribute-frac-neg286.2%
distribute-frac-neg286.2%
unpow286.1%
+-commutative86.1%
associate-*l*82.6%
associate-*l/82.6%
associate-/r/82.8%
+-commutative82.8%
associate-+r+82.8%
Simplified82.8%
div-inv82.8%
associate-*r*86.1%
associate-*l*86.1%
Applied egg-rr86.1%
associate-*l/86.2%
times-frac86.1%
associate-*r/86.1%
*-rgt-identity86.1%
Simplified86.1%
associate-*r/86.0%
div-inv86.0%
pow-flip86.1%
metadata-eval86.1%
Applied egg-rr86.1%
associate-/l*86.1%
*-commutative86.1%
associate-/r*89.6%
Simplified89.6%
if 4.00000000000000008e95 < t Initial program 77.2%
Simplified77.2%
add-cube-cbrt77.2%
pow377.2%
*-commutative77.2%
cbrt-prod77.2%
cbrt-div77.2%
rem-cbrt-cube87.0%
cbrt-prod96.4%
pow296.4%
Applied egg-rr96.4%
*-commutative96.4%
Simplified96.4%
Taylor expanded in k around 0 89.6%
*-commutative80.1%
Simplified89.6%
Final simplification69.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 6.8e-67)
(* (* 2.0 (pow l 2.0)) (/ (cos k) (* t_m (pow (* k (sin k)) 2.0))))
(if (<= t_m 2.5e+97)
(*
(* (* 2.0 (pow t_m -3.0)) (/ (/ l (tan k)) (sin k)))
(/ l (+ 2.0 (pow (/ k t_m) 2.0))))
(/
2.0
(*
(pow (/ (* t_m (cbrt (sin k))) (pow (cbrt l) 2.0)) 3.0)
(* 2.0 k)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 6.8e-67) {
tmp = (2.0 * pow(l, 2.0)) * (cos(k) / (t_m * pow((k * sin(k)), 2.0)));
} else if (t_m <= 2.5e+97) {
tmp = ((2.0 * pow(t_m, -3.0)) * ((l / tan(k)) / sin(k))) * (l / (2.0 + pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / (pow(((t_m * cbrt(sin(k))) / pow(cbrt(l), 2.0)), 3.0) * (2.0 * k));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 6.8e-67) {
tmp = (2.0 * Math.pow(l, 2.0)) * (Math.cos(k) / (t_m * Math.pow((k * Math.sin(k)), 2.0)));
} else if (t_m <= 2.5e+97) {
tmp = ((2.0 * Math.pow(t_m, -3.0)) * ((l / Math.tan(k)) / Math.sin(k))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / (Math.pow(((t_m * Math.cbrt(Math.sin(k))) / Math.pow(Math.cbrt(l), 2.0)), 3.0) * (2.0 * k));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 6.8e-67) tmp = Float64(Float64(2.0 * (l ^ 2.0)) * Float64(cos(k) / Float64(t_m * (Float64(k * sin(k)) ^ 2.0)))); elseif (t_m <= 2.5e+97) tmp = Float64(Float64(Float64(2.0 * (t_m ^ -3.0)) * Float64(Float64(l / tan(k)) / sin(k))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); else tmp = Float64(2.0 / Float64((Float64(Float64(t_m * cbrt(sin(k))) / (cbrt(l) ^ 2.0)) ^ 3.0) * Float64(2.0 * k))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 6.8e-67], N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.5e+97], N[(N[(N[(2.0 * N[Power[t$95$m, -3.0], $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 6.8 \cdot 10^{-67}:\\
\;\;\;\;\left(2 \cdot {\ell}^{2}\right) \cdot \frac{\cos k}{t\_m \cdot {\left(k \cdot \sin k\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 2.5 \cdot 10^{+97}:\\
\;\;\;\;\left(\left(2 \cdot {t\_m}^{-3}\right) \cdot \frac{\frac{\ell}{\tan k}}{\sin k}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m \cdot \sqrt[3]{\sin k}}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot k\right)}\\
\end{array}
\end{array}
if t < 6.8000000000000002e-67Initial program 50.2%
associate-/r*50.2%
+-commutative50.2%
unpow250.2%
sqr-neg50.2%
distribute-frac-neg250.2%
distribute-frac-neg250.2%
unpow250.2%
+-commutative50.2%
associate-*l*45.4%
associate-*l/45.6%
associate-/r/45.4%
+-commutative45.4%
associate-+r+45.4%
Simplified45.4%
Taylor expanded in t around 0 64.1%
associate-*r/64.1%
times-frac63.2%
associate-/r*64.8%
Simplified64.8%
Taylor expanded in k around inf 64.1%
associate-/l*63.5%
associate-*r*63.5%
*-commutative63.5%
associate-*l*62.4%
*-commutative62.4%
unpow262.4%
unpow262.4%
swap-sqr62.4%
unpow262.4%
Simplified62.4%
if 6.8000000000000002e-67 < t < 2.49999999999999999e97Initial program 86.3%
associate-/r*86.1%
+-commutative86.1%
unpow286.2%
sqr-neg86.2%
distribute-frac-neg286.2%
distribute-frac-neg286.2%
unpow286.1%
+-commutative86.1%
associate-*l*82.6%
associate-*l/82.6%
associate-/r/82.8%
+-commutative82.8%
associate-+r+82.8%
Simplified82.8%
div-inv82.8%
associate-*r*86.1%
associate-*l*86.1%
Applied egg-rr86.1%
associate-*l/86.2%
times-frac86.1%
associate-*r/86.1%
*-rgt-identity86.1%
Simplified86.1%
associate-*r/86.0%
div-inv86.0%
pow-flip86.1%
metadata-eval86.1%
Applied egg-rr86.1%
associate-/l*86.1%
*-commutative86.1%
associate-/r*89.6%
Simplified89.6%
if 2.49999999999999999e97 < t Initial program 77.2%
Simplified77.2%
add-cube-cbrt77.2%
pow377.2%
*-commutative77.2%
cbrt-prod77.2%
cbrt-div77.2%
rem-cbrt-cube87.0%
cbrt-prod96.4%
pow296.4%
Applied egg-rr96.4%
*-commutative96.4%
Simplified96.4%
associate-*l/96.5%
Applied egg-rr96.5%
Taylor expanded in k around 0 89.7%
*-commutative80.1%
Simplified89.7%
Final simplification69.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.4e-65)
(*
2.0
(/ (* (pow l 2.0) (cos k)) (* (pow k 2.0) (* t_m (pow (sin k) 2.0)))))
(if (<= t_m 3.05e+97)
(*
(* (* 2.0 (pow t_m -3.0)) (/ (/ l (tan k)) (sin k)))
(/ l (+ 2.0 (pow (/ k t_m) 2.0))))
(/
2.0
(*
(pow (/ (* t_m (cbrt (sin k))) (pow (cbrt l) 2.0)) 3.0)
(* 2.0 k)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.4e-65) {
tmp = 2.0 * ((pow(l, 2.0) * cos(k)) / (pow(k, 2.0) * (t_m * pow(sin(k), 2.0))));
} else if (t_m <= 3.05e+97) {
tmp = ((2.0 * pow(t_m, -3.0)) * ((l / tan(k)) / sin(k))) * (l / (2.0 + pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / (pow(((t_m * cbrt(sin(k))) / pow(cbrt(l), 2.0)), 3.0) * (2.0 * k));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.4e-65) {
tmp = 2.0 * ((Math.pow(l, 2.0) * Math.cos(k)) / (Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0))));
} else if (t_m <= 3.05e+97) {
tmp = ((2.0 * Math.pow(t_m, -3.0)) * ((l / Math.tan(k)) / Math.sin(k))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / (Math.pow(((t_m * Math.cbrt(Math.sin(k))) / Math.pow(Math.cbrt(l), 2.0)), 3.0) * (2.0 * k));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.4e-65) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) * cos(k)) / Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0))))); elseif (t_m <= 3.05e+97) tmp = Float64(Float64(Float64(2.0 * (t_m ^ -3.0)) * Float64(Float64(l / tan(k)) / sin(k))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); else tmp = Float64(2.0 / Float64((Float64(Float64(t_m * cbrt(sin(k))) / (cbrt(l) ^ 2.0)) ^ 3.0) * Float64(2.0 * k))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.4e-65], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.05e+97], N[(N[(N[(2.0 * N[Power[t$95$m, -3.0], $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.4 \cdot 10^{-65}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}\\
\mathbf{elif}\;t\_m \leq 3.05 \cdot 10^{+97}:\\
\;\;\;\;\left(\left(2 \cdot {t\_m}^{-3}\right) \cdot \frac{\frac{\ell}{\tan k}}{\sin k}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m \cdot \sqrt[3]{\sin k}}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot k\right)}\\
\end{array}
\end{array}
if t < 1.4e-65Initial program 50.2%
associate-/r*50.2%
+-commutative50.2%
unpow250.2%
sqr-neg50.2%
distribute-frac-neg250.2%
distribute-frac-neg250.2%
unpow250.2%
+-commutative50.2%
associate-*l*45.4%
associate-*l/45.6%
associate-/r/45.4%
+-commutative45.4%
associate-+r+45.4%
Simplified45.4%
Taylor expanded in t around 0 64.1%
if 1.4e-65 < t < 3.05e97Initial program 86.3%
associate-/r*86.1%
+-commutative86.1%
unpow286.2%
sqr-neg86.2%
distribute-frac-neg286.2%
distribute-frac-neg286.2%
unpow286.1%
+-commutative86.1%
associate-*l*82.6%
associate-*l/82.6%
associate-/r/82.8%
+-commutative82.8%
associate-+r+82.8%
Simplified82.8%
div-inv82.8%
associate-*r*86.1%
associate-*l*86.1%
Applied egg-rr86.1%
associate-*l/86.2%
times-frac86.1%
associate-*r/86.1%
*-rgt-identity86.1%
Simplified86.1%
associate-*r/86.0%
div-inv86.0%
pow-flip86.1%
metadata-eval86.1%
Applied egg-rr86.1%
associate-/l*86.1%
*-commutative86.1%
associate-/r*89.6%
Simplified89.6%
if 3.05e97 < t Initial program 77.2%
Simplified77.2%
add-cube-cbrt77.2%
pow377.2%
*-commutative77.2%
cbrt-prod77.2%
cbrt-div77.2%
rem-cbrt-cube87.0%
cbrt-prod96.4%
pow296.4%
Applied egg-rr96.4%
*-commutative96.4%
Simplified96.4%
associate-*l/96.5%
Applied egg-rr96.5%
Taylor expanded in k around 0 89.7%
*-commutative80.1%
Simplified89.7%
Final simplification70.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 5.5e-67)
(* (* 2.0 (pow l 2.0)) (/ (cos k) (* t_m (pow (* k (sin k)) 2.0))))
(if (<= t_m 2.9e+97)
(*
(* (* 2.0 (pow t_m -3.0)) (/ (/ l (tan k)) (sin k)))
(/ l (+ 2.0 (pow (/ k t_m) 2.0))))
(/
2.0
(*
(* (tan k) (+ 1.0 (+ 1.0 (* (/ k t_m) (/ k t_m)))))
(* (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 <= 5.5e-67) {
tmp = (2.0 * pow(l, 2.0)) * (cos(k) / (t_m * pow((k * sin(k)), 2.0)));
} else if (t_m <= 2.9e+97) {
tmp = ((2.0 * pow(t_m, -3.0)) * ((l / tan(k)) / sin(k))) * (l / (2.0 + pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + ((k / t_m) * (k / t_m))))) * (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 <= 5.5d-67) then
tmp = (2.0d0 * (l ** 2.0d0)) * (cos(k) / (t_m * ((k * sin(k)) ** 2.0d0)))
else if (t_m <= 2.9d+97) then
tmp = ((2.0d0 * (t_m ** (-3.0d0))) * ((l / tan(k)) / sin(k))) * (l / (2.0d0 + ((k / t_m) ** 2.0d0)))
else
tmp = 2.0d0 / ((tan(k) * (1.0d0 + (1.0d0 + ((k / t_m) * (k / t_m))))) * (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 <= 5.5e-67) {
tmp = (2.0 * Math.pow(l, 2.0)) * (Math.cos(k) / (t_m * Math.pow((k * Math.sin(k)), 2.0)));
} else if (t_m <= 2.9e+97) {
tmp = ((2.0 * Math.pow(t_m, -3.0)) * ((l / Math.tan(k)) / Math.sin(k))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (1.0 + ((k / t_m) * (k / t_m))))) * (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 <= 5.5e-67: tmp = (2.0 * math.pow(l, 2.0)) * (math.cos(k) / (t_m * math.pow((k * math.sin(k)), 2.0))) elif t_m <= 2.9e+97: tmp = ((2.0 * math.pow(t_m, -3.0)) * ((l / math.tan(k)) / math.sin(k))) * (l / (2.0 + math.pow((k / t_m), 2.0))) else: tmp = 2.0 / ((math.tan(k) * (1.0 + (1.0 + ((k / t_m) * (k / t_m))))) * (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 <= 5.5e-67) tmp = Float64(Float64(2.0 * (l ^ 2.0)) * Float64(cos(k) / Float64(t_m * (Float64(k * sin(k)) ^ 2.0)))); elseif (t_m <= 2.9e+97) tmp = Float64(Float64(Float64(2.0 * (t_m ^ -3.0)) * Float64(Float64(l / tan(k)) / sin(k))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(1.0 + Float64(Float64(k / t_m) * Float64(k / t_m))))) * 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 <= 5.5e-67) tmp = (2.0 * (l ^ 2.0)) * (cos(k) / (t_m * ((k * sin(k)) ^ 2.0))); elseif (t_m <= 2.9e+97) tmp = ((2.0 * (t_m ^ -3.0)) * ((l / tan(k)) / sin(k))) * (l / (2.0 + ((k / t_m) ^ 2.0))); else tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + ((k / t_m) * (k / t_m))))) * (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, 5.5e-67], N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.9e+97], N[(N[(N[(2.0 * N[Power[t$95$m, -3.0], $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision]), $MachinePrecision]), $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 5.5 \cdot 10^{-67}:\\
\;\;\;\;\left(2 \cdot {\ell}^{2}\right) \cdot \frac{\cos k}{t\_m \cdot {\left(k \cdot \sin k\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 2.9 \cdot 10^{+97}:\\
\;\;\;\;\left(\left(2 \cdot {t\_m}^{-3}\right) \cdot \frac{\frac{\ell}{\tan k}}{\sin k}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(1 + \frac{k}{t\_m} \cdot \frac{k}{t\_m}\right)\right)\right) \cdot \left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\right)}\\
\end{array}
\end{array}
if t < 5.5000000000000003e-67Initial program 50.2%
associate-/r*50.2%
+-commutative50.2%
unpow250.2%
sqr-neg50.2%
distribute-frac-neg250.2%
distribute-frac-neg250.2%
unpow250.2%
+-commutative50.2%
associate-*l*45.4%
associate-*l/45.6%
associate-/r/45.4%
+-commutative45.4%
associate-+r+45.4%
Simplified45.4%
Taylor expanded in t around 0 64.1%
associate-*r/64.1%
times-frac63.2%
associate-/r*64.8%
Simplified64.8%
Taylor expanded in k around inf 64.1%
associate-/l*63.5%
associate-*r*63.5%
*-commutative63.5%
associate-*l*62.4%
*-commutative62.4%
unpow262.4%
unpow262.4%
swap-sqr62.4%
unpow262.4%
Simplified62.4%
if 5.5000000000000003e-67 < t < 2.89999999999999987e97Initial program 86.3%
associate-/r*86.1%
+-commutative86.1%
unpow286.2%
sqr-neg86.2%
distribute-frac-neg286.2%
distribute-frac-neg286.2%
unpow286.1%
+-commutative86.1%
associate-*l*82.6%
associate-*l/82.6%
associate-/r/82.8%
+-commutative82.8%
associate-+r+82.8%
Simplified82.8%
div-inv82.8%
associate-*r*86.1%
associate-*l*86.1%
Applied egg-rr86.1%
associate-*l/86.2%
times-frac86.1%
associate-*r/86.1%
*-rgt-identity86.1%
Simplified86.1%
associate-*r/86.0%
div-inv86.0%
pow-flip86.1%
metadata-eval86.1%
Applied egg-rr86.1%
associate-/l*86.1%
*-commutative86.1%
associate-/r*89.6%
Simplified89.6%
if 2.89999999999999987e97 < t Initial program 77.2%
Simplified77.2%
unpow277.2%
Applied egg-rr77.2%
add-sqr-sqrt77.2%
pow277.2%
sqrt-div77.2%
sqrt-pow184.6%
metadata-eval84.6%
sqrt-prod64.3%
add-sqr-sqrt92.2%
Applied egg-rr92.2%
Final simplification70.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1e-66)
(* (* 2.0 (pow l 2.0)) (/ (cos k) (* t_m (pow (* k (sin k)) 2.0))))
(if (<= t_m 1.35e+93)
(*
(* (* 2.0 (pow t_m -3.0)) (/ (/ l (tan k)) (sin k)))
(/ l (+ 2.0 (pow (/ k t_m) 2.0))))
(/
2.0
(*
(* (tan k) (+ 1.0 (+ 1.0 (* (/ k t_m) (/ k t_m)))))
(* (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 <= 1e-66) {
tmp = (2.0 * pow(l, 2.0)) * (cos(k) / (t_m * pow((k * sin(k)), 2.0)));
} else if (t_m <= 1.35e+93) {
tmp = ((2.0 * pow(t_m, -3.0)) * ((l / tan(k)) / sin(k))) * (l / (2.0 + pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + ((k / t_m) * (k / t_m))))) * (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 <= 1d-66) then
tmp = (2.0d0 * (l ** 2.0d0)) * (cos(k) / (t_m * ((k * sin(k)) ** 2.0d0)))
else if (t_m <= 1.35d+93) then
tmp = ((2.0d0 * (t_m ** (-3.0d0))) * ((l / tan(k)) / sin(k))) * (l / (2.0d0 + ((k / t_m) ** 2.0d0)))
else
tmp = 2.0d0 / ((tan(k) * (1.0d0 + (1.0d0 + ((k / t_m) * (k / t_m))))) * (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 <= 1e-66) {
tmp = (2.0 * Math.pow(l, 2.0)) * (Math.cos(k) / (t_m * Math.pow((k * Math.sin(k)), 2.0)));
} else if (t_m <= 1.35e+93) {
tmp = ((2.0 * Math.pow(t_m, -3.0)) * ((l / Math.tan(k)) / Math.sin(k))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (1.0 + ((k / t_m) * (k / t_m))))) * (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 <= 1e-66: tmp = (2.0 * math.pow(l, 2.0)) * (math.cos(k) / (t_m * math.pow((k * math.sin(k)), 2.0))) elif t_m <= 1.35e+93: tmp = ((2.0 * math.pow(t_m, -3.0)) * ((l / math.tan(k)) / math.sin(k))) * (l / (2.0 + math.pow((k / t_m), 2.0))) else: tmp = 2.0 / ((math.tan(k) * (1.0 + (1.0 + ((k / t_m) * (k / t_m))))) * (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 <= 1e-66) tmp = Float64(Float64(2.0 * (l ^ 2.0)) * Float64(cos(k) / Float64(t_m * (Float64(k * sin(k)) ^ 2.0)))); elseif (t_m <= 1.35e+93) tmp = Float64(Float64(Float64(2.0 * (t_m ^ -3.0)) * Float64(Float64(l / tan(k)) / sin(k))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(1.0 + Float64(Float64(k / t_m) * Float64(k / t_m))))) * 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 <= 1e-66) tmp = (2.0 * (l ^ 2.0)) * (cos(k) / (t_m * ((k * sin(k)) ^ 2.0))); elseif (t_m <= 1.35e+93) tmp = ((2.0 * (t_m ^ -3.0)) * ((l / tan(k)) / sin(k))) * (l / (2.0 + ((k / t_m) ^ 2.0))); else tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + ((k / t_m) * (k / t_m))))) * (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, 1e-66], N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.35e+93], N[(N[(N[(2.0 * N[Power[t$95$m, -3.0], $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision]), $MachinePrecision]), $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 10^{-66}:\\
\;\;\;\;\left(2 \cdot {\ell}^{2}\right) \cdot \frac{\cos k}{t\_m \cdot {\left(k \cdot \sin k\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 1.35 \cdot 10^{+93}:\\
\;\;\;\;\left(\left(2 \cdot {t\_m}^{-3}\right) \cdot \frac{\frac{\ell}{\tan k}}{\sin k}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(1 + \frac{k}{t\_m} \cdot \frac{k}{t\_m}\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 < 9.9999999999999998e-67Initial program 50.2%
associate-/r*50.2%
+-commutative50.2%
unpow250.2%
sqr-neg50.2%
distribute-frac-neg250.2%
distribute-frac-neg250.2%
unpow250.2%
+-commutative50.2%
associate-*l*45.4%
associate-*l/45.6%
associate-/r/45.4%
+-commutative45.4%
associate-+r+45.4%
Simplified45.4%
Taylor expanded in t around 0 64.1%
associate-*r/64.1%
times-frac63.2%
associate-/r*64.8%
Simplified64.8%
Taylor expanded in k around inf 64.1%
associate-/l*63.5%
associate-*r*63.5%
*-commutative63.5%
associate-*l*62.4%
*-commutative62.4%
unpow262.4%
unpow262.4%
swap-sqr62.4%
unpow262.4%
Simplified62.4%
if 9.9999999999999998e-67 < t < 1.35e93Initial program 86.3%
associate-/r*86.1%
+-commutative86.1%
unpow286.2%
sqr-neg86.2%
distribute-frac-neg286.2%
distribute-frac-neg286.2%
unpow286.1%
+-commutative86.1%
associate-*l*82.6%
associate-*l/82.6%
associate-/r/82.8%
+-commutative82.8%
associate-+r+82.8%
Simplified82.8%
div-inv82.8%
associate-*r*86.1%
associate-*l*86.1%
Applied egg-rr86.1%
associate-*l/86.2%
times-frac86.1%
associate-*r/86.1%
*-rgt-identity86.1%
Simplified86.1%
associate-*r/86.0%
div-inv86.0%
pow-flip86.1%
metadata-eval86.1%
Applied egg-rr86.1%
associate-/l*86.1%
*-commutative86.1%
associate-/r*89.6%
Simplified89.6%
if 1.35e93 < t Initial program 77.2%
Simplified77.2%
unpow277.2%
Applied egg-rr77.2%
unpow377.2%
times-frac92.2%
pow292.2%
Applied egg-rr92.2%
Final simplification70.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 6.8e-90)
(* (* 2.0 (pow l 2.0)) (/ (cos k) (* t_m (pow (* k (sin k)) 2.0))))
(/
2.0
(*
(* (tan k) (+ 1.0 (+ 1.0 (* (/ k t_m) (/ k t_m)))))
(* (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 <= 6.8e-90) {
tmp = (2.0 * pow(l, 2.0)) * (cos(k) / (t_m * pow((k * sin(k)), 2.0)));
} else {
tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + ((k / t_m) * (k / t_m))))) * (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 <= 6.8d-90) then
tmp = (2.0d0 * (l ** 2.0d0)) * (cos(k) / (t_m * ((k * sin(k)) ** 2.0d0)))
else
tmp = 2.0d0 / ((tan(k) * (1.0d0 + (1.0d0 + ((k / t_m) * (k / t_m))))) * (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 <= 6.8e-90) {
tmp = (2.0 * Math.pow(l, 2.0)) * (Math.cos(k) / (t_m * Math.pow((k * Math.sin(k)), 2.0)));
} else {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (1.0 + ((k / t_m) * (k / t_m))))) * (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 <= 6.8e-90: tmp = (2.0 * math.pow(l, 2.0)) * (math.cos(k) / (t_m * math.pow((k * math.sin(k)), 2.0))) else: tmp = 2.0 / ((math.tan(k) * (1.0 + (1.0 + ((k / t_m) * (k / t_m))))) * (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 <= 6.8e-90) tmp = Float64(Float64(2.0 * (l ^ 2.0)) * Float64(cos(k) / Float64(t_m * (Float64(k * sin(k)) ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(1.0 + Float64(Float64(k / t_m) * Float64(k / t_m))))) * 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 <= 6.8e-90) tmp = (2.0 * (l ^ 2.0)) * (cos(k) / (t_m * ((k * sin(k)) ^ 2.0))); else tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + ((k / t_m) * (k / t_m))))) * (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, 6.8e-90], N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision]), $MachinePrecision]), $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 6.8 \cdot 10^{-90}:\\
\;\;\;\;\left(2 \cdot {\ell}^{2}\right) \cdot \frac{\cos k}{t\_m \cdot {\left(k \cdot \sin k\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(1 + \frac{k}{t\_m} \cdot \frac{k}{t\_m}\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 < 6.79999999999999988e-90Initial program 49.1%
associate-/r*49.1%
+-commutative49.1%
unpow249.1%
sqr-neg49.1%
distribute-frac-neg249.1%
distribute-frac-neg249.1%
unpow249.1%
+-commutative49.1%
associate-*l*44.3%
associate-*l/44.4%
associate-/r/44.2%
+-commutative44.2%
associate-+r+44.2%
Simplified44.2%
Taylor expanded in t around 0 63.3%
associate-*r/63.3%
times-frac62.5%
associate-/r*64.0%
Simplified64.0%
Taylor expanded in k around inf 63.3%
associate-/l*62.7%
associate-*r*62.7%
*-commutative62.7%
associate-*l*61.6%
*-commutative61.6%
unpow261.6%
unpow261.6%
swap-sqr61.6%
unpow261.6%
Simplified61.6%
if 6.79999999999999988e-90 < t Initial program 82.0%
Simplified81.9%
unpow282.0%
Applied egg-rr82.0%
unpow381.9%
times-frac90.3%
pow290.3%
Applied egg-rr90.3%
Final simplification69.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 9.2e-20)
(/ 2.0 (* (* 2.0 k) (pow (* (/ (pow t_m 1.5) l) (sqrt (sin k))) 2.0)))
(* (* 2.0 (pow l 2.0)) (/ (cos k) (* t_m (pow (* k (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 <= 9.2e-20) {
tmp = 2.0 / ((2.0 * k) * pow(((pow(t_m, 1.5) / l) * sqrt(sin(k))), 2.0));
} else {
tmp = (2.0 * pow(l, 2.0)) * (cos(k) / (t_m * pow((k * sin(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 (k <= 9.2d-20) then
tmp = 2.0d0 / ((2.0d0 * k) * ((((t_m ** 1.5d0) / l) * sqrt(sin(k))) ** 2.0d0))
else
tmp = (2.0d0 * (l ** 2.0d0)) * (cos(k) / (t_m * ((k * sin(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 (k <= 9.2e-20) {
tmp = 2.0 / ((2.0 * k) * Math.pow(((Math.pow(t_m, 1.5) / l) * Math.sqrt(Math.sin(k))), 2.0));
} else {
tmp = (2.0 * Math.pow(l, 2.0)) * (Math.cos(k) / (t_m * Math.pow((k * Math.sin(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 k <= 9.2e-20: tmp = 2.0 / ((2.0 * k) * math.pow(((math.pow(t_m, 1.5) / l) * math.sqrt(math.sin(k))), 2.0)) else: tmp = (2.0 * math.pow(l, 2.0)) * (math.cos(k) / (t_m * math.pow((k * 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 <= 9.2e-20) tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(Float64((t_m ^ 1.5) / l) * sqrt(sin(k))) ^ 2.0))); else tmp = Float64(Float64(2.0 * (l ^ 2.0)) * Float64(cos(k) / Float64(t_m * (Float64(k * sin(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 (k <= 9.2e-20) tmp = 2.0 / ((2.0 * k) * ((((t_m ^ 1.5) / l) * sqrt(sin(k))) ^ 2.0)); else tmp = (2.0 * (l ^ 2.0)) * (cos(k) / (t_m * ((k * sin(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[k, 9.2e-20], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Sin[k], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 9.2 \cdot 10^{-20}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot {\ell}^{2}\right) \cdot \frac{\cos k}{t\_m \cdot {\left(k \cdot \sin k\right)}^{2}}\\
\end{array}
\end{array}
if k < 9.1999999999999997e-20Initial program 62.1%
Simplified62.1%
add-sqr-sqrt28.9%
pow228.9%
*-commutative28.9%
sqrt-prod11.4%
sqrt-div11.4%
sqrt-pow113.1%
metadata-eval13.1%
sqrt-prod8.5%
add-sqr-sqrt14.2%
Applied egg-rr14.2%
*-commutative14.2%
Simplified14.2%
Taylor expanded in k around 0 13.3%
*-commutative64.8%
Simplified13.3%
if 9.1999999999999997e-20 < k Initial program 50.0%
associate-/r*50.3%
+-commutative50.3%
unpow250.3%
sqr-neg50.3%
distribute-frac-neg250.3%
distribute-frac-neg250.3%
unpow250.3%
+-commutative50.3%
associate-*l*50.3%
associate-*l/50.3%
associate-/r/50.3%
+-commutative50.3%
associate-+r+50.3%
Simplified50.3%
Taylor expanded in t around 0 72.8%
associate-*r/72.8%
times-frac70.5%
associate-/r*70.5%
Simplified70.5%
Taylor expanded in k around inf 72.8%
associate-/l*71.7%
associate-*r*71.7%
*-commutative71.7%
associate-*l*71.7%
*-commutative71.7%
unpow271.7%
unpow271.7%
swap-sqr71.7%
unpow271.7%
Simplified71.7%
Final simplification31.6%
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 t_m 3.0) l) l)))
(*
t_s
(if (<= t_m 2.25e-90)
(* 2.0 (pow (/ l (* (pow k 2.0) (sqrt t_m))) 2.0))
(if (<= t_m 4e+99)
(/ 2.0 (* t_2 (* (* (sin k) (tan k)) (+ 2.0 (/ (/ k t_m) (/ t_m k))))))
(/ 2.0 (* (* 2.0 k) (* (sin k) t_2))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = (pow(t_m, 3.0) / l) / l;
double tmp;
if (t_m <= 2.25e-90) {
tmp = 2.0 * pow((l / (pow(k, 2.0) * sqrt(t_m))), 2.0);
} else if (t_m <= 4e+99) {
tmp = 2.0 / (t_2 * ((sin(k) * tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))));
} else {
tmp = 2.0 / ((2.0 * k) * (sin(k) * t_2));
}
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 = ((t_m ** 3.0d0) / l) / l
if (t_m <= 2.25d-90) then
tmp = 2.0d0 * ((l / ((k ** 2.0d0) * sqrt(t_m))) ** 2.0d0)
else if (t_m <= 4d+99) then
tmp = 2.0d0 / (t_2 * ((sin(k) * tan(k)) * (2.0d0 + ((k / t_m) / (t_m / k)))))
else
tmp = 2.0d0 / ((2.0d0 * k) * (sin(k) * t_2))
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(t_m, 3.0) / l) / l;
double tmp;
if (t_m <= 2.25e-90) {
tmp = 2.0 * Math.pow((l / (Math.pow(k, 2.0) * Math.sqrt(t_m))), 2.0);
} else if (t_m <= 4e+99) {
tmp = 2.0 / (t_2 * ((Math.sin(k) * Math.tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))));
} else {
tmp = 2.0 / ((2.0 * k) * (Math.sin(k) * t_2));
}
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(t_m, 3.0) / l) / l tmp = 0 if t_m <= 2.25e-90: tmp = 2.0 * math.pow((l / (math.pow(k, 2.0) * math.sqrt(t_m))), 2.0) elif t_m <= 4e+99: tmp = 2.0 / (t_2 * ((math.sin(k) * math.tan(k)) * (2.0 + ((k / t_m) / (t_m / k))))) else: tmp = 2.0 / ((2.0 * k) * (math.sin(k) * t_2)) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(Float64((t_m ^ 3.0) / l) / l) tmp = 0.0 if (t_m <= 2.25e-90) tmp = Float64(2.0 * (Float64(l / Float64((k ^ 2.0) * sqrt(t_m))) ^ 2.0)); elseif (t_m <= 4e+99) tmp = Float64(2.0 / Float64(t_2 * Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + Float64(Float64(k / t_m) / Float64(t_m / k)))))); else tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(sin(k) * t_2))); 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 = ((t_m ^ 3.0) / l) / l; tmp = 0.0; if (t_m <= 2.25e-90) tmp = 2.0 * ((l / ((k ^ 2.0) * sqrt(t_m))) ^ 2.0); elseif (t_m <= 4e+99) tmp = 2.0 / (t_2 * ((sin(k) * tan(k)) * (2.0 + ((k / t_m) / (t_m / k))))); else tmp = 2.0 / ((2.0 * k) * (sin(k) * t_2)); 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[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.25e-90], N[(2.0 * N[Power[N[(l / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4e+99], N[(2.0 / N[(t$95$2 * N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{\frac{{t\_m}^{3}}{\ell}}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.25 \cdot 10^{-90}:\\
\;\;\;\;2 \cdot {\left(\frac{\ell}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{2}\\
\mathbf{elif}\;t\_m \leq 4 \cdot 10^{+99}:\\
\;\;\;\;\frac{2}{t\_2 \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot t\_2\right)}\\
\end{array}
\end{array}
\end{array}
if t < 2.25000000000000004e-90Initial program 49.1%
associate-/r*49.1%
+-commutative49.1%
unpow249.1%
sqr-neg49.1%
distribute-frac-neg249.1%
distribute-frac-neg249.1%
unpow249.1%
+-commutative49.1%
associate-*l*44.3%
associate-*l/44.4%
associate-/r/44.2%
+-commutative44.2%
associate-+r+44.2%
Simplified44.2%
Taylor expanded in t around 0 63.3%
associate-*r/63.3%
times-frac62.5%
associate-/r*64.0%
Simplified64.0%
Taylor expanded in k around 0 50.1%
pow250.1%
add-sqr-sqrt34.2%
sqrt-div14.4%
sqrt-prod7.2%
add-sqr-sqrt8.5%
*-commutative8.5%
sqrt-prod8.5%
sqrt-pow18.5%
metadata-eval8.5%
sqrt-div8.5%
sqrt-prod7.7%
add-sqr-sqrt15.3%
*-commutative15.3%
sqrt-prod15.3%
sqrt-pow115.4%
metadata-eval15.4%
Applied egg-rr15.4%
unpow215.4%
*-commutative15.4%
Simplified15.4%
if 2.25000000000000004e-90 < t < 3.9999999999999999e99Initial program 85.5%
Simplified82.8%
unpow282.8%
clear-num82.8%
un-div-inv82.8%
Applied egg-rr82.8%
if 3.9999999999999999e99 < t Initial program 78.6%
Simplified78.6%
associate-/r*81.7%
div-inv81.7%
add-cube-cbrt81.7%
associate-*l*81.7%
pow281.7%
cbrt-div81.7%
rem-cbrt-cube81.7%
cbrt-div81.7%
rem-cbrt-cube94.6%
Applied egg-rr94.6%
associate-*r*92.0%
pow-plus92.0%
metadata-eval92.0%
add-cbrt-cube81.7%
unpow381.7%
cbrt-div81.7%
pow381.7%
add-cube-cbrt81.7%
div-inv81.7%
Applied egg-rr81.7%
Taylor expanded in k around 0 81.7%
*-commutative81.7%
Simplified81.7%
Final simplification34.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.85e-126)
(* 2.0 (pow (/ l (* (pow k 2.0) (sqrt t_m))) 2.0))
(/
2.0
(*
(* (tan k) (+ 1.0 (+ 1.0 (* (/ k t_m) (/ k t_m)))))
(* (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.85e-126) {
tmp = 2.0 * pow((l / (pow(k, 2.0) * sqrt(t_m))), 2.0);
} else {
tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + ((k / t_m) * (k / t_m))))) * (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.85d-126) then
tmp = 2.0d0 * ((l / ((k ** 2.0d0) * sqrt(t_m))) ** 2.0d0)
else
tmp = 2.0d0 / ((tan(k) * (1.0d0 + (1.0d0 + ((k / t_m) * (k / t_m))))) * (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.85e-126) {
tmp = 2.0 * Math.pow((l / (Math.pow(k, 2.0) * Math.sqrt(t_m))), 2.0);
} else {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (1.0 + ((k / t_m) * (k / t_m))))) * (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.85e-126: tmp = 2.0 * math.pow((l / (math.pow(k, 2.0) * math.sqrt(t_m))), 2.0) else: tmp = 2.0 / ((math.tan(k) * (1.0 + (1.0 + ((k / t_m) * (k / t_m))))) * (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.85e-126) tmp = Float64(2.0 * (Float64(l / Float64((k ^ 2.0) * sqrt(t_m))) ^ 2.0)); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(1.0 + Float64(Float64(k / t_m) * Float64(k / t_m))))) * 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.85e-126) tmp = 2.0 * ((l / ((k ^ 2.0) * sqrt(t_m))) ^ 2.0); else tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + ((k / t_m) * (k / t_m))))) * (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.85e-126], N[(2.0 * N[Power[N[(l / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision]), $MachinePrecision]), $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.85 \cdot 10^{-126}:\\
\;\;\;\;2 \cdot {\left(\frac{\ell}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(1 + \frac{k}{t\_m} \cdot \frac{k}{t\_m}\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.85e-126Initial program 50.4%
associate-/r*50.4%
+-commutative50.4%
unpow250.4%
sqr-neg50.4%
distribute-frac-neg250.4%
distribute-frac-neg250.4%
unpow250.4%
+-commutative50.4%
associate-*l*45.4%
associate-*l/45.5%
associate-/r/45.3%
+-commutative45.3%
associate-+r+45.3%
Simplified45.3%
Taylor expanded in t around 0 63.0%
associate-*r/63.0%
times-frac62.1%
associate-/r*63.7%
Simplified63.7%
Taylor expanded in k around 0 50.9%
pow250.9%
add-sqr-sqrt34.4%
sqrt-div13.8%
sqrt-prod6.9%
add-sqr-sqrt8.1%
*-commutative8.1%
sqrt-prod8.1%
sqrt-pow18.1%
metadata-eval8.1%
sqrt-div8.1%
sqrt-prod7.5%
add-sqr-sqrt14.7%
*-commutative14.7%
sqrt-prod14.7%
sqrt-pow114.8%
metadata-eval14.8%
Applied egg-rr14.8%
unpow214.8%
*-commutative14.8%
Simplified14.8%
if 1.85e-126 < t Initial program 76.2%
Simplified76.1%
unpow276.2%
Applied egg-rr76.2%
unpow376.1%
times-frac86.2%
pow286.2%
Applied egg-rr86.2%
Final simplification36.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.3e-90)
(* 2.0 (pow (/ l (* (pow k 2.0) (sqrt t_m))) 2.0))
(/
2.0
(*
(* (tan k) (+ 1.0 (+ 1.0 (* (/ k t_m) (/ k t_m)))))
(* (sin k) (/ (pow t_m 3.0) (* l l))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4.3e-90) {
tmp = 2.0 * pow((l / (pow(k, 2.0) * sqrt(t_m))), 2.0);
} else {
tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + ((k / t_m) * (k / t_m))))) * (sin(k) * (pow(t_m, 3.0) / (l * l))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 4.3d-90) then
tmp = 2.0d0 * ((l / ((k ** 2.0d0) * sqrt(t_m))) ** 2.0d0)
else
tmp = 2.0d0 / ((tan(k) * (1.0d0 + (1.0d0 + ((k / t_m) * (k / t_m))))) * (sin(k) * ((t_m ** 3.0d0) / (l * l))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4.3e-90) {
tmp = 2.0 * Math.pow((l / (Math.pow(k, 2.0) * Math.sqrt(t_m))), 2.0);
} else {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (1.0 + ((k / t_m) * (k / t_m))))) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 4.3e-90: tmp = 2.0 * math.pow((l / (math.pow(k, 2.0) * math.sqrt(t_m))), 2.0) else: tmp = 2.0 / ((math.tan(k) * (1.0 + (1.0 + ((k / t_m) * (k / t_m))))) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l)))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 4.3e-90) tmp = Float64(2.0 * (Float64(l / Float64((k ^ 2.0) * sqrt(t_m))) ^ 2.0)); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(1.0 + Float64(Float64(k / t_m) * Float64(k / t_m))))) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 4.3e-90) tmp = 2.0 * ((l / ((k ^ 2.0) * sqrt(t_m))) ^ 2.0); else tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + ((k / t_m) * (k / t_m))))) * (sin(k) * ((t_m ^ 3.0) / (l * l)))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 4.3e-90], N[(2.0 * N[Power[N[(l / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.3 \cdot 10^{-90}:\\
\;\;\;\;2 \cdot {\left(\frac{\ell}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(1 + \frac{k}{t\_m} \cdot \frac{k}{t\_m}\right)\right)\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)}\\
\end{array}
\end{array}
if t < 4.3000000000000002e-90Initial program 49.1%
associate-/r*49.1%
+-commutative49.1%
unpow249.1%
sqr-neg49.1%
distribute-frac-neg249.1%
distribute-frac-neg249.1%
unpow249.1%
+-commutative49.1%
associate-*l*44.3%
associate-*l/44.4%
associate-/r/44.2%
+-commutative44.2%
associate-+r+44.2%
Simplified44.2%
Taylor expanded in t around 0 63.3%
associate-*r/63.3%
times-frac62.5%
associate-/r*64.0%
Simplified64.0%
Taylor expanded in k around 0 50.1%
pow250.1%
add-sqr-sqrt34.2%
sqrt-div14.4%
sqrt-prod7.2%
add-sqr-sqrt8.5%
*-commutative8.5%
sqrt-prod8.5%
sqrt-pow18.5%
metadata-eval8.5%
sqrt-div8.5%
sqrt-prod7.7%
add-sqr-sqrt15.3%
*-commutative15.3%
sqrt-prod15.3%
sqrt-pow115.4%
metadata-eval15.4%
Applied egg-rr15.4%
unpow215.4%
*-commutative15.4%
Simplified15.4%
if 4.3000000000000002e-90 < t Initial program 82.0%
Simplified81.9%
unpow282.0%
Applied egg-rr82.0%
Final simplification34.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 6e-25)
(* 2.0 (pow (/ l (* (pow k 2.0) (sqrt t_m))) 2.0))
(/ 2.0 (* (* 2.0 k) (* (sin k) (/ (/ (pow t_m 3.0) l) l)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 6e-25) {
tmp = 2.0 * pow((l / (pow(k, 2.0) * sqrt(t_m))), 2.0);
} else {
tmp = 2.0 / ((2.0 * k) * (sin(k) * ((pow(t_m, 3.0) / l) / l)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 6d-25) then
tmp = 2.0d0 * ((l / ((k ** 2.0d0) * sqrt(t_m))) ** 2.0d0)
else
tmp = 2.0d0 / ((2.0d0 * k) * (sin(k) * (((t_m ** 3.0d0) / l) / l)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 6e-25) {
tmp = 2.0 * Math.pow((l / (Math.pow(k, 2.0) * Math.sqrt(t_m))), 2.0);
} else {
tmp = 2.0 / ((2.0 * k) * (Math.sin(k) * ((Math.pow(t_m, 3.0) / l) / l)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 6e-25: tmp = 2.0 * math.pow((l / (math.pow(k, 2.0) * math.sqrt(t_m))), 2.0) else: tmp = 2.0 / ((2.0 * k) * (math.sin(k) * ((math.pow(t_m, 3.0) / l) / l))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 6e-25) tmp = Float64(2.0 * (Float64(l / Float64((k ^ 2.0) * sqrt(t_m))) ^ 2.0)); else tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(sin(k) * Float64(Float64((t_m ^ 3.0) / l) / l)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 6e-25) tmp = 2.0 * ((l / ((k ^ 2.0) * sqrt(t_m))) ^ 2.0); else tmp = 2.0 / ((2.0 * k) * (sin(k) * (((t_m ^ 3.0) / l) / l))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 6e-25], N[(2.0 * N[Power[N[(l / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 6 \cdot 10^{-25}:\\
\;\;\;\;2 \cdot {\left(\frac{\ell}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot \frac{\frac{{t\_m}^{3}}{\ell}}{\ell}\right)}\\
\end{array}
\end{array}
if t < 5.9999999999999995e-25Initial program 51.3%
associate-/r*51.3%
+-commutative51.3%
unpow251.3%
sqr-neg51.3%
distribute-frac-neg251.3%
distribute-frac-neg251.3%
unpow251.3%
+-commutative51.3%
associate-*l*46.7%
associate-*l/46.8%
associate-/r/46.6%
+-commutative46.6%
associate-+r+46.6%
Simplified46.6%
Taylor expanded in t around 0 65.0%
associate-*r/65.0%
times-frac64.3%
associate-/r*65.7%
Simplified65.7%
Taylor expanded in k around 0 51.2%
pow251.2%
add-sqr-sqrt36.2%
sqrt-div17.7%
sqrt-prod8.8%
add-sqr-sqrt10.6%
*-commutative10.6%
sqrt-prod10.6%
sqrt-pow110.6%
metadata-eval10.6%
sqrt-div10.6%
sqrt-prod9.3%
add-sqr-sqrt18.6%
*-commutative18.6%
sqrt-prod18.6%
sqrt-pow118.6%
metadata-eval18.6%
Applied egg-rr18.6%
unpow218.6%
*-commutative18.6%
Simplified18.6%
if 5.9999999999999995e-25 < t Initial program 81.5%
Simplified81.5%
associate-/r*83.5%
div-inv83.5%
add-cube-cbrt83.4%
associate-*l*83.4%
pow283.4%
cbrt-div83.3%
rem-cbrt-cube83.4%
cbrt-div83.3%
rem-cbrt-cube91.4%
Applied egg-rr91.4%
associate-*r*89.8%
pow-plus89.8%
metadata-eval89.8%
add-cbrt-cube83.3%
unpow383.3%
cbrt-div83.4%
pow383.4%
add-cube-cbrt83.5%
div-inv83.5%
Applied egg-rr83.5%
Taylor expanded in k around 0 80.4%
*-commutative80.4%
Simplified80.4%
Final simplification33.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 3.8e-21)
(/ 2.0 (* (* 2.0 k) (* (sin k) (/ (/ (pow t_m 3.0) l) l))))
(* 2.0 (/ (/ (pow l 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) {
double tmp;
if (k <= 3.8e-21) {
tmp = 2.0 / ((2.0 * k) * (sin(k) * ((pow(t_m, 3.0) / l) / l)));
} else {
tmp = 2.0 * ((pow(l, 2.0) / t_m) / pow(k, 4.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 (k <= 3.8d-21) then
tmp = 2.0d0 / ((2.0d0 * k) * (sin(k) * (((t_m ** 3.0d0) / l) / l)))
else
tmp = 2.0d0 * (((l ** 2.0d0) / t_m) / (k ** 4.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 (k <= 3.8e-21) {
tmp = 2.0 / ((2.0 * k) * (Math.sin(k) * ((Math.pow(t_m, 3.0) / l) / l)));
} else {
tmp = 2.0 * ((Math.pow(l, 2.0) / t_m) / Math.pow(k, 4.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 k <= 3.8e-21: tmp = 2.0 / ((2.0 * k) * (math.sin(k) * ((math.pow(t_m, 3.0) / l) / l))) else: tmp = 2.0 * ((math.pow(l, 2.0) / t_m) / math.pow(k, 4.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 <= 3.8e-21) tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(sin(k) * Float64(Float64((t_m ^ 3.0) / l) / l)))); else tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / t_m) / (k ^ 4.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 (k <= 3.8e-21) tmp = 2.0 / ((2.0 * k) * (sin(k) * (((t_m ^ 3.0) / l) / l))); else tmp = 2.0 * (((l ^ 2.0) / t_m) / (k ^ 4.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[k, 3.8e-21], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / t$95$m), $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 \begin{array}{l}
\mathbf{if}\;k \leq 3.8 \cdot 10^{-21}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot \frac{\frac{{t\_m}^{3}}{\ell}}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{t\_m}}{{k}^{4}}\\
\end{array}
\end{array}
if k < 3.7999999999999998e-21Initial program 62.1%
Simplified62.1%
associate-/r*66.3%
div-inv66.3%
add-cube-cbrt66.2%
associate-*l*66.2%
pow266.2%
cbrt-div66.2%
rem-cbrt-cube66.2%
cbrt-div66.2%
rem-cbrt-cube73.3%
Applied egg-rr73.3%
associate-*r*70.6%
pow-plus70.6%
metadata-eval70.6%
add-cbrt-cube66.2%
unpow366.2%
cbrt-div66.2%
pow366.2%
add-cube-cbrt66.3%
div-inv66.3%
Applied egg-rr66.3%
Taylor expanded in k around 0 64.8%
*-commutative64.8%
Simplified64.8%
if 3.7999999999999998e-21 < k Initial program 50.0%
associate-/r*50.3%
+-commutative50.3%
unpow250.3%
sqr-neg50.3%
distribute-frac-neg250.3%
distribute-frac-neg250.3%
unpow250.3%
+-commutative50.3%
associate-*l*50.3%
associate-*l/50.3%
associate-/r/50.3%
+-commutative50.3%
associate-+r+50.3%
Simplified50.3%
Taylor expanded in t around 0 72.8%
associate-*r/72.8%
times-frac70.5%
associate-/r*70.5%
Simplified70.5%
Taylor expanded in k around 0 57.0%
pow257.0%
*-un-lft-identity57.0%
associate-/r*57.1%
pow257.1%
Applied egg-rr57.1%
*-lft-identity57.1%
associate-/l/57.0%
associate-/r*58.2%
Simplified58.2%
Final simplification62.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 2.2e-20)
(/ 2.0 (* (/ (/ (pow t_m 3.0) l) l) (* 2.0 (pow k 2.0))))
(* 2.0 (/ (/ (pow l 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) {
double tmp;
if (k <= 2.2e-20) {
tmp = 2.0 / (((pow(t_m, 3.0) / l) / l) * (2.0 * pow(k, 2.0)));
} else {
tmp = 2.0 * ((pow(l, 2.0) / t_m) / pow(k, 4.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 (k <= 2.2d-20) then
tmp = 2.0d0 / ((((t_m ** 3.0d0) / l) / l) * (2.0d0 * (k ** 2.0d0)))
else
tmp = 2.0d0 * (((l ** 2.0d0) / t_m) / (k ** 4.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 (k <= 2.2e-20) {
tmp = 2.0 / (((Math.pow(t_m, 3.0) / l) / l) * (2.0 * Math.pow(k, 2.0)));
} else {
tmp = 2.0 * ((Math.pow(l, 2.0) / t_m) / Math.pow(k, 4.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 k <= 2.2e-20: tmp = 2.0 / (((math.pow(t_m, 3.0) / l) / l) * (2.0 * math.pow(k, 2.0))) else: tmp = 2.0 * ((math.pow(l, 2.0) / t_m) / math.pow(k, 4.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 <= 2.2e-20) tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 3.0) / l) / l) * Float64(2.0 * (k ^ 2.0)))); else tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / t_m) / (k ^ 4.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 (k <= 2.2e-20) tmp = 2.0 / ((((t_m ^ 3.0) / l) / l) * (2.0 * (k ^ 2.0))); else tmp = 2.0 * (((l ^ 2.0) / t_m) / (k ^ 4.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[k, 2.2e-20], 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], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / t$95$m), $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 \begin{array}{l}
\mathbf{if}\;k \leq 2.2 \cdot 10^{-20}:\\
\;\;\;\;\frac{2}{\frac{\frac{{t\_m}^{3}}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{t\_m}}{{k}^{4}}\\
\end{array}
\end{array}
if k < 2.19999999999999991e-20Initial program 62.1%
Simplified58.3%
Taylor expanded in k around 0 57.2%
if 2.19999999999999991e-20 < k Initial program 50.0%
associate-/r*50.3%
+-commutative50.3%
unpow250.3%
sqr-neg50.3%
distribute-frac-neg250.3%
distribute-frac-neg250.3%
unpow250.3%
+-commutative50.3%
associate-*l*50.3%
associate-*l/50.3%
associate-/r/50.3%
+-commutative50.3%
associate-+r+50.3%
Simplified50.3%
Taylor expanded in t around 0 72.8%
associate-*r/72.8%
times-frac70.5%
associate-/r*70.5%
Simplified70.5%
Taylor expanded in k around 0 57.0%
pow257.0%
*-un-lft-identity57.0%
associate-/r*57.1%
pow257.1%
Applied egg-rr57.1%
*-lft-identity57.1%
associate-/l/57.0%
associate-/r*58.2%
Simplified58.2%
Final simplification57.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1.45e-20)
(/ 2.0 (/ (* (/ (pow t_m 3.0) l) (* 2.0 (pow k 2.0))) l))
(* 2.0 (/ (/ (pow l 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) {
double tmp;
if (k <= 1.45e-20) {
tmp = 2.0 / (((pow(t_m, 3.0) / l) * (2.0 * pow(k, 2.0))) / l);
} else {
tmp = 2.0 * ((pow(l, 2.0) / t_m) / pow(k, 4.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 (k <= 1.45d-20) then
tmp = 2.0d0 / ((((t_m ** 3.0d0) / l) * (2.0d0 * (k ** 2.0d0))) / l)
else
tmp = 2.0d0 * (((l ** 2.0d0) / t_m) / (k ** 4.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 (k <= 1.45e-20) {
tmp = 2.0 / (((Math.pow(t_m, 3.0) / l) * (2.0 * Math.pow(k, 2.0))) / l);
} else {
tmp = 2.0 * ((Math.pow(l, 2.0) / t_m) / Math.pow(k, 4.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 k <= 1.45e-20: tmp = 2.0 / (((math.pow(t_m, 3.0) / l) * (2.0 * math.pow(k, 2.0))) / l) else: tmp = 2.0 * ((math.pow(l, 2.0) / t_m) / math.pow(k, 4.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 <= 1.45e-20) tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 3.0) / l) * Float64(2.0 * (k ^ 2.0))) / l)); else tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / t_m) / (k ^ 4.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 (k <= 1.45e-20) tmp = 2.0 / ((((t_m ^ 3.0) / l) * (2.0 * (k ^ 2.0))) / l); else tmp = 2.0 * (((l ^ 2.0) / t_m) / (k ^ 4.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[k, 1.45e-20], 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], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / t$95$m), $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 \begin{array}{l}
\mathbf{if}\;k \leq 1.45 \cdot 10^{-20}:\\
\;\;\;\;\frac{2}{\frac{\frac{{t\_m}^{3}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{t\_m}}{{k}^{4}}\\
\end{array}
\end{array}
if k < 1.45e-20Initial program 62.1%
Simplified58.3%
Taylor expanded in k around 0 57.2%
associate-*l/57.8%
Applied egg-rr57.8%
if 1.45e-20 < k Initial program 50.0%
associate-/r*50.3%
+-commutative50.3%
unpow250.3%
sqr-neg50.3%
distribute-frac-neg250.3%
distribute-frac-neg250.3%
unpow250.3%
+-commutative50.3%
associate-*l*50.3%
associate-*l/50.3%
associate-/r/50.3%
+-commutative50.3%
associate-+r+50.3%
Simplified50.3%
Taylor expanded in t around 0 72.8%
associate-*r/72.8%
times-frac70.5%
associate-/r*70.5%
Simplified70.5%
Taylor expanded in k around 0 57.0%
pow257.0%
*-un-lft-identity57.0%
associate-/r*57.1%
pow257.1%
Applied egg-rr57.1%
*-lft-identity57.1%
associate-/l/57.0%
associate-/r*58.2%
Simplified58.2%
Final simplification57.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 (* 2.0 (* (/ (pow l 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 * (2.0 * ((pow(l, 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 * (2.0d0 * (((l ** 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 * (2.0 * ((Math.pow(l, 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 * (2.0 * ((math.pow(l, 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(2.0 * Float64(Float64((l ^ 2.0) / t_m) * (k ^ -4.0)))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 * (((l ^ 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[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / t$95$m), $MachinePrecision] * N[Power[k, -4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(2 \cdot \left(\frac{{\ell}^{2}}{t\_m} \cdot {k}^{-4}\right)\right)
\end{array}
Initial program 58.4%
associate-/r*58.4%
+-commutative58.4%
unpow258.4%
sqr-neg58.4%
distribute-frac-neg258.4%
distribute-frac-neg258.4%
unpow258.4%
+-commutative58.4%
associate-*l*53.3%
associate-*l/53.4%
associate-/r/53.3%
+-commutative53.3%
associate-+r+53.3%
Simplified53.3%
Taylor expanded in t around 0 64.8%
associate-*r/64.8%
times-frac64.6%
associate-/r*66.1%
Simplified66.1%
Taylor expanded in k around 0 53.5%
pow253.5%
*-un-lft-identity53.5%
associate-/r*53.9%
pow253.9%
Applied egg-rr53.9%
*-lft-identity53.9%
associate-/l/53.5%
associate-/r*55.0%
Simplified55.0%
div-inv55.0%
pow-flip55.0%
metadata-eval55.0%
Applied egg-rr55.0%
Final simplification55.0%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* 2.0 (/ (/ (pow l 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 * (2.0 * ((pow(l, 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 * (2.0d0 * (((l ** 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 * (2.0 * ((Math.pow(l, 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 * (2.0 * ((math.pow(l, 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(2.0 * Float64(Float64((l ^ 2.0) / t_m) / (k ^ 4.0)))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 * (((l ^ 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[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / t$95$m), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(2 \cdot \frac{\frac{{\ell}^{2}}{t\_m}}{{k}^{4}}\right)
\end{array}
Initial program 58.4%
associate-/r*58.4%
+-commutative58.4%
unpow258.4%
sqr-neg58.4%
distribute-frac-neg258.4%
distribute-frac-neg258.4%
unpow258.4%
+-commutative58.4%
associate-*l*53.3%
associate-*l/53.4%
associate-/r/53.3%
+-commutative53.3%
associate-+r+53.3%
Simplified53.3%
Taylor expanded in t around 0 64.8%
associate-*r/64.8%
times-frac64.6%
associate-/r*66.1%
Simplified66.1%
Taylor expanded in k around 0 53.5%
pow253.5%
*-un-lft-identity53.5%
associate-/r*53.9%
pow253.9%
Applied egg-rr53.9%
*-lft-identity53.9%
associate-/l/53.5%
associate-/r*55.0%
Simplified55.0%
Final simplification55.0%
herbie shell --seed 2024075
(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))))