
(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 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1320.0)
(* 2.0 (* (pow (/ l k) 2.0) (/ (cos k) (* t_m (pow (sin k) 2.0)))))
(/
2.0
(*
(pow (* (cbrt (sin k)) (/ t_m (pow (cbrt l) 2.0))) 3.0)
(* (tan k) (pow (cbrt (+ 2.0 (pow (/ k t_m) 2.0))) 3.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1320.0) {
tmp = 2.0 * (pow((l / k), 2.0) * (cos(k) / (t_m * pow(sin(k), 2.0))));
} else {
tmp = 2.0 / (pow((cbrt(sin(k)) * (t_m / pow(cbrt(l), 2.0))), 3.0) * (tan(k) * pow(cbrt((2.0 + pow((k / t_m), 2.0))), 3.0)));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1320.0) {
tmp = 2.0 * (Math.pow((l / k), 2.0) * (Math.cos(k) / (t_m * Math.pow(Math.sin(k), 2.0))));
} else {
tmp = 2.0 / (Math.pow((Math.cbrt(Math.sin(k)) * (t_m / Math.pow(Math.cbrt(l), 2.0))), 3.0) * (Math.tan(k) * Math.pow(Math.cbrt((2.0 + Math.pow((k / t_m), 2.0))), 3.0)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1320.0) tmp = Float64(2.0 * Float64((Float64(l / k) ^ 2.0) * Float64(cos(k) / Float64(t_m * (sin(k) ^ 2.0))))); else tmp = Float64(2.0 / Float64((Float64(cbrt(sin(k)) * Float64(t_m / (cbrt(l) ^ 2.0))) ^ 3.0) * Float64(tan(k) * (cbrt(Float64(2.0 + (Float64(k / t_m) ^ 2.0))) ^ 3.0)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1320.0], N[(2.0 * N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[Power[N[Power[N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1320:\\
\;\;\;\;2 \cdot \left({\left(\frac{\ell}{k}\right)}^{2} \cdot \frac{\cos k}{t\_m \cdot {\sin k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(\tan k \cdot {\left(\sqrt[3]{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\right)}^{3}\right)}\\
\end{array}
\end{array}
if t < 1320Initial program 57.6%
Simplified57.6%
add-cube-cbrt57.6%
pow357.6%
associate-/r*61.0%
*-commutative61.0%
cbrt-prod60.9%
associate-/r*57.6%
cbrt-div58.5%
rem-cbrt-cube64.7%
cbrt-prod73.2%
pow273.2%
Applied egg-rr73.2%
pow173.2%
associate-+r+73.2%
metadata-eval73.2%
Applied egg-rr73.2%
unpow173.2%
Simplified73.2%
Taylor expanded in k around inf 63.1%
times-frac64.6%
unpow264.6%
unpow264.6%
times-frac74.6%
*-rgt-identity74.6%
associate-*r/74.6%
pow-base-174.6%
*-rgt-identity74.6%
associate-*r/74.6%
pow-base-174.6%
unpow274.6%
pow-base-174.6%
associate-*r/74.6%
*-rgt-identity74.6%
Simplified74.6%
if 1320 < t Initial program 68.2%
Simplified68.2%
add-cube-cbrt68.1%
pow368.1%
associate-/r*75.3%
*-commutative75.3%
cbrt-prod75.3%
associate-/r*68.1%
cbrt-div68.0%
rem-cbrt-cube71.8%
cbrt-prod95.8%
pow295.8%
Applied egg-rr95.8%
associate-+r+95.8%
metadata-eval95.8%
add-cube-cbrt95.8%
pow395.9%
Applied egg-rr95.9%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 15000.0)
(* 2.0 (* (pow (/ l k) 2.0) (/ (cos k) (* t_m (pow (sin k) 2.0)))))
(/
2.0
(*
(pow (* (cbrt (sin k)) (/ t_m (pow (cbrt l) 2.0))) 3.0)
(* (tan k) (+ 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 <= 15000.0) {
tmp = 2.0 * (pow((l / k), 2.0) * (cos(k) / (t_m * pow(sin(k), 2.0))));
} else {
tmp = 2.0 / (pow((cbrt(sin(k)) * (t_m / pow(cbrt(l), 2.0))), 3.0) * (tan(k) * (2.0 + pow((k / t_m), 2.0))));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 15000.0) {
tmp = 2.0 * (Math.pow((l / k), 2.0) * (Math.cos(k) / (t_m * Math.pow(Math.sin(k), 2.0))));
} else {
tmp = 2.0 / (Math.pow((Math.cbrt(Math.sin(k)) * (t_m / Math.pow(Math.cbrt(l), 2.0))), 3.0) * (Math.tan(k) * (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 <= 15000.0) tmp = Float64(2.0 * Float64((Float64(l / k) ^ 2.0) * Float64(cos(k) / Float64(t_m * (sin(k) ^ 2.0))))); else tmp = Float64(2.0 / Float64((Float64(cbrt(sin(k)) * Float64(t_m / (cbrt(l) ^ 2.0))) ^ 3.0) * Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 15000.0], N[(2.0 * N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 15000:\\
\;\;\;\;2 \cdot \left({\left(\frac{\ell}{k}\right)}^{2} \cdot \frac{\cos k}{t\_m \cdot {\sin k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)}\\
\end{array}
\end{array}
if t < 15000Initial program 57.6%
Simplified57.6%
add-cube-cbrt57.6%
pow357.6%
associate-/r*61.0%
*-commutative61.0%
cbrt-prod60.9%
associate-/r*57.6%
cbrt-div58.5%
rem-cbrt-cube64.7%
cbrt-prod73.2%
pow273.2%
Applied egg-rr73.2%
pow173.2%
associate-+r+73.2%
metadata-eval73.2%
Applied egg-rr73.2%
unpow173.2%
Simplified73.2%
Taylor expanded in k around inf 63.1%
times-frac64.6%
unpow264.6%
unpow264.6%
times-frac74.6%
*-rgt-identity74.6%
associate-*r/74.6%
pow-base-174.6%
*-rgt-identity74.6%
associate-*r/74.6%
pow-base-174.6%
unpow274.6%
pow-base-174.6%
associate-*r/74.6%
*-rgt-identity74.6%
Simplified74.6%
if 15000 < t Initial program 68.2%
Simplified68.2%
add-cube-cbrt68.1%
pow368.1%
associate-/r*75.3%
*-commutative75.3%
cbrt-prod75.3%
associate-/r*68.1%
cbrt-div68.0%
rem-cbrt-cube71.8%
cbrt-prod95.8%
pow295.8%
Applied egg-rr95.8%
pow195.8%
associate-+r+95.8%
metadata-eval95.8%
Applied egg-rr95.8%
unpow195.8%
Simplified95.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 2.2e+38)
(/
2.0
(*
(pow (* (cbrt (sin k)) (/ t_m (pow (cbrt l) 2.0))) 3.0)
(* 2.0 (/ (sin k) (cos k)))))
(* 2.0 (* (pow (/ l k) 2.0) (/ (cos k) (* t_m (pow (sin k) 2.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 2.2e+38) {
tmp = 2.0 / (pow((cbrt(sin(k)) * (t_m / pow(cbrt(l), 2.0))), 3.0) * (2.0 * (sin(k) / cos(k))));
} else {
tmp = 2.0 * (pow((l / k), 2.0) * (cos(k) / (t_m * pow(sin(k), 2.0))));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 2.2e+38) {
tmp = 2.0 / (Math.pow((Math.cbrt(Math.sin(k)) * (t_m / Math.pow(Math.cbrt(l), 2.0))), 3.0) * (2.0 * (Math.sin(k) / Math.cos(k))));
} else {
tmp = 2.0 * (Math.pow((l / k), 2.0) * (Math.cos(k) / (t_m * Math.pow(Math.sin(k), 2.0))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 2.2e+38) tmp = Float64(2.0 / Float64((Float64(cbrt(sin(k)) * Float64(t_m / (cbrt(l) ^ 2.0))) ^ 3.0) * Float64(2.0 * Float64(sin(k) / cos(k))))); else tmp = Float64(2.0 * Float64((Float64(l / k) ^ 2.0) * Float64(cos(k) / Float64(t_m * (sin(k) ^ 2.0))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 2.2e+38], N[(2.0 / N[(N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * N[(N[Sin[k], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2.2 \cdot 10^{+38}:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot \frac{\sin k}{\cos k}\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left({\left(\frac{\ell}{k}\right)}^{2} \cdot \frac{\cos k}{t\_m \cdot {\sin k}^{2}}\right)\\
\end{array}
\end{array}
if k < 2.20000000000000006e38Initial program 65.1%
Simplified65.1%
add-cube-cbrt65.1%
pow365.1%
associate-/r*68.4%
*-commutative68.4%
cbrt-prod68.4%
associate-/r*65.1%
cbrt-div65.9%
rem-cbrt-cube70.9%
cbrt-prod83.3%
pow283.3%
Applied egg-rr83.3%
Taylor expanded in t around inf 80.4%
if 2.20000000000000006e38 < k Initial program 39.9%
Simplified39.9%
add-cube-cbrt39.8%
pow339.8%
associate-/r*47.6%
*-commutative47.6%
cbrt-prod47.6%
associate-/r*39.9%
cbrt-div39.8%
rem-cbrt-cube48.0%
cbrt-prod59.1%
pow259.1%
Applied egg-rr59.1%
pow159.1%
associate-+r+59.1%
metadata-eval59.1%
Applied egg-rr59.1%
unpow159.1%
Simplified59.1%
Taylor expanded in k around inf 62.7%
times-frac62.9%
unpow262.9%
unpow262.9%
times-frac89.6%
*-rgt-identity89.6%
associate-*r/89.6%
pow-base-189.6%
*-rgt-identity89.6%
associate-*r/89.5%
pow-base-189.5%
unpow289.5%
pow-base-189.5%
associate-*r/89.6%
*-rgt-identity89.6%
Simplified89.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1.7e+37)
(/
2.0
(*
(pow (* (cbrt (sin k)) (/ t_m (pow (cbrt l) 2.0))) 3.0)
(* 2.0 (tan k))))
(* 2.0 (* (pow (/ l k) 2.0) (/ (cos k) (* t_m (pow (sin k) 2.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.7e+37) {
tmp = 2.0 / (pow((cbrt(sin(k)) * (t_m / pow(cbrt(l), 2.0))), 3.0) * (2.0 * tan(k)));
} else {
tmp = 2.0 * (pow((l / k), 2.0) * (cos(k) / (t_m * pow(sin(k), 2.0))));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.7e+37) {
tmp = 2.0 / (Math.pow((Math.cbrt(Math.sin(k)) * (t_m / Math.pow(Math.cbrt(l), 2.0))), 3.0) * (2.0 * Math.tan(k)));
} else {
tmp = 2.0 * (Math.pow((l / k), 2.0) * (Math.cos(k) / (t_m * Math.pow(Math.sin(k), 2.0))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.7e+37) tmp = Float64(2.0 / Float64((Float64(cbrt(sin(k)) * Float64(t_m / (cbrt(l) ^ 2.0))) ^ 3.0) * Float64(2.0 * tan(k)))); else tmp = Float64(2.0 * Float64((Float64(l / k) ^ 2.0) * Float64(cos(k) / Float64(t_m * (sin(k) ^ 2.0))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.7e+37], N[(2.0 / N[(N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.7 \cdot 10^{+37}:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot \tan k\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left({\left(\frac{\ell}{k}\right)}^{2} \cdot \frac{\cos k}{t\_m \cdot {\sin k}^{2}}\right)\\
\end{array}
\end{array}
if k < 1.70000000000000003e37Initial program 65.1%
Simplified65.1%
add-cube-cbrt65.1%
pow365.1%
associate-/r*68.4%
*-commutative68.4%
cbrt-prod68.4%
associate-/r*65.1%
cbrt-div65.9%
rem-cbrt-cube70.9%
cbrt-prod83.3%
pow283.3%
Applied egg-rr83.3%
Taylor expanded in k around 0 80.4%
if 1.70000000000000003e37 < k Initial program 39.9%
Simplified39.9%
add-cube-cbrt39.8%
pow339.8%
associate-/r*47.6%
*-commutative47.6%
cbrt-prod47.6%
associate-/r*39.9%
cbrt-div39.8%
rem-cbrt-cube48.0%
cbrt-prod59.1%
pow259.1%
Applied egg-rr59.1%
pow159.1%
associate-+r+59.1%
metadata-eval59.1%
Applied egg-rr59.1%
unpow159.1%
Simplified59.1%
Taylor expanded in k around inf 62.7%
times-frac62.9%
unpow262.9%
unpow262.9%
times-frac89.6%
*-rgt-identity89.6%
associate-*r/89.6%
pow-base-189.6%
*-rgt-identity89.6%
associate-*r/89.5%
pow-base-189.5%
unpow289.5%
pow-base-189.5%
associate-*r/89.6%
*-rgt-identity89.6%
Simplified89.6%
Final simplification82.2%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 0.04)
(/
2.0
(* (pow (* (cbrt (sin k)) (/ t_m (pow (cbrt l) 2.0))) 3.0) (* 2.0 k)))
(* 2.0 (* (pow (/ l k) 2.0) (/ (cos k) (* t_m (pow (sin k) 2.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 0.04) {
tmp = 2.0 / (pow((cbrt(sin(k)) * (t_m / pow(cbrt(l), 2.0))), 3.0) * (2.0 * k));
} else {
tmp = 2.0 * (pow((l / k), 2.0) * (cos(k) / (t_m * pow(sin(k), 2.0))));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 0.04) {
tmp = 2.0 / (Math.pow((Math.cbrt(Math.sin(k)) * (t_m / Math.pow(Math.cbrt(l), 2.0))), 3.0) * (2.0 * k));
} else {
tmp = 2.0 * (Math.pow((l / k), 2.0) * (Math.cos(k) / (t_m * Math.pow(Math.sin(k), 2.0))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 0.04) tmp = Float64(2.0 / Float64((Float64(cbrt(sin(k)) * Float64(t_m / (cbrt(l) ^ 2.0))) ^ 3.0) * Float64(2.0 * k))); else tmp = Float64(2.0 * Float64((Float64(l / k) ^ 2.0) * Float64(cos(k) / Float64(t_m * (sin(k) ^ 2.0))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 0.04], N[(2.0 / N[(N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 0.04:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot k\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left({\left(\frac{\ell}{k}\right)}^{2} \cdot \frac{\cos k}{t\_m \cdot {\sin k}^{2}}\right)\\
\end{array}
\end{array}
if k < 0.0400000000000000008Initial program 65.9%
Simplified65.9%
add-cube-cbrt65.9%
pow365.9%
associate-/r*69.3%
*-commutative69.3%
cbrt-prod69.2%
associate-/r*65.9%
cbrt-div66.8%
rem-cbrt-cube71.9%
cbrt-prod83.7%
pow283.7%
Applied egg-rr83.7%
Taylor expanded in k around 0 78.2%
if 0.0400000000000000008 < k Initial program 40.2%
Simplified40.2%
add-cube-cbrt40.2%
pow340.2%
associate-/r*47.2%
*-commutative47.2%
cbrt-prod47.1%
associate-/r*40.2%
cbrt-div40.1%
rem-cbrt-cube47.4%
cbrt-prod60.4%
pow260.4%
Applied egg-rr60.4%
pow160.4%
associate-+r+60.4%
metadata-eval60.4%
Applied egg-rr60.4%
unpow160.4%
Simplified60.4%
Taylor expanded in k around inf 62.2%
times-frac62.4%
unpow262.4%
unpow262.4%
times-frac85.9%
*-rgt-identity85.9%
associate-*r/85.9%
pow-base-185.9%
*-rgt-identity85.9%
associate-*r/85.8%
pow-base-185.8%
unpow285.8%
pow-base-185.8%
associate-*r/85.9%
*-rgt-identity85.9%
Simplified85.9%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1.55e-5)
(pow (* (/ l k) (pow t_m -1.5)) 2.0)
(* 2.0 (* (pow (/ l k) 2.0) (/ (cos k) (* t_m (pow (sin k) 2.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.55e-5) {
tmp = pow(((l / k) * pow(t_m, -1.5)), 2.0);
} else {
tmp = 2.0 * (pow((l / k), 2.0) * (cos(k) / (t_m * pow(sin(k), 2.0))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1.55d-5) then
tmp = ((l / k) * (t_m ** (-1.5d0))) ** 2.0d0
else
tmp = 2.0d0 * (((l / k) ** 2.0d0) * (cos(k) / (t_m * (sin(k) ** 2.0d0))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.55e-5) {
tmp = Math.pow(((l / k) * Math.pow(t_m, -1.5)), 2.0);
} else {
tmp = 2.0 * (Math.pow((l / k), 2.0) * (Math.cos(k) / (t_m * Math.pow(Math.sin(k), 2.0))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 1.55e-5: tmp = math.pow(((l / k) * math.pow(t_m, -1.5)), 2.0) else: tmp = 2.0 * (math.pow((l / k), 2.0) * (math.cos(k) / (t_m * math.pow(math.sin(k), 2.0)))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.55e-5) tmp = Float64(Float64(l / k) * (t_m ^ -1.5)) ^ 2.0; else tmp = Float64(2.0 * Float64((Float64(l / k) ^ 2.0) * Float64(cos(k) / Float64(t_m * (sin(k) ^ 2.0))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 1.55e-5) tmp = ((l / k) * (t_m ^ -1.5)) ^ 2.0; else tmp = 2.0 * (((l / k) ^ 2.0) * (cos(k) / (t_m * (sin(k) ^ 2.0)))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.55e-5], N[Power[N[(N[(l / k), $MachinePrecision] * N[Power[t$95$m, -1.5], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(2.0 * N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.55 \cdot 10^{-5}:\\
\;\;\;\;{\left(\frac{\ell}{k} \cdot {t\_m}^{-1.5}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left({\left(\frac{\ell}{k}\right)}^{2} \cdot \frac{\cos k}{t\_m \cdot {\sin k}^{2}}\right)\\
\end{array}
\end{array}
if k < 1.55000000000000007e-5Initial program 65.9%
Simplified65.9%
add-sqr-sqrt46.6%
Applied egg-rr45.9%
unpow245.9%
associate-/l*45.9%
associate-*l*41.7%
Simplified41.7%
Taylor expanded in k around 0 42.4%
associate-/l*42.4%
associate-/l*42.4%
Simplified42.4%
pow142.4%
associate-*r/42.4%
pow1/242.4%
pow1/242.4%
pow-prod-down42.4%
metadata-eval42.4%
Applied egg-rr42.4%
unpow142.4%
pow-base-142.4%
associate-*r/42.4%
*-rgt-identity42.4%
Simplified42.4%
*-un-lft-identity42.4%
pow1/244.0%
pow-flip44.0%
pow-pow31.7%
metadata-eval31.7%
metadata-eval31.7%
Applied egg-rr31.7%
*-lft-identity31.7%
Simplified31.7%
if 1.55000000000000007e-5 < k Initial program 40.2%
Simplified40.2%
add-cube-cbrt40.2%
pow340.2%
associate-/r*47.2%
*-commutative47.2%
cbrt-prod47.1%
associate-/r*40.2%
cbrt-div40.1%
rem-cbrt-cube47.4%
cbrt-prod60.4%
pow260.4%
Applied egg-rr60.4%
pow160.4%
associate-+r+60.4%
metadata-eval60.4%
Applied egg-rr60.4%
unpow160.4%
Simplified60.4%
Taylor expanded in k around inf 62.2%
times-frac62.4%
unpow262.4%
unpow262.4%
times-frac85.9%
*-rgt-identity85.9%
associate-*r/85.9%
pow-base-185.9%
*-rgt-identity85.9%
associate-*r/85.8%
pow-base-185.8%
unpow285.8%
pow-base-185.8%
associate-*r/85.9%
*-rgt-identity85.9%
Simplified85.9%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 2.1e-92)
(/ 2.0 (* (* t_m (tan k)) (pow (/ k (pow (cbrt l) 2.0)) 3.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 <= 2.1e-92) {
tmp = 2.0 / ((t_m * tan(k)) * pow((k / pow(cbrt(l), 2.0)), 3.0));
} else {
tmp = pow(((l / k) * pow(t_m, -1.5)), 2.0);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.1e-92) {
tmp = 2.0 / ((t_m * Math.tan(k)) * Math.pow((k / Math.pow(Math.cbrt(l), 2.0)), 3.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 <= 2.1e-92) tmp = Float64(2.0 / Float64(Float64(t_m * tan(k)) * (Float64(k / (cbrt(l) ^ 2.0)) ^ 3.0))); else tmp = Float64(Float64(l / k) * (t_m ^ -1.5)) ^ 2.0; end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.1e-92], N[(2.0 / N[(N[(t$95$m * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[Power[N[(k / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[(l / k), $MachinePrecision] * N[Power[t$95$m, -1.5], $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 2.1 \cdot 10^{-92}:\\
\;\;\;\;\frac{2}{\left(t\_m \cdot \tan k\right) \cdot {\left(\frac{k}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{\ell}{k} \cdot {t\_m}^{-1.5}\right)}^{2}\\
\end{array}
\end{array}
if t < 2.1e-92Initial program 56.7%
Simplified56.7%
Taylor expanded in k around 0 55.8%
Taylor expanded in k around inf 56.5%
times-frac57.9%
Simplified57.9%
add-cube-cbrt57.9%
pow357.9%
*-commutative57.9%
cbrt-prod57.9%
associate-/l*57.9%
tan-quot57.9%
cbrt-div57.9%
unpow357.9%
add-cbrt-cube64.9%
unpow264.9%
cbrt-prod62.5%
unpow262.5%
Applied egg-rr62.5%
cube-prod62.5%
rem-cube-cbrt62.5%
Simplified62.5%
if 2.1e-92 < t Initial program 67.6%
Simplified67.5%
add-sqr-sqrt63.7%
Applied egg-rr69.0%
unpow269.0%
associate-/l*68.9%
associate-*l*62.6%
Simplified62.6%
Taylor expanded in k around 0 67.0%
associate-/l*67.0%
associate-/l*67.0%
Simplified67.0%
pow167.0%
associate-*r/67.0%
pow1/267.0%
pow1/267.0%
pow-prod-down67.1%
metadata-eval67.1%
Applied egg-rr67.1%
unpow167.1%
pow-base-167.1%
associate-*r/67.1%
*-rgt-identity67.1%
Simplified67.1%
*-un-lft-identity67.1%
pow1/267.1%
pow-flip67.1%
pow-pow72.0%
metadata-eval72.0%
metadata-eval72.0%
Applied egg-rr72.0%
*-lft-identity72.0%
Simplified72.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 6e-16)
(pow (* (/ l k) (pow t_m -1.5)) 2.0)
(if (<= k 6e+109)
(/ 2.0 (* (* 2.0 (tan k)) (* (sin k) (/ (pow t_m 3.0) (* l l)))))
(/ 2.0 (* (* t_m (tan k)) (* (pow k 3.0) (pow l -2.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 6e-16) {
tmp = pow(((l / k) * pow(t_m, -1.5)), 2.0);
} else if (k <= 6e+109) {
tmp = 2.0 / ((2.0 * tan(k)) * (sin(k) * (pow(t_m, 3.0) / (l * l))));
} else {
tmp = 2.0 / ((t_m * tan(k)) * (pow(k, 3.0) * pow(l, -2.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 6d-16) then
tmp = ((l / k) * (t_m ** (-1.5d0))) ** 2.0d0
else if (k <= 6d+109) then
tmp = 2.0d0 / ((2.0d0 * tan(k)) * (sin(k) * ((t_m ** 3.0d0) / (l * l))))
else
tmp = 2.0d0 / ((t_m * tan(k)) * ((k ** 3.0d0) * (l ** (-2.0d0))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 6e-16) {
tmp = Math.pow(((l / k) * Math.pow(t_m, -1.5)), 2.0);
} else if (k <= 6e+109) {
tmp = 2.0 / ((2.0 * Math.tan(k)) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l))));
} else {
tmp = 2.0 / ((t_m * Math.tan(k)) * (Math.pow(k, 3.0) * Math.pow(l, -2.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 6e-16: tmp = math.pow(((l / k) * math.pow(t_m, -1.5)), 2.0) elif k <= 6e+109: tmp = 2.0 / ((2.0 * math.tan(k)) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l)))) else: tmp = 2.0 / ((t_m * math.tan(k)) * (math.pow(k, 3.0) * math.pow(l, -2.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 6e-16) tmp = Float64(Float64(l / k) * (t_m ^ -1.5)) ^ 2.0; elseif (k <= 6e+109) tmp = Float64(2.0 / Float64(Float64(2.0 * tan(k)) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l))))); else tmp = Float64(2.0 / Float64(Float64(t_m * tan(k)) * Float64((k ^ 3.0) * (l ^ -2.0)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 6e-16) tmp = ((l / k) * (t_m ^ -1.5)) ^ 2.0; elseif (k <= 6e+109) tmp = 2.0 / ((2.0 * tan(k)) * (sin(k) * ((t_m ^ 3.0) / (l * l)))); else tmp = 2.0 / ((t_m * tan(k)) * ((k ^ 3.0) * (l ^ -2.0))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 6e-16], N[Power[N[(N[(l / k), $MachinePrecision] * N[Power[t$95$m, -1.5], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[k, 6e+109], N[(2.0 / N[(N[(2.0 * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t$95$m * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[Power[k, 3.0], $MachinePrecision] * N[Power[l, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 6 \cdot 10^{-16}:\\
\;\;\;\;{\left(\frac{\ell}{k} \cdot {t\_m}^{-1.5}\right)}^{2}\\
\mathbf{elif}\;k \leq 6 \cdot 10^{+109}:\\
\;\;\;\;\frac{2}{\left(2 \cdot \tan k\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(t\_m \cdot \tan k\right) \cdot \left({k}^{3} \cdot {\ell}^{-2}\right)}\\
\end{array}
\end{array}
if k < 5.99999999999999987e-16Initial program 65.9%
Simplified65.9%
add-sqr-sqrt46.6%
Applied egg-rr45.9%
unpow245.9%
associate-/l*45.9%
associate-*l*41.7%
Simplified41.7%
Taylor expanded in k around 0 42.4%
associate-/l*42.4%
associate-/l*42.4%
Simplified42.4%
pow142.4%
associate-*r/42.4%
pow1/242.4%
pow1/242.4%
pow-prod-down42.4%
metadata-eval42.4%
Applied egg-rr42.4%
unpow142.4%
pow-base-142.4%
associate-*r/42.4%
*-rgt-identity42.4%
Simplified42.4%
*-un-lft-identity42.4%
pow1/244.0%
pow-flip44.0%
pow-pow31.7%
metadata-eval31.7%
metadata-eval31.7%
Applied egg-rr31.7%
*-lft-identity31.7%
Simplified31.7%
if 5.99999999999999987e-16 < k < 6.00000000000000031e109Initial program 47.8%
Simplified47.7%
Taylor expanded in k around 0 67.7%
if 6.00000000000000031e109 < k Initial program 35.9%
Simplified35.9%
Taylor expanded in k around 0 35.8%
Taylor expanded in k around inf 49.5%
times-frac49.5%
Simplified49.5%
div-inv49.5%
div-inv49.5%
pow-flip49.6%
metadata-eval49.6%
associate-/l*49.6%
tan-quot49.6%
Applied egg-rr49.6%
associate-*r/49.6%
metadata-eval49.6%
Simplified49.6%
Final simplification37.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.65e-95)
(/ 2.0 (* (* t_m (tan k)) (* (pow k 3.0) (pow l -2.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.65e-95) {
tmp = 2.0 / ((t_m * tan(k)) * (pow(k, 3.0) * pow(l, -2.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.65d-95) then
tmp = 2.0d0 / ((t_m * tan(k)) * ((k ** 3.0d0) * (l ** (-2.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.65e-95) {
tmp = 2.0 / ((t_m * Math.tan(k)) * (Math.pow(k, 3.0) * Math.pow(l, -2.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.65e-95: tmp = 2.0 / ((t_m * math.tan(k)) * (math.pow(k, 3.0) * math.pow(l, -2.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.65e-95) tmp = Float64(2.0 / Float64(Float64(t_m * tan(k)) * Float64((k ^ 3.0) * (l ^ -2.0)))); else tmp = Float64(Float64(l / 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.65e-95) tmp = 2.0 / ((t_m * tan(k)) * ((k ^ 3.0) * (l ^ -2.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.65e-95], N[(2.0 / N[(N[(t$95$m * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[Power[k, 3.0], $MachinePrecision] * N[Power[l, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[(l / k), $MachinePrecision] * N[Power[t$95$m, -1.5], $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.65 \cdot 10^{-95}:\\
\;\;\;\;\frac{2}{\left(t\_m \cdot \tan k\right) \cdot \left({k}^{3} \cdot {\ell}^{-2}\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{\ell}{k} \cdot {t\_m}^{-1.5}\right)}^{2}\\
\end{array}
\end{array}
if t < 1.65e-95Initial program 56.7%
Simplified56.7%
Taylor expanded in k around 0 55.8%
Taylor expanded in k around inf 56.5%
times-frac57.9%
Simplified57.9%
div-inv57.9%
div-inv57.8%
pow-flip57.9%
metadata-eval57.9%
associate-/l*57.9%
tan-quot57.9%
Applied egg-rr57.9%
associate-*r/57.9%
metadata-eval57.9%
Simplified57.9%
if 1.65e-95 < t Initial program 67.6%
Simplified67.5%
add-sqr-sqrt63.7%
Applied egg-rr69.0%
unpow269.0%
associate-/l*68.9%
associate-*l*62.6%
Simplified62.6%
Taylor expanded in k around 0 67.0%
associate-/l*67.0%
associate-/l*67.0%
Simplified67.0%
pow167.0%
associate-*r/67.0%
pow1/267.0%
pow1/267.0%
pow-prod-down67.1%
metadata-eval67.1%
Applied egg-rr67.1%
unpow167.1%
pow-base-167.1%
associate-*r/67.1%
*-rgt-identity67.1%
Simplified67.1%
*-un-lft-identity67.1%
pow1/267.1%
pow-flip67.1%
pow-pow72.0%
metadata-eval72.0%
metadata-eval72.0%
Applied egg-rr72.0%
*-lft-identity72.0%
Simplified72.0%
Final simplification62.2%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 3.1e-89)
(/ 2.0 (* (/ (pow k 3.0) (pow l 2.0)) (* t_m k)))
(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 <= 3.1e-89) {
tmp = 2.0 / ((pow(k, 3.0) / pow(l, 2.0)) * (t_m * k));
} 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 <= 3.1d-89) then
tmp = 2.0d0 / (((k ** 3.0d0) / (l ** 2.0d0)) * (t_m * k))
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 <= 3.1e-89) {
tmp = 2.0 / ((Math.pow(k, 3.0) / Math.pow(l, 2.0)) * (t_m * k));
} 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 <= 3.1e-89: tmp = 2.0 / ((math.pow(k, 3.0) / math.pow(l, 2.0)) * (t_m * k)) 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 <= 3.1e-89) tmp = Float64(2.0 / Float64(Float64((k ^ 3.0) / (l ^ 2.0)) * Float64(t_m * k))); else tmp = Float64(Float64(l / 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 <= 3.1e-89) tmp = 2.0 / (((k ^ 3.0) / (l ^ 2.0)) * (t_m * k)); 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, 3.1e-89], N[(2.0 / N[(N[(N[Power[k, 3.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[(l / k), $MachinePrecision] * N[Power[t$95$m, -1.5], $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.1 \cdot 10^{-89}:\\
\;\;\;\;\frac{2}{\frac{{k}^{3}}{{\ell}^{2}} \cdot \left(t\_m \cdot k\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{\ell}{k} \cdot {t\_m}^{-1.5}\right)}^{2}\\
\end{array}
\end{array}
if t < 3.09999999999999996e-89Initial program 56.7%
Simplified56.7%
Taylor expanded in k around 0 55.8%
Taylor expanded in k around inf 56.5%
times-frac57.9%
Simplified57.9%
Taylor expanded in k around 0 56.1%
if 3.09999999999999996e-89 < t Initial program 67.6%
Simplified67.5%
add-sqr-sqrt63.7%
Applied egg-rr69.0%
unpow269.0%
associate-/l*68.9%
associate-*l*62.6%
Simplified62.6%
Taylor expanded in k around 0 67.0%
associate-/l*67.0%
associate-/l*67.0%
Simplified67.0%
pow167.0%
associate-*r/67.0%
pow1/267.0%
pow1/267.0%
pow-prod-down67.1%
metadata-eval67.1%
Applied egg-rr67.1%
unpow167.1%
pow-base-167.1%
associate-*r/67.1%
*-rgt-identity67.1%
Simplified67.1%
*-un-lft-identity67.1%
pow1/267.1%
pow-flip67.1%
pow-pow72.0%
metadata-eval72.0%
metadata-eval72.0%
Applied egg-rr72.0%
*-lft-identity72.0%
Simplified72.0%
Final simplification61.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= l 3.65e-118)
(/ (pow (/ l k) 2.0) (pow t_m 3.0))
(/ 2.0 (* (* (/ 1.0 (/ l (pow t_m 2.0))) (/ t_m l)) (* 2.0 (* k k)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (l <= 3.65e-118) {
tmp = pow((l / k), 2.0) / pow(t_m, 3.0);
} else {
tmp = 2.0 / (((1.0 / (l / pow(t_m, 2.0))) * (t_m / l)) * (2.0 * (k * k)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (l <= 3.65d-118) then
tmp = ((l / k) ** 2.0d0) / (t_m ** 3.0d0)
else
tmp = 2.0d0 / (((1.0d0 / (l / (t_m ** 2.0d0))) * (t_m / l)) * (2.0d0 * (k * k)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (l <= 3.65e-118) {
tmp = Math.pow((l / k), 2.0) / Math.pow(t_m, 3.0);
} else {
tmp = 2.0 / (((1.0 / (l / Math.pow(t_m, 2.0))) * (t_m / l)) * (2.0 * (k * k)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if l <= 3.65e-118: tmp = math.pow((l / k), 2.0) / math.pow(t_m, 3.0) else: tmp = 2.0 / (((1.0 / (l / math.pow(t_m, 2.0))) * (t_m / l)) * (2.0 * (k * k))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (l <= 3.65e-118) tmp = Float64((Float64(l / k) ^ 2.0) / (t_m ^ 3.0)); else tmp = Float64(2.0 / Float64(Float64(Float64(1.0 / Float64(l / (t_m ^ 2.0))) * Float64(t_m / l)) * Float64(2.0 * Float64(k * k)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (l <= 3.65e-118) tmp = ((l / k) ^ 2.0) / (t_m ^ 3.0); else tmp = 2.0 / (((1.0 / (l / (t_m ^ 2.0))) * (t_m / l)) * (2.0 * (k * k))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[l, 3.65e-118], N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(1.0 / N[(l / N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 3.65 \cdot 10^{-118}:\\
\;\;\;\;\frac{{\left(\frac{\ell}{k}\right)}^{2}}{{t\_m}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{1}{\frac{\ell}{{t\_m}^{2}}} \cdot \frac{t\_m}{\ell}\right) \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\
\end{array}
\end{array}
if l < 3.65e-118Initial program 58.1%
Simplified58.1%
add-cube-cbrt58.1%
pow358.1%
associate-/r*61.9%
*-commutative61.9%
cbrt-prod61.9%
associate-/r*58.1%
cbrt-div59.1%
rem-cbrt-cube66.1%
cbrt-prod75.9%
pow275.9%
Applied egg-rr75.9%
pow175.9%
associate-+r+75.9%
metadata-eval75.9%
Applied egg-rr75.9%
unpow175.9%
Simplified75.9%
Taylor expanded in k around 0 52.5%
associate-/r*53.5%
unpow253.5%
unpow253.5%
times-frac66.2%
*-rgt-identity66.2%
associate-*r/66.2%
pow-base-166.2%
*-rgt-identity66.2%
associate-*r/66.2%
pow-base-166.2%
unpow266.2%
pow-base-166.2%
associate-*r/66.2%
*-rgt-identity66.2%
Simplified66.2%
if 3.65e-118 < l Initial program 64.2%
Simplified66.9%
Taylor expanded in k around 0 60.1%
unpow260.1%
Applied egg-rr60.1%
associate-/r*58.4%
unpow358.4%
times-frac62.5%
pow262.5%
Applied egg-rr62.5%
clear-num62.5%
inv-pow62.5%
Applied egg-rr62.5%
unpow-162.5%
Simplified62.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= l 3.6e-118)
(* (pow (/ l k) 2.0) (pow t_m -3.0))
(/ 2.0 (* (* (/ 1.0 (/ l (pow t_m 2.0))) (/ t_m l)) (* 2.0 (* k k)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (l <= 3.6e-118) {
tmp = pow((l / k), 2.0) * pow(t_m, -3.0);
} else {
tmp = 2.0 / (((1.0 / (l / pow(t_m, 2.0))) * (t_m / l)) * (2.0 * (k * k)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (l <= 3.6d-118) then
tmp = ((l / k) ** 2.0d0) * (t_m ** (-3.0d0))
else
tmp = 2.0d0 / (((1.0d0 / (l / (t_m ** 2.0d0))) * (t_m / l)) * (2.0d0 * (k * k)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (l <= 3.6e-118) {
tmp = Math.pow((l / k), 2.0) * Math.pow(t_m, -3.0);
} else {
tmp = 2.0 / (((1.0 / (l / Math.pow(t_m, 2.0))) * (t_m / l)) * (2.0 * (k * k)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if l <= 3.6e-118: tmp = math.pow((l / k), 2.0) * math.pow(t_m, -3.0) else: tmp = 2.0 / (((1.0 / (l / math.pow(t_m, 2.0))) * (t_m / l)) * (2.0 * (k * k))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (l <= 3.6e-118) tmp = Float64((Float64(l / k) ^ 2.0) * (t_m ^ -3.0)); else tmp = Float64(2.0 / Float64(Float64(Float64(1.0 / Float64(l / (t_m ^ 2.0))) * Float64(t_m / l)) * Float64(2.0 * Float64(k * k)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (l <= 3.6e-118) tmp = ((l / k) ^ 2.0) * (t_m ^ -3.0); else tmp = 2.0 / (((1.0 / (l / (t_m ^ 2.0))) * (t_m / l)) * (2.0 * (k * k))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[l, 3.6e-118], N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] * N[Power[t$95$m, -3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(1.0 / N[(l / N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 3.6 \cdot 10^{-118}:\\
\;\;\;\;{\left(\frac{\ell}{k}\right)}^{2} \cdot {t\_m}^{-3}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{1}{\frac{\ell}{{t\_m}^{2}}} \cdot \frac{t\_m}{\ell}\right) \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\
\end{array}
\end{array}
if l < 3.6000000000000002e-118Initial program 58.1%
Simplified58.1%
add-sqr-sqrt47.0%
Applied egg-rr46.0%
unpow246.0%
associate-/l*46.0%
associate-*l*41.8%
Simplified41.8%
Taylor expanded in k around 0 41.5%
associate-/l*41.5%
associate-/l*41.5%
Simplified41.5%
associate-*l*41.1%
unpow-prod-down39.0%
associate-*r/39.0%
pow1/239.0%
pow1/239.0%
pow-prod-down39.0%
metadata-eval39.0%
pow1/241.5%
pow-flip41.5%
pow-pow27.4%
metadata-eval27.4%
metadata-eval27.4%
Applied egg-rr27.4%
unpow227.4%
unpow227.4%
swap-sqr29.4%
associate-*l*29.4%
associate-*l*30.0%
swap-sqr28.7%
unpow228.7%
pow-sqr65.6%
metadata-eval65.6%
*-commutative65.6%
pow-base-165.6%
associate-*r/65.6%
*-rgt-identity65.6%
Simplified65.6%
if 3.6000000000000002e-118 < l Initial program 64.2%
Simplified66.9%
Taylor expanded in k around 0 60.1%
unpow260.1%
Applied egg-rr60.1%
associate-/r*58.4%
unpow358.4%
times-frac62.5%
pow262.5%
Applied egg-rr62.5%
clear-num62.5%
inv-pow62.5%
Applied egg-rr62.5%
unpow-162.5%
Simplified62.5%
Final simplification64.6%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (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(Float64(l / 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[(N[(l / k), $MachinePrecision] * N[Power[t$95$m, -1.5], $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 60.1%
Simplified60.1%
add-sqr-sqrt44.8%
Applied egg-rr46.5%
unpow246.5%
associate-/l*46.5%
associate-*l*43.3%
Simplified43.3%
Taylor expanded in k around 0 40.1%
associate-/l*40.1%
associate-/l*40.1%
Simplified40.1%
pow140.1%
associate-*r/40.1%
pow1/240.1%
pow1/240.1%
pow-prod-down40.1%
metadata-eval40.1%
Applied egg-rr40.1%
unpow140.1%
pow-base-140.1%
associate-*r/40.1%
*-rgt-identity40.1%
Simplified40.1%
*-un-lft-identity40.1%
pow1/242.5%
pow-flip42.5%
pow-pow29.4%
metadata-eval29.4%
metadata-eval29.4%
Applied egg-rr29.4%
*-lft-identity29.4%
Simplified29.4%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (pow (* l (/ (pow t_m -1.5) 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) {
return t_s * pow((l * (pow(t_m, -1.5) / k)), 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 * ((t_m ** (-1.5d0)) / k)) ** 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 * (Math.pow(t_m, -1.5) / k)), 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 * (math.pow(t_m, -1.5) / k)), 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((t_m ^ -1.5) / k)) ^ 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 * ((t_m ^ -1.5) / k)) ^ 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[(N[Power[t$95$m, -1.5], $MachinePrecision] / 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 {\left(\ell \cdot \frac{{t\_m}^{-1.5}}{k}\right)}^{2}
\end{array}
Initial program 60.1%
Simplified60.1%
add-sqr-sqrt44.8%
Applied egg-rr46.5%
unpow246.5%
associate-/l*46.5%
associate-*l*43.3%
Simplified43.3%
Taylor expanded in k around 0 40.1%
associate-/l*40.1%
associate-/l*40.1%
Simplified40.1%
pow140.1%
associate-*r/40.1%
pow1/240.1%
pow1/240.1%
pow-prod-down40.1%
metadata-eval40.1%
pow1/242.5%
pow-flip42.5%
pow-pow29.4%
metadata-eval29.4%
metadata-eval29.4%
Applied egg-rr29.4%
unpow129.4%
associate-*l*29.1%
pow-base-129.1%
associate-*l/29.1%
*-lft-identity29.1%
Simplified29.1%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 2.0 (* (* (/ 1.0 (/ l (pow t_m 2.0))) (/ t_m l)) (* 2.0 (* k k))))))
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 / (((1.0 / (l / pow(t_m, 2.0))) * (t_m / l)) * (2.0 * (k * k))));
}
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 / (((1.0d0 / (l / (t_m ** 2.0d0))) * (t_m / l)) * (2.0d0 * (k * k))))
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 / (((1.0 / (l / Math.pow(t_m, 2.0))) * (t_m / l)) * (2.0 * (k * k))));
}
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 / (((1.0 / (l / math.pow(t_m, 2.0))) * (t_m / l)) * (2.0 * (k * k))))
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(1.0 / Float64(l / (t_m ^ 2.0))) * Float64(t_m / l)) * Float64(2.0 * Float64(k * k))))) 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 / (((1.0 / (l / (t_m ^ 2.0))) * (t_m / l)) * (2.0 * (k * k)))); 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[(1.0 / N[(l / N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{2}{\left(\frac{1}{\frac{\ell}{{t\_m}^{2}}} \cdot \frac{t\_m}{\ell}\right) \cdot \left(2 \cdot \left(k \cdot k\right)\right)}
\end{array}
Initial program 60.1%
Simplified58.5%
Taylor expanded in k around 0 56.8%
unpow256.8%
Applied egg-rr56.8%
associate-/r*54.4%
unpow354.4%
times-frac58.7%
pow258.7%
Applied egg-rr58.7%
clear-num58.7%
inv-pow58.7%
Applied egg-rr58.7%
unpow-158.7%
Simplified58.7%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 2.0 (* (* 2.0 (* k k)) (* (/ t_m l) (/ (* t_m t_m) l))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / ((2.0d0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64(Float64(2.0 * Float64(k * k)) * Float64(Float64(t_m / l) * Float64(Float64(t_m * t_m) / l))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l)))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\frac{t\_m}{\ell} \cdot \frac{t\_m \cdot t\_m}{\ell}\right)}
\end{array}
Initial program 60.1%
Simplified58.5%
Taylor expanded in k around 0 56.8%
unpow256.8%
Applied egg-rr56.8%
associate-/r*54.4%
unpow354.4%
times-frac58.7%
pow258.7%
Applied egg-rr58.7%
unpow258.7%
Applied egg-rr58.7%
Final simplification58.7%
herbie shell --seed 2024181
(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))))