
(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 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 7.8e-28)
(/
2.0
(* (/ (* t_m (pow k 2.0)) (cos k)) (/ (pow (sin k) 2.0) (pow l 2.0))))
(/
2.0
(*
(pow
(* (* (cbrt (sin k)) (/ t_m (pow (cbrt l) 2.0))) (cbrt (tan k)))
3.0)
(+ 1.0 (+ 1.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 <= 7.8e-28) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) / cos(k)) * (pow(sin(k), 2.0) / pow(l, 2.0)));
} else {
tmp = 2.0 / (pow(((cbrt(sin(k)) * (t_m / pow(cbrt(l), 2.0))) * cbrt(tan(k))), 3.0) * (1.0 + (1.0 + pow((k / t_m), 2.0))));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 7.8e-28) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) / Math.cos(k)) * (Math.pow(Math.sin(k), 2.0) / Math.pow(l, 2.0)));
} else {
tmp = 2.0 / (Math.pow(((Math.cbrt(Math.sin(k)) * (t_m / Math.pow(Math.cbrt(l), 2.0))) * Math.cbrt(Math.tan(k))), 3.0) * (1.0 + (1.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 <= 7.8e-28) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) / cos(k)) * Float64((sin(k) ^ 2.0) / (l ^ 2.0)))); else tmp = Float64(2.0 / Float64((Float64(Float64(cbrt(sin(k)) * Float64(t_m / (cbrt(l) ^ 2.0))) * cbrt(tan(k))) ^ 3.0) * Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 7.8e-28], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(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] * N[Power[N[Tan[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 7.8 \cdot 10^{-28}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{\cos k} \cdot \frac{{\sin k}^{2}}{{\ell}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(\sqrt[3]{\sin k} \cdot \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right) \cdot \sqrt[3]{\tan k}\right)}^{3} \cdot \left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)}\\
\end{array}
\end{array}
if t < 7.79999999999999998e-28Initial program 48.3%
Taylor expanded in t around 0 62.6%
associate-*r*62.6%
*-commutative62.6%
times-frac63.6%
Simplified63.6%
if 7.79999999999999998e-28 < t Initial program 65.7%
add-cube-cbrt65.7%
pow365.7%
*-commutative65.7%
cbrt-prod65.6%
cbrt-div66.9%
rem-cbrt-cube75.1%
cbrt-prod91.7%
pow291.7%
Applied egg-rr91.7%
add-sqr-sqrt45.7%
pow245.7%
Applied egg-rr45.7%
add-cube-cbrt45.7%
pow345.7%
Applied egg-rr97.6%
Final simplification73.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (/ k t_m) 2.0))
(t_3 (+ 2.0 t_2))
(t_4
(*
(+ 1.0 (+ 1.0 t_2))
(* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l)))))))
(*
t_s
(if (<= t_4 4e+270)
(/ 2.0 (* (/ (pow t_m 3.0) l) (/ (* (sin k) (* (tan k) t_3)) l)))
(if (<= t_4 INFINITY)
(/ (* (/ 2.0 (pow (* k (pow t_m 1.5)) 2.0)) (* l l)) t_3)
(/
2.0
(pow
(* t_m (* (pow (cbrt l) -2.0) (cbrt (* 2.0 (pow k 2.0)))))
3.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow((k / t_m), 2.0);
double t_3 = 2.0 + t_2;
double t_4 = (1.0 + (1.0 + t_2)) * (tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l))));
double tmp;
if (t_4 <= 4e+270) {
tmp = 2.0 / ((pow(t_m, 3.0) / l) * ((sin(k) * (tan(k) * t_3)) / l));
} else if (t_4 <= ((double) INFINITY)) {
tmp = ((2.0 / pow((k * pow(t_m, 1.5)), 2.0)) * (l * l)) / t_3;
} else {
tmp = 2.0 / pow((t_m * (pow(cbrt(l), -2.0) * cbrt((2.0 * pow(k, 2.0))))), 3.0);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.pow((k / t_m), 2.0);
double t_3 = 2.0 + t_2;
double t_4 = (1.0 + (1.0 + t_2)) * (Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l))));
double tmp;
if (t_4 <= 4e+270) {
tmp = 2.0 / ((Math.pow(t_m, 3.0) / l) * ((Math.sin(k) * (Math.tan(k) * t_3)) / l));
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = ((2.0 / Math.pow((k * Math.pow(t_m, 1.5)), 2.0)) * (l * l)) / t_3;
} else {
tmp = 2.0 / Math.pow((t_m * (Math.pow(Math.cbrt(l), -2.0) * Math.cbrt((2.0 * Math.pow(k, 2.0))))), 3.0);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(k / t_m) ^ 2.0 t_3 = Float64(2.0 + t_2) t_4 = Float64(Float64(1.0 + Float64(1.0 + t_2)) * Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l))))) tmp = 0.0 if (t_4 <= 4e+270) tmp = Float64(2.0 / Float64(Float64((t_m ^ 3.0) / l) * Float64(Float64(sin(k) * Float64(tan(k) * t_3)) / l))); elseif (t_4 <= Inf) tmp = Float64(Float64(Float64(2.0 / (Float64(k * (t_m ^ 1.5)) ^ 2.0)) * Float64(l * l)) / t_3); else tmp = Float64(2.0 / (Float64(t_m * Float64((cbrt(l) ^ -2.0) * cbrt(Float64(2.0 * (k ^ 2.0))))) ^ 3.0)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(2.0 + t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(1.0 + N[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$4, 4e+270], N[(2.0 / N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[(N[(N[(2.0 / N[Power[N[(k * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision], N[(2.0 / N[Power[N[(t$95$m * N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * N[Power[N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t_3 := 2 + t\_2\\
t_4 := \left(1 + \left(1 + t\_2\right)\right) \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_4 \leq 4 \cdot 10^{+270}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{3}}{\ell} \cdot \frac{\sin k \cdot \left(\tan k \cdot t\_3\right)}{\ell}}\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\frac{\frac{2}{{\left(k \cdot {t\_m}^{1.5}\right)}^{2}} \cdot \left(\ell \cdot \ell\right)}{t\_3}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot \left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \sqrt[3]{2 \cdot {k}^{2}}\right)\right)}^{3}}\\
\end{array}
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))) < 4.0000000000000002e270Initial program 80.3%
associate-*l*76.8%
associate-/r*78.3%
+-commutative78.3%
associate-+r+78.3%
metadata-eval78.3%
associate-*r*78.3%
associate-*l/78.4%
associate-*l*78.4%
Applied egg-rr78.4%
associate-/l*79.9%
Simplified79.9%
if 4.0000000000000002e270 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))) < +inf.0Initial program 74.3%
Simplified71.3%
add-sqr-sqrt71.3%
pow271.3%
*-commutative71.3%
sqrt-prod44.8%
sqrt-pow145.0%
metadata-eval45.0%
Applied egg-rr45.0%
*-commutative45.0%
Simplified45.0%
Taylor expanded in k around 0 58.4%
if +inf.0 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))) Initial program 0.0%
Simplified6.8%
Taylor expanded in k around 0 9.7%
add-cube-cbrt9.7%
pow39.7%
cbrt-prod9.7%
associate-/l/2.5%
cbrt-div2.6%
unpow32.6%
add-cbrt-cube33.3%
cbrt-prod40.8%
unpow240.8%
div-inv40.8%
pow-flip40.8%
metadata-eval40.8%
Applied egg-rr40.8%
associate-*l*41.0%
Simplified41.0%
Final simplification63.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (/ k t_m) 2.0))
(t_3 (+ 2.0 t_2))
(t_4
(*
(+ 1.0 (+ 1.0 t_2))
(* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l)))))))
(*
t_s
(if (<= t_4 4e+270)
(/ 2.0 (* (/ (pow t_m 3.0) l) (/ (* (sin k) (* (tan k) t_3)) l)))
(if (<= t_4 INFINITY)
(/ (* (/ 2.0 (pow (* k (pow t_m 1.5)) 2.0)) (* l l)) t_3)
(/ 2.0 (/ (pow (* t_m (cbrt (* 2.0 (/ (pow k 2.0) l)))) 3.0) l)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow((k / t_m), 2.0);
double t_3 = 2.0 + t_2;
double t_4 = (1.0 + (1.0 + t_2)) * (tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l))));
double tmp;
if (t_4 <= 4e+270) {
tmp = 2.0 / ((pow(t_m, 3.0) / l) * ((sin(k) * (tan(k) * t_3)) / l));
} else if (t_4 <= ((double) INFINITY)) {
tmp = ((2.0 / pow((k * pow(t_m, 1.5)), 2.0)) * (l * l)) / t_3;
} else {
tmp = 2.0 / (pow((t_m * cbrt((2.0 * (pow(k, 2.0) / l)))), 3.0) / l);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.pow((k / t_m), 2.0);
double t_3 = 2.0 + t_2;
double t_4 = (1.0 + (1.0 + t_2)) * (Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l))));
double tmp;
if (t_4 <= 4e+270) {
tmp = 2.0 / ((Math.pow(t_m, 3.0) / l) * ((Math.sin(k) * (Math.tan(k) * t_3)) / l));
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = ((2.0 / Math.pow((k * Math.pow(t_m, 1.5)), 2.0)) * (l * l)) / t_3;
} else {
tmp = 2.0 / (Math.pow((t_m * Math.cbrt((2.0 * (Math.pow(k, 2.0) / l)))), 3.0) / l);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(k / t_m) ^ 2.0 t_3 = Float64(2.0 + t_2) t_4 = Float64(Float64(1.0 + Float64(1.0 + t_2)) * Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l))))) tmp = 0.0 if (t_4 <= 4e+270) tmp = Float64(2.0 / Float64(Float64((t_m ^ 3.0) / l) * Float64(Float64(sin(k) * Float64(tan(k) * t_3)) / l))); elseif (t_4 <= Inf) tmp = Float64(Float64(Float64(2.0 / (Float64(k * (t_m ^ 1.5)) ^ 2.0)) * Float64(l * l)) / t_3); else tmp = Float64(2.0 / Float64((Float64(t_m * cbrt(Float64(2.0 * Float64((k ^ 2.0) / l)))) ^ 3.0) / l)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(2.0 + t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(1.0 + N[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$4, 4e+270], N[(2.0 / N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[(N[(N[(2.0 / N[Power[N[(k * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision], N[(2.0 / N[(N[Power[N[(t$95$m * N[Power[N[(2.0 * N[(N[Power[k, 2.0], $MachinePrecision] / l), $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)
\\
\begin{array}{l}
t_2 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t_3 := 2 + t\_2\\
t_4 := \left(1 + \left(1 + t\_2\right)\right) \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_4 \leq 4 \cdot 10^{+270}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{3}}{\ell} \cdot \frac{\sin k \cdot \left(\tan k \cdot t\_3\right)}{\ell}}\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\frac{\frac{2}{{\left(k \cdot {t\_m}^{1.5}\right)}^{2}} \cdot \left(\ell \cdot \ell\right)}{t\_3}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{\left(t\_m \cdot \sqrt[3]{2 \cdot \frac{{k}^{2}}{\ell}}\right)}^{3}}{\ell}}\\
\end{array}
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))) < 4.0000000000000002e270Initial program 80.3%
associate-*l*76.8%
associate-/r*78.3%
+-commutative78.3%
associate-+r+78.3%
metadata-eval78.3%
associate-*r*78.3%
associate-*l/78.4%
associate-*l*78.4%
Applied egg-rr78.4%
associate-/l*79.9%
Simplified79.9%
if 4.0000000000000002e270 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))) < +inf.0Initial program 74.3%
Simplified71.3%
add-sqr-sqrt71.3%
pow271.3%
*-commutative71.3%
sqrt-prod44.8%
sqrt-pow145.0%
metadata-eval45.0%
Applied egg-rr45.0%
*-commutative45.0%
Simplified45.0%
Taylor expanded in k around 0 58.4%
if +inf.0 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))) Initial program 0.0%
associate-*l*0.0%
associate-/r*6.8%
+-commutative6.8%
associate-+r+6.8%
metadata-eval6.8%
associate-*r*6.8%
associate-*l/6.9%
associate-*l*6.9%
Applied egg-rr6.9%
associate-/l*6.6%
Simplified6.6%
Taylor expanded in k around 0 9.3%
associate-*r/9.3%
Simplified9.3%
associate-*l/9.3%
associate-/l*9.3%
Applied egg-rr9.3%
add-cube-cbrt9.3%
pow39.3%
cbrt-prod9.3%
unpow39.3%
add-cbrt-cube39.4%
Applied egg-rr39.4%
Final simplification62.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (cbrt l) -2.0)))
(*
t_s
(if (<= k 7.6e-122)
(/ 2.0 (pow (* (* t_m t_2) (* (pow (cbrt k) 2.0) (cbrt 2.0))) 3.0))
(if (<= k 6.2e+49)
(/
2.0
(pow
(*
t_m
(* t_2 (cbrt (* (+ 2.0 (pow (/ k t_m) 2.0)) (* (sin k) (tan k))))))
3.0))
(/
2.0
(/
(* (pow k 2.0) (* t_m (pow (sin k) 2.0)))
(* (cos k) (pow l 2.0)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow(cbrt(l), -2.0);
double tmp;
if (k <= 7.6e-122) {
tmp = 2.0 / pow(((t_m * t_2) * (pow(cbrt(k), 2.0) * cbrt(2.0))), 3.0);
} else if (k <= 6.2e+49) {
tmp = 2.0 / pow((t_m * (t_2 * cbrt(((2.0 + pow((k / t_m), 2.0)) * (sin(k) * tan(k)))))), 3.0);
} else {
tmp = 2.0 / ((pow(k, 2.0) * (t_m * pow(sin(k), 2.0))) / (cos(k) * pow(l, 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 t_2 = Math.pow(Math.cbrt(l), -2.0);
double tmp;
if (k <= 7.6e-122) {
tmp = 2.0 / Math.pow(((t_m * t_2) * (Math.pow(Math.cbrt(k), 2.0) * Math.cbrt(2.0))), 3.0);
} else if (k <= 6.2e+49) {
tmp = 2.0 / Math.pow((t_m * (t_2 * Math.cbrt(((2.0 + Math.pow((k / t_m), 2.0)) * (Math.sin(k) * Math.tan(k)))))), 3.0);
} else {
tmp = 2.0 / ((Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0))) / (Math.cos(k) * Math.pow(l, 2.0)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = cbrt(l) ^ -2.0 tmp = 0.0 if (k <= 7.6e-122) tmp = Float64(2.0 / (Float64(Float64(t_m * t_2) * Float64((cbrt(k) ^ 2.0) * cbrt(2.0))) ^ 3.0)); elseif (k <= 6.2e+49) tmp = Float64(2.0 / (Float64(t_m * Float64(t_2 * cbrt(Float64(Float64(2.0 + (Float64(k / t_m) ^ 2.0)) * Float64(sin(k) * tan(k)))))) ^ 3.0)); else tmp = Float64(2.0 / Float64(Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0))) / Float64(cos(k) * (l ^ 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_] := Block[{t$95$2 = N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 7.6e-122], N[(2.0 / N[Power[N[(N[(t$95$m * t$95$2), $MachinePrecision] * N[(N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 6.2e+49], N[(2.0 / N[Power[N[(t$95$m * N[(t$95$2 * N[Power[N[(N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $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)
\\
\begin{array}{l}
t_2 := {\left(\sqrt[3]{\ell}\right)}^{-2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 7.6 \cdot 10^{-122}:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot t\_2\right) \cdot \left({\left(\sqrt[3]{k}\right)}^{2} \cdot \sqrt[3]{2}\right)\right)}^{3}}\\
\mathbf{elif}\;k \leq 6.2 \cdot 10^{+49}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot \left(t\_2 \cdot \sqrt[3]{\left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right) \cdot \left(\sin k \cdot \tan k\right)}\right)\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}{\cos k \cdot {\ell}^{2}}}\\
\end{array}
\end{array}
\end{array}
if k < 7.6000000000000002e-122Initial program 55.3%
Simplified54.9%
Taylor expanded in k around 0 48.4%
add-cube-cbrt48.4%
pow348.4%
cbrt-prod48.4%
associate-/l/44.8%
cbrt-div45.5%
unpow345.5%
add-cbrt-cube54.4%
cbrt-prod58.2%
unpow258.2%
div-inv58.2%
pow-flip58.2%
metadata-eval58.2%
Applied egg-rr58.2%
*-commutative58.2%
cbrt-prod58.2%
unpow258.2%
cbrt-prod74.3%
pow274.3%
Applied egg-rr74.3%
if 7.6000000000000002e-122 < k < 6.19999999999999985e49Initial program 50.8%
associate-*l*50.8%
associate-/r*54.5%
+-commutative54.5%
associate-+r+54.5%
metadata-eval54.5%
associate-*r*54.5%
associate-*l/60.0%
associate-*l*60.0%
Applied egg-rr60.0%
associate-/l*59.6%
Simplified59.6%
Applied egg-rr81.6%
associate-*l*81.9%
Simplified81.9%
if 6.19999999999999985e49 < k Initial program 50.4%
Taylor expanded in t around 0 78.1%
Final simplification76.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (cbrt (* k (sqrt 2.0)))))
(*
t_s
(if (<= k 2.8e-64)
(/ 2.0 (pow (* (* t_m (pow (cbrt l) -2.0)) (* t_2 t_2)) 3.0))
(if (<= k 44000000000.0)
(/
2.0
(pow
(*
(/ (pow t_m 1.5) l)
(* (hypot 1.0 (hypot 1.0 (/ k t_m))) (sqrt (* (sin k) (tan k)))))
2.0))
(/
2.0
(/
(* (pow k 2.0) (* t_m (pow (sin k) 2.0)))
(* (cos k) (pow l 2.0)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = cbrt((k * sqrt(2.0)));
double tmp;
if (k <= 2.8e-64) {
tmp = 2.0 / pow(((t_m * pow(cbrt(l), -2.0)) * (t_2 * t_2)), 3.0);
} else if (k <= 44000000000.0) {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (hypot(1.0, hypot(1.0, (k / t_m))) * sqrt((sin(k) * tan(k))))), 2.0);
} else {
tmp = 2.0 / ((pow(k, 2.0) * (t_m * pow(sin(k), 2.0))) / (cos(k) * pow(l, 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 t_2 = Math.cbrt((k * Math.sqrt(2.0)));
double tmp;
if (k <= 2.8e-64) {
tmp = 2.0 / Math.pow(((t_m * Math.pow(Math.cbrt(l), -2.0)) * (t_2 * t_2)), 3.0);
} else if (k <= 44000000000.0) {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) * Math.sqrt((Math.sin(k) * Math.tan(k))))), 2.0);
} else {
tmp = 2.0 / ((Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0))) / (Math.cos(k) * Math.pow(l, 2.0)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = cbrt(Float64(k * sqrt(2.0))) tmp = 0.0 if (k <= 2.8e-64) tmp = Float64(2.0 / (Float64(Float64(t_m * (cbrt(l) ^ -2.0)) * Float64(t_2 * t_2)) ^ 3.0)); elseif (k <= 44000000000.0) tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) * sqrt(Float64(sin(k) * tan(k))))) ^ 2.0)); else tmp = Float64(2.0 / Float64(Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0))) / Float64(cos(k) * (l ^ 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_] := Block[{t$95$2 = N[Power[N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 2.8e-64], N[(2.0 / N[Power[N[(N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] * N[(t$95$2 * t$95$2), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 44000000000.0], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] * N[Sqrt[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $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)
\\
\begin{array}{l}
t_2 := \sqrt[3]{k \cdot \sqrt{2}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2.8 \cdot 10^{-64}:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \left(t\_2 \cdot t\_2\right)\right)}^{3}}\\
\mathbf{elif}\;k \leq 44000000000:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}{\cos k \cdot {\ell}^{2}}}\\
\end{array}
\end{array}
\end{array}
if k < 2.80000000000000004e-64Initial program 56.0%
Simplified55.7%
Taylor expanded in k around 0 49.5%
add-cube-cbrt49.5%
pow349.5%
cbrt-prod49.4%
associate-/l/46.0%
cbrt-div46.7%
unpow346.7%
add-cbrt-cube55.7%
cbrt-prod60.5%
unpow260.5%
div-inv60.5%
pow-flip60.5%
metadata-eval60.5%
Applied egg-rr60.5%
pow1/359.8%
add-sqr-sqrt59.8%
unpow-prod-down59.8%
*-commutative59.8%
sqrt-prod59.8%
sqrt-pow116.3%
metadata-eval16.3%
pow116.3%
*-commutative16.3%
sqrt-prod16.3%
sqrt-pow122.7%
metadata-eval22.7%
pow122.7%
Applied egg-rr22.7%
unpow1/322.9%
unpow1/375.6%
Simplified75.6%
if 2.80000000000000004e-64 < k < 4.4e10Initial program 54.5%
Applied egg-rr60.3%
if 4.4e10 < k Initial program 47.8%
Taylor expanded in t around 0 74.8%
Final simplification74.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 350000000.0)
(/
2.0
(pow
(* (* t_m (pow (cbrt l) -2.0)) (* (pow (cbrt k) 2.0) (cbrt 2.0)))
3.0))
(/
2.0
(/ (* (pow k 2.0) (* t_m (pow (sin k) 2.0))) (* (cos k) (pow l 2.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 350000000.0) {
tmp = 2.0 / pow(((t_m * pow(cbrt(l), -2.0)) * (pow(cbrt(k), 2.0) * cbrt(2.0))), 3.0);
} else {
tmp = 2.0 / ((pow(k, 2.0) * (t_m * pow(sin(k), 2.0))) / (cos(k) * pow(l, 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 <= 350000000.0) {
tmp = 2.0 / Math.pow(((t_m * Math.pow(Math.cbrt(l), -2.0)) * (Math.pow(Math.cbrt(k), 2.0) * Math.cbrt(2.0))), 3.0);
} else {
tmp = 2.0 / ((Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0))) / (Math.cos(k) * Math.pow(l, 2.0)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 350000000.0) tmp = Float64(2.0 / (Float64(Float64(t_m * (cbrt(l) ^ -2.0)) * Float64((cbrt(k) ^ 2.0) * cbrt(2.0))) ^ 3.0)); else tmp = Float64(2.0 / Float64(Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0))) / Float64(cos(k) * (l ^ 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, 350000000.0], N[(2.0 / N[Power[N[(N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 350000000:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \left({\left(\sqrt[3]{k}\right)}^{2} \cdot \sqrt[3]{2}\right)\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}{\cos k \cdot {\ell}^{2}}}\\
\end{array}
\end{array}
if k < 3.5e8Initial program 55.9%
Simplified56.2%
Taylor expanded in k around 0 51.2%
add-cube-cbrt51.1%
pow351.1%
cbrt-prod51.1%
associate-/l/47.9%
cbrt-div49.5%
unpow349.5%
add-cbrt-cube57.8%
cbrt-prod63.2%
unpow263.2%
div-inv63.2%
pow-flip63.2%
metadata-eval63.2%
Applied egg-rr63.2%
*-commutative63.2%
cbrt-prod63.2%
unpow263.2%
cbrt-prod77.1%
pow277.1%
Applied egg-rr77.1%
if 3.5e8 < k Initial program 47.8%
Taylor expanded in t around 0 74.8%
Final simplification76.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ 1.0 (cbrt l))))
(*
t_s
(if (<= k 6e-219)
(/
(* (/ 2.0 (pow (* k (pow t_m 1.5)) 2.0)) (* l l))
(+ 2.0 (pow (/ k t_m) 2.0)))
(if (<= k 1.2e-167)
(/ 2.0 (/ (* (pow t_m 3.0) (pow (* k (/ (sqrt 2.0) (sqrt l))) 2.0)) l))
(if (<= k 350000000.0)
(/ 2.0 (pow (* (* t_m (* t_2 t_2)) (cbrt (* 2.0 (pow k 2.0)))) 3.0))
(/
2.0
(/
(* (pow k 2.0) (* t_m (pow (sin k) 2.0)))
(* (cos k) (pow l 2.0))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = 1.0 / cbrt(l);
double tmp;
if (k <= 6e-219) {
tmp = ((2.0 / pow((k * pow(t_m, 1.5)), 2.0)) * (l * l)) / (2.0 + pow((k / t_m), 2.0));
} else if (k <= 1.2e-167) {
tmp = 2.0 / ((pow(t_m, 3.0) * pow((k * (sqrt(2.0) / sqrt(l))), 2.0)) / l);
} else if (k <= 350000000.0) {
tmp = 2.0 / pow(((t_m * (t_2 * t_2)) * cbrt((2.0 * pow(k, 2.0)))), 3.0);
} else {
tmp = 2.0 / ((pow(k, 2.0) * (t_m * pow(sin(k), 2.0))) / (cos(k) * pow(l, 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 t_2 = 1.0 / Math.cbrt(l);
double tmp;
if (k <= 6e-219) {
tmp = ((2.0 / Math.pow((k * Math.pow(t_m, 1.5)), 2.0)) * (l * l)) / (2.0 + Math.pow((k / t_m), 2.0));
} else if (k <= 1.2e-167) {
tmp = 2.0 / ((Math.pow(t_m, 3.0) * Math.pow((k * (Math.sqrt(2.0) / Math.sqrt(l))), 2.0)) / l);
} else if (k <= 350000000.0) {
tmp = 2.0 / Math.pow(((t_m * (t_2 * t_2)) * Math.cbrt((2.0 * Math.pow(k, 2.0)))), 3.0);
} else {
tmp = 2.0 / ((Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0))) / (Math.cos(k) * Math.pow(l, 2.0)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(1.0 / cbrt(l)) tmp = 0.0 if (k <= 6e-219) tmp = Float64(Float64(Float64(2.0 / (Float64(k * (t_m ^ 1.5)) ^ 2.0)) * Float64(l * l)) / Float64(2.0 + (Float64(k / t_m) ^ 2.0))); elseif (k <= 1.2e-167) tmp = Float64(2.0 / Float64(Float64((t_m ^ 3.0) * (Float64(k * Float64(sqrt(2.0) / sqrt(l))) ^ 2.0)) / l)); elseif (k <= 350000000.0) tmp = Float64(2.0 / (Float64(Float64(t_m * Float64(t_2 * t_2)) * cbrt(Float64(2.0 * (k ^ 2.0)))) ^ 3.0)); else tmp = Float64(2.0 / Float64(Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0))) / Float64(cos(k) * (l ^ 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_] := Block[{t$95$2 = N[(1.0 / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 6e-219], N[(N[(N[(2.0 / N[Power[N[(k * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.2e-167], N[(2.0 / N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[Power[N[(k * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 350000000.0], N[(2.0 / N[Power[N[(N[(t$95$m * N[(t$95$2 * t$95$2), $MachinePrecision]), $MachinePrecision] * N[Power[N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $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)
\\
\begin{array}{l}
t_2 := \frac{1}{\sqrt[3]{\ell}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 6 \cdot 10^{-219}:\\
\;\;\;\;\frac{\frac{2}{{\left(k \cdot {t\_m}^{1.5}\right)}^{2}} \cdot \left(\ell \cdot \ell\right)}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{elif}\;k \leq 1.2 \cdot 10^{-167}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{3} \cdot {\left(k \cdot \frac{\sqrt{2}}{\sqrt{\ell}}\right)}^{2}}{\ell}}\\
\mathbf{elif}\;k \leq 350000000:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot \left(t\_2 \cdot t\_2\right)\right) \cdot \sqrt[3]{2 \cdot {k}^{2}}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}{\cos k \cdot {\ell}^{2}}}\\
\end{array}
\end{array}
\end{array}
if k < 6.0000000000000002e-219Initial program 56.2%
Simplified52.1%
add-sqr-sqrt22.9%
pow222.9%
*-commutative22.9%
sqrt-prod17.7%
sqrt-pow119.2%
metadata-eval19.2%
Applied egg-rr19.2%
*-commutative19.2%
Simplified19.2%
Taylor expanded in k around 0 30.7%
if 6.0000000000000002e-219 < k < 1.19999999999999997e-167Initial program 61.0%
associate-*l*40.0%
associate-/r*40.0%
+-commutative40.0%
associate-+r+40.0%
metadata-eval40.0%
associate-*r*40.0%
associate-*l/40.9%
associate-*l*40.9%
Applied egg-rr40.9%
associate-/l*40.9%
Simplified40.9%
Taylor expanded in k around 0 40.9%
associate-*r/40.9%
Simplified40.9%
add-sqr-sqrt10.9%
pow210.9%
sqrt-div10.9%
*-commutative10.9%
sqrt-prod10.9%
sqrt-pow159.6%
metadata-eval59.6%
pow159.6%
Applied egg-rr59.6%
associate-*l/59.7%
associate-/l*59.7%
Applied egg-rr59.7%
if 1.19999999999999997e-167 < k < 3.5e8Initial program 53.0%
Simplified60.0%
Taylor expanded in k around 0 63.4%
add-cube-cbrt63.3%
pow363.3%
cbrt-prod63.1%
associate-/l/59.0%
cbrt-div67.9%
unpow367.9%
add-cbrt-cube73.9%
cbrt-prod92.1%
unpow292.1%
div-inv92.0%
pow-flip92.1%
metadata-eval92.1%
Applied egg-rr92.1%
sqr-pow92.2%
metadata-eval92.2%
unpow-192.2%
metadata-eval92.2%
unpow-192.2%
Applied egg-rr92.2%
if 3.5e8 < k Initial program 47.8%
Taylor expanded in t around 0 74.8%
Final simplification53.1%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 4.1e-219)
(/
(* (/ 2.0 (pow (* k (pow t_m 1.5)) 2.0)) (* l l))
(+ 2.0 (pow (/ k t_m) 2.0)))
(if (<= k 1.2e-167)
(/ 2.0 (/ (* (pow t_m 3.0) (pow (* k (/ (sqrt 2.0) (sqrt l))) 2.0)) l))
(if (<= k 350000000.0)
(/
2.0
(pow (* t_m (* (pow (cbrt l) -2.0) (cbrt (* 2.0 (pow k 2.0))))) 3.0))
(/
2.0
(/
(* (pow k 2.0) (* t_m (pow (sin k) 2.0)))
(* (cos k) (pow l 2.0)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 4.1e-219) {
tmp = ((2.0 / pow((k * pow(t_m, 1.5)), 2.0)) * (l * l)) / (2.0 + pow((k / t_m), 2.0));
} else if (k <= 1.2e-167) {
tmp = 2.0 / ((pow(t_m, 3.0) * pow((k * (sqrt(2.0) / sqrt(l))), 2.0)) / l);
} else if (k <= 350000000.0) {
tmp = 2.0 / pow((t_m * (pow(cbrt(l), -2.0) * cbrt((2.0 * pow(k, 2.0))))), 3.0);
} else {
tmp = 2.0 / ((pow(k, 2.0) * (t_m * pow(sin(k), 2.0))) / (cos(k) * pow(l, 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 <= 4.1e-219) {
tmp = ((2.0 / Math.pow((k * Math.pow(t_m, 1.5)), 2.0)) * (l * l)) / (2.0 + Math.pow((k / t_m), 2.0));
} else if (k <= 1.2e-167) {
tmp = 2.0 / ((Math.pow(t_m, 3.0) * Math.pow((k * (Math.sqrt(2.0) / Math.sqrt(l))), 2.0)) / l);
} else if (k <= 350000000.0) {
tmp = 2.0 / Math.pow((t_m * (Math.pow(Math.cbrt(l), -2.0) * Math.cbrt((2.0 * Math.pow(k, 2.0))))), 3.0);
} else {
tmp = 2.0 / ((Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0))) / (Math.cos(k) * Math.pow(l, 2.0)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 4.1e-219) tmp = Float64(Float64(Float64(2.0 / (Float64(k * (t_m ^ 1.5)) ^ 2.0)) * Float64(l * l)) / Float64(2.0 + (Float64(k / t_m) ^ 2.0))); elseif (k <= 1.2e-167) tmp = Float64(2.0 / Float64(Float64((t_m ^ 3.0) * (Float64(k * Float64(sqrt(2.0) / sqrt(l))) ^ 2.0)) / l)); elseif (k <= 350000000.0) tmp = Float64(2.0 / (Float64(t_m * Float64((cbrt(l) ^ -2.0) * cbrt(Float64(2.0 * (k ^ 2.0))))) ^ 3.0)); else tmp = Float64(2.0 / Float64(Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0))) / Float64(cos(k) * (l ^ 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, 4.1e-219], N[(N[(N[(2.0 / N[Power[N[(k * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.2e-167], N[(2.0 / N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[Power[N[(k * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 350000000.0], N[(2.0 / N[Power[N[(t$95$m * N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * N[Power[N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 4.1 \cdot 10^{-219}:\\
\;\;\;\;\frac{\frac{2}{{\left(k \cdot {t\_m}^{1.5}\right)}^{2}} \cdot \left(\ell \cdot \ell\right)}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{elif}\;k \leq 1.2 \cdot 10^{-167}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{3} \cdot {\left(k \cdot \frac{\sqrt{2}}{\sqrt{\ell}}\right)}^{2}}{\ell}}\\
\mathbf{elif}\;k \leq 350000000:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot \left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \sqrt[3]{2 \cdot {k}^{2}}\right)\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}{\cos k \cdot {\ell}^{2}}}\\
\end{array}
\end{array}
if k < 4.1e-219Initial program 56.2%
Simplified52.1%
add-sqr-sqrt22.9%
pow222.9%
*-commutative22.9%
sqrt-prod17.7%
sqrt-pow119.2%
metadata-eval19.2%
Applied egg-rr19.2%
*-commutative19.2%
Simplified19.2%
Taylor expanded in k around 0 30.7%
if 4.1e-219 < k < 1.19999999999999997e-167Initial program 61.0%
associate-*l*40.0%
associate-/r*40.0%
+-commutative40.0%
associate-+r+40.0%
metadata-eval40.0%
associate-*r*40.0%
associate-*l/40.9%
associate-*l*40.9%
Applied egg-rr40.9%
associate-/l*40.9%
Simplified40.9%
Taylor expanded in k around 0 40.9%
associate-*r/40.9%
Simplified40.9%
add-sqr-sqrt10.9%
pow210.9%
sqrt-div10.9%
*-commutative10.9%
sqrt-prod10.9%
sqrt-pow159.6%
metadata-eval59.6%
pow159.6%
Applied egg-rr59.6%
associate-*l/59.7%
associate-/l*59.7%
Applied egg-rr59.7%
if 1.19999999999999997e-167 < k < 3.5e8Initial program 53.0%
Simplified60.0%
Taylor expanded in k around 0 63.4%
add-cube-cbrt63.3%
pow363.3%
cbrt-prod63.1%
associate-/l/59.0%
cbrt-div67.9%
unpow367.9%
add-cbrt-cube73.9%
cbrt-prod92.1%
unpow292.1%
div-inv92.0%
pow-flip92.1%
metadata-eval92.1%
Applied egg-rr92.1%
associate-*l*92.2%
Simplified92.2%
if 3.5e8 < k Initial program 47.8%
Taylor expanded in t around 0 74.8%
Final simplification53.1%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 4.8e-219)
(/
(* (/ 2.0 (pow (* k (pow t_m 1.5)) 2.0)) (* l l))
(+ 2.0 (pow (/ k t_m) 2.0)))
(if (<= k 8.1e-168)
(/ 2.0 (/ (* (pow t_m 3.0) (pow (* k (/ (sqrt 2.0) (sqrt l))) 2.0)) l))
(if (<= k 430000000.0)
(/
2.0
(pow (* t_m (* (pow (cbrt l) -2.0) (cbrt (* 2.0 (pow k 2.0))))) 3.0))
(/
2.0
(*
(/ (* t_m (pow k 2.0)) (cos k))
(/ (pow (sin k) 2.0) (pow l 2.0)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 4.8e-219) {
tmp = ((2.0 / pow((k * pow(t_m, 1.5)), 2.0)) * (l * l)) / (2.0 + pow((k / t_m), 2.0));
} else if (k <= 8.1e-168) {
tmp = 2.0 / ((pow(t_m, 3.0) * pow((k * (sqrt(2.0) / sqrt(l))), 2.0)) / l);
} else if (k <= 430000000.0) {
tmp = 2.0 / pow((t_m * (pow(cbrt(l), -2.0) * cbrt((2.0 * pow(k, 2.0))))), 3.0);
} else {
tmp = 2.0 / (((t_m * pow(k, 2.0)) / cos(k)) * (pow(sin(k), 2.0) / pow(l, 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 <= 4.8e-219) {
tmp = ((2.0 / Math.pow((k * Math.pow(t_m, 1.5)), 2.0)) * (l * l)) / (2.0 + Math.pow((k / t_m), 2.0));
} else if (k <= 8.1e-168) {
tmp = 2.0 / ((Math.pow(t_m, 3.0) * Math.pow((k * (Math.sqrt(2.0) / Math.sqrt(l))), 2.0)) / l);
} else if (k <= 430000000.0) {
tmp = 2.0 / Math.pow((t_m * (Math.pow(Math.cbrt(l), -2.0) * Math.cbrt((2.0 * Math.pow(k, 2.0))))), 3.0);
} else {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) / Math.cos(k)) * (Math.pow(Math.sin(k), 2.0) / Math.pow(l, 2.0)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 4.8e-219) tmp = Float64(Float64(Float64(2.0 / (Float64(k * (t_m ^ 1.5)) ^ 2.0)) * Float64(l * l)) / Float64(2.0 + (Float64(k / t_m) ^ 2.0))); elseif (k <= 8.1e-168) tmp = Float64(2.0 / Float64(Float64((t_m ^ 3.0) * (Float64(k * Float64(sqrt(2.0) / sqrt(l))) ^ 2.0)) / l)); elseif (k <= 430000000.0) tmp = Float64(2.0 / (Float64(t_m * Float64((cbrt(l) ^ -2.0) * cbrt(Float64(2.0 * (k ^ 2.0))))) ^ 3.0)); else tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) / cos(k)) * Float64((sin(k) ^ 2.0) / (l ^ 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, 4.8e-219], N[(N[(N[(2.0 / N[Power[N[(k * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 8.1e-168], N[(2.0 / N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[Power[N[(k * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 430000000.0], N[(2.0 / N[Power[N[(t$95$m * N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * N[Power[N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 4.8 \cdot 10^{-219}:\\
\;\;\;\;\frac{\frac{2}{{\left(k \cdot {t\_m}^{1.5}\right)}^{2}} \cdot \left(\ell \cdot \ell\right)}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{elif}\;k \leq 8.1 \cdot 10^{-168}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{3} \cdot {\left(k \cdot \frac{\sqrt{2}}{\sqrt{\ell}}\right)}^{2}}{\ell}}\\
\mathbf{elif}\;k \leq 430000000:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot \left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \sqrt[3]{2 \cdot {k}^{2}}\right)\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{\cos k} \cdot \frac{{\sin k}^{2}}{{\ell}^{2}}}\\
\end{array}
\end{array}
if k < 4.80000000000000028e-219Initial program 56.2%
Simplified52.1%
add-sqr-sqrt22.9%
pow222.9%
*-commutative22.9%
sqrt-prod17.7%
sqrt-pow119.2%
metadata-eval19.2%
Applied egg-rr19.2%
*-commutative19.2%
Simplified19.2%
Taylor expanded in k around 0 30.7%
if 4.80000000000000028e-219 < k < 8.1e-168Initial program 61.0%
associate-*l*40.0%
associate-/r*40.0%
+-commutative40.0%
associate-+r+40.0%
metadata-eval40.0%
associate-*r*40.0%
associate-*l/40.9%
associate-*l*40.9%
Applied egg-rr40.9%
associate-/l*40.9%
Simplified40.9%
Taylor expanded in k around 0 40.9%
associate-*r/40.9%
Simplified40.9%
add-sqr-sqrt10.9%
pow210.9%
sqrt-div10.9%
*-commutative10.9%
sqrt-prod10.9%
sqrt-pow159.6%
metadata-eval59.6%
pow159.6%
Applied egg-rr59.6%
associate-*l/59.7%
associate-/l*59.7%
Applied egg-rr59.7%
if 8.1e-168 < k < 4.3e8Initial program 53.0%
Simplified60.0%
Taylor expanded in k around 0 63.4%
add-cube-cbrt63.3%
pow363.3%
cbrt-prod63.1%
associate-/l/59.0%
cbrt-div67.9%
unpow367.9%
add-cbrt-cube73.9%
cbrt-prod92.1%
unpow292.1%
div-inv92.0%
pow-flip92.1%
metadata-eval92.1%
Applied egg-rr92.1%
associate-*l*92.2%
Simplified92.2%
if 4.3e8 < k Initial program 47.8%
Taylor expanded in t around 0 74.8%
associate-*r*74.8%
*-commutative74.8%
times-frac74.8%
Simplified74.8%
Final simplification53.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 4.9e-219)
(/
(* (/ 2.0 (pow (* k (pow t_m 1.5)) 2.0)) (* l l))
(+ 2.0 (pow (/ k t_m) 2.0)))
(if (<= k 1.2e-167)
(/ 2.0 (/ (* (pow t_m 3.0) (pow (* k (/ (sqrt 2.0) (sqrt l))) 2.0)) l))
(if (<= k 10500000000.0)
(/
2.0
(pow (* t_m (* (pow (cbrt l) -2.0) (cbrt (* 2.0 (pow k 2.0))))) 3.0))
(*
(/ 2.0 (pow k 2.0))
(/ (/ (* (cos k) (pow l 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 <= 4.9e-219) {
tmp = ((2.0 / pow((k * pow(t_m, 1.5)), 2.0)) * (l * l)) / (2.0 + pow((k / t_m), 2.0));
} else if (k <= 1.2e-167) {
tmp = 2.0 / ((pow(t_m, 3.0) * pow((k * (sqrt(2.0) / sqrt(l))), 2.0)) / l);
} else if (k <= 10500000000.0) {
tmp = 2.0 / pow((t_m * (pow(cbrt(l), -2.0) * cbrt((2.0 * pow(k, 2.0))))), 3.0);
} else {
tmp = (2.0 / pow(k, 2.0)) * (((cos(k) * pow(l, 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 <= 4.9e-219) {
tmp = ((2.0 / Math.pow((k * Math.pow(t_m, 1.5)), 2.0)) * (l * l)) / (2.0 + Math.pow((k / t_m), 2.0));
} else if (k <= 1.2e-167) {
tmp = 2.0 / ((Math.pow(t_m, 3.0) * Math.pow((k * (Math.sqrt(2.0) / Math.sqrt(l))), 2.0)) / l);
} else if (k <= 10500000000.0) {
tmp = 2.0 / Math.pow((t_m * (Math.pow(Math.cbrt(l), -2.0) * Math.cbrt((2.0 * Math.pow(k, 2.0))))), 3.0);
} else {
tmp = (2.0 / Math.pow(k, 2.0)) * (((Math.cos(k) * Math.pow(l, 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 <= 4.9e-219) tmp = Float64(Float64(Float64(2.0 / (Float64(k * (t_m ^ 1.5)) ^ 2.0)) * Float64(l * l)) / Float64(2.0 + (Float64(k / t_m) ^ 2.0))); elseif (k <= 1.2e-167) tmp = Float64(2.0 / Float64(Float64((t_m ^ 3.0) * (Float64(k * Float64(sqrt(2.0) / sqrt(l))) ^ 2.0)) / l)); elseif (k <= 10500000000.0) tmp = Float64(2.0 / (Float64(t_m * Float64((cbrt(l) ^ -2.0) * cbrt(Float64(2.0 * (k ^ 2.0))))) ^ 3.0)); else tmp = Float64(Float64(2.0 / (k ^ 2.0)) * Float64(Float64(Float64(cos(k) * (l ^ 2.0)) / 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, 4.9e-219], N[(N[(N[(2.0 / N[Power[N[(k * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.2e-167], N[(2.0 / N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[Power[N[(k * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 10500000000.0], N[(2.0 / N[Power[N[(t$95$m * N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * N[Power[N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 4.9 \cdot 10^{-219}:\\
\;\;\;\;\frac{\frac{2}{{\left(k \cdot {t\_m}^{1.5}\right)}^{2}} \cdot \left(\ell \cdot \ell\right)}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{elif}\;k \leq 1.2 \cdot 10^{-167}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{3} \cdot {\left(k \cdot \frac{\sqrt{2}}{\sqrt{\ell}}\right)}^{2}}{\ell}}\\
\mathbf{elif}\;k \leq 10500000000:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot \left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \sqrt[3]{2 \cdot {k}^{2}}\right)\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{2}} \cdot \frac{\frac{\cos k \cdot {\ell}^{2}}{t\_m}}{{\sin k}^{2}}\\
\end{array}
\end{array}
if k < 4.8999999999999999e-219Initial program 56.2%
Simplified52.1%
add-sqr-sqrt22.9%
pow222.9%
*-commutative22.9%
sqrt-prod17.7%
sqrt-pow119.2%
metadata-eval19.2%
Applied egg-rr19.2%
*-commutative19.2%
Simplified19.2%
Taylor expanded in k around 0 30.7%
if 4.8999999999999999e-219 < k < 1.19999999999999997e-167Initial program 61.0%
associate-*l*40.0%
associate-/r*40.0%
+-commutative40.0%
associate-+r+40.0%
metadata-eval40.0%
associate-*r*40.0%
associate-*l/40.9%
associate-*l*40.9%
Applied egg-rr40.9%
associate-/l*40.9%
Simplified40.9%
Taylor expanded in k around 0 40.9%
associate-*r/40.9%
Simplified40.9%
add-sqr-sqrt10.9%
pow210.9%
sqrt-div10.9%
*-commutative10.9%
sqrt-prod10.9%
sqrt-pow159.6%
metadata-eval59.6%
pow159.6%
Applied egg-rr59.6%
associate-*l/59.7%
associate-/l*59.7%
Applied egg-rr59.7%
if 1.19999999999999997e-167 < k < 1.05e10Initial program 53.0%
Simplified60.0%
Taylor expanded in k around 0 63.4%
add-cube-cbrt63.3%
pow363.3%
cbrt-prod63.1%
associate-/l/59.0%
cbrt-div67.9%
unpow367.9%
add-cbrt-cube73.9%
cbrt-prod92.1%
unpow292.1%
div-inv92.0%
pow-flip92.1%
metadata-eval92.1%
Applied egg-rr92.1%
associate-*l*92.2%
Simplified92.2%
if 1.05e10 < k Initial program 47.8%
Simplified47.8%
Taylor expanded in t around 0 74.8%
associate-*r/74.8%
times-frac73.5%
associate-/r*73.5%
Simplified73.5%
Final simplification52.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (+ 2.0 (pow (/ k t_m) 2.0)))
(t_3
(* (* l (/ (/ 2.0 (pow t_m 3.0)) (* (sin k) (tan k)))) (/ l t_2))))
(*
t_s
(if (<= t_m 3.7e-79)
(/ 2.0 (pow (* t_m (cbrt (/ (* 2.0 (/ (pow k 2.0) l)) l))) 3.0))
(if (<= t_m 15000000000000.0)
t_3
(if (<= t_m 4.1e+52)
(/
2.0
(/ (* (pow t_m 3.0) (pow (* k (/ (sqrt 2.0) (sqrt l))) 2.0)) l))
(if (<= t_m 5.1e+73)
t_3
(/ (* (/ 2.0 (pow (* k (pow t_m 1.5)) 2.0)) (* l l)) t_2))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = 2.0 + pow((k / t_m), 2.0);
double t_3 = (l * ((2.0 / pow(t_m, 3.0)) / (sin(k) * tan(k)))) * (l / t_2);
double tmp;
if (t_m <= 3.7e-79) {
tmp = 2.0 / pow((t_m * cbrt(((2.0 * (pow(k, 2.0) / l)) / l))), 3.0);
} else if (t_m <= 15000000000000.0) {
tmp = t_3;
} else if (t_m <= 4.1e+52) {
tmp = 2.0 / ((pow(t_m, 3.0) * pow((k * (sqrt(2.0) / sqrt(l))), 2.0)) / l);
} else if (t_m <= 5.1e+73) {
tmp = t_3;
} else {
tmp = ((2.0 / pow((k * pow(t_m, 1.5)), 2.0)) * (l * l)) / t_2;
}
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 = 2.0 + Math.pow((k / t_m), 2.0);
double t_3 = (l * ((2.0 / Math.pow(t_m, 3.0)) / (Math.sin(k) * Math.tan(k)))) * (l / t_2);
double tmp;
if (t_m <= 3.7e-79) {
tmp = 2.0 / Math.pow((t_m * Math.cbrt(((2.0 * (Math.pow(k, 2.0) / l)) / l))), 3.0);
} else if (t_m <= 15000000000000.0) {
tmp = t_3;
} else if (t_m <= 4.1e+52) {
tmp = 2.0 / ((Math.pow(t_m, 3.0) * Math.pow((k * (Math.sqrt(2.0) / Math.sqrt(l))), 2.0)) / l);
} else if (t_m <= 5.1e+73) {
tmp = t_3;
} else {
tmp = ((2.0 / Math.pow((k * Math.pow(t_m, 1.5)), 2.0)) * (l * l)) / t_2;
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(2.0 + (Float64(k / t_m) ^ 2.0)) t_3 = Float64(Float64(l * Float64(Float64(2.0 / (t_m ^ 3.0)) / Float64(sin(k) * tan(k)))) * Float64(l / t_2)) tmp = 0.0 if (t_m <= 3.7e-79) tmp = Float64(2.0 / (Float64(t_m * cbrt(Float64(Float64(2.0 * Float64((k ^ 2.0) / l)) / l))) ^ 3.0)); elseif (t_m <= 15000000000000.0) tmp = t_3; elseif (t_m <= 4.1e+52) tmp = Float64(2.0 / Float64(Float64((t_m ^ 3.0) * (Float64(k * Float64(sqrt(2.0) / sqrt(l))) ^ 2.0)) / l)); elseif (t_m <= 5.1e+73) tmp = t_3; else tmp = Float64(Float64(Float64(2.0 / (Float64(k * (t_m ^ 1.5)) ^ 2.0)) * Float64(l * l)) / t_2); 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[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(l * N[(N[(2.0 / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / t$95$2), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 3.7e-79], N[(2.0 / N[Power[N[(t$95$m * N[Power[N[(N[(2.0 * N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 15000000000000.0], t$95$3, If[LessEqual[t$95$m, 4.1e+52], N[(2.0 / N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[Power[N[(k * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.1e+73], t$95$3, N[(N[(N[(2.0 / N[Power[N[(k * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]]]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := 2 + {\left(\frac{k}{t\_m}\right)}^{2}\\
t_3 := \left(\ell \cdot \frac{\frac{2}{{t\_m}^{3}}}{\sin k \cdot \tan k}\right) \cdot \frac{\ell}{t\_2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.7 \cdot 10^{-79}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot \sqrt[3]{\frac{2 \cdot \frac{{k}^{2}}{\ell}}{\ell}}\right)}^{3}}\\
\mathbf{elif}\;t\_m \leq 15000000000000:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_m \leq 4.1 \cdot 10^{+52}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{3} \cdot {\left(k \cdot \frac{\sqrt{2}}{\sqrt{\ell}}\right)}^{2}}{\ell}}\\
\mathbf{elif}\;t\_m \leq 5.1 \cdot 10^{+73}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{{\left(k \cdot {t\_m}^{1.5}\right)}^{2}} \cdot \left(\ell \cdot \ell\right)}{t\_2}\\
\end{array}
\end{array}
\end{array}
if t < 3.70000000000000018e-79Initial program 43.7%
associate-*l*41.0%
associate-/r*44.8%
+-commutative44.8%
associate-+r+44.8%
metadata-eval44.8%
associate-*r*44.8%
associate-*l/44.3%
associate-*l*44.3%
Applied egg-rr44.3%
associate-/l*45.3%
Simplified45.3%
Taylor expanded in k around 0 42.6%
associate-*r/42.6%
Simplified42.6%
associate-*l/42.7%
associate-/l*42.7%
Applied egg-rr42.7%
add-cube-cbrt42.6%
pow342.6%
associate-/l*42.0%
cbrt-prod41.9%
unpow342.0%
add-cbrt-cube57.3%
Applied egg-rr57.3%
if 3.70000000000000018e-79 < t < 1.5e13 or 4.1e52 < t < 5.10000000000000024e73Initial program 81.1%
Simplified87.0%
associate-*r*90.3%
*-un-lft-identity90.3%
times-frac93.0%
associate-/r*93.0%
Applied egg-rr93.0%
/-rgt-identity93.0%
*-commutative93.0%
Simplified93.0%
if 1.5e13 < t < 4.1e52Initial program 86.2%
associate-*l*85.7%
associate-/r*85.7%
+-commutative85.7%
associate-+r+85.7%
metadata-eval85.7%
associate-*r*85.7%
associate-*l/86.1%
associate-*l*86.1%
Applied egg-rr86.1%
associate-/l*86.1%
Simplified86.1%
Taylor expanded in k around 0 86.1%
associate-*r/86.1%
Simplified86.1%
add-sqr-sqrt43.2%
pow243.2%
sqrt-div43.2%
*-commutative43.2%
sqrt-prod43.2%
sqrt-pow157.1%
metadata-eval57.1%
pow157.1%
Applied egg-rr57.1%
associate-*l/56.9%
associate-/l*56.9%
Applied egg-rr56.9%
if 5.10000000000000024e73 < t Initial program 62.9%
Simplified56.6%
add-sqr-sqrt35.8%
pow235.8%
*-commutative35.8%
sqrt-prod35.8%
sqrt-pow139.9%
metadata-eval39.9%
Applied egg-rr39.9%
*-commutative39.9%
Simplified39.9%
Taylor expanded in k around 0 73.9%
Final simplification65.1%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (+ 2.0 (pow (/ k t_m) 2.0))))
(*
t_s
(if (<= t_m 2.9e-101)
(/ 2.0 (pow (* t_m (cbrt (/ (* 2.0 (/ (pow k 2.0) l)) l))) 3.0))
(if (<= t_m 3.4e+102)
(/ 2.0 (* (/ (pow t_m 3.0) l) (* (sin k) (* (tan k) (/ t_2 l)))))
(/ (* (/ 2.0 (pow (* k (pow t_m 1.5)) 2.0)) (* l l)) t_2))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = 2.0 + pow((k / t_m), 2.0);
double tmp;
if (t_m <= 2.9e-101) {
tmp = 2.0 / pow((t_m * cbrt(((2.0 * (pow(k, 2.0) / l)) / l))), 3.0);
} else if (t_m <= 3.4e+102) {
tmp = 2.0 / ((pow(t_m, 3.0) / l) * (sin(k) * (tan(k) * (t_2 / l))));
} else {
tmp = ((2.0 / pow((k * pow(t_m, 1.5)), 2.0)) * (l * l)) / t_2;
}
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 = 2.0 + Math.pow((k / t_m), 2.0);
double tmp;
if (t_m <= 2.9e-101) {
tmp = 2.0 / Math.pow((t_m * Math.cbrt(((2.0 * (Math.pow(k, 2.0) / l)) / l))), 3.0);
} else if (t_m <= 3.4e+102) {
tmp = 2.0 / ((Math.pow(t_m, 3.0) / l) * (Math.sin(k) * (Math.tan(k) * (t_2 / l))));
} else {
tmp = ((2.0 / Math.pow((k * Math.pow(t_m, 1.5)), 2.0)) * (l * l)) / t_2;
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(2.0 + (Float64(k / t_m) ^ 2.0)) tmp = 0.0 if (t_m <= 2.9e-101) tmp = Float64(2.0 / (Float64(t_m * cbrt(Float64(Float64(2.0 * Float64((k ^ 2.0) / l)) / l))) ^ 3.0)); elseif (t_m <= 3.4e+102) tmp = Float64(2.0 / Float64(Float64((t_m ^ 3.0) / l) * Float64(sin(k) * Float64(tan(k) * Float64(t_2 / l))))); else tmp = Float64(Float64(Float64(2.0 / (Float64(k * (t_m ^ 1.5)) ^ 2.0)) * Float64(l * l)) / t_2); 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[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.9e-101], N[(2.0 / N[Power[N[(t$95$m * N[Power[N[(N[(2.0 * N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.4e+102], N[(2.0 / N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(t$95$2 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 / N[Power[N[(k * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := 2 + {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.9 \cdot 10^{-101}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot \sqrt[3]{\frac{2 \cdot \frac{{k}^{2}}{\ell}}{\ell}}\right)}^{3}}\\
\mathbf{elif}\;t\_m \leq 3.4 \cdot 10^{+102}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{3}}{\ell} \cdot \left(\sin k \cdot \left(\tan k \cdot \frac{t\_2}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{{\left(k \cdot {t\_m}^{1.5}\right)}^{2}} \cdot \left(\ell \cdot \ell\right)}{t\_2}\\
\end{array}
\end{array}
\end{array}
if t < 2.9e-101Initial program 42.9%
associate-*l*40.2%
associate-/r*43.4%
+-commutative43.4%
associate-+r+43.4%
metadata-eval43.4%
associate-*r*43.4%
associate-*l/43.0%
associate-*l*42.9%
Applied egg-rr42.9%
associate-/l*44.0%
Simplified44.0%
Taylor expanded in k around 0 41.2%
associate-*r/41.2%
Simplified41.2%
associate-*l/41.2%
associate-/l*41.2%
Applied egg-rr41.2%
add-cube-cbrt41.2%
pow341.2%
associate-/l*40.6%
cbrt-prod40.5%
unpow340.5%
add-cbrt-cube56.3%
Applied egg-rr56.3%
if 2.9e-101 < t < 3.4e102Initial program 82.5%
associate-*l*82.2%
associate-/r*86.2%
+-commutative86.2%
associate-+r+86.2%
metadata-eval86.2%
associate-*r*86.2%
associate-*l/91.6%
associate-*l*91.6%
Applied egg-rr91.6%
associate-/l*91.7%
Simplified91.7%
associate-/l*95.7%
Applied egg-rr95.7%
associate-/l*95.7%
Simplified95.7%
if 3.4e102 < t Initial program 58.4%
Simplified51.1%
add-sqr-sqrt28.9%
pow228.9%
*-commutative28.9%
sqrt-prod28.9%
sqrt-pow133.7%
metadata-eval33.7%
Applied egg-rr33.7%
*-commutative33.7%
Simplified33.7%
Taylor expanded in k around 0 71.4%
Final simplification66.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 8e-79)
(/ 2.0 (pow (* t_m (cbrt (/ (* 2.0 (/ (pow k 2.0) l)) l))) 3.0))
(/
(* (/ 2.0 (pow (* k (pow t_m 1.5)) 2.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 <= 8e-79) {
tmp = 2.0 / pow((t_m * cbrt(((2.0 * (pow(k, 2.0) / l)) / l))), 3.0);
} else {
tmp = ((2.0 / pow((k * pow(t_m, 1.5)), 2.0)) * (l * l)) / (2.0 + pow((k / t_m), 2.0));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 8e-79) {
tmp = 2.0 / Math.pow((t_m * Math.cbrt(((2.0 * (Math.pow(k, 2.0) / l)) / l))), 3.0);
} else {
tmp = ((2.0 / Math.pow((k * Math.pow(t_m, 1.5)), 2.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 <= 8e-79) tmp = Float64(2.0 / (Float64(t_m * cbrt(Float64(Float64(2.0 * Float64((k ^ 2.0) / l)) / l))) ^ 3.0)); else tmp = Float64(Float64(Float64(2.0 / (Float64(k * (t_m ^ 1.5)) ^ 2.0)) * Float64(l * l)) / Float64(2.0 + (Float64(k / t_m) ^ 2.0))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 8e-79], N[(2.0 / N[Power[N[(t$95$m * N[Power[N[(N[(2.0 * N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 / N[Power[N[(k * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision], 2.0], $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 8 \cdot 10^{-79}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot \sqrt[3]{\frac{2 \cdot \frac{{k}^{2}}{\ell}}{\ell}}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{{\left(k \cdot {t\_m}^{1.5}\right)}^{2}} \cdot \left(\ell \cdot \ell\right)}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\end{array}
\end{array}
if t < 8e-79Initial program 43.7%
associate-*l*41.0%
associate-/r*44.8%
+-commutative44.8%
associate-+r+44.8%
metadata-eval44.8%
associate-*r*44.8%
associate-*l/44.3%
associate-*l*44.3%
Applied egg-rr44.3%
associate-/l*45.3%
Simplified45.3%
Taylor expanded in k around 0 42.6%
associate-*r/42.6%
Simplified42.6%
associate-*l/42.7%
associate-/l*42.7%
Applied egg-rr42.7%
add-cube-cbrt42.6%
pow342.6%
associate-/l*42.0%
cbrt-prod41.9%
unpow342.0%
add-cbrt-cube57.3%
Applied egg-rr57.3%
if 8e-79 < t Initial program 70.9%
Simplified69.2%
add-sqr-sqrt41.6%
pow241.6%
*-commutative41.6%
sqrt-prod41.6%
sqrt-pow143.9%
metadata-eval43.9%
Applied egg-rr43.9%
*-commutative43.9%
Simplified43.9%
Taylor expanded in k around 0 72.0%
Final simplification62.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 5.2e+200)
(/ 2.0 (pow (* t_m (cbrt (/ (* 2.0 (/ (pow k 2.0) l)) l))) 3.0))
(/ 2.0 (pow (* k (sqrt (* 2.0 (/ (/ (pow t_m 3.0) l) l)))) 2.0)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5.2e+200) {
tmp = 2.0 / pow((t_m * cbrt(((2.0 * (pow(k, 2.0) / l)) / l))), 3.0);
} else {
tmp = 2.0 / pow((k * sqrt((2.0 * ((pow(t_m, 3.0) / l) / l)))), 2.0);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5.2e+200) {
tmp = 2.0 / Math.pow((t_m * Math.cbrt(((2.0 * (Math.pow(k, 2.0) / l)) / l))), 3.0);
} else {
tmp = 2.0 / Math.pow((k * Math.sqrt((2.0 * ((Math.pow(t_m, 3.0) / l) / l)))), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 5.2e+200) tmp = Float64(2.0 / (Float64(t_m * cbrt(Float64(Float64(2.0 * Float64((k ^ 2.0) / l)) / l))) ^ 3.0)); else tmp = Float64(2.0 / (Float64(k * sqrt(Float64(2.0 * Float64(Float64((t_m ^ 3.0) / l) / l)))) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 5.2e+200], N[(2.0 / N[Power[N[(t$95$m * N[Power[N[(N[(2.0 * N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(k * N[Sqrt[N[(2.0 * N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.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^{+200}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot \sqrt[3]{\frac{2 \cdot \frac{{k}^{2}}{\ell}}{\ell}}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \sqrt{2 \cdot \frac{\frac{{t\_m}^{3}}{\ell}}{\ell}}\right)}^{2}}\\
\end{array}
\end{array}
if t < 5.2000000000000003e200Initial program 53.4%
associate-*l*51.4%
associate-/r*54.5%
+-commutative54.5%
associate-+r+54.5%
metadata-eval54.5%
associate-*r*54.5%
associate-*l/55.4%
associate-*l*55.4%
Applied egg-rr55.4%
associate-/l*56.1%
Simplified56.1%
Taylor expanded in k around 0 50.2%
associate-*r/50.2%
Simplified50.2%
associate-*l/50.3%
associate-/l*50.3%
Applied egg-rr50.3%
add-cube-cbrt50.2%
pow350.2%
associate-/l*50.1%
cbrt-prod50.0%
unpow350.0%
add-cbrt-cube61.9%
Applied egg-rr61.9%
if 5.2000000000000003e200 < t Initial program 52.7%
associate-*l*39.1%
associate-/r*44.9%
+-commutative44.9%
associate-+r+44.9%
metadata-eval44.9%
associate-*r*44.9%
associate-*l/44.9%
associate-*l*44.9%
Applied egg-rr44.9%
associate-/l*44.6%
Simplified44.6%
Taylor expanded in k around 0 44.6%
associate-*r/44.6%
Simplified44.6%
add-sqr-sqrt44.6%
pow244.6%
associate-*r/44.9%
associate-*l/44.9%
rem-exp-log22.3%
associate-*r*22.3%
sqrt-prod22.3%
rem-exp-log44.9%
sqrt-pow158.6%
metadata-eval58.6%
pow158.6%
Applied egg-rr58.6%
Final simplification61.6%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 2.0 (/ (pow (* t_m (cbrt (* 2.0 (/ (pow k 2.0) l)))) 3.0) l))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / (pow((t_m * cbrt((2.0 * (pow(k, 2.0) / l)))), 3.0) / l));
}
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((t_m * Math.cbrt((2.0 * (Math.pow(k, 2.0) / l)))), 3.0) / l));
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64((Float64(t_m * cbrt(Float64(2.0 * Float64((k ^ 2.0) / l)))) ^ 3.0) / l))) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[Power[N[(t$95$m * N[Power[N[(2.0 * N[(N[Power[k, 2.0], $MachinePrecision] / l), $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 \frac{2}{\frac{{\left(t\_m \cdot \sqrt[3]{2 \cdot \frac{{k}^{2}}{\ell}}\right)}^{3}}{\ell}}
\end{array}
Initial program 53.3%
associate-*l*50.3%
associate-/r*53.7%
+-commutative53.7%
associate-+r+53.7%
metadata-eval53.7%
associate-*r*53.7%
associate-*l/54.4%
associate-*l*54.4%
Applied egg-rr54.4%
associate-/l*55.1%
Simplified55.1%
Taylor expanded in k around 0 49.7%
associate-*r/49.7%
Simplified49.7%
associate-*l/49.8%
associate-/l*49.8%
Applied egg-rr49.8%
add-cube-cbrt49.7%
pow349.7%
cbrt-prod49.7%
unpow349.7%
add-cbrt-cube60.3%
Applied egg-rr60.3%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 2.0 (* (pow (/ t_m (cbrt l)) 3.0) (/ (* 2.0 (pow k 2.0)) l)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / (pow((t_m / cbrt(l)), 3.0) * ((2.0 * pow(k, 2.0)) / l)));
}
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((t_m / Math.cbrt(l)), 3.0) * ((2.0 * Math.pow(k, 2.0)) / l)));
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64((Float64(t_m / cbrt(l)) ^ 3.0) * Float64(Float64(2.0 * (k ^ 2.0)) / l)))) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[Power[N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(N[(2.0 * N[Power[k, 2.0], $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 \frac{2}{{\left(\frac{t\_m}{\sqrt[3]{\ell}}\right)}^{3} \cdot \frac{2 \cdot {k}^{2}}{\ell}}
\end{array}
Initial program 53.3%
associate-*l*50.3%
associate-/r*53.7%
+-commutative53.7%
associate-+r+53.7%
metadata-eval53.7%
associate-*r*53.7%
associate-*l/54.4%
associate-*l*54.4%
Applied egg-rr54.4%
associate-/l*55.1%
Simplified55.1%
Taylor expanded in k around 0 49.7%
associate-*r/49.7%
Simplified49.7%
add-cube-cbrt49.7%
pow349.7%
cbrt-div49.7%
rem-cbrt-cube53.2%
Applied egg-rr53.2%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 2.0 (* (* 2.0 (pow k 2.0)) (/ (pow (/ t_m (cbrt l)) 3.0) l)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((2.0 * pow(k, 2.0)) * (pow((t_m / cbrt(l)), 3.0) / l)));
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((2.0 * Math.pow(k, 2.0)) * (Math.pow((t_m / Math.cbrt(l)), 3.0) / l)));
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64((Float64(t_m / cbrt(l)) ^ 3.0) / l)))) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $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 \frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{{\left(\frac{t\_m}{\sqrt[3]{\ell}}\right)}^{3}}{\ell}}
\end{array}
Initial program 53.3%
Simplified53.7%
Taylor expanded in k around 0 48.7%
add-cube-cbrt49.7%
pow349.7%
cbrt-div49.7%
rem-cbrt-cube53.2%
Applied egg-rr52.2%
Final simplification52.2%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 2.0 (* (/ (* 2.0 (pow k 2.0)) l) (* t_m (/ (pow t_m 2.0) l))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / (((2.0 * pow(k, 2.0)) / l) * (t_m * (pow(t_m, 2.0) / l))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / (((2.0d0 * (k ** 2.0d0)) / l) * (t_m * ((t_m ** 2.0d0) / l))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / (((2.0 * Math.pow(k, 2.0)) / l) * (t_m * (Math.pow(t_m, 2.0) / l))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / (((2.0 * math.pow(k, 2.0)) / l) * (t_m * (math.pow(t_m, 2.0) / l))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64(Float64(Float64(2.0 * (k ^ 2.0)) / l) * Float64(t_m * Float64((t_m ^ 2.0) / l))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / (((2.0 * (k ^ 2.0)) / l) * (t_m * ((t_m ^ 2.0) / l)))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{2}{\frac{2 \cdot {k}^{2}}{\ell} \cdot \left(t\_m \cdot \frac{{t\_m}^{2}}{\ell}\right)}
\end{array}
Initial program 53.3%
associate-*l*50.3%
associate-/r*53.7%
+-commutative53.7%
associate-+r+53.7%
metadata-eval53.7%
associate-*r*53.7%
associate-*l/54.4%
associate-*l*54.4%
Applied egg-rr54.4%
associate-/l*55.1%
Simplified55.1%
Taylor expanded in k around 0 49.7%
associate-*r/49.7%
Simplified49.7%
cube-mult49.7%
*-un-lft-identity49.7%
times-frac52.1%
pow252.1%
Applied egg-rr52.1%
Final simplification52.1%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* l (/ 2.0 (* (/ (pow k 2.0) l) (* 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) {
return t_s * (l * (2.0 / ((pow(k, 2.0) / l) * (2.0 * pow(t_m, 3.0)))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (l * (2.0d0 / (((k ** 2.0d0) / l) * (2.0d0 * (t_m ** 3.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 * (l * (2.0 / ((Math.pow(k, 2.0) / l) * (2.0 * Math.pow(t_m, 3.0)))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (l * (2.0 / ((math.pow(k, 2.0) / l) * (2.0 * math.pow(t_m, 3.0)))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(l * Float64(2.0 / Float64(Float64((k ^ 2.0) / l) * Float64(2.0 * (t_m ^ 3.0)))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (l * (2.0 / (((k ^ 2.0) / l) * (2.0 * (t_m ^ 3.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[(l * N[(2.0 / N[(N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(2.0 * N[Power[t$95$m, 3.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 \left(\ell \cdot \frac{2}{\frac{{k}^{2}}{\ell} \cdot \left(2 \cdot {t\_m}^{3}\right)}\right)
\end{array}
Initial program 53.3%
associate-*l*50.3%
associate-/r*53.7%
+-commutative53.7%
associate-+r+53.7%
metadata-eval53.7%
associate-*r*53.7%
associate-*l/54.4%
associate-*l*54.4%
Applied egg-rr54.4%
associate-/l*55.1%
Simplified55.1%
Taylor expanded in k around 0 49.7%
associate-*r/49.7%
Simplified49.7%
associate-*l/49.8%
associate-/l*49.8%
Applied egg-rr49.8%
associate-/r/49.8%
associate-*r*49.8%
Applied egg-rr49.8%
Final simplification49.8%
herbie shell --seed 2024092
(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))))