
(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 14 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 (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))) (t_3 (pow (sin k) 2.0)))
(*
t_s
(if (<= t_m 1.35e-221)
(/ 2.0 (/ (pow (* k (sqrt t_m)) 2.0) (/ (* (pow l 2.0) (cos k)) t_3)))
(if (<= t_m 1.05e-37)
(/ 2.0 (/ (* (* t_m (pow k 2.0)) (* t_3 (/ (/ 1.0 l) (cos k)))) l))
(if (<= t_m 6.7e+190)
(/ 2.0 (/ (* (pow (* (cbrt (sin k)) (/ t_m (cbrt l))) 3.0) t_2) l))
(/
2.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 = tan(k) * (2.0 + pow((k / t_m), 2.0));
double t_3 = pow(sin(k), 2.0);
double tmp;
if (t_m <= 1.35e-221) {
tmp = 2.0 / (pow((k * sqrt(t_m)), 2.0) / ((pow(l, 2.0) * cos(k)) / t_3));
} else if (t_m <= 1.05e-37) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) * (t_3 * ((1.0 / l) / cos(k)))) / l);
} else if (t_m <= 6.7e+190) {
tmp = 2.0 / ((pow((cbrt(sin(k)) * (t_m / cbrt(l))), 3.0) * t_2) / l);
} else {
tmp = 2.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.tan(k) * (2.0 + Math.pow((k / t_m), 2.0));
double t_3 = Math.pow(Math.sin(k), 2.0);
double tmp;
if (t_m <= 1.35e-221) {
tmp = 2.0 / (Math.pow((k * Math.sqrt(t_m)), 2.0) / ((Math.pow(l, 2.0) * Math.cos(k)) / t_3));
} else if (t_m <= 1.05e-37) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) * (t_3 * ((1.0 / l) / Math.cos(k)))) / l);
} else if (t_m <= 6.7e+190) {
tmp = 2.0 / ((Math.pow((Math.cbrt(Math.sin(k)) * (t_m / Math.cbrt(l))), 3.0) * t_2) / l);
} else {
tmp = 2.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(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) t_3 = sin(k) ^ 2.0 tmp = 0.0 if (t_m <= 1.35e-221) tmp = Float64(2.0 / Float64((Float64(k * sqrt(t_m)) ^ 2.0) / Float64(Float64((l ^ 2.0) * cos(k)) / t_3))); elseif (t_m <= 1.05e-37) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) * Float64(t_3 * Float64(Float64(1.0 / l) / cos(k)))) / l)); elseif (t_m <= 6.7e+190) tmp = Float64(2.0 / Float64(Float64((Float64(cbrt(sin(k)) * Float64(t_m / cbrt(l))) ^ 3.0) * t_2) / l)); else tmp = Float64(2.0 / Float64(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[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.35e-221], N[(2.0 / N[(N[Power[N[(k * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.05e-37], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(t$95$3 * N[(N[(1.0 / l), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 6.7e+190], N[(2.0 / N[(N[(N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * t$95$2), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$2 * 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 := \tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\\
t_3 := {\sin k}^{2}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 1.35 \cdot 10^{-221}:\\
\;\;\;\;\frac{2}{\frac{{\left(k \cdot \sqrt{t_m}\right)}^{2}}{\frac{{\ell}^{2} \cdot \cos k}{t_3}}}\\
\mathbf{elif}\;t_m \leq 1.05 \cdot 10^{-37}:\\
\;\;\;\;\frac{2}{\frac{\left(t_m \cdot {k}^{2}\right) \cdot \left(t_3 \cdot \frac{\frac{1}{\ell}}{\cos k}\right)}{\ell}}\\
\mathbf{elif}\;t_m \leq 6.7 \cdot 10^{+190}:\\
\;\;\;\;\frac{2}{\frac{{\left(\sqrt[3]{\sin k} \cdot \frac{t_m}{\sqrt[3]{\ell}}\right)}^{3} \cdot t_2}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t_2 \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 < 1.35e-221Initial program 52.5%
associate-*l*52.5%
sqr-neg52.5%
sqr-neg52.5%
associate-/r*59.7%
distribute-rgt-in59.7%
unpow259.7%
times-frac46.0%
sqr-neg46.0%
times-frac59.7%
unpow259.7%
distribute-rgt-in59.7%
Simplified59.7%
Taylor expanded in t around 0 61.3%
associate-*r*61.3%
associate-/l*62.0%
associate-/l*62.0%
Simplified62.0%
add-sqr-sqrt7.6%
pow27.6%
sqrt-prod7.6%
unpow27.6%
sqrt-prod2.7%
add-sqr-sqrt10.2%
Applied egg-rr10.2%
Taylor expanded in l around 0 10.2%
if 1.35e-221 < t < 1.05e-37Initial program 46.0%
associate-*l*46.0%
sqr-neg46.0%
sqr-neg46.0%
associate-/r*49.0%
distribute-rgt-in49.0%
unpow249.0%
times-frac28.7%
sqr-neg28.7%
times-frac49.0%
unpow249.0%
distribute-rgt-in49.0%
Simplified49.0%
associate-*l/49.1%
associate-*l/49.1%
Applied egg-rr49.1%
Taylor expanded in t around 0 73.1%
div-inv73.1%
associate-*r*73.2%
add-sqr-sqrt73.2%
pow273.2%
unpow-prod-down81.3%
*-commutative81.3%
unpow-prod-down73.2%
pow273.2%
add-sqr-sqrt73.2%
Applied egg-rr73.2%
associate-*l*75.4%
*-commutative75.4%
associate-/r*75.4%
Simplified75.4%
if 1.05e-37 < t < 6.6999999999999999e190Initial program 71.4%
associate-*l*71.4%
sqr-neg71.4%
sqr-neg71.4%
associate-/r*75.5%
distribute-rgt-in75.5%
unpow275.5%
times-frac71.6%
sqr-neg71.6%
times-frac75.5%
unpow275.5%
distribute-rgt-in75.5%
Simplified75.5%
associate-*l/79.1%
associate-*l/79.2%
Applied egg-rr79.2%
add-cube-cbrt78.8%
pow378.8%
*-commutative78.8%
cbrt-prod78.8%
cbrt-div82.2%
rem-cbrt-cube97.2%
Applied egg-rr97.2%
if 6.6999999999999999e190 < t Initial program 63.8%
associate-*l*63.8%
sqr-neg63.8%
sqr-neg63.8%
associate-/r*77.9%
distribute-rgt-in77.9%
unpow277.9%
times-frac45.9%
sqr-neg45.9%
times-frac77.9%
unpow277.9%
distribute-rgt-in77.9%
Simplified77.9%
add-cube-cbrt77.9%
pow377.9%
associate-/l/63.8%
cbrt-div63.8%
rem-cbrt-cube73.4%
cbrt-unprod95.6%
pow295.6%
Applied egg-rr95.6%
Final simplification43.8%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (sin k) 2.0))
(t_3 (+ 2.0 (pow (/ k t_m) 2.0)))
(t_4 (* (tan k) t_3)))
(*
t_s
(if (<= t_m 5.5e-231)
(/ 2.0 (/ (pow (* k (sqrt t_m)) 2.0) (/ (* (pow l 2.0) (cos k)) t_2)))
(if (<= t_m 1.45e-39)
(/ 2.0 (/ (* (* t_m (pow k 2.0)) (* t_2 (/ (/ 1.0 l) (cos k)))) l))
(if (<= t_m 1.3e+98)
(/ 2.0 (/ (* t_4 (* (sin k) (/ (pow t_m 3.0) l))) l))
(if (<= t_m 2.6e+132)
(/ (* 2.0 (pow (/ (pow t_m 1.5) (/ l k)) -2.0)) t_3)
(/
2.0
(* t_4 (* (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(sin(k), 2.0);
double t_3 = 2.0 + pow((k / t_m), 2.0);
double t_4 = tan(k) * t_3;
double tmp;
if (t_m <= 5.5e-231) {
tmp = 2.0 / (pow((k * sqrt(t_m)), 2.0) / ((pow(l, 2.0) * cos(k)) / t_2));
} else if (t_m <= 1.45e-39) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) * (t_2 * ((1.0 / l) / cos(k)))) / l);
} else if (t_m <= 1.3e+98) {
tmp = 2.0 / ((t_4 * (sin(k) * (pow(t_m, 3.0) / l))) / l);
} else if (t_m <= 2.6e+132) {
tmp = (2.0 * pow((pow(t_m, 1.5) / (l / k)), -2.0)) / t_3;
} else {
tmp = 2.0 / (t_4 * (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(Math.sin(k), 2.0);
double t_3 = 2.0 + Math.pow((k / t_m), 2.0);
double t_4 = Math.tan(k) * t_3;
double tmp;
if (t_m <= 5.5e-231) {
tmp = 2.0 / (Math.pow((k * Math.sqrt(t_m)), 2.0) / ((Math.pow(l, 2.0) * Math.cos(k)) / t_2));
} else if (t_m <= 1.45e-39) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) * (t_2 * ((1.0 / l) / Math.cos(k)))) / l);
} else if (t_m <= 1.3e+98) {
tmp = 2.0 / ((t_4 * (Math.sin(k) * (Math.pow(t_m, 3.0) / l))) / l);
} else if (t_m <= 2.6e+132) {
tmp = (2.0 * Math.pow((Math.pow(t_m, 1.5) / (l / k)), -2.0)) / t_3;
} else {
tmp = 2.0 / (t_4 * (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 = sin(k) ^ 2.0 t_3 = Float64(2.0 + (Float64(k / t_m) ^ 2.0)) t_4 = Float64(tan(k) * t_3) tmp = 0.0 if (t_m <= 5.5e-231) tmp = Float64(2.0 / Float64((Float64(k * sqrt(t_m)) ^ 2.0) / Float64(Float64((l ^ 2.0) * cos(k)) / t_2))); elseif (t_m <= 1.45e-39) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) * Float64(t_2 * Float64(Float64(1.0 / l) / cos(k)))) / l)); elseif (t_m <= 1.3e+98) tmp = Float64(2.0 / Float64(Float64(t_4 * Float64(sin(k) * Float64((t_m ^ 3.0) / l))) / l)); elseif (t_m <= 2.6e+132) tmp = Float64(Float64(2.0 * (Float64((t_m ^ 1.5) / Float64(l / k)) ^ -2.0)) / t_3); else tmp = Float64(2.0 / Float64(t_4 * 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[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[Tan[k], $MachinePrecision] * t$95$3), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 5.5e-231], N[(2.0 / N[(N[Power[N[(k * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.45e-39], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(t$95$2 * N[(N[(1.0 / l), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.3e+98], N[(2.0 / N[(N[(t$95$4 * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.6e+132], N[(N[(2.0 * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / N[(l / k), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision], N[(2.0 / N[(t$95$4 * 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 := {\sin k}^{2}\\
t_3 := 2 + {\left(\frac{k}{t_m}\right)}^{2}\\
t_4 := \tan k \cdot t_3\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 5.5 \cdot 10^{-231}:\\
\;\;\;\;\frac{2}{\frac{{\left(k \cdot \sqrt{t_m}\right)}^{2}}{\frac{{\ell}^{2} \cdot \cos k}{t_2}}}\\
\mathbf{elif}\;t_m \leq 1.45 \cdot 10^{-39}:\\
\;\;\;\;\frac{2}{\frac{\left(t_m \cdot {k}^{2}\right) \cdot \left(t_2 \cdot \frac{\frac{1}{\ell}}{\cos k}\right)}{\ell}}\\
\mathbf{elif}\;t_m \leq 1.3 \cdot 10^{+98}:\\
\;\;\;\;\frac{2}{\frac{t_4 \cdot \left(\sin k \cdot \frac{{t_m}^{3}}{\ell}\right)}{\ell}}\\
\mathbf{elif}\;t_m \leq 2.6 \cdot 10^{+132}:\\
\;\;\;\;\frac{2 \cdot {\left(\frac{{t_m}^{1.5}}{\frac{\ell}{k}}\right)}^{-2}}{t_3}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t_4 \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 < 5.49999999999999951e-231Initial program 52.5%
associate-*l*52.5%
sqr-neg52.5%
sqr-neg52.5%
associate-/r*59.7%
distribute-rgt-in59.7%
unpow259.7%
times-frac46.0%
sqr-neg46.0%
times-frac59.7%
unpow259.7%
distribute-rgt-in59.7%
Simplified59.7%
Taylor expanded in t around 0 61.3%
associate-*r*61.3%
associate-/l*62.0%
associate-/l*62.0%
Simplified62.0%
add-sqr-sqrt7.6%
pow27.6%
sqrt-prod7.6%
unpow27.6%
sqrt-prod2.7%
add-sqr-sqrt10.2%
Applied egg-rr10.2%
Taylor expanded in l around 0 10.2%
if 5.49999999999999951e-231 < t < 1.44999999999999994e-39Initial program 46.0%
associate-*l*46.0%
sqr-neg46.0%
sqr-neg46.0%
associate-/r*49.0%
distribute-rgt-in49.0%
unpow249.0%
times-frac28.7%
sqr-neg28.7%
times-frac49.0%
unpow249.0%
distribute-rgt-in49.0%
Simplified49.0%
associate-*l/49.1%
associate-*l/49.1%
Applied egg-rr49.1%
Taylor expanded in t around 0 73.1%
div-inv73.1%
associate-*r*73.2%
add-sqr-sqrt73.2%
pow273.2%
unpow-prod-down81.3%
*-commutative81.3%
unpow-prod-down73.2%
pow273.2%
add-sqr-sqrt73.2%
Applied egg-rr73.2%
associate-*l*75.4%
*-commutative75.4%
associate-/r*75.4%
Simplified75.4%
if 1.44999999999999994e-39 < t < 1.3e98Initial program 83.6%
associate-*l*83.6%
sqr-neg83.6%
sqr-neg83.6%
associate-/r*90.2%
distribute-rgt-in90.2%
unpow290.2%
times-frac83.7%
sqr-neg83.7%
times-frac90.2%
unpow290.2%
distribute-rgt-in90.2%
Simplified90.2%
associate-*l/96.5%
associate-*l/96.5%
Applied egg-rr96.5%
if 1.3e98 < t < 2.6e132Initial program 51.8%
associate-/r*51.8%
sqr-neg51.8%
associate-*l*41.9%
sqr-neg41.9%
associate-/r*42.3%
associate-+l+42.3%
unpow242.3%
times-frac42.3%
sqr-neg42.3%
times-frac42.3%
unpow242.3%
Simplified42.3%
add-sqr-sqrt24.1%
pow224.1%
sqrt-prod24.1%
associate-/l/23.8%
sqrt-div32.4%
sqrt-pow144.1%
metadata-eval44.1%
sqrt-unprod36.6%
add-sqr-sqrt52.9%
Applied egg-rr52.9%
Taylor expanded in k around 0 78.3%
div-inv78.3%
div-inv78.3%
pow-flip78.1%
*-commutative78.1%
metadata-eval78.1%
Applied egg-rr78.1%
associate-*r/78.1%
*-rgt-identity78.1%
associate-*r/87.0%
*-commutative87.0%
associate-/l*87.0%
Simplified87.0%
if 2.6e132 < t Initial program 61.4%
associate-*l*61.4%
sqr-neg61.4%
sqr-neg61.4%
associate-/r*71.4%
distribute-rgt-in71.4%
unpow271.4%
times-frac49.4%
sqr-neg49.4%
times-frac71.4%
unpow271.4%
distribute-rgt-in71.4%
Simplified71.4%
add-cube-cbrt71.4%
pow371.4%
associate-/l/61.4%
cbrt-div61.4%
rem-cbrt-cube74.3%
cbrt-unprod95.3%
pow295.3%
Applied egg-rr95.3%
Final simplification43.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 (sin k) 2.0)) (t_3 (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))))
(*
t_s
(if (<= t_m 4.3e-231)
(/ 2.0 (/ (pow (* k (sqrt t_m)) 2.0) (/ (* (pow l 2.0) (cos k)) t_2)))
(if (<= t_m 2.5e-39)
(/ 2.0 (/ (* (* t_m (pow k 2.0)) (* t_2 (/ (/ 1.0 l) (cos k)))) l))
(if (<= t_m 1.26e+98)
(/ 2.0 (/ (* t_3 (* (sin k) (/ (pow t_m 3.0) l))) l))
(/ 2.0 (/ (* t_3 (pow (/ (* t_m (cbrt k)) (cbrt l)) 3.0)) l))))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow(sin(k), 2.0);
double t_3 = tan(k) * (2.0 + pow((k / t_m), 2.0));
double tmp;
if (t_m <= 4.3e-231) {
tmp = 2.0 / (pow((k * sqrt(t_m)), 2.0) / ((pow(l, 2.0) * cos(k)) / t_2));
} else if (t_m <= 2.5e-39) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) * (t_2 * ((1.0 / l) / cos(k)))) / l);
} else if (t_m <= 1.26e+98) {
tmp = 2.0 / ((t_3 * (sin(k) * (pow(t_m, 3.0) / l))) / l);
} else {
tmp = 2.0 / ((t_3 * pow(((t_m * cbrt(k)) / cbrt(l)), 3.0)) / l);
}
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(Math.sin(k), 2.0);
double t_3 = Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0));
double tmp;
if (t_m <= 4.3e-231) {
tmp = 2.0 / (Math.pow((k * Math.sqrt(t_m)), 2.0) / ((Math.pow(l, 2.0) * Math.cos(k)) / t_2));
} else if (t_m <= 2.5e-39) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) * (t_2 * ((1.0 / l) / Math.cos(k)))) / l);
} else if (t_m <= 1.26e+98) {
tmp = 2.0 / ((t_3 * (Math.sin(k) * (Math.pow(t_m, 3.0) / l))) / l);
} else {
tmp = 2.0 / ((t_3 * Math.pow(((t_m * Math.cbrt(k)) / Math.cbrt(l)), 3.0)) / l);
}
return t_s * tmp;
}
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = sin(k) ^ 2.0 t_3 = Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) tmp = 0.0 if (t_m <= 4.3e-231) tmp = Float64(2.0 / Float64((Float64(k * sqrt(t_m)) ^ 2.0) / Float64(Float64((l ^ 2.0) * cos(k)) / t_2))); elseif (t_m <= 2.5e-39) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) * Float64(t_2 * Float64(Float64(1.0 / l) / cos(k)))) / l)); elseif (t_m <= 1.26e+98) tmp = Float64(2.0 / Float64(Float64(t_3 * Float64(sin(k) * Float64((t_m ^ 3.0) / l))) / l)); else tmp = Float64(2.0 / Float64(Float64(t_3 * (Float64(Float64(t_m * cbrt(k)) / cbrt(l)) ^ 3.0)) / l)); 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[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 4.3e-231], N[(2.0 / N[(N[Power[N[(k * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.5e-39], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(t$95$2 * N[(N[(1.0 / l), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.26e+98], N[(2.0 / N[(N[(t$95$3 * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t$95$3 * N[Power[N[(N[(t$95$m * N[Power[k, 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {\sin k}^{2}\\
t_3 := \tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 4.3 \cdot 10^{-231}:\\
\;\;\;\;\frac{2}{\frac{{\left(k \cdot \sqrt{t_m}\right)}^{2}}{\frac{{\ell}^{2} \cdot \cos k}{t_2}}}\\
\mathbf{elif}\;t_m \leq 2.5 \cdot 10^{-39}:\\
\;\;\;\;\frac{2}{\frac{\left(t_m \cdot {k}^{2}\right) \cdot \left(t_2 \cdot \frac{\frac{1}{\ell}}{\cos k}\right)}{\ell}}\\
\mathbf{elif}\;t_m \leq 1.26 \cdot 10^{+98}:\\
\;\;\;\;\frac{2}{\frac{t_3 \cdot \left(\sin k \cdot \frac{{t_m}^{3}}{\ell}\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{t_3 \cdot {\left(\frac{t_m \cdot \sqrt[3]{k}}{\sqrt[3]{\ell}}\right)}^{3}}{\ell}}\\
\end{array}
\end{array}
\end{array}
if t < 4.29999999999999998e-231Initial program 52.5%
associate-*l*52.5%
sqr-neg52.5%
sqr-neg52.5%
associate-/r*59.7%
distribute-rgt-in59.7%
unpow259.7%
times-frac46.0%
sqr-neg46.0%
times-frac59.7%
unpow259.7%
distribute-rgt-in59.7%
Simplified59.7%
Taylor expanded in t around 0 61.3%
associate-*r*61.3%
associate-/l*62.0%
associate-/l*62.0%
Simplified62.0%
add-sqr-sqrt7.6%
pow27.6%
sqrt-prod7.6%
unpow27.6%
sqrt-prod2.7%
add-sqr-sqrt10.2%
Applied egg-rr10.2%
Taylor expanded in l around 0 10.2%
if 4.29999999999999998e-231 < t < 2.4999999999999999e-39Initial program 46.0%
associate-*l*46.0%
sqr-neg46.0%
sqr-neg46.0%
associate-/r*49.0%
distribute-rgt-in49.0%
unpow249.0%
times-frac28.7%
sqr-neg28.7%
times-frac49.0%
unpow249.0%
distribute-rgt-in49.0%
Simplified49.0%
associate-*l/49.1%
associate-*l/49.1%
Applied egg-rr49.1%
Taylor expanded in t around 0 73.1%
div-inv73.1%
associate-*r*73.2%
add-sqr-sqrt73.2%
pow273.2%
unpow-prod-down81.3%
*-commutative81.3%
unpow-prod-down73.2%
pow273.2%
add-sqr-sqrt73.2%
Applied egg-rr73.2%
associate-*l*75.4%
*-commutative75.4%
associate-/r*75.4%
Simplified75.4%
if 2.4999999999999999e-39 < t < 1.25999999999999999e98Initial program 83.6%
associate-*l*83.6%
sqr-neg83.6%
sqr-neg83.6%
associate-/r*90.2%
distribute-rgt-in90.2%
unpow290.2%
times-frac83.7%
sqr-neg83.7%
times-frac90.2%
unpow290.2%
distribute-rgt-in90.2%
Simplified90.2%
associate-*l/96.5%
associate-*l/96.5%
Applied egg-rr96.5%
if 1.25999999999999999e98 < t Initial program 59.0%
associate-*l*59.0%
sqr-neg59.0%
sqr-neg59.0%
associate-/r*66.4%
distribute-rgt-in66.4%
unpow266.4%
times-frac50.1%
sqr-neg50.1%
times-frac66.4%
unpow266.4%
distribute-rgt-in66.4%
Simplified66.4%
associate-*l/66.4%
associate-*l/66.4%
Applied egg-rr66.4%
Taylor expanded in k around 0 68.6%
add-cube-cbrt68.6%
pow368.6%
cbrt-div68.5%
*-commutative68.5%
cbrt-prod68.6%
unpow368.6%
add-cbrt-cube88.6%
Applied egg-rr88.6%
Final simplification42.4%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))))
(*
t_s
(if (<= t_m 8.5e-38)
(/
2.0
(/
(* (* t_m (pow k 2.0)) (* (pow (sin k) 2.0) (/ (/ 1.0 l) (cos k))))
l))
(if (<= t_m 1.26e+98)
(/ 2.0 (/ (* t_2 (* (sin k) (/ (pow t_m 3.0) l))) l))
(/ 2.0 (/ (* t_2 (pow (/ (* t_m (cbrt k)) (cbrt l)) 3.0)) l)))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = tan(k) * (2.0 + pow((k / t_m), 2.0));
double tmp;
if (t_m <= 8.5e-38) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) * (pow(sin(k), 2.0) * ((1.0 / l) / cos(k)))) / l);
} else if (t_m <= 1.26e+98) {
tmp = 2.0 / ((t_2 * (sin(k) * (pow(t_m, 3.0) / l))) / l);
} else {
tmp = 2.0 / ((t_2 * pow(((t_m * cbrt(k)) / cbrt(l)), 3.0)) / l);
}
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.tan(k) * (2.0 + Math.pow((k / t_m), 2.0));
double tmp;
if (t_m <= 8.5e-38) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) * (Math.pow(Math.sin(k), 2.0) * ((1.0 / l) / Math.cos(k)))) / l);
} else if (t_m <= 1.26e+98) {
tmp = 2.0 / ((t_2 * (Math.sin(k) * (Math.pow(t_m, 3.0) / l))) / l);
} else {
tmp = 2.0 / ((t_2 * Math.pow(((t_m * Math.cbrt(k)) / Math.cbrt(l)), 3.0)) / l);
}
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(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) tmp = 0.0 if (t_m <= 8.5e-38) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) * Float64((sin(k) ^ 2.0) * Float64(Float64(1.0 / l) / cos(k)))) / l)); elseif (t_m <= 1.26e+98) tmp = Float64(2.0 / Float64(Float64(t_2 * Float64(sin(k) * Float64((t_m ^ 3.0) / l))) / l)); else tmp = Float64(2.0 / Float64(Float64(t_2 * (Float64(Float64(t_m * cbrt(k)) / cbrt(l)) ^ 3.0)) / l)); 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[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 8.5e-38], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(N[(1.0 / l), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.26e+98], N[(2.0 / N[(N[(t$95$2 * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t$95$2 * N[Power[N[(N[(t$95$m * N[Power[k, 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 8.5 \cdot 10^{-38}:\\
\;\;\;\;\frac{2}{\frac{\left(t_m \cdot {k}^{2}\right) \cdot \left({\sin k}^{2} \cdot \frac{\frac{1}{\ell}}{\cos k}\right)}{\ell}}\\
\mathbf{elif}\;t_m \leq 1.26 \cdot 10^{+98}:\\
\;\;\;\;\frac{2}{\frac{t_2 \cdot \left(\sin k \cdot \frac{{t_m}^{3}}{\ell}\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{t_2 \cdot {\left(\frac{t_m \cdot \sqrt[3]{k}}{\sqrt[3]{\ell}}\right)}^{3}}{\ell}}\\
\end{array}
\end{array}
\end{array}
if t < 8.50000000000000046e-38Initial program 51.3%
associate-*l*51.3%
sqr-neg51.3%
sqr-neg51.3%
associate-/r*57.6%
distribute-rgt-in57.6%
unpow257.6%
times-frac42.7%
sqr-neg42.7%
times-frac57.6%
unpow257.6%
distribute-rgt-in57.6%
Simplified57.6%
associate-*l/58.2%
associate-*l/59.2%
Applied egg-rr59.2%
Taylor expanded in t around 0 69.2%
div-inv69.2%
associate-*r*69.2%
add-sqr-sqrt21.2%
pow221.2%
unpow-prod-down25.3%
*-commutative25.3%
unpow-prod-down21.2%
pow221.2%
add-sqr-sqrt69.2%
Applied egg-rr69.2%
associate-*l*70.2%
*-commutative70.2%
associate-/r*70.2%
Simplified70.2%
if 8.50000000000000046e-38 < t < 1.25999999999999999e98Initial program 83.6%
associate-*l*83.6%
sqr-neg83.6%
sqr-neg83.6%
associate-/r*90.2%
distribute-rgt-in90.2%
unpow290.2%
times-frac83.7%
sqr-neg83.7%
times-frac90.2%
unpow290.2%
distribute-rgt-in90.2%
Simplified90.2%
associate-*l/96.5%
associate-*l/96.5%
Applied egg-rr96.5%
if 1.25999999999999999e98 < t Initial program 59.0%
associate-*l*59.0%
sqr-neg59.0%
sqr-neg59.0%
associate-/r*66.4%
distribute-rgt-in66.4%
unpow266.4%
times-frac50.1%
sqr-neg50.1%
times-frac66.4%
unpow266.4%
distribute-rgt-in66.4%
Simplified66.4%
associate-*l/66.4%
associate-*l/66.4%
Applied egg-rr66.4%
Taylor expanded in k around 0 68.6%
add-cube-cbrt68.6%
pow368.6%
cbrt-div68.5%
*-commutative68.5%
cbrt-prod68.6%
unpow368.6%
add-cbrt-cube88.6%
Applied egg-rr88.6%
Final simplification76.4%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (+ 2.0 (pow (/ k t_m) 2.0))))
(*
t_s
(if (<= t_m 8.6e-40)
(/
2.0
(/
(* (* t_m (pow k 2.0)) (* (pow (sin k) 2.0) (/ (/ 1.0 l) (cos k))))
l))
(if (<= t_m 1.26e+98)
(/ 2.0 (* (* (tan k) t_2) (/ (* (sin k) (/ (pow t_m 3.0) l)) l)))
(/ (/ 2.0 (pow (/ (* k (pow t_m 1.5)) l) 2.0)) t_2))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = 2.0 + pow((k / t_m), 2.0);
double tmp;
if (t_m <= 8.6e-40) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) * (pow(sin(k), 2.0) * ((1.0 / l) / cos(k)))) / l);
} else if (t_m <= 1.26e+98) {
tmp = 2.0 / ((tan(k) * t_2) * ((sin(k) * (pow(t_m, 3.0) / l)) / l));
} else {
tmp = (2.0 / pow(((k * pow(t_m, 1.5)) / l), 2.0)) / 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 = 2.0d0 + ((k / t_m) ** 2.0d0)
if (t_m <= 8.6d-40) then
tmp = 2.0d0 / (((t_m * (k ** 2.0d0)) * ((sin(k) ** 2.0d0) * ((1.0d0 / l) / cos(k)))) / l)
else if (t_m <= 1.26d+98) then
tmp = 2.0d0 / ((tan(k) * t_2) * ((sin(k) * ((t_m ** 3.0d0) / l)) / l))
else
tmp = (2.0d0 / (((k * (t_m ** 1.5d0)) / l) ** 2.0d0)) / 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 = 2.0 + Math.pow((k / t_m), 2.0);
double tmp;
if (t_m <= 8.6e-40) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) * (Math.pow(Math.sin(k), 2.0) * ((1.0 / l) / Math.cos(k)))) / l);
} else if (t_m <= 1.26e+98) {
tmp = 2.0 / ((Math.tan(k) * t_2) * ((Math.sin(k) * (Math.pow(t_m, 3.0) / l)) / l));
} else {
tmp = (2.0 / Math.pow(((k * Math.pow(t_m, 1.5)) / l), 2.0)) / 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 = 2.0 + math.pow((k / t_m), 2.0) tmp = 0 if t_m <= 8.6e-40: tmp = 2.0 / (((t_m * math.pow(k, 2.0)) * (math.pow(math.sin(k), 2.0) * ((1.0 / l) / math.cos(k)))) / l) elif t_m <= 1.26e+98: tmp = 2.0 / ((math.tan(k) * t_2) * ((math.sin(k) * (math.pow(t_m, 3.0) / l)) / l)) else: tmp = (2.0 / math.pow(((k * math.pow(t_m, 1.5)) / l), 2.0)) / t_2 return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(2.0 + (Float64(k / t_m) ^ 2.0)) tmp = 0.0 if (t_m <= 8.6e-40) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) * Float64((sin(k) ^ 2.0) * Float64(Float64(1.0 / l) / cos(k)))) / l)); elseif (t_m <= 1.26e+98) tmp = Float64(2.0 / Float64(Float64(tan(k) * t_2) * Float64(Float64(sin(k) * Float64((t_m ^ 3.0) / l)) / l))); else tmp = Float64(Float64(2.0 / (Float64(Float64(k * (t_m ^ 1.5)) / l) ^ 2.0)) / 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 = 2.0 + ((k / t_m) ^ 2.0); tmp = 0.0; if (t_m <= 8.6e-40) tmp = 2.0 / (((t_m * (k ^ 2.0)) * ((sin(k) ^ 2.0) * ((1.0 / l) / cos(k)))) / l); elseif (t_m <= 1.26e+98) tmp = 2.0 / ((tan(k) * t_2) * ((sin(k) * ((t_m ^ 3.0) / l)) / l)); else tmp = (2.0 / (((k * (t_m ^ 1.5)) / l) ^ 2.0)) / 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[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 8.6e-40], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(N[(1.0 / l), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.26e+98], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * t$95$2), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[Power[N[(N[(k * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := 2 + {\left(\frac{k}{t_m}\right)}^{2}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 8.6 \cdot 10^{-40}:\\
\;\;\;\;\frac{2}{\frac{\left(t_m \cdot {k}^{2}\right) \cdot \left({\sin k}^{2} \cdot \frac{\frac{1}{\ell}}{\cos k}\right)}{\ell}}\\
\mathbf{elif}\;t_m \leq 1.26 \cdot 10^{+98}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot t_2\right) \cdot \frac{\sin k \cdot \frac{{t_m}^{3}}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{{\left(\frac{k \cdot {t_m}^{1.5}}{\ell}\right)}^{2}}}{t_2}\\
\end{array}
\end{array}
\end{array}
if t < 8.6000000000000005e-40Initial program 51.3%
associate-*l*51.3%
sqr-neg51.3%
sqr-neg51.3%
associate-/r*57.6%
distribute-rgt-in57.6%
unpow257.6%
times-frac42.7%
sqr-neg42.7%
times-frac57.6%
unpow257.6%
distribute-rgt-in57.6%
Simplified57.6%
associate-*l/58.2%
associate-*l/59.2%
Applied egg-rr59.2%
Taylor expanded in t around 0 69.2%
div-inv69.2%
associate-*r*69.2%
add-sqr-sqrt21.2%
pow221.2%
unpow-prod-down25.3%
*-commutative25.3%
unpow-prod-down21.2%
pow221.2%
add-sqr-sqrt69.2%
Applied egg-rr69.2%
associate-*l*70.2%
*-commutative70.2%
associate-/r*70.2%
Simplified70.2%
if 8.6000000000000005e-40 < t < 1.25999999999999999e98Initial program 83.6%
associate-*l*83.6%
sqr-neg83.6%
sqr-neg83.6%
associate-/r*90.2%
distribute-rgt-in90.2%
unpow290.2%
times-frac83.7%
sqr-neg83.7%
times-frac90.2%
unpow290.2%
distribute-rgt-in90.2%
Simplified90.2%
associate-*l/96.5%
Applied egg-rr96.5%
if 1.25999999999999999e98 < t Initial program 59.0%
associate-/r*59.0%
sqr-neg59.0%
associate-*l*47.1%
sqr-neg47.1%
associate-/r*54.4%
associate-+l+54.4%
unpow254.4%
times-frac38.0%
sqr-neg38.0%
times-frac54.4%
unpow254.4%
Simplified54.4%
add-sqr-sqrt38.0%
pow238.0%
sqrt-prod38.0%
associate-/l/30.8%
sqrt-div33.0%
sqrt-pow143.1%
metadata-eval43.1%
sqrt-unprod31.6%
add-sqr-sqrt56.8%
Applied egg-rr56.8%
Taylor expanded in k around 0 86.7%
associate-*l/88.9%
Applied egg-rr88.9%
Final simplification76.4%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (+ 2.0 (pow (/ k t_m) 2.0))))
(*
t_s
(if (<= t_m 8e-40)
(/
2.0
(/
(* (* t_m (pow k 2.0)) (* (pow (sin k) 2.0) (/ (/ 1.0 l) (cos k))))
l))
(if (<= t_m 1.15e+98)
(/ 2.0 (/ (* (* (tan k) t_2) (* (sin k) (/ (pow t_m 3.0) l))) l))
(/ (/ 2.0 (pow (/ (* k (pow t_m 1.5)) l) 2.0)) t_2))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = 2.0 + pow((k / t_m), 2.0);
double tmp;
if (t_m <= 8e-40) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) * (pow(sin(k), 2.0) * ((1.0 / l) / cos(k)))) / l);
} else if (t_m <= 1.15e+98) {
tmp = 2.0 / (((tan(k) * t_2) * (sin(k) * (pow(t_m, 3.0) / l))) / l);
} else {
tmp = (2.0 / pow(((k * pow(t_m, 1.5)) / l), 2.0)) / 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 = 2.0d0 + ((k / t_m) ** 2.0d0)
if (t_m <= 8d-40) then
tmp = 2.0d0 / (((t_m * (k ** 2.0d0)) * ((sin(k) ** 2.0d0) * ((1.0d0 / l) / cos(k)))) / l)
else if (t_m <= 1.15d+98) then
tmp = 2.0d0 / (((tan(k) * t_2) * (sin(k) * ((t_m ** 3.0d0) / l))) / l)
else
tmp = (2.0d0 / (((k * (t_m ** 1.5d0)) / l) ** 2.0d0)) / 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 = 2.0 + Math.pow((k / t_m), 2.0);
double tmp;
if (t_m <= 8e-40) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) * (Math.pow(Math.sin(k), 2.0) * ((1.0 / l) / Math.cos(k)))) / l);
} else if (t_m <= 1.15e+98) {
tmp = 2.0 / (((Math.tan(k) * t_2) * (Math.sin(k) * (Math.pow(t_m, 3.0) / l))) / l);
} else {
tmp = (2.0 / Math.pow(((k * Math.pow(t_m, 1.5)) / l), 2.0)) / 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 = 2.0 + math.pow((k / t_m), 2.0) tmp = 0 if t_m <= 8e-40: tmp = 2.0 / (((t_m * math.pow(k, 2.0)) * (math.pow(math.sin(k), 2.0) * ((1.0 / l) / math.cos(k)))) / l) elif t_m <= 1.15e+98: tmp = 2.0 / (((math.tan(k) * t_2) * (math.sin(k) * (math.pow(t_m, 3.0) / l))) / l) else: tmp = (2.0 / math.pow(((k * math.pow(t_m, 1.5)) / l), 2.0)) / t_2 return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(2.0 + (Float64(k / t_m) ^ 2.0)) tmp = 0.0 if (t_m <= 8e-40) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) * Float64((sin(k) ^ 2.0) * Float64(Float64(1.0 / l) / cos(k)))) / l)); elseif (t_m <= 1.15e+98) tmp = Float64(2.0 / Float64(Float64(Float64(tan(k) * t_2) * Float64(sin(k) * Float64((t_m ^ 3.0) / l))) / l)); else tmp = Float64(Float64(2.0 / (Float64(Float64(k * (t_m ^ 1.5)) / l) ^ 2.0)) / 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 = 2.0 + ((k / t_m) ^ 2.0); tmp = 0.0; if (t_m <= 8e-40) tmp = 2.0 / (((t_m * (k ^ 2.0)) * ((sin(k) ^ 2.0) * ((1.0 / l) / cos(k)))) / l); elseif (t_m <= 1.15e+98) tmp = 2.0 / (((tan(k) * t_2) * (sin(k) * ((t_m ^ 3.0) / l))) / l); else tmp = (2.0 / (((k * (t_m ^ 1.5)) / l) ^ 2.0)) / 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[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 8e-40], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(N[(1.0 / l), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.15e+98], N[(2.0 / N[(N[(N[(N[Tan[k], $MachinePrecision] * t$95$2), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[Power[N[(N[(k * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := 2 + {\left(\frac{k}{t_m}\right)}^{2}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 8 \cdot 10^{-40}:\\
\;\;\;\;\frac{2}{\frac{\left(t_m \cdot {k}^{2}\right) \cdot \left({\sin k}^{2} \cdot \frac{\frac{1}{\ell}}{\cos k}\right)}{\ell}}\\
\mathbf{elif}\;t_m \leq 1.15 \cdot 10^{+98}:\\
\;\;\;\;\frac{2}{\frac{\left(\tan k \cdot t_2\right) \cdot \left(\sin k \cdot \frac{{t_m}^{3}}{\ell}\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{{\left(\frac{k \cdot {t_m}^{1.5}}{\ell}\right)}^{2}}}{t_2}\\
\end{array}
\end{array}
\end{array}
if t < 7.9999999999999994e-40Initial program 51.3%
associate-*l*51.3%
sqr-neg51.3%
sqr-neg51.3%
associate-/r*57.6%
distribute-rgt-in57.6%
unpow257.6%
times-frac42.7%
sqr-neg42.7%
times-frac57.6%
unpow257.6%
distribute-rgt-in57.6%
Simplified57.6%
associate-*l/58.2%
associate-*l/59.2%
Applied egg-rr59.2%
Taylor expanded in t around 0 69.2%
div-inv69.2%
associate-*r*69.2%
add-sqr-sqrt21.2%
pow221.2%
unpow-prod-down25.3%
*-commutative25.3%
unpow-prod-down21.2%
pow221.2%
add-sqr-sqrt69.2%
Applied egg-rr69.2%
associate-*l*70.2%
*-commutative70.2%
associate-/r*70.2%
Simplified70.2%
if 7.9999999999999994e-40 < t < 1.15000000000000007e98Initial program 83.6%
associate-*l*83.6%
sqr-neg83.6%
sqr-neg83.6%
associate-/r*90.2%
distribute-rgt-in90.2%
unpow290.2%
times-frac83.7%
sqr-neg83.7%
times-frac90.2%
unpow290.2%
distribute-rgt-in90.2%
Simplified90.2%
associate-*l/96.5%
associate-*l/96.5%
Applied egg-rr96.5%
if 1.15000000000000007e98 < t Initial program 59.0%
associate-/r*59.0%
sqr-neg59.0%
associate-*l*47.1%
sqr-neg47.1%
associate-/r*54.4%
associate-+l+54.4%
unpow254.4%
times-frac38.0%
sqr-neg38.0%
times-frac54.4%
unpow254.4%
Simplified54.4%
add-sqr-sqrt38.0%
pow238.0%
sqrt-prod38.0%
associate-/l/30.8%
sqrt-div33.0%
sqrt-pow143.1%
metadata-eval43.1%
sqrt-unprod31.6%
add-sqr-sqrt56.8%
Applied egg-rr56.8%
Taylor expanded in k around 0 86.7%
associate-*l/88.9%
Applied egg-rr88.9%
Final simplification76.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 2.2e-9)
(/
2.0
(/ (* (* t_m (pow k 2.0)) (* (pow (sin k) 2.0) (/ (/ 1.0 l) (cos k)))) l))
(/
(/ 2.0 (pow (/ (* k (pow t_m 1.5)) l) 2.0))
(+ 2.0 (pow (/ k t_m) 2.0))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.2e-9) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) * (pow(sin(k), 2.0) * ((1.0 / l) / cos(k)))) / l);
} else {
tmp = (2.0 / pow(((k * pow(t_m, 1.5)) / l), 2.0)) / (2.0 + pow((k / t_m), 2.0));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 2.2d-9) then
tmp = 2.0d0 / (((t_m * (k ** 2.0d0)) * ((sin(k) ** 2.0d0) * ((1.0d0 / l) / cos(k)))) / l)
else
tmp = (2.0d0 / (((k * (t_m ** 1.5d0)) / l) ** 2.0d0)) / (2.0d0 + ((k / t_m) ** 2.0d0))
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.2e-9) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) * (Math.pow(Math.sin(k), 2.0) * ((1.0 / l) / Math.cos(k)))) / l);
} else {
tmp = (2.0 / Math.pow(((k * Math.pow(t_m, 1.5)) / l), 2.0)) / (2.0 + Math.pow((k / t_m), 2.0));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 2.2e-9: tmp = 2.0 / (((t_m * math.pow(k, 2.0)) * (math.pow(math.sin(k), 2.0) * ((1.0 / l) / math.cos(k)))) / l) else: tmp = (2.0 / math.pow(((k * math.pow(t_m, 1.5)) / l), 2.0)) / (2.0 + math.pow((k / t_m), 2.0)) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 2.2e-9) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) * Float64((sin(k) ^ 2.0) * Float64(Float64(1.0 / l) / cos(k)))) / l)); else tmp = Float64(Float64(2.0 / (Float64(Float64(k * (t_m ^ 1.5)) / l) ^ 2.0)) / Float64(2.0 + (Float64(k / t_m) ^ 2.0))); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 2.2e-9) tmp = 2.0 / (((t_m * (k ^ 2.0)) * ((sin(k) ^ 2.0) * ((1.0 / l) / cos(k)))) / l); else tmp = (2.0 / (((k * (t_m ^ 1.5)) / l) ^ 2.0)) / (2.0 + ((k / t_m) ^ 2.0)); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.2e-9], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(N[(1.0 / l), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[Power[N[(N[(k * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $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}\;t_m \leq 2.2 \cdot 10^{-9}:\\
\;\;\;\;\frac{2}{\frac{\left(t_m \cdot {k}^{2}\right) \cdot \left({\sin k}^{2} \cdot \frac{\frac{1}{\ell}}{\cos k}\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{{\left(\frac{k \cdot {t_m}^{1.5}}{\ell}\right)}^{2}}}{2 + {\left(\frac{k}{t_m}\right)}^{2}}\\
\end{array}
\end{array}
if t < 2.1999999999999998e-9Initial program 51.8%
associate-*l*51.8%
sqr-neg51.8%
sqr-neg51.8%
associate-/r*58.1%
distribute-rgt-in58.1%
unpow258.1%
times-frac43.3%
sqr-neg43.3%
times-frac58.1%
unpow258.1%
distribute-rgt-in58.1%
Simplified58.1%
associate-*l/58.6%
associate-*l/59.6%
Applied egg-rr59.6%
Taylor expanded in t around 0 69.6%
div-inv69.6%
associate-*r*69.6%
add-sqr-sqrt22.0%
pow222.0%
unpow-prod-down26.1%
*-commutative26.1%
unpow-prod-down22.0%
pow222.0%
add-sqr-sqrt69.6%
Applied egg-rr69.6%
associate-*l*70.5%
*-commutative70.5%
associate-/r*70.5%
Simplified70.5%
if 2.1999999999999998e-9 < t Initial program 68.3%
associate-/r*68.2%
sqr-neg68.2%
associate-*l*59.6%
sqr-neg59.6%
associate-/r*66.8%
associate-+l+66.8%
unpow266.8%
times-frac54.1%
sqr-neg54.1%
times-frac66.8%
unpow266.8%
Simplified66.8%
add-sqr-sqrt49.8%
pow249.8%
sqrt-prod49.8%
associate-/l/44.1%
sqrt-div46.8%
sqrt-pow152.9%
metadata-eval52.9%
sqrt-unprod27.7%
add-sqr-sqrt62.6%
Applied egg-rr62.6%
Taylor expanded in k around 0 87.6%
associate-*l/89.1%
Applied egg-rr89.1%
Final simplification75.7%
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.12e-8)
(/ 2.0 (/ (* (/ (pow k 2.0) l) (/ t_m (/ (cos k) (pow (sin k) 2.0)))) l))
(/
(/ 2.0 (pow (/ (* k (pow t_m 1.5)) l) 2.0))
(+ 2.0 (pow (/ k t_m) 2.0))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.12e-8) {
tmp = 2.0 / (((pow(k, 2.0) / l) * (t_m / (cos(k) / pow(sin(k), 2.0)))) / l);
} else {
tmp = (2.0 / pow(((k * pow(t_m, 1.5)) / l), 2.0)) / (2.0 + pow((k / t_m), 2.0));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1.12d-8) then
tmp = 2.0d0 / ((((k ** 2.0d0) / l) * (t_m / (cos(k) / (sin(k) ** 2.0d0)))) / l)
else
tmp = (2.0d0 / (((k * (t_m ** 1.5d0)) / l) ** 2.0d0)) / (2.0d0 + ((k / t_m) ** 2.0d0))
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.12e-8) {
tmp = 2.0 / (((Math.pow(k, 2.0) / l) * (t_m / (Math.cos(k) / Math.pow(Math.sin(k), 2.0)))) / l);
} else {
tmp = (2.0 / Math.pow(((k * Math.pow(t_m, 1.5)) / l), 2.0)) / (2.0 + Math.pow((k / t_m), 2.0));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 1.12e-8: tmp = 2.0 / (((math.pow(k, 2.0) / l) * (t_m / (math.cos(k) / math.pow(math.sin(k), 2.0)))) / l) else: tmp = (2.0 / math.pow(((k * math.pow(t_m, 1.5)) / l), 2.0)) / (2.0 + math.pow((k / t_m), 2.0)) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.12e-8) tmp = Float64(2.0 / Float64(Float64(Float64((k ^ 2.0) / l) * Float64(t_m / Float64(cos(k) / (sin(k) ^ 2.0)))) / l)); else tmp = Float64(Float64(2.0 / (Float64(Float64(k * (t_m ^ 1.5)) / l) ^ 2.0)) / Float64(2.0 + (Float64(k / t_m) ^ 2.0))); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 1.12e-8) tmp = 2.0 / ((((k ^ 2.0) / l) * (t_m / (cos(k) / (sin(k) ^ 2.0)))) / l); else tmp = (2.0 / (((k * (t_m ^ 1.5)) / l) ^ 2.0)) / (2.0 + ((k / t_m) ^ 2.0)); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.12e-8], N[(2.0 / N[(N[(N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[Power[N[(N[(k * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $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}\;t_m \leq 1.12 \cdot 10^{-8}:\\
\;\;\;\;\frac{2}{\frac{\frac{{k}^{2}}{\ell} \cdot \frac{t_m}{\frac{\cos k}{{\sin k}^{2}}}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{{\left(\frac{k \cdot {t_m}^{1.5}}{\ell}\right)}^{2}}}{2 + {\left(\frac{k}{t_m}\right)}^{2}}\\
\end{array}
\end{array}
if t < 1.11999999999999994e-8Initial program 51.8%
associate-*l*51.8%
sqr-neg51.8%
sqr-neg51.8%
associate-/r*58.1%
distribute-rgt-in58.1%
unpow258.1%
times-frac43.3%
sqr-neg43.3%
times-frac58.1%
unpow258.1%
distribute-rgt-in58.1%
Simplified58.1%
associate-*l/58.6%
associate-*l/59.6%
Applied egg-rr59.6%
Taylor expanded in t around 0 69.6%
div-inv69.6%
times-frac71.5%
Applied egg-rr71.5%
associate-*r/71.5%
*-rgt-identity71.5%
associate-/l*71.5%
Simplified71.5%
if 1.11999999999999994e-8 < t Initial program 68.3%
associate-/r*68.2%
sqr-neg68.2%
associate-*l*59.6%
sqr-neg59.6%
associate-/r*66.8%
associate-+l+66.8%
unpow266.8%
times-frac54.1%
sqr-neg54.1%
times-frac66.8%
unpow266.8%
Simplified66.8%
add-sqr-sqrt49.8%
pow249.8%
sqrt-prod49.8%
associate-/l/44.1%
sqrt-div46.8%
sqrt-pow152.9%
metadata-eval52.9%
sqrt-unprod27.7%
add-sqr-sqrt62.6%
Applied egg-rr62.6%
Taylor expanded in k around 0 87.6%
associate-*l/89.1%
Applied egg-rr89.1%
Final simplification76.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.25e-27)
(/ 2.0 (/ (/ (pow k 4.0) (/ l t_m)) l))
(/ 2.0 (/ (* 2.0 (/ k (/ (* l (cos k)) (* (sin k) (pow t_m 3.0))))) l)))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.25e-27) {
tmp = 2.0 / ((pow(k, 4.0) / (l / t_m)) / l);
} else {
tmp = 2.0 / ((2.0 * (k / ((l * cos(k)) / (sin(k) * pow(t_m, 3.0))))) / l);
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1.25d-27) then
tmp = 2.0d0 / (((k ** 4.0d0) / (l / t_m)) / l)
else
tmp = 2.0d0 / ((2.0d0 * (k / ((l * cos(k)) / (sin(k) * (t_m ** 3.0d0))))) / l)
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.25e-27) {
tmp = 2.0 / ((Math.pow(k, 4.0) / (l / t_m)) / l);
} else {
tmp = 2.0 / ((2.0 * (k / ((l * Math.cos(k)) / (Math.sin(k) * Math.pow(t_m, 3.0))))) / l);
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 1.25e-27: tmp = 2.0 / ((math.pow(k, 4.0) / (l / t_m)) / l) else: tmp = 2.0 / ((2.0 * (k / ((l * math.cos(k)) / (math.sin(k) * math.pow(t_m, 3.0))))) / l) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.25e-27) tmp = Float64(2.0 / Float64(Float64((k ^ 4.0) / Float64(l / t_m)) / l)); else tmp = Float64(2.0 / Float64(Float64(2.0 * Float64(k / Float64(Float64(l * cos(k)) / Float64(sin(k) * (t_m ^ 3.0))))) / l)); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 1.25e-27) tmp = 2.0 / (((k ^ 4.0) / (l / t_m)) / l); else tmp = 2.0 / ((2.0 * (k / ((l * cos(k)) / (sin(k) * (t_m ^ 3.0))))) / l); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.25e-27], N[(2.0 / N[(N[(N[Power[k, 4.0], $MachinePrecision] / N[(l / t$95$m), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[(k / N[(N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 1.25 \cdot 10^{-27}:\\
\;\;\;\;\frac{2}{\frac{\frac{{k}^{4}}{\frac{\ell}{t_m}}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{2 \cdot \frac{k}{\frac{\ell \cdot \cos k}{\sin k \cdot {t_m}^{3}}}}{\ell}}\\
\end{array}
\end{array}
if t < 1.25e-27Initial program 51.3%
associate-*l*51.3%
sqr-neg51.3%
sqr-neg51.3%
associate-/r*57.6%
distribute-rgt-in57.6%
unpow257.6%
times-frac42.7%
sqr-neg42.7%
times-frac57.6%
unpow257.6%
distribute-rgt-in57.6%
Simplified57.6%
associate-*l/58.2%
associate-*l/59.2%
Applied egg-rr59.2%
Taylor expanded in t around 0 69.2%
Taylor expanded in k around 0 59.8%
associate-/l*60.9%
Simplified60.9%
if 1.25e-27 < t Initial program 69.1%
associate-*l*69.1%
sqr-neg69.1%
sqr-neg69.1%
associate-/r*76.2%
distribute-rgt-in76.2%
unpow276.2%
times-frac63.9%
sqr-neg63.9%
times-frac76.2%
unpow276.2%
distribute-rgt-in76.2%
Simplified76.2%
associate-*l/78.8%
associate-*l/78.8%
Applied egg-rr78.8%
Taylor expanded in k around 0 76.2%
Taylor expanded in t around inf 74.9%
associate-/l*76.3%
Simplified76.3%
Final simplification65.3%
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.2e-111)
(/ 2.0 (/ (/ (pow k 4.0) (/ l t_m)) l))
(/
(* 2.0 (pow (* k (/ (pow t_m 1.5) l)) -2.0))
(+ 2.0 (pow (/ k t_m) 2.0))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3.2e-111) {
tmp = 2.0 / ((pow(k, 4.0) / (l / t_m)) / l);
} else {
tmp = (2.0 * pow((k * (pow(t_m, 1.5) / l)), -2.0)) / (2.0 + pow((k / t_m), 2.0));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 3.2d-111) then
tmp = 2.0d0 / (((k ** 4.0d0) / (l / t_m)) / l)
else
tmp = (2.0d0 * ((k * ((t_m ** 1.5d0) / l)) ** (-2.0d0))) / (2.0d0 + ((k / t_m) ** 2.0d0))
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3.2e-111) {
tmp = 2.0 / ((Math.pow(k, 4.0) / (l / t_m)) / l);
} else {
tmp = (2.0 * Math.pow((k * (Math.pow(t_m, 1.5) / l)), -2.0)) / (2.0 + Math.pow((k / t_m), 2.0));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 3.2e-111: tmp = 2.0 / ((math.pow(k, 4.0) / (l / t_m)) / l) else: tmp = (2.0 * math.pow((k * (math.pow(t_m, 1.5) / l)), -2.0)) / (2.0 + math.pow((k / t_m), 2.0)) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 3.2e-111) tmp = Float64(2.0 / Float64(Float64((k ^ 4.0) / Float64(l / t_m)) / l)); else tmp = Float64(Float64(2.0 * (Float64(k * Float64((t_m ^ 1.5) / l)) ^ -2.0)) / Float64(2.0 + (Float64(k / t_m) ^ 2.0))); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 3.2e-111) tmp = 2.0 / (((k ^ 4.0) / (l / t_m)) / l); else tmp = (2.0 * ((k * ((t_m ^ 1.5) / l)) ^ -2.0)) / (2.0 + ((k / t_m) ^ 2.0)); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3.2e-111], N[(2.0 / N[(N[(N[Power[k, 4.0], $MachinePrecision] / N[(l / t$95$m), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[Power[N[(k * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $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}\;t_m \leq 3.2 \cdot 10^{-111}:\\
\;\;\;\;\frac{2}{\frac{\frac{{k}^{4}}{\frac{\ell}{t_m}}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot {\left(k \cdot \frac{{t_m}^{1.5}}{\ell}\right)}^{-2}}{2 + {\left(\frac{k}{t_m}\right)}^{2}}\\
\end{array}
\end{array}
if t < 3.1999999999999998e-111Initial program 51.0%
associate-*l*51.0%
sqr-neg51.0%
sqr-neg51.0%
associate-/r*57.3%
distribute-rgt-in57.3%
unpow257.3%
times-frac41.3%
sqr-neg41.3%
times-frac57.3%
unpow257.3%
distribute-rgt-in57.3%
Simplified57.3%
associate-*l/57.8%
associate-*l/58.9%
Applied egg-rr58.9%
Taylor expanded in t around 0 68.4%
Taylor expanded in k around 0 60.0%
associate-/l*61.2%
Simplified61.2%
if 3.1999999999999998e-111 < t Initial program 67.2%
associate-/r*67.2%
sqr-neg67.2%
associate-*l*59.8%
sqr-neg59.8%
associate-/r*66.1%
associate-+l+66.1%
unpow266.1%
times-frac55.3%
sqr-neg55.3%
times-frac66.1%
unpow266.1%
Simplified66.1%
add-sqr-sqrt49.3%
pow249.3%
sqrt-prod49.2%
associate-/l/44.3%
sqrt-div46.6%
sqrt-pow151.8%
metadata-eval51.8%
sqrt-unprod24.6%
add-sqr-sqrt60.0%
Applied egg-rr60.0%
Taylor expanded in k around 0 83.7%
div-inv83.7%
div-inv83.7%
pow-flip84.2%
*-commutative84.2%
metadata-eval84.2%
Applied egg-rr84.2%
associate-*r/84.2%
*-rgt-identity84.2%
Simplified84.2%
Final simplification68.7%
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 2e-111)
(/ 2.0 (/ (/ (pow k 4.0) (/ l t_m)) l))
(/
(/ 2.0 (pow (/ (* k (pow t_m 1.5)) l) 2.0))
(+ 2.0 (pow (/ k t_m) 2.0))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2e-111) {
tmp = 2.0 / ((pow(k, 4.0) / (l / t_m)) / l);
} else {
tmp = (2.0 / pow(((k * pow(t_m, 1.5)) / l), 2.0)) / (2.0 + pow((k / t_m), 2.0));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 2d-111) then
tmp = 2.0d0 / (((k ** 4.0d0) / (l / t_m)) / l)
else
tmp = (2.0d0 / (((k * (t_m ** 1.5d0)) / l) ** 2.0d0)) / (2.0d0 + ((k / t_m) ** 2.0d0))
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2e-111) {
tmp = 2.0 / ((Math.pow(k, 4.0) / (l / t_m)) / l);
} else {
tmp = (2.0 / Math.pow(((k * Math.pow(t_m, 1.5)) / l), 2.0)) / (2.0 + Math.pow((k / t_m), 2.0));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 2e-111: tmp = 2.0 / ((math.pow(k, 4.0) / (l / t_m)) / l) else: tmp = (2.0 / math.pow(((k * math.pow(t_m, 1.5)) / l), 2.0)) / (2.0 + math.pow((k / t_m), 2.0)) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 2e-111) tmp = Float64(2.0 / Float64(Float64((k ^ 4.0) / Float64(l / t_m)) / l)); else tmp = Float64(Float64(2.0 / (Float64(Float64(k * (t_m ^ 1.5)) / l) ^ 2.0)) / Float64(2.0 + (Float64(k / t_m) ^ 2.0))); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 2e-111) tmp = 2.0 / (((k ^ 4.0) / (l / t_m)) / l); else tmp = (2.0 / (((k * (t_m ^ 1.5)) / l) ^ 2.0)) / (2.0 + ((k / t_m) ^ 2.0)); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2e-111], N[(2.0 / N[(N[(N[Power[k, 4.0], $MachinePrecision] / N[(l / t$95$m), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[Power[N[(N[(k * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $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}\;t_m \leq 2 \cdot 10^{-111}:\\
\;\;\;\;\frac{2}{\frac{\frac{{k}^{4}}{\frac{\ell}{t_m}}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{{\left(\frac{k \cdot {t_m}^{1.5}}{\ell}\right)}^{2}}}{2 + {\left(\frac{k}{t_m}\right)}^{2}}\\
\end{array}
\end{array}
if t < 2.00000000000000018e-111Initial program 51.0%
associate-*l*51.0%
sqr-neg51.0%
sqr-neg51.0%
associate-/r*57.3%
distribute-rgt-in57.3%
unpow257.3%
times-frac41.3%
sqr-neg41.3%
times-frac57.3%
unpow257.3%
distribute-rgt-in57.3%
Simplified57.3%
associate-*l/57.8%
associate-*l/58.9%
Applied egg-rr58.9%
Taylor expanded in t around 0 68.4%
Taylor expanded in k around 0 60.0%
associate-/l*61.2%
Simplified61.2%
if 2.00000000000000018e-111 < t Initial program 67.2%
associate-/r*67.2%
sqr-neg67.2%
associate-*l*59.8%
sqr-neg59.8%
associate-/r*66.1%
associate-+l+66.1%
unpow266.1%
times-frac55.3%
sqr-neg55.3%
times-frac66.1%
unpow266.1%
Simplified66.1%
add-sqr-sqrt49.3%
pow249.3%
sqrt-prod49.2%
associate-/l/44.3%
sqrt-div46.6%
sqrt-pow151.8%
metadata-eval51.8%
sqrt-unprod24.6%
add-sqr-sqrt60.0%
Applied egg-rr60.0%
Taylor expanded in k around 0 83.7%
associate-*l/84.9%
Applied egg-rr84.9%
Final simplification69.0%
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 5.8e-49)
(/ 2.0 (/ (/ (pow k 4.0) (/ l t_m)) l))
(/ 2.0 (/ (* 2.0 (/ (* (pow k 2.0) (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 <= 5.8e-49) {
tmp = 2.0 / ((pow(k, 4.0) / (l / t_m)) / l);
} else {
tmp = 2.0 / ((2.0 * ((pow(k, 2.0) * 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 <= 5.8d-49) then
tmp = 2.0d0 / (((k ** 4.0d0) / (l / t_m)) / l)
else
tmp = 2.0d0 / ((2.0d0 * (((k ** 2.0d0) * (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 <= 5.8e-49) {
tmp = 2.0 / ((Math.pow(k, 4.0) / (l / t_m)) / l);
} else {
tmp = 2.0 / ((2.0 * ((Math.pow(k, 2.0) * 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 <= 5.8e-49: tmp = 2.0 / ((math.pow(k, 4.0) / (l / t_m)) / l) else: tmp = 2.0 / ((2.0 * ((math.pow(k, 2.0) * 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 <= 5.8e-49) tmp = Float64(2.0 / Float64(Float64((k ^ 4.0) / Float64(l / t_m)) / l)); else tmp = Float64(2.0 / Float64(Float64(2.0 * Float64(Float64((k ^ 2.0) * (t_m ^ 3.0)) / l)) / l)); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 5.8e-49) tmp = 2.0 / (((k ^ 4.0) / (l / t_m)) / l); else tmp = 2.0 / ((2.0 * (((k ^ 2.0) * (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, 5.8e-49], N[(2.0 / N[(N[(N[Power[k, 4.0], $MachinePrecision] / N[(l / t$95$m), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 5.8 \cdot 10^{-49}:\\
\;\;\;\;\frac{2}{\frac{\frac{{k}^{4}}{\frac{\ell}{t_m}}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{2 \cdot \frac{{k}^{2} \cdot {t_m}^{3}}{\ell}}{\ell}}\\
\end{array}
\end{array}
if t < 5.8e-49Initial program 51.5%
associate-*l*51.5%
sqr-neg51.5%
sqr-neg51.5%
associate-/r*57.9%
distribute-rgt-in58.0%
unpow258.0%
times-frac42.9%
sqr-neg42.9%
times-frac58.0%
unpow258.0%
distribute-rgt-in57.9%
Simplified57.9%
associate-*l/58.5%
associate-*l/59.5%
Applied egg-rr59.5%
Taylor expanded in t around 0 69.6%
Taylor expanded in k around 0 60.1%
associate-/l*61.2%
Simplified61.2%
if 5.8e-49 < t Initial program 68.2%
associate-*l*68.2%
sqr-neg68.2%
sqr-neg68.2%
associate-/r*75.2%
distribute-rgt-in75.2%
unpow275.2%
times-frac63.0%
sqr-neg63.0%
times-frac75.2%
unpow275.2%
distribute-rgt-in75.2%
Simplified75.2%
associate-*l/77.7%
associate-*l/77.7%
Applied egg-rr77.7%
Taylor expanded in k around 0 64.2%
Final simplification62.1%
t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 2.0 (/ (/ (* t_m (pow k 4.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) {
return t_s * (2.0 / (((t_m * pow(k, 4.0)) / l) / l));
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / (((t_m * (k ** 4.0d0)) / l) / l))
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / (((t_m * Math.pow(k, 4.0)) / l) / l));
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / (((t_m * math.pow(k, 4.0)) / l) / l))
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 4.0)) / l) / l))) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / (((t_m * (k ^ 4.0)) / l) / l)); end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \frac{2}{\frac{\frac{t_m \cdot {k}^{4}}{\ell}}{\ell}}
\end{array}
Initial program 56.4%
associate-*l*56.3%
sqr-neg56.3%
sqr-neg56.3%
associate-/r*62.9%
distribute-rgt-in62.9%
unpow262.9%
times-frac48.7%
sqr-neg48.7%
times-frac62.9%
unpow262.9%
distribute-rgt-in62.9%
Simplified62.9%
associate-*l/64.1%
associate-*l/64.8%
Applied egg-rr64.8%
Taylor expanded in t around 0 64.9%
Taylor expanded in k around 0 57.4%
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 (/ 2.0 (/ (/ (pow k 4.0) (/ l t_m)) l))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((pow(k, 4.0) / (l / t_m)) / l));
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / (((k ** 4.0d0) / (l / t_m)) / l))
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((Math.pow(k, 4.0) / (l / t_m)) / l));
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / ((math.pow(k, 4.0) / (l / t_m)) / l))
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64(Float64((k ^ 4.0) / Float64(l / t_m)) / l))) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / (((k ^ 4.0) / (l / t_m)) / l)); end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(N[Power[k, 4.0], $MachinePrecision] / N[(l / t$95$m), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \frac{2}{\frac{\frac{{k}^{4}}{\frac{\ell}{t_m}}}{\ell}}
\end{array}
Initial program 56.4%
associate-*l*56.3%
sqr-neg56.3%
sqr-neg56.3%
associate-/r*62.9%
distribute-rgt-in62.9%
unpow262.9%
times-frac48.7%
sqr-neg48.7%
times-frac62.9%
unpow262.9%
distribute-rgt-in62.9%
Simplified62.9%
associate-*l/64.1%
associate-*l/64.8%
Applied egg-rr64.8%
Taylor expanded in t around 0 64.9%
Taylor expanded in k around 0 57.4%
associate-/l*58.5%
Simplified58.5%
Final simplification58.5%
herbie shell --seed 2024024
(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))))