
(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 22 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 1.8e-46)
(/ 2.0 (* (pow (* k (/ (sin k) l)) 2.0) (/ t_m (cos k))))
(/
2.0
(pow
(*
(* t_m (* (pow (cbrt l) -2.0) (cbrt (sin k))))
(cbrt (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))))
3.0)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.8e-46) {
tmp = 2.0 / (pow((k * (sin(k) / l)), 2.0) * (t_m / cos(k)));
} else {
tmp = 2.0 / pow(((t_m * (pow(cbrt(l), -2.0) * cbrt(sin(k)))) * cbrt((tan(k) * (2.0 + pow((k / t_m), 2.0))))), 3.0);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.8e-46) {
tmp = 2.0 / (Math.pow((k * (Math.sin(k) / l)), 2.0) * (t_m / Math.cos(k)));
} else {
tmp = 2.0 / Math.pow(((t_m * (Math.pow(Math.cbrt(l), -2.0) * Math.cbrt(Math.sin(k)))) * Math.cbrt((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))))), 3.0);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.8e-46) tmp = Float64(2.0 / Float64((Float64(k * Float64(sin(k) / l)) ^ 2.0) * Float64(t_m / cos(k)))); else tmp = Float64(2.0 / (Float64(Float64(t_m * Float64((cbrt(l) ^ -2.0) * cbrt(sin(k)))) * cbrt(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))))) ^ 3.0)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.8e-46], N[(2.0 / N[(N[Power[N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(t$95$m * N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.8 \cdot 10^{-46}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t\_m}{\cos k}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot \left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \sqrt[3]{\sin k}\right)\right) \cdot \sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)}\right)}^{3}}\\
\end{array}
\end{array}
if t < 1.8e-46Initial program 49.3%
Simplified49.3%
Applied egg-rr18.3%
Taylor expanded in t around 0 35.6%
associate-/l*35.6%
Simplified35.6%
unpow-prod-down33.5%
pow233.5%
add-sqr-sqrt78.9%
Applied egg-rr78.9%
if 1.8e-46 < t Initial program 64.1%
Simplified64.1%
add-cube-cbrt63.9%
pow363.9%
*-commutative63.9%
cbrt-prod64.0%
cbrt-div65.1%
rem-cbrt-cube71.6%
cbrt-prod89.3%
pow289.3%
Applied egg-rr89.3%
*-commutative89.3%
Simplified89.3%
add-cube-cbrt89.0%
pow388.9%
div-inv88.9%
pow-flip88.9%
metadata-eval88.9%
Applied egg-rr88.9%
add-cube-cbrt88.9%
pow388.9%
Applied egg-rr96.2%
Final simplification84.2%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.9e-46)
(/ 2.0 (* (pow (* k (/ (sin k) l)) 2.0) (/ t_m (cos k))))
(/
2.0
(pow
(*
t_m
(*
(* (pow (cbrt l) -2.0) (cbrt (sin k)))
(cbrt (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0))))))
3.0)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.9e-46) {
tmp = 2.0 / (pow((k * (sin(k) / l)), 2.0) * (t_m / cos(k)));
} else {
tmp = 2.0 / pow((t_m * ((pow(cbrt(l), -2.0) * cbrt(sin(k))) * cbrt((tan(k) * (2.0 + pow((k / t_m), 2.0)))))), 3.0);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.9e-46) {
tmp = 2.0 / (Math.pow((k * (Math.sin(k) / l)), 2.0) * (t_m / Math.cos(k)));
} else {
tmp = 2.0 / Math.pow((t_m * ((Math.pow(Math.cbrt(l), -2.0) * Math.cbrt(Math.sin(k))) * Math.cbrt((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0)))))), 3.0);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.9e-46) tmp = Float64(2.0 / Float64((Float64(k * Float64(sin(k) / l)) ^ 2.0) * Float64(t_m / cos(k)))); else tmp = Float64(2.0 / (Float64(t_m * Float64(Float64((cbrt(l) ^ -2.0) * cbrt(sin(k))) * cbrt(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0)))))) ^ 3.0)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.9e-46], N[(2.0 / N[(N[Power[N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(t$95$m * N[(N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.9 \cdot 10^{-46}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t\_m}{\cos k}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot \left(\left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \sqrt[3]{\sin k}\right) \cdot \sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)}\right)\right)}^{3}}\\
\end{array}
\end{array}
if t < 1.8999999999999998e-46Initial program 49.3%
Simplified49.3%
Applied egg-rr18.3%
Taylor expanded in t around 0 35.6%
associate-/l*35.6%
Simplified35.6%
unpow-prod-down33.5%
pow233.5%
add-sqr-sqrt78.9%
Applied egg-rr78.9%
if 1.8999999999999998e-46 < t Initial program 64.1%
Simplified64.1%
add-cube-cbrt63.9%
pow363.9%
*-commutative63.9%
cbrt-prod64.0%
cbrt-div65.1%
rem-cbrt-cube71.6%
cbrt-prod89.3%
pow289.3%
Applied egg-rr89.3%
*-commutative89.3%
Simplified89.3%
add-cube-cbrt89.0%
pow388.9%
div-inv88.9%
pow-flip88.9%
metadata-eval88.9%
Applied egg-rr88.9%
add-cube-cbrt88.9%
pow388.9%
Applied egg-rr96.2%
pow196.2%
*-commutative96.2%
Applied egg-rr96.2%
unpow196.2%
*-commutative96.2%
associate-*l*95.1%
Simplified95.1%
Final simplification83.9%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 3.5e-162)
(/
2.0
(pow
(*
(* t_m (* (pow (cbrt l) -2.0) (cbrt (sin k))))
(* (cbrt k) (cbrt 2.0)))
3.0))
(if (<= k 1.32e+37)
(/
2.0
(pow
(*
(/ t_m (pow (cbrt l) 2.0))
(cbrt (* (+ 2.0 (pow (/ k t_m) 2.0)) (* (sin k) (tan k)))))
3.0))
(/ (* (cos k) (/ 2.0 t_m)) (pow (* (sin k) (/ k 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 <= 3.5e-162) {
tmp = 2.0 / pow(((t_m * (pow(cbrt(l), -2.0) * cbrt(sin(k)))) * (cbrt(k) * cbrt(2.0))), 3.0);
} else if (k <= 1.32e+37) {
tmp = 2.0 / pow(((t_m / pow(cbrt(l), 2.0)) * cbrt(((2.0 + pow((k / t_m), 2.0)) * (sin(k) * tan(k))))), 3.0);
} else {
tmp = (cos(k) * (2.0 / t_m)) / pow((sin(k) * (k / 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 <= 3.5e-162) {
tmp = 2.0 / Math.pow(((t_m * (Math.pow(Math.cbrt(l), -2.0) * Math.cbrt(Math.sin(k)))) * (Math.cbrt(k) * Math.cbrt(2.0))), 3.0);
} else if (k <= 1.32e+37) {
tmp = 2.0 / Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * Math.cbrt(((2.0 + Math.pow((k / t_m), 2.0)) * (Math.sin(k) * Math.tan(k))))), 3.0);
} else {
tmp = (Math.cos(k) * (2.0 / t_m)) / Math.pow((Math.sin(k) * (k / 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 <= 3.5e-162) tmp = Float64(2.0 / (Float64(Float64(t_m * Float64((cbrt(l) ^ -2.0) * cbrt(sin(k)))) * Float64(cbrt(k) * cbrt(2.0))) ^ 3.0)); elseif (k <= 1.32e+37) tmp = Float64(2.0 / (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * cbrt(Float64(Float64(2.0 + (Float64(k / t_m) ^ 2.0)) * Float64(sin(k) * tan(k))))) ^ 3.0)); else tmp = Float64(Float64(cos(k) * Float64(2.0 / t_m)) / (Float64(sin(k) * Float64(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, 3.5e-162], N[(2.0 / N[Power[N[(N[(t$95$m * N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[k, 1/3], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.32e+37], N[(2.0 / N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * 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], 3.0], $MachinePrecision]), $MachinePrecision], N[(N[(N[Cos[k], $MachinePrecision] * N[(2.0 / t$95$m), $MachinePrecision]), $MachinePrecision] / N[Power[N[(N[Sin[k], $MachinePrecision] * N[(k / l), $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}\;k \leq 3.5 \cdot 10^{-162}:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot \left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \sqrt[3]{\sin k}\right)\right) \cdot \left(\sqrt[3]{k} \cdot \sqrt[3]{2}\right)\right)}^{3}}\\
\mathbf{elif}\;k \leq 1.32 \cdot 10^{+37}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right) \cdot \left(\sin k \cdot \tan k\right)}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\cos k \cdot \frac{2}{t\_m}}{{\left(\sin k \cdot \frac{k}{\ell}\right)}^{2}}\\
\end{array}
\end{array}
if k < 3.4999999999999999e-162Initial program 56.0%
Simplified56.0%
add-cube-cbrt55.9%
pow355.9%
*-commutative55.9%
cbrt-prod56.0%
cbrt-div56.4%
rem-cbrt-cube66.3%
cbrt-prod83.1%
pow283.1%
Applied egg-rr83.1%
*-commutative83.1%
Simplified83.1%
add-cube-cbrt82.8%
pow382.8%
div-inv82.8%
pow-flip82.8%
metadata-eval82.8%
Applied egg-rr82.8%
add-cube-cbrt82.8%
pow382.8%
Applied egg-rr90.3%
Taylor expanded in k around 0 75.8%
if 3.4999999999999999e-162 < k < 1.3199999999999999e37Initial program 50.9%
Simplified50.9%
associate-*l*50.9%
associate-/r*55.6%
associate-+r+55.6%
metadata-eval55.6%
associate-*l*55.6%
add-cube-cbrt55.4%
pow355.4%
Applied egg-rr80.7%
if 1.3199999999999999e37 < k Initial program 47.4%
Simplified47.6%
Applied egg-rr18.2%
Taylor expanded in t around 0 35.9%
associate-/l*35.9%
Simplified35.9%
*-un-lft-identity35.9%
*-commutative35.9%
unpow-prod-down30.4%
pow230.4%
add-sqr-sqrt88.8%
Applied egg-rr88.8%
*-lft-identity88.8%
associate-/r*88.9%
associate-/r/88.9%
associate-*r/89.0%
*-commutative89.0%
associate-/l*88.9%
Simplified88.9%
Final simplification78.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.9e-46)
(/ 2.0 (* (pow (* k (/ (sin k) l)) 2.0) (/ t_m (cos k))))
(/
2.0
(*
(pow (* (cbrt (sin k)) (/ t_m (pow (cbrt l) 2.0))) 3.0)
(* (tan k) (+ 1.0 (+ (pow (/ k t_m) 2.0) 1.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.9e-46) {
tmp = 2.0 / (pow((k * (sin(k) / l)), 2.0) * (t_m / cos(k)));
} else {
tmp = 2.0 / (pow((cbrt(sin(k)) * (t_m / pow(cbrt(l), 2.0))), 3.0) * (tan(k) * (1.0 + (pow((k / t_m), 2.0) + 1.0))));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.9e-46) {
tmp = 2.0 / (Math.pow((k * (Math.sin(k) / l)), 2.0) * (t_m / Math.cos(k)));
} else {
tmp = 2.0 / (Math.pow((Math.cbrt(Math.sin(k)) * (t_m / Math.pow(Math.cbrt(l), 2.0))), 3.0) * (Math.tan(k) * (1.0 + (Math.pow((k / t_m), 2.0) + 1.0))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.9e-46) tmp = Float64(2.0 / Float64((Float64(k * Float64(sin(k) / l)) ^ 2.0) * Float64(t_m / cos(k)))); else tmp = Float64(2.0 / Float64((Float64(cbrt(sin(k)) * Float64(t_m / (cbrt(l) ^ 2.0))) ^ 3.0) * Float64(tan(k) * Float64(1.0 + Float64((Float64(k / t_m) ^ 2.0) + 1.0))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.9e-46], N[(2.0 / N[(N[Power[N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.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 1.9 \cdot 10^{-46}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t\_m}{\cos k}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right)\right)\right)}\\
\end{array}
\end{array}
if t < 1.8999999999999998e-46Initial program 49.3%
Simplified49.3%
Applied egg-rr18.3%
Taylor expanded in t around 0 35.6%
associate-/l*35.6%
Simplified35.6%
unpow-prod-down33.5%
pow233.5%
add-sqr-sqrt78.9%
Applied egg-rr78.9%
if 1.8999999999999998e-46 < t Initial program 64.1%
Simplified64.1%
add-cube-cbrt63.9%
pow363.9%
*-commutative63.9%
cbrt-prod64.0%
cbrt-div65.1%
rem-cbrt-cube71.6%
cbrt-prod89.3%
pow289.3%
Applied egg-rr89.3%
*-commutative89.3%
Simplified89.3%
Final simplification82.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 (<= t_m 2e-46)
(/ 2.0 (* (pow (* k (/ (sin k) l)) 2.0) (/ t_m (cos k))))
(/
(*
(pow (/ (pow (cbrt l) 2.0) (* t_m (cbrt (sin k)))) 3.0)
(/ 2.0 (tan k)))
(+ 2.0 (pow (/ k t_m) 2.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2e-46) {
tmp = 2.0 / (pow((k * (sin(k) / l)), 2.0) * (t_m / cos(k)));
} else {
tmp = (pow((pow(cbrt(l), 2.0) / (t_m * cbrt(sin(k)))), 3.0) * (2.0 / tan(k))) / (2.0 + pow((k / t_m), 2.0));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2e-46) {
tmp = 2.0 / (Math.pow((k * (Math.sin(k) / l)), 2.0) * (t_m / Math.cos(k)));
} else {
tmp = (Math.pow((Math.pow(Math.cbrt(l), 2.0) / (t_m * Math.cbrt(Math.sin(k)))), 3.0) * (2.0 / Math.tan(k))) / (2.0 + Math.pow((k / t_m), 2.0));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 2e-46) tmp = Float64(2.0 / Float64((Float64(k * Float64(sin(k) / l)) ^ 2.0) * Float64(t_m / cos(k)))); else tmp = Float64(Float64((Float64((cbrt(l) ^ 2.0) / Float64(t_m * cbrt(sin(k)))) ^ 3.0) * Float64(2.0 / tan(k))) / Float64(2.0 + (Float64(k / t_m) ^ 2.0))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2e-46], N[(2.0 / N[(N[Power[N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2 \cdot 10^{-46}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t\_m}{\cos k}}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t\_m \cdot \sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{2}{\tan k}}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\end{array}
\end{array}
if t < 2.00000000000000005e-46Initial program 49.3%
Simplified49.3%
Applied egg-rr18.3%
Taylor expanded in t around 0 35.6%
associate-/l*35.6%
Simplified35.6%
unpow-prod-down33.5%
pow233.5%
add-sqr-sqrt78.9%
Applied egg-rr78.9%
if 2.00000000000000005e-46 < t Initial program 64.1%
Simplified58.9%
associate-*l/58.9%
pow258.9%
Applied egg-rr58.9%
associate-/r*57.8%
associate-*r/57.8%
*-commutative57.8%
times-frac63.1%
Simplified63.1%
add-cube-cbrt63.0%
pow263.0%
cbrt-div63.0%
cbrt-div63.1%
unpow263.1%
cbrt-prod63.0%
unpow263.0%
unpow363.0%
add-cbrt-cube63.0%
cbrt-div62.9%
Applied egg-rr88.7%
unpow288.7%
unpow388.8%
associate-/l/88.7%
*-commutative88.7%
Simplified88.7%
Final simplification81.9%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 3.5e-162)
(/
2.0
(pow
(*
(* t_m (* (pow (cbrt l) -2.0) (cbrt (sin k))))
(* (cbrt k) (cbrt 2.0)))
3.0))
(if (<= k 8.5e-14)
(/
2.0
(pow
(*
(* t_m (/ (sqrt t_m) l))
(sqrt (* (+ 2.0 (pow (/ k t_m) 2.0)) (* (sin k) (tan k)))))
2.0))
(/ 2.0 (* (pow (* k (/ (sin k) l)) 2.0) (/ t_m (cos k))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 3.5e-162) {
tmp = 2.0 / pow(((t_m * (pow(cbrt(l), -2.0) * cbrt(sin(k)))) * (cbrt(k) * cbrt(2.0))), 3.0);
} else if (k <= 8.5e-14) {
tmp = 2.0 / pow(((t_m * (sqrt(t_m) / l)) * sqrt(((2.0 + pow((k / t_m), 2.0)) * (sin(k) * tan(k))))), 2.0);
} else {
tmp = 2.0 / (pow((k * (sin(k) / l)), 2.0) * (t_m / cos(k)));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 3.5e-162) {
tmp = 2.0 / Math.pow(((t_m * (Math.pow(Math.cbrt(l), -2.0) * Math.cbrt(Math.sin(k)))) * (Math.cbrt(k) * Math.cbrt(2.0))), 3.0);
} else if (k <= 8.5e-14) {
tmp = 2.0 / Math.pow(((t_m * (Math.sqrt(t_m) / l)) * Math.sqrt(((2.0 + Math.pow((k / t_m), 2.0)) * (Math.sin(k) * Math.tan(k))))), 2.0);
} else {
tmp = 2.0 / (Math.pow((k * (Math.sin(k) / l)), 2.0) * (t_m / Math.cos(k)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 3.5e-162) tmp = Float64(2.0 / (Float64(Float64(t_m * Float64((cbrt(l) ^ -2.0) * cbrt(sin(k)))) * Float64(cbrt(k) * cbrt(2.0))) ^ 3.0)); elseif (k <= 8.5e-14) tmp = Float64(2.0 / (Float64(Float64(t_m * Float64(sqrt(t_m) / l)) * sqrt(Float64(Float64(2.0 + (Float64(k / t_m) ^ 2.0)) * Float64(sin(k) * tan(k))))) ^ 2.0)); else tmp = Float64(2.0 / Float64((Float64(k * Float64(sin(k) / l)) ^ 2.0) * Float64(t_m / cos(k)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 3.5e-162], N[(2.0 / N[Power[N[(N[(t$95$m * N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[k, 1/3], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 8.5e-14], N[(2.0 / N[Power[N[(N[(t$95$m * N[(N[Sqrt[t$95$m], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[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]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 3.5 \cdot 10^{-162}:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot \left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \sqrt[3]{\sin k}\right)\right) \cdot \left(\sqrt[3]{k} \cdot \sqrt[3]{2}\right)\right)}^{3}}\\
\mathbf{elif}\;k \leq 8.5 \cdot 10^{-14}:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot \frac{\sqrt{t\_m}}{\ell}\right) \cdot \sqrt{\left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right) \cdot \left(\sin k \cdot \tan k\right)}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t\_m}{\cos k}}\\
\end{array}
\end{array}
if k < 3.4999999999999999e-162Initial program 56.0%
Simplified56.0%
add-cube-cbrt55.9%
pow355.9%
*-commutative55.9%
cbrt-prod56.0%
cbrt-div56.4%
rem-cbrt-cube66.3%
cbrt-prod83.1%
pow283.1%
Applied egg-rr83.1%
*-commutative83.1%
Simplified83.1%
add-cube-cbrt82.8%
pow382.8%
div-inv82.8%
pow-flip82.8%
metadata-eval82.8%
Applied egg-rr82.8%
add-cube-cbrt82.8%
pow382.8%
Applied egg-rr90.3%
Taylor expanded in k around 0 75.8%
if 3.4999999999999999e-162 < k < 8.50000000000000038e-14Initial program 48.3%
Simplified54.7%
div-inv54.7%
unpow354.7%
associate-*l*59.9%
pow259.9%
Applied egg-rr59.9%
associate-/l*54.3%
un-div-inv54.3%
Applied egg-rr54.3%
add-sqr-sqrt38.1%
pow238.1%
Applied egg-rr57.4%
*-commutative57.4%
*-commutative57.4%
Simplified57.4%
if 8.50000000000000038e-14 < k Initial program 48.7%
Simplified48.8%
Applied egg-rr17.2%
Taylor expanded in t around 0 35.1%
associate-/l*35.1%
Simplified35.1%
unpow-prod-down30.3%
pow230.3%
add-sqr-sqrt85.2%
Applied egg-rr85.2%
Final simplification76.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 (+ 2.0 (pow (/ k t_m) 2.0))))
(*
t_s
(if (<= t_m 9.8e-12)
(/ 2.0 (* (pow (* k (/ (sin k) l)) 2.0) (/ t_m (cos k))))
(if (<= t_m 5.5e+92)
(* (* l (/ (/ 2.0 (pow t_m 3.0)) (* (sin k) (tan k)))) (/ l t_2))
(/
(* (/ 2.0 (tan k)) (/ (pow (/ (pow (cbrt l) 2.0) t_m) 3.0) (sin k)))
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 <= 9.8e-12) {
tmp = 2.0 / (pow((k * (sin(k) / l)), 2.0) * (t_m / cos(k)));
} else if (t_m <= 5.5e+92) {
tmp = (l * ((2.0 / pow(t_m, 3.0)) / (sin(k) * tan(k)))) * (l / t_2);
} else {
tmp = ((2.0 / tan(k)) * (pow((pow(cbrt(l), 2.0) / t_m), 3.0) / sin(k))) / 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 <= 9.8e-12) {
tmp = 2.0 / (Math.pow((k * (Math.sin(k) / l)), 2.0) * (t_m / Math.cos(k)));
} else if (t_m <= 5.5e+92) {
tmp = (l * ((2.0 / Math.pow(t_m, 3.0)) / (Math.sin(k) * Math.tan(k)))) * (l / t_2);
} else {
tmp = ((2.0 / Math.tan(k)) * (Math.pow((Math.pow(Math.cbrt(l), 2.0) / t_m), 3.0) / Math.sin(k))) / 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 <= 9.8e-12) tmp = Float64(2.0 / Float64((Float64(k * Float64(sin(k) / l)) ^ 2.0) * Float64(t_m / cos(k)))); elseif (t_m <= 5.5e+92) tmp = Float64(Float64(l * Float64(Float64(2.0 / (t_m ^ 3.0)) / Float64(sin(k) * tan(k)))) * Float64(l / t_2)); else tmp = Float64(Float64(Float64(2.0 / tan(k)) * Float64((Float64((cbrt(l) ^ 2.0) / t_m) ^ 3.0) / sin(k))) / 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, 9.8e-12], N[(2.0 / N[(N[Power[N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.5e+92], 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[(N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / t$95$m), $MachinePrecision], 3.0], $MachinePrecision] / N[Sin[k], $MachinePrecision]), $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 9.8 \cdot 10^{-12}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t\_m}{\cos k}}\\
\mathbf{elif}\;t\_m \leq 5.5 \cdot 10^{+92}:\\
\;\;\;\;\left(\ell \cdot \frac{\frac{2}{{t\_m}^{3}}}{\sin k \cdot \tan k}\right) \cdot \frac{\ell}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{\tan k} \cdot \frac{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t\_m}\right)}^{3}}{\sin k}}{t\_2}\\
\end{array}
\end{array}
\end{array}
if t < 9.79999999999999944e-12Initial program 50.1%
Simplified50.1%
Applied egg-rr20.6%
Taylor expanded in t around 0 37.0%
associate-/l*36.9%
Simplified36.9%
unpow-prod-down34.9%
pow234.9%
add-sqr-sqrt79.7%
Applied egg-rr79.7%
if 9.79999999999999944e-12 < t < 5.50000000000000053e92Initial program 76.3%
Simplified79.3%
div-inv79.3%
associate-*r*85.9%
associate-*l*92.4%
Applied egg-rr92.4%
*-commutative92.4%
associate-/r*92.5%
associate-*r/92.6%
*-rgt-identity92.6%
Simplified92.6%
if 5.50000000000000053e92 < t Initial program 55.5%
Simplified45.6%
associate-*l/45.6%
pow245.6%
Applied egg-rr45.6%
associate-/r*45.8%
associate-*r/45.8%
*-commutative45.8%
times-frac55.5%
Simplified55.5%
add-cube-cbrt55.5%
pow255.5%
cbrt-div55.5%
unpow255.5%
cbrt-prod55.5%
unpow255.5%
unpow355.5%
add-cbrt-cube55.5%
cbrt-div55.5%
unpow255.5%
cbrt-prod63.4%
unpow263.4%
unpow363.4%
add-cbrt-cube89.7%
Applied egg-rr89.7%
unpow289.7%
unpow389.7%
Simplified89.7%
Final simplification82.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1e-8)
(/
2.0
(pow (* (/ (pow t_m 1.5) l) (* k (hypot 1.0 (hypot 1.0 (/ k t_m))))) 2.0))
(/ 2.0 (* (pow (* k (/ (sin k) l)) 2.0) (/ t_m (cos k)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1e-8) {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * hypot(1.0, hypot(1.0, (k / t_m))))), 2.0);
} else {
tmp = 2.0 / (pow((k * (sin(k) / l)), 2.0) * (t_m / cos(k)));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1e-8) {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.hypot(1.0, Math.hypot(1.0, (k / t_m))))), 2.0);
} else {
tmp = 2.0 / (Math.pow((k * (Math.sin(k) / l)), 2.0) * (t_m / Math.cos(k)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 1e-8: tmp = 2.0 / math.pow(((math.pow(t_m, 1.5) / l) * (k * math.hypot(1.0, math.hypot(1.0, (k / t_m))))), 2.0) else: tmp = 2.0 / (math.pow((k * (math.sin(k) / l)), 2.0) * (t_m / math.cos(k))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1e-8) tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * hypot(1.0, hypot(1.0, Float64(k / t_m))))) ^ 2.0)); else tmp = Float64(2.0 / Float64((Float64(k * Float64(sin(k) / l)) ^ 2.0) * Float64(t_m / cos(k)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 1e-8) tmp = 2.0 / ((((t_m ^ 1.5) / l) * (k * hypot(1.0, hypot(1.0, (k / t_m))))) ^ 2.0); else tmp = 2.0 / (((k * (sin(k) / l)) ^ 2.0) * (t_m / cos(k))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1e-8], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 10^{-8}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t\_m}{\cos k}}\\
\end{array}
\end{array}
if k < 1e-8Initial program 55.5%
Simplified55.5%
Applied egg-rr32.8%
Taylor expanded in k around 0 37.8%
if 1e-8 < k Initial program 47.8%
Simplified47.9%
Applied egg-rr17.5%
Taylor expanded in t around 0 35.7%
associate-/l*35.7%
Simplified35.7%
unpow-prod-down30.8%
pow230.8%
add-sqr-sqrt86.6%
Applied egg-rr86.6%
Final simplification48.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 3.4e-44)
(/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 2.0))
(/ 2.0 (* (pow (* k (/ (sin k) l)) 2.0) (/ t_m (cos k)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 3.4e-44) {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 2.0);
} else {
tmp = 2.0 / (pow((k * (sin(k) / l)), 2.0) * (t_m / cos(k)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 3.4d-44) then
tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) * (k * sqrt(2.0d0))) ** 2.0d0)
else
tmp = 2.0d0 / (((k * (sin(k) / l)) ** 2.0d0) * (t_m / cos(k)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 3.4e-44) {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 2.0);
} else {
tmp = 2.0 / (Math.pow((k * (Math.sin(k) / l)), 2.0) * (t_m / Math.cos(k)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 3.4e-44: tmp = 2.0 / math.pow(((math.pow(t_m, 1.5) / l) * (k * math.sqrt(2.0))), 2.0) else: tmp = 2.0 / (math.pow((k * (math.sin(k) / l)), 2.0) * (t_m / math.cos(k))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 3.4e-44) tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0)); else tmp = Float64(2.0 / Float64((Float64(k * Float64(sin(k) / l)) ^ 2.0) * Float64(t_m / cos(k)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 3.4e-44) tmp = 2.0 / ((((t_m ^ 1.5) / l) * (k * sqrt(2.0))) ^ 2.0); else tmp = 2.0 / (((k * (sin(k) / l)) ^ 2.0) * (t_m / cos(k))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 3.4e-44], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 3.4 \cdot 10^{-44}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \frac{\sin k}{\ell}\right)}^{2} \cdot \frac{t\_m}{\cos k}}\\
\end{array}
\end{array}
if k < 3.40000000000000016e-44Initial program 55.4%
Simplified55.4%
Applied egg-rr33.1%
Taylor expanded in k around 0 35.3%
if 3.40000000000000016e-44 < k Initial program 48.8%
Simplified48.9%
Applied egg-rr17.8%
Taylor expanded in t around 0 34.5%
associate-/l*34.5%
Simplified34.5%
unpow-prod-down30.0%
pow230.0%
add-sqr-sqrt84.6%
Applied egg-rr84.6%
Final simplification47.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 (<= t_m 2.2e-52)
(/ 2.0 (pow (* (sqrt t_m) (/ (pow k 2.0) l)) 2.0))
(/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 2.0)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.2e-52) {
tmp = 2.0 / pow((sqrt(t_m) * (pow(k, 2.0) / l)), 2.0);
} else {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 2.2d-52) then
tmp = 2.0d0 / ((sqrt(t_m) * ((k ** 2.0d0) / l)) ** 2.0d0)
else
tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) * (k * sqrt(2.0d0))) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.2e-52) {
tmp = 2.0 / Math.pow((Math.sqrt(t_m) * (Math.pow(k, 2.0) / l)), 2.0);
} else {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 2.2e-52: tmp = 2.0 / math.pow((math.sqrt(t_m) * (math.pow(k, 2.0) / l)), 2.0) else: tmp = 2.0 / math.pow(((math.pow(t_m, 1.5) / l) * (k * math.sqrt(2.0))), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 2.2e-52) tmp = Float64(2.0 / (Float64(sqrt(t_m) * Float64((k ^ 2.0) / l)) ^ 2.0)); else tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 2.2e-52) tmp = 2.0 / ((sqrt(t_m) * ((k ^ 2.0) / l)) ^ 2.0); else tmp = 2.0 / ((((t_m ^ 1.5) / l) * (k * sqrt(2.0))) ^ 2.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.2e-52], N[(2.0 / N[Power[N[(N[Sqrt[t$95$m], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $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 2.2 \cdot 10^{-52}:\\
\;\;\;\;\frac{2}{{\left(\sqrt{t\_m} \cdot \frac{{k}^{2}}{\ell}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\
\end{array}
\end{array}
if t < 2.20000000000000009e-52Initial program 49.3%
Simplified49.3%
Applied egg-rr18.3%
Taylor expanded in t around 0 35.6%
associate-/l*35.6%
Simplified35.6%
Taylor expanded in k around 0 24.0%
if 2.20000000000000009e-52 < t Initial program 64.1%
Simplified64.1%
Applied egg-rr54.4%
Taylor expanded in k around 0 71.1%
Final simplification38.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 (<= t_m 8.5e-20)
(/ 2.0 (pow (* (sqrt t_m) (/ (pow k 2.0) l)) 2.0))
(/
2.0
(* (/ (* (pow t_m 2.0) (* t_m (/ 1.0 l))) l) (* 2.0 (pow 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 (t_m <= 8.5e-20) {
tmp = 2.0 / pow((sqrt(t_m) * (pow(k, 2.0) / l)), 2.0);
} else {
tmp = 2.0 / (((pow(t_m, 2.0) * (t_m * (1.0 / l))) / l) * (2.0 * pow(k, 2.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 8.5d-20) then
tmp = 2.0d0 / ((sqrt(t_m) * ((k ** 2.0d0) / l)) ** 2.0d0)
else
tmp = 2.0d0 / ((((t_m ** 2.0d0) * (t_m * (1.0d0 / l))) / l) * (2.0d0 * (k ** 2.0d0)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 8.5e-20) {
tmp = 2.0 / Math.pow((Math.sqrt(t_m) * (Math.pow(k, 2.0) / l)), 2.0);
} else {
tmp = 2.0 / (((Math.pow(t_m, 2.0) * (t_m * (1.0 / l))) / l) * (2.0 * Math.pow(k, 2.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 8.5e-20: tmp = 2.0 / math.pow((math.sqrt(t_m) * (math.pow(k, 2.0) / l)), 2.0) else: tmp = 2.0 / (((math.pow(t_m, 2.0) * (t_m * (1.0 / l))) / l) * (2.0 * math.pow(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 (t_m <= 8.5e-20) tmp = Float64(2.0 / (Float64(sqrt(t_m) * Float64((k ^ 2.0) / l)) ^ 2.0)); else tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 2.0) * Float64(t_m * Float64(1.0 / l))) / l) * Float64(2.0 * (k ^ 2.0)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 8.5e-20) tmp = 2.0 / ((sqrt(t_m) * ((k ^ 2.0) / l)) ^ 2.0); else tmp = 2.0 / ((((t_m ^ 2.0) * (t_m * (1.0 / l))) / l) * (2.0 * (k ^ 2.0))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 8.5e-20], N[(2.0 / N[Power[N[(N[Sqrt[t$95$m], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m * N[(1.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(2.0 * N[Power[k, 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}\;t\_m \leq 8.5 \cdot 10^{-20}:\\
\;\;\;\;\frac{2}{{\left(\sqrt{t\_m} \cdot \frac{{k}^{2}}{\ell}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{2} \cdot \left(t\_m \cdot \frac{1}{\ell}\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}\\
\end{array}
\end{array}
if t < 8.5000000000000005e-20Initial program 49.8%
Simplified49.8%
Applied egg-rr20.2%
Taylor expanded in t around 0 36.6%
associate-/l*36.6%
Simplified36.6%
Taylor expanded in k around 0 25.5%
if 8.5000000000000005e-20 < t Initial program 64.4%
Simplified64.3%
Taylor expanded in k around 0 53.7%
div-inv64.4%
unpow364.4%
associate-*l*69.9%
pow269.9%
Applied egg-rr57.9%
Final simplification34.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 (* 2.0 (/ 1.0 (/ t_m (pow (/ l (pow k 2.0)) 2.0))))))
(*
t_s
(if (<= t_m 1.32e-20)
t_2
(if (<= t_m 5.6e+102)
(/ 2.0 (/ (* (pow t_m 3.0) (* 2.0 (/ (pow k 2.0) l))) l))
(if (<= t_m 4e+168)
t_2
(/ 2.0 (* (* (sin k) (/ (pow t_m 3.0) (* l l))) (* 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 = 2.0 * (1.0 / (t_m / pow((l / pow(k, 2.0)), 2.0)));
double tmp;
if (t_m <= 1.32e-20) {
tmp = t_2;
} else if (t_m <= 5.6e+102) {
tmp = 2.0 / ((pow(t_m, 3.0) * (2.0 * (pow(k, 2.0) / l))) / l);
} else if (t_m <= 4e+168) {
tmp = t_2;
} else {
tmp = 2.0 / ((sin(k) * (pow(t_m, 3.0) / (l * l))) * (2.0 * k));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: tmp
t_2 = 2.0d0 * (1.0d0 / (t_m / ((l / (k ** 2.0d0)) ** 2.0d0)))
if (t_m <= 1.32d-20) then
tmp = t_2
else if (t_m <= 5.6d+102) then
tmp = 2.0d0 / (((t_m ** 3.0d0) * (2.0d0 * ((k ** 2.0d0) / l))) / l)
else if (t_m <= 4d+168) then
tmp = t_2
else
tmp = 2.0d0 / ((sin(k) * ((t_m ** 3.0d0) / (l * l))) * (2.0d0 * k))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = 2.0 * (1.0 / (t_m / Math.pow((l / Math.pow(k, 2.0)), 2.0)));
double tmp;
if (t_m <= 1.32e-20) {
tmp = t_2;
} else if (t_m <= 5.6e+102) {
tmp = 2.0 / ((Math.pow(t_m, 3.0) * (2.0 * (Math.pow(k, 2.0) / l))) / l);
} else if (t_m <= 4e+168) {
tmp = t_2;
} else {
tmp = 2.0 / ((Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l))) * (2.0 * k));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = 2.0 * (1.0 / (t_m / math.pow((l / math.pow(k, 2.0)), 2.0))) tmp = 0 if t_m <= 1.32e-20: tmp = t_2 elif t_m <= 5.6e+102: tmp = 2.0 / ((math.pow(t_m, 3.0) * (2.0 * (math.pow(k, 2.0) / l))) / l) elif t_m <= 4e+168: tmp = t_2 else: tmp = 2.0 / ((math.sin(k) * (math.pow(t_m, 3.0) / (l * l))) * (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 = Float64(2.0 * Float64(1.0 / Float64(t_m / (Float64(l / (k ^ 2.0)) ^ 2.0)))) tmp = 0.0 if (t_m <= 1.32e-20) tmp = t_2; elseif (t_m <= 5.6e+102) tmp = Float64(2.0 / Float64(Float64((t_m ^ 3.0) * Float64(2.0 * Float64((k ^ 2.0) / l))) / l)); elseif (t_m <= 4e+168) tmp = t_2; else tmp = Float64(2.0 / Float64(Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l))) * Float64(2.0 * k))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = 2.0 * (1.0 / (t_m / ((l / (k ^ 2.0)) ^ 2.0))); tmp = 0.0; if (t_m <= 1.32e-20) tmp = t_2; elseif (t_m <= 5.6e+102) tmp = 2.0 / (((t_m ^ 3.0) * (2.0 * ((k ^ 2.0) / l))) / l); elseif (t_m <= 4e+168) tmp = t_2; else tmp = 2.0 / ((sin(k) * ((t_m ^ 3.0) / (l * l))) * (2.0 * k)); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(2.0 * N[(1.0 / N[(t$95$m / N[Power[N[(l / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.32e-20], t$95$2, If[LessEqual[t$95$m, 5.6e+102], N[(2.0 / N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(2.0 * N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4e+168], t$95$2, N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $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 := 2 \cdot \frac{1}{\frac{t\_m}{{\left(\frac{\ell}{{k}^{2}}\right)}^{2}}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.32 \cdot 10^{-20}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_m \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{3} \cdot \left(2 \cdot \frac{{k}^{2}}{\ell}\right)}{\ell}}\\
\mathbf{elif}\;t\_m \leq 4 \cdot 10^{+168}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right) \cdot \left(2 \cdot k\right)}\\
\end{array}
\end{array}
\end{array}
if t < 1.32000000000000004e-20 or 5.60000000000000037e102 < t < 3.9999999999999997e168Initial program 48.6%
Simplified48.6%
Applied egg-rr22.6%
Taylor expanded in t around 0 36.7%
associate-/l*36.7%
Simplified36.7%
Taylor expanded in k around 0 55.8%
associate-/r*56.3%
Simplified56.3%
clear-num56.3%
inv-pow56.3%
add-sqr-sqrt56.3%
pow256.3%
sqrt-div56.3%
sqrt-pow162.3%
metadata-eval62.3%
pow162.3%
sqrt-pow164.3%
metadata-eval64.3%
Applied egg-rr64.3%
unpow-164.3%
Simplified64.3%
if 1.32000000000000004e-20 < t < 5.60000000000000037e102Initial program 72.5%
Simplified78.0%
Taylor expanded in k around 0 53.7%
associate-*l/59.5%
Applied egg-rr59.5%
associate-/l*59.6%
Simplified59.6%
associate-*l/59.8%
associate-/l*59.8%
Applied egg-rr59.8%
if 3.9999999999999997e168 < t Initial program 69.5%
Simplified69.5%
Taylor expanded in k around 0 69.5%
Final simplification64.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (or (<= t_m 7.2e-20) (and (not (<= t_m 1.25e+91)) (<= t_m 1.9e+172)))
(* 2.0 (/ 1.0 (/ t_m (pow (/ l (pow k 2.0)) 2.0))))
(/ 2.0 (* (* 2.0 (pow k 2.0)) (/ (/ (pow t_m 3.0) l) l))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if ((t_m <= 7.2e-20) || (!(t_m <= 1.25e+91) && (t_m <= 1.9e+172))) {
tmp = 2.0 * (1.0 / (t_m / pow((l / pow(k, 2.0)), 2.0)));
} else {
tmp = 2.0 / ((2.0 * pow(k, 2.0)) * ((pow(t_m, 3.0) / l) / l));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((t_m <= 7.2d-20) .or. (.not. (t_m <= 1.25d+91)) .and. (t_m <= 1.9d+172)) then
tmp = 2.0d0 * (1.0d0 / (t_m / ((l / (k ** 2.0d0)) ** 2.0d0)))
else
tmp = 2.0d0 / ((2.0d0 * (k ** 2.0d0)) * (((t_m ** 3.0d0) / l) / l))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if ((t_m <= 7.2e-20) || (!(t_m <= 1.25e+91) && (t_m <= 1.9e+172))) {
tmp = 2.0 * (1.0 / (t_m / Math.pow((l / Math.pow(k, 2.0)), 2.0)));
} else {
tmp = 2.0 / ((2.0 * Math.pow(k, 2.0)) * ((Math.pow(t_m, 3.0) / l) / l));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if (t_m <= 7.2e-20) or (not (t_m <= 1.25e+91) and (t_m <= 1.9e+172)): tmp = 2.0 * (1.0 / (t_m / math.pow((l / math.pow(k, 2.0)), 2.0))) else: tmp = 2.0 / ((2.0 * math.pow(k, 2.0)) * ((math.pow(t_m, 3.0) / l) / l)) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if ((t_m <= 7.2e-20) || (!(t_m <= 1.25e+91) && (t_m <= 1.9e+172))) tmp = Float64(2.0 * Float64(1.0 / Float64(t_m / (Float64(l / (k ^ 2.0)) ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64(Float64((t_m ^ 3.0) / l) / l))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if ((t_m <= 7.2e-20) || (~((t_m <= 1.25e+91)) && (t_m <= 1.9e+172))) tmp = 2.0 * (1.0 / (t_m / ((l / (k ^ 2.0)) ^ 2.0))); else tmp = 2.0 / ((2.0 * (k ^ 2.0)) * (((t_m ^ 3.0) / l) / l)); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[Or[LessEqual[t$95$m, 7.2e-20], And[N[Not[LessEqual[t$95$m, 1.25e+91]], $MachinePrecision], LessEqual[t$95$m, 1.9e+172]]], N[(2.0 * N[(1.0 / N[(t$95$m / N[Power[N[(l / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $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 7.2 \cdot 10^{-20} \lor \neg \left(t\_m \leq 1.25 \cdot 10^{+91}\right) \land t\_m \leq 1.9 \cdot 10^{+172}:\\
\;\;\;\;2 \cdot \frac{1}{\frac{t\_m}{{\left(\frac{\ell}{{k}^{2}}\right)}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{\frac{{t\_m}^{3}}{\ell}}{\ell}}\\
\end{array}
\end{array}
if t < 7.19999999999999948e-20 or 1.2500000000000001e91 < t < 1.89999999999999985e172Initial program 48.4%
Simplified48.4%
Applied egg-rr23.2%
Taylor expanded in t around 0 36.7%
associate-/l*36.7%
Simplified36.7%
Taylor expanded in k around 0 55.0%
associate-/r*55.5%
Simplified55.5%
clear-num55.5%
inv-pow55.5%
add-sqr-sqrt55.5%
pow255.5%
sqrt-div55.5%
sqrt-pow161.5%
metadata-eval61.5%
pow161.5%
sqrt-pow163.4%
metadata-eval63.4%
Applied egg-rr63.4%
unpow-163.4%
Simplified63.4%
if 7.19999999999999948e-20 < t < 1.2500000000000001e91 or 1.89999999999999985e172 < t Initial program 72.9%
Simplified71.1%
Taylor expanded in k around 0 61.1%
Final simplification62.9%
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 t_m 3.0) l))
(t_3 (* 2.0 (/ 1.0 (/ t_m (pow (/ l (pow k 2.0)) 2.0)))))
(t_4 (* 2.0 (pow k 2.0))))
(*
t_s
(if (<= t_m 1.5e-20)
t_3
(if (<= t_m 1.25e+91)
(/ 2.0 (* t_2 (/ t_4 l)))
(if (<= t_m 1.9e+169) t_3 (/ 2.0 (* t_4 (/ t_2 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(t_m, 3.0) / l;
double t_3 = 2.0 * (1.0 / (t_m / pow((l / pow(k, 2.0)), 2.0)));
double t_4 = 2.0 * pow(k, 2.0);
double tmp;
if (t_m <= 1.5e-20) {
tmp = t_3;
} else if (t_m <= 1.25e+91) {
tmp = 2.0 / (t_2 * (t_4 / l));
} else if (t_m <= 1.9e+169) {
tmp = t_3;
} else {
tmp = 2.0 / (t_4 * (t_2 / 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) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_2 = (t_m ** 3.0d0) / l
t_3 = 2.0d0 * (1.0d0 / (t_m / ((l / (k ** 2.0d0)) ** 2.0d0)))
t_4 = 2.0d0 * (k ** 2.0d0)
if (t_m <= 1.5d-20) then
tmp = t_3
else if (t_m <= 1.25d+91) then
tmp = 2.0d0 / (t_2 * (t_4 / l))
else if (t_m <= 1.9d+169) then
tmp = t_3
else
tmp = 2.0d0 / (t_4 * (t_2 / 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 t_2 = Math.pow(t_m, 3.0) / l;
double t_3 = 2.0 * (1.0 / (t_m / Math.pow((l / Math.pow(k, 2.0)), 2.0)));
double t_4 = 2.0 * Math.pow(k, 2.0);
double tmp;
if (t_m <= 1.5e-20) {
tmp = t_3;
} else if (t_m <= 1.25e+91) {
tmp = 2.0 / (t_2 * (t_4 / l));
} else if (t_m <= 1.9e+169) {
tmp = t_3;
} else {
tmp = 2.0 / (t_4 * (t_2 / 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): t_2 = math.pow(t_m, 3.0) / l t_3 = 2.0 * (1.0 / (t_m / math.pow((l / math.pow(k, 2.0)), 2.0))) t_4 = 2.0 * math.pow(k, 2.0) tmp = 0 if t_m <= 1.5e-20: tmp = t_3 elif t_m <= 1.25e+91: tmp = 2.0 / (t_2 * (t_4 / l)) elif t_m <= 1.9e+169: tmp = t_3 else: tmp = 2.0 / (t_4 * (t_2 / 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((t_m ^ 3.0) / l) t_3 = Float64(2.0 * Float64(1.0 / Float64(t_m / (Float64(l / (k ^ 2.0)) ^ 2.0)))) t_4 = Float64(2.0 * (k ^ 2.0)) tmp = 0.0 if (t_m <= 1.5e-20) tmp = t_3; elseif (t_m <= 1.25e+91) tmp = Float64(2.0 / Float64(t_2 * Float64(t_4 / l))); elseif (t_m <= 1.9e+169) tmp = t_3; else tmp = Float64(2.0 / Float64(t_4 * Float64(t_2 / 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) t_2 = (t_m ^ 3.0) / l; t_3 = 2.0 * (1.0 / (t_m / ((l / (k ^ 2.0)) ^ 2.0))); t_4 = 2.0 * (k ^ 2.0); tmp = 0.0; if (t_m <= 1.5e-20) tmp = t_3; elseif (t_m <= 1.25e+91) tmp = 2.0 / (t_2 * (t_4 / l)); elseif (t_m <= 1.9e+169) tmp = t_3; else tmp = 2.0 / (t_4 * (t_2 / 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_] := Block[{t$95$2 = N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * N[(1.0 / N[(t$95$m / N[Power[N[(l / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.5e-20], t$95$3, If[LessEqual[t$95$m, 1.25e+91], N[(2.0 / N[(t$95$2 * N[(t$95$4 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.9e+169], t$95$3, N[(2.0 / N[(t$95$4 * N[(t$95$2 / l), $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{{t\_m}^{3}}{\ell}\\
t_3 := 2 \cdot \frac{1}{\frac{t\_m}{{\left(\frac{\ell}{{k}^{2}}\right)}^{2}}}\\
t_4 := 2 \cdot {k}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.5 \cdot 10^{-20}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_m \leq 1.25 \cdot 10^{+91}:\\
\;\;\;\;\frac{2}{t\_2 \cdot \frac{t\_4}{\ell}}\\
\mathbf{elif}\;t\_m \leq 1.9 \cdot 10^{+169}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_4 \cdot \frac{t\_2}{\ell}}\\
\end{array}
\end{array}
\end{array}
if t < 1.50000000000000014e-20 or 1.2500000000000001e91 < t < 1.89999999999999996e169Initial program 48.4%
Simplified48.4%
Applied egg-rr23.2%
Taylor expanded in t around 0 36.7%
associate-/l*36.7%
Simplified36.7%
Taylor expanded in k around 0 55.0%
associate-/r*55.5%
Simplified55.5%
clear-num55.5%
inv-pow55.5%
add-sqr-sqrt55.5%
pow255.5%
sqrt-div55.5%
sqrt-pow161.5%
metadata-eval61.5%
pow161.5%
sqrt-pow163.4%
metadata-eval63.4%
Applied egg-rr63.4%
unpow-163.4%
Simplified63.4%
if 1.50000000000000014e-20 < t < 1.2500000000000001e91Initial program 76.4%
Simplified79.3%
Taylor expanded in k around 0 58.9%
associate-*l/65.3%
Applied egg-rr65.3%
associate-/l*65.4%
Simplified65.4%
if 1.89999999999999996e169 < t Initial program 69.5%
Simplified63.3%
Taylor expanded in k around 0 63.3%
Final simplification63.6%
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 (/ 1.0 (/ t_m (pow (/ l (pow k 2.0)) 2.0))))))
(*
t_s
(if (<= t_m 1.32e-20)
t_2
(if (<= t_m 5.6e+102)
(/ 2.0 (/ (* (pow t_m 3.0) (* 2.0 (/ (pow k 2.0) l))) l))
(if (<= t_m 4.45e+170)
t_2
(/ 2.0 (* (* 2.0 (pow k 2.0)) (/ (/ (pow t_m 3.0) l) l)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = 2.0 * (1.0 / (t_m / pow((l / pow(k, 2.0)), 2.0)));
double tmp;
if (t_m <= 1.32e-20) {
tmp = t_2;
} else if (t_m <= 5.6e+102) {
tmp = 2.0 / ((pow(t_m, 3.0) * (2.0 * (pow(k, 2.0) / l))) / l);
} else if (t_m <= 4.45e+170) {
tmp = t_2;
} else {
tmp = 2.0 / ((2.0 * pow(k, 2.0)) * ((pow(t_m, 3.0) / l) / l));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: tmp
t_2 = 2.0d0 * (1.0d0 / (t_m / ((l / (k ** 2.0d0)) ** 2.0d0)))
if (t_m <= 1.32d-20) then
tmp = t_2
else if (t_m <= 5.6d+102) then
tmp = 2.0d0 / (((t_m ** 3.0d0) * (2.0d0 * ((k ** 2.0d0) / l))) / l)
else if (t_m <= 4.45d+170) then
tmp = t_2
else
tmp = 2.0d0 / ((2.0d0 * (k ** 2.0d0)) * (((t_m ** 3.0d0) / l) / l))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = 2.0 * (1.0 / (t_m / Math.pow((l / Math.pow(k, 2.0)), 2.0)));
double tmp;
if (t_m <= 1.32e-20) {
tmp = t_2;
} else if (t_m <= 5.6e+102) {
tmp = 2.0 / ((Math.pow(t_m, 3.0) * (2.0 * (Math.pow(k, 2.0) / l))) / l);
} else if (t_m <= 4.45e+170) {
tmp = t_2;
} else {
tmp = 2.0 / ((2.0 * Math.pow(k, 2.0)) * ((Math.pow(t_m, 3.0) / l) / l));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = 2.0 * (1.0 / (t_m / math.pow((l / math.pow(k, 2.0)), 2.0))) tmp = 0 if t_m <= 1.32e-20: tmp = t_2 elif t_m <= 5.6e+102: tmp = 2.0 / ((math.pow(t_m, 3.0) * (2.0 * (math.pow(k, 2.0) / l))) / l) elif t_m <= 4.45e+170: tmp = t_2 else: tmp = 2.0 / ((2.0 * math.pow(k, 2.0)) * ((math.pow(t_m, 3.0) / l) / l)) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(2.0 * Float64(1.0 / Float64(t_m / (Float64(l / (k ^ 2.0)) ^ 2.0)))) tmp = 0.0 if (t_m <= 1.32e-20) tmp = t_2; elseif (t_m <= 5.6e+102) tmp = Float64(2.0 / Float64(Float64((t_m ^ 3.0) * Float64(2.0 * Float64((k ^ 2.0) / l))) / l)); elseif (t_m <= 4.45e+170) tmp = t_2; else tmp = Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64(Float64((t_m ^ 3.0) / l) / l))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = 2.0 * (1.0 / (t_m / ((l / (k ^ 2.0)) ^ 2.0))); tmp = 0.0; if (t_m <= 1.32e-20) tmp = t_2; elseif (t_m <= 5.6e+102) tmp = 2.0 / (((t_m ^ 3.0) * (2.0 * ((k ^ 2.0) / l))) / l); elseif (t_m <= 4.45e+170) tmp = t_2; else tmp = 2.0 / ((2.0 * (k ^ 2.0)) * (((t_m ^ 3.0) / l) / l)); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(2.0 * N[(1.0 / N[(t$95$m / N[Power[N[(l / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.32e-20], t$95$2, If[LessEqual[t$95$m, 5.6e+102], N[(2.0 / N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(2.0 * N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.45e+170], t$95$2, N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $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 := 2 \cdot \frac{1}{\frac{t\_m}{{\left(\frac{\ell}{{k}^{2}}\right)}^{2}}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.32 \cdot 10^{-20}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_m \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{3} \cdot \left(2 \cdot \frac{{k}^{2}}{\ell}\right)}{\ell}}\\
\mathbf{elif}\;t\_m \leq 4.45 \cdot 10^{+170}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{\frac{{t\_m}^{3}}{\ell}}{\ell}}\\
\end{array}
\end{array}
\end{array}
if t < 1.32000000000000004e-20 or 5.60000000000000037e102 < t < 4.45e170Initial program 48.6%
Simplified48.6%
Applied egg-rr22.6%
Taylor expanded in t around 0 36.7%
associate-/l*36.7%
Simplified36.7%
Taylor expanded in k around 0 55.8%
associate-/r*56.3%
Simplified56.3%
clear-num56.3%
inv-pow56.3%
add-sqr-sqrt56.3%
pow256.3%
sqrt-div56.3%
sqrt-pow162.3%
metadata-eval62.3%
pow162.3%
sqrt-pow164.3%
metadata-eval64.3%
Applied egg-rr64.3%
unpow-164.3%
Simplified64.3%
if 1.32000000000000004e-20 < t < 5.60000000000000037e102Initial program 72.5%
Simplified78.0%
Taylor expanded in k around 0 53.7%
associate-*l/59.5%
Applied egg-rr59.5%
associate-/l*59.6%
Simplified59.6%
associate-*l/59.8%
associate-/l*59.8%
Applied egg-rr59.8%
if 4.45e170 < t Initial program 69.5%
Simplified63.3%
Taylor expanded in k around 0 63.3%
Final simplification63.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 6.5e-19)
(* 2.0 (/ 1.0 (/ t_m (pow (/ l (pow k 2.0)) 2.0))))
(/
2.0
(* (/ (* (pow t_m 2.0) (* t_m (/ 1.0 l))) l) (* 2.0 (pow 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 (t_m <= 6.5e-19) {
tmp = 2.0 * (1.0 / (t_m / pow((l / pow(k, 2.0)), 2.0)));
} else {
tmp = 2.0 / (((pow(t_m, 2.0) * (t_m * (1.0 / l))) / l) * (2.0 * pow(k, 2.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 6.5d-19) then
tmp = 2.0d0 * (1.0d0 / (t_m / ((l / (k ** 2.0d0)) ** 2.0d0)))
else
tmp = 2.0d0 / ((((t_m ** 2.0d0) * (t_m * (1.0d0 / l))) / l) * (2.0d0 * (k ** 2.0d0)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 6.5e-19) {
tmp = 2.0 * (1.0 / (t_m / Math.pow((l / Math.pow(k, 2.0)), 2.0)));
} else {
tmp = 2.0 / (((Math.pow(t_m, 2.0) * (t_m * (1.0 / l))) / l) * (2.0 * Math.pow(k, 2.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 6.5e-19: tmp = 2.0 * (1.0 / (t_m / math.pow((l / math.pow(k, 2.0)), 2.0))) else: tmp = 2.0 / (((math.pow(t_m, 2.0) * (t_m * (1.0 / l))) / l) * (2.0 * math.pow(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 (t_m <= 6.5e-19) tmp = Float64(2.0 * Float64(1.0 / Float64(t_m / (Float64(l / (k ^ 2.0)) ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 2.0) * Float64(t_m * Float64(1.0 / l))) / l) * Float64(2.0 * (k ^ 2.0)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 6.5e-19) tmp = 2.0 * (1.0 / (t_m / ((l / (k ^ 2.0)) ^ 2.0))); else tmp = 2.0 / ((((t_m ^ 2.0) * (t_m * (1.0 / l))) / l) * (2.0 * (k ^ 2.0))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 6.5e-19], N[(2.0 * N[(1.0 / N[(t$95$m / N[Power[N[(l / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m * N[(1.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(2.0 * N[Power[k, 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}\;t\_m \leq 6.5 \cdot 10^{-19}:\\
\;\;\;\;2 \cdot \frac{1}{\frac{t\_m}{{\left(\frac{\ell}{{k}^{2}}\right)}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{2} \cdot \left(t\_m \cdot \frac{1}{\ell}\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}\\
\end{array}
\end{array}
if t < 6.5000000000000001e-19Initial program 49.8%
Simplified49.8%
Applied egg-rr20.2%
Taylor expanded in t around 0 36.6%
associate-/l*36.6%
Simplified36.6%
Taylor expanded in k around 0 56.9%
associate-/r*57.4%
Simplified57.4%
clear-num57.4%
inv-pow57.4%
add-sqr-sqrt57.4%
pow257.4%
sqrt-div57.4%
sqrt-pow163.2%
metadata-eval63.2%
pow163.2%
sqrt-pow165.3%
metadata-eval65.3%
Applied egg-rr65.3%
unpow-165.3%
Simplified65.3%
if 6.5000000000000001e-19 < t Initial program 64.4%
Simplified64.3%
Taylor expanded in k around 0 53.7%
div-inv64.4%
unpow364.4%
associate-*l*69.9%
pow269.9%
Applied egg-rr57.9%
Final simplification63.2%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 6.2e-20)
(* 2.0 (/ 1.0 (/ t_m (pow (/ l (pow k 2.0)) 2.0))))
(/ 2.0 (* (* 2.0 (pow k 2.0)) (* (pow t_m 2.0) (/ (/ t_m l) l)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 6.2e-20) {
tmp = 2.0 * (1.0 / (t_m / pow((l / pow(k, 2.0)), 2.0)));
} else {
tmp = 2.0 / ((2.0 * pow(k, 2.0)) * (pow(t_m, 2.0) * ((t_m / l) / l)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 6.2d-20) then
tmp = 2.0d0 * (1.0d0 / (t_m / ((l / (k ** 2.0d0)) ** 2.0d0)))
else
tmp = 2.0d0 / ((2.0d0 * (k ** 2.0d0)) * ((t_m ** 2.0d0) * ((t_m / l) / l)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 6.2e-20) {
tmp = 2.0 * (1.0 / (t_m / Math.pow((l / Math.pow(k, 2.0)), 2.0)));
} else {
tmp = 2.0 / ((2.0 * Math.pow(k, 2.0)) * (Math.pow(t_m, 2.0) * ((t_m / l) / l)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 6.2e-20: tmp = 2.0 * (1.0 / (t_m / math.pow((l / math.pow(k, 2.0)), 2.0))) else: tmp = 2.0 / ((2.0 * math.pow(k, 2.0)) * (math.pow(t_m, 2.0) * ((t_m / l) / l))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 6.2e-20) tmp = Float64(2.0 * Float64(1.0 / Float64(t_m / (Float64(l / (k ^ 2.0)) ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64((t_m ^ 2.0) * Float64(Float64(t_m / l) / l)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 6.2e-20) tmp = 2.0 * (1.0 / (t_m / ((l / (k ^ 2.0)) ^ 2.0))); else tmp = 2.0 / ((2.0 * (k ^ 2.0)) * ((t_m ^ 2.0) * ((t_m / l) / l))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 6.2e-20], N[(2.0 * N[(1.0 / N[(t$95$m / N[Power[N[(l / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(N[(t$95$m / l), $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 \begin{array}{l}
\mathbf{if}\;t\_m \leq 6.2 \cdot 10^{-20}:\\
\;\;\;\;2 \cdot \frac{1}{\frac{t\_m}{{\left(\frac{\ell}{{k}^{2}}\right)}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \left({t\_m}^{2} \cdot \frac{\frac{t\_m}{\ell}}{\ell}\right)}\\
\end{array}
\end{array}
if t < 6.19999999999999999e-20Initial program 49.8%
Simplified49.8%
Applied egg-rr20.2%
Taylor expanded in t around 0 36.6%
associate-/l*36.6%
Simplified36.6%
Taylor expanded in k around 0 56.9%
associate-/r*57.4%
Simplified57.4%
clear-num57.4%
inv-pow57.4%
add-sqr-sqrt57.4%
pow257.4%
sqrt-div57.4%
sqrt-pow163.2%
metadata-eval63.2%
pow163.2%
sqrt-pow165.3%
metadata-eval65.3%
Applied egg-rr65.3%
unpow-165.3%
Simplified65.3%
if 6.19999999999999999e-20 < t Initial program 64.4%
Simplified64.3%
div-inv64.4%
unpow364.4%
associate-*l*69.9%
pow269.9%
Applied egg-rr69.9%
associate-/l*67.1%
un-div-inv67.1%
Applied egg-rr67.1%
Taylor expanded in k around 0 57.7%
Final simplification63.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 (/ 1.0 (/ t_m (pow (/ l (pow k 2.0)) 2.0))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 * (1.0 / (t_m / pow((l / pow(k, 2.0)), 2.0))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 * (1.0d0 / (t_m / ((l / (k ** 2.0d0)) ** 2.0d0))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 * (1.0 / (t_m / Math.pow((l / Math.pow(k, 2.0)), 2.0))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 * (1.0 / (t_m / math.pow((l / math.pow(k, 2.0)), 2.0))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 * Float64(1.0 / Float64(t_m / (Float64(l / (k ^ 2.0)) ^ 2.0))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 * (1.0 / (t_m / ((l / (k ^ 2.0)) ^ 2.0)))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 * N[(1.0 / N[(t$95$m / N[Power[N[(l / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(2 \cdot \frac{1}{\frac{t\_m}{{\left(\frac{\ell}{{k}^{2}}\right)}^{2}}}\right)
\end{array}
Initial program 53.8%
Simplified53.9%
Applied egg-rr29.5%
Taylor expanded in t around 0 35.4%
associate-/l*35.4%
Simplified35.4%
Taylor expanded in k around 0 52.4%
associate-/r*52.8%
Simplified52.8%
clear-num52.8%
inv-pow52.8%
add-sqr-sqrt52.8%
pow252.8%
sqrt-div52.8%
sqrt-pow157.9%
metadata-eval57.9%
pow157.9%
sqrt-pow159.5%
metadata-eval59.5%
Applied egg-rr59.5%
unpow-159.5%
Simplified59.5%
Final simplification59.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 (* 2.0 (/ (* (pow l 2.0) (pow k -4.0)) t_m))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 * ((pow(l, 2.0) * pow(k, -4.0)) / t_m));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 * (((l ** 2.0d0) * (k ** (-4.0d0))) / t_m))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 * ((Math.pow(l, 2.0) * Math.pow(k, -4.0)) / t_m));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 * ((math.pow(l, 2.0) * math.pow(k, -4.0)) / t_m))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 * Float64(Float64((l ^ 2.0) * (k ^ -4.0)) / t_m))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 * (((l ^ 2.0) * (k ^ -4.0)) / t_m)); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Power[k, -4.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(2 \cdot \frac{{\ell}^{2} \cdot {k}^{-4}}{t\_m}\right)
\end{array}
Initial program 53.8%
Simplified53.9%
Applied egg-rr29.5%
Taylor expanded in t around 0 35.4%
associate-/l*35.4%
Simplified35.4%
Taylor expanded in k around 0 52.4%
associate-/r*52.8%
Simplified52.8%
div-inv52.4%
pow-flip52.4%
metadata-eval52.4%
Applied egg-rr52.4%
Final simplification52.4%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* 2.0 (/ (/ (pow l 2.0) (pow k 4.0)) t_m))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 * ((pow(l, 2.0) / pow(k, 4.0)) / t_m));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 * (((l ** 2.0d0) / (k ** 4.0d0)) / t_m))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 4.0)) / t_m));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 * ((math.pow(l, 2.0) / math.pow(k, 4.0)) / t_m))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 4.0)) / t_m))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 * (((l ^ 2.0) / (k ^ 4.0)) / t_m)); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t\_m}\right)
\end{array}
Initial program 53.8%
Simplified53.9%
Applied egg-rr29.5%
Taylor expanded in t around 0 35.4%
associate-/l*35.4%
Simplified35.4%
Taylor expanded in k around 0 52.4%
associate-/r*52.8%
Simplified52.8%
Final simplification52.8%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 2.0 (* (pow k 4.0) (/ t_m (pow l 2.0))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / (pow(k, 4.0) * (t_m / pow(l, 2.0))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / ((k ** 4.0d0) * (t_m / (l ** 2.0d0))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / (Math.pow(k, 4.0) * (t_m / Math.pow(l, 2.0))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / (math.pow(k, 4.0) * (t_m / math.pow(l, 2.0))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64((k ^ 4.0) * Float64(t_m / (l ^ 2.0))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / ((k ^ 4.0) * (t_m / (l ^ 2.0)))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[Power[k, 4.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{2}{{k}^{4} \cdot \frac{t\_m}{{\ell}^{2}}}
\end{array}
Initial program 53.8%
Simplified53.9%
Applied egg-rr29.5%
Taylor expanded in t around 0 35.4%
associate-/l*35.4%
Simplified35.4%
Taylor expanded in k around 0 52.4%
associate-/l*53.9%
Simplified53.9%
Final simplification53.9%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ (* 2.0 (pow (/ l (pow k 2.0)) 2.0)) t_m)))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * ((2.0 * pow((l / pow(k, 2.0)), 2.0)) / t_m);
}
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 / (k ** 2.0d0)) ** 2.0d0)) / t_m)
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * ((2.0 * Math.pow((l / Math.pow(k, 2.0)), 2.0)) / t_m);
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * ((2.0 * math.pow((l / math.pow(k, 2.0)), 2.0)) / t_m)
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(Float64(2.0 * (Float64(l / (k ^ 2.0)) ^ 2.0)) / t_m)) 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 / (k ^ 2.0)) ^ 2.0)) / t_m); 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[(N[(2.0 * N[Power[N[(l / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{2 \cdot {\left(\frac{\ell}{{k}^{2}}\right)}^{2}}{t\_m}
\end{array}
Initial program 53.8%
Simplified53.9%
Applied egg-rr29.5%
Taylor expanded in t around 0 35.4%
associate-/l*35.4%
Simplified35.4%
Taylor expanded in k around 0 52.4%
associate-/r*52.8%
Simplified52.8%
associate-*r/52.8%
add-sqr-sqrt52.8%
pow252.8%
sqrt-div52.8%
sqrt-pow157.9%
metadata-eval57.9%
pow157.9%
sqrt-pow159.5%
metadata-eval59.5%
Applied egg-rr59.5%
Final simplification59.5%
herbie shell --seed 2024079
(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))))