
(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 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 7e-73)
(/
2.0
(/ (* (* t_m (pow k 2.0)) (pow (sin k) 2.0)) (* (pow l 2.0) (cos k))))
(/
2.0
(pow
(*
(* (* t_m (pow (cbrt l) -2.0)) (cbrt (sin k)))
(cbrt (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))))
3.0)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 7e-73) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) * pow(sin(k), 2.0)) / (pow(l, 2.0) * cos(k)));
} else {
tmp = 2.0 / pow((((t_m * pow(cbrt(l), -2.0)) * cbrt(sin(k))) * cbrt((tan(k) * (2.0 + pow((k / t_m), 2.0))))), 3.0);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 7e-73) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) * Math.pow(Math.sin(k), 2.0)) / (Math.pow(l, 2.0) * Math.cos(k)));
} else {
tmp = 2.0 / Math.pow((((t_m * Math.pow(Math.cbrt(l), -2.0)) * Math.cbrt(Math.sin(k))) * Math.cbrt((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))))), 3.0);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 7e-73) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) * (sin(k) ^ 2.0)) / Float64((l ^ 2.0) * cos(k)))); else tmp = Float64(2.0 / (Float64(Float64(Float64(t_m * (cbrt(l) ^ -2.0)) * cbrt(sin(k))) * cbrt(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))))) ^ 3.0)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 7e-73], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(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] * N[Power[N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 7 \cdot 10^{-73}:\\
\;\;\;\;\frac{2}{\frac{\left(t\_m \cdot {k}^{2}\right) \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \sqrt[3]{\sin k}\right) \cdot \sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)}\right)}^{3}}\\
\end{array}
\end{array}
if t < 6.9999999999999995e-73Initial program 50.0%
Simplified50.0%
Taylor expanded in t around 0 69.8%
associate-*r*69.8%
Simplified69.8%
if 6.9999999999999995e-73 < t Initial program 70.4%
Simplified70.4%
unpow270.4%
clear-num70.4%
un-div-inv70.4%
Applied egg-rr70.4%
add-cube-cbrt70.2%
pow370.3%
associate-/r*73.3%
*-commutative73.3%
cbrt-prod73.2%
associate-/r*70.3%
div-inv70.3%
cbrt-prod70.2%
rem-cbrt-cube77.1%
pow277.1%
pow-flip77.6%
metadata-eval77.6%
Applied egg-rr77.6%
pow177.6%
associate-*r*77.7%
Applied egg-rr77.7%
unpow177.7%
associate-*l*77.6%
*-commutative77.6%
unpow1/376.4%
exp-to-pow36.5%
*-commutative36.5%
exp-prod40.6%
associate-*l*40.6%
rem-log-exp40.6%
exp-to-pow40.7%
unpow1/340.8%
*-commutative40.8%
exp-to-pow88.7%
Simplified88.7%
add-cube-cbrt88.7%
pow388.7%
Applied egg-rr95.1%
Final simplification76.9%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ l (hypot 1.0 (hypot 1.0 (/ k t_m))))))
(*
t_s
(if (<= t_m 1.25e-89)
(/
2.0
(/ (* (* t_m (pow k 2.0)) (pow (sin k) 2.0)) (* (pow l 2.0) (cos k))))
(if (<= t_m 5.6e+102)
(* t_2 (* (/ 2.0 (* (tan k) (* (sin k) (pow t_m 3.0)))) 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) (/ t_m k))))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = l / hypot(1.0, hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 1.25e-89) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) * pow(sin(k), 2.0)) / (pow(l, 2.0) * cos(k)));
} else if (t_m <= 5.6e+102) {
tmp = t_2 * ((2.0 / (tan(k) * (sin(k) * pow(t_m, 3.0)))) * 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) / (t_m / k))))));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = l / Math.hypot(1.0, Math.hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 1.25e-89) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) * Math.pow(Math.sin(k), 2.0)) / (Math.pow(l, 2.0) * Math.cos(k)));
} else if (t_m <= 5.6e+102) {
tmp = t_2 * ((2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow(t_m, 3.0)))) * t_2);
} else {
tmp = 2.0 / (Math.pow((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) / (t_m / k))))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(l / hypot(1.0, hypot(1.0, Float64(k / t_m)))) tmp = 0.0 if (t_m <= 1.25e-89) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) * (sin(k) ^ 2.0)) / Float64((l ^ 2.0) * cos(k)))); elseif (t_m <= 5.6e+102) tmp = Float64(t_2 * Float64(Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (t_m ^ 3.0)))) * t_2)); else tmp = Float64(2.0 / Float64((Float64(t_m * Float64((cbrt(l) ^ -2.0) * cbrt(sin(k)))) ^ 3.0) * Float64(tan(k) * Float64(1.0 + Float64(1.0 + Float64(Float64(k / t_m) / Float64(t_m / k))))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(l / N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.25e-89], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.6e+102], N[(t$95$2 * N[(N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(t$95$m * N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $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 := \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.25 \cdot 10^{-89}:\\
\;\;\;\;\frac{2}{\frac{\left(t\_m \cdot {k}^{2}\right) \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}\\
\mathbf{elif}\;t\_m \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;t\_2 \cdot \left(\frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)} \cdot t\_2\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot \left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \sqrt[3]{\sin k}\right)\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\right)\right)}\\
\end{array}
\end{array}
\end{array}
if t < 1.24999999999999992e-89Initial program 48.8%
Simplified48.8%
Taylor expanded in t around 0 69.3%
associate-*r*69.3%
Simplified69.3%
if 1.24999999999999992e-89 < t < 5.60000000000000037e102Initial program 75.1%
Simplified77.6%
associate-*r*80.2%
add-sqr-sqrt80.0%
times-frac82.5%
Applied egg-rr83.6%
associate-/l*85.9%
*-commutative85.9%
Simplified85.9%
if 5.60000000000000037e102 < t Initial program 67.1%
Simplified67.1%
unpow267.1%
clear-num67.1%
un-div-inv67.1%
Applied egg-rr67.1%
add-cube-cbrt67.1%
pow367.1%
associate-/r*70.4%
*-commutative70.4%
cbrt-prod70.4%
associate-/r*67.1%
div-inv67.1%
cbrt-prod67.1%
rem-cbrt-cube80.8%
pow280.8%
pow-flip81.5%
metadata-eval81.5%
Applied egg-rr81.5%
pow181.5%
associate-*r*81.6%
Applied egg-rr81.6%
unpow181.6%
associate-*l*81.5%
*-commutative81.5%
unpow1/380.6%
exp-to-pow44.9%
*-commutative44.9%
exp-prod51.1%
associate-*l*51.1%
rem-log-exp51.1%
exp-to-pow51.2%
unpow1/351.2%
*-commutative51.2%
exp-to-pow96.4%
Simplified96.4%
pow196.4%
Applied egg-rr96.4%
unpow196.4%
associate-*l*96.6%
Simplified96.6%
Final simplification75.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 2.1e-70)
(/
2.0
(/ (* (* t_m (pow k 2.0)) (pow (sin k) 2.0)) (* (pow l 2.0) (cos k))))
(/
2.0
(*
(pow (* t_m (* (pow (cbrt l) -2.0) (cbrt (sin k)))) 3.0)
(* (tan k) (+ 1.0 (+ 1.0 (/ (/ k t_m) (/ t_m k))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.1e-70) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) * pow(sin(k), 2.0)) / (pow(l, 2.0) * cos(k)));
} 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) / (t_m / k))))));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.1e-70) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) * Math.pow(Math.sin(k), 2.0)) / (Math.pow(l, 2.0) * Math.cos(k)));
} 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) / (t_m / k))))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 2.1e-70) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) * (sin(k) ^ 2.0)) / Float64((l ^ 2.0) * cos(k)))); else tmp = Float64(2.0 / Float64((Float64(t_m * Float64((cbrt(l) ^ -2.0) * cbrt(sin(k)))) ^ 3.0) * Float64(tan(k) * Float64(1.0 + Float64(1.0 + Float64(Float64(k / t_m) / Float64(t_m / k))))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.1e-70], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(t$95$m * N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $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 2.1 \cdot 10^{-70}:\\
\;\;\;\;\frac{2}{\frac{\left(t\_m \cdot {k}^{2}\right) \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot \left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \sqrt[3]{\sin k}\right)\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\right)\right)}\\
\end{array}
\end{array}
if t < 2.1000000000000001e-70Initial program 50.0%
Simplified50.0%
Taylor expanded in t around 0 69.8%
associate-*r*69.8%
Simplified69.8%
if 2.1000000000000001e-70 < t Initial program 70.4%
Simplified70.4%
unpow270.4%
clear-num70.4%
un-div-inv70.4%
Applied egg-rr70.4%
add-cube-cbrt70.2%
pow370.3%
associate-/r*73.3%
*-commutative73.3%
cbrt-prod73.2%
associate-/r*70.3%
div-inv70.3%
cbrt-prod70.2%
rem-cbrt-cube77.1%
pow277.1%
pow-flip77.6%
metadata-eval77.6%
Applied egg-rr77.6%
pow177.6%
associate-*r*77.7%
Applied egg-rr77.7%
unpow177.7%
associate-*l*77.6%
*-commutative77.6%
unpow1/376.4%
exp-to-pow36.5%
*-commutative36.5%
exp-prod40.6%
associate-*l*40.6%
rem-log-exp40.6%
exp-to-pow40.7%
unpow1/340.8%
*-commutative40.8%
exp-to-pow88.7%
Simplified88.7%
pow188.7%
Applied egg-rr88.7%
unpow188.7%
associate-*l*88.8%
Simplified88.8%
Final simplification75.1%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 7.5e-73)
(/
2.0
(/ (* (* t_m (pow k 2.0)) (pow (sin k) 2.0)) (* (pow l 2.0) (cos k))))
(/
2.0
(*
(* (tan k) (+ 1.0 (+ 1.0 (/ (/ k t_m) (/ t_m k)))))
(pow (* (cbrt (sin k)) (* t_m (pow l -0.6666666666666666))) 3.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 7.5e-73) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) * pow(sin(k), 2.0)) / (pow(l, 2.0) * cos(k)));
} else {
tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k))))) * pow((cbrt(sin(k)) * (t_m * pow(l, -0.6666666666666666))), 3.0));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 7.5e-73) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) * Math.pow(Math.sin(k), 2.0)) / (Math.pow(l, 2.0) * Math.cos(k)));
} else {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (1.0 + ((k / t_m) / (t_m / k))))) * Math.pow((Math.cbrt(Math.sin(k)) * (t_m * Math.pow(l, -0.6666666666666666))), 3.0));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 7.5e-73) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) * (sin(k) ^ 2.0)) / Float64((l ^ 2.0) * cos(k)))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(1.0 + Float64(Float64(k / t_m) / Float64(t_m / k))))) * (Float64(cbrt(sin(k)) * Float64(t_m * (l ^ -0.6666666666666666))) ^ 3.0))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 7.5e-73], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $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[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m * N[Power[l, -0.6666666666666666], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 7.5 \cdot 10^{-73}:\\
\;\;\;\;\frac{2}{\frac{\left(t\_m \cdot {k}^{2}\right) \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(1 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\right)\right) \cdot {\left(\sqrt[3]{\sin k} \cdot \left(t\_m \cdot {\ell}^{-0.6666666666666666}\right)\right)}^{3}}\\
\end{array}
\end{array}
if t < 7.5e-73Initial program 50.0%
Simplified50.0%
Taylor expanded in t around 0 69.8%
associate-*r*69.8%
Simplified69.8%
if 7.5e-73 < t Initial program 70.4%
Simplified70.4%
unpow270.4%
clear-num70.4%
un-div-inv70.4%
Applied egg-rr70.4%
add-cube-cbrt70.2%
pow370.3%
associate-/r*73.3%
*-commutative73.3%
cbrt-prod73.2%
associate-/r*70.3%
div-inv70.3%
cbrt-prod70.2%
rem-cbrt-cube77.1%
pow277.1%
pow-flip77.6%
metadata-eval77.6%
Applied egg-rr77.6%
pow1/376.4%
pow-pow40.7%
metadata-eval40.7%
Applied egg-rr40.7%
Final simplification61.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.4e-70)
(*
(/ 2.0 (pow k 2.0))
(/ (* (cos k) (* (pow l 2.0) (pow (sin k) -2.0))) t_m))
(if (<= t_m 5.6e+102)
(*
(/ (* 2.0 l) (* (sin k) (* (tan k) (pow t_m 3.0))))
(/ 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 <= 6.4e-70) {
tmp = (2.0 / pow(k, 2.0)) * ((cos(k) * (pow(l, 2.0) * pow(sin(k), -2.0))) / t_m);
} else if (t_m <= 5.6e+102) {
tmp = ((2.0 * l) / (sin(k) * (tan(k) * pow(t_m, 3.0)))) * (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 <= 6.4e-70) {
tmp = (2.0 / Math.pow(k, 2.0)) * ((Math.cos(k) * (Math.pow(l, 2.0) * Math.pow(Math.sin(k), -2.0))) / t_m);
} else if (t_m <= 5.6e+102) {
tmp = ((2.0 * l) / (Math.sin(k) * (Math.tan(k) * Math.pow(t_m, 3.0)))) * (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 <= 6.4e-70) tmp = Float64(Float64(2.0 / (k ^ 2.0)) * Float64(Float64(cos(k) * Float64((l ^ 2.0) * (sin(k) ^ -2.0))) / t_m)); elseif (t_m <= 5.6e+102) tmp = Float64(Float64(Float64(2.0 * l) / Float64(sin(k) * Float64(tan(k) * (t_m ^ 3.0)))) * 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, 6.4e-70], N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.6e+102], N[(N[(N[(2.0 * l), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $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 6.4 \cdot 10^{-70}:\\
\;\;\;\;\frac{2}{{k}^{2}} \cdot \frac{\cos k \cdot \left({\ell}^{2} \cdot {\sin k}^{-2}\right)}{t\_m}\\
\mathbf{elif}\;t\_m \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;\frac{2 \cdot \ell}{\sin k \cdot \left(\tan k \cdot {t\_m}^{3}\right)} \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \left(2 \cdot k\right)}\\
\end{array}
\end{array}
if t < 6.3999999999999995e-70Initial program 50.0%
Simplified50.0%
Taylor expanded in t around 0 69.8%
associate-*r/69.8%
times-frac68.7%
*-commutative68.7%
times-frac68.8%
Simplified68.8%
associate-*r/68.8%
div-inv68.7%
pow-flip68.8%
metadata-eval68.8%
Applied egg-rr68.8%
if 6.3999999999999995e-70 < t < 5.60000000000000037e102Initial program 73.7%
Simplified76.7%
associate-*r*79.7%
*-un-lft-identity79.7%
times-frac82.4%
associate-*r*83.7%
Applied egg-rr83.7%
/-rgt-identity83.7%
*-commutative83.7%
*-commutative83.7%
Simplified83.7%
associate-*r/84.8%
associate-*l*84.8%
Applied egg-rr84.8%
if 5.60000000000000037e102 < t Initial program 67.1%
Simplified67.1%
unpow267.1%
clear-num67.1%
un-div-inv67.1%
Applied egg-rr67.1%
add-cube-cbrt67.1%
pow367.1%
associate-/r*70.4%
*-commutative70.4%
cbrt-prod70.4%
associate-/r*67.1%
div-inv67.1%
cbrt-prod67.1%
rem-cbrt-cube80.8%
pow280.8%
pow-flip81.5%
metadata-eval81.5%
Applied egg-rr81.5%
pow181.5%
associate-*r*81.6%
Applied egg-rr81.6%
unpow181.6%
associate-*l*81.5%
*-commutative81.5%
unpow1/380.6%
exp-to-pow44.9%
*-commutative44.9%
exp-prod51.1%
associate-*l*51.1%
rem-log-exp51.1%
exp-to-pow51.2%
unpow1/351.2%
*-commutative51.2%
exp-to-pow96.4%
Simplified96.4%
Taylor expanded in k around 0 91.3%
Final simplification74.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.8e-71)
(* (/ 2.0 (* k k)) (* (/ (pow l 2.0) (pow (sin k) 2.0)) (/ (cos k) t_m)))
(if (<= t_m 5.6e+102)
(*
(/ (* 2.0 l) (* (sin k) (* (tan k) (pow t_m 3.0))))
(/ 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 <= 1.8e-71) {
tmp = (2.0 / (k * k)) * ((pow(l, 2.0) / pow(sin(k), 2.0)) * (cos(k) / t_m));
} else if (t_m <= 5.6e+102) {
tmp = ((2.0 * l) / (sin(k) * (tan(k) * pow(t_m, 3.0)))) * (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 <= 1.8e-71) {
tmp = (2.0 / (k * k)) * ((Math.pow(l, 2.0) / Math.pow(Math.sin(k), 2.0)) * (Math.cos(k) / t_m));
} else if (t_m <= 5.6e+102) {
tmp = ((2.0 * l) / (Math.sin(k) * (Math.tan(k) * Math.pow(t_m, 3.0)))) * (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 <= 1.8e-71) tmp = Float64(Float64(2.0 / Float64(k * k)) * Float64(Float64((l ^ 2.0) / (sin(k) ^ 2.0)) * Float64(cos(k) / t_m))); elseif (t_m <= 5.6e+102) tmp = Float64(Float64(Float64(2.0 * l) / Float64(sin(k) * Float64(tan(k) * (t_m ^ 3.0)))) * 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, 1.8e-71], N[(N[(2.0 / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.6e+102], N[(N[(N[(2.0 * l), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $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 1.8 \cdot 10^{-71}:\\
\;\;\;\;\frac{2}{k \cdot k} \cdot \left(\frac{{\ell}^{2}}{{\sin k}^{2}} \cdot \frac{\cos k}{t\_m}\right)\\
\mathbf{elif}\;t\_m \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;\frac{2 \cdot \ell}{\sin k \cdot \left(\tan k \cdot {t\_m}^{3}\right)} \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \left(2 \cdot k\right)}\\
\end{array}
\end{array}
if t < 1.8e-71Initial program 50.0%
Simplified50.0%
Taylor expanded in t around 0 69.8%
associate-*r/69.8%
times-frac68.7%
*-commutative68.7%
times-frac68.8%
Simplified68.8%
unpow268.8%
Applied egg-rr68.8%
if 1.8e-71 < t < 5.60000000000000037e102Initial program 73.7%
Simplified76.7%
associate-*r*79.7%
*-un-lft-identity79.7%
times-frac82.4%
associate-*r*83.7%
Applied egg-rr83.7%
/-rgt-identity83.7%
*-commutative83.7%
*-commutative83.7%
Simplified83.7%
associate-*r/84.8%
associate-*l*84.8%
Applied egg-rr84.8%
if 5.60000000000000037e102 < t Initial program 67.1%
Simplified67.1%
unpow267.1%
clear-num67.1%
un-div-inv67.1%
Applied egg-rr67.1%
add-cube-cbrt67.1%
pow367.1%
associate-/r*70.4%
*-commutative70.4%
cbrt-prod70.4%
associate-/r*67.1%
div-inv67.1%
cbrt-prod67.1%
rem-cbrt-cube80.8%
pow280.8%
pow-flip81.5%
metadata-eval81.5%
Applied egg-rr81.5%
pow181.5%
associate-*r*81.6%
Applied egg-rr81.6%
unpow181.6%
associate-*l*81.5%
*-commutative81.5%
unpow1/380.6%
exp-to-pow44.9%
*-commutative44.9%
exp-prod51.1%
associate-*l*51.1%
rem-log-exp51.1%
exp-to-pow51.2%
unpow1/351.2%
*-commutative51.2%
exp-to-pow96.4%
Simplified96.4%
Taylor expanded in k around 0 91.3%
Final simplification74.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 4.5e-70)
(* (/ 2.0 (* k k)) (* (/ (pow l 2.0) (pow (sin k) 2.0)) (/ (cos k) t_m)))
(if (<= t_m 5.6e+102)
(*
(/ (* 2.0 l) (* (sin k) (* (tan k) (pow t_m 3.0))))
(/ l (+ 2.0 (pow (/ k t_m) 2.0))))
(/
2.0
(*
(* 2.0 k)
(pow (* (cbrt (sin k)) (* t_m (cbrt (pow l -2.0)))) 3.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4.5e-70) {
tmp = (2.0 / (k * k)) * ((pow(l, 2.0) / pow(sin(k), 2.0)) * (cos(k) / t_m));
} else if (t_m <= 5.6e+102) {
tmp = ((2.0 * l) / (sin(k) * (tan(k) * pow(t_m, 3.0)))) * (l / (2.0 + pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / ((2.0 * k) * pow((cbrt(sin(k)) * (t_m * cbrt(pow(l, -2.0)))), 3.0));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4.5e-70) {
tmp = (2.0 / (k * k)) * ((Math.pow(l, 2.0) / Math.pow(Math.sin(k), 2.0)) * (Math.cos(k) / t_m));
} else if (t_m <= 5.6e+102) {
tmp = ((2.0 * l) / (Math.sin(k) * (Math.tan(k) * Math.pow(t_m, 3.0)))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / ((2.0 * k) * Math.pow((Math.cbrt(Math.sin(k)) * (t_m * Math.cbrt(Math.pow(l, -2.0)))), 3.0));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 4.5e-70) tmp = Float64(Float64(2.0 / Float64(k * k)) * Float64(Float64((l ^ 2.0) / (sin(k) ^ 2.0)) * Float64(cos(k) / t_m))); elseif (t_m <= 5.6e+102) tmp = Float64(Float64(Float64(2.0 * l) / Float64(sin(k) * Float64(tan(k) * (t_m ^ 3.0)))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(cbrt(sin(k)) * Float64(t_m * cbrt((l ^ -2.0)))) ^ 3.0))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 4.5e-70], N[(N[(2.0 / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.6e+102], N[(N[(N[(2.0 * l), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $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[(2.0 * k), $MachinePrecision] * N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m * N[Power[N[Power[l, -2.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.5 \cdot 10^{-70}:\\
\;\;\;\;\frac{2}{k \cdot k} \cdot \left(\frac{{\ell}^{2}}{{\sin k}^{2}} \cdot \frac{\cos k}{t\_m}\right)\\
\mathbf{elif}\;t\_m \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;\frac{2 \cdot \ell}{\sin k \cdot \left(\tan k \cdot {t\_m}^{3}\right)} \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\sqrt[3]{\sin k} \cdot \left(t\_m \cdot \sqrt[3]{{\ell}^{-2}}\right)\right)}^{3}}\\
\end{array}
\end{array}
if t < 4.50000000000000022e-70Initial program 50.0%
Simplified50.0%
Taylor expanded in t around 0 69.8%
associate-*r/69.8%
times-frac68.7%
*-commutative68.7%
times-frac68.8%
Simplified68.8%
unpow268.8%
Applied egg-rr68.8%
if 4.50000000000000022e-70 < t < 5.60000000000000037e102Initial program 73.7%
Simplified76.7%
associate-*r*79.7%
*-un-lft-identity79.7%
times-frac82.4%
associate-*r*83.7%
Applied egg-rr83.7%
/-rgt-identity83.7%
*-commutative83.7%
*-commutative83.7%
Simplified83.7%
associate-*r/84.8%
associate-*l*84.8%
Applied egg-rr84.8%
if 5.60000000000000037e102 < t Initial program 67.1%
Simplified67.1%
unpow267.1%
clear-num67.1%
un-div-inv67.1%
Applied egg-rr67.1%
add-cube-cbrt67.1%
pow367.1%
associate-/r*70.4%
*-commutative70.4%
cbrt-prod70.4%
associate-/r*67.1%
div-inv67.1%
cbrt-prod67.1%
rem-cbrt-cube80.8%
pow280.8%
pow-flip81.5%
metadata-eval81.5%
Applied egg-rr81.5%
Taylor expanded in k around 0 81.4%
Final simplification72.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 (<= k 1.05e-18)
(/
2.0
(* (pow (* (* t_m (pow (cbrt l) -2.0)) (cbrt (sin k))) 3.0) (* 2.0 k)))
(/
2.0
(/ (* (* t_m (pow k 2.0)) (pow (sin k) 2.0)) (* (pow l 2.0) (cos k)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.05e-18) {
tmp = 2.0 / (pow(((t_m * pow(cbrt(l), -2.0)) * cbrt(sin(k))), 3.0) * (2.0 * k));
} else {
tmp = 2.0 / (((t_m * pow(k, 2.0)) * pow(sin(k), 2.0)) / (pow(l, 2.0) * cos(k)));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.05e-18) {
tmp = 2.0 / (Math.pow(((t_m * Math.pow(Math.cbrt(l), -2.0)) * Math.cbrt(Math.sin(k))), 3.0) * (2.0 * k));
} else {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) * Math.pow(Math.sin(k), 2.0)) / (Math.pow(l, 2.0) * Math.cos(k)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.05e-18) tmp = Float64(2.0 / Float64((Float64(Float64(t_m * (cbrt(l) ^ -2.0)) * cbrt(sin(k))) ^ 3.0) * Float64(2.0 * k))); else tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) * (sin(k) ^ 2.0)) / Float64((l ^ 2.0) * cos(k)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.05e-18], 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], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $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 1.05 \cdot 10^{-18}:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \left(2 \cdot k\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\left(t\_m \cdot {k}^{2}\right) \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}\\
\end{array}
\end{array}
if k < 1.05e-18Initial program 57.1%
Simplified57.1%
unpow257.1%
clear-num57.1%
un-div-inv57.1%
Applied egg-rr57.1%
add-cube-cbrt57.0%
pow357.0%
associate-/r*62.4%
*-commutative62.4%
cbrt-prod62.3%
associate-/r*57.0%
div-inv56.5%
cbrt-prod57.4%
rem-cbrt-cube69.7%
pow269.7%
pow-flip69.9%
metadata-eval69.9%
Applied egg-rr69.9%
pow169.9%
associate-*r*69.9%
Applied egg-rr69.9%
unpow169.9%
associate-*l*69.9%
*-commutative69.9%
unpow1/369.1%
exp-to-pow34.2%
*-commutative34.2%
exp-prod40.0%
associate-*l*40.0%
rem-log-exp40.0%
exp-to-pow40.0%
unpow1/340.1%
*-commutative40.1%
exp-to-pow80.5%
Simplified80.5%
Taylor expanded in k around 0 71.6%
if 1.05e-18 < k Initial program 51.6%
Simplified51.6%
Taylor expanded in t around 0 74.8%
associate-*r*74.8%
Simplified74.8%
Final simplification72.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.1e-70)
(* (/ 2.0 (* k k)) (* (/ (pow l 2.0) (pow (sin k) 2.0)) (/ (cos k) t_m)))
(if (<= t_m 5.8e+102)
(*
(/ (* 2.0 l) (* (sin k) (* (tan k) (pow t_m 3.0))))
(/ l (+ 2.0 (pow (/ k t_m) 2.0))))
(/ 2.0 (* (* (sin k) (pow (/ (pow t_m 1.5) l) 2.0)) (* 2.0 (tan 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.1e-70) {
tmp = (2.0 / (k * k)) * ((pow(l, 2.0) / pow(sin(k), 2.0)) * (cos(k) / t_m));
} else if (t_m <= 5.8e+102) {
tmp = ((2.0 * l) / (sin(k) * (tan(k) * pow(t_m, 3.0)))) * (l / (2.0 + pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / ((sin(k) * pow((pow(t_m, 1.5) / l), 2.0)) * (2.0 * tan(k)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1.1d-70) then
tmp = (2.0d0 / (k * k)) * (((l ** 2.0d0) / (sin(k) ** 2.0d0)) * (cos(k) / t_m))
else if (t_m <= 5.8d+102) then
tmp = ((2.0d0 * l) / (sin(k) * (tan(k) * (t_m ** 3.0d0)))) * (l / (2.0d0 + ((k / t_m) ** 2.0d0)))
else
tmp = 2.0d0 / ((sin(k) * (((t_m ** 1.5d0) / l) ** 2.0d0)) * (2.0d0 * tan(k)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.1e-70) {
tmp = (2.0 / (k * k)) * ((Math.pow(l, 2.0) / Math.pow(Math.sin(k), 2.0)) * (Math.cos(k) / t_m));
} else if (t_m <= 5.8e+102) {
tmp = ((2.0 * l) / (Math.sin(k) * (Math.tan(k) * Math.pow(t_m, 3.0)))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / ((Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / l), 2.0)) * (2.0 * Math.tan(k)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 1.1e-70: tmp = (2.0 / (k * k)) * ((math.pow(l, 2.0) / math.pow(math.sin(k), 2.0)) * (math.cos(k) / t_m)) elif t_m <= 5.8e+102: tmp = ((2.0 * l) / (math.sin(k) * (math.tan(k) * math.pow(t_m, 3.0)))) * (l / (2.0 + math.pow((k / t_m), 2.0))) else: tmp = 2.0 / ((math.sin(k) * math.pow((math.pow(t_m, 1.5) / l), 2.0)) * (2.0 * math.tan(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.1e-70) tmp = Float64(Float64(2.0 / Float64(k * k)) * Float64(Float64((l ^ 2.0) / (sin(k) ^ 2.0)) * Float64(cos(k) / t_m))); elseif (t_m <= 5.8e+102) tmp = Float64(Float64(Float64(2.0 * l) / Float64(sin(k) * Float64(tan(k) * (t_m ^ 3.0)))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(sin(k) * (Float64((t_m ^ 1.5) / l) ^ 2.0)) * Float64(2.0 * tan(k)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 1.1e-70) tmp = (2.0 / (k * k)) * (((l ^ 2.0) / (sin(k) ^ 2.0)) * (cos(k) / t_m)); elseif (t_m <= 5.8e+102) tmp = ((2.0 * l) / (sin(k) * (tan(k) * (t_m ^ 3.0)))) * (l / (2.0 + ((k / t_m) ^ 2.0))); else tmp = 2.0 / ((sin(k) * (((t_m ^ 1.5) / l) ^ 2.0)) * (2.0 * tan(k))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.1e-70], N[(N[(2.0 / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.8e+102], N[(N[(N[(2.0 * l), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $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[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[Tan[k], $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.1 \cdot 10^{-70}:\\
\;\;\;\;\frac{2}{k \cdot k} \cdot \left(\frac{{\ell}^{2}}{{\sin k}^{2}} \cdot \frac{\cos k}{t\_m}\right)\\
\mathbf{elif}\;t\_m \leq 5.8 \cdot 10^{+102}:\\
\;\;\;\;\frac{2 \cdot \ell}{\sin k \cdot \left(\tan k \cdot {t\_m}^{3}\right)} \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\right) \cdot \left(2 \cdot \tan k\right)}\\
\end{array}
\end{array}
if t < 1.0999999999999999e-70Initial program 50.0%
Simplified50.0%
Taylor expanded in t around 0 69.8%
associate-*r/69.8%
times-frac68.7%
*-commutative68.7%
times-frac68.8%
Simplified68.8%
unpow268.8%
Applied egg-rr68.8%
if 1.0999999999999999e-70 < t < 5.8000000000000005e102Initial program 73.7%
Simplified76.7%
associate-*r*79.7%
*-un-lft-identity79.7%
times-frac82.4%
associate-*r*83.7%
Applied egg-rr83.7%
/-rgt-identity83.7%
*-commutative83.7%
*-commutative83.7%
Simplified83.7%
associate-*r/84.8%
associate-*l*84.8%
Applied egg-rr84.8%
if 5.8000000000000005e102 < t Initial program 67.1%
Simplified67.1%
add-sqr-sqrt47.5%
pow247.5%
associate-/r*50.7%
*-commutative50.7%
sqrt-prod50.7%
associate-/r*47.5%
sqrt-div47.5%
sqrt-pow150.3%
metadata-eval50.3%
sqrt-prod25.1%
add-sqr-sqrt58.7%
Applied egg-rr58.7%
*-commutative58.7%
Simplified58.7%
unpow-prod-down55.9%
pow255.9%
add-sqr-sqrt81.1%
Applied egg-rr81.1%
Taylor expanded in k around 0 81.1%
Final simplification72.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (* l (/ 2.0 (* (tan k) (* (sin k) (pow t_m 3.0)))))))
(*
t_s
(if (<= t_m 1.45e-215)
(* t_2 (/ l 2.0))
(if (<= t_m 1e-72)
(/ (* 2.0 (/ (/ (pow l 2.0) (pow k 2.0)) t_m)) (pow k 2.0))
(if (<= t_m 5.6e+102)
(* t_2 (/ l (+ 2.0 (/ k (* t_m (/ t_m k))))))
(/
2.0
(* (* (sin k) (pow (/ (pow t_m 1.5) l) 2.0)) (* 2.0 (tan k))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = l * (2.0 / (tan(k) * (sin(k) * pow(t_m, 3.0))));
double tmp;
if (t_m <= 1.45e-215) {
tmp = t_2 * (l / 2.0);
} else if (t_m <= 1e-72) {
tmp = (2.0 * ((pow(l, 2.0) / pow(k, 2.0)) / t_m)) / pow(k, 2.0);
} else if (t_m <= 5.6e+102) {
tmp = t_2 * (l / (2.0 + (k / (t_m * (t_m / k)))));
} else {
tmp = 2.0 / ((sin(k) * pow((pow(t_m, 1.5) / l), 2.0)) * (2.0 * tan(k)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: tmp
t_2 = l * (2.0d0 / (tan(k) * (sin(k) * (t_m ** 3.0d0))))
if (t_m <= 1.45d-215) then
tmp = t_2 * (l / 2.0d0)
else if (t_m <= 1d-72) then
tmp = (2.0d0 * (((l ** 2.0d0) / (k ** 2.0d0)) / t_m)) / (k ** 2.0d0)
else if (t_m <= 5.6d+102) then
tmp = t_2 * (l / (2.0d0 + (k / (t_m * (t_m / k)))))
else
tmp = 2.0d0 / ((sin(k) * (((t_m ** 1.5d0) / l) ** 2.0d0)) * (2.0d0 * tan(k)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = l * (2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow(t_m, 3.0))));
double tmp;
if (t_m <= 1.45e-215) {
tmp = t_2 * (l / 2.0);
} else if (t_m <= 1e-72) {
tmp = (2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 2.0)) / t_m)) / Math.pow(k, 2.0);
} else if (t_m <= 5.6e+102) {
tmp = t_2 * (l / (2.0 + (k / (t_m * (t_m / k)))));
} else {
tmp = 2.0 / ((Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / l), 2.0)) * (2.0 * Math.tan(k)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = l * (2.0 / (math.tan(k) * (math.sin(k) * math.pow(t_m, 3.0)))) tmp = 0 if t_m <= 1.45e-215: tmp = t_2 * (l / 2.0) elif t_m <= 1e-72: tmp = (2.0 * ((math.pow(l, 2.0) / math.pow(k, 2.0)) / t_m)) / math.pow(k, 2.0) elif t_m <= 5.6e+102: tmp = t_2 * (l / (2.0 + (k / (t_m * (t_m / k))))) else: tmp = 2.0 / ((math.sin(k) * math.pow((math.pow(t_m, 1.5) / l), 2.0)) * (2.0 * math.tan(k))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(l * Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (t_m ^ 3.0))))) tmp = 0.0 if (t_m <= 1.45e-215) tmp = Float64(t_2 * Float64(l / 2.0)); elseif (t_m <= 1e-72) tmp = Float64(Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 2.0)) / t_m)) / (k ^ 2.0)); elseif (t_m <= 5.6e+102) tmp = Float64(t_2 * Float64(l / Float64(2.0 + Float64(k / Float64(t_m * Float64(t_m / k)))))); else tmp = Float64(2.0 / Float64(Float64(sin(k) * (Float64((t_m ^ 1.5) / l) ^ 2.0)) * Float64(2.0 * tan(k)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = l * (2.0 / (tan(k) * (sin(k) * (t_m ^ 3.0)))); tmp = 0.0; if (t_m <= 1.45e-215) tmp = t_2 * (l / 2.0); elseif (t_m <= 1e-72) tmp = (2.0 * (((l ^ 2.0) / (k ^ 2.0)) / t_m)) / (k ^ 2.0); elseif (t_m <= 5.6e+102) tmp = t_2 * (l / (2.0 + (k / (t_m * (t_m / k))))); else tmp = 2.0 / ((sin(k) * (((t_m ^ 1.5) / l) ^ 2.0)) * (2.0 * tan(k))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.45e-215], N[(t$95$2 * N[(l / 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1e-72], N[(N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.6e+102], N[(t$95$2 * N[(l / N[(2.0 + N[(k / N[(t$95$m * N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[Tan[k], $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 := \ell \cdot \frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.45 \cdot 10^{-215}:\\
\;\;\;\;t\_2 \cdot \frac{\ell}{2}\\
\mathbf{elif}\;t\_m \leq 10^{-72}:\\
\;\;\;\;\frac{2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{2}}}{t\_m}}{{k}^{2}}\\
\mathbf{elif}\;t\_m \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;t\_2 \cdot \frac{\ell}{2 + \frac{k}{t\_m \cdot \frac{t\_m}{k}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\right) \cdot \left(2 \cdot \tan k\right)}\\
\end{array}
\end{array}
\end{array}
if t < 1.45e-215Initial program 48.5%
Simplified46.4%
associate-*r*51.8%
*-un-lft-identity51.8%
times-frac52.4%
associate-*r*55.2%
Applied egg-rr55.2%
/-rgt-identity55.2%
*-commutative55.2%
*-commutative55.2%
Simplified55.2%
Taylor expanded in k around 0 56.2%
if 1.45e-215 < t < 9.9999999999999997e-73Initial program 57.3%
Simplified57.3%
Taylor expanded in t around 0 87.2%
associate-*r/87.2%
times-frac87.2%
*-commutative87.2%
times-frac87.3%
Simplified87.3%
Taylor expanded in k around 0 80.8%
associate-*l/80.8%
associate-/r*80.8%
Applied egg-rr80.8%
if 9.9999999999999997e-73 < t < 5.60000000000000037e102Initial program 73.7%
Simplified76.7%
associate-*r*79.7%
*-un-lft-identity79.7%
times-frac82.4%
associate-*r*83.7%
Applied egg-rr83.7%
/-rgt-identity83.7%
*-commutative83.7%
*-commutative83.7%
Simplified83.7%
unpow283.7%
clear-num83.7%
frac-times83.7%
*-un-lft-identity83.7%
Applied egg-rr83.7%
if 5.60000000000000037e102 < t Initial program 67.1%
Simplified67.1%
add-sqr-sqrt47.5%
pow247.5%
associate-/r*50.7%
*-commutative50.7%
sqrt-prod50.7%
associate-/r*47.5%
sqrt-div47.5%
sqrt-pow150.3%
metadata-eval50.3%
sqrt-prod25.1%
add-sqr-sqrt58.7%
Applied egg-rr58.7%
*-commutative58.7%
Simplified58.7%
unpow-prod-down55.9%
pow255.9%
add-sqr-sqrt81.1%
Applied egg-rr81.1%
Taylor expanded in k around 0 81.1%
Final simplification66.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 6.5e-18)
(/ 2.0 (* (* 2.0 k) (pow (* (/ (pow t_m 1.5) l) (sqrt (sin k))) 2.0)))
(*
(/ 2.0 (* k k))
(* (/ (pow l 2.0) (pow (sin k) 2.0)) (/ (cos 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 (k <= 6.5e-18) {
tmp = 2.0 / ((2.0 * k) * pow(((pow(t_m, 1.5) / l) * sqrt(sin(k))), 2.0));
} else {
tmp = (2.0 / (k * k)) * ((pow(l, 2.0) / pow(sin(k), 2.0)) * (cos(k) / t_m));
}
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 <= 6.5d-18) then
tmp = 2.0d0 / ((2.0d0 * k) * ((((t_m ** 1.5d0) / l) * sqrt(sin(k))) ** 2.0d0))
else
tmp = (2.0d0 / (k * k)) * (((l ** 2.0d0) / (sin(k) ** 2.0d0)) * (cos(k) / t_m))
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 <= 6.5e-18) {
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 / (k * k)) * ((Math.pow(l, 2.0) / Math.pow(Math.sin(k), 2.0)) * (Math.cos(k) / t_m));
}
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 <= 6.5e-18: 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 / (k * k)) * ((math.pow(l, 2.0) / math.pow(math.sin(k), 2.0)) * (math.cos(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 (k <= 6.5e-18) 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 / Float64(k * k)) * Float64(Float64((l ^ 2.0) / (sin(k) ^ 2.0)) * Float64(cos(k) / t_m))); 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 <= 6.5e-18) tmp = 2.0 / ((2.0 * k) * ((((t_m ^ 1.5) / l) * sqrt(sin(k))) ^ 2.0)); else tmp = (2.0 / (k * k)) * (((l ^ 2.0) / (sin(k) ^ 2.0)) * (cos(k) / t_m)); 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, 6.5e-18], 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[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t$95$m), $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 6.5 \cdot 10^{-18}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{k \cdot k} \cdot \left(\frac{{\ell}^{2}}{{\sin k}^{2}} \cdot \frac{\cos k}{t\_m}\right)\\
\end{array}
\end{array}
if k < 6.50000000000000008e-18Initial program 57.1%
Simplified57.1%
add-sqr-sqrt27.8%
pow227.8%
associate-/r*30.4%
*-commutative30.4%
sqrt-prod17.2%
associate-/r*15.6%
sqrt-div15.6%
sqrt-pow116.6%
metadata-eval16.6%
sqrt-prod5.7%
add-sqr-sqrt19.1%
Applied egg-rr19.1%
*-commutative19.1%
Simplified19.1%
Taylor expanded in k around 0 15.8%
if 6.50000000000000008e-18 < k Initial program 51.6%
Simplified51.6%
Taylor expanded in t around 0 74.8%
associate-*r/74.8%
times-frac70.7%
*-commutative70.7%
times-frac70.7%
Simplified70.7%
unpow270.7%
Applied egg-rr70.7%
Final simplification29.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1.06e-18)
(/ 2.0 (* (* 2.0 k) (pow (* (/ (pow t_m 1.5) l) (sqrt (sin k))) 2.0)))
(* (/ 2.0 (pow k 2.0)) (* (/ (cos k) t_m) (/ (pow l 2.0) (pow k 2.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.06e-18) {
tmp = 2.0 / ((2.0 * k) * pow(((pow(t_m, 1.5) / l) * sqrt(sin(k))), 2.0));
} else {
tmp = (2.0 / pow(k, 2.0)) * ((cos(k) / t_m) * (pow(l, 2.0) / pow(k, 2.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1.06d-18) then
tmp = 2.0d0 / ((2.0d0 * k) * ((((t_m ** 1.5d0) / l) * sqrt(sin(k))) ** 2.0d0))
else
tmp = (2.0d0 / (k ** 2.0d0)) * ((cos(k) / t_m) * ((l ** 2.0d0) / (k ** 2.0d0)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.06e-18) {
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(k, 2.0)) * ((Math.cos(k) / t_m) * (Math.pow(l, 2.0) / Math.pow(k, 2.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 1.06e-18: 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(k, 2.0)) * ((math.cos(k) / t_m) * (math.pow(l, 2.0) / math.pow(k, 2.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.06e-18) 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 / (k ^ 2.0)) * Float64(Float64(cos(k) / t_m) * Float64((l ^ 2.0) / (k ^ 2.0)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 1.06e-18) tmp = 2.0 / ((2.0 * k) * ((((t_m ^ 1.5) / l) * sqrt(sin(k))) ^ 2.0)); else tmp = (2.0 / (k ^ 2.0)) * ((cos(k) / t_m) * ((l ^ 2.0) / (k ^ 2.0))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.06e-18], 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[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.06 \cdot 10^{-18}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{2}} \cdot \left(\frac{\cos k}{t\_m} \cdot \frac{{\ell}^{2}}{{k}^{2}}\right)\\
\end{array}
\end{array}
if k < 1.05999999999999994e-18Initial program 57.1%
Simplified57.1%
add-sqr-sqrt27.8%
pow227.8%
associate-/r*30.4%
*-commutative30.4%
sqrt-prod17.2%
associate-/r*15.6%
sqrt-div15.6%
sqrt-pow116.6%
metadata-eval16.6%
sqrt-prod5.7%
add-sqr-sqrt19.1%
Applied egg-rr19.1%
*-commutative19.1%
Simplified19.1%
Taylor expanded in k around 0 15.8%
if 1.05999999999999994e-18 < k Initial program 51.6%
Simplified51.6%
Taylor expanded in t around 0 74.8%
associate-*r/74.8%
times-frac70.7%
*-commutative70.7%
times-frac70.7%
Simplified70.7%
Taylor expanded in k around 0 64.6%
Final simplification27.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 (<= k 2.7e-17)
(/ 2.0 (* (* 2.0 k) (pow (* (/ (pow t_m 1.5) l) (sqrt (sin k))) 2.0)))
(* (/ 2.0 (pow k 2.0)) (/ (pow l 2.0) (* t_m (* k k)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 2.7e-17) {
tmp = 2.0 / ((2.0 * k) * pow(((pow(t_m, 1.5) / l) * sqrt(sin(k))), 2.0));
} else {
tmp = (2.0 / pow(k, 2.0)) * (pow(l, 2.0) / (t_m * (k * k)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 2.7d-17) then
tmp = 2.0d0 / ((2.0d0 * k) * ((((t_m ** 1.5d0) / l) * sqrt(sin(k))) ** 2.0d0))
else
tmp = (2.0d0 / (k ** 2.0d0)) * ((l ** 2.0d0) / (t_m * (k * k)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 2.7e-17) {
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(k, 2.0)) * (Math.pow(l, 2.0) / (t_m * (k * k)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 2.7e-17: 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(k, 2.0)) * (math.pow(l, 2.0) / (t_m * (k * k))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 2.7e-17) 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 / (k ^ 2.0)) * Float64((l ^ 2.0) / Float64(t_m * Float64(k * k)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 2.7e-17) tmp = 2.0 / ((2.0 * k) * ((((t_m ^ 1.5) / l) * sqrt(sin(k))) ^ 2.0)); else tmp = (2.0 / (k ^ 2.0)) * ((l ^ 2.0) / (t_m * (k * k))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 2.7e-17], 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[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2.7 \cdot 10^{-17}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{2}} \cdot \frac{{\ell}^{2}}{t\_m \cdot \left(k \cdot k\right)}\\
\end{array}
\end{array}
if k < 2.7000000000000001e-17Initial program 57.1%
Simplified57.1%
add-sqr-sqrt27.8%
pow227.8%
associate-/r*30.4%
*-commutative30.4%
sqrt-prod17.2%
associate-/r*15.6%
sqrt-div15.6%
sqrt-pow116.6%
metadata-eval16.6%
sqrt-prod5.7%
add-sqr-sqrt19.1%
Applied egg-rr19.1%
*-commutative19.1%
Simplified19.1%
Taylor expanded in k around 0 15.8%
if 2.7000000000000001e-17 < k Initial program 51.6%
Simplified51.6%
Taylor expanded in t around 0 74.8%
associate-*r/74.8%
times-frac70.7%
*-commutative70.7%
times-frac70.7%
Simplified70.7%
Taylor expanded in k around 0 61.1%
unpow270.7%
Applied egg-rr61.1%
Final simplification27.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (* l (/ 2.0 (* (tan k) (* (sin k) (pow t_m 3.0)))))))
(*
t_s
(if (<= t_m 2.2e-213)
(* t_2 (/ l 2.0))
(if (<= t_m 2.15e-72)
(/ (* 2.0 (/ (/ (pow l 2.0) (pow k 2.0)) t_m)) (pow k 2.0))
(if (<= t_m 5.6e+102)
(* t_2 (/ l (+ 2.0 (/ k (* t_m (/ t_m k))))))
(/ 2.0 (* (* 2.0 k) (* (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 t_2 = l * (2.0 / (tan(k) * (sin(k) * pow(t_m, 3.0))));
double tmp;
if (t_m <= 2.2e-213) {
tmp = t_2 * (l / 2.0);
} else if (t_m <= 2.15e-72) {
tmp = (2.0 * ((pow(l, 2.0) / pow(k, 2.0)) / t_m)) / pow(k, 2.0);
} else if (t_m <= 5.6e+102) {
tmp = t_2 * (l / (2.0 + (k / (t_m * (t_m / k)))));
} else {
tmp = 2.0 / ((2.0 * k) * (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) :: t_2
real(8) :: tmp
t_2 = l * (2.0d0 / (tan(k) * (sin(k) * (t_m ** 3.0d0))))
if (t_m <= 2.2d-213) then
tmp = t_2 * (l / 2.0d0)
else if (t_m <= 2.15d-72) then
tmp = (2.0d0 * (((l ** 2.0d0) / (k ** 2.0d0)) / t_m)) / (k ** 2.0d0)
else if (t_m <= 5.6d+102) then
tmp = t_2 * (l / (2.0d0 + (k / (t_m * (t_m / k)))))
else
tmp = 2.0d0 / ((2.0d0 * k) * (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 t_2 = l * (2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow(t_m, 3.0))));
double tmp;
if (t_m <= 2.2e-213) {
tmp = t_2 * (l / 2.0);
} else if (t_m <= 2.15e-72) {
tmp = (2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 2.0)) / t_m)) / Math.pow(k, 2.0);
} else if (t_m <= 5.6e+102) {
tmp = t_2 * (l / (2.0 + (k / (t_m * (t_m / k)))));
} else {
tmp = 2.0 / ((2.0 * k) * (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): t_2 = l * (2.0 / (math.tan(k) * (math.sin(k) * math.pow(t_m, 3.0)))) tmp = 0 if t_m <= 2.2e-213: tmp = t_2 * (l / 2.0) elif t_m <= 2.15e-72: tmp = (2.0 * ((math.pow(l, 2.0) / math.pow(k, 2.0)) / t_m)) / math.pow(k, 2.0) elif t_m <= 5.6e+102: tmp = t_2 * (l / (2.0 + (k / (t_m * (t_m / k))))) else: tmp = 2.0 / ((2.0 * k) * (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) t_2 = Float64(l * Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (t_m ^ 3.0))))) tmp = 0.0 if (t_m <= 2.2e-213) tmp = Float64(t_2 * Float64(l / 2.0)); elseif (t_m <= 2.15e-72) tmp = Float64(Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 2.0)) / t_m)) / (k ^ 2.0)); elseif (t_m <= 5.6e+102) tmp = Float64(t_2 * Float64(l / Float64(2.0 + Float64(k / Float64(t_m * Float64(t_m / k)))))); else tmp = Float64(2.0 / Float64(Float64(2.0 * k) * 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) t_2 = l * (2.0 / (tan(k) * (sin(k) * (t_m ^ 3.0)))); tmp = 0.0; if (t_m <= 2.2e-213) tmp = t_2 * (l / 2.0); elseif (t_m <= 2.15e-72) tmp = (2.0 * (((l ^ 2.0) / (k ^ 2.0)) / t_m)) / (k ^ 2.0); elseif (t_m <= 5.6e+102) tmp = t_2 * (l / (2.0 + (k / (t_m * (t_m / k))))); else tmp = 2.0 / ((2.0 * k) * (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_] := Block[{t$95$2 = N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.2e-213], N[(t$95$2 * N[(l / 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.15e-72], N[(N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.6e+102], N[(t$95$2 * N[(l / N[(2.0 + N[(k / N[(t$95$m * 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] * 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)
\\
\begin{array}{l}
t_2 := \ell \cdot \frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.2 \cdot 10^{-213}:\\
\;\;\;\;t\_2 \cdot \frac{\ell}{2}\\
\mathbf{elif}\;t\_m \leq 2.15 \cdot 10^{-72}:\\
\;\;\;\;\frac{2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{2}}}{t\_m}}{{k}^{2}}\\
\mathbf{elif}\;t\_m \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;t\_2 \cdot \frac{\ell}{2 + \frac{k}{t\_m \cdot \frac{t\_m}{k}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\right)}\\
\end{array}
\end{array}
\end{array}
if t < 2.2000000000000001e-213Initial program 48.5%
Simplified46.4%
associate-*r*51.8%
*-un-lft-identity51.8%
times-frac52.4%
associate-*r*55.2%
Applied egg-rr55.2%
/-rgt-identity55.2%
*-commutative55.2%
*-commutative55.2%
Simplified55.2%
Taylor expanded in k around 0 56.2%
if 2.2000000000000001e-213 < t < 2.1499999999999999e-72Initial program 57.3%
Simplified57.3%
Taylor expanded in t around 0 87.2%
associate-*r/87.2%
times-frac87.2%
*-commutative87.2%
times-frac87.3%
Simplified87.3%
Taylor expanded in k around 0 80.8%
associate-*l/80.8%
associate-/r*80.8%
Applied egg-rr80.8%
if 2.1499999999999999e-72 < t < 5.60000000000000037e102Initial program 73.7%
Simplified76.7%
associate-*r*79.7%
*-un-lft-identity79.7%
times-frac82.4%
associate-*r*83.7%
Applied egg-rr83.7%
/-rgt-identity83.7%
*-commutative83.7%
*-commutative83.7%
Simplified83.7%
unpow283.7%
clear-num83.7%
frac-times83.7%
*-un-lft-identity83.7%
Applied egg-rr83.7%
if 5.60000000000000037e102 < t Initial program 67.1%
Simplified67.1%
add-sqr-sqrt47.5%
pow247.5%
associate-/r*50.7%
*-commutative50.7%
sqrt-prod50.7%
associate-/r*47.5%
sqrt-div47.5%
sqrt-pow150.3%
metadata-eval50.3%
sqrt-prod25.1%
add-sqr-sqrt58.7%
Applied egg-rr58.7%
*-commutative58.7%
Simplified58.7%
unpow-prod-down55.9%
pow255.9%
add-sqr-sqrt81.1%
Applied egg-rr81.1%
Taylor expanded in k around 0 75.8%
Final simplification65.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.6e-17)
(/ 2.0 (* (* 2.0 k) (* (sin k) (pow (/ (pow t_m 1.5) l) 2.0))))
(* (/ 2.0 (pow k 2.0)) (/ (pow l 2.0) (* t_m (* k k)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 2.6e-17) {
tmp = 2.0 / ((2.0 * k) * (sin(k) * pow((pow(t_m, 1.5) / l), 2.0)));
} else {
tmp = (2.0 / pow(k, 2.0)) * (pow(l, 2.0) / (t_m * (k * k)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 2.6d-17) then
tmp = 2.0d0 / ((2.0d0 * k) * (sin(k) * (((t_m ** 1.5d0) / l) ** 2.0d0)))
else
tmp = (2.0d0 / (k ** 2.0d0)) * ((l ** 2.0d0) / (t_m * (k * k)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 2.6e-17) {
tmp = 2.0 / ((2.0 * k) * (Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / l), 2.0)));
} else {
tmp = (2.0 / Math.pow(k, 2.0)) * (Math.pow(l, 2.0) / (t_m * (k * k)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 2.6e-17: tmp = 2.0 / ((2.0 * k) * (math.sin(k) * math.pow((math.pow(t_m, 1.5) / l), 2.0))) else: tmp = (2.0 / math.pow(k, 2.0)) * (math.pow(l, 2.0) / (t_m * (k * k))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 2.6e-17) tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(sin(k) * (Float64((t_m ^ 1.5) / l) ^ 2.0)))); else tmp = Float64(Float64(2.0 / (k ^ 2.0)) * Float64((l ^ 2.0) / Float64(t_m * Float64(k * k)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 2.6e-17) tmp = 2.0 / ((2.0 * k) * (sin(k) * (((t_m ^ 1.5) / l) ^ 2.0))); else tmp = (2.0 / (k ^ 2.0)) * ((l ^ 2.0) / (t_m * (k * k))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 2.6e-17], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2.6 \cdot 10^{-17}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{2}} \cdot \frac{{\ell}^{2}}{t\_m \cdot \left(k \cdot k\right)}\\
\end{array}
\end{array}
if k < 2.60000000000000003e-17Initial program 57.1%
Simplified57.1%
add-sqr-sqrt27.8%
pow227.8%
associate-/r*30.4%
*-commutative30.4%
sqrt-prod17.2%
associate-/r*15.6%
sqrt-div15.6%
sqrt-pow116.6%
metadata-eval16.6%
sqrt-prod5.7%
add-sqr-sqrt19.1%
Applied egg-rr19.1%
*-commutative19.1%
Simplified19.1%
unpow-prod-down18.1%
pow218.1%
add-sqr-sqrt32.8%
Applied egg-rr32.8%
Taylor expanded in k around 0 29.0%
if 2.60000000000000003e-17 < k Initial program 51.6%
Simplified51.6%
Taylor expanded in t around 0 74.8%
associate-*r/74.8%
times-frac70.7%
*-commutative70.7%
times-frac70.7%
Simplified70.7%
Taylor expanded in k around 0 61.1%
unpow270.7%
Applied egg-rr61.1%
Final simplification36.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 (<= k 1.5e-17)
(/ 2.0 (* (pow (/ (pow t_m 1.5) l) 2.0) (* 2.0 (* k k))))
(* (/ 2.0 (pow k 2.0)) (/ (pow l 2.0) (* t_m (* k k)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.5e-17) {
tmp = 2.0 / (pow((pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)));
} else {
tmp = (2.0 / pow(k, 2.0)) * (pow(l, 2.0) / (t_m * (k * k)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1.5d-17) then
tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) ** 2.0d0) * (2.0d0 * (k * k)))
else
tmp = (2.0d0 / (k ** 2.0d0)) * ((l ** 2.0d0) / (t_m * (k * k)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.5e-17) {
tmp = 2.0 / (Math.pow((Math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)));
} else {
tmp = (2.0 / Math.pow(k, 2.0)) * (Math.pow(l, 2.0) / (t_m * (k * k)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 1.5e-17: tmp = 2.0 / (math.pow((math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k))) else: tmp = (2.0 / math.pow(k, 2.0)) * (math.pow(l, 2.0) / (t_m * (k * k))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.5e-17) tmp = Float64(2.0 / Float64((Float64((t_m ^ 1.5) / l) ^ 2.0) * Float64(2.0 * Float64(k * k)))); else tmp = Float64(Float64(2.0 / (k ^ 2.0)) * Float64((l ^ 2.0) / Float64(t_m * Float64(k * k)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 1.5e-17) tmp = 2.0 / ((((t_m ^ 1.5) / l) ^ 2.0) * (2.0 * (k * k))); else tmp = (2.0 / (k ^ 2.0)) * ((l ^ 2.0) / (t_m * (k * k))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.5e-17], N[(2.0 / N[(N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[(k * k), $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 1.5 \cdot 10^{-17}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{2}} \cdot \frac{{\ell}^{2}}{t\_m \cdot \left(k \cdot k\right)}\\
\end{array}
\end{array}
if k < 1.50000000000000003e-17Initial program 57.1%
Simplified57.0%
Taylor expanded in k around 0 56.3%
unpow260.5%
Applied egg-rr56.3%
add-sqr-sqrt24.8%
pow224.8%
associate-/r*23.6%
sqrt-div23.6%
sqrt-pow125.2%
metadata-eval25.2%
sqrt-prod12.0%
add-sqr-sqrt25.8%
Applied egg-rr25.8%
if 1.50000000000000003e-17 < k Initial program 51.6%
Simplified51.6%
Taylor expanded in t around 0 74.8%
associate-*r/74.8%
times-frac70.7%
*-commutative70.7%
times-frac70.7%
Simplified70.7%
Taylor expanded in k around 0 61.1%
unpow270.7%
Applied egg-rr61.1%
Final simplification34.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.18e-24)
(/ 2.0 (* (* 2.0 (* k k)) (* (* (pow t_m 2.0) (/ 1.0 l)) (/ t_m l))))
(* (/ 2.0 (pow k 2.0)) (/ (pow l 2.0) (* t_m (* k k)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.18e-24) {
tmp = 2.0 / ((2.0 * (k * k)) * ((pow(t_m, 2.0) * (1.0 / l)) * (t_m / l)));
} else {
tmp = (2.0 / pow(k, 2.0)) * (pow(l, 2.0) / (t_m * (k * k)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1.18d-24) then
tmp = 2.0d0 / ((2.0d0 * (k * k)) * (((t_m ** 2.0d0) * (1.0d0 / l)) * (t_m / l)))
else
tmp = (2.0d0 / (k ** 2.0d0)) * ((l ** 2.0d0) / (t_m * (k * k)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.18e-24) {
tmp = 2.0 / ((2.0 * (k * k)) * ((Math.pow(t_m, 2.0) * (1.0 / l)) * (t_m / l)));
} else {
tmp = (2.0 / Math.pow(k, 2.0)) * (Math.pow(l, 2.0) / (t_m * (k * k)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 1.18e-24: tmp = 2.0 / ((2.0 * (k * k)) * ((math.pow(t_m, 2.0) * (1.0 / l)) * (t_m / l))) else: tmp = (2.0 / math.pow(k, 2.0)) * (math.pow(l, 2.0) / (t_m * (k * k))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.18e-24) tmp = Float64(2.0 / Float64(Float64(2.0 * Float64(k * k)) * Float64(Float64((t_m ^ 2.0) * Float64(1.0 / l)) * Float64(t_m / l)))); else tmp = Float64(Float64(2.0 / (k ^ 2.0)) * Float64((l ^ 2.0) / Float64(t_m * Float64(k * k)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 1.18e-24) tmp = 2.0 / ((2.0 * (k * k)) * (((t_m ^ 2.0) * (1.0 / l)) * (t_m / l))); else tmp = (2.0 / (k ^ 2.0)) * ((l ^ 2.0) / (t_m * (k * k))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.18e-24], N[(2.0 / N[(N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(1.0 / l), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[(k * k), $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 1.18 \cdot 10^{-24}:\\
\;\;\;\;\frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\left({t\_m}^{2} \cdot \frac{1}{\ell}\right) \cdot \frac{t\_m}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{2}} \cdot \frac{{\ell}^{2}}{t\_m \cdot \left(k \cdot k\right)}\\
\end{array}
\end{array}
if k < 1.18e-24Initial program 56.7%
Simplified56.6%
Taylor expanded in k around 0 56.4%
unpow260.1%
Applied egg-rr56.4%
associate-/r*51.9%
unpow351.9%
times-frac60.2%
pow260.2%
Applied egg-rr60.2%
div-inv60.2%
Applied egg-rr60.2%
if 1.18e-24 < k Initial program 53.1%
Simplified53.1%
Taylor expanded in t around 0 74.8%
associate-*r/74.8%
times-frac71.0%
*-commutative71.0%
times-frac71.0%
Simplified71.0%
Taylor expanded in k around 0 62.0%
unpow271.0%
Applied egg-rr62.0%
Final simplification60.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 7e-25)
(/ 2.0 (* (* 2.0 (* k k)) (* (* (pow t_m 2.0) (/ 1.0 l)) (/ t_m 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 <= 7e-25) {
tmp = 2.0 / ((2.0 * (k * k)) * ((pow(t_m, 2.0) * (1.0 / l)) * (t_m / 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 <= 7d-25) then
tmp = 2.0d0 / ((2.0d0 * (k * k)) * (((t_m ** 2.0d0) * (1.0d0 / l)) * (t_m / 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 <= 7e-25) {
tmp = 2.0 / ((2.0 * (k * k)) * ((Math.pow(t_m, 2.0) * (1.0 / l)) * (t_m / 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 <= 7e-25: tmp = 2.0 / ((2.0 * (k * k)) * ((math.pow(t_m, 2.0) * (1.0 / l)) * (t_m / 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 <= 7e-25) tmp = Float64(2.0 / Float64(Float64(2.0 * Float64(k * k)) * Float64(Float64((t_m ^ 2.0) * Float64(1.0 / l)) * Float64(t_m / l)))); else tmp = Float64(Float64(2.0 * (l ^ 2.0)) / Float64(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 <= 7e-25) tmp = 2.0 / ((2.0 * (k * k)) * (((t_m ^ 2.0) * (1.0 / l)) * (t_m / 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, 7e-25], N[(2.0 / N[(N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(1.0 / l), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 7 \cdot 10^{-25}:\\
\;\;\;\;\frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\left({t\_m}^{2} \cdot \frac{1}{\ell}\right) \cdot \frac{t\_m}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot {\ell}^{2}}{t\_m \cdot {k}^{4}}\\
\end{array}
\end{array}
if k < 7.0000000000000004e-25Initial program 56.7%
Simplified56.6%
Taylor expanded in k around 0 56.4%
unpow260.1%
Applied egg-rr56.4%
associate-/r*51.9%
unpow351.9%
times-frac60.2%
pow260.2%
Applied egg-rr60.2%
div-inv60.2%
Applied egg-rr60.2%
if 7.0000000000000004e-25 < k Initial program 53.1%
Simplified53.1%
Taylor expanded in t around 0 74.8%
associate-*r/74.8%
times-frac71.0%
*-commutative71.0%
times-frac71.0%
Simplified71.0%
Taylor expanded in k around 0 59.0%
associate-*r/59.0%
*-commutative59.0%
Simplified59.0%
Final simplification59.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 (<= k 1.1e-24)
(/ 2.0 (* (* 2.0 (* k k)) (* (* (pow t_m 2.0) (/ 1.0 l)) (/ t_m l))))
(* 2.0 (/ (/ (pow l 2.0) (pow k 4.0)) 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 (k <= 1.1e-24) {
tmp = 2.0 / ((2.0 * (k * k)) * ((pow(t_m, 2.0) * (1.0 / l)) * (t_m / l)));
} else {
tmp = 2.0 * ((pow(l, 2.0) / pow(k, 4.0)) / t_m);
}
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.1d-24) then
tmp = 2.0d0 / ((2.0d0 * (k * k)) * (((t_m ** 2.0d0) * (1.0d0 / l)) * (t_m / l)))
else
tmp = 2.0d0 * (((l ** 2.0d0) / (k ** 4.0d0)) / t_m)
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.1e-24) {
tmp = 2.0 / ((2.0 * (k * k)) * ((Math.pow(t_m, 2.0) * (1.0 / l)) * (t_m / l)));
} else {
tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 4.0)) / t_m);
}
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.1e-24: tmp = 2.0 / ((2.0 * (k * k)) * ((math.pow(t_m, 2.0) * (1.0 / l)) * (t_m / l))) else: tmp = 2.0 * ((math.pow(l, 2.0) / math.pow(k, 4.0)) / 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 (k <= 1.1e-24) tmp = Float64(2.0 / Float64(Float64(2.0 * Float64(k * k)) * Float64(Float64((t_m ^ 2.0) * Float64(1.0 / l)) * Float64(t_m / l)))); else tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 4.0)) / t_m)); 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.1e-24) tmp = 2.0 / ((2.0 * (k * k)) * (((t_m ^ 2.0) * (1.0 / l)) * (t_m / l))); else tmp = 2.0 * (((l ^ 2.0) / (k ^ 4.0)) / t_m); 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.1e-24], N[(2.0 / N[(N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(1.0 / l), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $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.1 \cdot 10^{-24}:\\
\;\;\;\;\frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\left({t\_m}^{2} \cdot \frac{1}{\ell}\right) \cdot \frac{t\_m}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t\_m}\\
\end{array}
\end{array}
if k < 1.10000000000000001e-24Initial program 56.7%
Simplified56.6%
Taylor expanded in k around 0 56.4%
unpow260.1%
Applied egg-rr56.4%
associate-/r*51.9%
unpow351.9%
times-frac60.2%
pow260.2%
Applied egg-rr60.2%
div-inv60.2%
Applied egg-rr60.2%
if 1.10000000000000001e-24 < k Initial program 53.1%
Simplified53.1%
Taylor expanded in t around 0 74.8%
associate-*r/74.8%
times-frac71.0%
*-commutative71.0%
times-frac71.0%
Simplified71.0%
Taylor expanded in k around 0 62.0%
Taylor expanded in k around 0 59.0%
associate-/r*59.0%
Simplified59.0%
Final simplification59.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 (* (* 2.0 (* k k)) (* (* (pow t_m 2.0) (/ 1.0 l)) (/ t_m l))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((2.0 * (k * k)) * ((pow(t_m, 2.0) * (1.0 / l)) * (t_m / l))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / ((2.0d0 * (k * k)) * (((t_m ** 2.0d0) * (1.0d0 / l)) * (t_m / l))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((2.0 * (k * k)) * ((Math.pow(t_m, 2.0) * (1.0 / l)) * (t_m / l))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / ((2.0 * (k * k)) * ((math.pow(t_m, 2.0) * (1.0 / l)) * (t_m / l))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64(Float64(2.0 * Float64(k * k)) * Float64(Float64((t_m ^ 2.0) * Float64(1.0 / l)) * Float64(t_m / l))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / ((2.0 * (k * k)) * (((t_m ^ 2.0) * (1.0 / l)) * (t_m / l)))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(1.0 / l), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / 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 \frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\left({t\_m}^{2} \cdot \frac{1}{\ell}\right) \cdot \frac{t\_m}{\ell}\right)}
\end{array}
Initial program 55.7%
Simplified56.4%
Taylor expanded in k around 0 55.0%
unpow263.0%
Applied egg-rr55.0%
associate-/r*51.6%
unpow351.6%
times-frac58.1%
pow258.1%
Applied egg-rr58.1%
div-inv58.2%
Applied egg-rr58.2%
Final simplification58.2%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 2.0 (* (* 2.0 (* k k)) (* (/ t_m l) (/ (* t_m t_m) l))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / ((2.0d0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64(Float64(2.0 * Float64(k * k)) * Float64(Float64(t_m / l) * Float64(Float64(t_m * t_m) / l))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l)))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $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 \frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\frac{t\_m}{\ell} \cdot \frac{t\_m \cdot t\_m}{\ell}\right)}
\end{array}
Initial program 55.7%
Simplified56.4%
Taylor expanded in k around 0 55.0%
unpow263.0%
Applied egg-rr55.0%
associate-/r*51.6%
unpow351.6%
times-frac58.1%
pow258.1%
Applied egg-rr58.1%
unpow258.1%
Applied egg-rr58.1%
Final simplification58.1%
herbie shell --seed 2024137
(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))))