
(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 27 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ l (hypot 1.0 (hypot 1.0 (/ k t_m))))) (t_3 (/ 1.0 (cbrt l))))
(*
t_s
(if (<= t_m 2.6e-95)
(* l (* 2.0 (/ (* l (cos k)) (* (pow k 2.0) (* t_m (pow (sin k) 2.0))))))
(if (<= t_m 4.8e+92)
(* t_2 (* (/ (/ 2.0 (tan k)) (* (sin k) (pow t_m 3.0))) t_2))
(/
2.0
(pow
(*
t_m
(*
(* (cbrt (sin k)) (* t_3 t_3))
(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 t_2 = l / hypot(1.0, hypot(1.0, (k / t_m)));
double t_3 = 1.0 / cbrt(l);
double tmp;
if (t_m <= 2.6e-95) {
tmp = l * (2.0 * ((l * cos(k)) / (pow(k, 2.0) * (t_m * pow(sin(k), 2.0)))));
} else if (t_m <= 4.8e+92) {
tmp = t_2 * (((2.0 / tan(k)) / (sin(k) * pow(t_m, 3.0))) * t_2);
} else {
tmp = 2.0 / pow((t_m * ((cbrt(sin(k)) * (t_3 * t_3)) * 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 t_2 = l / Math.hypot(1.0, Math.hypot(1.0, (k / t_m)));
double t_3 = 1.0 / Math.cbrt(l);
double tmp;
if (t_m <= 2.6e-95) {
tmp = l * (2.0 * ((l * Math.cos(k)) / (Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0)))));
} else if (t_m <= 4.8e+92) {
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.cbrt(Math.sin(k)) * (t_3 * t_3)) * 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) t_2 = Float64(l / hypot(1.0, hypot(1.0, Float64(k / t_m)))) t_3 = Float64(1.0 / cbrt(l)) tmp = 0.0 if (t_m <= 2.6e-95) tmp = Float64(l * Float64(2.0 * Float64(Float64(l * cos(k)) / Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0)))))); elseif (t_m <= 4.8e+92) tmp = Float64(t_2 * Float64(Float64(Float64(2.0 / tan(k)) / Float64(sin(k) * (t_m ^ 3.0))) * t_2)); else tmp = Float64(2.0 / (Float64(t_m * Float64(Float64(cbrt(sin(k)) * Float64(t_3 * t_3)) * 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_] := 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]}, Block[{t$95$3 = N[(1.0 / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.6e-95], N[(l * N[(2.0 * N[(N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.8e+92], N[(t$95$2 * N[(N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(t$95$m * N[(N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$3 * t$95$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]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)}\\
t_3 := \frac{1}{\sqrt[3]{\ell}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.6 \cdot 10^{-95}:\\
\;\;\;\;\ell \cdot \left(2 \cdot \frac{\ell \cdot \cos k}{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}\right)\\
\mathbf{elif}\;t\_m \leq 4.8 \cdot 10^{+92}:\\
\;\;\;\;t\_2 \cdot \left(\frac{\frac{2}{\tan k}}{\sin k \cdot {t\_m}^{3}} \cdot t\_2\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot \left(\left(\sqrt[3]{\sin k} \cdot \left(t\_3 \cdot t\_3\right)\right) \cdot \sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)}\right)\right)}^{3}}\\
\end{array}
\end{array}
\end{array}
if t < 2.60000000000000001e-95Initial program 48.9%
Simplified49.4%
associate-*r*53.6%
*-un-lft-identity53.6%
times-frac53.5%
associate-/l/53.5%
Applied egg-rr53.5%
/-rgt-identity53.5%
*-commutative53.5%
metadata-eval53.5%
distribute-neg-frac53.5%
associate-/l/53.5%
distribute-neg-frac53.5%
distribute-neg-frac53.5%
metadata-eval53.5%
*-commutative53.5%
Simplified53.5%
pow153.5%
associate-*l*53.4%
Applied egg-rr53.4%
Taylor expanded in k around inf 71.1%
if 2.60000000000000001e-95 < t < 4.80000000000000009e92Initial program 78.4%
Simplified73.6%
associate-*r*84.9%
add-sqr-sqrt84.6%
times-frac87.3%
Applied egg-rr89.8%
associate-/l*94.5%
metadata-eval94.5%
distribute-neg-frac94.5%
associate-/l/94.6%
distribute-neg-frac94.6%
distribute-neg-frac94.6%
metadata-eval94.6%
*-commutative94.6%
Simplified94.6%
if 4.80000000000000009e92 < t Initial program 70.0%
Simplified70.0%
add-cube-cbrt70.0%
pow370.0%
*-commutative70.0%
cbrt-prod70.0%
cbrt-div70.0%
rem-cbrt-cube79.7%
cbrt-prod92.8%
pow292.8%
Applied egg-rr92.8%
pow192.8%
div-inv92.7%
pow-flip92.8%
metadata-eval92.8%
Applied egg-rr92.8%
unpow192.8%
associate-*r*93.0%
*-commutative93.0%
Simplified93.0%
add-cube-cbrt92.7%
pow392.7%
Applied egg-rr97.2%
associate-*l*97.1%
Simplified97.1%
sqr-pow97.2%
metadata-eval97.2%
unpow-197.2%
metadata-eval97.2%
unpow-197.2%
Applied egg-rr97.2%
Final simplification78.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ l (hypot 1.0 (hypot 1.0 (/ k t_m))))))
(*
t_s
(if (<= t_m 5.2e-95)
(* l (* 2.0 (/ (* l (cos k)) (* (pow k 2.0) (* t_m (pow (sin k) 2.0))))))
(if (<= t_m 6e+92)
(* t_2 (* (/ (/ 2.0 (tan k)) (* (sin k) (pow t_m 3.0))) t_2))
(/
2.0
(pow
(*
t_m
(*
(cbrt (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0))))
(* (cbrt (sin k)) (pow (cbrt l) -2.0))))
3.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = l / hypot(1.0, hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 5.2e-95) {
tmp = l * (2.0 * ((l * cos(k)) / (pow(k, 2.0) * (t_m * pow(sin(k), 2.0)))));
} else if (t_m <= 6e+92) {
tmp = t_2 * (((2.0 / tan(k)) / (sin(k) * pow(t_m, 3.0))) * t_2);
} else {
tmp = 2.0 / pow((t_m * (cbrt((tan(k) * (2.0 + pow((k / t_m), 2.0)))) * (cbrt(sin(k)) * pow(cbrt(l), -2.0)))), 3.0);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = l / Math.hypot(1.0, Math.hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 5.2e-95) {
tmp = l * (2.0 * ((l * Math.cos(k)) / (Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0)))));
} else if (t_m <= 6e+92) {
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.cbrt((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0)))) * (Math.cbrt(Math.sin(k)) * Math.pow(Math.cbrt(l), -2.0)))), 3.0);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(l / hypot(1.0, hypot(1.0, Float64(k / t_m)))) tmp = 0.0 if (t_m <= 5.2e-95) tmp = Float64(l * Float64(2.0 * Float64(Float64(l * cos(k)) / Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0)))))); elseif (t_m <= 6e+92) tmp = Float64(t_2 * Float64(Float64(Float64(2.0 / tan(k)) / Float64(sin(k) * (t_m ^ 3.0))) * t_2)); else tmp = Float64(2.0 / (Float64(t_m * Float64(cbrt(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0)))) * Float64(cbrt(sin(k)) * (cbrt(l) ^ -2.0)))) ^ 3.0)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := 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, 5.2e-95], N[(l * N[(2.0 * N[(N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 6e+92], N[(t$95$2 * N[(N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(t$95$m * N[(N[Power[N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 5.2 \cdot 10^{-95}:\\
\;\;\;\;\ell \cdot \left(2 \cdot \frac{\ell \cdot \cos k}{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}\right)\\
\mathbf{elif}\;t\_m \leq 6 \cdot 10^{+92}:\\
\;\;\;\;t\_2 \cdot \left(\frac{\frac{2}{\tan k}}{\sin k \cdot {t\_m}^{3}} \cdot t\_2\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot \left(\sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)} \cdot \left(\sqrt[3]{\sin k} \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right)\right)}^{3}}\\
\end{array}
\end{array}
\end{array}
if t < 5.20000000000000001e-95Initial program 48.9%
Simplified49.4%
associate-*r*53.6%
*-un-lft-identity53.6%
times-frac53.5%
associate-/l/53.5%
Applied egg-rr53.5%
/-rgt-identity53.5%
*-commutative53.5%
metadata-eval53.5%
distribute-neg-frac53.5%
associate-/l/53.5%
distribute-neg-frac53.5%
distribute-neg-frac53.5%
metadata-eval53.5%
*-commutative53.5%
Simplified53.5%
pow153.5%
associate-*l*53.4%
Applied egg-rr53.4%
Taylor expanded in k around inf 71.1%
if 5.20000000000000001e-95 < t < 6.00000000000000026e92Initial program 78.4%
Simplified73.6%
associate-*r*84.9%
add-sqr-sqrt84.6%
times-frac87.3%
Applied egg-rr89.8%
associate-/l*94.5%
metadata-eval94.5%
distribute-neg-frac94.5%
associate-/l/94.6%
distribute-neg-frac94.6%
distribute-neg-frac94.6%
metadata-eval94.6%
*-commutative94.6%
Simplified94.6%
if 6.00000000000000026e92 < t Initial program 70.0%
Simplified70.0%
add-cube-cbrt70.0%
pow370.0%
*-commutative70.0%
cbrt-prod70.0%
cbrt-div70.0%
rem-cbrt-cube79.7%
cbrt-prod92.8%
pow292.8%
Applied egg-rr92.8%
pow192.8%
div-inv92.7%
pow-flip92.8%
metadata-eval92.8%
Applied egg-rr92.8%
unpow192.8%
associate-*r*93.0%
*-commutative93.0%
Simplified93.0%
add-cube-cbrt92.7%
pow392.7%
Applied egg-rr97.2%
associate-*l*97.1%
Simplified97.1%
Final simplification78.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ l (hypot 1.0 (hypot 1.0 (/ k t_m))))))
(*
t_s
(if (<= t_m 1.2e-96)
(* l (* 2.0 (/ (* l (cos k)) (* (pow k 2.0) (* t_m (pow (sin k) 2.0))))))
(if (<= t_m 6e+92)
(* t_2 (* (/ (/ 2.0 (tan k)) (* (sin k) (pow t_m 3.0))) t_2))
(/
2.0
(*
(pow (* (pow (cbrt l) -2.0) (* t_m (cbrt (sin k)))) 3.0)
(* (tan k) (+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0)))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = l / hypot(1.0, hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 1.2e-96) {
tmp = l * (2.0 * ((l * cos(k)) / (pow(k, 2.0) * (t_m * pow(sin(k), 2.0)))));
} else if (t_m <= 6e+92) {
tmp = t_2 * (((2.0 / tan(k)) / (sin(k) * pow(t_m, 3.0))) * t_2);
} else {
tmp = 2.0 / (pow((pow(cbrt(l), -2.0) * (t_m * cbrt(sin(k)))), 3.0) * (tan(k) * (1.0 + (1.0 + pow((k / t_m), 2.0)))));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = l / Math.hypot(1.0, Math.hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 1.2e-96) {
tmp = l * (2.0 * ((l * Math.cos(k)) / (Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0)))));
} else if (t_m <= 6e+92) {
tmp = t_2 * (((2.0 / Math.tan(k)) / (Math.sin(k) * Math.pow(t_m, 3.0))) * t_2);
} else {
tmp = 2.0 / (Math.pow((Math.pow(Math.cbrt(l), -2.0) * (t_m * Math.cbrt(Math.sin(k)))), 3.0) * (Math.tan(k) * (1.0 + (1.0 + Math.pow((k / t_m), 2.0)))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(l / hypot(1.0, hypot(1.0, Float64(k / t_m)))) tmp = 0.0 if (t_m <= 1.2e-96) tmp = Float64(l * Float64(2.0 * Float64(Float64(l * cos(k)) / Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0)))))); elseif (t_m <= 6e+92) tmp = Float64(t_2 * Float64(Float64(Float64(2.0 / tan(k)) / Float64(sin(k) * (t_m ^ 3.0))) * t_2)); else tmp = Float64(2.0 / Float64((Float64((cbrt(l) ^ -2.0) * Float64(t_m * cbrt(sin(k)))) ^ 3.0) * Float64(tan(k) * Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0)))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(l / N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.2e-96], N[(l * N[(2.0 * N[(N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 6e+92], N[(t$95$2 * N[(N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.2 \cdot 10^{-96}:\\
\;\;\;\;\ell \cdot \left(2 \cdot \frac{\ell \cdot \cos k}{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}\right)\\
\mathbf{elif}\;t\_m \leq 6 \cdot 10^{+92}:\\
\;\;\;\;t\_2 \cdot \left(\frac{\frac{2}{\tan k}}{\sin k \cdot {t\_m}^{3}} \cdot t\_2\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \left(t\_m \cdot \sqrt[3]{\sin k}\right)\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)\right)}\\
\end{array}
\end{array}
\end{array}
if t < 1.2000000000000001e-96Initial program 48.9%
Simplified49.4%
associate-*r*53.6%
*-un-lft-identity53.6%
times-frac53.5%
associate-/l/53.5%
Applied egg-rr53.5%
/-rgt-identity53.5%
*-commutative53.5%
metadata-eval53.5%
distribute-neg-frac53.5%
associate-/l/53.5%
distribute-neg-frac53.5%
distribute-neg-frac53.5%
metadata-eval53.5%
*-commutative53.5%
Simplified53.5%
pow153.5%
associate-*l*53.4%
Applied egg-rr53.4%
Taylor expanded in k around inf 71.1%
if 1.2000000000000001e-96 < t < 6.00000000000000026e92Initial program 78.4%
Simplified73.6%
associate-*r*84.9%
add-sqr-sqrt84.6%
times-frac87.3%
Applied egg-rr89.8%
associate-/l*94.5%
metadata-eval94.5%
distribute-neg-frac94.5%
associate-/l/94.6%
distribute-neg-frac94.6%
distribute-neg-frac94.6%
metadata-eval94.6%
*-commutative94.6%
Simplified94.6%
if 6.00000000000000026e92 < t Initial program 70.0%
Simplified70.0%
add-cube-cbrt70.0%
pow370.0%
*-commutative70.0%
cbrt-prod70.0%
cbrt-div70.0%
rem-cbrt-cube79.7%
cbrt-prod92.8%
pow292.8%
Applied egg-rr92.8%
pow192.8%
div-inv92.7%
pow-flip92.8%
metadata-eval92.8%
Applied egg-rr92.8%
unpow192.8%
associate-*r*93.0%
*-commutative93.0%
Simplified93.0%
Final simplification78.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 1.7e-40)
(* l (* 2.0 (/ (* l (cos k)) (* (pow k 2.0) (* t_m (pow (sin k) 2.0))))))
(/
2.0
(*
(pow (* (pow (cbrt l) -2.0) (* t_m (cbrt (sin k)))) 3.0)
(* (tan k) (+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.7e-40) {
tmp = l * (2.0 * ((l * cos(k)) / (pow(k, 2.0) * (t_m * pow(sin(k), 2.0)))));
} else {
tmp = 2.0 / (pow((pow(cbrt(l), -2.0) * (t_m * cbrt(sin(k)))), 3.0) * (tan(k) * (1.0 + (1.0 + pow((k / t_m), 2.0)))));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.7e-40) {
tmp = l * (2.0 * ((l * Math.cos(k)) / (Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0)))));
} else {
tmp = 2.0 / (Math.pow((Math.pow(Math.cbrt(l), -2.0) * (t_m * Math.cbrt(Math.sin(k)))), 3.0) * (Math.tan(k) * (1.0 + (1.0 + Math.pow((k / t_m), 2.0)))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.7e-40) tmp = Float64(l * Float64(2.0 * Float64(Float64(l * cos(k)) / Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0)))))); else tmp = Float64(2.0 / Float64((Float64((cbrt(l) ^ -2.0) * Float64(t_m * cbrt(sin(k)))) ^ 3.0) * Float64(tan(k) * Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0)))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.7e-40], N[(l * N[(2.0 * N[(N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.7 \cdot 10^{-40}:\\
\;\;\;\;\ell \cdot \left(2 \cdot \frac{\ell \cdot \cos k}{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \left(t\_m \cdot \sqrt[3]{\sin k}\right)\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)\right)}\\
\end{array}
\end{array}
if t < 1.69999999999999992e-40Initial program 49.8%
Simplified49.7%
associate-*r*54.2%
*-un-lft-identity54.2%
times-frac54.7%
associate-/l/54.7%
Applied egg-rr54.7%
/-rgt-identity54.7%
*-commutative54.7%
metadata-eval54.7%
distribute-neg-frac54.7%
associate-/l/54.7%
distribute-neg-frac54.7%
distribute-neg-frac54.7%
metadata-eval54.7%
*-commutative54.7%
Simplified54.7%
pow154.7%
associate-*l*54.6%
Applied egg-rr54.6%
Taylor expanded in k around inf 71.4%
if 1.69999999999999992e-40 < t Initial program 75.1%
Simplified75.1%
add-cube-cbrt74.9%
pow374.9%
*-commutative74.9%
cbrt-prod75.0%
cbrt-div74.9%
rem-cbrt-cube80.4%
cbrt-prod90.1%
pow290.1%
Applied egg-rr90.1%
pow190.1%
div-inv90.1%
pow-flip90.1%
metadata-eval90.1%
Applied egg-rr90.1%
unpow190.1%
associate-*r*90.3%
*-commutative90.3%
Simplified90.3%
Final simplification76.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 7.2e-40)
(* l (* 2.0 (/ (* l (cos k)) (* (pow k 2.0) (* t_m (pow (sin k) 2.0))))))
(/
2.0
(*
(* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
(pow (* t_m (* (cbrt (sin k)) (pow (cbrt l) -2.0))) 3.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 7.2e-40) {
tmp = l * (2.0 * ((l * cos(k)) / (pow(k, 2.0) * (t_m * pow(sin(k), 2.0)))));
} else {
tmp = 2.0 / ((tan(k) * (2.0 + pow((k / t_m), 2.0))) * pow((t_m * (cbrt(sin(k)) * pow(cbrt(l), -2.0))), 3.0));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 7.2e-40) {
tmp = l * (2.0 * ((l * Math.cos(k)) / (Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0)))));
} else {
tmp = 2.0 / ((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))) * Math.pow((t_m * (Math.cbrt(Math.sin(k)) * Math.pow(Math.cbrt(l), -2.0))), 3.0));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 7.2e-40) tmp = Float64(l * Float64(2.0 * Float64(Float64(l * cos(k)) / Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0)))))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * (Float64(t_m * Float64(cbrt(sin(k)) * (cbrt(l) ^ -2.0))) ^ 3.0))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 7.2e-40], N[(l * N[(2.0 * N[(N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[(t$95$m * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 7.2 \cdot 10^{-40}:\\
\;\;\;\;\ell \cdot \left(2 \cdot \frac{\ell \cdot \cos k}{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right) \cdot {\left(t\_m \cdot \left(\sqrt[3]{\sin k} \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right)}^{3}}\\
\end{array}
\end{array}
if t < 7.2e-40Initial program 49.8%
Simplified49.7%
associate-*r*54.2%
*-un-lft-identity54.2%
times-frac54.7%
associate-/l/54.7%
Applied egg-rr54.7%
/-rgt-identity54.7%
*-commutative54.7%
metadata-eval54.7%
distribute-neg-frac54.7%
associate-/l/54.7%
distribute-neg-frac54.7%
distribute-neg-frac54.7%
metadata-eval54.7%
*-commutative54.7%
Simplified54.7%
pow154.7%
associate-*l*54.6%
Applied egg-rr54.6%
Taylor expanded in k around inf 71.4%
if 7.2e-40 < t Initial program 75.1%
Simplified75.1%
add-cube-cbrt74.9%
pow374.9%
*-commutative74.9%
cbrt-prod75.0%
cbrt-div74.9%
rem-cbrt-cube80.4%
cbrt-prod90.1%
pow290.1%
Applied egg-rr90.1%
pow190.1%
div-inv90.1%
pow-flip90.1%
metadata-eval90.1%
Applied egg-rr90.1%
unpow190.1%
associate-*r*90.3%
*-commutative90.3%
Simplified90.3%
add-cube-cbrt90.0%
pow390.0%
Applied egg-rr96.2%
*-commutative96.2%
cube-prod90.0%
rem-cube-cbrt90.1%
Simplified90.1%
Final simplification76.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (/ k t_m) 2.0)))
(*
t_s
(if (<= t_m 2.05e-40)
(* l (* 2.0 (/ (* l (cos k)) (* (pow k 2.0) (* t_m (pow (sin k) 2.0))))))
(if (<= t_m 5.5e+102)
(/
(* l (/ (* l (/ 2.0 (tan k))) (* (sin k) (pow t_m 3.0))))
(+ 2.0 t_2))
(/
2.0
(*
(* (tan k) (+ 1.0 (+ 1.0 t_2)))
(* (sin k) (pow (/ t_m (pow (cbrt l) 2.0)) 3.0)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow((k / t_m), 2.0);
double tmp;
if (t_m <= 2.05e-40) {
tmp = l * (2.0 * ((l * cos(k)) / (pow(k, 2.0) * (t_m * pow(sin(k), 2.0)))));
} else if (t_m <= 5.5e+102) {
tmp = (l * ((l * (2.0 / tan(k))) / (sin(k) * pow(t_m, 3.0)))) / (2.0 + t_2);
} else {
tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + t_2))) * (sin(k) * pow((t_m / pow(cbrt(l), 2.0)), 3.0)));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.pow((k / t_m), 2.0);
double tmp;
if (t_m <= 2.05e-40) {
tmp = l * (2.0 * ((l * Math.cos(k)) / (Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0)))));
} else if (t_m <= 5.5e+102) {
tmp = (l * ((l * (2.0 / Math.tan(k))) / (Math.sin(k) * Math.pow(t_m, 3.0)))) / (2.0 + t_2);
} else {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (1.0 + t_2))) * (Math.sin(k) * Math.pow((t_m / Math.pow(Math.cbrt(l), 2.0)), 3.0)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(k / t_m) ^ 2.0 tmp = 0.0 if (t_m <= 2.05e-40) tmp = Float64(l * Float64(2.0 * Float64(Float64(l * cos(k)) / Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0)))))); elseif (t_m <= 5.5e+102) tmp = Float64(Float64(l * Float64(Float64(l * Float64(2.0 / tan(k))) / Float64(sin(k) * (t_m ^ 3.0)))) / Float64(2.0 + t_2)); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(1.0 + t_2))) * Float64(sin(k) * (Float64(t_m / (cbrt(l) ^ 2.0)) ^ 3.0)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.05e-40], N[(l * N[(2.0 * N[(N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.5e+102], N[(N[(l * N[(N[(l * N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.05 \cdot 10^{-40}:\\
\;\;\;\;\ell \cdot \left(2 \cdot \frac{\ell \cdot \cos k}{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}\right)\\
\mathbf{elif}\;t\_m \leq 5.5 \cdot 10^{+102}:\\
\;\;\;\;\frac{\ell \cdot \frac{\ell \cdot \frac{2}{\tan k}}{\sin k \cdot {t\_m}^{3}}}{2 + t\_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(1 + t\_2\right)\right)\right) \cdot \left(\sin k \cdot {\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}\right)}\\
\end{array}
\end{array}
\end{array}
if t < 2.04999999999999981e-40Initial program 49.8%
Simplified49.7%
associate-*r*54.2%
*-un-lft-identity54.2%
times-frac54.7%
associate-/l/54.7%
Applied egg-rr54.7%
/-rgt-identity54.7%
*-commutative54.7%
metadata-eval54.7%
distribute-neg-frac54.7%
associate-/l/54.7%
distribute-neg-frac54.7%
distribute-neg-frac54.7%
metadata-eval54.7%
*-commutative54.7%
Simplified54.7%
pow154.7%
associate-*l*54.6%
Applied egg-rr54.6%
Taylor expanded in k around inf 71.4%
if 2.04999999999999981e-40 < t < 5.49999999999999981e102Initial program 80.5%
Simplified77.8%
associate-*r*91.1%
*-un-lft-identity91.1%
times-frac91.1%
associate-/l/91.1%
Applied egg-rr91.1%
/-rgt-identity91.1%
*-commutative91.1%
metadata-eval91.1%
distribute-neg-frac91.1%
associate-/l/91.1%
distribute-neg-frac91.1%
distribute-neg-frac91.1%
metadata-eval91.1%
*-commutative91.1%
Simplified91.1%
associate-*r/91.1%
associate-*r/93.9%
Applied egg-rr93.9%
if 5.49999999999999981e102 < t Initial program 70.1%
Simplified70.1%
add-cube-cbrt70.1%
pow370.1%
cbrt-div70.1%
rem-cbrt-cube75.6%
cbrt-prod87.4%
pow287.4%
Applied egg-rr87.4%
Final simplification76.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 2.1e-105)
(/ 2.0 (* t_m (log (pow (exp (pow k 4.0)) (pow l -2.0)))))
(if (<= t_m 4.9e+151)
(/
2.0
(*
(* (tan k) (+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0))))
(* (sin k) (* (/ (pow t_m 2.0) l) (/ t_m l)))))
(/
2.0
(*
(pow (* (cbrt (sin k)) (/ t_m (pow (cbrt l) 2.0))) 3.0)
(* 2.0 k)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.1e-105) {
tmp = 2.0 / (t_m * log(pow(exp(pow(k, 4.0)), pow(l, -2.0))));
} else if (t_m <= 4.9e+151) {
tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + pow((k / t_m), 2.0)))) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / l))));
} else {
tmp = 2.0 / (pow((cbrt(sin(k)) * (t_m / pow(cbrt(l), 2.0))), 3.0) * (2.0 * k));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.1e-105) {
tmp = 2.0 / (t_m * Math.log(Math.pow(Math.exp(Math.pow(k, 4.0)), Math.pow(l, -2.0))));
} else if (t_m <= 4.9e+151) {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (1.0 + Math.pow((k / t_m), 2.0)))) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / l))));
} else {
tmp = 2.0 / (Math.pow((Math.cbrt(Math.sin(k)) * (t_m / Math.pow(Math.cbrt(l), 2.0))), 3.0) * (2.0 * k));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 2.1e-105) tmp = Float64(2.0 / Float64(t_m * log((exp((k ^ 4.0)) ^ (l ^ -2.0))))); elseif (t_m <= 4.9e+151) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0)))) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l))))); else tmp = Float64(2.0 / Float64((Float64(cbrt(sin(k)) * Float64(t_m / (cbrt(l) ^ 2.0))) ^ 3.0) * Float64(2.0 * k))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.1e-105], N[(2.0 / N[(t$95$m * N[Log[N[Power[N[Exp[N[Power[k, 4.0], $MachinePrecision]], $MachinePrecision], N[Power[l, -2.0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.9e+151], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.1 \cdot 10^{-105}:\\
\;\;\;\;\frac{2}{t\_m \cdot \log \left({\left(e^{{k}^{4}}\right)}^{\left({\ell}^{-2}\right)}\right)}\\
\mathbf{elif}\;t\_m \leq 4.9 \cdot 10^{+151}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)\right) \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot k\right)}\\
\end{array}
\end{array}
if t < 2.1e-105Initial program 49.2%
Simplified49.2%
Taylor expanded in t around 0 64.1%
associate-*r*64.1%
times-frac65.2%
Simplified65.2%
Taylor expanded in k around 0 51.7%
associate-/l*52.6%
Simplified52.6%
pow152.6%
pow252.6%
div-inv52.0%
pow252.0%
pow-flip52.0%
metadata-eval52.0%
Applied egg-rr52.0%
unpow152.0%
associate-*r*51.1%
*-commutative51.1%
associate-*l*51.2%
Simplified51.2%
add-log-exp51.6%
exp-prod52.0%
Applied egg-rr52.0%
if 2.1e-105 < t < 4.8999999999999999e151Initial program 77.4%
Simplified77.4%
unpow377.4%
times-frac84.8%
pow284.8%
Applied egg-rr84.8%
if 4.8999999999999999e151 < t Initial program 66.1%
Simplified66.1%
add-cube-cbrt66.1%
pow366.1%
*-commutative66.1%
cbrt-prod66.1%
cbrt-div66.1%
rem-cbrt-cube76.0%
cbrt-prod90.5%
pow290.5%
Applied egg-rr90.5%
Taylor expanded in k around 0 84.3%
*-commutative66.1%
Simplified84.3%
Final simplification62.2%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 2.9e-98)
(*
(/ 2.0 (pow k 2.0))
(* (/ (cos k) (pow (sin k) 2.0)) (/ (pow l 2.0) t_m)))
(if (<= t_m 4.5e+151)
(/
2.0
(*
(* (tan k) (+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0))))
(* (sin k) (* (/ (pow t_m 2.0) l) (/ t_m l)))))
(/
2.0
(*
(pow (* (cbrt (sin k)) (/ t_m (pow (cbrt l) 2.0))) 3.0)
(* 2.0 k)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.9e-98) {
tmp = (2.0 / pow(k, 2.0)) * ((cos(k) / pow(sin(k), 2.0)) * (pow(l, 2.0) / t_m));
} else if (t_m <= 4.5e+151) {
tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + pow((k / t_m), 2.0)))) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / l))));
} else {
tmp = 2.0 / (pow((cbrt(sin(k)) * (t_m / pow(cbrt(l), 2.0))), 3.0) * (2.0 * k));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.9e-98) {
tmp = (2.0 / Math.pow(k, 2.0)) * ((Math.cos(k) / Math.pow(Math.sin(k), 2.0)) * (Math.pow(l, 2.0) / t_m));
} else if (t_m <= 4.5e+151) {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (1.0 + Math.pow((k / t_m), 2.0)))) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / l))));
} else {
tmp = 2.0 / (Math.pow((Math.cbrt(Math.sin(k)) * (t_m / Math.pow(Math.cbrt(l), 2.0))), 3.0) * (2.0 * k));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 2.9e-98) tmp = Float64(Float64(2.0 / (k ^ 2.0)) * Float64(Float64(cos(k) / (sin(k) ^ 2.0)) * Float64((l ^ 2.0) / t_m))); elseif (t_m <= 4.5e+151) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0)))) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l))))); else tmp = Float64(2.0 / Float64((Float64(cbrt(sin(k)) * Float64(t_m / (cbrt(l) ^ 2.0))) ^ 3.0) * Float64(2.0 * k))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.9e-98], N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.5e+151], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.9 \cdot 10^{-98}:\\
\;\;\;\;\frac{2}{{k}^{2}} \cdot \left(\frac{\cos k}{{\sin k}^{2}} \cdot \frac{{\ell}^{2}}{t\_m}\right)\\
\mathbf{elif}\;t\_m \leq 4.5 \cdot 10^{+151}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)\right) \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot k\right)}\\
\end{array}
\end{array}
if t < 2.9e-98Initial program 48.9%
Simplified49.4%
Taylor expanded in k around inf 64.3%
associate-*r/64.3%
times-frac63.1%
*-commutative63.1%
*-commutative63.1%
times-frac64.1%
Simplified64.1%
if 2.9e-98 < t < 4.4999999999999999e151Initial program 79.0%
Simplified78.9%
unpow379.0%
times-frac86.5%
pow286.5%
Applied egg-rr86.5%
if 4.4999999999999999e151 < t Initial program 66.1%
Simplified66.1%
add-cube-cbrt66.1%
pow366.1%
*-commutative66.1%
cbrt-prod66.1%
cbrt-div66.1%
rem-cbrt-cube76.0%
cbrt-prod90.5%
pow290.5%
Applied egg-rr90.5%
Taylor expanded in k around 0 84.3%
*-commutative66.1%
Simplified84.3%
Final simplification70.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 9.2e-98)
(/
2.0
(* t_m (* (/ (pow (sin k) 2.0) (cos k)) (/ (pow k 2.0) (pow l 2.0)))))
(if (<= t_m 4e+151)
(/
2.0
(*
(* (tan k) (+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0))))
(* (sin k) (* (/ (pow t_m 2.0) l) (/ t_m l)))))
(/
2.0
(*
(pow (* (cbrt (sin k)) (/ t_m (pow (cbrt l) 2.0))) 3.0)
(* 2.0 k)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 9.2e-98) {
tmp = 2.0 / (t_m * ((pow(sin(k), 2.0) / cos(k)) * (pow(k, 2.0) / pow(l, 2.0))));
} else if (t_m <= 4e+151) {
tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + pow((k / t_m), 2.0)))) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / l))));
} else {
tmp = 2.0 / (pow((cbrt(sin(k)) * (t_m / pow(cbrt(l), 2.0))), 3.0) * (2.0 * k));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 9.2e-98) {
tmp = 2.0 / (t_m * ((Math.pow(Math.sin(k), 2.0) / Math.cos(k)) * (Math.pow(k, 2.0) / Math.pow(l, 2.0))));
} else if (t_m <= 4e+151) {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (1.0 + Math.pow((k / t_m), 2.0)))) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / l))));
} else {
tmp = 2.0 / (Math.pow((Math.cbrt(Math.sin(k)) * (t_m / Math.pow(Math.cbrt(l), 2.0))), 3.0) * (2.0 * k));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 9.2e-98) tmp = Float64(2.0 / Float64(t_m * Float64(Float64((sin(k) ^ 2.0) / cos(k)) * Float64((k ^ 2.0) / (l ^ 2.0))))); elseif (t_m <= 4e+151) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0)))) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l))))); else tmp = Float64(2.0 / Float64((Float64(cbrt(sin(k)) * Float64(t_m / (cbrt(l) ^ 2.0))) ^ 3.0) * Float64(2.0 * k))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 9.2e-98], N[(2.0 / N[(t$95$m * N[(N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4e+151], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 9.2 \cdot 10^{-98}:\\
\;\;\;\;\frac{2}{t\_m \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \frac{{k}^{2}}{{\ell}^{2}}\right)}\\
\mathbf{elif}\;t\_m \leq 4 \cdot 10^{+151}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)\right) \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot k\right)}\\
\end{array}
\end{array}
if t < 9.20000000000000002e-98Initial program 48.9%
Simplified48.9%
add-cube-cbrt48.9%
pow348.9%
*-commutative48.9%
cbrt-prod48.9%
cbrt-div49.4%
rem-cbrt-cube58.2%
cbrt-prod66.1%
pow266.1%
Applied egg-rr66.1%
Taylor expanded in k around inf 64.3%
associate-*r*64.3%
*-commutative64.3%
associate-*l*63.2%
associate-*r/62.2%
*-commutative62.2%
*-commutative62.2%
times-frac63.9%
Simplified63.9%
if 9.20000000000000002e-98 < t < 4.00000000000000007e151Initial program 79.0%
Simplified78.9%
unpow379.0%
times-frac86.5%
pow286.5%
Applied egg-rr86.5%
if 4.00000000000000007e151 < t Initial program 66.1%
Simplified66.1%
add-cube-cbrt66.1%
pow366.1%
*-commutative66.1%
cbrt-prod66.1%
cbrt-div66.1%
rem-cbrt-cube76.0%
cbrt-prod90.5%
pow290.5%
Applied egg-rr90.5%
Taylor expanded in k around 0 84.3%
*-commutative66.1%
Simplified84.3%
Final simplification70.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 1e-98)
(/
2.0
(* (/ (* t_m (pow k 2.0)) (cos k)) (/ (pow (sin k) 2.0) (pow l 2.0))))
(if (<= t_m 4e+151)
(/
2.0
(*
(* (tan k) (+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0))))
(* (sin k) (* (/ (pow t_m 2.0) l) (/ t_m l)))))
(/
2.0
(*
(pow (* (cbrt (sin k)) (/ t_m (pow (cbrt l) 2.0))) 3.0)
(* 2.0 k)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1e-98) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) / cos(k)) * (pow(sin(k), 2.0) / pow(l, 2.0)));
} else if (t_m <= 4e+151) {
tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + pow((k / t_m), 2.0)))) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / l))));
} else {
tmp = 2.0 / (pow((cbrt(sin(k)) * (t_m / pow(cbrt(l), 2.0))), 3.0) * (2.0 * k));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1e-98) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) / Math.cos(k)) * (Math.pow(Math.sin(k), 2.0) / Math.pow(l, 2.0)));
} else if (t_m <= 4e+151) {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (1.0 + Math.pow((k / t_m), 2.0)))) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / l))));
} else {
tmp = 2.0 / (Math.pow((Math.cbrt(Math.sin(k)) * (t_m / Math.pow(Math.cbrt(l), 2.0))), 3.0) * (2.0 * k));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1e-98) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) / cos(k)) * Float64((sin(k) ^ 2.0) / (l ^ 2.0)))); elseif (t_m <= 4e+151) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0)))) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l))))); else tmp = Float64(2.0 / Float64((Float64(cbrt(sin(k)) * Float64(t_m / (cbrt(l) ^ 2.0))) ^ 3.0) * Float64(2.0 * k))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1e-98], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4e+151], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 10^{-98}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{\cos k} \cdot \frac{{\sin k}^{2}}{{\ell}^{2}}}\\
\mathbf{elif}\;t\_m \leq 4 \cdot 10^{+151}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)\right) \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot k\right)}\\
\end{array}
\end{array}
if t < 9.99999999999999939e-99Initial program 48.9%
Simplified50.1%
cube-mult50.1%
*-un-lft-identity50.1%
times-frac54.5%
pow254.5%
Applied egg-rr54.5%
Taylor expanded in t around 0 64.3%
associate-*r*64.3%
*-commutative64.3%
times-frac64.9%
Simplified64.9%
if 9.99999999999999939e-99 < t < 4.00000000000000007e151Initial program 79.0%
Simplified78.9%
unpow379.0%
times-frac86.5%
pow286.5%
Applied egg-rr86.5%
if 4.00000000000000007e151 < t Initial program 66.1%
Simplified66.1%
add-cube-cbrt66.1%
pow366.1%
*-commutative66.1%
cbrt-prod66.1%
cbrt-div66.1%
rem-cbrt-cube76.0%
cbrt-prod90.5%
pow290.5%
Applied egg-rr90.5%
Taylor expanded in k around 0 84.3%
*-commutative66.1%
Simplified84.3%
Final simplification71.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.6e-40)
(* l (* 2.0 (/ (* l (cos k)) (* (pow k 2.0) (* t_m (pow (sin k) 2.0))))))
(if (<= t_m 3.1e+151)
(/
2.0
(*
(* (tan k) (+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0))))
(* (sin k) (* (/ (pow t_m 2.0) l) (/ t_m l)))))
(/
2.0
(*
(pow (* (cbrt (sin k)) (/ t_m (pow (cbrt l) 2.0))) 3.0)
(* 2.0 k)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.6e-40) {
tmp = l * (2.0 * ((l * cos(k)) / (pow(k, 2.0) * (t_m * pow(sin(k), 2.0)))));
} else if (t_m <= 3.1e+151) {
tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + pow((k / t_m), 2.0)))) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / l))));
} else {
tmp = 2.0 / (pow((cbrt(sin(k)) * (t_m / pow(cbrt(l), 2.0))), 3.0) * (2.0 * k));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.6e-40) {
tmp = l * (2.0 * ((l * Math.cos(k)) / (Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0)))));
} else if (t_m <= 3.1e+151) {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (1.0 + Math.pow((k / t_m), 2.0)))) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / l))));
} else {
tmp = 2.0 / (Math.pow((Math.cbrt(Math.sin(k)) * (t_m / Math.pow(Math.cbrt(l), 2.0))), 3.0) * (2.0 * k));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.6e-40) tmp = Float64(l * Float64(2.0 * Float64(Float64(l * cos(k)) / Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0)))))); elseif (t_m <= 3.1e+151) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0)))) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l))))); else tmp = Float64(2.0 / Float64((Float64(cbrt(sin(k)) * Float64(t_m / (cbrt(l) ^ 2.0))) ^ 3.0) * Float64(2.0 * k))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.6e-40], N[(l * N[(2.0 * N[(N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.1e+151], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.6 \cdot 10^{-40}:\\
\;\;\;\;\ell \cdot \left(2 \cdot \frac{\ell \cdot \cos k}{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}\right)\\
\mathbf{elif}\;t\_m \leq 3.1 \cdot 10^{+151}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)\right) \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot k\right)}\\
\end{array}
\end{array}
if t < 1.60000000000000001e-40Initial program 49.8%
Simplified49.7%
associate-*r*54.2%
*-un-lft-identity54.2%
times-frac54.7%
associate-/l/54.7%
Applied egg-rr54.7%
/-rgt-identity54.7%
*-commutative54.7%
metadata-eval54.7%
distribute-neg-frac54.7%
associate-/l/54.7%
distribute-neg-frac54.7%
distribute-neg-frac54.7%
metadata-eval54.7%
*-commutative54.7%
Simplified54.7%
pow154.7%
associate-*l*54.6%
Applied egg-rr54.6%
Taylor expanded in k around inf 71.4%
if 1.60000000000000001e-40 < t < 3.1000000000000002e151Initial program 81.5%
Simplified81.5%
unpow381.5%
times-frac88.5%
pow288.5%
Applied egg-rr88.5%
if 3.1000000000000002e151 < t Initial program 66.1%
Simplified66.1%
add-cube-cbrt66.1%
pow366.1%
*-commutative66.1%
cbrt-prod66.1%
cbrt-div66.1%
rem-cbrt-cube76.0%
cbrt-prod90.5%
pow290.5%
Applied egg-rr90.5%
Taylor expanded in k around 0 84.3%
*-commutative66.1%
Simplified84.3%
Final simplification75.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 2.25e-40)
(* l (* 2.0 (/ (* l (cos k)) (* (pow k 2.0) (* t_m (pow (sin k) 2.0))))))
(/
2.0
(*
(tan k)
(*
(+ 2.0 (pow (/ k t_m) 2.0))
(* (sin k) (pow (/ (pow t_m 1.5) l) 2.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.25e-40) {
tmp = l * (2.0 * ((l * cos(k)) / (pow(k, 2.0) * (t_m * pow(sin(k), 2.0)))));
} else {
tmp = 2.0 / (tan(k) * ((2.0 + pow((k / t_m), 2.0)) * (sin(k) * pow((pow(t_m, 1.5) / l), 2.0))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 2.25d-40) then
tmp = l * (2.0d0 * ((l * cos(k)) / ((k ** 2.0d0) * (t_m * (sin(k) ** 2.0d0)))))
else
tmp = 2.0d0 / (tan(k) * ((2.0d0 + ((k / t_m) ** 2.0d0)) * (sin(k) * (((t_m ** 1.5d0) / l) ** 2.0d0))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.25e-40) {
tmp = l * (2.0 * ((l * Math.cos(k)) / (Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0)))));
} else {
tmp = 2.0 / (Math.tan(k) * ((2.0 + Math.pow((k / t_m), 2.0)) * (Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / l), 2.0))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 2.25e-40: tmp = l * (2.0 * ((l * math.cos(k)) / (math.pow(k, 2.0) * (t_m * math.pow(math.sin(k), 2.0))))) else: tmp = 2.0 / (math.tan(k) * ((2.0 + math.pow((k / t_m), 2.0)) * (math.sin(k) * math.pow((math.pow(t_m, 1.5) / l), 2.0)))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 2.25e-40) tmp = Float64(l * Float64(2.0 * Float64(Float64(l * cos(k)) / Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0)))))); else tmp = Float64(2.0 / Float64(tan(k) * Float64(Float64(2.0 + (Float64(k / t_m) ^ 2.0)) * Float64(sin(k) * (Float64((t_m ^ 1.5) / l) ^ 2.0))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 2.25e-40) tmp = l * (2.0 * ((l * cos(k)) / ((k ^ 2.0) * (t_m * (sin(k) ^ 2.0))))); else tmp = 2.0 / (tan(k) * ((2.0 + ((k / t_m) ^ 2.0)) * (sin(k) * (((t_m ^ 1.5) / l) ^ 2.0)))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.25e-40], N[(l * N[(2.0 * N[(N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $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.25 \cdot 10^{-40}:\\
\;\;\;\;\ell \cdot \left(2 \cdot \frac{\ell \cdot \cos k}{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\tan k \cdot \left(\left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right) \cdot \left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\right)\right)}\\
\end{array}
\end{array}
if t < 2.25e-40Initial program 49.8%
Simplified49.7%
associate-*r*54.2%
*-un-lft-identity54.2%
times-frac54.7%
associate-/l/54.7%
Applied egg-rr54.7%
/-rgt-identity54.7%
*-commutative54.7%
metadata-eval54.7%
distribute-neg-frac54.7%
associate-/l/54.7%
distribute-neg-frac54.7%
distribute-neg-frac54.7%
metadata-eval54.7%
*-commutative54.7%
Simplified54.7%
pow154.7%
associate-*l*54.6%
Applied egg-rr54.6%
Taylor expanded in k around inf 71.4%
if 2.25e-40 < t Initial program 75.1%
Simplified75.1%
add-sqr-sqrt36.5%
pow236.5%
*-commutative36.5%
sqrt-prod36.5%
sqrt-div36.5%
sqrt-pow140.5%
metadata-eval40.5%
sqrt-prod23.5%
add-sqr-sqrt42.0%
Applied egg-rr42.0%
*-commutative42.0%
Simplified42.0%
pow142.0%
*-commutative42.0%
associate-+r+42.0%
metadata-eval42.0%
*-commutative42.0%
unpow-prod-down40.6%
pow240.6%
add-sqr-sqrt84.2%
Applied egg-rr84.2%
unpow184.2%
associate-*l*84.2%
Simplified84.2%
Final simplification74.9%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.66e-105)
(/ 2.0 (* t_m (log (pow (exp (pow k 4.0)) (pow l -2.0)))))
(/
2.0
(*
(* (tan k) (+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0))))
(* (sin k) (* (/ (pow t_m 2.0) l) (/ t_m l))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.66e-105) {
tmp = 2.0 / (t_m * log(pow(exp(pow(k, 4.0)), pow(l, -2.0))));
} else {
tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + pow((k / t_m), 2.0)))) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / l))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1.66d-105) then
tmp = 2.0d0 / (t_m * log((exp((k ** 4.0d0)) ** (l ** (-2.0d0)))))
else
tmp = 2.0d0 / ((tan(k) * (1.0d0 + (1.0d0 + ((k / t_m) ** 2.0d0)))) * (sin(k) * (((t_m ** 2.0d0) / l) * (t_m / l))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.66e-105) {
tmp = 2.0 / (t_m * Math.log(Math.pow(Math.exp(Math.pow(k, 4.0)), Math.pow(l, -2.0))));
} else {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (1.0 + Math.pow((k / t_m), 2.0)))) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / l))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 1.66e-105: tmp = 2.0 / (t_m * math.log(math.pow(math.exp(math.pow(k, 4.0)), math.pow(l, -2.0)))) else: tmp = 2.0 / ((math.tan(k) * (1.0 + (1.0 + math.pow((k / t_m), 2.0)))) * (math.sin(k) * ((math.pow(t_m, 2.0) / l) * (t_m / l)))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.66e-105) tmp = Float64(2.0 / Float64(t_m * log((exp((k ^ 4.0)) ^ (l ^ -2.0))))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0)))) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 1.66e-105) tmp = 2.0 / (t_m * log((exp((k ^ 4.0)) ^ (l ^ -2.0)))); else tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + ((k / t_m) ^ 2.0)))) * (sin(k) * (((t_m ^ 2.0) / l) * (t_m / l)))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.66e-105], N[(2.0 / N[(t$95$m * N[Log[N[Power[N[Exp[N[Power[k, 4.0], $MachinePrecision]], $MachinePrecision], N[Power[l, -2.0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.66 \cdot 10^{-105}:\\
\;\;\;\;\frac{2}{t\_m \cdot \log \left({\left(e^{{k}^{4}}\right)}^{\left({\ell}^{-2}\right)}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)\right) \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\
\end{array}
\end{array}
if t < 1.66000000000000009e-105Initial program 49.2%
Simplified49.2%
Taylor expanded in t around 0 64.1%
associate-*r*64.1%
times-frac65.2%
Simplified65.2%
Taylor expanded in k around 0 51.7%
associate-/l*52.6%
Simplified52.6%
pow152.6%
pow252.6%
div-inv52.0%
pow252.0%
pow-flip52.0%
metadata-eval52.0%
Applied egg-rr52.0%
unpow152.0%
associate-*r*51.1%
*-commutative51.1%
associate-*l*51.2%
Simplified51.2%
add-log-exp51.6%
exp-prod52.0%
Applied egg-rr52.0%
if 1.66000000000000009e-105 < t Initial program 73.3%
Simplified73.3%
unpow373.3%
times-frac80.0%
pow280.0%
Applied egg-rr80.0%
Final simplification60.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 9e-37)
(/ 2.0 (* (* 2.0 k) (pow (* (/ (pow t_m 1.5) l) (sqrt (sin k))) 2.0)))
(if (<= k 1.85e+192)
(/
2.0
(*
(* (tan k) (+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0))))
(* (sin k) (* (/ (pow t_m 2.0) l) (/ t_m l)))))
(/
2.0
(*
(/ (expm1 (- (* -3.0 (- (log t_m))) (log l))) l)
(* 2.0 (pow k 2.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 9e-37) {
tmp = 2.0 / ((2.0 * k) * pow(((pow(t_m, 1.5) / l) * sqrt(sin(k))), 2.0));
} else if (k <= 1.85e+192) {
tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + pow((k / t_m), 2.0)))) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / l))));
} else {
tmp = 2.0 / ((expm1(((-3.0 * -log(t_m)) - log(l))) / l) * (2.0 * pow(k, 2.0)));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 9e-37) {
tmp = 2.0 / ((2.0 * k) * Math.pow(((Math.pow(t_m, 1.5) / l) * Math.sqrt(Math.sin(k))), 2.0));
} else if (k <= 1.85e+192) {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (1.0 + Math.pow((k / t_m), 2.0)))) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / l))));
} else {
tmp = 2.0 / ((Math.expm1(((-3.0 * -Math.log(t_m)) - Math.log(l))) / l) * (2.0 * Math.pow(k, 2.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 9e-37: tmp = 2.0 / ((2.0 * k) * math.pow(((math.pow(t_m, 1.5) / l) * math.sqrt(math.sin(k))), 2.0)) elif k <= 1.85e+192: tmp = 2.0 / ((math.tan(k) * (1.0 + (1.0 + math.pow((k / t_m), 2.0)))) * (math.sin(k) * ((math.pow(t_m, 2.0) / l) * (t_m / l)))) else: tmp = 2.0 / ((math.expm1(((-3.0 * -math.log(t_m)) - math.log(l))) / l) * (2.0 * math.pow(k, 2.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 9e-37) tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(Float64((t_m ^ 1.5) / l) * sqrt(sin(k))) ^ 2.0))); elseif (k <= 1.85e+192) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0)))) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l))))); else tmp = Float64(2.0 / Float64(Float64(expm1(Float64(Float64(-3.0 * Float64(-log(t_m))) - log(l))) / l) * Float64(2.0 * (k ^ 2.0)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 9e-37], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Sin[k], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.85e+192], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(Exp[N[(N[(-3.0 * (-N[Log[t$95$m], $MachinePrecision])), $MachinePrecision] - N[Log[l], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision] / l), $MachinePrecision] * N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 9 \cdot 10^{-37}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2}}\\
\mathbf{elif}\;k \leq 1.85 \cdot 10^{+192}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)\right) \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\mathsf{expm1}\left(-3 \cdot \left(-\log t\_m\right) - \log \ell\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}\\
\end{array}
\end{array}
if k < 9.00000000000000081e-37Initial program 62.4%
Simplified62.4%
add-sqr-sqrt34.2%
pow234.2%
*-commutative34.2%
sqrt-prod14.2%
sqrt-div14.2%
sqrt-pow116.4%
metadata-eval16.4%
sqrt-prod9.5%
add-sqr-sqrt16.5%
Applied egg-rr16.5%
*-commutative16.5%
Simplified16.5%
Taylor expanded in k around 0 13.9%
*-commutative60.2%
Simplified13.9%
if 9.00000000000000081e-37 < k < 1.85e192Initial program 44.3%
Simplified44.3%
unpow344.3%
times-frac64.3%
pow264.3%
Applied egg-rr64.3%
if 1.85e192 < k Initial program 48.2%
Simplified48.5%
Taylor expanded in k around 0 48.5%
expm1-log1p-u36.5%
expm1-undefine20.3%
Applied egg-rr20.3%
expm1-define36.5%
Simplified36.5%
Taylor expanded in t around inf 24.5%
log-rec24.5%
mul-1-neg24.5%
+-commutative24.5%
log-rec24.5%
mul-1-neg24.5%
Simplified24.5%
Final simplification26.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.15e-39)
(/ 2.0 (* (* 2.0 k) (pow (* (/ (pow t_m 1.5) l) (sqrt (sin k))) 2.0)))
(if (<= k 1.7e+192)
(/
2.0
(*
(* t_m (/ (/ (pow t_m 2.0) l) l))
(* (+ 2.0 (pow (/ k t_m) 2.0)) (* (sin k) (tan k)))))
(/
2.0
(*
(/ (expm1 (- (* -3.0 (- (log t_m))) (log l))) l)
(* 2.0 (pow k 2.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.15e-39) {
tmp = 2.0 / ((2.0 * k) * pow(((pow(t_m, 1.5) / l) * sqrt(sin(k))), 2.0));
} else if (k <= 1.7e+192) {
tmp = 2.0 / ((t_m * ((pow(t_m, 2.0) / l) / l)) * ((2.0 + pow((k / t_m), 2.0)) * (sin(k) * tan(k))));
} else {
tmp = 2.0 / ((expm1(((-3.0 * -log(t_m)) - log(l))) / l) * (2.0 * pow(k, 2.0)));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.15e-39) {
tmp = 2.0 / ((2.0 * k) * Math.pow(((Math.pow(t_m, 1.5) / l) * Math.sqrt(Math.sin(k))), 2.0));
} else if (k <= 1.7e+192) {
tmp = 2.0 / ((t_m * ((Math.pow(t_m, 2.0) / l) / l)) * ((2.0 + Math.pow((k / t_m), 2.0)) * (Math.sin(k) * Math.tan(k))));
} else {
tmp = 2.0 / ((Math.expm1(((-3.0 * -Math.log(t_m)) - Math.log(l))) / l) * (2.0 * Math.pow(k, 2.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 1.15e-39: tmp = 2.0 / ((2.0 * k) * math.pow(((math.pow(t_m, 1.5) / l) * math.sqrt(math.sin(k))), 2.0)) elif k <= 1.7e+192: tmp = 2.0 / ((t_m * ((math.pow(t_m, 2.0) / l) / l)) * ((2.0 + math.pow((k / t_m), 2.0)) * (math.sin(k) * math.tan(k)))) else: tmp = 2.0 / ((math.expm1(((-3.0 * -math.log(t_m)) - math.log(l))) / l) * (2.0 * math.pow(k, 2.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.15e-39) tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(Float64((t_m ^ 1.5) / l) * sqrt(sin(k))) ^ 2.0))); elseif (k <= 1.7e+192) tmp = Float64(2.0 / Float64(Float64(t_m * Float64(Float64((t_m ^ 2.0) / l) / l)) * Float64(Float64(2.0 + (Float64(k / t_m) ^ 2.0)) * Float64(sin(k) * tan(k))))); else tmp = Float64(2.0 / Float64(Float64(expm1(Float64(Float64(-3.0 * Float64(-log(t_m))) - log(l))) / l) * Float64(2.0 * (k ^ 2.0)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.15e-39], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Sin[k], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.7e+192], N[(2.0 / N[(N[(t$95$m * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(Exp[N[(N[(-3.0 * (-N[Log[t$95$m], $MachinePrecision])), $MachinePrecision] - N[Log[l], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision] / l), $MachinePrecision] * N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.15 \cdot 10^{-39}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2}}\\
\mathbf{elif}\;k \leq 1.7 \cdot 10^{+192}:\\
\;\;\;\;\frac{2}{\left(t\_m \cdot \frac{\frac{{t\_m}^{2}}{\ell}}{\ell}\right) \cdot \left(\left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right) \cdot \left(\sin k \cdot \tan k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\mathsf{expm1}\left(-3 \cdot \left(-\log t\_m\right) - \log \ell\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}\\
\end{array}
\end{array}
if k < 1.15000000000000004e-39Initial program 62.4%
Simplified62.4%
add-sqr-sqrt34.2%
pow234.2%
*-commutative34.2%
sqrt-prod14.2%
sqrt-div14.2%
sqrt-pow116.4%
metadata-eval16.4%
sqrt-prod9.5%
add-sqr-sqrt16.5%
Applied egg-rr16.5%
*-commutative16.5%
Simplified16.5%
Taylor expanded in k around 0 13.9%
*-commutative60.2%
Simplified13.9%
if 1.15000000000000004e-39 < k < 1.69999999999999998e192Initial program 44.3%
Simplified54.5%
cube-mult54.5%
*-un-lft-identity54.5%
times-frac62.6%
pow262.6%
Applied egg-rr62.6%
/-rgt-identity62.6%
associate-/l*62.7%
Applied egg-rr62.7%
if 1.69999999999999998e192 < k Initial program 48.2%
Simplified48.5%
Taylor expanded in k around 0 48.5%
expm1-log1p-u36.5%
expm1-undefine20.3%
Applied egg-rr20.3%
expm1-define36.5%
Simplified36.5%
Taylor expanded in t around inf 24.5%
log-rec24.5%
mul-1-neg24.5%
+-commutative24.5%
log-rec24.5%
mul-1-neg24.5%
Simplified24.5%
Final simplification26.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 1e-33)
(/ 2.0 (* (* 2.0 k) (pow (* (/ (pow t_m 1.5) l) (sqrt (sin k))) 2.0)))
(if (<= k 1.25e+143)
(*
(* l (/ (/ 2.0 (tan k)) (* (sin k) (pow t_m 3.0))))
(/ l (+ 2.0 (pow (/ k t_m) 2.0))))
(/
2.0
(*
(/ (expm1 (- (* -3.0 (- (log t_m))) (log l))) l)
(* 2.0 (pow k 2.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1e-33) {
tmp = 2.0 / ((2.0 * k) * pow(((pow(t_m, 1.5) / l) * sqrt(sin(k))), 2.0));
} else if (k <= 1.25e+143) {
tmp = (l * ((2.0 / tan(k)) / (sin(k) * pow(t_m, 3.0)))) * (l / (2.0 + pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / ((expm1(((-3.0 * -log(t_m)) - log(l))) / l) * (2.0 * pow(k, 2.0)));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1e-33) {
tmp = 2.0 / ((2.0 * k) * Math.pow(((Math.pow(t_m, 1.5) / l) * Math.sqrt(Math.sin(k))), 2.0));
} else if (k <= 1.25e+143) {
tmp = (l * ((2.0 / Math.tan(k)) / (Math.sin(k) * Math.pow(t_m, 3.0)))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / ((Math.expm1(((-3.0 * -Math.log(t_m)) - Math.log(l))) / l) * (2.0 * Math.pow(k, 2.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 1e-33: tmp = 2.0 / ((2.0 * k) * math.pow(((math.pow(t_m, 1.5) / l) * math.sqrt(math.sin(k))), 2.0)) elif k <= 1.25e+143: tmp = (l * ((2.0 / math.tan(k)) / (math.sin(k) * math.pow(t_m, 3.0)))) * (l / (2.0 + math.pow((k / t_m), 2.0))) else: tmp = 2.0 / ((math.expm1(((-3.0 * -math.log(t_m)) - math.log(l))) / l) * (2.0 * math.pow(k, 2.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1e-33) tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(Float64((t_m ^ 1.5) / l) * sqrt(sin(k))) ^ 2.0))); elseif (k <= 1.25e+143) tmp = Float64(Float64(l * Float64(Float64(2.0 / tan(k)) / Float64(sin(k) * (t_m ^ 3.0)))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(expm1(Float64(Float64(-3.0 * Float64(-log(t_m))) - log(l))) / l) * Float64(2.0 * (k ^ 2.0)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1e-33], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Sin[k], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.25e+143], N[(N[(l * N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[(N[Sin[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[(Exp[N[(N[(-3.0 * (-N[Log[t$95$m], $MachinePrecision])), $MachinePrecision] - N[Log[l], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision] / l), $MachinePrecision] * N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 10^{-33}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2}}\\
\mathbf{elif}\;k \leq 1.25 \cdot 10^{+143}:\\
\;\;\;\;\left(\ell \cdot \frac{\frac{2}{\tan k}}{\sin k \cdot {t\_m}^{3}}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\mathsf{expm1}\left(-3 \cdot \left(-\log t\_m\right) - \log \ell\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}\\
\end{array}
\end{array}
if k < 1.0000000000000001e-33Initial program 62.4%
Simplified62.4%
add-sqr-sqrt34.2%
pow234.2%
*-commutative34.2%
sqrt-prod14.2%
sqrt-div14.2%
sqrt-pow116.4%
metadata-eval16.4%
sqrt-prod9.5%
add-sqr-sqrt16.5%
Applied egg-rr16.5%
*-commutative16.5%
Simplified16.5%
Taylor expanded in k around 0 13.9%
*-commutative60.2%
Simplified13.9%
if 1.0000000000000001e-33 < k < 1.25000000000000003e143Initial program 40.3%
Simplified40.1%
associate-*r*54.6%
*-un-lft-identity54.6%
times-frac54.5%
associate-/l/54.5%
Applied egg-rr54.5%
/-rgt-identity54.5%
*-commutative54.5%
metadata-eval54.5%
distribute-neg-frac54.5%
associate-/l/54.5%
distribute-neg-frac54.5%
distribute-neg-frac54.5%
metadata-eval54.5%
*-commutative54.5%
Simplified54.5%
if 1.25000000000000003e143 < k Initial program 50.2%
Simplified50.5%
Taylor expanded in k around 0 50.5%
expm1-log1p-u32.2%
expm1-undefine20.6%
Applied egg-rr20.6%
expm1-define32.2%
Simplified32.2%
Taylor expanded in t around inf 25.3%
log-rec25.3%
mul-1-neg25.3%
+-commutative25.3%
log-rec25.3%
mul-1-neg25.3%
Simplified25.3%
Final simplification22.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 9.5e-34)
(/ 2.0 (* (* 2.0 k) (pow (* (/ (pow t_m 1.5) l) (sqrt (sin k))) 2.0)))
(if (<= k 1.1e+143)
(/
2.0
(*
(* (+ 2.0 (pow (/ k t_m) 2.0)) (* (sin k) (tan k)))
(/ (/ (pow t_m 3.0) l) l)))
(/
2.0
(*
(/ (expm1 (- (* -3.0 (- (log t_m))) (log l))) l)
(* 2.0 (pow k 2.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 9.5e-34) {
tmp = 2.0 / ((2.0 * k) * pow(((pow(t_m, 1.5) / l) * sqrt(sin(k))), 2.0));
} else if (k <= 1.1e+143) {
tmp = 2.0 / (((2.0 + pow((k / t_m), 2.0)) * (sin(k) * tan(k))) * ((pow(t_m, 3.0) / l) / l));
} else {
tmp = 2.0 / ((expm1(((-3.0 * -log(t_m)) - log(l))) / l) * (2.0 * pow(k, 2.0)));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 9.5e-34) {
tmp = 2.0 / ((2.0 * k) * Math.pow(((Math.pow(t_m, 1.5) / l) * Math.sqrt(Math.sin(k))), 2.0));
} else if (k <= 1.1e+143) {
tmp = 2.0 / (((2.0 + Math.pow((k / t_m), 2.0)) * (Math.sin(k) * Math.tan(k))) * ((Math.pow(t_m, 3.0) / l) / l));
} else {
tmp = 2.0 / ((Math.expm1(((-3.0 * -Math.log(t_m)) - Math.log(l))) / l) * (2.0 * Math.pow(k, 2.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 9.5e-34: tmp = 2.0 / ((2.0 * k) * math.pow(((math.pow(t_m, 1.5) / l) * math.sqrt(math.sin(k))), 2.0)) elif k <= 1.1e+143: tmp = 2.0 / (((2.0 + math.pow((k / t_m), 2.0)) * (math.sin(k) * math.tan(k))) * ((math.pow(t_m, 3.0) / l) / l)) else: tmp = 2.0 / ((math.expm1(((-3.0 * -math.log(t_m)) - math.log(l))) / l) * (2.0 * math.pow(k, 2.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 9.5e-34) tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(Float64((t_m ^ 1.5) / l) * sqrt(sin(k))) ^ 2.0))); elseif (k <= 1.1e+143) tmp = Float64(2.0 / Float64(Float64(Float64(2.0 + (Float64(k / t_m) ^ 2.0)) * Float64(sin(k) * tan(k))) * Float64(Float64((t_m ^ 3.0) / l) / l))); else tmp = Float64(2.0 / Float64(Float64(expm1(Float64(Float64(-3.0 * Float64(-log(t_m))) - log(l))) / l) * Float64(2.0 * (k ^ 2.0)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 9.5e-34], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Sin[k], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.1e+143], N[(2.0 / N[(N[(N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(Exp[N[(N[(-3.0 * (-N[Log[t$95$m], $MachinePrecision])), $MachinePrecision] - N[Log[l], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision] / l), $MachinePrecision] * N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 9.5 \cdot 10^{-34}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2}}\\
\mathbf{elif}\;k \leq 1.1 \cdot 10^{+143}:\\
\;\;\;\;\frac{2}{\left(\left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right) \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \frac{\frac{{t\_m}^{3}}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\mathsf{expm1}\left(-3 \cdot \left(-\log t\_m\right) - \log \ell\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}\\
\end{array}
\end{array}
if k < 9.49999999999999985e-34Initial program 62.4%
Simplified62.4%
add-sqr-sqrt34.2%
pow234.2%
*-commutative34.2%
sqrt-prod14.2%
sqrt-div14.2%
sqrt-pow116.4%
metadata-eval16.4%
sqrt-prod9.5%
add-sqr-sqrt16.5%
Applied egg-rr16.5%
*-commutative16.5%
Simplified16.5%
Taylor expanded in k around 0 13.9%
*-commutative60.2%
Simplified13.9%
if 9.49999999999999985e-34 < k < 1.10000000000000007e143Initial program 40.3%
Simplified55.1%
if 1.10000000000000007e143 < k Initial program 50.2%
Simplified50.5%
Taylor expanded in k around 0 50.5%
expm1-log1p-u32.2%
expm1-undefine20.6%
Applied egg-rr20.6%
expm1-define32.2%
Simplified32.2%
Taylor expanded in t around inf 25.3%
log-rec25.3%
mul-1-neg25.3%
+-commutative25.3%
log-rec25.3%
mul-1-neg25.3%
Simplified25.3%
Final simplification22.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 2e-40)
(/ 2.0 (* (* 2.0 k) (pow (* (/ (pow t_m 1.5) l) (sqrt (sin k))) 2.0)))
(if (<= k 8.5e+142)
(/
2.0
(/
(*
(+ 2.0 (pow (/ k t_m) 2.0))
(* (* (sin k) (tan k)) (/ (pow t_m 3.0) l)))
l))
(/
2.0
(*
(/ (expm1 (- (* -3.0 (- (log t_m))) (log l))) l)
(* 2.0 (pow k 2.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 2e-40) {
tmp = 2.0 / ((2.0 * k) * pow(((pow(t_m, 1.5) / l) * sqrt(sin(k))), 2.0));
} else if (k <= 8.5e+142) {
tmp = 2.0 / (((2.0 + pow((k / t_m), 2.0)) * ((sin(k) * tan(k)) * (pow(t_m, 3.0) / l))) / l);
} else {
tmp = 2.0 / ((expm1(((-3.0 * -log(t_m)) - log(l))) / l) * (2.0 * pow(k, 2.0)));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 2e-40) {
tmp = 2.0 / ((2.0 * k) * Math.pow(((Math.pow(t_m, 1.5) / l) * Math.sqrt(Math.sin(k))), 2.0));
} else if (k <= 8.5e+142) {
tmp = 2.0 / (((2.0 + Math.pow((k / t_m), 2.0)) * ((Math.sin(k) * Math.tan(k)) * (Math.pow(t_m, 3.0) / l))) / l);
} else {
tmp = 2.0 / ((Math.expm1(((-3.0 * -Math.log(t_m)) - Math.log(l))) / l) * (2.0 * Math.pow(k, 2.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 2e-40: tmp = 2.0 / ((2.0 * k) * math.pow(((math.pow(t_m, 1.5) / l) * math.sqrt(math.sin(k))), 2.0)) elif k <= 8.5e+142: tmp = 2.0 / (((2.0 + math.pow((k / t_m), 2.0)) * ((math.sin(k) * math.tan(k)) * (math.pow(t_m, 3.0) / l))) / l) else: tmp = 2.0 / ((math.expm1(((-3.0 * -math.log(t_m)) - math.log(l))) / l) * (2.0 * math.pow(k, 2.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 2e-40) tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(Float64((t_m ^ 1.5) / l) * sqrt(sin(k))) ^ 2.0))); elseif (k <= 8.5e+142) tmp = Float64(2.0 / Float64(Float64(Float64(2.0 + (Float64(k / t_m) ^ 2.0)) * Float64(Float64(sin(k) * tan(k)) * Float64((t_m ^ 3.0) / l))) / l)); else tmp = Float64(2.0 / Float64(Float64(expm1(Float64(Float64(-3.0 * Float64(-log(t_m))) - log(l))) / l) * Float64(2.0 * (k ^ 2.0)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 2e-40], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Sin[k], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 8.5e+142], N[(2.0 / N[(N[(N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(Exp[N[(N[(-3.0 * (-N[Log[t$95$m], $MachinePrecision])), $MachinePrecision] - N[Log[l], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision] / l), $MachinePrecision] * N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2 \cdot 10^{-40}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2}}\\
\mathbf{elif}\;k \leq 8.5 \cdot 10^{+142}:\\
\;\;\;\;\frac{2}{\frac{\left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right) \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \frac{{t\_m}^{3}}{\ell}\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\mathsf{expm1}\left(-3 \cdot \left(-\log t\_m\right) - \log \ell\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}\\
\end{array}
\end{array}
if k < 1.9999999999999999e-40Initial program 62.4%
Simplified62.4%
add-sqr-sqrt34.2%
pow234.2%
*-commutative34.2%
sqrt-prod14.2%
sqrt-div14.2%
sqrt-pow116.4%
metadata-eval16.4%
sqrt-prod9.5%
add-sqr-sqrt16.5%
Applied egg-rr16.5%
*-commutative16.5%
Simplified16.5%
Taylor expanded in k around 0 13.9%
*-commutative60.2%
Simplified13.9%
if 1.9999999999999999e-40 < k < 8.49999999999999955e142Initial program 40.3%
Simplified40.3%
associate-*l*40.3%
associate-/r*55.1%
associate-+r+55.1%
metadata-eval55.1%
associate-*l*55.1%
associate-*l/57.0%
associate-*r*57.0%
Applied egg-rr57.0%
if 8.49999999999999955e142 < k Initial program 50.2%
Simplified50.5%
Taylor expanded in k around 0 50.5%
expm1-log1p-u32.2%
expm1-undefine20.6%
Applied egg-rr20.6%
expm1-define32.2%
Simplified32.2%
Taylor expanded in t around inf 25.3%
log-rec25.3%
mul-1-neg25.3%
+-commutative25.3%
log-rec25.3%
mul-1-neg25.3%
Simplified25.3%
Final simplification22.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.86e-91)
(/ 2.0 (* (* 2.0 k) (pow (* (/ (pow t_m 1.5) l) (sqrt (sin k))) 2.0)))
(if (<= k 5.9e+161)
(* (* l (/ (/ 2.0 (tan k)) (* (sin k) (pow t_m 3.0)))) (* l 0.5))
(/
2.0
(*
(/ (expm1 (- (* -3.0 (- (log t_m))) (log l))) l)
(* 2.0 (pow k 2.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.86e-91) {
tmp = 2.0 / ((2.0 * k) * pow(((pow(t_m, 1.5) / l) * sqrt(sin(k))), 2.0));
} else if (k <= 5.9e+161) {
tmp = (l * ((2.0 / tan(k)) / (sin(k) * pow(t_m, 3.0)))) * (l * 0.5);
} else {
tmp = 2.0 / ((expm1(((-3.0 * -log(t_m)) - log(l))) / l) * (2.0 * pow(k, 2.0)));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.86e-91) {
tmp = 2.0 / ((2.0 * k) * Math.pow(((Math.pow(t_m, 1.5) / l) * Math.sqrt(Math.sin(k))), 2.0));
} else if (k <= 5.9e+161) {
tmp = (l * ((2.0 / Math.tan(k)) / (Math.sin(k) * Math.pow(t_m, 3.0)))) * (l * 0.5);
} else {
tmp = 2.0 / ((Math.expm1(((-3.0 * -Math.log(t_m)) - Math.log(l))) / l) * (2.0 * Math.pow(k, 2.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 1.86e-91: tmp = 2.0 / ((2.0 * k) * math.pow(((math.pow(t_m, 1.5) / l) * math.sqrt(math.sin(k))), 2.0)) elif k <= 5.9e+161: tmp = (l * ((2.0 / math.tan(k)) / (math.sin(k) * math.pow(t_m, 3.0)))) * (l * 0.5) else: tmp = 2.0 / ((math.expm1(((-3.0 * -math.log(t_m)) - math.log(l))) / l) * (2.0 * math.pow(k, 2.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.86e-91) tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(Float64((t_m ^ 1.5) / l) * sqrt(sin(k))) ^ 2.0))); elseif (k <= 5.9e+161) tmp = Float64(Float64(l * Float64(Float64(2.0 / tan(k)) / Float64(sin(k) * (t_m ^ 3.0)))) * Float64(l * 0.5)); else tmp = Float64(2.0 / Float64(Float64(expm1(Float64(Float64(-3.0 * Float64(-log(t_m))) - log(l))) / l) * Float64(2.0 * (k ^ 2.0)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.86e-91], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Sin[k], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 5.9e+161], N[(N[(l * N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * 0.5), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(Exp[N[(N[(-3.0 * (-N[Log[t$95$m], $MachinePrecision])), $MachinePrecision] - N[Log[l], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision] / l), $MachinePrecision] * N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.86 \cdot 10^{-91}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2}}\\
\mathbf{elif}\;k \leq 5.9 \cdot 10^{+161}:\\
\;\;\;\;\left(\ell \cdot \frac{\frac{2}{\tan k}}{\sin k \cdot {t\_m}^{3}}\right) \cdot \left(\ell \cdot 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\mathsf{expm1}\left(-3 \cdot \left(-\log t\_m\right) - \log \ell\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}\\
\end{array}
\end{array}
if k < 1.86000000000000005e-91Initial program 62.7%
Simplified62.7%
add-sqr-sqrt34.8%
pow234.8%
*-commutative34.8%
sqrt-prod13.6%
sqrt-div13.6%
sqrt-pow115.4%
metadata-eval15.4%
sqrt-prod8.7%
add-sqr-sqrt15.4%
Applied egg-rr15.4%
*-commutative15.4%
Simplified15.4%
Taylor expanded in k around 0 12.7%
*-commutative59.7%
Simplified12.7%
if 1.86000000000000005e-91 < k < 5.9000000000000003e161Initial program 44.6%
Simplified44.5%
associate-*r*57.7%
*-un-lft-identity57.7%
times-frac57.6%
associate-/l/57.6%
Applied egg-rr57.6%
/-rgt-identity57.6%
*-commutative57.6%
metadata-eval57.6%
distribute-neg-frac57.6%
associate-/l/57.6%
distribute-neg-frac57.6%
distribute-neg-frac57.6%
metadata-eval57.6%
*-commutative57.6%
Simplified57.6%
Taylor expanded in k around 0 60.7%
*-commutative60.7%
Simplified60.7%
if 5.9000000000000003e161 < k Initial program 49.0%
Simplified49.4%
Taylor expanded in k around 0 49.4%
expm1-log1p-u34.6%
expm1-undefine22.2%
Applied egg-rr22.2%
expm1-define34.6%
Simplified34.6%
Taylor expanded in t around inf 27.1%
log-rec27.1%
mul-1-neg27.1%
+-commutative27.1%
log-rec27.1%
mul-1-neg27.1%
Simplified27.1%
Final simplification25.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1e-93)
(/ 2.0 (* (* 2.0 k) (pow (* (/ (pow t_m 1.5) l) (sqrt (sin k))) 2.0)))
(if (<= k 6.2e+161)
(* (* l (/ (/ 2.0 (tan k)) (* (sin k) (pow t_m 3.0)))) (* l 0.5))
(* 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 <= 1e-93) {
tmp = 2.0 / ((2.0 * k) * pow(((pow(t_m, 1.5) / l) * sqrt(sin(k))), 2.0));
} else if (k <= 6.2e+161) {
tmp = (l * ((2.0 / tan(k)) / (sin(k) * pow(t_m, 3.0)))) * (l * 0.5);
} 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 <= 1d-93) then
tmp = 2.0d0 / ((2.0d0 * k) * ((((t_m ** 1.5d0) / l) * sqrt(sin(k))) ** 2.0d0))
else if (k <= 6.2d+161) then
tmp = (l * ((2.0d0 / tan(k)) / (sin(k) * (t_m ** 3.0d0)))) * (l * 0.5d0)
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 <= 1e-93) {
tmp = 2.0 / ((2.0 * k) * Math.pow(((Math.pow(t_m, 1.5) / l) * Math.sqrt(Math.sin(k))), 2.0));
} else if (k <= 6.2e+161) {
tmp = (l * ((2.0 / Math.tan(k)) / (Math.sin(k) * Math.pow(t_m, 3.0)))) * (l * 0.5);
} 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 <= 1e-93: tmp = 2.0 / ((2.0 * k) * math.pow(((math.pow(t_m, 1.5) / l) * math.sqrt(math.sin(k))), 2.0)) elif k <= 6.2e+161: tmp = (l * ((2.0 / math.tan(k)) / (math.sin(k) * math.pow(t_m, 3.0)))) * (l * 0.5) 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 <= 1e-93) tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(Float64((t_m ^ 1.5) / l) * sqrt(sin(k))) ^ 2.0))); elseif (k <= 6.2e+161) tmp = Float64(Float64(l * Float64(Float64(2.0 / tan(k)) / Float64(sin(k) * (t_m ^ 3.0)))) * Float64(l * 0.5)); 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 <= 1e-93) tmp = 2.0 / ((2.0 * k) * ((((t_m ^ 1.5) / l) * sqrt(sin(k))) ^ 2.0)); elseif (k <= 6.2e+161) tmp = (l * ((2.0 / tan(k)) / (sin(k) * (t_m ^ 3.0)))) * (l * 0.5); 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, 1e-93], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Sin[k], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 6.2e+161], N[(N[(l * N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * 0.5), $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 10^{-93}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2}}\\
\mathbf{elif}\;k \leq 6.2 \cdot 10^{+161}:\\
\;\;\;\;\left(\ell \cdot \frac{\frac{2}{\tan k}}{\sin k \cdot {t\_m}^{3}}\right) \cdot \left(\ell \cdot 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t\_m}\\
\end{array}
\end{array}
if k < 9.999999999999999e-94Initial program 62.7%
Simplified62.7%
add-sqr-sqrt34.8%
pow234.8%
*-commutative34.8%
sqrt-prod13.6%
sqrt-div13.6%
sqrt-pow115.4%
metadata-eval15.4%
sqrt-prod8.7%
add-sqr-sqrt15.4%
Applied egg-rr15.4%
*-commutative15.4%
Simplified15.4%
Taylor expanded in k around 0 12.7%
*-commutative59.7%
Simplified12.7%
if 9.999999999999999e-94 < k < 6.20000000000000013e161Initial program 44.6%
Simplified44.5%
associate-*r*57.7%
*-un-lft-identity57.7%
times-frac57.6%
associate-/l/57.6%
Applied egg-rr57.6%
/-rgt-identity57.6%
*-commutative57.6%
metadata-eval57.6%
distribute-neg-frac57.6%
associate-/l/57.6%
distribute-neg-frac57.6%
distribute-neg-frac57.6%
metadata-eval57.6%
*-commutative57.6%
Simplified57.6%
Taylor expanded in k around 0 60.7%
*-commutative60.7%
Simplified60.7%
if 6.20000000000000013e161 < k Initial program 49.0%
Simplified49.0%
Taylor expanded in t around 0 66.7%
associate-*r*66.7%
times-frac66.7%
Simplified66.7%
Taylor expanded in k around 0 66.7%
associate-/l*66.3%
Simplified66.3%
pow166.3%
pow266.3%
div-inv66.3%
pow266.3%
pow-flip66.3%
metadata-eval66.3%
Applied egg-rr66.3%
unpow166.3%
associate-*r*66.7%
*-commutative66.7%
associate-*l*66.7%
Simplified66.7%
Taylor expanded in t around 0 66.7%
associate-/r*66.7%
Simplified66.7%
Final simplification31.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 5.9e+161)
(* (* l (/ (/ 2.0 (tan k)) (* (sin k) (pow t_m 3.0)))) (* l 0.5))
(* 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 <= 5.9e+161) {
tmp = (l * ((2.0 / tan(k)) / (sin(k) * pow(t_m, 3.0)))) * (l * 0.5);
} 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 <= 5.9d+161) then
tmp = (l * ((2.0d0 / tan(k)) / (sin(k) * (t_m ** 3.0d0)))) * (l * 0.5d0)
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 <= 5.9e+161) {
tmp = (l * ((2.0 / Math.tan(k)) / (Math.sin(k) * Math.pow(t_m, 3.0)))) * (l * 0.5);
} 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 <= 5.9e+161: tmp = (l * ((2.0 / math.tan(k)) / (math.sin(k) * math.pow(t_m, 3.0)))) * (l * 0.5) 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 <= 5.9e+161) tmp = Float64(Float64(l * Float64(Float64(2.0 / tan(k)) / Float64(sin(k) * (t_m ^ 3.0)))) * Float64(l * 0.5)); 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 <= 5.9e+161) tmp = (l * ((2.0 / tan(k)) / (sin(k) * (t_m ^ 3.0)))) * (l * 0.5); 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, 5.9e+161], N[(N[(l * N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * 0.5), $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 5.9 \cdot 10^{+161}:\\
\;\;\;\;\left(\ell \cdot \frac{\frac{2}{\tan k}}{\sin k \cdot {t\_m}^{3}}\right) \cdot \left(\ell \cdot 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t\_m}\\
\end{array}
\end{array}
if k < 5.9000000000000003e161Initial program 58.2%
Simplified58.2%
associate-*r*64.8%
*-un-lft-identity64.8%
times-frac64.8%
associate-/l/64.8%
Applied egg-rr64.8%
/-rgt-identity64.8%
*-commutative64.8%
metadata-eval64.8%
distribute-neg-frac64.8%
associate-/l/64.8%
distribute-neg-frac64.8%
distribute-neg-frac64.8%
metadata-eval64.8%
*-commutative64.8%
Simplified64.8%
Taylor expanded in k around 0 63.0%
*-commutative63.0%
Simplified63.0%
if 5.9000000000000003e161 < k Initial program 49.0%
Simplified49.0%
Taylor expanded in t around 0 66.7%
associate-*r*66.7%
times-frac66.7%
Simplified66.7%
Taylor expanded in k around 0 66.7%
associate-/l*66.3%
Simplified66.3%
pow166.3%
pow266.3%
div-inv66.3%
pow266.3%
pow-flip66.3%
metadata-eval66.3%
Applied egg-rr66.3%
unpow166.3%
associate-*r*66.7%
*-commutative66.7%
associate-*l*66.7%
Simplified66.7%
Taylor expanded in t around 0 66.7%
associate-/r*66.7%
Simplified66.7%
Final simplification63.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.4e-33)
(* 2.0 (/ (/ (pow l 2.0) (pow k 4.0)) t_m))
(/ 2.0 (* (* 2.0 k) (* (sin k) (/ (pow t_m 3.0) (* l l))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.4e-33) {
tmp = 2.0 * ((pow(l, 2.0) / pow(k, 4.0)) / t_m);
} else {
tmp = 2.0 / ((2.0 * k) * (sin(k) * (pow(t_m, 3.0) / (l * l))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1.4d-33) then
tmp = 2.0d0 * (((l ** 2.0d0) / (k ** 4.0d0)) / t_m)
else
tmp = 2.0d0 / ((2.0d0 * k) * (sin(k) * ((t_m ** 3.0d0) / (l * l))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.4e-33) {
tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 4.0)) / t_m);
} else {
tmp = 2.0 / ((2.0 * k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 1.4e-33: tmp = 2.0 * ((math.pow(l, 2.0) / math.pow(k, 4.0)) / t_m) else: tmp = 2.0 / ((2.0 * k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l)))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.4e-33) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 4.0)) / t_m)); else tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 1.4e-33) tmp = 2.0 * (((l ^ 2.0) / (k ^ 4.0)) / t_m); else tmp = 2.0 / ((2.0 * k) * (sin(k) * ((t_m ^ 3.0) / (l * l)))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.4e-33], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.4 \cdot 10^{-33}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)}\\
\end{array}
\end{array}
if t < 1.4e-33Initial program 50.1%
Simplified50.1%
Taylor expanded in t around 0 64.4%
associate-*r*64.5%
times-frac65.5%
Simplified65.5%
Taylor expanded in k around 0 52.4%
associate-/l*53.3%
Simplified53.3%
pow153.3%
pow253.3%
div-inv52.7%
pow252.7%
pow-flip52.7%
metadata-eval52.7%
Applied egg-rr52.7%
unpow152.7%
associate-*r*51.9%
*-commutative51.9%
associate-*l*52.0%
Simplified52.0%
Taylor expanded in t around 0 52.4%
associate-/r*52.5%
Simplified52.5%
if 1.4e-33 < t Initial program 75.4%
Simplified75.4%
Taylor expanded in k around 0 67.3%
*-commutative67.3%
Simplified67.3%
Final simplification56.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 3.05e-9)
(/ 2.0 (* (* 2.0 (pow k 2.0)) (/ (/ (pow t_m 3.0) l) l)))
(/ 2.0 (* t_m (* (pow k 4.0) (pow l -2.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 3.05e-9) {
tmp = 2.0 / ((2.0 * pow(k, 2.0)) * ((pow(t_m, 3.0) / l) / l));
} else {
tmp = 2.0 / (t_m * (pow(k, 4.0) * pow(l, -2.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 3.05d-9) then
tmp = 2.0d0 / ((2.0d0 * (k ** 2.0d0)) * (((t_m ** 3.0d0) / l) / l))
else
tmp = 2.0d0 / (t_m * ((k ** 4.0d0) * (l ** (-2.0d0))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 3.05e-9) {
tmp = 2.0 / ((2.0 * Math.pow(k, 2.0)) * ((Math.pow(t_m, 3.0) / l) / l));
} else {
tmp = 2.0 / (t_m * (Math.pow(k, 4.0) * Math.pow(l, -2.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 3.05e-9: tmp = 2.0 / ((2.0 * math.pow(k, 2.0)) * ((math.pow(t_m, 3.0) / l) / l)) else: tmp = 2.0 / (t_m * (math.pow(k, 4.0) * math.pow(l, -2.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 3.05e-9) tmp = Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64(Float64((t_m ^ 3.0) / l) / l))); else tmp = Float64(2.0 / Float64(t_m * Float64((k ^ 4.0) * (l ^ -2.0)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 3.05e-9) tmp = 2.0 / ((2.0 * (k ^ 2.0)) * (((t_m ^ 3.0) / l) / l)); else tmp = 2.0 / (t_m * ((k ^ 4.0) * (l ^ -2.0))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 3.05e-9], N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$m * N[(N[Power[k, 4.0], $MachinePrecision] * N[Power[l, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 3.05 \cdot 10^{-9}:\\
\;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{\frac{{t\_m}^{3}}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_m \cdot \left({k}^{4} \cdot {\ell}^{-2}\right)}\\
\end{array}
\end{array}
if k < 3.05e-9Initial program 63.1%
Simplified60.9%
Taylor expanded in k around 0 57.6%
if 3.05e-9 < k Initial program 40.6%
Simplified40.6%
Taylor expanded in t around 0 66.3%
associate-*r*66.3%
times-frac66.4%
Simplified66.4%
Taylor expanded in k around 0 53.9%
associate-/l*53.8%
Simplified53.8%
pow153.8%
pow253.8%
div-inv53.8%
pow253.8%
pow-flip53.8%
metadata-eval53.8%
Applied egg-rr53.8%
unpow153.8%
associate-*r*53.9%
*-commutative53.9%
associate-*l*54.0%
Simplified54.0%
Final simplification56.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 3.4e-9)
(/ 2.0 (* (/ (pow t_m 3.0) l) (/ (* 2.0 (pow k 2.0)) l)))
(/ 2.0 (* t_m (* (pow k 4.0) (pow l -2.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 3.4e-9) {
tmp = 2.0 / ((pow(t_m, 3.0) / l) * ((2.0 * pow(k, 2.0)) / l));
} else {
tmp = 2.0 / (t_m * (pow(k, 4.0) * pow(l, -2.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 3.4d-9) then
tmp = 2.0d0 / (((t_m ** 3.0d0) / l) * ((2.0d0 * (k ** 2.0d0)) / l))
else
tmp = 2.0d0 / (t_m * ((k ** 4.0d0) * (l ** (-2.0d0))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 3.4e-9) {
tmp = 2.0 / ((Math.pow(t_m, 3.0) / l) * ((2.0 * Math.pow(k, 2.0)) / l));
} else {
tmp = 2.0 / (t_m * (Math.pow(k, 4.0) * Math.pow(l, -2.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 3.4e-9: tmp = 2.0 / ((math.pow(t_m, 3.0) / l) * ((2.0 * math.pow(k, 2.0)) / l)) else: tmp = 2.0 / (t_m * (math.pow(k, 4.0) * math.pow(l, -2.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 3.4e-9) tmp = Float64(2.0 / Float64(Float64((t_m ^ 3.0) / l) * Float64(Float64(2.0 * (k ^ 2.0)) / l))); else tmp = Float64(2.0 / Float64(t_m * Float64((k ^ 4.0) * (l ^ -2.0)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 3.4e-9) tmp = 2.0 / (((t_m ^ 3.0) / l) * ((2.0 * (k ^ 2.0)) / l)); else tmp = 2.0 / (t_m * ((k ^ 4.0) * (l ^ -2.0))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 3.4e-9], N[(2.0 / N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] * N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$m * N[(N[Power[k, 4.0], $MachinePrecision] * N[Power[l, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 3.4 \cdot 10^{-9}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{3}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_m \cdot \left({k}^{4} \cdot {\ell}^{-2}\right)}\\
\end{array}
\end{array}
if k < 3.3999999999999998e-9Initial program 63.1%
Simplified60.9%
Taylor expanded in k around 0 57.6%
associate-*l/58.6%
Applied egg-rr58.6%
associate-/l*58.6%
Simplified58.6%
if 3.3999999999999998e-9 < k Initial program 40.6%
Simplified40.6%
Taylor expanded in t around 0 66.3%
associate-*r*66.3%
times-frac66.4%
Simplified66.4%
Taylor expanded in k around 0 53.9%
associate-/l*53.8%
Simplified53.8%
pow153.8%
pow253.8%
div-inv53.8%
pow253.8%
pow-flip53.8%
metadata-eval53.8%
Applied egg-rr53.8%
unpow153.8%
associate-*r*53.9%
*-commutative53.9%
associate-*l*54.0%
Simplified54.0%
Final simplification57.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 7.2e-9)
(/ 2.0 (/ (* (* 2.0 (pow k 2.0)) (/ (pow t_m 3.0) l)) l))
(/ 2.0 (* t_m (* (pow k 4.0) (pow l -2.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 7.2e-9) {
tmp = 2.0 / (((2.0 * pow(k, 2.0)) * (pow(t_m, 3.0) / l)) / l);
} else {
tmp = 2.0 / (t_m * (pow(k, 4.0) * pow(l, -2.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 7.2d-9) then
tmp = 2.0d0 / (((2.0d0 * (k ** 2.0d0)) * ((t_m ** 3.0d0) / l)) / l)
else
tmp = 2.0d0 / (t_m * ((k ** 4.0d0) * (l ** (-2.0d0))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 7.2e-9) {
tmp = 2.0 / (((2.0 * Math.pow(k, 2.0)) * (Math.pow(t_m, 3.0) / l)) / l);
} else {
tmp = 2.0 / (t_m * (Math.pow(k, 4.0) * Math.pow(l, -2.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 7.2e-9: tmp = 2.0 / (((2.0 * math.pow(k, 2.0)) * (math.pow(t_m, 3.0) / l)) / l) else: tmp = 2.0 / (t_m * (math.pow(k, 4.0) * math.pow(l, -2.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 7.2e-9) tmp = Float64(2.0 / Float64(Float64(Float64(2.0 * (k ^ 2.0)) * Float64((t_m ^ 3.0) / l)) / l)); else tmp = Float64(2.0 / Float64(t_m * Float64((k ^ 4.0) * (l ^ -2.0)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 7.2e-9) tmp = 2.0 / (((2.0 * (k ^ 2.0)) * ((t_m ^ 3.0) / l)) / l); else tmp = 2.0 / (t_m * ((k ^ 4.0) * (l ^ -2.0))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 7.2e-9], N[(2.0 / N[(N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$m * N[(N[Power[k, 4.0], $MachinePrecision] * N[Power[l, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 7.2 \cdot 10^{-9}:\\
\;\;\;\;\frac{2}{\frac{\left(2 \cdot {k}^{2}\right) \cdot \frac{{t\_m}^{3}}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_m \cdot \left({k}^{4} \cdot {\ell}^{-2}\right)}\\
\end{array}
\end{array}
if k < 7.2e-9Initial program 63.1%
Simplified60.9%
Taylor expanded in k around 0 57.6%
associate-*l/58.6%
Applied egg-rr58.6%
if 7.2e-9 < k Initial program 40.6%
Simplified40.6%
Taylor expanded in t around 0 66.3%
associate-*r*66.3%
times-frac66.4%
Simplified66.4%
Taylor expanded in k around 0 53.9%
associate-/l*53.8%
Simplified53.8%
pow153.8%
pow253.8%
div-inv53.8%
pow253.8%
pow-flip53.8%
metadata-eval53.8%
Applied egg-rr53.8%
unpow153.8%
associate-*r*53.9%
*-commutative53.9%
associate-*l*54.0%
Simplified54.0%
Final simplification57.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 (* 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) {
return t_s * (2.0 * ((pow(l, 2.0) / pow(k, 4.0)) / t_m));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 * (((l ** 2.0d0) / (k ** 4.0d0)) / t_m))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 4.0)) / t_m));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 * ((math.pow(l, 2.0) / math.pow(k, 4.0)) / t_m))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 4.0)) / t_m))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 * (((l ^ 2.0) / (k ^ 4.0)) / t_m)); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / 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 \left(2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t\_m}\right)
\end{array}
Initial program 56.7%
Simplified56.7%
Taylor expanded in t around 0 61.0%
associate-*r*61.0%
times-frac62.5%
Simplified62.5%
Taylor expanded in k around 0 51.0%
associate-/l*52.3%
Simplified52.3%
pow152.3%
pow252.3%
div-inv51.9%
pow251.9%
pow-flip51.9%
metadata-eval51.9%
Applied egg-rr51.9%
unpow151.9%
associate-*r*50.6%
*-commutative50.6%
associate-*l*50.6%
Simplified50.6%
Taylor expanded in t around 0 51.0%
associate-/r*51.0%
Simplified51.0%
Final simplification51.0%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 2.0 (* (pow k 4.0) (/ t_m (pow l 2.0))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / (pow(k, 4.0) * (t_m / pow(l, 2.0))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / ((k ** 4.0d0) * (t_m / (l ** 2.0d0))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / (Math.pow(k, 4.0) * (t_m / Math.pow(l, 2.0))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / (math.pow(k, 4.0) * (t_m / math.pow(l, 2.0))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64((k ^ 4.0) * Float64(t_m / (l ^ 2.0))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / ((k ^ 4.0) * (t_m / (l ^ 2.0)))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[Power[k, 4.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{2}{{k}^{4} \cdot \frac{t\_m}{{\ell}^{2}}}
\end{array}
Initial program 56.7%
Simplified56.7%
Taylor expanded in t around 0 61.0%
associate-*r*61.0%
times-frac62.5%
Simplified62.5%
Taylor expanded in k around 0 51.0%
associate-/l*52.3%
Simplified52.3%
Final simplification52.3%
herbie shell --seed 2024131
(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))))