
(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 17 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
(*
t_s
(if (<= t_m 3.8e-144)
(*
2.0
(* (/ (pow l 2.0) (* t_m (pow k 2.0))) (/ (cos k) (pow (sin k) 2.0))))
(/
2.0
(pow
(*
(* (* t_m (pow (cbrt l) -2.0)) (cbrt (sin k)))
(cbrt (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))))
3.0)))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3.8e-144) {
tmp = 2.0 * ((pow(l, 2.0) / (t_m * pow(k, 2.0))) * (cos(k) / pow(sin(k), 2.0)));
} else {
tmp = 2.0 / pow((((t_m * pow(cbrt(l), -2.0)) * cbrt(sin(k))) * cbrt((tan(k) * (2.0 + pow((k / t_m), 2.0))))), 3.0);
}
return t_s * tmp;
}
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3.8e-144) {
tmp = 2.0 * ((Math.pow(l, 2.0) / (t_m * Math.pow(k, 2.0))) * (Math.cos(k) / Math.pow(Math.sin(k), 2.0)));
} else {
tmp = 2.0 / Math.pow((((t_m * Math.pow(Math.cbrt(l), -2.0)) * Math.cbrt(Math.sin(k))) * Math.cbrt((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))))), 3.0);
}
return t_s * tmp;
}
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 3.8e-144) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / Float64(t_m * (k ^ 2.0))) * Float64(cos(k) / (sin(k) ^ 2.0)))); else tmp = Float64(2.0 / (Float64(Float64(Float64(t_m * (cbrt(l) ^ -2.0)) * cbrt(sin(k))) * cbrt(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))))) ^ 3.0)); end return Float64(t_s * tmp) end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3.8e-144], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 3.8 \cdot 10^{-144}:\\
\;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{t_m \cdot {k}^{2}} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(\left(t_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \sqrt[3]{\sin k}\right) \cdot \sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)}\right)}^{3}}\\
\end{array}
\end{array}
if t < 3.79999999999999993e-144Initial program 48.0%
Simplified44.9%
Taylor expanded in t around 0 63.0%
associate-*r*63.0%
times-frac63.5%
Simplified63.5%
if 3.79999999999999993e-144 < t Initial program 63.7%
associate-*l*63.7%
*-commutative63.7%
*-commutative63.7%
associate-/r*71.0%
distribute-rgt-in71.0%
unpow271.0%
times-frac66.2%
sqr-neg66.2%
times-frac71.0%
unpow271.0%
distribute-rgt-in71.0%
+-commutative71.0%
Simplified71.0%
add-sqr-sqrt70.9%
*-un-lft-identity70.9%
times-frac71.0%
sqrt-pow171.0%
metadata-eval71.0%
sqrt-pow180.0%
metadata-eval80.0%
Applied egg-rr80.0%
add-cube-cbrt79.7%
pow379.7%
frac-times70.8%
pow-prod-up70.8%
metadata-eval70.8%
*-un-lft-identity70.8%
cbrt-div70.9%
unpow370.9%
add-cbrt-cube79.7%
metadata-eval79.7%
pow-plus79.7%
associate-*r/83.0%
/-rgt-identity83.0%
Applied egg-rr86.2%
add-cube-cbrt86.2%
pow386.2%
cbrt-prod86.2%
unpow286.2%
add-cbrt-cube90.8%
associate-/l/90.8%
pow290.8%
Applied egg-rr90.8%
add-cube-cbrt90.8%
pow390.8%
Applied egg-rr96.1%
Final simplification74.2%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 4.2e-143)
(*
2.0
(* (/ (pow l 2.0) (* t_m (pow k 2.0))) (/ (cos k) (pow (sin k) 2.0))))
(/
2.0
(*
(* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
(pow (* (cbrt (sin k)) (/ 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 tmp;
if (t_m <= 4.2e-143) {
tmp = 2.0 * ((pow(l, 2.0) / (t_m * pow(k, 2.0))) * (cos(k) / pow(sin(k), 2.0)));
} else {
tmp = 2.0 / ((tan(k) * (2.0 + pow((k / t_m), 2.0))) * pow((cbrt(sin(k)) * (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 tmp;
if (t_m <= 4.2e-143) {
tmp = 2.0 * ((Math.pow(l, 2.0) / (t_m * Math.pow(k, 2.0))) * (Math.cos(k) / Math.pow(Math.sin(k), 2.0)));
} else {
tmp = 2.0 / ((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))) * Math.pow((Math.cbrt(Math.sin(k)) * (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) tmp = 0.0 if (t_m <= 4.2e-143) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / Float64(t_m * (k ^ 2.0))) * Float64(cos(k) / (sin(k) ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * (Float64(cbrt(sin(k)) * Float64(t_m / (cbrt(l) ^ 2.0))) ^ 3.0))); end return Float64(t_s * tmp) end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 4.2e-143], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[(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]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 4.2 \cdot 10^{-143}:\\
\;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{t_m \cdot {k}^{2}} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right) \cdot {\left(\sqrt[3]{\sin k} \cdot \frac{t_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}}\\
\end{array}
\end{array}
if t < 4.2000000000000002e-143Initial program 48.0%
Simplified44.9%
Taylor expanded in t around 0 63.0%
associate-*r*63.0%
times-frac63.5%
Simplified63.5%
if 4.2000000000000002e-143 < t Initial program 63.7%
associate-*l*63.7%
*-commutative63.7%
*-commutative63.7%
associate-/r*71.0%
distribute-rgt-in71.0%
unpow271.0%
times-frac66.2%
sqr-neg66.2%
times-frac71.0%
unpow271.0%
distribute-rgt-in71.0%
+-commutative71.0%
Simplified71.0%
add-sqr-sqrt70.9%
*-un-lft-identity70.9%
times-frac71.0%
sqrt-pow171.0%
metadata-eval71.0%
sqrt-pow180.0%
metadata-eval80.0%
Applied egg-rr80.0%
add-cube-cbrt79.7%
pow379.7%
frac-times70.8%
pow-prod-up70.8%
metadata-eval70.8%
*-un-lft-identity70.8%
cbrt-div70.9%
unpow370.9%
add-cbrt-cube79.7%
metadata-eval79.7%
pow-plus79.7%
associate-*r/83.0%
/-rgt-identity83.0%
Applied egg-rr86.2%
add-cube-cbrt86.2%
pow386.2%
cbrt-prod86.2%
unpow286.2%
add-cbrt-cube90.8%
associate-/l/90.8%
pow290.8%
Applied egg-rr90.8%
Final simplification72.5%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1550000.0)
(/
2.0
(* (pow (* (cbrt (sin k)) (/ t_m (pow (cbrt l) 2.0))) 3.0) (* 2.0 k)))
(*
2.0
(* (/ (pow l 2.0) (* t_m (pow k 2.0))) (/ (cos k) (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 <= 1550000.0) {
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, 2.0) / (t_m * pow(k, 2.0))) * (cos(k) / 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 <= 1550000.0) {
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, 2.0) / (t_m * Math.pow(k, 2.0))) * (Math.cos(k) / 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 <= 1550000.0) 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 ^ 2.0) / Float64(t_m * (k ^ 2.0))) * Float64(cos(k) / (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, 1550000.0], 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[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 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 1550000:\\
\;\;\;\;\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(\frac{{\ell}^{2}}{t_m \cdot {k}^{2}} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\
\end{array}
\end{array}
if k < 1.55e6Initial program 53.8%
associate-*l*53.9%
*-commutative53.9%
*-commutative53.9%
associate-/r*60.1%
distribute-rgt-in60.1%
unpow260.1%
times-frac44.4%
sqr-neg44.4%
times-frac60.1%
unpow260.1%
distribute-rgt-in60.1%
+-commutative60.1%
Simplified60.1%
add-sqr-sqrt28.8%
*-un-lft-identity28.8%
times-frac28.8%
sqrt-pow128.8%
metadata-eval28.8%
sqrt-pow132.0%
metadata-eval32.0%
Applied egg-rr32.0%
add-cube-cbrt31.9%
pow331.9%
frac-times28.7%
pow-prod-up60.0%
metadata-eval60.0%
*-un-lft-identity60.0%
cbrt-div60.0%
unpow360.0%
add-cbrt-cube67.4%
metadata-eval67.4%
pow-plus67.4%
associate-*r/70.2%
/-rgt-identity70.2%
Applied egg-rr71.5%
add-cube-cbrt71.5%
pow371.5%
cbrt-prod71.5%
unpow271.5%
add-cbrt-cube78.0%
associate-/l/78.0%
pow278.0%
Applied egg-rr78.0%
Taylor expanded in k around 0 73.6%
*-commutative73.6%
Simplified73.6%
if 1.55e6 < k Initial program 50.4%
Simplified50.4%
Taylor expanded in t around 0 73.9%
associate-*r*73.8%
times-frac73.7%
Simplified73.7%
Final simplification73.6%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 3600000.0)
(/
2.0
(* (pow (* (cbrt (sin k)) (/ t_m (pow (cbrt l) 2.0))) 3.0) (* 2.0 k)))
(*
2.0
(/ (* (pow l 2.0) (cos k)) (* (pow k 2.0) (* 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 <= 3600000.0) {
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, 2.0) * cos(k)) / (pow(k, 2.0) * (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 <= 3600000.0) {
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, 2.0) * Math.cos(k)) / (Math.pow(k, 2.0) * (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 <= 3600000.0) 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 ^ 2.0) * cos(k)) / Float64((k ^ 2.0) * 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, 3600000.0], 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[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\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 3600000:\\
\;\;\;\;\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 \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t_m \cdot {\sin k}^{2}\right)}\\
\end{array}
\end{array}
if k < 3.6e6Initial program 53.8%
associate-*l*53.9%
*-commutative53.9%
*-commutative53.9%
associate-/r*60.1%
distribute-rgt-in60.1%
unpow260.1%
times-frac44.4%
sqr-neg44.4%
times-frac60.1%
unpow260.1%
distribute-rgt-in60.1%
+-commutative60.1%
Simplified60.1%
add-sqr-sqrt28.8%
*-un-lft-identity28.8%
times-frac28.8%
sqrt-pow128.8%
metadata-eval28.8%
sqrt-pow132.0%
metadata-eval32.0%
Applied egg-rr32.0%
add-cube-cbrt31.9%
pow331.9%
frac-times28.7%
pow-prod-up60.0%
metadata-eval60.0%
*-un-lft-identity60.0%
cbrt-div60.0%
unpow360.0%
add-cbrt-cube67.4%
metadata-eval67.4%
pow-plus67.4%
associate-*r/70.2%
/-rgt-identity70.2%
Applied egg-rr71.5%
add-cube-cbrt71.5%
pow371.5%
cbrt-prod71.5%
unpow271.5%
add-cbrt-cube78.0%
associate-/l/78.0%
pow278.0%
Applied egg-rr78.0%
Taylor expanded in k around 0 73.6%
*-commutative73.6%
Simplified73.6%
if 3.6e6 < k Initial program 50.4%
Simplified50.4%
Taylor expanded in t around 0 73.9%
Final simplification73.6%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 3650000.0)
(/
2.0
(* (pow (* (cbrt (sin k)) (/ t_m (pow (cbrt l) 2.0))) 3.0) (* 2.0 k)))
(/
2.0
(*
(/ (* t_m (pow k 2.0)) (pow l 2.0))
(/ (/ (- 1.0 (cos (* 2.0 k))) 2.0) (cos k)))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 3650000.0) {
tmp = 2.0 / (pow((cbrt(sin(k)) * (t_m / pow(cbrt(l), 2.0))), 3.0) * (2.0 * k));
} else {
tmp = 2.0 / (((t_m * pow(k, 2.0)) / pow(l, 2.0)) * (((1.0 - cos((2.0 * k))) / 2.0) / cos(k)));
}
return t_s * tmp;
}
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 3650000.0) {
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 / (((t_m * Math.pow(k, 2.0)) / Math.pow(l, 2.0)) * (((1.0 - Math.cos((2.0 * k))) / 2.0) / Math.cos(k)));
}
return t_s * tmp;
}
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 3650000.0) 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(Float64(t_m * (k ^ 2.0)) / (l ^ 2.0)) * Float64(Float64(Float64(1.0 - cos(Float64(2.0 * k))) / 2.0) / cos(k)))); end return Float64(t_s * tmp) end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 3650000.0], 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[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(1.0 - N[Cos[N[(2.0 * k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 3650000:\\
\;\;\;\;\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}:\\
\;\;\;\;\frac{2}{\frac{t_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{\frac{1 - \cos \left(2 \cdot k\right)}{2}}{\cos k}}\\
\end{array}
\end{array}
if k < 3.65e6Initial program 53.8%
associate-*l*53.9%
*-commutative53.9%
*-commutative53.9%
associate-/r*60.1%
distribute-rgt-in60.1%
unpow260.1%
times-frac44.4%
sqr-neg44.4%
times-frac60.1%
unpow260.1%
distribute-rgt-in60.1%
+-commutative60.1%
Simplified60.1%
add-sqr-sqrt28.8%
*-un-lft-identity28.8%
times-frac28.8%
sqrt-pow128.8%
metadata-eval28.8%
sqrt-pow132.0%
metadata-eval32.0%
Applied egg-rr32.0%
add-cube-cbrt31.9%
pow331.9%
frac-times28.7%
pow-prod-up60.0%
metadata-eval60.0%
*-un-lft-identity60.0%
cbrt-div60.0%
unpow360.0%
add-cbrt-cube67.4%
metadata-eval67.4%
pow-plus67.4%
associate-*r/70.2%
/-rgt-identity70.2%
Applied egg-rr71.5%
add-cube-cbrt71.5%
pow371.5%
cbrt-prod71.5%
unpow271.5%
add-cbrt-cube78.0%
associate-/l/78.0%
pow278.0%
Applied egg-rr78.0%
Taylor expanded in k around 0 73.6%
*-commutative73.6%
Simplified73.6%
if 3.65e6 < k Initial program 50.4%
Taylor expanded in t around 0 73.9%
associate-*r*73.8%
times-frac73.7%
Simplified73.7%
unpow273.7%
sin-mult73.7%
Applied egg-rr73.7%
+-inverses73.7%
cos-073.7%
count-273.7%
*-commutative73.7%
Simplified73.7%
Final simplification73.6%
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.15e-95)
(/ 2.0 (* t_m (exp (+ (* 4.0 (log k)) (* -2.0 (log l))))))
(if (<= t_m 2.5e+101)
(*
(* (/ 2.0 (tan k)) (/ l (* (sin k) (pow t_m 3.0))))
(/ l (+ 2.0 (pow (/ k t_m) 2.0))))
(/ (pow l 2.0) (pow (* t_m (pow (cbrt k) 2.0)) 3.0))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.15e-95) {
tmp = 2.0 / (t_m * exp(((4.0 * log(k)) + (-2.0 * log(l)))));
} else if (t_m <= 2.5e+101) {
tmp = ((2.0 / tan(k)) * (l / (sin(k) * pow(t_m, 3.0)))) * (l / (2.0 + pow((k / t_m), 2.0)));
} else {
tmp = pow(l, 2.0) / pow((t_m * pow(cbrt(k), 2.0)), 3.0);
}
return t_s * tmp;
}
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.15e-95) {
tmp = 2.0 / (t_m * Math.exp(((4.0 * Math.log(k)) + (-2.0 * Math.log(l)))));
} else if (t_m <= 2.5e+101) {
tmp = ((2.0 / Math.tan(k)) * (l / (Math.sin(k) * Math.pow(t_m, 3.0)))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
} else {
tmp = Math.pow(l, 2.0) / Math.pow((t_m * Math.pow(Math.cbrt(k), 2.0)), 3.0);
}
return t_s * tmp;
}
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.15e-95) tmp = Float64(2.0 / Float64(t_m * exp(Float64(Float64(4.0 * log(k)) + Float64(-2.0 * log(l)))))); elseif (t_m <= 2.5e+101) tmp = Float64(Float64(Float64(2.0 / tan(k)) * Float64(l / Float64(sin(k) * (t_m ^ 3.0)))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); else tmp = Float64((l ^ 2.0) / (Float64(t_m * (cbrt(k) ^ 2.0)) ^ 3.0)); end return Float64(t_s * tmp) end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.15e-95], N[(2.0 / N[(t$95$m * N[Exp[N[(N[(4.0 * N[Log[k], $MachinePrecision]), $MachinePrecision] + N[(-2.0 * N[Log[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.5e+101], N[(N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(l / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[(t$95$m * N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 1.15 \cdot 10^{-95}:\\
\;\;\;\;\frac{2}{t_m \cdot e^{4 \cdot \log k + -2 \cdot \log \ell}}\\
\mathbf{elif}\;t_m \leq 2.5 \cdot 10^{+101}:\\
\;\;\;\;\left(\frac{2}{\tan k} \cdot \frac{\ell}{\sin k \cdot {t_m}^{3}}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\ell}^{2}}{{\left(t_m \cdot {\left(\sqrt[3]{k}\right)}^{2}\right)}^{3}}\\
\end{array}
\end{array}
if t < 1.15e-95Initial program 46.4%
Taylor expanded in t around 0 61.8%
associate-*r*61.8%
times-frac62.9%
Simplified62.9%
Taylor expanded in k around 0 50.4%
associate-/l*50.3%
associate-/r/50.4%
Simplified50.4%
div-inv50.4%
pow-flip50.5%
metadata-eval50.5%
add-log-exp49.0%
exp-prod51.6%
Applied egg-rr51.6%
pow-exp49.0%
rem-log-exp50.5%
pow-to-exp25.9%
pow-to-exp14.0%
prod-exp15.7%
rem-log-exp15.2%
pow-to-exp26.8%
log-pow15.7%
rem-log-exp14.1%
pow-to-exp27.1%
log-pow15.7%
Applied egg-rr15.7%
if 1.15e-95 < t < 2.49999999999999994e101Initial program 84.5%
Simplified86.5%
associate-*r*88.8%
*-un-lft-identity88.8%
times-frac90.9%
Applied egg-rr90.9%
/-rgt-identity90.9%
associate-*l/90.9%
times-frac97.6%
*-commutative97.6%
Simplified97.6%
if 2.49999999999999994e101 < t Initial program 49.1%
Simplified36.5%
Taylor expanded in k around 0 36.5%
add-cube-cbrt36.5%
pow336.5%
*-commutative36.5%
cbrt-prod36.5%
unpow336.5%
add-cbrt-cube41.4%
unpow241.4%
cbrt-prod63.8%
pow263.8%
Applied egg-rr63.8%
Final simplification35.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 5.2e-79)
(/
2.0
(*
(/ (* t_m (pow k 2.0)) (pow l 2.0))
(/ (/ (- 1.0 (cos (* 2.0 k))) 2.0) (cos k))))
(if (<= t_m 2.5e+101)
(*
(* (/ 2.0 (tan k)) (/ l (* (sin k) (pow t_m 3.0))))
(/ l (+ 2.0 (pow (/ k t_m) 2.0))))
(/ (pow l 2.0) (pow (* t_m (pow (cbrt k) 2.0)) 3.0))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5.2e-79) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) / pow(l, 2.0)) * (((1.0 - cos((2.0 * k))) / 2.0) / cos(k)));
} else if (t_m <= 2.5e+101) {
tmp = ((2.0 / tan(k)) * (l / (sin(k) * pow(t_m, 3.0)))) * (l / (2.0 + pow((k / t_m), 2.0)));
} else {
tmp = pow(l, 2.0) / pow((t_m * pow(cbrt(k), 2.0)), 3.0);
}
return t_s * tmp;
}
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5.2e-79) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) / Math.pow(l, 2.0)) * (((1.0 - Math.cos((2.0 * k))) / 2.0) / Math.cos(k)));
} else if (t_m <= 2.5e+101) {
tmp = ((2.0 / Math.tan(k)) * (l / (Math.sin(k) * Math.pow(t_m, 3.0)))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
} else {
tmp = Math.pow(l, 2.0) / Math.pow((t_m * Math.pow(Math.cbrt(k), 2.0)), 3.0);
}
return t_s * tmp;
}
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 5.2e-79) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) / (l ^ 2.0)) * Float64(Float64(Float64(1.0 - cos(Float64(2.0 * k))) / 2.0) / cos(k)))); elseif (t_m <= 2.5e+101) tmp = Float64(Float64(Float64(2.0 / tan(k)) * Float64(l / Float64(sin(k) * (t_m ^ 3.0)))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); else tmp = Float64((l ^ 2.0) / (Float64(t_m * (cbrt(k) ^ 2.0)) ^ 3.0)); end return Float64(t_s * tmp) end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 5.2e-79], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(1.0 - N[Cos[N[(2.0 * k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.5e+101], N[(N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(l / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[(t$95$m * N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 5.2 \cdot 10^{-79}:\\
\;\;\;\;\frac{2}{\frac{t_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{\frac{1 - \cos \left(2 \cdot k\right)}{2}}{\cos k}}\\
\mathbf{elif}\;t_m \leq 2.5 \cdot 10^{+101}:\\
\;\;\;\;\left(\frac{2}{\tan k} \cdot \frac{\ell}{\sin k \cdot {t_m}^{3}}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\ell}^{2}}{{\left(t_m \cdot {\left(\sqrt[3]{k}\right)}^{2}\right)}^{3}}\\
\end{array}
\end{array}
if t < 5.19999999999999987e-79Initial program 46.7%
Taylor expanded in t around 0 62.0%
associate-*r*62.0%
times-frac63.1%
Simplified63.1%
unpow263.1%
sin-mult59.0%
Applied egg-rr59.0%
+-inverses59.0%
cos-059.0%
count-259.0%
*-commutative59.0%
Simplified59.0%
if 5.19999999999999987e-79 < t < 2.49999999999999994e101Initial program 84.1%
Simplified86.2%
associate-*r*88.5%
*-un-lft-identity88.5%
times-frac90.7%
Applied egg-rr90.7%
/-rgt-identity90.7%
associate-*l/90.7%
times-frac97.5%
*-commutative97.5%
Simplified97.5%
if 2.49999999999999994e101 < t Initial program 49.1%
Simplified36.5%
Taylor expanded in k around 0 36.5%
add-cube-cbrt36.5%
pow336.5%
*-commutative36.5%
cbrt-prod36.5%
unpow336.5%
add-cbrt-cube41.4%
unpow241.4%
cbrt-prod63.8%
pow263.8%
Applied egg-rr63.8%
Final simplification65.9%
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.6e-17)
(/ 2.0 (* (/ (* t_m (pow k 2.0)) (pow l 2.0)) (/ (pow k 2.0) (cos k))))
(/ (pow l 2.0) (pow (* t_m (pow (cbrt k) 2.0)) 3.0)))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.6e-17) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) / pow(l, 2.0)) * (pow(k, 2.0) / cos(k)));
} else {
tmp = pow(l, 2.0) / pow((t_m * pow(cbrt(k), 2.0)), 3.0);
}
return t_s * tmp;
}
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.6e-17) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) / Math.pow(l, 2.0)) * (Math.pow(k, 2.0) / Math.cos(k)));
} else {
tmp = Math.pow(l, 2.0) / Math.pow((t_m * Math.pow(Math.cbrt(k), 2.0)), 3.0);
}
return t_s * tmp;
}
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.6e-17) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) / (l ^ 2.0)) * Float64((k ^ 2.0) / cos(k)))); else tmp = Float64((l ^ 2.0) / (Float64(t_m * (cbrt(k) ^ 2.0)) ^ 3.0)); end return Float64(t_s * tmp) end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.6e-17], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[(t$95$m * N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 1.6 \cdot 10^{-17}:\\
\;\;\;\;\frac{2}{\frac{t_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{k}^{2}}{\cos k}}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\ell}^{2}}{{\left(t_m \cdot {\left(\sqrt[3]{k}\right)}^{2}\right)}^{3}}\\
\end{array}
\end{array}
if t < 1.6000000000000001e-17Initial program 49.5%
Taylor expanded in t around 0 63.8%
associate-*r*63.7%
times-frac64.8%
Simplified64.8%
Taylor expanded in k around 0 59.0%
if 1.6000000000000001e-17 < t Initial program 64.7%
Simplified56.1%
Taylor expanded in k around 0 57.6%
add-cube-cbrt57.6%
pow357.6%
*-commutative57.6%
cbrt-prod57.5%
unpow357.5%
add-cbrt-cube60.2%
unpow260.2%
cbrt-prod73.7%
pow273.7%
Applied egg-rr73.7%
Final simplification62.5%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 4e-61)
(/ 2.0 (* t_m (exp (+ (* 4.0 (log k)) (* -2.0 (log l))))))
(/ (pow l 2.0) (pow (* t_m (pow (cbrt k) 2.0)) 3.0)))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4e-61) {
tmp = 2.0 / (t_m * exp(((4.0 * log(k)) + (-2.0 * log(l)))));
} else {
tmp = pow(l, 2.0) / pow((t_m * pow(cbrt(k), 2.0)), 3.0);
}
return t_s * tmp;
}
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4e-61) {
tmp = 2.0 / (t_m * Math.exp(((4.0 * Math.log(k)) + (-2.0 * Math.log(l)))));
} else {
tmp = Math.pow(l, 2.0) / Math.pow((t_m * Math.pow(Math.cbrt(k), 2.0)), 3.0);
}
return t_s * tmp;
}
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 4e-61) tmp = Float64(2.0 / Float64(t_m * exp(Float64(Float64(4.0 * log(k)) + Float64(-2.0 * log(l)))))); else tmp = Float64((l ^ 2.0) / (Float64(t_m * (cbrt(k) ^ 2.0)) ^ 3.0)); end return Float64(t_s * tmp) end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 4e-61], N[(2.0 / N[(t$95$m * N[Exp[N[(N[(4.0 * N[Log[k], $MachinePrecision]), $MachinePrecision] + N[(-2.0 * N[Log[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[(t$95$m * N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 4 \cdot 10^{-61}:\\
\;\;\;\;\frac{2}{t_m \cdot e^{4 \cdot \log k + -2 \cdot \log \ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\ell}^{2}}{{\left(t_m \cdot {\left(\sqrt[3]{k}\right)}^{2}\right)}^{3}}\\
\end{array}
\end{array}
if t < 4.0000000000000002e-61Initial program 47.5%
Taylor expanded in t around 0 62.6%
associate-*r*62.6%
times-frac63.7%
Simplified63.7%
Taylor expanded in k around 0 51.0%
associate-/l*50.9%
associate-/r/51.0%
Simplified51.0%
div-inv51.0%
pow-flip51.0%
metadata-eval51.0%
add-log-exp49.6%
exp-prod52.1%
Applied egg-rr52.1%
pow-exp49.6%
rem-log-exp51.0%
pow-to-exp26.9%
pow-to-exp15.4%
prod-exp17.0%
rem-log-exp16.5%
pow-to-exp27.8%
log-pow17.0%
rem-log-exp15.4%
pow-to-exp28.2%
log-pow17.0%
Applied egg-rr17.0%
if 4.0000000000000002e-61 < t Initial program 67.4%
Simplified60.2%
Taylor expanded in k around 0 61.4%
add-cube-cbrt61.4%
pow361.4%
*-commutative61.4%
cbrt-prod61.3%
unpow361.3%
add-cbrt-cube63.6%
unpow263.6%
cbrt-prod75.1%
pow275.1%
Applied egg-rr75.1%
Final simplification33.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 1.2e-62)
(/ 2.0 (* t_m (exp (+ (* 4.0 (log k)) (* -2.0 (log l))))))
(/
(* (/ 2.0 (* (tan k) (* k (pow t_m 3.0)))) (* l l))
(+ 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.2e-62) {
tmp = 2.0 / (t_m * exp(((4.0 * log(k)) + (-2.0 * log(l)))));
} else {
tmp = ((2.0 / (tan(k) * (k * pow(t_m, 3.0)))) * (l * l)) / (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.2d-62) then
tmp = 2.0d0 / (t_m * exp(((4.0d0 * log(k)) + ((-2.0d0) * log(l)))))
else
tmp = ((2.0d0 / (tan(k) * (k * (t_m ** 3.0d0)))) * (l * l)) / (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.2e-62) {
tmp = 2.0 / (t_m * Math.exp(((4.0 * Math.log(k)) + (-2.0 * Math.log(l)))));
} else {
tmp = ((2.0 / (Math.tan(k) * (k * Math.pow(t_m, 3.0)))) * (l * l)) / (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.2e-62: tmp = 2.0 / (t_m * math.exp(((4.0 * math.log(k)) + (-2.0 * math.log(l))))) else: tmp = ((2.0 / (math.tan(k) * (k * math.pow(t_m, 3.0)))) * (l * l)) / (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.2e-62) tmp = Float64(2.0 / Float64(t_m * exp(Float64(Float64(4.0 * log(k)) + Float64(-2.0 * log(l)))))); else tmp = Float64(Float64(Float64(2.0 / Float64(tan(k) * Float64(k * (t_m ^ 3.0)))) * Float64(l * l)) / 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.2e-62) tmp = 2.0 / (t_m * exp(((4.0 * log(k)) + (-2.0 * log(l))))); else tmp = ((2.0 / (tan(k) * (k * (t_m ^ 3.0)))) * (l * l)) / (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.2e-62], N[(2.0 / N[(t$95$m * N[Exp[N[(N[(4.0 * N[Log[k], $MachinePrecision]), $MachinePrecision] + N[(-2.0 * N[Log[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(k * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * l), $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.2 \cdot 10^{-62}:\\
\;\;\;\;\frac{2}{t_m \cdot e^{4 \cdot \log k + -2 \cdot \log \ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{\tan k \cdot \left(k \cdot {t_m}^{3}\right)} \cdot \left(\ell \cdot \ell\right)}{2 + {\left(\frac{k}{t_m}\right)}^{2}}\\
\end{array}
\end{array}
if t < 1.19999999999999992e-62Initial program 47.5%
Taylor expanded in t around 0 62.6%
associate-*r*62.6%
times-frac63.7%
Simplified63.7%
Taylor expanded in k around 0 51.0%
associate-/l*50.9%
associate-/r/51.0%
Simplified51.0%
div-inv51.0%
pow-flip51.0%
metadata-eval51.0%
add-log-exp49.6%
exp-prod52.1%
Applied egg-rr52.1%
pow-exp49.6%
rem-log-exp51.0%
pow-to-exp26.9%
pow-to-exp15.4%
prod-exp17.0%
rem-log-exp16.5%
pow-to-exp27.8%
log-pow17.0%
rem-log-exp15.4%
pow-to-exp28.2%
log-pow17.0%
Applied egg-rr17.0%
if 1.19999999999999992e-62 < t Initial program 67.4%
Simplified68.6%
Taylor expanded in k around 0 68.5%
Final simplification31.5%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.02e-60)
(/ 2.0 (* t_m (exp (+ (* 4.0 (log k)) (* -2.0 (log l))))))
(/
(* (* l l) (/ 2.0 (* (pow k 2.0) (pow t_m 3.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.02e-60) {
tmp = 2.0 / (t_m * exp(((4.0 * log(k)) + (-2.0 * log(l)))));
} else {
tmp = ((l * l) * (2.0 / (pow(k, 2.0) * pow(t_m, 3.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.02d-60) then
tmp = 2.0d0 / (t_m * exp(((4.0d0 * log(k)) + ((-2.0d0) * log(l)))))
else
tmp = ((l * l) * (2.0d0 / ((k ** 2.0d0) * (t_m ** 3.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.02e-60) {
tmp = 2.0 / (t_m * Math.exp(((4.0 * Math.log(k)) + (-2.0 * Math.log(l)))));
} else {
tmp = ((l * l) * (2.0 / (Math.pow(k, 2.0) * Math.pow(t_m, 3.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.02e-60: tmp = 2.0 / (t_m * math.exp(((4.0 * math.log(k)) + (-2.0 * math.log(l))))) else: tmp = ((l * l) * (2.0 / (math.pow(k, 2.0) * math.pow(t_m, 3.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.02e-60) tmp = Float64(2.0 / Float64(t_m * exp(Float64(Float64(4.0 * log(k)) + Float64(-2.0 * log(l)))))); else tmp = Float64(Float64(Float64(l * l) * Float64(2.0 / Float64((k ^ 2.0) * (t_m ^ 3.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.02e-60) tmp = 2.0 / (t_m * exp(((4.0 * log(k)) + (-2.0 * log(l))))); else tmp = ((l * l) * (2.0 / ((k ^ 2.0) * (t_m ^ 3.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.02e-60], N[(2.0 / N[(t$95$m * N[Exp[N[(N[(4.0 * N[Log[k], $MachinePrecision]), $MachinePrecision] + N[(-2.0 * N[Log[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $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.02 \cdot 10^{-60}:\\
\;\;\;\;\frac{2}{t_m \cdot e^{4 \cdot \log k + -2 \cdot \log \ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(\ell \cdot \ell\right) \cdot \frac{2}{{k}^{2} \cdot {t_m}^{3}}}{2 + {\left(\frac{k}{t_m}\right)}^{2}}\\
\end{array}
\end{array}
if t < 1.01999999999999994e-60Initial program 47.5%
Taylor expanded in t around 0 62.6%
associate-*r*62.6%
times-frac63.7%
Simplified63.7%
Taylor expanded in k around 0 51.0%
associate-/l*50.9%
associate-/r/51.0%
Simplified51.0%
div-inv51.0%
pow-flip51.0%
metadata-eval51.0%
add-log-exp49.6%
exp-prod52.1%
Applied egg-rr52.1%
pow-exp49.6%
rem-log-exp51.0%
pow-to-exp26.9%
pow-to-exp15.4%
prod-exp17.0%
rem-log-exp16.5%
pow-to-exp27.8%
log-pow17.0%
rem-log-exp15.4%
pow-to-exp28.2%
log-pow17.0%
Applied egg-rr17.0%
if 1.01999999999999994e-60 < t Initial program 67.4%
Simplified68.6%
Taylor expanded in k around 0 61.4%
Final simplification29.5%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.3e-60)
(/ 2.0 (* t_m (exp (+ (* 4.0 (log k)) (* -2.0 (log l))))))
(/ (pow l 2.0) (* (pow k 2.0) (pow t_m 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 <= 1.3e-60) {
tmp = 2.0 / (t_m * exp(((4.0 * log(k)) + (-2.0 * log(l)))));
} else {
tmp = pow(l, 2.0) / (pow(k, 2.0) * pow(t_m, 3.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.3d-60) then
tmp = 2.0d0 / (t_m * exp(((4.0d0 * log(k)) + ((-2.0d0) * log(l)))))
else
tmp = (l ** 2.0d0) / ((k ** 2.0d0) * (t_m ** 3.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.3e-60) {
tmp = 2.0 / (t_m * Math.exp(((4.0 * Math.log(k)) + (-2.0 * Math.log(l)))));
} else {
tmp = Math.pow(l, 2.0) / (Math.pow(k, 2.0) * Math.pow(t_m, 3.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.3e-60: tmp = 2.0 / (t_m * math.exp(((4.0 * math.log(k)) + (-2.0 * math.log(l))))) else: tmp = math.pow(l, 2.0) / (math.pow(k, 2.0) * math.pow(t_m, 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 <= 1.3e-60) tmp = Float64(2.0 / Float64(t_m * exp(Float64(Float64(4.0 * log(k)) + Float64(-2.0 * log(l)))))); else tmp = Float64((l ^ 2.0) / Float64((k ^ 2.0) * (t_m ^ 3.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.3e-60) tmp = 2.0 / (t_m * exp(((4.0 * log(k)) + (-2.0 * log(l))))); else tmp = (l ^ 2.0) / ((k ^ 2.0) * (t_m ^ 3.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.3e-60], N[(2.0 / N[(t$95$m * N[Exp[N[(N[(4.0 * N[Log[k], $MachinePrecision]), $MachinePrecision] + N[(-2.0 * N[Log[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 1.3 \cdot 10^{-60}:\\
\;\;\;\;\frac{2}{t_m \cdot e^{4 \cdot \log k + -2 \cdot \log \ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\ell}^{2}}{{k}^{2} \cdot {t_m}^{3}}\\
\end{array}
\end{array}
if t < 1.2999999999999999e-60Initial program 47.5%
Taylor expanded in t around 0 62.6%
associate-*r*62.6%
times-frac63.7%
Simplified63.7%
Taylor expanded in k around 0 51.0%
associate-/l*50.9%
associate-/r/51.0%
Simplified51.0%
div-inv51.0%
pow-flip51.0%
metadata-eval51.0%
add-log-exp49.6%
exp-prod52.1%
Applied egg-rr52.1%
pow-exp49.6%
rem-log-exp51.0%
pow-to-exp26.9%
pow-to-exp15.4%
prod-exp17.0%
rem-log-exp16.5%
pow-to-exp27.8%
log-pow17.0%
rem-log-exp15.4%
pow-to-exp28.2%
log-pow17.0%
Applied egg-rr17.0%
if 1.2999999999999999e-60 < t Initial program 67.4%
Simplified60.2%
Taylor expanded in k around 0 61.4%
Final simplification29.5%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 4e-16)
(/ 2.0 (* (/ (pow k 3.0) (pow l 2.0)) (* t_m k)))
(/ (pow l 2.0) (* (pow k 2.0) (pow t_m 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 <= 4e-16) {
tmp = 2.0 / ((pow(k, 3.0) / pow(l, 2.0)) * (t_m * k));
} else {
tmp = pow(l, 2.0) / (pow(k, 2.0) * pow(t_m, 3.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 <= 4d-16) then
tmp = 2.0d0 / (((k ** 3.0d0) / (l ** 2.0d0)) * (t_m * k))
else
tmp = (l ** 2.0d0) / ((k ** 2.0d0) * (t_m ** 3.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 <= 4e-16) {
tmp = 2.0 / ((Math.pow(k, 3.0) / Math.pow(l, 2.0)) * (t_m * k));
} else {
tmp = Math.pow(l, 2.0) / (Math.pow(k, 2.0) * Math.pow(t_m, 3.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 <= 4e-16: tmp = 2.0 / ((math.pow(k, 3.0) / math.pow(l, 2.0)) * (t_m * k)) else: tmp = math.pow(l, 2.0) / (math.pow(k, 2.0) * math.pow(t_m, 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 <= 4e-16) tmp = Float64(2.0 / Float64(Float64((k ^ 3.0) / (l ^ 2.0)) * Float64(t_m * k))); else tmp = Float64((l ^ 2.0) / Float64((k ^ 2.0) * (t_m ^ 3.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 <= 4e-16) tmp = 2.0 / (((k ^ 3.0) / (l ^ 2.0)) * (t_m * k)); else tmp = (l ^ 2.0) / ((k ^ 2.0) * (t_m ^ 3.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, 4e-16], 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[(N[Power[l, 2.0], $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 4 \cdot 10^{-16}:\\
\;\;\;\;\frac{2}{\frac{{k}^{3}}{{\ell}^{2}} \cdot \left(t_m \cdot k\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\ell}^{2}}{{k}^{2} \cdot {t_m}^{3}}\\
\end{array}
\end{array}
if t < 3.9999999999999999e-16Initial program 49.5%
Taylor expanded in k around 0 48.5%
unpow348.5%
pow248.5%
Applied egg-rr48.5%
Taylor expanded in k around inf 53.3%
times-frac53.4%
associate-/l*53.4%
Simplified53.4%
Taylor expanded in k around 0 52.9%
if 3.9999999999999999e-16 < t Initial program 64.7%
Simplified56.1%
Taylor expanded in k around 0 57.6%
Final simplification54.0%
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 3.0) (pow l 2.0)) (* t_m k)))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((pow(k, 3.0) / pow(l, 2.0)) * (t_m * 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 / (((k ** 3.0d0) / (l ** 2.0d0)) * (t_m * 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 / ((Math.pow(k, 3.0) / Math.pow(l, 2.0)) * (t_m * 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 / ((math.pow(k, 3.0) / math.pow(l, 2.0)) * (t_m * 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((k ^ 3.0) / (l ^ 2.0)) * Float64(t_m * 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 / (((k ^ 3.0) / (l ^ 2.0)) * (t_m * 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[Power[k, 3.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(t$95$m * k), $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}{\frac{{k}^{3}}{{\ell}^{2}} \cdot \left(t_m \cdot k\right)}
\end{array}
Initial program 53.1%
Taylor expanded in k around 0 52.7%
unpow352.7%
pow252.7%
Applied egg-rr52.7%
Taylor expanded in k around inf 51.9%
times-frac52.1%
associate-/l*52.0%
Simplified52.0%
Taylor expanded in k around 0 51.6%
Final simplification51.6%
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 l 2.0) t_m) (pow k 4.0)))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 * ((pow(l, 2.0) / t_m) / pow(k, 4.0)));
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 * (((l ** 2.0d0) / t_m) / (k ** 4.0d0)))
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 * ((Math.pow(l, 2.0) / t_m) / Math.pow(k, 4.0)));
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 * ((math.pow(l, 2.0) / t_m) / math.pow(k, 4.0)))
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 * Float64(Float64((l ^ 2.0) / t_m) / (k ^ 4.0)))) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 * (((l ^ 2.0) / t_m) / (k ^ 4.0))); end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / t$95$m), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \left(2 \cdot \frac{\frac{{\ell}^{2}}{t_m}}{{k}^{4}}\right)
\end{array}
Initial program 53.1%
Taylor expanded in k around 0 52.7%
unpow352.7%
pow252.7%
Applied egg-rr52.7%
Taylor expanded in k around inf 51.9%
times-frac52.1%
associate-/l*52.0%
Simplified52.0%
Taylor expanded in k around 0 51.5%
associate-/l/51.4%
Simplified51.4%
Final simplification51.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 l 2.0) (* t_m (pow k 4.0))))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 * (pow(l, 2.0) / (t_m * pow(k, 4.0))));
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 * ((l ** 2.0d0) / (t_m * (k ** 4.0d0))))
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 * (Math.pow(l, 2.0) / (t_m * Math.pow(k, 4.0))));
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 * (math.pow(l, 2.0) / (t_m * math.pow(k, 4.0))))
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 * Float64((l ^ 2.0) / Float64(t_m * (k ^ 4.0))))) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 * ((l ^ 2.0) / (t_m * (k ^ 4.0)))); end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 4.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 \left(2 \cdot \frac{{\ell}^{2}}{t_m \cdot {k}^{4}}\right)
\end{array}
Initial program 53.1%
Taylor expanded in t around 0 59.9%
associate-*r*59.9%
times-frac60.7%
Simplified60.7%
Taylor expanded in k around 0 51.5%
associate-/l*51.4%
associate-/r/51.5%
Simplified51.5%
Taylor expanded in k around 0 51.5%
Final simplification51.5%
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) (pow l -2.0))))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / (t_m * (pow(k, 4.0) * pow(l, -2.0))));
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / (t_m * ((k ** 4.0d0) * (l ** (-2.0d0)))))
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / (t_m * (Math.pow(k, 4.0) * Math.pow(l, -2.0))));
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / (t_m * (math.pow(k, 4.0) * math.pow(l, -2.0))))
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64(t_m * Float64((k ^ 4.0) * (l ^ -2.0))))) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / (t_m * ((k ^ 4.0) * (l ^ -2.0)))); end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(t$95$m * N[(N[Power[k, 4.0], $MachinePrecision] * N[Power[l, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \frac{2}{t_m \cdot \left({k}^{4} \cdot {\ell}^{-2}\right)}
\end{array}
Initial program 53.1%
Taylor expanded in t around 0 59.9%
associate-*r*59.9%
times-frac60.7%
Simplified60.7%
Taylor expanded in k around 0 51.5%
associate-/l*51.4%
associate-/r/51.5%
Simplified51.5%
expm1-log1p-u51.4%
expm1-udef51.1%
div-inv51.1%
pow-flip51.1%
metadata-eval51.1%
Applied egg-rr51.1%
expm1-def51.4%
expm1-log1p51.5%
Simplified51.5%
Final simplification51.5%
herbie shell --seed 2023319
(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))))