
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 4.2e-61)
(/ 2.0 (/ (* (/ (pow (sin k) 2.0) (/ (cos k) t_m)) (/ (pow k 2.0) l)) l))
(/
2.0
(pow
(/
(/ t_m (cbrt (/ l (sin k))))
(cbrt (/ l (* (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 <= 4.2e-61) {
tmp = 2.0 / (((pow(sin(k), 2.0) / (cos(k) / t_m)) * (pow(k, 2.0) / l)) / l);
} else {
tmp = 2.0 / pow(((t_m / cbrt((l / sin(k)))) / cbrt((l / (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 <= 4.2e-61) {
tmp = 2.0 / (((Math.pow(Math.sin(k), 2.0) / (Math.cos(k) / t_m)) * (Math.pow(k, 2.0) / l)) / l);
} else {
tmp = 2.0 / Math.pow(((t_m / Math.cbrt((l / Math.sin(k)))) / Math.cbrt((l / (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 <= 4.2e-61) tmp = Float64(2.0 / Float64(Float64(Float64((sin(k) ^ 2.0) / Float64(cos(k) / t_m)) * Float64((k ^ 2.0) / l)) / l)); else tmp = Float64(2.0 / (Float64(Float64(t_m / cbrt(Float64(l / sin(k)))) / cbrt(Float64(l / 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, 4.2e-61], N[(2.0 / N[(N[(N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(t$95$m / N[Power[N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[N[(l / N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $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 4.2 \cdot 10^{-61}:\\
\;\;\;\;\frac{2}{\frac{\frac{{\sin k}^{2}}{\frac{\cos k}{t_m}} \cdot \frac{{k}^{2}}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{\frac{t_m}{\sqrt[3]{\frac{\ell}{\sin k}}}}{\sqrt[3]{\frac{\ell}{\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)}}}\right)}^{3}}\\
\end{array}
\end{array}
if t < 4.1999999999999998e-61Initial program 54.5%
associate-*l*54.5%
sqr-neg54.5%
sqr-neg54.5%
associate-/r*59.5%
distribute-rgt-in59.5%
unpow259.5%
times-frac43.6%
sqr-neg43.6%
times-frac59.5%
unpow259.5%
distribute-rgt-in59.5%
Simplified59.5%
add-cube-cbrt59.5%
pow359.5%
cbrt-div59.4%
rem-cbrt-cube66.0%
Applied egg-rr66.0%
associate-*l/64.4%
cube-div59.5%
pow359.5%
add-cube-cbrt59.5%
Applied egg-rr59.5%
associate-*l/59.5%
associate-*l/60.9%
Applied egg-rr60.9%
Taylor expanded in t around 0 69.2%
*-commutative69.2%
*-commutative69.2%
times-frac69.2%
*-commutative69.2%
associate-/l*69.2%
Simplified69.2%
if 4.1999999999999998e-61 < t Initial program 75.0%
associate-*l*75.0%
sqr-neg75.0%
sqr-neg75.0%
associate-/r*79.9%
distribute-rgt-in79.9%
unpow279.9%
times-frac72.2%
sqr-neg72.2%
times-frac79.9%
unpow279.9%
distribute-rgt-in79.9%
Simplified79.9%
add-cube-cbrt79.7%
pow379.7%
cbrt-div79.8%
rem-cbrt-cube82.7%
Applied egg-rr82.7%
associate-*l/82.7%
cube-div79.8%
pow379.8%
add-cube-cbrt79.9%
Applied egg-rr79.9%
associate-*l/79.8%
associate-*l/79.8%
Applied egg-rr79.8%
add-cube-cbrt79.8%
pow379.8%
associate-/l*79.8%
cbrt-div79.8%
associate-/l*79.8%
cbrt-div79.8%
rem-cbrt-cube95.2%
Applied egg-rr95.2%
Final simplification75.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 3.1e-40)
(/ 2.0 (/ (* (/ (pow (sin k) 2.0) (/ (cos k) t_m)) (/ (pow k 2.0) l)) l))
(/
2.0
(/
(pow
(*
(/ t_m (cbrt (/ l (sin k))))
(cbrt (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))))
3.0)
l)))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3.1e-40) {
tmp = 2.0 / (((pow(sin(k), 2.0) / (cos(k) / t_m)) * (pow(k, 2.0) / l)) / l);
} else {
tmp = 2.0 / (pow(((t_m / cbrt((l / sin(k)))) * cbrt((tan(k) * (2.0 + pow((k / t_m), 2.0))))), 3.0) / l);
}
return t_s * tmp;
}
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3.1e-40) {
tmp = 2.0 / (((Math.pow(Math.sin(k), 2.0) / (Math.cos(k) / t_m)) * (Math.pow(k, 2.0) / l)) / l);
} else {
tmp = 2.0 / (Math.pow(((t_m / Math.cbrt((l / Math.sin(k)))) * Math.cbrt((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))))), 3.0) / l);
}
return t_s * tmp;
}
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 3.1e-40) tmp = Float64(2.0 / Float64(Float64(Float64((sin(k) ^ 2.0) / Float64(cos(k) / t_m)) * Float64((k ^ 2.0) / l)) / l)); else tmp = Float64(2.0 / Float64((Float64(Float64(t_m / cbrt(Float64(l / sin(k)))) * cbrt(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))))) ^ 3.0) / l)); end return Float64(t_s * tmp) end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3.1e-40], N[(2.0 / N[(N[(N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[(t$95$m / N[Power[N[(l / N[Sin[k], $MachinePrecision]), $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] / l), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 3.1 \cdot 10^{-40}:\\
\;\;\;\;\frac{2}{\frac{\frac{{\sin k}^{2}}{\frac{\cos k}{t_m}} \cdot \frac{{k}^{2}}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{\left(\frac{t_m}{\sqrt[3]{\frac{\ell}{\sin k}}} \cdot \sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)}\right)}^{3}}{\ell}}\\
\end{array}
\end{array}
if t < 3.10000000000000011e-40Initial program 54.5%
associate-*l*54.5%
sqr-neg54.5%
sqr-neg54.5%
associate-/r*59.5%
distribute-rgt-in59.5%
unpow259.5%
times-frac43.7%
sqr-neg43.7%
times-frac59.5%
unpow259.5%
distribute-rgt-in59.5%
Simplified59.5%
add-cube-cbrt59.4%
pow359.4%
cbrt-div59.4%
rem-cbrt-cube65.9%
Applied egg-rr65.9%
associate-*l/64.2%
cube-div59.4%
pow359.4%
add-cube-cbrt59.5%
Applied egg-rr59.5%
associate-*l/59.4%
associate-*l/60.8%
Applied egg-rr60.8%
Taylor expanded in t around 0 69.5%
*-commutative69.5%
*-commutative69.5%
times-frac69.5%
*-commutative69.5%
associate-/l*69.5%
Simplified69.5%
if 3.10000000000000011e-40 < t Initial program 75.7%
associate-*l*75.7%
sqr-neg75.7%
sqr-neg75.7%
associate-/r*80.7%
distribute-rgt-in80.7%
unpow280.7%
times-frac72.8%
sqr-neg72.8%
times-frac80.7%
unpow280.7%
distribute-rgt-in80.7%
Simplified80.7%
add-cube-cbrt80.6%
pow380.6%
cbrt-div80.7%
rem-cbrt-cube83.7%
Applied egg-rr83.7%
associate-*l/83.7%
cube-div80.6%
pow380.6%
add-cube-cbrt80.7%
Applied egg-rr80.7%
associate-*l/80.7%
associate-*l/80.7%
Applied egg-rr80.7%
add-cube-cbrt80.6%
pow380.6%
cbrt-prod80.7%
associate-/l*80.6%
cbrt-div80.6%
rem-cbrt-cube92.3%
Applied egg-rr92.3%
Final simplification75.2%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (cbrt (sin k))))
(*
t_s
(if (<= t_m 3.1e-40)
(/ 2.0 (/ (* (/ (pow (sin k) 2.0) (/ (cos k) t_m)) (/ (pow k 2.0) l)) l))
(if (<= t_m 7.6e+140)
(/
2.0
(/
(*
(* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
(/ (pow (* t_m t_2) 3.0) l))
l))
(if (<= t_m 8e+194)
(/ (* l l) (pow (* t_m (pow (cbrt k) 2.0)) 3.0))
(/
2.0
(* (pow (* t_2 (/ t_m (pow (cbrt l) 2.0))) 3.0) (* 2.0 k)))))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = cbrt(sin(k));
double tmp;
if (t_m <= 3.1e-40) {
tmp = 2.0 / (((pow(sin(k), 2.0) / (cos(k) / t_m)) * (pow(k, 2.0) / l)) / l);
} else if (t_m <= 7.6e+140) {
tmp = 2.0 / (((tan(k) * (2.0 + pow((k / t_m), 2.0))) * (pow((t_m * t_2), 3.0) / l)) / l);
} else if (t_m <= 8e+194) {
tmp = (l * l) / pow((t_m * pow(cbrt(k), 2.0)), 3.0);
} else {
tmp = 2.0 / (pow((t_2 * (t_m / pow(cbrt(l), 2.0))), 3.0) * (2.0 * k));
}
return t_s * tmp;
}
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.cbrt(Math.sin(k));
double tmp;
if (t_m <= 3.1e-40) {
tmp = 2.0 / (((Math.pow(Math.sin(k), 2.0) / (Math.cos(k) / t_m)) * (Math.pow(k, 2.0) / l)) / l);
} else if (t_m <= 7.6e+140) {
tmp = 2.0 / (((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))) * (Math.pow((t_m * t_2), 3.0) / l)) / l);
} else if (t_m <= 8e+194) {
tmp = (l * l) / Math.pow((t_m * Math.pow(Math.cbrt(k), 2.0)), 3.0);
} else {
tmp = 2.0 / (Math.pow((t_2 * (t_m / Math.pow(Math.cbrt(l), 2.0))), 3.0) * (2.0 * k));
}
return t_s * tmp;
}
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = cbrt(sin(k)) tmp = 0.0 if (t_m <= 3.1e-40) tmp = Float64(2.0 / Float64(Float64(Float64((sin(k) ^ 2.0) / Float64(cos(k) / t_m)) * Float64((k ^ 2.0) / l)) / l)); elseif (t_m <= 7.6e+140) tmp = Float64(2.0 / Float64(Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64((Float64(t_m * t_2) ^ 3.0) / l)) / l)); elseif (t_m <= 8e+194) tmp = Float64(Float64(l * l) / (Float64(t_m * (cbrt(k) ^ 2.0)) ^ 3.0)); else tmp = Float64(2.0 / Float64((Float64(t_2 * Float64(t_m / (cbrt(l) ^ 2.0))) ^ 3.0) * Float64(2.0 * k))); end return Float64(t_s * tmp) end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 3.1e-40], N[(2.0 / N[(N[(N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 7.6e+140], N[(2.0 / N[(N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(t$95$m * t$95$2), $MachinePrecision], 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 8e+194], N[(N[(l * l), $MachinePrecision] / N[Power[N[(t$95$m * N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(t$95$2 * N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \sqrt[3]{\sin k}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 3.1 \cdot 10^{-40}:\\
\;\;\;\;\frac{2}{\frac{\frac{{\sin k}^{2}}{\frac{\cos k}{t_m}} \cdot \frac{{k}^{2}}{\ell}}{\ell}}\\
\mathbf{elif}\;t_m \leq 7.6 \cdot 10^{+140}:\\
\;\;\;\;\frac{2}{\frac{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right) \cdot \frac{{\left(t_m \cdot t_2\right)}^{3}}{\ell}}{\ell}}\\
\mathbf{elif}\;t_m \leq 8 \cdot 10^{+194}:\\
\;\;\;\;\frac{\ell \cdot \ell}{{\left(t_m \cdot {\left(\sqrt[3]{k}\right)}^{2}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t_2 \cdot \frac{t_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot k\right)}\\
\end{array}
\end{array}
\end{array}
if t < 3.10000000000000011e-40Initial program 54.5%
associate-*l*54.5%
sqr-neg54.5%
sqr-neg54.5%
associate-/r*59.5%
distribute-rgt-in59.5%
unpow259.5%
times-frac43.7%
sqr-neg43.7%
times-frac59.5%
unpow259.5%
distribute-rgt-in59.5%
Simplified59.5%
add-cube-cbrt59.4%
pow359.4%
cbrt-div59.4%
rem-cbrt-cube65.9%
Applied egg-rr65.9%
associate-*l/64.2%
cube-div59.4%
pow359.4%
add-cube-cbrt59.5%
Applied egg-rr59.5%
associate-*l/59.4%
associate-*l/60.8%
Applied egg-rr60.8%
Taylor expanded in t around 0 69.5%
*-commutative69.5%
*-commutative69.5%
times-frac69.5%
*-commutative69.5%
associate-/l*69.5%
Simplified69.5%
if 3.10000000000000011e-40 < t < 7.6000000000000002e140Initial program 78.2%
associate-*l*78.2%
sqr-neg78.2%
sqr-neg78.2%
associate-/r*81.4%
distribute-rgt-in81.4%
unpow281.4%
times-frac81.4%
sqr-neg81.4%
times-frac81.4%
unpow281.4%
distribute-rgt-in81.4%
Simplified81.4%
add-cube-cbrt81.2%
pow381.2%
cbrt-div81.3%
rem-cbrt-cube84.4%
Applied egg-rr84.4%
associate-*l/84.3%
cube-div81.3%
pow381.2%
add-cube-cbrt81.4%
Applied egg-rr81.4%
associate-*l/81.4%
associate-*l/81.4%
Applied egg-rr81.4%
add-cube-cbrt81.4%
pow381.4%
cbrt-prod81.4%
rem-cbrt-cube90.4%
Applied egg-rr90.4%
if 7.6000000000000002e140 < t < 7.99999999999999956e194Initial program 68.4%
associate-/r*68.4%
sqr-neg68.4%
associate-*l*59.1%
sqr-neg59.1%
associate-/r*59.1%
associate-+l+59.1%
unpow259.1%
times-frac50.7%
sqr-neg50.7%
times-frac59.1%
unpow259.1%
Simplified59.1%
Taylor expanded in k around 0 59.1%
unpow234.0%
Applied egg-rr59.1%
add-cube-cbrt59.1%
pow359.1%
*-commutative59.1%
cbrt-prod59.1%
unpow359.1%
add-cbrt-cube75.3%
unpow275.3%
cbrt-prod99.1%
pow299.1%
Applied egg-rr99.1%
if 7.99999999999999956e194 < t Initial program 76.2%
associate-*l*76.2%
sqr-neg76.2%
sqr-neg76.2%
associate-/r*86.6%
distribute-rgt-in86.6%
unpow286.6%
times-frac67.3%
sqr-neg67.3%
times-frac86.6%
unpow286.6%
distribute-rgt-in86.6%
Simplified86.6%
add-cube-cbrt86.6%
pow386.6%
cbrt-div86.6%
rem-cbrt-cube86.6%
Applied egg-rr86.6%
div-inv86.6%
unpow386.6%
unpow286.6%
associate-*r*91.2%
add-cube-cbrt91.2%
pow391.2%
Applied egg-rr95.4%
add-cube-cbrt95.3%
pow395.3%
cbrt-prod95.6%
unpow395.5%
add-cbrt-cube95.6%
associate-/l/95.6%
pow295.6%
Applied egg-rr95.6%
Taylor expanded in k around 0 86.7%
Final simplification74.8%
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.4e-40)
(/ 2.0 (/ (* (/ (pow (sin k) 2.0) (/ (cos k) t_m)) (/ (pow k 2.0) l)) l))
(if (<= t_m 5.5e+102)
(/
2.0
(/
(*
(* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
(/ (* (sin k) (pow t_m 3.0)) l))
l))
(if (<= t_m 4.6e+196)
(/ (* l l) (pow (* t_m (pow (cbrt k) 2.0)) 3.0))
(/
2.0
(*
(pow (* (cbrt (sin k)) (/ t_m (pow (cbrt l) 2.0))) 3.0)
(* 2.0 k))))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5.4e-40) {
tmp = 2.0 / (((pow(sin(k), 2.0) / (cos(k) / t_m)) * (pow(k, 2.0) / l)) / l);
} else if (t_m <= 5.5e+102) {
tmp = 2.0 / (((tan(k) * (2.0 + pow((k / t_m), 2.0))) * ((sin(k) * pow(t_m, 3.0)) / l)) / l);
} else if (t_m <= 4.6e+196) {
tmp = (l * l) / pow((t_m * pow(cbrt(k), 2.0)), 3.0);
} else {
tmp = 2.0 / (pow((cbrt(sin(k)) * (t_m / pow(cbrt(l), 2.0))), 3.0) * (2.0 * k));
}
return t_s * tmp;
}
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5.4e-40) {
tmp = 2.0 / (((Math.pow(Math.sin(k), 2.0) / (Math.cos(k) / t_m)) * (Math.pow(k, 2.0) / l)) / l);
} else if (t_m <= 5.5e+102) {
tmp = 2.0 / (((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))) * ((Math.sin(k) * Math.pow(t_m, 3.0)) / l)) / l);
} else if (t_m <= 4.6e+196) {
tmp = (l * l) / Math.pow((t_m * Math.pow(Math.cbrt(k), 2.0)), 3.0);
} else {
tmp = 2.0 / (Math.pow((Math.cbrt(Math.sin(k)) * (t_m / Math.pow(Math.cbrt(l), 2.0))), 3.0) * (2.0 * k));
}
return t_s * tmp;
}
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 5.4e-40) tmp = Float64(2.0 / Float64(Float64(Float64((sin(k) ^ 2.0) / Float64(cos(k) / t_m)) * Float64((k ^ 2.0) / l)) / l)); elseif (t_m <= 5.5e+102) tmp = Float64(2.0 / Float64(Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(Float64(sin(k) * (t_m ^ 3.0)) / l)) / l)); elseif (t_m <= 4.6e+196) tmp = Float64(Float64(l * l) / (Float64(t_m * (cbrt(k) ^ 2.0)) ^ 3.0)); else tmp = Float64(2.0 / Float64((Float64(cbrt(sin(k)) * Float64(t_m / (cbrt(l) ^ 2.0))) ^ 3.0) * Float64(2.0 * k))); end return Float64(t_s * tmp) end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 5.4e-40], N[(2.0 / N[(N[(N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.5e+102], N[(2.0 / N[(N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.6e+196], N[(N[(l * l), $MachinePrecision] / N[Power[N[(t$95$m * N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 5.4 \cdot 10^{-40}:\\
\;\;\;\;\frac{2}{\frac{\frac{{\sin k}^{2}}{\frac{\cos k}{t_m}} \cdot \frac{{k}^{2}}{\ell}}{\ell}}\\
\mathbf{elif}\;t_m \leq 5.5 \cdot 10^{+102}:\\
\;\;\;\;\frac{2}{\frac{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right) \cdot \frac{\sin k \cdot {t_m}^{3}}{\ell}}{\ell}}\\
\mathbf{elif}\;t_m \leq 4.6 \cdot 10^{+196}:\\
\;\;\;\;\frac{\ell \cdot \ell}{{\left(t_m \cdot {\left(\sqrt[3]{k}\right)}^{2}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot k\right)}\\
\end{array}
\end{array}
if t < 5.4e-40Initial program 54.5%
associate-*l*54.5%
sqr-neg54.5%
sqr-neg54.5%
associate-/r*59.5%
distribute-rgt-in59.5%
unpow259.5%
times-frac43.7%
sqr-neg43.7%
times-frac59.5%
unpow259.5%
distribute-rgt-in59.5%
Simplified59.5%
add-cube-cbrt59.4%
pow359.4%
cbrt-div59.4%
rem-cbrt-cube65.9%
Applied egg-rr65.9%
associate-*l/64.2%
cube-div59.4%
pow359.4%
add-cube-cbrt59.5%
Applied egg-rr59.5%
associate-*l/59.4%
associate-*l/60.8%
Applied egg-rr60.8%
Taylor expanded in t around 0 69.5%
*-commutative69.5%
*-commutative69.5%
times-frac69.5%
*-commutative69.5%
associate-/l*69.5%
Simplified69.5%
if 5.4e-40 < t < 5.49999999999999981e102Initial program 87.4%
associate-*l*87.4%
sqr-neg87.4%
sqr-neg87.4%
associate-/r*91.8%
distribute-rgt-in91.8%
unpow291.8%
times-frac91.8%
sqr-neg91.8%
times-frac91.8%
unpow291.8%
distribute-rgt-in91.8%
Simplified91.8%
add-cube-cbrt91.4%
pow391.4%
cbrt-div91.5%
rem-cbrt-cube91.5%
Applied egg-rr91.5%
associate-*l/91.5%
cube-div91.5%
pow391.5%
add-cube-cbrt91.8%
Applied egg-rr91.8%
associate-*l/91.7%
associate-*l/91.7%
Applied egg-rr91.7%
if 5.49999999999999981e102 < t < 4.59999999999999961e196Initial program 61.6%
associate-/r*61.6%
sqr-neg61.6%
associate-*l*55.7%
sqr-neg55.7%
associate-/r*55.8%
associate-+l+55.8%
unpow255.8%
times-frac50.8%
sqr-neg50.8%
times-frac55.8%
unpow255.8%
Simplified55.8%
Taylor expanded in k around 0 55.7%
unpow235.9%
Applied egg-rr55.7%
add-cube-cbrt55.7%
pow355.7%
*-commutative55.7%
cbrt-prod55.7%
unpow355.7%
add-cbrt-cube70.6%
unpow270.6%
cbrt-prod93.8%
pow293.8%
Applied egg-rr93.8%
if 4.59999999999999961e196 < t Initial program 76.2%
associate-*l*76.2%
sqr-neg76.2%
sqr-neg76.2%
associate-/r*86.6%
distribute-rgt-in86.6%
unpow286.6%
times-frac67.3%
sqr-neg67.3%
times-frac86.6%
unpow286.6%
distribute-rgt-in86.6%
Simplified86.6%
add-cube-cbrt86.6%
pow386.6%
cbrt-div86.6%
rem-cbrt-cube86.6%
Applied egg-rr86.6%
div-inv86.6%
unpow386.6%
unpow286.6%
associate-*r*91.2%
add-cube-cbrt91.2%
pow391.2%
Applied egg-rr95.4%
add-cube-cbrt95.3%
pow395.3%
cbrt-prod95.6%
unpow395.5%
add-cbrt-cube95.6%
associate-/l/95.6%
pow295.6%
Applied egg-rr95.6%
Taylor expanded in k around 0 86.7%
Final simplification74.8%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 2.9e-40)
(/ 2.0 (/ (* (/ (pow (sin k) 2.0) (/ (cos k) t_m)) (/ (pow k 2.0) l)) l))
(/
2.0
(/
(*
(* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
(pow (/ t_m (cbrt (/ l (sin k)))) 3.0))
l)))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.9e-40) {
tmp = 2.0 / (((pow(sin(k), 2.0) / (cos(k) / t_m)) * (pow(k, 2.0) / l)) / l);
} else {
tmp = 2.0 / (((tan(k) * (2.0 + pow((k / t_m), 2.0))) * pow((t_m / cbrt((l / sin(k)))), 3.0)) / l);
}
return t_s * tmp;
}
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.9e-40) {
tmp = 2.0 / (((Math.pow(Math.sin(k), 2.0) / (Math.cos(k) / t_m)) * (Math.pow(k, 2.0) / l)) / l);
} else {
tmp = 2.0 / (((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))) * Math.pow((t_m / Math.cbrt((l / Math.sin(k)))), 3.0)) / l);
}
return t_s * tmp;
}
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 2.9e-40) tmp = Float64(2.0 / Float64(Float64(Float64((sin(k) ^ 2.0) / Float64(cos(k) / t_m)) * Float64((k ^ 2.0) / l)) / l)); else tmp = Float64(2.0 / Float64(Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * (Float64(t_m / cbrt(Float64(l / sin(k)))) ^ 3.0)) / l)); end return Float64(t_s * tmp) end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.9e-40], N[(2.0 / N[(N[(N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[(t$95$m / N[Power[N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 2.9 \cdot 10^{-40}:\\
\;\;\;\;\frac{2}{\frac{\frac{{\sin k}^{2}}{\frac{\cos k}{t_m}} \cdot \frac{{k}^{2}}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right) \cdot {\left(\frac{t_m}{\sqrt[3]{\frac{\ell}{\sin k}}}\right)}^{3}}{\ell}}\\
\end{array}
\end{array}
if t < 2.8999999999999999e-40Initial program 54.5%
associate-*l*54.5%
sqr-neg54.5%
sqr-neg54.5%
associate-/r*59.5%
distribute-rgt-in59.5%
unpow259.5%
times-frac43.7%
sqr-neg43.7%
times-frac59.5%
unpow259.5%
distribute-rgt-in59.5%
Simplified59.5%
add-cube-cbrt59.4%
pow359.4%
cbrt-div59.4%
rem-cbrt-cube65.9%
Applied egg-rr65.9%
associate-*l/64.2%
cube-div59.4%
pow359.4%
add-cube-cbrt59.5%
Applied egg-rr59.5%
associate-*l/59.4%
associate-*l/60.8%
Applied egg-rr60.8%
Taylor expanded in t around 0 69.5%
*-commutative69.5%
*-commutative69.5%
times-frac69.5%
*-commutative69.5%
associate-/l*69.5%
Simplified69.5%
if 2.8999999999999999e-40 < t Initial program 75.7%
associate-*l*75.7%
sqr-neg75.7%
sqr-neg75.7%
associate-/r*80.7%
distribute-rgt-in80.7%
unpow280.7%
times-frac72.8%
sqr-neg72.8%
times-frac80.7%
unpow280.7%
distribute-rgt-in80.7%
Simplified80.7%
add-cube-cbrt80.6%
pow380.6%
cbrt-div80.7%
rem-cbrt-cube83.7%
Applied egg-rr83.7%
associate-*l/83.7%
cube-div80.6%
pow380.6%
add-cube-cbrt80.7%
Applied egg-rr80.7%
associate-*l/80.7%
associate-*l/80.7%
Applied egg-rr80.7%
add-cube-cbrt80.7%
pow380.7%
associate-/l*80.7%
cbrt-div80.6%
rem-cbrt-cube88.2%
Applied egg-rr88.2%
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 5e-40)
(/ 2.0 (/ (* (/ (pow (sin k) 2.0) (/ (cos k) t_m)) (/ (pow k 2.0) l)) l))
(if (<= t_m 5.5e+102)
(/
2.0
(/
(*
(* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
(/ (* (sin k) (pow t_m 3.0)) l))
l))
(/ (* l l) (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 <= 5e-40) {
tmp = 2.0 / (((pow(sin(k), 2.0) / (cos(k) / t_m)) * (pow(k, 2.0) / l)) / l);
} else if (t_m <= 5.5e+102) {
tmp = 2.0 / (((tan(k) * (2.0 + pow((k / t_m), 2.0))) * ((sin(k) * pow(t_m, 3.0)) / l)) / l);
} else {
tmp = (l * l) / 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 <= 5e-40) {
tmp = 2.0 / (((Math.pow(Math.sin(k), 2.0) / (Math.cos(k) / t_m)) * (Math.pow(k, 2.0) / l)) / l);
} else if (t_m <= 5.5e+102) {
tmp = 2.0 / (((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))) * ((Math.sin(k) * Math.pow(t_m, 3.0)) / l)) / l);
} else {
tmp = (l * l) / 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 <= 5e-40) tmp = Float64(2.0 / Float64(Float64(Float64((sin(k) ^ 2.0) / Float64(cos(k) / t_m)) * Float64((k ^ 2.0) / l)) / l)); elseif (t_m <= 5.5e+102) tmp = Float64(2.0 / Float64(Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(Float64(sin(k) * (t_m ^ 3.0)) / l)) / l)); else tmp = Float64(Float64(l * l) / (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, 5e-40], N[(2.0 / N[(N[(N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.5e+102], N[(2.0 / N[(N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $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 \cdot 10^{-40}:\\
\;\;\;\;\frac{2}{\frac{\frac{{\sin k}^{2}}{\frac{\cos k}{t_m}} \cdot \frac{{k}^{2}}{\ell}}{\ell}}\\
\mathbf{elif}\;t_m \leq 5.5 \cdot 10^{+102}:\\
\;\;\;\;\frac{2}{\frac{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right) \cdot \frac{\sin k \cdot {t_m}^{3}}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell \cdot \ell}{{\left(t_m \cdot {\left(\sqrt[3]{k}\right)}^{2}\right)}^{3}}\\
\end{array}
\end{array}
if t < 4.99999999999999965e-40Initial program 54.5%
associate-*l*54.5%
sqr-neg54.5%
sqr-neg54.5%
associate-/r*59.5%
distribute-rgt-in59.5%
unpow259.5%
times-frac43.7%
sqr-neg43.7%
times-frac59.5%
unpow259.5%
distribute-rgt-in59.5%
Simplified59.5%
add-cube-cbrt59.4%
pow359.4%
cbrt-div59.4%
rem-cbrt-cube65.9%
Applied egg-rr65.9%
associate-*l/64.2%
cube-div59.4%
pow359.4%
add-cube-cbrt59.5%
Applied egg-rr59.5%
associate-*l/59.4%
associate-*l/60.8%
Applied egg-rr60.8%
Taylor expanded in t around 0 69.5%
*-commutative69.5%
*-commutative69.5%
times-frac69.5%
*-commutative69.5%
associate-/l*69.5%
Simplified69.5%
if 4.99999999999999965e-40 < t < 5.49999999999999981e102Initial program 87.4%
associate-*l*87.4%
sqr-neg87.4%
sqr-neg87.4%
associate-/r*91.8%
distribute-rgt-in91.8%
unpow291.8%
times-frac91.8%
sqr-neg91.8%
times-frac91.8%
unpow291.8%
distribute-rgt-in91.8%
Simplified91.8%
add-cube-cbrt91.4%
pow391.4%
cbrt-div91.5%
rem-cbrt-cube91.5%
Applied egg-rr91.5%
associate-*l/91.5%
cube-div91.5%
pow391.5%
add-cube-cbrt91.8%
Applied egg-rr91.8%
associate-*l/91.7%
associate-*l/91.7%
Applied egg-rr91.7%
if 5.49999999999999981e102 < t Initial program 69.1%
associate-/r*69.1%
sqr-neg69.1%
associate-*l*56.4%
sqr-neg56.4%
associate-/r*61.9%
associate-+l+61.9%
unpow261.9%
times-frac49.5%
sqr-neg49.5%
times-frac61.9%
unpow261.9%
Simplified61.9%
Taylor expanded in k around 0 56.4%
unpow237.3%
Applied egg-rr56.4%
add-cube-cbrt56.4%
pow356.4%
*-commutative56.4%
cbrt-prod56.4%
unpow356.4%
add-cbrt-cube63.8%
unpow263.8%
cbrt-prod84.8%
pow284.8%
Applied egg-rr84.8%
Final simplification73.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 920000000.0)
(/ 2.0 (/ (* (/ (pow (sin k) 2.0) (/ (cos k) t_m)) (/ (pow k 2.0) l)) l))
(/ (* l l) (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 <= 920000000.0) {
tmp = 2.0 / (((pow(sin(k), 2.0) / (cos(k) / t_m)) * (pow(k, 2.0) / l)) / l);
} else {
tmp = (l * l) / 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 <= 920000000.0) {
tmp = 2.0 / (((Math.pow(Math.sin(k), 2.0) / (Math.cos(k) / t_m)) * (Math.pow(k, 2.0) / l)) / l);
} else {
tmp = (l * l) / 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 <= 920000000.0) tmp = Float64(2.0 / Float64(Float64(Float64((sin(k) ^ 2.0) / Float64(cos(k) / t_m)) * Float64((k ^ 2.0) / l)) / l)); else tmp = Float64(Float64(l * l) / (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, 920000000.0], N[(2.0 / N[(N[(N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $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 920000000:\\
\;\;\;\;\frac{2}{\frac{\frac{{\sin k}^{2}}{\frac{\cos k}{t_m}} \cdot \frac{{k}^{2}}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell \cdot \ell}{{\left(t_m \cdot {\left(\sqrt[3]{k}\right)}^{2}\right)}^{3}}\\
\end{array}
\end{array}
if t < 9.2e8Initial program 56.1%
associate-*l*56.1%
sqr-neg56.1%
sqr-neg56.1%
associate-/r*60.8%
distribute-rgt-in60.8%
unpow260.8%
times-frac45.8%
sqr-neg45.8%
times-frac60.8%
unpow260.8%
distribute-rgt-in60.8%
Simplified60.8%
add-cube-cbrt60.8%
pow360.8%
cbrt-div60.7%
rem-cbrt-cube66.9%
Applied egg-rr66.9%
associate-*l/65.4%
cube-div60.8%
pow360.8%
add-cube-cbrt60.8%
Applied egg-rr60.8%
associate-*l/60.8%
associate-*l/62.1%
Applied egg-rr62.1%
Taylor expanded in t around 0 70.4%
*-commutative70.4%
*-commutative70.4%
times-frac70.4%
*-commutative70.4%
associate-/l*70.4%
Simplified70.4%
if 9.2e8 < t Initial program 73.4%
associate-/r*73.4%
sqr-neg73.4%
associate-*l*62.2%
sqr-neg62.2%
associate-/r*68.0%
associate-+l+68.0%
unpow268.0%
times-frac58.8%
sqr-neg58.8%
times-frac68.0%
unpow268.0%
Simplified68.0%
Taylor expanded in k around 0 60.4%
unpow244.4%
Applied egg-rr60.4%
add-cube-cbrt60.3%
pow360.3%
*-commutative60.3%
cbrt-prod60.3%
unpow360.3%
add-cbrt-cube65.8%
unpow265.8%
cbrt-prod83.3%
pow283.3%
Applied egg-rr83.3%
Final simplification73.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 3.4e-66)
(* 2.0 (/ (pow (/ l (sqrt t_m)) 2.0) (pow k 4.0)))
(/ 2.0 (* (* 2.0 k) (/ (/ k (/ l (pow t_m 3.0))) l))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3.4e-66) {
tmp = 2.0 * (pow((l / sqrt(t_m)), 2.0) / pow(k, 4.0));
} else {
tmp = 2.0 / ((2.0 * k) * ((k / (l / pow(t_m, 3.0))) / l));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 3.4d-66) then
tmp = 2.0d0 * (((l / sqrt(t_m)) ** 2.0d0) / (k ** 4.0d0))
else
tmp = 2.0d0 / ((2.0d0 * k) * ((k / (l / (t_m ** 3.0d0))) / l))
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3.4e-66) {
tmp = 2.0 * (Math.pow((l / Math.sqrt(t_m)), 2.0) / Math.pow(k, 4.0));
} else {
tmp = 2.0 / ((2.0 * k) * ((k / (l / Math.pow(t_m, 3.0))) / l));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 3.4e-66: tmp = 2.0 * (math.pow((l / math.sqrt(t_m)), 2.0) / math.pow(k, 4.0)) else: tmp = 2.0 / ((2.0 * k) * ((k / (l / math.pow(t_m, 3.0))) / l)) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 3.4e-66) tmp = Float64(2.0 * Float64((Float64(l / sqrt(t_m)) ^ 2.0) / (k ^ 4.0))); else tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(Float64(k / Float64(l / (t_m ^ 3.0))) / l))); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 3.4e-66) tmp = 2.0 * (((l / sqrt(t_m)) ^ 2.0) / (k ^ 4.0)); else tmp = 2.0 / ((2.0 * k) * ((k / (l / (t_m ^ 3.0))) / l)); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3.4e-66], N[(2.0 * N[(N[Power[N[(l / N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[(k / N[(l / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 3.4 \cdot 10^{-66}:\\
\;\;\;\;2 \cdot \frac{{\left(\frac{\ell}{\sqrt{t_m}}\right)}^{2}}{{k}^{4}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \frac{\frac{k}{\frac{\ell}{{t_m}^{3}}}}{\ell}}\\
\end{array}
\end{array}
if t < 3.39999999999999997e-66Initial program 54.3%
associate-/r*54.3%
sqr-neg54.3%
associate-*l*51.7%
sqr-neg51.7%
associate-/r*56.1%
associate-+l+56.1%
unpow256.1%
times-frac40.1%
sqr-neg40.1%
times-frac56.1%
unpow256.1%
Simplified56.1%
Taylor expanded in t around 0 64.7%
Taylor expanded in k around 0 53.2%
*-commutative53.2%
associate-/r*54.5%
Simplified54.5%
add-sqr-sqrt26.0%
sqrt-div14.3%
unpow214.3%
sqrt-prod7.5%
add-sqr-sqrt9.1%
sqrt-div9.1%
unpow29.1%
sqrt-prod8.6%
add-sqr-sqrt17.2%
Applied egg-rr17.2%
unpow217.2%
Simplified17.2%
if 3.39999999999999997e-66 < t Initial program 75.3%
associate-*l*75.3%
sqr-neg75.3%
sqr-neg75.3%
associate-/r*80.2%
distribute-rgt-in80.2%
unpow280.2%
times-frac72.6%
sqr-neg72.6%
times-frac80.2%
unpow280.2%
distribute-rgt-in80.2%
Simplified80.2%
add-cube-cbrt80.0%
pow380.0%
cbrt-div80.1%
rem-cbrt-cube83.0%
Applied egg-rr83.0%
associate-*l/83.0%
cube-div80.1%
pow380.1%
add-cube-cbrt80.2%
Applied egg-rr80.2%
Taylor expanded in k around 0 77.4%
associate-/l*77.4%
Simplified77.4%
Taylor expanded in k around 0 77.4%
Final simplification33.0%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 5.8e-66)
(* 2.0 (pow (/ l (* (pow k 2.0) (sqrt t_m))) 2.0))
(/ 2.0 (* (* 2.0 k) (/ (/ k (/ l (pow t_m 3.0))) l))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5.8e-66) {
tmp = 2.0 * pow((l / (pow(k, 2.0) * sqrt(t_m))), 2.0);
} else {
tmp = 2.0 / ((2.0 * k) * ((k / (l / pow(t_m, 3.0))) / l));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 5.8d-66) then
tmp = 2.0d0 * ((l / ((k ** 2.0d0) * sqrt(t_m))) ** 2.0d0)
else
tmp = 2.0d0 / ((2.0d0 * k) * ((k / (l / (t_m ** 3.0d0))) / l))
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5.8e-66) {
tmp = 2.0 * Math.pow((l / (Math.pow(k, 2.0) * Math.sqrt(t_m))), 2.0);
} else {
tmp = 2.0 / ((2.0 * k) * ((k / (l / Math.pow(t_m, 3.0))) / l));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 5.8e-66: tmp = 2.0 * math.pow((l / (math.pow(k, 2.0) * math.sqrt(t_m))), 2.0) else: tmp = 2.0 / ((2.0 * k) * ((k / (l / math.pow(t_m, 3.0))) / l)) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 5.8e-66) tmp = Float64(2.0 * (Float64(l / Float64((k ^ 2.0) * sqrt(t_m))) ^ 2.0)); else tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(Float64(k / Float64(l / (t_m ^ 3.0))) / l))); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 5.8e-66) tmp = 2.0 * ((l / ((k ^ 2.0) * sqrt(t_m))) ^ 2.0); else tmp = 2.0 / ((2.0 * k) * ((k / (l / (t_m ^ 3.0))) / l)); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 5.8e-66], N[(2.0 * N[Power[N[(l / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[(k / N[(l / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $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 5.8 \cdot 10^{-66}:\\
\;\;\;\;2 \cdot {\left(\frac{\ell}{{k}^{2} \cdot \sqrt{t_m}}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \frac{\frac{k}{\frac{\ell}{{t_m}^{3}}}}{\ell}}\\
\end{array}
\end{array}
if t < 5.80000000000000023e-66Initial program 54.3%
associate-/r*54.3%
sqr-neg54.3%
associate-*l*51.7%
sqr-neg51.7%
associate-/r*56.1%
associate-+l+56.1%
unpow256.1%
times-frac40.1%
sqr-neg40.1%
times-frac56.1%
unpow256.1%
Simplified56.1%
Taylor expanded in t around 0 64.7%
Taylor expanded in k around 0 53.2%
*-commutative53.2%
associate-/r*54.5%
Simplified54.5%
add-sqr-sqrt35.6%
sqrt-div26.0%
sqrt-div14.3%
unpow214.3%
sqrt-prod7.5%
add-sqr-sqrt9.1%
sqrt-pow19.1%
metadata-eval9.1%
sqrt-div9.1%
sqrt-div9.3%
unpow29.3%
sqrt-prod8.2%
add-sqr-sqrt16.9%
sqrt-pow116.9%
metadata-eval16.9%
Applied egg-rr16.9%
unpow216.9%
associate-/l/17.0%
Simplified17.0%
if 5.80000000000000023e-66 < t Initial program 75.3%
associate-*l*75.3%
sqr-neg75.3%
sqr-neg75.3%
associate-/r*80.2%
distribute-rgt-in80.2%
unpow280.2%
times-frac72.6%
sqr-neg72.6%
times-frac80.2%
unpow280.2%
distribute-rgt-in80.2%
Simplified80.2%
add-cube-cbrt80.0%
pow380.0%
cbrt-div80.1%
rem-cbrt-cube83.0%
Applied egg-rr83.0%
associate-*l/83.0%
cube-div80.1%
pow380.1%
add-cube-cbrt80.2%
Applied egg-rr80.2%
Taylor expanded in k around 0 77.4%
associate-/l*77.4%
Simplified77.4%
Taylor expanded in k around 0 77.4%
Final simplification32.8%
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 1e-80)
(* 2.0 (pow (/ l (* (pow k 2.0) (sqrt t_m))) 2.0))
(/ (* l l) (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 <= 1e-80) {
tmp = 2.0 * pow((l / (pow(k, 2.0) * sqrt(t_m))), 2.0);
} else {
tmp = (l * l) / 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 <= 1e-80) {
tmp = 2.0 * Math.pow((l / (Math.pow(k, 2.0) * Math.sqrt(t_m))), 2.0);
} else {
tmp = (l * l) / 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 <= 1e-80) tmp = Float64(2.0 * (Float64(l / Float64((k ^ 2.0) * sqrt(t_m))) ^ 2.0)); else tmp = Float64(Float64(l * l) / (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, 1e-80], N[(2.0 * N[Power[N[(l / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $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 10^{-80}:\\
\;\;\;\;2 \cdot {\left(\frac{\ell}{{k}^{2} \cdot \sqrt{t_m}}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell \cdot \ell}{{\left(t_m \cdot {\left(\sqrt[3]{k}\right)}^{2}\right)}^{3}}\\
\end{array}
\end{array}
if t < 9.99999999999999961e-81Initial program 54.1%
associate-/r*54.1%
sqr-neg54.1%
associate-*l*51.5%
sqr-neg51.5%
associate-/r*56.0%
associate-+l+56.0%
unpow256.0%
times-frac39.6%
sqr-neg39.6%
times-frac56.0%
unpow256.0%
Simplified56.0%
Taylor expanded in t around 0 64.8%
Taylor expanded in k around 0 53.6%
*-commutative53.6%
associate-/r*54.9%
Simplified54.9%
add-sqr-sqrt35.5%
sqrt-div25.6%
sqrt-div13.6%
unpow213.6%
sqrt-prod6.6%
add-sqr-sqrt8.3%
sqrt-pow18.3%
metadata-eval8.3%
sqrt-div8.3%
sqrt-div8.4%
unpow28.4%
sqrt-prod7.8%
add-sqr-sqrt16.7%
sqrt-pow116.7%
metadata-eval16.7%
Applied egg-rr16.7%
unpow216.7%
associate-/l/16.8%
Simplified16.8%
if 9.99999999999999961e-81 < t Initial program 74.3%
associate-/r*74.3%
sqr-neg74.3%
associate-*l*65.7%
sqr-neg65.7%
associate-/r*70.2%
associate-+l+70.2%
unpow270.2%
times-frac63.1%
sqr-neg63.1%
times-frac70.2%
unpow270.2%
Simplified70.2%
Taylor expanded in k around 0 63.0%
unpow249.4%
Applied egg-rr63.0%
add-cube-cbrt63.0%
pow363.0%
*-commutative63.0%
cbrt-prod63.0%
unpow363.0%
add-cbrt-cube67.1%
unpow267.1%
cbrt-prod80.6%
pow280.6%
Applied egg-rr80.6%
Final simplification34.7%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 5.2e+35)
(/ 2.0 (* (* 2.0 k) (/ (/ k (/ l (pow t_m 3.0))) l)))
(* 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) {
double tmp;
if (k <= 5.2e+35) {
tmp = 2.0 / ((2.0 * k) * ((k / (l / pow(t_m, 3.0))) / l));
} else {
tmp = 2.0 * ((pow(l, 2.0) / t_m) * pow(k, -4.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 <= 5.2d+35) then
tmp = 2.0d0 / ((2.0d0 * k) * ((k / (l / (t_m ** 3.0d0))) / l))
else
tmp = 2.0d0 * (((l ** 2.0d0) / t_m) * (k ** (-4.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 <= 5.2e+35) {
tmp = 2.0 / ((2.0 * k) * ((k / (l / Math.pow(t_m, 3.0))) / l));
} else {
tmp = 2.0 * ((Math.pow(l, 2.0) / t_m) * Math.pow(k, -4.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 <= 5.2e+35: tmp = 2.0 / ((2.0 * k) * ((k / (l / math.pow(t_m, 3.0))) / l)) else: tmp = 2.0 * ((math.pow(l, 2.0) / t_m) * math.pow(k, -4.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 <= 5.2e+35) tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(Float64(k / Float64(l / (t_m ^ 3.0))) / l))); else tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / t_m) * (k ^ -4.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 <= 5.2e+35) tmp = 2.0 / ((2.0 * k) * ((k / (l / (t_m ^ 3.0))) / l)); else tmp = 2.0 * (((l ^ 2.0) / t_m) * (k ^ -4.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, 5.2e+35], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[(k / N[(l / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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 \begin{array}{l}
\mathbf{if}\;k \leq 5.2 \cdot 10^{+35}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \frac{\frac{k}{\frac{\ell}{{t_m}^{3}}}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{t_m} \cdot {k}^{-4}\right)\\
\end{array}
\end{array}
if k < 5.20000000000000013e35Initial program 61.5%
associate-*l*61.5%
sqr-neg61.5%
sqr-neg61.5%
associate-/r*67.0%
distribute-rgt-in67.0%
unpow267.0%
times-frac50.9%
sqr-neg50.9%
times-frac67.0%
unpow267.0%
distribute-rgt-in67.0%
Simplified67.0%
add-cube-cbrt66.9%
pow366.9%
cbrt-div66.9%
rem-cbrt-cube72.3%
Applied egg-rr72.3%
associate-*l/71.2%
cube-div66.9%
pow366.9%
add-cube-cbrt67.0%
Applied egg-rr67.0%
Taylor expanded in k around 0 65.5%
associate-/l*65.9%
Simplified65.9%
Taylor expanded in k around 0 69.2%
if 5.20000000000000013e35 < k Initial program 54.3%
associate-/r*54.4%
sqr-neg54.4%
associate-*l*54.4%
sqr-neg54.4%
associate-/r*57.8%
associate-+l+57.8%
unpow257.8%
times-frac51.3%
sqr-neg51.3%
times-frac57.8%
unpow257.8%
Simplified57.8%
Taylor expanded in t around 0 73.8%
Taylor expanded in k around 0 60.1%
*-commutative60.1%
associate-/r*60.0%
Simplified60.0%
expm1-log1p-u58.3%
expm1-udef58.3%
div-inv58.3%
pow-flip58.3%
metadata-eval58.3%
Applied egg-rr58.3%
expm1-def58.3%
expm1-log1p60.0%
Simplified60.0%
Final simplification67.0%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1400000000000.0)
(/ 2.0 (* (* 2.0 k) (/ (/ k (/ l (pow t_m 3.0))) l)))
(* 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) {
double tmp;
if (k <= 1400000000000.0) {
tmp = 2.0 / ((2.0 * k) * ((k / (l / pow(t_m, 3.0))) / l));
} else {
tmp = 2.0 * (pow(l, 2.0) / (t_m * pow(k, 4.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 <= 1400000000000.0d0) then
tmp = 2.0d0 / ((2.0d0 * k) * ((k / (l / (t_m ** 3.0d0))) / l))
else
tmp = 2.0d0 * ((l ** 2.0d0) / (t_m * (k ** 4.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 <= 1400000000000.0) {
tmp = 2.0 / ((2.0 * k) * ((k / (l / Math.pow(t_m, 3.0))) / l));
} else {
tmp = 2.0 * (Math.pow(l, 2.0) / (t_m * Math.pow(k, 4.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 <= 1400000000000.0: tmp = 2.0 / ((2.0 * k) * ((k / (l / math.pow(t_m, 3.0))) / l)) else: tmp = 2.0 * (math.pow(l, 2.0) / (t_m * math.pow(k, 4.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 <= 1400000000000.0) tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(Float64(k / Float64(l / (t_m ^ 3.0))) / l))); else tmp = Float64(2.0 * Float64((l ^ 2.0) / Float64(t_m * (k ^ 4.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 <= 1400000000000.0) tmp = 2.0 / ((2.0 * k) * ((k / (l / (t_m ^ 3.0))) / l)); else tmp = 2.0 * ((l ^ 2.0) / (t_m * (k ^ 4.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, 1400000000000.0], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[(k / N[(l / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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 \begin{array}{l}
\mathbf{if}\;k \leq 1400000000000:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \frac{\frac{k}{\frac{\ell}{{t_m}^{3}}}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{t_m \cdot {k}^{4}}\\
\end{array}
\end{array}
if k < 1.4e12Initial program 61.7%
associate-*l*61.7%
sqr-neg61.7%
sqr-neg61.7%
associate-/r*67.3%
distribute-rgt-in67.3%
unpow267.3%
times-frac50.7%
sqr-neg50.7%
times-frac67.3%
unpow267.3%
distribute-rgt-in67.3%
Simplified67.3%
add-cube-cbrt67.3%
pow367.3%
cbrt-div67.3%
rem-cbrt-cube72.3%
Applied egg-rr72.3%
associate-*l/71.2%
cube-div67.3%
pow367.3%
add-cube-cbrt67.3%
Applied egg-rr67.3%
Taylor expanded in k around 0 66.8%
associate-/l*67.2%
Simplified67.2%
Taylor expanded in k around 0 69.1%
if 1.4e12 < k Initial program 54.6%
associate-/r*54.7%
sqr-neg54.7%
associate-*l*54.6%
sqr-neg54.6%
associate-/r*57.8%
associate-+l+57.8%
unpow257.8%
times-frac51.9%
sqr-neg51.9%
times-frac57.8%
unpow257.8%
Simplified57.8%
Taylor expanded in t around 0 75.1%
Taylor expanded in k around 0 61.4%
Final simplification67.0%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 5.9e+35)
(/ 2.0 (* (* 2.0 k) (/ (/ k (/ l (pow t_m 3.0))) l)))
(* 2.0 (/ (/ (* l l) 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) {
double tmp;
if (k <= 5.9e+35) {
tmp = 2.0 / ((2.0 * k) * ((k / (l / pow(t_m, 3.0))) / l));
} else {
tmp = 2.0 * (((l * l) / t_m) / pow(k, 4.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 <= 5.9d+35) then
tmp = 2.0d0 / ((2.0d0 * k) * ((k / (l / (t_m ** 3.0d0))) / l))
else
tmp = 2.0d0 * (((l * l) / t_m) / (k ** 4.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 <= 5.9e+35) {
tmp = 2.0 / ((2.0 * k) * ((k / (l / Math.pow(t_m, 3.0))) / l));
} else {
tmp = 2.0 * (((l * l) / t_m) / Math.pow(k, 4.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 <= 5.9e+35: tmp = 2.0 / ((2.0 * k) * ((k / (l / math.pow(t_m, 3.0))) / l)) else: tmp = 2.0 * (((l * l) / t_m) / math.pow(k, 4.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 <= 5.9e+35) tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(Float64(k / Float64(l / (t_m ^ 3.0))) / l))); else tmp = Float64(2.0 * Float64(Float64(Float64(l * l) / t_m) / (k ^ 4.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 <= 5.9e+35) tmp = 2.0 / ((2.0 * k) * ((k / (l / (t_m ^ 3.0))) / l)); else tmp = 2.0 * (((l * l) / t_m) / (k ^ 4.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, 5.9e+35], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[(k / N[(l / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l * l), $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 \begin{array}{l}
\mathbf{if}\;k \leq 5.9 \cdot 10^{+35}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \frac{\frac{k}{\frac{\ell}{{t_m}^{3}}}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{\ell \cdot \ell}{t_m}}{{k}^{4}}\\
\end{array}
\end{array}
if k < 5.89999999999999985e35Initial program 61.5%
associate-*l*61.5%
sqr-neg61.5%
sqr-neg61.5%
associate-/r*67.0%
distribute-rgt-in67.0%
unpow267.0%
times-frac50.9%
sqr-neg50.9%
times-frac67.0%
unpow267.0%
distribute-rgt-in67.0%
Simplified67.0%
add-cube-cbrt66.9%
pow366.9%
cbrt-div66.9%
rem-cbrt-cube72.3%
Applied egg-rr72.3%
associate-*l/71.2%
cube-div66.9%
pow366.9%
add-cube-cbrt67.0%
Applied egg-rr67.0%
Taylor expanded in k around 0 65.5%
associate-/l*65.9%
Simplified65.9%
Taylor expanded in k around 0 69.2%
if 5.89999999999999985e35 < k Initial program 54.3%
associate-/r*54.4%
sqr-neg54.4%
associate-*l*54.4%
sqr-neg54.4%
associate-/r*57.8%
associate-+l+57.8%
unpow257.8%
times-frac51.3%
sqr-neg51.3%
times-frac57.8%
unpow257.8%
Simplified57.8%
Taylor expanded in t around 0 73.8%
Taylor expanded in k around 0 60.1%
*-commutative60.1%
associate-/r*60.0%
Simplified60.0%
unpow260.0%
Applied egg-rr60.0%
Final simplification67.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 (/ (/ (* l l) 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 * (((l * l) / 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 * l) / 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 * (((l * l) / 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 * (((l * l) / 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(Float64(l * l) / 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 * l) / 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[(l * l), $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 \cdot \ell}{t_m}}{{k}^{4}}\right)
\end{array}
Initial program 59.8%
associate-/r*59.8%
sqr-neg59.8%
associate-*l*55.5%
sqr-neg55.5%
associate-/r*60.0%
associate-+l+60.0%
unpow260.0%
times-frac46.2%
sqr-neg46.2%
times-frac60.0%
unpow260.0%
Simplified60.0%
Taylor expanded in t around 0 61.5%
Taylor expanded in k around 0 52.4%
*-commutative52.4%
associate-/r*53.3%
Simplified53.3%
unpow253.3%
Applied egg-rr53.3%
Final simplification53.3%
herbie shell --seed 2024019
(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))))