
(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 16 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 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (/ k t_m) 2.0)))
(*
t_s
(if (<= t_m 6.4e-54)
(/ 2.0 (* (/ t_m (cos k)) (pow (* k (/ (sin k) l)) 2.0)))
(if (<= t_m 9.8e+89)
(/
2.0
(* (+ 2.0 t_2) (* (/ (tan k) l) (/ (pow t_m 3.0) (/ l (sin k))))))
(if (<= t_m 1.3e+200)
(/
2.0
(*
(* (tan k) (* (sin k) (pow (/ (pow t_m 1.5) l) 2.0)))
(+ 1.0 (+ t_2 1.0))))
(/
2.0
(pow
(*
(/ t_m (pow (cbrt l) 2.0))
(* (cbrt (tan k)) (cbrt (* 2.0 (sin k)))))
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 <= 6.4e-54) {
tmp = 2.0 / ((t_m / cos(k)) * pow((k * (sin(k) / l)), 2.0));
} else if (t_m <= 9.8e+89) {
tmp = 2.0 / ((2.0 + t_2) * ((tan(k) / l) * (pow(t_m, 3.0) / (l / sin(k)))));
} else if (t_m <= 1.3e+200) {
tmp = 2.0 / ((tan(k) * (sin(k) * pow((pow(t_m, 1.5) / l), 2.0))) * (1.0 + (t_2 + 1.0)));
} else {
tmp = 2.0 / pow(((t_m / pow(cbrt(l), 2.0)) * (cbrt(tan(k)) * cbrt((2.0 * sin(k))))), 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 <= 6.4e-54) {
tmp = 2.0 / ((t_m / Math.cos(k)) * Math.pow((k * (Math.sin(k) / l)), 2.0));
} else if (t_m <= 9.8e+89) {
tmp = 2.0 / ((2.0 + t_2) * ((Math.tan(k) / l) * (Math.pow(t_m, 3.0) / (l / Math.sin(k)))));
} else if (t_m <= 1.3e+200) {
tmp = 2.0 / ((Math.tan(k) * (Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / l), 2.0))) * (1.0 + (t_2 + 1.0)));
} else {
tmp = 2.0 / Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * (Math.cbrt(Math.tan(k)) * Math.cbrt((2.0 * Math.sin(k))))), 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 <= 6.4e-54) tmp = Float64(2.0 / Float64(Float64(t_m / cos(k)) * (Float64(k * Float64(sin(k) / l)) ^ 2.0))); elseif (t_m <= 9.8e+89) tmp = Float64(2.0 / Float64(Float64(2.0 + t_2) * Float64(Float64(tan(k) / l) * Float64((t_m ^ 3.0) / Float64(l / sin(k)))))); elseif (t_m <= 1.3e+200) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(sin(k) * (Float64((t_m ^ 1.5) / l) ^ 2.0))) * Float64(1.0 + Float64(t_2 + 1.0)))); else tmp = Float64(2.0 / (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * Float64(cbrt(tan(k)) * cbrt(Float64(2.0 * sin(k))))) ^ 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, 6.4e-54], N[(2.0 / N[(N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision] * N[Power[N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 9.8e+89], N[(2.0 / N[(N[(2.0 + t$95$2), $MachinePrecision] * N[(N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.3e+200], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(t$95$2 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Tan[k], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[(2.0 * N[Sin[k], $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 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 6.4 \cdot 10^{-54}:\\
\;\;\;\;\frac{2}{\frac{t\_m}{\cos k} \cdot {\left(k \cdot \frac{\sin k}{\ell}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 9.8 \cdot 10^{+89}:\\
\;\;\;\;\frac{2}{\left(2 + t\_2\right) \cdot \left(\frac{\tan k}{\ell} \cdot \frac{{t\_m}^{3}}{\frac{\ell}{\sin k}}\right)}\\
\mathbf{elif}\;t\_m \leq 1.3 \cdot 10^{+200}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\right)\right) \cdot \left(1 + \left(t\_2 + 1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \left(\sqrt[3]{\tan k} \cdot \sqrt[3]{2 \cdot \sin k}\right)\right)}^{3}}\\
\end{array}
\end{array}
\end{array}
if t < 6.39999999999999997e-54Initial program 47.0%
associate-/r*53.2%
+-commutative53.2%
associate-+r+53.2%
metadata-eval53.2%
associate-*r*53.2%
add-sqr-sqrt18.6%
pow218.6%
Applied egg-rr13.2%
*-commutative13.2%
Simplified13.2%
Taylor expanded in k around inf 36.8%
expm1-log1p-u36.4%
expm1-udef30.4%
*-commutative30.4%
unpow-prod-down28.6%
pow228.6%
add-sqr-sqrt28.7%
associate-/l*28.7%
Applied egg-rr28.7%
expm1-def58.8%
expm1-log1p73.1%
associate-/r/73.1%
associate-*l/73.1%
associate-*r/73.1%
Simplified73.1%
if 6.39999999999999997e-54 < t < 9.79999999999999992e89Initial program 81.1%
*-commutative81.1%
associate-/r*85.5%
associate-*l/88.4%
associate-*r/91.3%
Applied egg-rr91.3%
distribute-lft-in91.3%
associate-/l*88.5%
associate-*l/88.5%
+-commutative88.5%
associate-/l*88.4%
associate-*l/88.4%
Applied egg-rr88.4%
*-commutative88.4%
*-rgt-identity88.4%
distribute-lft1-in88.4%
associate-+l+88.4%
metadata-eval88.4%
+-commutative88.4%
associate-/r/93.9%
associate-/l*94.0%
Simplified94.0%
if 9.79999999999999992e89 < t < 1.3000000000000001e200Initial program 70.8%
associate-/r*71.4%
add-sqr-sqrt71.4%
pow271.4%
associate-/r*70.8%
sqrt-div70.8%
sqrt-pow177.4%
metadata-eval77.4%
sqrt-prod52.8%
add-sqr-sqrt99.7%
Applied egg-rr99.7%
if 1.3000000000000001e200 < t Initial program 81.7%
associate-/r*88.3%
+-commutative88.3%
associate-+r+88.3%
metadata-eval88.3%
associate-*r*88.3%
add-cube-cbrt88.3%
pow388.3%
Applied egg-rr62.7%
*-commutative62.7%
associate-*r*62.7%
cbrt-prod99.4%
Applied egg-rr99.4%
Taylor expanded in t around inf 99.4%
*-commutative99.4%
Simplified99.4%
Final simplification79.2%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 2.5e-54)
(/ 2.0 (* (/ t_m (cos k)) (pow (* k (/ (sin k) l)) 2.0)))
(/
2.0
(pow
(*
(/ t_m (pow (cbrt l) 2.0))
(* (cbrt (* (sin k) (+ 2.0 (pow (/ k t_m) 2.0)))) (cbrt (tan k))))
3.0)))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.5e-54) {
tmp = 2.0 / ((t_m / cos(k)) * pow((k * (sin(k) / l)), 2.0));
} else {
tmp = 2.0 / pow(((t_m / pow(cbrt(l), 2.0)) * (cbrt((sin(k) * (2.0 + pow((k / t_m), 2.0)))) * cbrt(tan(k)))), 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 <= 2.5e-54) {
tmp = 2.0 / ((t_m / Math.cos(k)) * Math.pow((k * (Math.sin(k) / l)), 2.0));
} else {
tmp = 2.0 / Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * (Math.cbrt((Math.sin(k) * (2.0 + Math.pow((k / t_m), 2.0)))) * Math.cbrt(Math.tan(k)))), 3.0);
}
return t_s * tmp;
}
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 2.5e-54) tmp = Float64(2.0 / Float64(Float64(t_m / cos(k)) * (Float64(k * Float64(sin(k) / l)) ^ 2.0))); else tmp = Float64(2.0 / (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * Float64(cbrt(Float64(sin(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0)))) * cbrt(tan(k)))) ^ 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, 2.5e-54], N[(2.0 / N[(N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision] * N[Power[N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(N[Sin[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Tan[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.5 \cdot 10^{-54}:\\
\;\;\;\;\frac{2}{\frac{t\_m}{\cos k} \cdot {\left(k \cdot \frac{\sin k}{\ell}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \left(\sqrt[3]{\sin k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)} \cdot \sqrt[3]{\tan k}\right)\right)}^{3}}\\
\end{array}
\end{array}
if t < 2.50000000000000008e-54Initial program 47.0%
associate-/r*53.2%
+-commutative53.2%
associate-+r+53.2%
metadata-eval53.2%
associate-*r*53.2%
add-sqr-sqrt18.6%
pow218.6%
Applied egg-rr13.2%
*-commutative13.2%
Simplified13.2%
Taylor expanded in k around inf 36.8%
expm1-log1p-u36.4%
expm1-udef30.4%
*-commutative30.4%
unpow-prod-down28.6%
pow228.6%
add-sqr-sqrt28.7%
associate-/l*28.7%
Applied egg-rr28.7%
expm1-def58.8%
expm1-log1p73.1%
associate-/r/73.1%
associate-*l/73.1%
associate-*r/73.1%
Simplified73.1%
if 2.50000000000000008e-54 < t Initial program 78.6%
associate-/r*82.6%
+-commutative82.6%
associate-+r+82.6%
metadata-eval82.6%
associate-*r*82.5%
add-cube-cbrt82.5%
pow382.5%
Applied egg-rr85.8%
*-commutative85.8%
associate-*r*85.8%
cbrt-prod96.1%
Applied egg-rr96.1%
Final simplification79.0%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (/ k t_m) 2.0)))
(*
t_s
(if (<= t_m 3.4e-54)
(/ 2.0 (* (/ t_m (cos k)) (pow (* k (/ (sin k) l)) 2.0)))
(if (<= t_m 2.2e+99)
(/
2.0
(* (+ 2.0 t_2) (* (/ (tan k) l) (/ (pow t_m 3.0) (/ l (sin k))))))
(/
2.0
(*
(+ 1.0 (+ t_2 1.0))
(* (tan k) (* (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 <= 3.4e-54) {
tmp = 2.0 / ((t_m / cos(k)) * pow((k * (sin(k) / l)), 2.0));
} else if (t_m <= 2.2e+99) {
tmp = 2.0 / ((2.0 + t_2) * ((tan(k) / l) * (pow(t_m, 3.0) / (l / sin(k)))));
} else {
tmp = 2.0 / ((1.0 + (t_2 + 1.0)) * (tan(k) * (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 <= 3.4e-54) {
tmp = 2.0 / ((t_m / Math.cos(k)) * Math.pow((k * (Math.sin(k) / l)), 2.0));
} else if (t_m <= 2.2e+99) {
tmp = 2.0 / ((2.0 + t_2) * ((Math.tan(k) / l) * (Math.pow(t_m, 3.0) / (l / Math.sin(k)))));
} else {
tmp = 2.0 / ((1.0 + (t_2 + 1.0)) * (Math.tan(k) * (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 <= 3.4e-54) tmp = Float64(2.0 / Float64(Float64(t_m / cos(k)) * (Float64(k * Float64(sin(k) / l)) ^ 2.0))); elseif (t_m <= 2.2e+99) tmp = Float64(2.0 / Float64(Float64(2.0 + t_2) * Float64(Float64(tan(k) / l) * Float64((t_m ^ 3.0) / Float64(l / sin(k)))))); else tmp = Float64(2.0 / Float64(Float64(1.0 + Float64(t_2 + 1.0)) * Float64(tan(k) * 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, 3.4e-54], N[(2.0 / N[(N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision] * N[Power[N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.2e+99], N[(2.0 / N[(N[(2.0 + t$95$2), $MachinePrecision] * N[(N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(1.0 + N[(t$95$2 + 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.4 \cdot 10^{-54}:\\
\;\;\;\;\frac{2}{\frac{t\_m}{\cos k} \cdot {\left(k \cdot \frac{\sin k}{\ell}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 2.2 \cdot 10^{+99}:\\
\;\;\;\;\frac{2}{\left(2 + t\_2\right) \cdot \left(\frac{\tan k}{\ell} \cdot \frac{{t\_m}^{3}}{\frac{\ell}{\sin k}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(1 + \left(t\_2 + 1\right)\right) \cdot \left(\tan k \cdot \left(\sin k \cdot {\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}\right)\right)}\\
\end{array}
\end{array}
\end{array}
if t < 3.39999999999999987e-54Initial program 47.0%
associate-/r*53.2%
+-commutative53.2%
associate-+r+53.2%
metadata-eval53.2%
associate-*r*53.2%
add-sqr-sqrt18.6%
pow218.6%
Applied egg-rr13.2%
*-commutative13.2%
Simplified13.2%
Taylor expanded in k around inf 36.8%
expm1-log1p-u36.4%
expm1-udef30.4%
*-commutative30.4%
unpow-prod-down28.6%
pow228.6%
add-sqr-sqrt28.7%
associate-/l*28.7%
Applied egg-rr28.7%
expm1-def58.8%
expm1-log1p73.1%
associate-/r/73.1%
associate-*l/73.1%
associate-*r/73.1%
Simplified73.1%
if 3.39999999999999987e-54 < t < 2.19999999999999978e99Initial program 81.1%
*-commutative81.1%
associate-/r*85.5%
associate-*l/88.4%
associate-*r/91.3%
Applied egg-rr91.3%
distribute-lft-in91.3%
associate-/l*88.5%
associate-*l/88.5%
+-commutative88.5%
associate-/l*88.4%
associate-*l/88.4%
Applied egg-rr88.4%
*-commutative88.4%
*-rgt-identity88.4%
distribute-lft1-in88.4%
associate-+l+88.4%
metadata-eval88.4%
+-commutative88.4%
associate-/r/93.9%
associate-/l*94.0%
Simplified94.0%
if 2.19999999999999978e99 < t Initial program 76.1%
associate-/r*79.6%
add-cube-cbrt79.6%
pow379.6%
associate-/r*76.1%
cbrt-div76.1%
rem-cbrt-cube79.5%
cbrt-prod93.8%
pow293.8%
Applied egg-rr93.8%
Final simplification78.4%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (* (pow t_m 0.75) (sqrt k))) (t_3 (pow (/ k t_m) 2.0)))
(*
t_s
(if (<= t_m 3.2e-54)
(/ 2.0 (* (/ t_m (cos k)) (pow (* k (/ (sin k) l)) 2.0)))
(if (<= t_m 9.8e+89)
(/
2.0
(* (+ 2.0 t_3) (* (/ (tan k) l) (/ (pow t_m 3.0) (/ l (sin k))))))
(if (<= t_m 4.5e+192)
(/
2.0
(*
(* (tan k) (* (sin k) (pow (/ (pow t_m 1.5) l) 2.0)))
(+ 1.0 (+ t_3 1.0))))
(pow (/ (/ l t_2) t_2) 2.0)))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow(t_m, 0.75) * sqrt(k);
double t_3 = pow((k / t_m), 2.0);
double tmp;
if (t_m <= 3.2e-54) {
tmp = 2.0 / ((t_m / cos(k)) * pow((k * (sin(k) / l)), 2.0));
} else if (t_m <= 9.8e+89) {
tmp = 2.0 / ((2.0 + t_3) * ((tan(k) / l) * (pow(t_m, 3.0) / (l / sin(k)))));
} else if (t_m <= 4.5e+192) {
tmp = 2.0 / ((tan(k) * (sin(k) * pow((pow(t_m, 1.5) / l), 2.0))) * (1.0 + (t_3 + 1.0)));
} else {
tmp = pow(((l / t_2) / t_2), 2.0);
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_2 = (t_m ** 0.75d0) * sqrt(k)
t_3 = (k / t_m) ** 2.0d0
if (t_m <= 3.2d-54) then
tmp = 2.0d0 / ((t_m / cos(k)) * ((k * (sin(k) / l)) ** 2.0d0))
else if (t_m <= 9.8d+89) then
tmp = 2.0d0 / ((2.0d0 + t_3) * ((tan(k) / l) * ((t_m ** 3.0d0) / (l / sin(k)))))
else if (t_m <= 4.5d+192) then
tmp = 2.0d0 / ((tan(k) * (sin(k) * (((t_m ** 1.5d0) / l) ** 2.0d0))) * (1.0d0 + (t_3 + 1.0d0)))
else
tmp = ((l / t_2) / t_2) ** 2.0d0
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.pow(t_m, 0.75) * Math.sqrt(k);
double t_3 = Math.pow((k / t_m), 2.0);
double tmp;
if (t_m <= 3.2e-54) {
tmp = 2.0 / ((t_m / Math.cos(k)) * Math.pow((k * (Math.sin(k) / l)), 2.0));
} else if (t_m <= 9.8e+89) {
tmp = 2.0 / ((2.0 + t_3) * ((Math.tan(k) / l) * (Math.pow(t_m, 3.0) / (l / Math.sin(k)))));
} else if (t_m <= 4.5e+192) {
tmp = 2.0 / ((Math.tan(k) * (Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / l), 2.0))) * (1.0 + (t_3 + 1.0)));
} else {
tmp = Math.pow(((l / t_2) / t_2), 2.0);
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = math.pow(t_m, 0.75) * math.sqrt(k) t_3 = math.pow((k / t_m), 2.0) tmp = 0 if t_m <= 3.2e-54: tmp = 2.0 / ((t_m / math.cos(k)) * math.pow((k * (math.sin(k) / l)), 2.0)) elif t_m <= 9.8e+89: tmp = 2.0 / ((2.0 + t_3) * ((math.tan(k) / l) * (math.pow(t_m, 3.0) / (l / math.sin(k))))) elif t_m <= 4.5e+192: tmp = 2.0 / ((math.tan(k) * (math.sin(k) * math.pow((math.pow(t_m, 1.5) / l), 2.0))) * (1.0 + (t_3 + 1.0))) else: tmp = math.pow(((l / t_2) / t_2), 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((t_m ^ 0.75) * sqrt(k)) t_3 = Float64(k / t_m) ^ 2.0 tmp = 0.0 if (t_m <= 3.2e-54) tmp = Float64(2.0 / Float64(Float64(t_m / cos(k)) * (Float64(k * Float64(sin(k) / l)) ^ 2.0))); elseif (t_m <= 9.8e+89) tmp = Float64(2.0 / Float64(Float64(2.0 + t_3) * Float64(Float64(tan(k) / l) * Float64((t_m ^ 3.0) / Float64(l / sin(k)))))); elseif (t_m <= 4.5e+192) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(sin(k) * (Float64((t_m ^ 1.5) / l) ^ 2.0))) * Float64(1.0 + Float64(t_3 + 1.0)))); else tmp = Float64(Float64(l / t_2) / t_2) ^ 2.0; end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = (t_m ^ 0.75) * sqrt(k); t_3 = (k / t_m) ^ 2.0; tmp = 0.0; if (t_m <= 3.2e-54) tmp = 2.0 / ((t_m / cos(k)) * ((k * (sin(k) / l)) ^ 2.0)); elseif (t_m <= 9.8e+89) tmp = 2.0 / ((2.0 + t_3) * ((tan(k) / l) * ((t_m ^ 3.0) / (l / sin(k))))); elseif (t_m <= 4.5e+192) tmp = 2.0 / ((tan(k) * (sin(k) * (((t_m ^ 1.5) / l) ^ 2.0))) * (1.0 + (t_3 + 1.0))); else tmp = ((l / t_2) / t_2) ^ 2.0; end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[Power[t$95$m, 0.75], $MachinePrecision] * N[Sqrt[k], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 3.2e-54], N[(2.0 / N[(N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision] * N[Power[N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 9.8e+89], N[(2.0 / N[(N[(2.0 + t$95$3), $MachinePrecision] * N[(N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.5e+192], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(t$95$3 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[(l / t$95$2), $MachinePrecision] / t$95$2), $MachinePrecision], 2.0], $MachinePrecision]]]]), $MachinePrecision]]]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {t\_m}^{0.75} \cdot \sqrt{k}\\
t_3 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.2 \cdot 10^{-54}:\\
\;\;\;\;\frac{2}{\frac{t\_m}{\cos k} \cdot {\left(k \cdot \frac{\sin k}{\ell}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 9.8 \cdot 10^{+89}:\\
\;\;\;\;\frac{2}{\left(2 + t\_3\right) \cdot \left(\frac{\tan k}{\ell} \cdot \frac{{t\_m}^{3}}{\frac{\ell}{\sin k}}\right)}\\
\mathbf{elif}\;t\_m \leq 4.5 \cdot 10^{+192}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\right)\right) \cdot \left(1 + \left(t\_3 + 1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{\frac{\ell}{t\_2}}{t\_2}\right)}^{2}\\
\end{array}
\end{array}
\end{array}
if t < 3.19999999999999998e-54Initial program 47.0%
associate-/r*53.2%
+-commutative53.2%
associate-+r+53.2%
metadata-eval53.2%
associate-*r*53.2%
add-sqr-sqrt18.6%
pow218.6%
Applied egg-rr13.2%
*-commutative13.2%
Simplified13.2%
Taylor expanded in k around inf 36.8%
expm1-log1p-u36.4%
expm1-udef30.4%
*-commutative30.4%
unpow-prod-down28.6%
pow228.6%
add-sqr-sqrt28.7%
associate-/l*28.7%
Applied egg-rr28.7%
expm1-def58.8%
expm1-log1p73.1%
associate-/r/73.1%
associate-*l/73.1%
associate-*r/73.1%
Simplified73.1%
if 3.19999999999999998e-54 < t < 9.79999999999999992e89Initial program 81.1%
*-commutative81.1%
associate-/r*85.5%
associate-*l/88.4%
associate-*r/91.3%
Applied egg-rr91.3%
distribute-lft-in91.3%
associate-/l*88.5%
associate-*l/88.5%
+-commutative88.5%
associate-/l*88.4%
associate-*l/88.4%
Applied egg-rr88.4%
*-commutative88.4%
*-rgt-identity88.4%
distribute-lft1-in88.4%
associate-+l+88.4%
metadata-eval88.4%
+-commutative88.4%
associate-/r/93.9%
associate-/l*94.0%
Simplified94.0%
if 9.79999999999999992e89 < t < 4.5e192Initial program 66.9%
associate-/r*67.6%
add-sqr-sqrt67.6%
pow267.6%
associate-/r*66.9%
sqrt-div66.9%
sqrt-pow174.4%
metadata-eval74.4%
sqrt-prod46.5%
add-sqr-sqrt99.7%
Applied egg-rr99.7%
if 4.5e192 < t Initial program 83.7%
associate-/r*83.7%
sqr-neg83.7%
associate-*l*55.6%
sqr-neg55.6%
associate-/r*61.5%
associate-+l+61.5%
unpow261.5%
times-frac39.2%
sqr-neg39.2%
times-frac61.5%
unpow261.5%
Simplified61.5%
Taylor expanded in k around 0 55.6%
expm1-log1p-u55.6%
expm1-udef55.6%
Applied egg-rr89.6%
expm1-def89.6%
expm1-log1p89.6%
Simplified89.6%
add-exp-log84.1%
Applied egg-rr84.1%
rem-exp-log89.6%
add-cube-cbrt89.6%
unpow289.6%
add-sqr-sqrt34.1%
times-frac34.1%
*-commutative34.1%
sqrt-prod34.1%
sqrt-pow134.1%
metadata-eval34.1%
*-commutative34.1%
sqrt-prod34.1%
sqrt-pow144.1%
metadata-eval44.1%
Applied egg-rr44.1%
associate-*l/44.1%
associate-*r/44.1%
unpow244.1%
rem-3cbrt-lft44.4%
Simplified44.4%
Final simplification75.3%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (* (pow t_m 0.75) (sqrt k))) (t_3 (pow (/ k t_m) 2.0)))
(*
t_s
(if (<= t_m 2.35e-54)
(/ 2.0 (* (/ t_m (cos k)) (pow (* k (/ (sin k) l)) 2.0)))
(if (<= t_m 9e+89)
(/
2.0
(* (+ 2.0 t_3) (* (/ (tan k) l) (/ (pow t_m 3.0) (/ l (sin k))))))
(if (<= t_m 1.08e+154)
(/
2.0
(*
(+ 1.0 (+ t_3 1.0))
(* (tan k) (* (sin k) (* (/ (pow t_m 2.0) l) (/ t_m l))))))
(pow (/ (/ l t_2) t_2) 2.0)))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow(t_m, 0.75) * sqrt(k);
double t_3 = pow((k / t_m), 2.0);
double tmp;
if (t_m <= 2.35e-54) {
tmp = 2.0 / ((t_m / cos(k)) * pow((k * (sin(k) / l)), 2.0));
} else if (t_m <= 9e+89) {
tmp = 2.0 / ((2.0 + t_3) * ((tan(k) / l) * (pow(t_m, 3.0) / (l / sin(k)))));
} else if (t_m <= 1.08e+154) {
tmp = 2.0 / ((1.0 + (t_3 + 1.0)) * (tan(k) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / l)))));
} else {
tmp = pow(((l / t_2) / t_2), 2.0);
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_2 = (t_m ** 0.75d0) * sqrt(k)
t_3 = (k / t_m) ** 2.0d0
if (t_m <= 2.35d-54) then
tmp = 2.0d0 / ((t_m / cos(k)) * ((k * (sin(k) / l)) ** 2.0d0))
else if (t_m <= 9d+89) then
tmp = 2.0d0 / ((2.0d0 + t_3) * ((tan(k) / l) * ((t_m ** 3.0d0) / (l / sin(k)))))
else if (t_m <= 1.08d+154) then
tmp = 2.0d0 / ((1.0d0 + (t_3 + 1.0d0)) * (tan(k) * (sin(k) * (((t_m ** 2.0d0) / l) * (t_m / l)))))
else
tmp = ((l / t_2) / t_2) ** 2.0d0
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.pow(t_m, 0.75) * Math.sqrt(k);
double t_3 = Math.pow((k / t_m), 2.0);
double tmp;
if (t_m <= 2.35e-54) {
tmp = 2.0 / ((t_m / Math.cos(k)) * Math.pow((k * (Math.sin(k) / l)), 2.0));
} else if (t_m <= 9e+89) {
tmp = 2.0 / ((2.0 + t_3) * ((Math.tan(k) / l) * (Math.pow(t_m, 3.0) / (l / Math.sin(k)))));
} else if (t_m <= 1.08e+154) {
tmp = 2.0 / ((1.0 + (t_3 + 1.0)) * (Math.tan(k) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / l)))));
} else {
tmp = Math.pow(((l / t_2) / t_2), 2.0);
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = math.pow(t_m, 0.75) * math.sqrt(k) t_3 = math.pow((k / t_m), 2.0) tmp = 0 if t_m <= 2.35e-54: tmp = 2.0 / ((t_m / math.cos(k)) * math.pow((k * (math.sin(k) / l)), 2.0)) elif t_m <= 9e+89: tmp = 2.0 / ((2.0 + t_3) * ((math.tan(k) / l) * (math.pow(t_m, 3.0) / (l / math.sin(k))))) elif t_m <= 1.08e+154: tmp = 2.0 / ((1.0 + (t_3 + 1.0)) * (math.tan(k) * (math.sin(k) * ((math.pow(t_m, 2.0) / l) * (t_m / l))))) else: tmp = math.pow(((l / t_2) / t_2), 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((t_m ^ 0.75) * sqrt(k)) t_3 = Float64(k / t_m) ^ 2.0 tmp = 0.0 if (t_m <= 2.35e-54) tmp = Float64(2.0 / Float64(Float64(t_m / cos(k)) * (Float64(k * Float64(sin(k) / l)) ^ 2.0))); elseif (t_m <= 9e+89) tmp = Float64(2.0 / Float64(Float64(2.0 + t_3) * Float64(Float64(tan(k) / l) * Float64((t_m ^ 3.0) / Float64(l / sin(k)))))); elseif (t_m <= 1.08e+154) tmp = Float64(2.0 / Float64(Float64(1.0 + Float64(t_3 + 1.0)) * Float64(tan(k) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l)))))); else tmp = Float64(Float64(l / t_2) / t_2) ^ 2.0; end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = (t_m ^ 0.75) * sqrt(k); t_3 = (k / t_m) ^ 2.0; tmp = 0.0; if (t_m <= 2.35e-54) tmp = 2.0 / ((t_m / cos(k)) * ((k * (sin(k) / l)) ^ 2.0)); elseif (t_m <= 9e+89) tmp = 2.0 / ((2.0 + t_3) * ((tan(k) / l) * ((t_m ^ 3.0) / (l / sin(k))))); elseif (t_m <= 1.08e+154) tmp = 2.0 / ((1.0 + (t_3 + 1.0)) * (tan(k) * (sin(k) * (((t_m ^ 2.0) / l) * (t_m / l))))); else tmp = ((l / t_2) / t_2) ^ 2.0; end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[Power[t$95$m, 0.75], $MachinePrecision] * N[Sqrt[k], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.35e-54], N[(2.0 / N[(N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision] * N[Power[N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 9e+89], N[(2.0 / N[(N[(2.0 + t$95$3), $MachinePrecision] * N[(N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.08e+154], N[(2.0 / N[(N[(1.0 + N[(t$95$3 + 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $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], N[Power[N[(N[(l / t$95$2), $MachinePrecision] / t$95$2), $MachinePrecision], 2.0], $MachinePrecision]]]]), $MachinePrecision]]]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {t\_m}^{0.75} \cdot \sqrt{k}\\
t_3 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.35 \cdot 10^{-54}:\\
\;\;\;\;\frac{2}{\frac{t\_m}{\cos k} \cdot {\left(k \cdot \frac{\sin k}{\ell}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 9 \cdot 10^{+89}:\\
\;\;\;\;\frac{2}{\left(2 + t\_3\right) \cdot \left(\frac{\tan k}{\ell} \cdot \frac{{t\_m}^{3}}{\frac{\ell}{\sin k}}\right)}\\
\mathbf{elif}\;t\_m \leq 1.08 \cdot 10^{+154}:\\
\;\;\;\;\frac{2}{\left(1 + \left(t\_3 + 1\right)\right) \cdot \left(\tan k \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{\frac{\ell}{t\_2}}{t\_2}\right)}^{2}\\
\end{array}
\end{array}
\end{array}
if t < 2.35e-54Initial program 47.0%
associate-/r*53.2%
+-commutative53.2%
associate-+r+53.2%
metadata-eval53.2%
associate-*r*53.2%
add-sqr-sqrt18.6%
pow218.6%
Applied egg-rr13.2%
*-commutative13.2%
Simplified13.2%
Taylor expanded in k around inf 36.8%
expm1-log1p-u36.4%
expm1-udef30.4%
*-commutative30.4%
unpow-prod-down28.6%
pow228.6%
add-sqr-sqrt28.7%
associate-/l*28.7%
Applied egg-rr28.7%
expm1-def58.8%
expm1-log1p73.1%
associate-/r/73.1%
associate-*l/73.1%
associate-*r/73.1%
Simplified73.1%
if 2.35e-54 < t < 9e89Initial program 81.1%
*-commutative81.1%
associate-/r*85.5%
associate-*l/88.4%
associate-*r/91.3%
Applied egg-rr91.3%
distribute-lft-in91.3%
associate-/l*88.5%
associate-*l/88.5%
+-commutative88.5%
associate-/l*88.4%
associate-*l/88.4%
Applied egg-rr88.4%
*-commutative88.4%
*-rgt-identity88.4%
distribute-lft1-in88.4%
associate-+l+88.4%
metadata-eval88.4%
+-commutative88.4%
associate-/r/93.9%
associate-/l*94.0%
Simplified94.0%
if 9e89 < t < 1.08e154Initial program 69.6%
unpow369.6%
times-frac99.6%
pow299.6%
Applied egg-rr99.6%
if 1.08e154 < t Initial program 80.4%
associate-/r*80.4%
sqr-neg80.4%
associate-*l*55.0%
sqr-neg55.0%
associate-/r*60.5%
associate-+l+60.5%
unpow260.5%
times-frac35.5%
sqr-neg35.5%
times-frac60.5%
unpow260.5%
Simplified60.5%
Taylor expanded in k around 0 55.0%
expm1-log1p-u55.0%
expm1-udef55.0%
Applied egg-rr90.4%
expm1-def90.4%
expm1-log1p90.6%
Simplified90.6%
add-exp-log80.7%
Applied egg-rr80.7%
rem-exp-log90.6%
add-cube-cbrt90.5%
unpow290.5%
add-sqr-sqrt35.5%
times-frac35.5%
*-commutative35.5%
sqrt-prod35.5%
sqrt-pow135.5%
metadata-eval35.5%
*-commutative35.5%
sqrt-prod35.5%
sqrt-pow144.5%
metadata-eval44.5%
Applied egg-rr44.5%
associate-*l/44.5%
associate-*r/44.5%
unpow244.5%
rem-3cbrt-lft44.8%
Simplified44.8%
Final simplification74.9%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (/ k t_m) 2.0)))
(*
t_s
(if (<= t_m 1.86e-54)
(/ 2.0 (* (/ t_m (cos k)) (pow (* k (/ (sin k) l)) 2.0)))
(if (<= t_m 9.8e+89)
(/
2.0
(* (+ 2.0 t_2) (* (/ (tan k) l) (/ (pow t_m 3.0) (/ l (sin k))))))
(if (<= t_m 1.15e+154)
(/
2.0
(*
(+ 1.0 (+ t_2 1.0))
(* (tan k) (* (sin k) (* (/ (pow t_m 2.0) l) (/ t_m l))))))
(pow (/ (pow (cbrt l) 2.0) (* t_m (pow (cbrt k) 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 <= 1.86e-54) {
tmp = 2.0 / ((t_m / cos(k)) * pow((k * (sin(k) / l)), 2.0));
} else if (t_m <= 9.8e+89) {
tmp = 2.0 / ((2.0 + t_2) * ((tan(k) / l) * (pow(t_m, 3.0) / (l / sin(k)))));
} else if (t_m <= 1.15e+154) {
tmp = 2.0 / ((1.0 + (t_2 + 1.0)) * (tan(k) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / l)))));
} else {
tmp = pow((pow(cbrt(l), 2.0) / (t_m * pow(cbrt(k), 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 <= 1.86e-54) {
tmp = 2.0 / ((t_m / Math.cos(k)) * Math.pow((k * (Math.sin(k) / l)), 2.0));
} else if (t_m <= 9.8e+89) {
tmp = 2.0 / ((2.0 + t_2) * ((Math.tan(k) / l) * (Math.pow(t_m, 3.0) / (l / Math.sin(k)))));
} else if (t_m <= 1.15e+154) {
tmp = 2.0 / ((1.0 + (t_2 + 1.0)) * (Math.tan(k) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / l)))));
} else {
tmp = Math.pow((Math.pow(Math.cbrt(l), 2.0) / (t_m * Math.pow(Math.cbrt(k), 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 <= 1.86e-54) tmp = Float64(2.0 / Float64(Float64(t_m / cos(k)) * (Float64(k * Float64(sin(k) / l)) ^ 2.0))); elseif (t_m <= 9.8e+89) tmp = Float64(2.0 / Float64(Float64(2.0 + t_2) * Float64(Float64(tan(k) / l) * Float64((t_m ^ 3.0) / Float64(l / sin(k)))))); elseif (t_m <= 1.15e+154) tmp = Float64(2.0 / Float64(Float64(1.0 + Float64(t_2 + 1.0)) * Float64(tan(k) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l)))))); else tmp = Float64((cbrt(l) ^ 2.0) / Float64(t_m * (cbrt(k) ^ 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, 1.86e-54], N[(2.0 / N[(N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision] * N[Power[N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 9.8e+89], N[(2.0 / N[(N[(2.0 + t$95$2), $MachinePrecision] * N[(N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.15e+154], N[(2.0 / N[(N[(1.0 + N[(t$95$2 + 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[(t$95$m * N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.86 \cdot 10^{-54}:\\
\;\;\;\;\frac{2}{\frac{t\_m}{\cos k} \cdot {\left(k \cdot \frac{\sin k}{\ell}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 9.8 \cdot 10^{+89}:\\
\;\;\;\;\frac{2}{\left(2 + t\_2\right) \cdot \left(\frac{\tan k}{\ell} \cdot \frac{{t\_m}^{3}}{\frac{\ell}{\sin k}}\right)}\\
\mathbf{elif}\;t\_m \leq 1.15 \cdot 10^{+154}:\\
\;\;\;\;\frac{2}{\left(1 + \left(t\_2 + 1\right)\right) \cdot \left(\tan k \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t\_m \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{3}\\
\end{array}
\end{array}
\end{array}
if t < 1.8599999999999999e-54Initial program 47.0%
associate-/r*53.2%
+-commutative53.2%
associate-+r+53.2%
metadata-eval53.2%
associate-*r*53.2%
add-sqr-sqrt18.6%
pow218.6%
Applied egg-rr13.2%
*-commutative13.2%
Simplified13.2%
Taylor expanded in k around inf 36.8%
expm1-log1p-u36.4%
expm1-udef30.4%
*-commutative30.4%
unpow-prod-down28.6%
pow228.6%
add-sqr-sqrt28.7%
associate-/l*28.7%
Applied egg-rr28.7%
expm1-def58.8%
expm1-log1p73.1%
associate-/r/73.1%
associate-*l/73.1%
associate-*r/73.1%
Simplified73.1%
if 1.8599999999999999e-54 < t < 9.79999999999999992e89Initial program 81.1%
*-commutative81.1%
associate-/r*85.5%
associate-*l/88.4%
associate-*r/91.3%
Applied egg-rr91.3%
distribute-lft-in91.3%
associate-/l*88.5%
associate-*l/88.5%
+-commutative88.5%
associate-/l*88.4%
associate-*l/88.4%
Applied egg-rr88.4%
*-commutative88.4%
*-rgt-identity88.4%
distribute-lft1-in88.4%
associate-+l+88.4%
metadata-eval88.4%
+-commutative88.4%
associate-/r/93.9%
associate-/l*94.0%
Simplified94.0%
if 9.79999999999999992e89 < t < 1.15e154Initial program 69.6%
unpow369.6%
times-frac99.6%
pow299.6%
Applied egg-rr99.6%
if 1.15e154 < t Initial program 80.4%
associate-/r*80.4%
sqr-neg80.4%
associate-*l*55.0%
sqr-neg55.0%
associate-/r*60.5%
associate-+l+60.5%
unpow260.5%
times-frac35.5%
sqr-neg35.5%
times-frac60.5%
unpow260.5%
Simplified60.5%
Taylor expanded in k around 0 55.0%
add-cube-cbrt55.0%
pow355.0%
*-commutative55.0%
cbrt-prod55.0%
rem-cbrt-cube55.4%
unpow255.4%
cbrt-prod80.4%
pow280.4%
Applied egg-rr80.4%
add-cube-cbrt80.4%
pow280.4%
cbrt-div80.4%
unpow280.4%
cbrt-prod80.4%
unpow280.4%
unpow380.4%
add-cbrt-cube80.4%
cbrt-div80.4%
unpow280.4%
cbrt-prod85.8%
unpow285.8%
unpow385.8%
Applied egg-rr99.4%
pow-plus99.4%
metadata-eval99.4%
Simplified99.4%
Final simplification79.2%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 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.35e-54)
(/ 2.0 (* (/ t_m (cos k)) (pow (* k (/ (sin k) l)) 2.0)))
(if (<= t_m 9.8e+89)
(/
2.0
(* (+ 2.0 t_2) (* (/ (tan k) l) (/ (pow t_m 3.0) (/ l (sin k))))))
(if (<= t_m 1.12e+154)
(/
2.0
(*
(+ 1.0 (+ t_2 1.0))
(* (tan k) (* (sin k) (* (/ (pow t_m 2.0) l) (/ t_m l))))))
(pow (* l (pow (* (pow t_m 0.75) (sqrt k)) -2.0)) 2.0)))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow((k / t_m), 2.0);
double tmp;
if (t_m <= 2.35e-54) {
tmp = 2.0 / ((t_m / cos(k)) * pow((k * (sin(k) / l)), 2.0));
} else if (t_m <= 9.8e+89) {
tmp = 2.0 / ((2.0 + t_2) * ((tan(k) / l) * (pow(t_m, 3.0) / (l / sin(k)))));
} else if (t_m <= 1.12e+154) {
tmp = 2.0 / ((1.0 + (t_2 + 1.0)) * (tan(k) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / l)))));
} else {
tmp = pow((l * pow((pow(t_m, 0.75) * sqrt(k)), -2.0)), 2.0);
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: tmp
t_2 = (k / t_m) ** 2.0d0
if (t_m <= 2.35d-54) then
tmp = 2.0d0 / ((t_m / cos(k)) * ((k * (sin(k) / l)) ** 2.0d0))
else if (t_m <= 9.8d+89) then
tmp = 2.0d0 / ((2.0d0 + t_2) * ((tan(k) / l) * ((t_m ** 3.0d0) / (l / sin(k)))))
else if (t_m <= 1.12d+154) then
tmp = 2.0d0 / ((1.0d0 + (t_2 + 1.0d0)) * (tan(k) * (sin(k) * (((t_m ** 2.0d0) / l) * (t_m / l)))))
else
tmp = (l * (((t_m ** 0.75d0) * sqrt(k)) ** (-2.0d0))) ** 2.0d0
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.pow((k / t_m), 2.0);
double tmp;
if (t_m <= 2.35e-54) {
tmp = 2.0 / ((t_m / Math.cos(k)) * Math.pow((k * (Math.sin(k) / l)), 2.0));
} else if (t_m <= 9.8e+89) {
tmp = 2.0 / ((2.0 + t_2) * ((Math.tan(k) / l) * (Math.pow(t_m, 3.0) / (l / Math.sin(k)))));
} else if (t_m <= 1.12e+154) {
tmp = 2.0 / ((1.0 + (t_2 + 1.0)) * (Math.tan(k) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / l)))));
} else {
tmp = Math.pow((l * Math.pow((Math.pow(t_m, 0.75) * Math.sqrt(k)), -2.0)), 2.0);
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = math.pow((k / t_m), 2.0) tmp = 0 if t_m <= 2.35e-54: tmp = 2.0 / ((t_m / math.cos(k)) * math.pow((k * (math.sin(k) / l)), 2.0)) elif t_m <= 9.8e+89: tmp = 2.0 / ((2.0 + t_2) * ((math.tan(k) / l) * (math.pow(t_m, 3.0) / (l / math.sin(k))))) elif t_m <= 1.12e+154: tmp = 2.0 / ((1.0 + (t_2 + 1.0)) * (math.tan(k) * (math.sin(k) * ((math.pow(t_m, 2.0) / l) * (t_m / l))))) else: tmp = math.pow((l * math.pow((math.pow(t_m, 0.75) * math.sqrt(k)), -2.0)), 2.0) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(k / t_m) ^ 2.0 tmp = 0.0 if (t_m <= 2.35e-54) tmp = Float64(2.0 / Float64(Float64(t_m / cos(k)) * (Float64(k * Float64(sin(k) / l)) ^ 2.0))); elseif (t_m <= 9.8e+89) tmp = Float64(2.0 / Float64(Float64(2.0 + t_2) * Float64(Float64(tan(k) / l) * Float64((t_m ^ 3.0) / Float64(l / sin(k)))))); elseif (t_m <= 1.12e+154) tmp = Float64(2.0 / Float64(Float64(1.0 + Float64(t_2 + 1.0)) * Float64(tan(k) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l)))))); else tmp = Float64(l * (Float64((t_m ^ 0.75) * sqrt(k)) ^ -2.0)) ^ 2.0; end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = (k / t_m) ^ 2.0; tmp = 0.0; if (t_m <= 2.35e-54) tmp = 2.0 / ((t_m / cos(k)) * ((k * (sin(k) / l)) ^ 2.0)); elseif (t_m <= 9.8e+89) tmp = 2.0 / ((2.0 + t_2) * ((tan(k) / l) * ((t_m ^ 3.0) / (l / sin(k))))); elseif (t_m <= 1.12e+154) tmp = 2.0 / ((1.0 + (t_2 + 1.0)) * (tan(k) * (sin(k) * (((t_m ^ 2.0) / l) * (t_m / l))))); else tmp = (l * (((t_m ^ 0.75) * sqrt(k)) ^ -2.0)) ^ 2.0; end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.35e-54], N[(2.0 / N[(N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision] * N[Power[N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 9.8e+89], N[(2.0 / N[(N[(2.0 + t$95$2), $MachinePrecision] * N[(N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.12e+154], N[(2.0 / N[(N[(1.0 + N[(t$95$2 + 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(l * N[Power[N[(N[Power[t$95$m, 0.75], $MachinePrecision] * N[Sqrt[k], $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 2.0], $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.35 \cdot 10^{-54}:\\
\;\;\;\;\frac{2}{\frac{t\_m}{\cos k} \cdot {\left(k \cdot \frac{\sin k}{\ell}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 9.8 \cdot 10^{+89}:\\
\;\;\;\;\frac{2}{\left(2 + t\_2\right) \cdot \left(\frac{\tan k}{\ell} \cdot \frac{{t\_m}^{3}}{\frac{\ell}{\sin k}}\right)}\\
\mathbf{elif}\;t\_m \leq 1.12 \cdot 10^{+154}:\\
\;\;\;\;\frac{2}{\left(1 + \left(t\_2 + 1\right)\right) \cdot \left(\tan k \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\ell \cdot {\left({t\_m}^{0.75} \cdot \sqrt{k}\right)}^{-2}\right)}^{2}\\
\end{array}
\end{array}
\end{array}
if t < 2.35e-54Initial program 47.0%
associate-/r*53.2%
+-commutative53.2%
associate-+r+53.2%
metadata-eval53.2%
associate-*r*53.2%
add-sqr-sqrt18.6%
pow218.6%
Applied egg-rr13.2%
*-commutative13.2%
Simplified13.2%
Taylor expanded in k around inf 36.8%
expm1-log1p-u36.4%
expm1-udef30.4%
*-commutative30.4%
unpow-prod-down28.6%
pow228.6%
add-sqr-sqrt28.7%
associate-/l*28.7%
Applied egg-rr28.7%
expm1-def58.8%
expm1-log1p73.1%
associate-/r/73.1%
associate-*l/73.1%
associate-*r/73.1%
Simplified73.1%
if 2.35e-54 < t < 9.79999999999999992e89Initial program 81.1%
*-commutative81.1%
associate-/r*85.5%
associate-*l/88.4%
associate-*r/91.3%
Applied egg-rr91.3%
distribute-lft-in91.3%
associate-/l*88.5%
associate-*l/88.5%
+-commutative88.5%
associate-/l*88.4%
associate-*l/88.4%
Applied egg-rr88.4%
*-commutative88.4%
*-rgt-identity88.4%
distribute-lft1-in88.4%
associate-+l+88.4%
metadata-eval88.4%
+-commutative88.4%
associate-/r/93.9%
associate-/l*94.0%
Simplified94.0%
if 9.79999999999999992e89 < t < 1.11999999999999994e154Initial program 69.6%
unpow369.6%
times-frac99.6%
pow299.6%
Applied egg-rr99.6%
if 1.11999999999999994e154 < t Initial program 80.4%
associate-/r*80.4%
sqr-neg80.4%
associate-*l*55.0%
sqr-neg55.0%
associate-/r*60.5%
associate-+l+60.5%
unpow260.5%
times-frac35.5%
sqr-neg35.5%
times-frac60.5%
unpow260.5%
Simplified60.5%
Taylor expanded in k around 0 55.0%
expm1-log1p-u55.0%
expm1-udef55.0%
Applied egg-rr90.4%
expm1-def90.4%
expm1-log1p90.6%
Simplified90.6%
div-inv90.6%
Applied egg-rr90.6%
inv-pow90.6%
add-sqr-sqrt35.6%
unpow-prod-down35.5%
*-commutative35.5%
sqrt-prod35.5%
sqrt-pow135.5%
metadata-eval35.5%
*-commutative35.5%
sqrt-prod35.5%
sqrt-pow140.0%
metadata-eval40.0%
Applied egg-rr40.0%
pow-sqr40.2%
metadata-eval40.2%
Simplified40.2%
Final simplification74.5%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 3.4e-54)
(/ 2.0 (* (/ t_m (cos k)) (pow (* k (/ (sin k) l)) 2.0)))
(if (<= t_m 5.5e+102)
(/
2.0
(*
(+ 2.0 (pow (/ k t_m) 2.0))
(* (/ (tan k) l) (/ (pow t_m 3.0) (/ l (sin k))))))
(pow (* l (pow (* (pow t_m 0.75) (sqrt k)) -2.0)) 2.0)))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3.4e-54) {
tmp = 2.0 / ((t_m / cos(k)) * pow((k * (sin(k) / l)), 2.0));
} else if (t_m <= 5.5e+102) {
tmp = 2.0 / ((2.0 + pow((k / t_m), 2.0)) * ((tan(k) / l) * (pow(t_m, 3.0) / (l / sin(k)))));
} else {
tmp = pow((l * pow((pow(t_m, 0.75) * sqrt(k)), -2.0)), 2.0);
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 3.4d-54) then
tmp = 2.0d0 / ((t_m / cos(k)) * ((k * (sin(k) / l)) ** 2.0d0))
else if (t_m <= 5.5d+102) then
tmp = 2.0d0 / ((2.0d0 + ((k / t_m) ** 2.0d0)) * ((tan(k) / l) * ((t_m ** 3.0d0) / (l / sin(k)))))
else
tmp = (l * (((t_m ** 0.75d0) * sqrt(k)) ** (-2.0d0))) ** 2.0d0
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3.4e-54) {
tmp = 2.0 / ((t_m / Math.cos(k)) * Math.pow((k * (Math.sin(k) / l)), 2.0));
} else if (t_m <= 5.5e+102) {
tmp = 2.0 / ((2.0 + Math.pow((k / t_m), 2.0)) * ((Math.tan(k) / l) * (Math.pow(t_m, 3.0) / (l / Math.sin(k)))));
} else {
tmp = Math.pow((l * Math.pow((Math.pow(t_m, 0.75) * Math.sqrt(k)), -2.0)), 2.0);
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 3.4e-54: tmp = 2.0 / ((t_m / math.cos(k)) * math.pow((k * (math.sin(k) / l)), 2.0)) elif t_m <= 5.5e+102: tmp = 2.0 / ((2.0 + math.pow((k / t_m), 2.0)) * ((math.tan(k) / l) * (math.pow(t_m, 3.0) / (l / math.sin(k))))) else: tmp = math.pow((l * math.pow((math.pow(t_m, 0.75) * math.sqrt(k)), -2.0)), 2.0) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 3.4e-54) tmp = Float64(2.0 / Float64(Float64(t_m / cos(k)) * (Float64(k * Float64(sin(k) / l)) ^ 2.0))); elseif (t_m <= 5.5e+102) tmp = Float64(2.0 / Float64(Float64(2.0 + (Float64(k / t_m) ^ 2.0)) * Float64(Float64(tan(k) / l) * Float64((t_m ^ 3.0) / Float64(l / sin(k)))))); else tmp = Float64(l * (Float64((t_m ^ 0.75) * sqrt(k)) ^ -2.0)) ^ 2.0; end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 3.4e-54) tmp = 2.0 / ((t_m / cos(k)) * ((k * (sin(k) / l)) ^ 2.0)); elseif (t_m <= 5.5e+102) tmp = 2.0 / ((2.0 + ((k / t_m) ^ 2.0)) * ((tan(k) / l) * ((t_m ^ 3.0) / (l / sin(k))))); else tmp = (l * (((t_m ^ 0.75) * sqrt(k)) ^ -2.0)) ^ 2.0; end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3.4e-54], N[(2.0 / N[(N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision] * N[Power[N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.5e+102], N[(2.0 / N[(N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(l * N[Power[N[(N[Power[t$95$m, 0.75], $MachinePrecision] * N[Sqrt[k], $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.4 \cdot 10^{-54}:\\
\;\;\;\;\frac{2}{\frac{t\_m}{\cos k} \cdot {\left(k \cdot \frac{\sin k}{\ell}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 5.5 \cdot 10^{+102}:\\
\;\;\;\;\frac{2}{\left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right) \cdot \left(\frac{\tan k}{\ell} \cdot \frac{{t\_m}^{3}}{\frac{\ell}{\sin k}}\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\ell \cdot {\left({t\_m}^{0.75} \cdot \sqrt{k}\right)}^{-2}\right)}^{2}\\
\end{array}
\end{array}
if t < 3.39999999999999987e-54Initial program 47.0%
associate-/r*53.2%
+-commutative53.2%
associate-+r+53.2%
metadata-eval53.2%
associate-*r*53.2%
add-sqr-sqrt18.6%
pow218.6%
Applied egg-rr13.2%
*-commutative13.2%
Simplified13.2%
Taylor expanded in k around inf 36.8%
expm1-log1p-u36.4%
expm1-udef30.4%
*-commutative30.4%
unpow-prod-down28.6%
pow228.6%
add-sqr-sqrt28.7%
associate-/l*28.7%
Applied egg-rr28.7%
expm1-def58.8%
expm1-log1p73.1%
associate-/r/73.1%
associate-*l/73.1%
associate-*r/73.1%
Simplified73.1%
if 3.39999999999999987e-54 < t < 5.49999999999999981e102Initial program 82.7%
*-commutative82.7%
associate-/r*86.7%
associate-*l/89.4%
associate-*r/92.0%
Applied egg-rr92.0%
distribute-lft-in92.0%
associate-/l*89.4%
associate-*l/89.4%
+-commutative89.4%
associate-/l*89.4%
associate-*l/89.4%
Applied egg-rr89.4%
*-commutative89.4%
*-rgt-identity89.4%
distribute-lft1-in89.4%
associate-+l+89.4%
metadata-eval89.4%
+-commutative89.4%
associate-/r/94.4%
associate-/l*94.5%
Simplified94.5%
if 5.49999999999999981e102 < t Initial program 73.7%
associate-/r*73.7%
sqr-neg73.7%
associate-*l*56.8%
sqr-neg56.8%
associate-/r*60.7%
associate-+l+60.7%
unpow260.7%
times-frac44.0%
sqr-neg44.0%
times-frac60.7%
unpow260.7%
Simplified60.7%
Taylor expanded in k around 0 56.8%
expm1-log1p-u56.8%
expm1-udef56.8%
Applied egg-rr83.5%
expm1-def83.5%
expm1-log1p84.0%
Simplified84.0%
div-inv84.0%
Applied egg-rr84.0%
inv-pow84.0%
add-sqr-sqrt30.6%
unpow-prod-down30.5%
*-commutative30.5%
sqrt-prod30.5%
sqrt-pow130.5%
metadata-eval30.5%
*-commutative30.5%
sqrt-prod30.5%
sqrt-pow133.5%
metadata-eval33.5%
Applied egg-rr33.5%
pow-sqr33.7%
metadata-eval33.7%
Simplified33.7%
Final simplification71.5%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 9.5e-6)
(pow (* l (pow (* (pow t_m 0.75) (sqrt k)) -2.0)) 2.0)
(/ 2.0 (* (/ t_m (cos k)) (pow (* k (/ (sin k) 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 <= 9.5e-6) {
tmp = pow((l * pow((pow(t_m, 0.75) * sqrt(k)), -2.0)), 2.0);
} else {
tmp = 2.0 / ((t_m / cos(k)) * pow((k * (sin(k) / 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 <= 9.5d-6) then
tmp = (l * (((t_m ** 0.75d0) * sqrt(k)) ** (-2.0d0))) ** 2.0d0
else
tmp = 2.0d0 / ((t_m / cos(k)) * ((k * (sin(k) / 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 <= 9.5e-6) {
tmp = Math.pow((l * Math.pow((Math.pow(t_m, 0.75) * Math.sqrt(k)), -2.0)), 2.0);
} else {
tmp = 2.0 / ((t_m / Math.cos(k)) * Math.pow((k * (Math.sin(k) / 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 <= 9.5e-6: tmp = math.pow((l * math.pow((math.pow(t_m, 0.75) * math.sqrt(k)), -2.0)), 2.0) else: tmp = 2.0 / ((t_m / math.cos(k)) * math.pow((k * (math.sin(k) / 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 <= 9.5e-6) tmp = Float64(l * (Float64((t_m ^ 0.75) * sqrt(k)) ^ -2.0)) ^ 2.0; else tmp = Float64(2.0 / Float64(Float64(t_m / cos(k)) * (Float64(k * Float64(sin(k) / 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 <= 9.5e-6) tmp = (l * (((t_m ^ 0.75) * sqrt(k)) ^ -2.0)) ^ 2.0; else tmp = 2.0 / ((t_m / cos(k)) * ((k * (sin(k) / 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, 9.5e-6], N[Power[N[(l * N[Power[N[(N[Power[t$95$m, 0.75], $MachinePrecision] * N[Sqrt[k], $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(2.0 / N[(N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision] * N[Power[N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 9.5 \cdot 10^{-6}:\\
\;\;\;\;{\left(\ell \cdot {\left({t\_m}^{0.75} \cdot \sqrt{k}\right)}^{-2}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{t\_m}{\cos k} \cdot {\left(k \cdot \frac{\sin k}{\ell}\right)}^{2}}\\
\end{array}
\end{array}
if k < 9.5000000000000005e-6Initial program 59.6%
associate-/r*59.6%
sqr-neg59.6%
associate-*l*54.3%
sqr-neg54.3%
associate-/r*59.4%
associate-+l+59.4%
unpow259.4%
times-frac44.7%
sqr-neg44.7%
times-frac59.4%
unpow259.4%
Simplified59.4%
Taylor expanded in k around 0 55.6%
expm1-log1p-u41.9%
expm1-udef39.7%
Applied egg-rr35.0%
expm1-def36.7%
expm1-log1p36.9%
Simplified36.9%
div-inv36.9%
Applied egg-rr36.9%
inv-pow36.9%
add-sqr-sqrt19.0%
unpow-prod-down19.0%
*-commutative19.0%
sqrt-prod15.2%
sqrt-pow115.2%
metadata-eval15.2%
*-commutative15.2%
sqrt-prod15.2%
sqrt-pow115.7%
metadata-eval15.7%
Applied egg-rr15.7%
pow-sqr15.7%
metadata-eval15.7%
Simplified15.7%
if 9.5000000000000005e-6 < k Initial program 42.0%
associate-/r*49.3%
+-commutative49.3%
associate-+r+49.3%
metadata-eval49.3%
associate-*r*49.4%
add-sqr-sqrt32.3%
pow232.3%
Applied egg-rr23.4%
*-commutative23.4%
Simplified23.4%
Taylor expanded in k around inf 51.0%
expm1-log1p-u50.1%
expm1-udef47.2%
*-commutative47.2%
unpow-prod-down44.8%
pow244.8%
add-sqr-sqrt44.8%
associate-/l*44.8%
Applied egg-rr44.8%
expm1-def58.6%
expm1-log1p81.0%
associate-/r/80.9%
associate-*l/80.8%
associate-*r/80.9%
Simplified80.9%
Final simplification32.3%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1.25e-5)
(pow (* (/ l (pow t_m 1.5)) (/ 1.0 k)) 2.0)
(/ 2.0 (* (/ t_m (cos k)) (pow (* k (/ (sin k) 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 <= 1.25e-5) {
tmp = pow(((l / pow(t_m, 1.5)) * (1.0 / k)), 2.0);
} else {
tmp = 2.0 / ((t_m / cos(k)) * pow((k * (sin(k) / 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 <= 1.25d-5) then
tmp = ((l / (t_m ** 1.5d0)) * (1.0d0 / k)) ** 2.0d0
else
tmp = 2.0d0 / ((t_m / cos(k)) * ((k * (sin(k) / 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 <= 1.25e-5) {
tmp = Math.pow(((l / Math.pow(t_m, 1.5)) * (1.0 / k)), 2.0);
} else {
tmp = 2.0 / ((t_m / Math.cos(k)) * Math.pow((k * (Math.sin(k) / 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 <= 1.25e-5: tmp = math.pow(((l / math.pow(t_m, 1.5)) * (1.0 / k)), 2.0) else: tmp = 2.0 / ((t_m / math.cos(k)) * math.pow((k * (math.sin(k) / 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 <= 1.25e-5) tmp = Float64(Float64(l / (t_m ^ 1.5)) * Float64(1.0 / k)) ^ 2.0; else tmp = Float64(2.0 / Float64(Float64(t_m / cos(k)) * (Float64(k * Float64(sin(k) / 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 <= 1.25e-5) tmp = ((l / (t_m ^ 1.5)) * (1.0 / k)) ^ 2.0; else tmp = 2.0 / ((t_m / cos(k)) * ((k * (sin(k) / 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, 1.25e-5], N[Power[N[(N[(l / N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision] * N[(1.0 / k), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(2.0 / N[(N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision] * N[Power[N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.25 \cdot 10^{-5}:\\
\;\;\;\;{\left(\frac{\ell}{{t\_m}^{1.5}} \cdot \frac{1}{k}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{t\_m}{\cos k} \cdot {\left(k \cdot \frac{\sin k}{\ell}\right)}^{2}}\\
\end{array}
\end{array}
if k < 1.25000000000000006e-5Initial program 59.6%
associate-/r*59.6%
sqr-neg59.6%
associate-*l*54.3%
sqr-neg54.3%
associate-/r*59.4%
associate-+l+59.4%
unpow259.4%
times-frac44.7%
sqr-neg44.7%
times-frac59.4%
unpow259.4%
Simplified59.4%
Taylor expanded in k around 0 55.6%
expm1-log1p-u41.9%
expm1-udef39.7%
Applied egg-rr35.0%
expm1-def36.7%
expm1-log1p36.9%
Simplified36.9%
add-exp-log22.5%
Applied egg-rr22.5%
rem-exp-log36.9%
div-inv36.9%
associate-*r/36.9%
*-commutative36.9%
times-frac37.0%
Applied egg-rr37.0%
if 1.25000000000000006e-5 < k Initial program 42.0%
associate-/r*49.3%
+-commutative49.3%
associate-+r+49.3%
metadata-eval49.3%
associate-*r*49.4%
add-sqr-sqrt32.3%
pow232.3%
Applied egg-rr23.4%
*-commutative23.4%
Simplified23.4%
Taylor expanded in k around inf 51.0%
expm1-log1p-u50.1%
expm1-udef47.2%
*-commutative47.2%
unpow-prod-down44.8%
pow244.8%
add-sqr-sqrt44.8%
associate-/l*44.8%
Applied egg-rr44.8%
expm1-def58.6%
expm1-log1p81.0%
associate-/r/80.9%
associate-*l/80.8%
associate-*r/80.9%
Simplified80.9%
Final simplification48.1%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ (* k (pow t_m 1.5)) l)))
(*
t_s
(if (<= t_m 5.3e-55)
(/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt t_m)) 2.0))
(/ 1.0 (* t_2 t_2))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = (k * pow(t_m, 1.5)) / l;
double tmp;
if (t_m <= 5.3e-55) {
tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt(t_m)), 2.0);
} else {
tmp = 1.0 / (t_2 * t_2);
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: tmp
t_2 = (k * (t_m ** 1.5d0)) / l
if (t_m <= 5.3d-55) then
tmp = 2.0d0 / ((((k * sin(k)) / l) * sqrt(t_m)) ** 2.0d0)
else
tmp = 1.0d0 / (t_2 * t_2)
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = (k * Math.pow(t_m, 1.5)) / l;
double tmp;
if (t_m <= 5.3e-55) {
tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt(t_m)), 2.0);
} else {
tmp = 1.0 / (t_2 * t_2);
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = (k * math.pow(t_m, 1.5)) / l tmp = 0 if t_m <= 5.3e-55: tmp = 2.0 / math.pow((((k * math.sin(k)) / l) * math.sqrt(t_m)), 2.0) else: tmp = 1.0 / (t_2 * t_2) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(Float64(k * (t_m ^ 1.5)) / l) tmp = 0.0 if (t_m <= 5.3e-55) tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(t_m)) ^ 2.0)); else tmp = Float64(1.0 / Float64(t_2 * t_2)); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = (k * (t_m ^ 1.5)) / l; tmp = 0.0; if (t_m <= 5.3e-55) tmp = 2.0 / ((((k * sin(k)) / l) * sqrt(t_m)) ^ 2.0); else tmp = 1.0 / (t_2 * t_2); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[(k * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 5.3e-55], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(t$95$2 * t$95$2), $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{k \cdot {t\_m}^{1.5}}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 5.3 \cdot 10^{-55}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{t\_2 \cdot t\_2}\\
\end{array}
\end{array}
\end{array}
if t < 5.3000000000000003e-55Initial program 47.0%
associate-/r*53.2%
+-commutative53.2%
associate-+r+53.2%
metadata-eval53.2%
associate-*r*53.2%
add-sqr-sqrt18.6%
pow218.6%
Applied egg-rr13.2%
*-commutative13.2%
Simplified13.2%
Taylor expanded in k around inf 36.8%
Taylor expanded in k around 0 20.7%
if 5.3000000000000003e-55 < t Initial program 78.6%
associate-/r*78.6%
sqr-neg78.6%
associate-*l*69.5%
sqr-neg69.5%
associate-/r*73.5%
associate-+l+73.5%
unpow273.5%
times-frac65.9%
sqr-neg65.9%
times-frac73.5%
unpow273.5%
Simplified73.5%
Taylor expanded in k around 0 66.3%
expm1-log1p-u66.0%
expm1-udef63.2%
Applied egg-rr76.9%
expm1-def83.4%
expm1-log1p84.0%
Simplified84.0%
div-inv84.0%
Applied egg-rr84.0%
div-inv84.0%
pow284.0%
clear-num84.1%
clear-num84.0%
frac-times84.6%
metadata-eval84.6%
Applied egg-rr84.6%
Final simplification37.2%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ (* k (pow t_m 1.5)) l)))
(*
t_s
(if (<= t_m 1.9e-56)
(/ 2.0 (pow (* (sqrt t_m) (/ (pow k 2.0) l)) 2.0))
(/ 1.0 (* t_2 t_2))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = (k * pow(t_m, 1.5)) / l;
double tmp;
if (t_m <= 1.9e-56) {
tmp = 2.0 / pow((sqrt(t_m) * (pow(k, 2.0) / l)), 2.0);
} else {
tmp = 1.0 / (t_2 * t_2);
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: tmp
t_2 = (k * (t_m ** 1.5d0)) / l
if (t_m <= 1.9d-56) then
tmp = 2.0d0 / ((sqrt(t_m) * ((k ** 2.0d0) / l)) ** 2.0d0)
else
tmp = 1.0d0 / (t_2 * t_2)
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = (k * Math.pow(t_m, 1.5)) / l;
double tmp;
if (t_m <= 1.9e-56) {
tmp = 2.0 / Math.pow((Math.sqrt(t_m) * (Math.pow(k, 2.0) / l)), 2.0);
} else {
tmp = 1.0 / (t_2 * t_2);
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = (k * math.pow(t_m, 1.5)) / l tmp = 0 if t_m <= 1.9e-56: tmp = 2.0 / math.pow((math.sqrt(t_m) * (math.pow(k, 2.0) / l)), 2.0) else: tmp = 1.0 / (t_2 * t_2) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(Float64(k * (t_m ^ 1.5)) / l) tmp = 0.0 if (t_m <= 1.9e-56) tmp = Float64(2.0 / (Float64(sqrt(t_m) * Float64((k ^ 2.0) / l)) ^ 2.0)); else tmp = Float64(1.0 / Float64(t_2 * t_2)); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = (k * (t_m ^ 1.5)) / l; tmp = 0.0; if (t_m <= 1.9e-56) tmp = 2.0 / ((sqrt(t_m) * ((k ^ 2.0) / l)) ^ 2.0); else tmp = 1.0 / (t_2 * t_2); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[(k * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.9e-56], N[(2.0 / N[Power[N[(N[Sqrt[t$95$m], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(t$95$2 * t$95$2), $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{k \cdot {t\_m}^{1.5}}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.9 \cdot 10^{-56}:\\
\;\;\;\;\frac{2}{{\left(\sqrt{t\_m} \cdot \frac{{k}^{2}}{\ell}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{t\_2 \cdot t\_2}\\
\end{array}
\end{array}
\end{array}
if t < 1.9000000000000001e-56Initial program 46.1%
associate-/r*52.5%
+-commutative52.5%
associate-+r+52.5%
metadata-eval52.5%
associate-*r*52.5%
add-sqr-sqrt18.4%
pow218.4%
Applied egg-rr12.9%
*-commutative12.9%
Simplified12.9%
Taylor expanded in k around inf 36.8%
Taylor expanded in k around 0 17.3%
if 1.9000000000000001e-56 < t Initial program 79.5%
associate-/r*79.5%
sqr-neg79.5%
associate-*l*70.8%
sqr-neg70.8%
associate-/r*74.6%
associate-+l+74.6%
unpow274.6%
times-frac67.4%
sqr-neg67.4%
times-frac74.6%
unpow274.6%
Simplified74.6%
Taylor expanded in k around 0 66.3%
expm1-log1p-u66.0%
expm1-udef63.3%
Applied egg-rr76.5%
expm1-def82.7%
expm1-log1p83.3%
Simplified83.3%
div-inv83.3%
Applied egg-rr83.3%
div-inv83.3%
pow283.3%
clear-num83.3%
clear-num83.3%
frac-times83.8%
metadata-eval83.8%
Applied egg-rr83.8%
Final simplification35.2%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ (* k (pow t_m 1.5)) l)))
(*
t_s
(if (<= t_m 1.55e-56)
(* 2.0 (/ (/ (pow l 2.0) t_m) (pow k 4.0)))
(/ 1.0 (* t_2 t_2))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = (k * pow(t_m, 1.5)) / l;
double tmp;
if (t_m <= 1.55e-56) {
tmp = 2.0 * ((pow(l, 2.0) / t_m) / pow(k, 4.0));
} else {
tmp = 1.0 / (t_2 * t_2);
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: tmp
t_2 = (k * (t_m ** 1.5d0)) / l
if (t_m <= 1.55d-56) then
tmp = 2.0d0 * (((l ** 2.0d0) / t_m) / (k ** 4.0d0))
else
tmp = 1.0d0 / (t_2 * t_2)
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = (k * Math.pow(t_m, 1.5)) / l;
double tmp;
if (t_m <= 1.55e-56) {
tmp = 2.0 * ((Math.pow(l, 2.0) / t_m) / Math.pow(k, 4.0));
} else {
tmp = 1.0 / (t_2 * t_2);
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = (k * math.pow(t_m, 1.5)) / l tmp = 0 if t_m <= 1.55e-56: tmp = 2.0 * ((math.pow(l, 2.0) / t_m) / math.pow(k, 4.0)) else: tmp = 1.0 / (t_2 * t_2) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(Float64(k * (t_m ^ 1.5)) / l) tmp = 0.0 if (t_m <= 1.55e-56) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / t_m) / (k ^ 4.0))); else tmp = Float64(1.0 / Float64(t_2 * t_2)); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = (k * (t_m ^ 1.5)) / l; tmp = 0.0; if (t_m <= 1.55e-56) tmp = 2.0 * (((l ^ 2.0) / t_m) / (k ^ 4.0)); else tmp = 1.0 / (t_2 * t_2); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[(k * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.55e-56], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / t$95$m), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(t$95$2 * t$95$2), $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{k \cdot {t\_m}^{1.5}}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.55 \cdot 10^{-56}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{t\_m}}{{k}^{4}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{t\_2 \cdot t\_2}\\
\end{array}
\end{array}
\end{array}
if t < 1.54999999999999994e-56Initial program 46.1%
associate-/r*46.1%
sqr-neg46.1%
associate-*l*43.9%
sqr-neg43.9%
associate-/r*50.0%
associate-+l+50.0%
unpow250.0%
times-frac33.4%
sqr-neg33.4%
times-frac50.0%
unpow250.0%
Simplified50.0%
Taylor expanded in t around 0 62.2%
Taylor expanded in k around 0 45.3%
*-commutative45.3%
associate-/r*47.6%
Simplified47.6%
if 1.54999999999999994e-56 < t Initial program 79.5%
associate-/r*79.5%
sqr-neg79.5%
associate-*l*70.8%
sqr-neg70.8%
associate-/r*74.6%
associate-+l+74.6%
unpow274.6%
times-frac67.4%
sqr-neg67.4%
times-frac74.6%
unpow274.6%
Simplified74.6%
Taylor expanded in k around 0 66.3%
expm1-log1p-u66.0%
expm1-udef63.3%
Applied egg-rr76.5%
expm1-def82.7%
expm1-log1p83.3%
Simplified83.3%
div-inv83.3%
Applied egg-rr83.3%
div-inv83.3%
pow283.3%
clear-num83.3%
clear-num83.3%
frac-times83.8%
metadata-eval83.8%
Applied egg-rr83.8%
Final simplification57.4%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.45e-56)
(* 2.0 (/ (/ (pow l 2.0) t_m) (pow k 4.0)))
(pow (/ l (* k (pow t_m 1.5))) 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.45e-56) {
tmp = 2.0 * ((pow(l, 2.0) / t_m) / pow(k, 4.0));
} else {
tmp = pow((l / (k * pow(t_m, 1.5))), 2.0);
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1.45d-56) then
tmp = 2.0d0 * (((l ** 2.0d0) / t_m) / (k ** 4.0d0))
else
tmp = (l / (k * (t_m ** 1.5d0))) ** 2.0d0
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.45e-56) {
tmp = 2.0 * ((Math.pow(l, 2.0) / t_m) / Math.pow(k, 4.0));
} else {
tmp = Math.pow((l / (k * Math.pow(t_m, 1.5))), 2.0);
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 1.45e-56: tmp = 2.0 * ((math.pow(l, 2.0) / t_m) / math.pow(k, 4.0)) else: tmp = math.pow((l / (k * math.pow(t_m, 1.5))), 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.45e-56) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / t_m) / (k ^ 4.0))); else tmp = Float64(l / Float64(k * (t_m ^ 1.5))) ^ 2.0; end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 1.45e-56) tmp = 2.0 * (((l ^ 2.0) / t_m) / (k ^ 4.0)); else tmp = (l / (k * (t_m ^ 1.5))) ^ 2.0; end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.45e-56], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / t$95$m), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(l / N[(k * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $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.45 \cdot 10^{-56}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{t\_m}}{{k}^{4}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{\ell}{k \cdot {t\_m}^{1.5}}\right)}^{2}\\
\end{array}
\end{array}
if t < 1.44999999999999996e-56Initial program 46.1%
associate-/r*46.1%
sqr-neg46.1%
associate-*l*43.9%
sqr-neg43.9%
associate-/r*50.0%
associate-+l+50.0%
unpow250.0%
times-frac33.4%
sqr-neg33.4%
times-frac50.0%
unpow250.0%
Simplified50.0%
Taylor expanded in t around 0 62.2%
Taylor expanded in k around 0 45.3%
*-commutative45.3%
associate-/r*47.6%
Simplified47.6%
if 1.44999999999999996e-56 < t Initial program 79.5%
associate-/r*79.5%
sqr-neg79.5%
associate-*l*70.8%
sqr-neg70.8%
associate-/r*74.6%
associate-+l+74.6%
unpow274.6%
times-frac67.4%
sqr-neg67.4%
times-frac74.6%
unpow274.6%
Simplified74.6%
Taylor expanded in k around 0 66.3%
expm1-log1p-u66.0%
expm1-udef63.3%
Applied egg-rr76.5%
expm1-def82.7%
expm1-log1p83.3%
Simplified83.3%
Final simplification57.2%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.7e-56)
(* 2.0 (/ (/ (pow l 2.0) t_m) (pow k 4.0)))
(pow (* (/ l (pow t_m 1.5)) (/ 1.0 k)) 2.0))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.7e-56) {
tmp = 2.0 * ((pow(l, 2.0) / t_m) / pow(k, 4.0));
} else {
tmp = pow(((l / pow(t_m, 1.5)) * (1.0 / k)), 2.0);
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1.7d-56) then
tmp = 2.0d0 * (((l ** 2.0d0) / t_m) / (k ** 4.0d0))
else
tmp = ((l / (t_m ** 1.5d0)) * (1.0d0 / k)) ** 2.0d0
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.7e-56) {
tmp = 2.0 * ((Math.pow(l, 2.0) / t_m) / Math.pow(k, 4.0));
} else {
tmp = Math.pow(((l / Math.pow(t_m, 1.5)) * (1.0 / k)), 2.0);
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 1.7e-56: tmp = 2.0 * ((math.pow(l, 2.0) / t_m) / math.pow(k, 4.0)) else: tmp = math.pow(((l / math.pow(t_m, 1.5)) * (1.0 / k)), 2.0) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.7e-56) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / t_m) / (k ^ 4.0))); else tmp = Float64(Float64(l / (t_m ^ 1.5)) * Float64(1.0 / k)) ^ 2.0; end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 1.7e-56) tmp = 2.0 * (((l ^ 2.0) / t_m) / (k ^ 4.0)); else tmp = ((l / (t_m ^ 1.5)) * (1.0 / k)) ^ 2.0; end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.7e-56], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / t$95$m), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[(l / N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision] * N[(1.0 / k), $MachinePrecision]), $MachinePrecision], 2.0], $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^{-56}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{t\_m}}{{k}^{4}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{\ell}{{t\_m}^{1.5}} \cdot \frac{1}{k}\right)}^{2}\\
\end{array}
\end{array}
if t < 1.69999999999999991e-56Initial program 46.1%
associate-/r*46.1%
sqr-neg46.1%
associate-*l*43.9%
sqr-neg43.9%
associate-/r*50.0%
associate-+l+50.0%
unpow250.0%
times-frac33.4%
sqr-neg33.4%
times-frac50.0%
unpow250.0%
Simplified50.0%
Taylor expanded in t around 0 62.2%
Taylor expanded in k around 0 45.3%
*-commutative45.3%
associate-/r*47.6%
Simplified47.6%
if 1.69999999999999991e-56 < t Initial program 79.5%
associate-/r*79.5%
sqr-neg79.5%
associate-*l*70.8%
sqr-neg70.8%
associate-/r*74.6%
associate-+l+74.6%
unpow274.6%
times-frac67.4%
sqr-neg67.4%
times-frac74.6%
unpow274.6%
Simplified74.6%
Taylor expanded in k around 0 66.3%
expm1-log1p-u66.0%
expm1-udef63.3%
Applied egg-rr76.5%
expm1-def82.7%
expm1-log1p83.3%
Simplified83.3%
add-exp-log60.8%
Applied egg-rr60.8%
rem-exp-log83.3%
div-inv83.3%
associate-*r/83.3%
*-commutative83.3%
times-frac83.3%
Applied egg-rr83.3%
Final simplification57.2%
t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (pow (/ l (* k (pow t_m 1.5))) 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 * pow((l / (k * pow(t_m, 1.5))), 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 * ((l / (k * (t_m ** 1.5d0))) ** 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 * Math.pow((l / (k * Math.pow(t_m, 1.5))), 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 * math.pow((l / (k * math.pow(t_m, 1.5))), 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(l / Float64(k * (t_m ^ 1.5))) ^ 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 * ((l / (k * (t_m ^ 1.5))) ^ 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[Power[N[(l / N[(k * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot {\left(\frac{\ell}{k \cdot {t\_m}^{1.5}}\right)}^{2}
\end{array}
Initial program 55.1%
associate-/r*55.1%
sqr-neg55.1%
associate-*l*51.2%
sqr-neg51.2%
associate-/r*56.6%
associate-+l+56.6%
unpow256.6%
times-frac42.6%
sqr-neg42.6%
times-frac56.6%
unpow256.6%
Simplified56.6%
Taylor expanded in k around 0 51.9%
expm1-log1p-u40.9%
expm1-udef39.6%
Applied egg-rr32.6%
expm1-def33.2%
expm1-log1p33.3%
Simplified33.3%
Final simplification33.3%
herbie shell --seed 2024039
(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))))