
(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 18 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.2e-34)
(/ 2.0 (* (* (sin k) (tan k)) (pow (* (/ k l) (sqrt t_m)) 2.0)))
(/
2.0
(*
(pow (/ (* t_m (cbrt (sin k))) (pow (cbrt l) 2.0)) 3.0)
(* (tan k) (+ 2.0 (pow (/ k t_m) 2.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 7.2e-34) {
tmp = 2.0 / ((sin(k) * tan(k)) * pow(((k / l) * sqrt(t_m)), 2.0));
} else {
tmp = 2.0 / (pow(((t_m * cbrt(sin(k))) / pow(cbrt(l), 2.0)), 3.0) * (tan(k) * (2.0 + pow((k / t_m), 2.0))));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 7.2e-34) {
tmp = 2.0 / ((Math.sin(k) * Math.tan(k)) * Math.pow(((k / l) * Math.sqrt(t_m)), 2.0));
} else {
tmp = 2.0 / (Math.pow(((t_m * Math.cbrt(Math.sin(k))) / Math.pow(Math.cbrt(l), 2.0)), 3.0) * (Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 7.2e-34) tmp = Float64(2.0 / Float64(Float64(sin(k) * tan(k)) * (Float64(Float64(k / l) * sqrt(t_m)) ^ 2.0))); else tmp = Float64(2.0 / Float64((Float64(Float64(t_m * cbrt(sin(k))) / (cbrt(l) ^ 2.0)) ^ 3.0) * Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 7.2e-34], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(k / l), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 7.2 \cdot 10^{-34}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{k}{\ell} \cdot \sqrt{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m \cdot \sqrt[3]{\sin k}}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)}\\
\end{array}
\end{array}
if t < 7.20000000000000016e-34Initial program 47.8%
Simplified48.1%
associate-*l*45.7%
associate-/r*53.0%
associate-+r+53.0%
metadata-eval53.0%
associate-*l*53.0%
add-sqr-sqrt23.4%
pow223.4%
Applied egg-rr19.9%
associate-*r*19.9%
Simplified19.9%
Taylor expanded in t around 0 24.3%
associate-*l/24.3%
Simplified24.3%
add-cbrt-cube21.7%
pow321.7%
*-commutative21.7%
unpow-prod-down21.7%
pow221.7%
add-sqr-sqrt27.7%
associate-/l*27.7%
Applied egg-rr27.7%
rem-cbrt-cube32.6%
associate-*l*32.6%
Applied egg-rr32.6%
associate-*r*32.6%
associate-*r/33.1%
associate-*l/33.1%
Simplified33.1%
if 7.20000000000000016e-34 < t Initial program 65.1%
Simplified65.1%
add-cube-cbrt65.1%
pow365.0%
associate-/r*71.0%
*-commutative71.0%
cbrt-prod70.9%
associate-/r*64.9%
cbrt-div67.4%
rem-cbrt-cube73.2%
cbrt-prod93.1%
pow293.1%
Applied egg-rr93.1%
associate-*r/93.3%
Applied egg-rr93.3%
pow193.3%
associate-+r+93.3%
metadata-eval93.3%
Applied egg-rr93.3%
unpow193.3%
Simplified93.3%
Final simplification50.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 (* (sin k) (tan k))))
(*
t_s
(if (<= k 2.9e-141)
(/
2.0
(* (pow (/ (* t_m (cbrt (sin k))) (pow (cbrt l) 2.0)) 3.0) (* 2.0 k)))
(if (<= k 8.5e-6)
(/
2.0
(pow
(*
(* (/ (pow t_m 1.5) l) (hypot 1.0 (hypot 1.0 (/ k t_m))))
(sqrt t_2))
2.0))
(/ 2.0 (* t_2 (pow (* (/ k l) (sqrt 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 t_2 = sin(k) * tan(k);
double tmp;
if (k <= 2.9e-141) {
tmp = 2.0 / (pow(((t_m * cbrt(sin(k))) / pow(cbrt(l), 2.0)), 3.0) * (2.0 * k));
} else if (k <= 8.5e-6) {
tmp = 2.0 / pow((((pow(t_m, 1.5) / l) * hypot(1.0, hypot(1.0, (k / t_m)))) * sqrt(t_2)), 2.0);
} else {
tmp = 2.0 / (t_2 * pow(((k / l) * sqrt(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 t_2 = Math.sin(k) * Math.tan(k);
double tmp;
if (k <= 2.9e-141) {
tmp = 2.0 / (Math.pow(((t_m * Math.cbrt(Math.sin(k))) / Math.pow(Math.cbrt(l), 2.0)), 3.0) * (2.0 * k));
} else if (k <= 8.5e-6) {
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(t_2)), 2.0);
} else {
tmp = 2.0 / (t_2 * Math.pow(((k / l) * Math.sqrt(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) t_2 = Float64(sin(k) * tan(k)) tmp = 0.0 if (k <= 2.9e-141) tmp = Float64(2.0 / Float64((Float64(Float64(t_m * cbrt(sin(k))) / (cbrt(l) ^ 2.0)) ^ 3.0) * Float64(2.0 * k))); elseif (k <= 8.5e-6) tmp = Float64(2.0 / (Float64(Float64(Float64((t_m ^ 1.5) / l) * hypot(1.0, hypot(1.0, Float64(k / t_m)))) * sqrt(t_2)) ^ 2.0)); else tmp = Float64(2.0 / Float64(t_2 * (Float64(Float64(k / l) * sqrt(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_] := Block[{t$95$2 = N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 2.9e-141], N[(2.0 / N[(N[Power[N[(N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 8.5e-6], N[(2.0 / N[Power[N[(N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] * N[Sqrt[t$95$2], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$2 * N[Power[N[(N[(k / l), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $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 := \sin k \cdot \tan k\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2.9 \cdot 10^{-141}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m \cdot \sqrt[3]{\sin k}}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot k\right)}\\
\mathbf{elif}\;k \leq 8.5 \cdot 10^{-6}:\\
\;\;\;\;\frac{2}{{\left(\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\right) \cdot \sqrt{t\_2}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_2 \cdot {\left(\frac{k}{\ell} \cdot \sqrt{t\_m}\right)}^{2}}\\
\end{array}
\end{array}
\end{array}
if k < 2.9e-141Initial program 58.7%
Simplified58.7%
add-cube-cbrt58.6%
pow358.7%
associate-/r*65.3%
*-commutative65.3%
cbrt-prod65.2%
associate-/r*58.6%
cbrt-div60.3%
rem-cbrt-cube68.6%
cbrt-prod80.1%
pow280.1%
Applied egg-rr80.1%
associate-*r/80.3%
Applied egg-rr80.3%
Taylor expanded in k around 0 73.5%
if 2.9e-141 < k < 8.4999999999999999e-6Initial program 43.0%
Simplified45.0%
associate-*l*46.4%
associate-/r*61.9%
associate-+r+61.9%
metadata-eval61.9%
associate-*l*61.9%
add-sqr-sqrt39.0%
pow239.0%
Applied egg-rr52.6%
associate-*r*52.6%
Simplified52.6%
if 8.4999999999999999e-6 < k Initial program 40.8%
Simplified40.8%
associate-*l*40.8%
associate-/r*44.6%
associate-+r+44.6%
metadata-eval44.6%
associate-*l*44.6%
add-sqr-sqrt22.3%
pow222.3%
Applied egg-rr15.5%
associate-*r*15.5%
Simplified15.5%
Taylor expanded in t around 0 17.1%
associate-*l/17.1%
Simplified17.1%
add-cbrt-cube17.1%
pow317.1%
*-commutative17.1%
unpow-prod-down17.0%
pow217.0%
add-sqr-sqrt45.5%
associate-/l*45.6%
Applied egg-rr45.6%
rem-cbrt-cube47.8%
associate-*l*47.7%
Applied egg-rr47.7%
associate-*r*47.8%
associate-*r/47.7%
associate-*l/47.7%
Simplified47.7%
Final simplification65.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 6.9e-34)
(/ 2.0 (* (* (sin k) (tan k)) (pow (* (/ k l) (sqrt t_m)) 2.0)))
(/
2.0
(*
(* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
(pow (* (cbrt (sin k)) (* t_m (pow (cbrt l) -2.0))) 3.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 6.9e-34) {
tmp = 2.0 / ((sin(k) * tan(k)) * pow(((k / l) * sqrt(t_m)), 2.0));
} else {
tmp = 2.0 / ((tan(k) * (2.0 + pow((k / t_m), 2.0))) * pow((cbrt(sin(k)) * (t_m * pow(cbrt(l), -2.0))), 3.0));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 6.9e-34) {
tmp = 2.0 / ((Math.sin(k) * Math.tan(k)) * Math.pow(((k / l) * Math.sqrt(t_m)), 2.0));
} else {
tmp = 2.0 / ((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))) * Math.pow((Math.cbrt(Math.sin(k)) * (t_m * Math.pow(Math.cbrt(l), -2.0))), 3.0));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 6.9e-34) tmp = Float64(2.0 / Float64(Float64(sin(k) * tan(k)) * (Float64(Float64(k / l) * sqrt(t_m)) ^ 2.0))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * (Float64(cbrt(sin(k)) * Float64(t_m * (cbrt(l) ^ -2.0))) ^ 3.0))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 6.9e-34], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(k / l), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 6.9 \cdot 10^{-34}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{k}{\ell} \cdot \sqrt{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right) \cdot {\left(\sqrt[3]{\sin k} \cdot \left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right)}^{3}}\\
\end{array}
\end{array}
if t < 6.8999999999999999e-34Initial program 47.8%
Simplified48.1%
associate-*l*45.7%
associate-/r*53.0%
associate-+r+53.0%
metadata-eval53.0%
associate-*l*53.0%
add-sqr-sqrt23.4%
pow223.4%
Applied egg-rr19.9%
associate-*r*19.9%
Simplified19.9%
Taylor expanded in t around 0 24.3%
associate-*l/24.3%
Simplified24.3%
add-cbrt-cube21.7%
pow321.7%
*-commutative21.7%
unpow-prod-down21.7%
pow221.7%
add-sqr-sqrt27.7%
associate-/l*27.7%
Applied egg-rr27.7%
rem-cbrt-cube32.6%
associate-*l*32.6%
Applied egg-rr32.6%
associate-*r*32.6%
associate-*r/33.1%
associate-*l/33.1%
Simplified33.1%
if 6.8999999999999999e-34 < t Initial program 65.1%
Simplified65.1%
add-cube-cbrt65.1%
pow365.0%
associate-/r*71.0%
*-commutative71.0%
cbrt-prod70.9%
associate-/r*64.9%
cbrt-div67.4%
rem-cbrt-cube73.2%
cbrt-prod93.1%
pow293.1%
Applied egg-rr93.1%
associate-*r/93.3%
Applied egg-rr93.3%
pow193.3%
associate-+r+93.3%
metadata-eval93.3%
Applied egg-rr93.3%
unpow193.3%
Simplified93.3%
div-inv93.3%
pow-flip93.2%
metadata-eval93.2%
Applied egg-rr93.2%
associate-*l*93.1%
Simplified93.1%
Final simplification50.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1.45e-141)
(/
2.0
(* (pow (/ (* t_m (cbrt (sin k))) (pow (cbrt l) 2.0)) 3.0) (* 2.0 k)))
(if (<= k 8e-6)
(/
2.0
(pow
(* k (* (/ (pow t_m 1.5) l) (hypot 1.0 (hypot 1.0 (/ k t_m)))))
2.0))
(/ 2.0 (* (* (sin k) (tan k)) (pow (* (/ k l) (sqrt 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 (k <= 1.45e-141) {
tmp = 2.0 / (pow(((t_m * cbrt(sin(k))) / pow(cbrt(l), 2.0)), 3.0) * (2.0 * k));
} else if (k <= 8e-6) {
tmp = 2.0 / pow((k * ((pow(t_m, 1.5) / l) * hypot(1.0, hypot(1.0, (k / t_m))))), 2.0);
} else {
tmp = 2.0 / ((sin(k) * tan(k)) * pow(((k / l) * sqrt(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 (k <= 1.45e-141) {
tmp = 2.0 / (Math.pow(((t_m * Math.cbrt(Math.sin(k))) / Math.pow(Math.cbrt(l), 2.0)), 3.0) * (2.0 * k));
} else if (k <= 8e-6) {
tmp = 2.0 / Math.pow((k * ((Math.pow(t_m, 1.5) / l) * Math.hypot(1.0, Math.hypot(1.0, (k / t_m))))), 2.0);
} else {
tmp = 2.0 / ((Math.sin(k) * Math.tan(k)) * Math.pow(((k / l) * Math.sqrt(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 (k <= 1.45e-141) tmp = Float64(2.0 / Float64((Float64(Float64(t_m * cbrt(sin(k))) / (cbrt(l) ^ 2.0)) ^ 3.0) * Float64(2.0 * k))); elseif (k <= 8e-6) tmp = Float64(2.0 / (Float64(k * Float64(Float64((t_m ^ 1.5) / l) * hypot(1.0, hypot(1.0, Float64(k / t_m))))) ^ 2.0)); else tmp = Float64(2.0 / Float64(Float64(sin(k) * tan(k)) * (Float64(Float64(k / l) * sqrt(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[k, 1.45e-141], N[(2.0 / N[(N[Power[N[(N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 8e-6], N[(2.0 / N[Power[N[(k * N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * 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[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(k / l), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $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 1.45 \cdot 10^{-141}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m \cdot \sqrt[3]{\sin k}}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot k\right)}\\
\mathbf{elif}\;k \leq 8 \cdot 10^{-6}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \left(\frac{{t\_m}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{k}{\ell} \cdot \sqrt{t\_m}\right)}^{2}}\\
\end{array}
\end{array}
if k < 1.45e-141Initial program 58.7%
Simplified58.7%
add-cube-cbrt58.6%
pow358.7%
associate-/r*65.3%
*-commutative65.3%
cbrt-prod65.2%
associate-/r*58.6%
cbrt-div60.3%
rem-cbrt-cube68.6%
cbrt-prod80.1%
pow280.1%
Applied egg-rr80.1%
associate-*r/80.3%
Applied egg-rr80.3%
Taylor expanded in k around 0 73.5%
if 1.45e-141 < k < 7.99999999999999964e-6Initial program 43.0%
Simplified45.0%
associate-*l*46.4%
associate-/r*61.9%
associate-+r+61.9%
metadata-eval61.9%
associate-*l*61.9%
add-sqr-sqrt39.0%
pow239.0%
Applied egg-rr52.6%
associate-*r*52.6%
Simplified52.6%
Taylor expanded in k around 0 52.6%
if 7.99999999999999964e-6 < k Initial program 40.8%
Simplified40.8%
associate-*l*40.8%
associate-/r*44.6%
associate-+r+44.6%
metadata-eval44.6%
associate-*l*44.6%
add-sqr-sqrt22.3%
pow222.3%
Applied egg-rr15.5%
associate-*r*15.5%
Simplified15.5%
Taylor expanded in t around 0 17.1%
associate-*l/17.1%
Simplified17.1%
add-cbrt-cube17.1%
pow317.1%
*-commutative17.1%
unpow-prod-down17.0%
pow217.0%
add-sqr-sqrt45.5%
associate-/l*45.6%
Applied egg-rr45.6%
rem-cbrt-cube47.8%
associate-*l*47.7%
Applied egg-rr47.7%
associate-*r*47.8%
associate-*r/47.7%
associate-*l/47.7%
Simplified47.7%
Final simplification65.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 (<= k 6e-142)
(/
2.0
(* (* 2.0 k) (pow (* (cbrt (sin k)) (/ t_m (pow (cbrt l) 2.0))) 3.0)))
(if (<= k 3.6e-6)
(/
2.0
(pow
(* k (* (/ (pow t_m 1.5) l) (hypot 1.0 (hypot 1.0 (/ k t_m)))))
2.0))
(/ 2.0 (* (* (sin k) (tan k)) (pow (* (/ k l) (sqrt 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 (k <= 6e-142) {
tmp = 2.0 / ((2.0 * k) * pow((cbrt(sin(k)) * (t_m / pow(cbrt(l), 2.0))), 3.0));
} else if (k <= 3.6e-6) {
tmp = 2.0 / pow((k * ((pow(t_m, 1.5) / l) * hypot(1.0, hypot(1.0, (k / t_m))))), 2.0);
} else {
tmp = 2.0 / ((sin(k) * tan(k)) * pow(((k / l) * sqrt(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 (k <= 6e-142) {
tmp = 2.0 / ((2.0 * k) * Math.pow((Math.cbrt(Math.sin(k)) * (t_m / Math.pow(Math.cbrt(l), 2.0))), 3.0));
} else if (k <= 3.6e-6) {
tmp = 2.0 / Math.pow((k * ((Math.pow(t_m, 1.5) / l) * Math.hypot(1.0, Math.hypot(1.0, (k / t_m))))), 2.0);
} else {
tmp = 2.0 / ((Math.sin(k) * Math.tan(k)) * Math.pow(((k / l) * Math.sqrt(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 (k <= 6e-142) tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(cbrt(sin(k)) * Float64(t_m / (cbrt(l) ^ 2.0))) ^ 3.0))); elseif (k <= 3.6e-6) tmp = Float64(2.0 / (Float64(k * Float64(Float64((t_m ^ 1.5) / l) * hypot(1.0, hypot(1.0, Float64(k / t_m))))) ^ 2.0)); else tmp = Float64(2.0 / Float64(Float64(sin(k) * tan(k)) * (Float64(Float64(k / l) * sqrt(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[k, 6e-142], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3.6e-6], N[(2.0 / N[Power[N[(k * N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * 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[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(k / l), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $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 6 \cdot 10^{-142}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\sqrt[3]{\sin k} \cdot \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}}\\
\mathbf{elif}\;k \leq 3.6 \cdot 10^{-6}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \left(\frac{{t\_m}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{k}{\ell} \cdot \sqrt{t\_m}\right)}^{2}}\\
\end{array}
\end{array}
if k < 6.0000000000000002e-142Initial program 58.7%
Simplified58.7%
add-cube-cbrt58.6%
pow358.7%
associate-/r*65.3%
*-commutative65.3%
cbrt-prod65.2%
associate-/r*58.6%
cbrt-div60.3%
rem-cbrt-cube68.6%
cbrt-prod80.1%
pow280.1%
Applied egg-rr80.1%
Taylor expanded in k around 0 73.4%
if 6.0000000000000002e-142 < k < 3.59999999999999984e-6Initial program 43.0%
Simplified45.0%
associate-*l*46.4%
associate-/r*61.9%
associate-+r+61.9%
metadata-eval61.9%
associate-*l*61.9%
add-sqr-sqrt39.0%
pow239.0%
Applied egg-rr52.6%
associate-*r*52.6%
Simplified52.6%
Taylor expanded in k around 0 52.6%
if 3.59999999999999984e-6 < k Initial program 40.8%
Simplified40.8%
associate-*l*40.8%
associate-/r*44.6%
associate-+r+44.6%
metadata-eval44.6%
associate-*l*44.6%
add-sqr-sqrt22.3%
pow222.3%
Applied egg-rr15.5%
associate-*r*15.5%
Simplified15.5%
Taylor expanded in t around 0 17.1%
associate-*l/17.1%
Simplified17.1%
add-cbrt-cube17.1%
pow317.1%
*-commutative17.1%
unpow-prod-down17.0%
pow217.0%
add-sqr-sqrt45.5%
associate-/l*45.6%
Applied egg-rr45.6%
rem-cbrt-cube47.8%
associate-*l*47.7%
Applied egg-rr47.7%
associate-*r*47.8%
associate-*r/47.7%
associate-*l/47.7%
Simplified47.7%
Final simplification65.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 (<= k 3.6e-6)
(/
2.0
(pow (* k (* (/ (pow t_m 1.5) l) (hypot 1.0 (hypot 1.0 (/ k t_m))))) 2.0))
(/ 2.0 (* (* (sin k) (tan k)) (pow (* (/ k l) (sqrt 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 (k <= 3.6e-6) {
tmp = 2.0 / pow((k * ((pow(t_m, 1.5) / l) * hypot(1.0, hypot(1.0, (k / t_m))))), 2.0);
} else {
tmp = 2.0 / ((sin(k) * tan(k)) * pow(((k / l) * sqrt(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 (k <= 3.6e-6) {
tmp = 2.0 / Math.pow((k * ((Math.pow(t_m, 1.5) / l) * Math.hypot(1.0, Math.hypot(1.0, (k / t_m))))), 2.0);
} else {
tmp = 2.0 / ((Math.sin(k) * Math.tan(k)) * Math.pow(((k / l) * Math.sqrt(t_m)), 2.0));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 3.6e-6: tmp = 2.0 / math.pow((k * ((math.pow(t_m, 1.5) / l) * math.hypot(1.0, math.hypot(1.0, (k / t_m))))), 2.0) else: tmp = 2.0 / ((math.sin(k) * math.tan(k)) * math.pow(((k / l) * math.sqrt(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 (k <= 3.6e-6) tmp = Float64(2.0 / (Float64(k * Float64(Float64((t_m ^ 1.5) / l) * hypot(1.0, hypot(1.0, Float64(k / t_m))))) ^ 2.0)); else tmp = Float64(2.0 / Float64(Float64(sin(k) * tan(k)) * (Float64(Float64(k / l) * sqrt(t_m)) ^ 2.0))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 3.6e-6) tmp = 2.0 / ((k * (((t_m ^ 1.5) / l) * hypot(1.0, hypot(1.0, (k / t_m))))) ^ 2.0); else tmp = 2.0 / ((sin(k) * tan(k)) * (((k / l) * sqrt(t_m)) ^ 2.0)); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 3.6e-6], N[(2.0 / N[Power[N[(k * N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * 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[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(k / l), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $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 3.6 \cdot 10^{-6}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \left(\frac{{t\_m}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{k}{\ell} \cdot \sqrt{t\_m}\right)}^{2}}\\
\end{array}
\end{array}
if k < 3.59999999999999984e-6Initial program 56.5%
Simplified56.8%
associate-*l*50.5%
associate-/r*58.2%
associate-+r+58.2%
metadata-eval58.2%
associate-*l*58.2%
add-sqr-sqrt30.6%
pow230.6%
Applied egg-rr33.8%
associate-*r*33.8%
Simplified33.8%
Taylor expanded in k around 0 41.4%
if 3.59999999999999984e-6 < k Initial program 40.8%
Simplified40.8%
associate-*l*40.8%
associate-/r*44.6%
associate-+r+44.6%
metadata-eval44.6%
associate-*l*44.6%
add-sqr-sqrt22.3%
pow222.3%
Applied egg-rr15.5%
associate-*r*15.5%
Simplified15.5%
Taylor expanded in t around 0 17.1%
associate-*l/17.1%
Simplified17.1%
add-cbrt-cube17.1%
pow317.1%
*-commutative17.1%
unpow-prod-down17.0%
pow217.0%
add-sqr-sqrt45.5%
associate-/l*45.6%
Applied egg-rr45.6%
rem-cbrt-cube47.8%
associate-*l*47.7%
Applied egg-rr47.7%
associate-*r*47.8%
associate-*r/47.7%
associate-*l/47.7%
Simplified47.7%
Final simplification42.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.15e-26)
(/ 2.0 (* (* (sin k) (tan k)) (pow (* (/ k l) (sqrt t_m)) 2.0)))
(/ 2.0 (pow (/ (* (pow t_m 1.5) (* k (sqrt 2.0))) 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 <= 1.15e-26) {
tmp = 2.0 / ((sin(k) * tan(k)) * pow(((k / l) * sqrt(t_m)), 2.0));
} else {
tmp = 2.0 / pow(((pow(t_m, 1.5) * (k * sqrt(2.0))) / l), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1.15d-26) then
tmp = 2.0d0 / ((sin(k) * tan(k)) * (((k / l) * sqrt(t_m)) ** 2.0d0))
else
tmp = 2.0d0 / ((((t_m ** 1.5d0) * (k * sqrt(2.0d0))) / l) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.15e-26) {
tmp = 2.0 / ((Math.sin(k) * Math.tan(k)) * Math.pow(((k / l) * Math.sqrt(t_m)), 2.0));
} else {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) * (k * Math.sqrt(2.0))) / l), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 1.15e-26: tmp = 2.0 / ((math.sin(k) * math.tan(k)) * math.pow(((k / l) * math.sqrt(t_m)), 2.0)) else: tmp = 2.0 / math.pow(((math.pow(t_m, 1.5) * (k * math.sqrt(2.0))) / 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 <= 1.15e-26) tmp = Float64(2.0 / Float64(Float64(sin(k) * tan(k)) * (Float64(Float64(k / l) * sqrt(t_m)) ^ 2.0))); else tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) * Float64(k * sqrt(2.0))) / l) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 1.15e-26) tmp = 2.0 / ((sin(k) * tan(k)) * (((k / l) * sqrt(t_m)) ^ 2.0)); else tmp = 2.0 / ((((t_m ^ 1.5) * (k * sqrt(2.0))) / l) ^ 2.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.15e-26], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(k / l), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $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 1.15 \cdot 10^{-26}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{k}{\ell} \cdot \sqrt{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5} \cdot \left(k \cdot \sqrt{2}\right)}{\ell}\right)}^{2}}\\
\end{array}
\end{array}
if t < 1.15000000000000004e-26Initial program 47.6%
Simplified47.9%
associate-*l*45.5%
associate-/r*53.2%
associate-+r+53.2%
metadata-eval53.2%
associate-*l*53.2%
add-sqr-sqrt23.8%
pow223.8%
Applied egg-rr20.3%
associate-*r*20.3%
Simplified20.3%
Taylor expanded in t around 0 24.2%
associate-*l/24.2%
Simplified24.2%
add-cbrt-cube21.6%
pow321.6%
*-commutative21.6%
unpow-prod-down21.6%
pow221.6%
add-sqr-sqrt27.6%
associate-/l*27.6%
Applied egg-rr27.6%
rem-cbrt-cube32.4%
associate-*l*32.4%
Applied egg-rr32.4%
associate-*r*32.4%
associate-*r/33.0%
associate-*l/32.9%
Simplified32.9%
if 1.15000000000000004e-26 < t Initial program 65.9%
Simplified65.9%
associate-*l*55.1%
associate-/r*59.7%
associate-+r+59.7%
metadata-eval59.7%
associate-*l*59.7%
add-sqr-sqrt40.7%
pow240.7%
Applied egg-rr52.4%
associate-*r*52.4%
Simplified52.4%
Taylor expanded in k around 0 70.6%
associate-*l/70.8%
sqrt-pow180.9%
metadata-eval80.9%
Applied egg-rr80.9%
Final simplification46.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 9.2e-27)
(/ 2.0 (* (sin k) (* (tan k) (pow (* k (/ (sqrt t_m) l)) 2.0))))
(/ 2.0 (pow (/ (* (pow t_m 1.5) (* k (sqrt 2.0))) 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 <= 9.2e-27) {
tmp = 2.0 / (sin(k) * (tan(k) * pow((k * (sqrt(t_m) / l)), 2.0)));
} else {
tmp = 2.0 / pow(((pow(t_m, 1.5) * (k * sqrt(2.0))) / l), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 9.2d-27) then
tmp = 2.0d0 / (sin(k) * (tan(k) * ((k * (sqrt(t_m) / l)) ** 2.0d0)))
else
tmp = 2.0d0 / ((((t_m ** 1.5d0) * (k * sqrt(2.0d0))) / l) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 9.2e-27) {
tmp = 2.0 / (Math.sin(k) * (Math.tan(k) * Math.pow((k * (Math.sqrt(t_m) / l)), 2.0)));
} else {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) * (k * Math.sqrt(2.0))) / l), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 9.2e-27: tmp = 2.0 / (math.sin(k) * (math.tan(k) * math.pow((k * (math.sqrt(t_m) / l)), 2.0))) else: tmp = 2.0 / math.pow(((math.pow(t_m, 1.5) * (k * math.sqrt(2.0))) / 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 <= 9.2e-27) tmp = Float64(2.0 / Float64(sin(k) * Float64(tan(k) * (Float64(k * Float64(sqrt(t_m) / l)) ^ 2.0)))); else tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) * Float64(k * sqrt(2.0))) / l) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 9.2e-27) tmp = 2.0 / (sin(k) * (tan(k) * ((k * (sqrt(t_m) / l)) ^ 2.0))); else tmp = 2.0 / ((((t_m ^ 1.5) * (k * sqrt(2.0))) / l) ^ 2.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 9.2e-27], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[Power[N[(k * N[(N[Sqrt[t$95$m], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $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 9.2 \cdot 10^{-27}:\\
\;\;\;\;\frac{2}{\sin k \cdot \left(\tan k \cdot {\left(k \cdot \frac{\sqrt{t\_m}}{\ell}\right)}^{2}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5} \cdot \left(k \cdot \sqrt{2}\right)}{\ell}\right)}^{2}}\\
\end{array}
\end{array}
if t < 9.1999999999999998e-27Initial program 47.6%
Simplified47.9%
associate-*l*45.5%
associate-/r*53.2%
associate-+r+53.2%
metadata-eval53.2%
associate-*l*53.2%
add-sqr-sqrt23.8%
pow223.8%
Applied egg-rr20.3%
associate-*r*20.3%
Simplified20.3%
Taylor expanded in t around 0 24.2%
associate-*l/24.2%
Simplified24.2%
*-un-lft-identity24.2%
*-commutative24.2%
unpow-prod-down24.2%
pow224.2%
add-sqr-sqrt33.0%
associate-/l*32.4%
Applied egg-rr32.4%
*-lft-identity32.4%
associate-*l*32.4%
Simplified32.4%
if 9.1999999999999998e-27 < t Initial program 65.9%
Simplified65.9%
associate-*l*55.1%
associate-/r*59.7%
associate-+r+59.7%
metadata-eval59.7%
associate-*l*59.7%
add-sqr-sqrt40.7%
pow240.7%
Applied egg-rr52.4%
associate-*r*52.4%
Simplified52.4%
Taylor expanded in k around 0 70.6%
associate-*l/70.8%
sqrt-pow180.9%
metadata-eval80.9%
Applied egg-rr80.9%
Final simplification46.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
(if (<= t_m 9.2e-55)
(/
2.0
(pow
(*
(/ (* k (sqrt t_m)) l)
(* k (+ 1.0 (* (pow k 2.0) 0.08333333333333333))))
2.0))
(/ 2.0 (pow (/ (* (pow t_m 1.5) (* k (sqrt 2.0))) 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 <= 9.2e-55) {
tmp = 2.0 / pow((((k * sqrt(t_m)) / l) * (k * (1.0 + (pow(k, 2.0) * 0.08333333333333333)))), 2.0);
} else {
tmp = 2.0 / pow(((pow(t_m, 1.5) * (k * sqrt(2.0))) / l), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 9.2d-55) then
tmp = 2.0d0 / ((((k * sqrt(t_m)) / l) * (k * (1.0d0 + ((k ** 2.0d0) * 0.08333333333333333d0)))) ** 2.0d0)
else
tmp = 2.0d0 / ((((t_m ** 1.5d0) * (k * sqrt(2.0d0))) / l) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 9.2e-55) {
tmp = 2.0 / Math.pow((((k * Math.sqrt(t_m)) / l) * (k * (1.0 + (Math.pow(k, 2.0) * 0.08333333333333333)))), 2.0);
} else {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) * (k * Math.sqrt(2.0))) / l), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 9.2e-55: tmp = 2.0 / math.pow((((k * math.sqrt(t_m)) / l) * (k * (1.0 + (math.pow(k, 2.0) * 0.08333333333333333)))), 2.0) else: tmp = 2.0 / math.pow(((math.pow(t_m, 1.5) * (k * math.sqrt(2.0))) / 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 <= 9.2e-55) tmp = Float64(2.0 / (Float64(Float64(Float64(k * sqrt(t_m)) / l) * Float64(k * Float64(1.0 + Float64((k ^ 2.0) * 0.08333333333333333)))) ^ 2.0)); else tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) * Float64(k * sqrt(2.0))) / l) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 9.2e-55) tmp = 2.0 / ((((k * sqrt(t_m)) / l) * (k * (1.0 + ((k ^ 2.0) * 0.08333333333333333)))) ^ 2.0); else tmp = 2.0 / ((((t_m ^ 1.5) * (k * sqrt(2.0))) / l) ^ 2.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 9.2e-55], N[(2.0 / N[Power[N[(N[(N[(k * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(k * N[(1.0 + N[(N[Power[k, 2.0], $MachinePrecision] * 0.08333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $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 9.2 \cdot 10^{-55}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sqrt{t\_m}}{\ell} \cdot \left(k \cdot \left(1 + {k}^{2} \cdot 0.08333333333333333\right)\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5} \cdot \left(k \cdot \sqrt{2}\right)}{\ell}\right)}^{2}}\\
\end{array}
\end{array}
if t < 9.20000000000000046e-55Initial program 48.3%
Simplified48.6%
associate-*l*46.1%
associate-/r*53.0%
associate-+r+53.0%
metadata-eval53.0%
associate-*l*53.0%
add-sqr-sqrt22.8%
pow222.8%
Applied egg-rr19.2%
associate-*r*19.2%
Simplified19.2%
Taylor expanded in t around 0 23.7%
associate-*l/23.7%
Simplified23.7%
Taylor expanded in k around 0 24.0%
*-commutative24.0%
Simplified24.0%
if 9.20000000000000046e-55 < t Initial program 63.2%
Simplified63.2%
associate-*l*53.0%
associate-/r*59.8%
associate-+r+59.8%
metadata-eval59.8%
associate-*l*59.8%
add-sqr-sqrt41.9%
pow241.9%
Applied egg-rr52.9%
associate-*r*52.9%
Simplified52.9%
Taylor expanded in k around 0 70.0%
associate-*l/70.2%
sqrt-pow179.7%
metadata-eval79.7%
Applied egg-rr79.7%
Final simplification41.2%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 3.8e-57)
(/ 2.0 (pow (* k (/ (* k (sqrt t_m)) l)) 2.0))
(/ 2.0 (pow (/ (* (pow t_m 1.5) (* k (sqrt 2.0))) 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 <= 3.8e-57) {
tmp = 2.0 / pow((k * ((k * sqrt(t_m)) / l)), 2.0);
} else {
tmp = 2.0 / pow(((pow(t_m, 1.5) * (k * sqrt(2.0))) / l), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 3.8d-57) then
tmp = 2.0d0 / ((k * ((k * sqrt(t_m)) / l)) ** 2.0d0)
else
tmp = 2.0d0 / ((((t_m ** 1.5d0) * (k * sqrt(2.0d0))) / l) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3.8e-57) {
tmp = 2.0 / Math.pow((k * ((k * Math.sqrt(t_m)) / l)), 2.0);
} else {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) * (k * Math.sqrt(2.0))) / l), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 3.8e-57: tmp = 2.0 / math.pow((k * ((k * math.sqrt(t_m)) / l)), 2.0) else: tmp = 2.0 / math.pow(((math.pow(t_m, 1.5) * (k * math.sqrt(2.0))) / 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 <= 3.8e-57) tmp = Float64(2.0 / (Float64(k * Float64(Float64(k * sqrt(t_m)) / l)) ^ 2.0)); else tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) * Float64(k * sqrt(2.0))) / l) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 3.8e-57) tmp = 2.0 / ((k * ((k * sqrt(t_m)) / l)) ^ 2.0); else tmp = 2.0 / ((((t_m ^ 1.5) * (k * sqrt(2.0))) / l) ^ 2.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3.8e-57], N[(2.0 / N[Power[N[(k * N[(N[(k * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $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 3.8 \cdot 10^{-57}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \frac{k \cdot \sqrt{t\_m}}{\ell}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5} \cdot \left(k \cdot \sqrt{2}\right)}{\ell}\right)}^{2}}\\
\end{array}
\end{array}
if t < 3.7999999999999997e-57Initial program 48.3%
Simplified48.6%
associate-*l*46.1%
associate-/r*53.0%
associate-+r+53.0%
metadata-eval53.0%
associate-*l*53.0%
add-sqr-sqrt22.8%
pow222.8%
Applied egg-rr19.2%
associate-*r*19.2%
Simplified19.2%
Taylor expanded in t around 0 23.7%
associate-*l/23.7%
Simplified23.7%
Taylor expanded in k around 0 24.0%
if 3.7999999999999997e-57 < t Initial program 63.2%
Simplified63.2%
associate-*l*53.0%
associate-/r*59.8%
associate-+r+59.8%
metadata-eval59.8%
associate-*l*59.8%
add-sqr-sqrt41.9%
pow241.9%
Applied egg-rr52.9%
associate-*r*52.9%
Simplified52.9%
Taylor expanded in k around 0 70.0%
associate-*l/70.2%
sqrt-pow179.7%
metadata-eval79.7%
Applied egg-rr79.7%
Final simplification41.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 4.8e-50)
(/ 2.0 (pow (* k (/ (* k (sqrt t_m)) l)) 2.0))
(* 2.0 (pow (* (pow t_m 1.5) (/ (* k (sqrt 2.0)) 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 <= 4.8e-50) {
tmp = 2.0 / pow((k * ((k * sqrt(t_m)) / l)), 2.0);
} else {
tmp = 2.0 * pow((pow(t_m, 1.5) * ((k * sqrt(2.0)) / l)), -2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 4.8d-50) then
tmp = 2.0d0 / ((k * ((k * sqrt(t_m)) / l)) ** 2.0d0)
else
tmp = 2.0d0 * (((t_m ** 1.5d0) * ((k * sqrt(2.0d0)) / l)) ** (-2.0d0))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4.8e-50) {
tmp = 2.0 / Math.pow((k * ((k * Math.sqrt(t_m)) / l)), 2.0);
} else {
tmp = 2.0 * Math.pow((Math.pow(t_m, 1.5) * ((k * Math.sqrt(2.0)) / l)), -2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 4.8e-50: tmp = 2.0 / math.pow((k * ((k * math.sqrt(t_m)) / l)), 2.0) else: tmp = 2.0 * math.pow((math.pow(t_m, 1.5) * ((k * math.sqrt(2.0)) / 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 <= 4.8e-50) tmp = Float64(2.0 / (Float64(k * Float64(Float64(k * sqrt(t_m)) / l)) ^ 2.0)); else tmp = Float64(2.0 * (Float64((t_m ^ 1.5) * Float64(Float64(k * sqrt(2.0)) / l)) ^ -2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 4.8e-50) tmp = 2.0 / ((k * ((k * sqrt(t_m)) / l)) ^ 2.0); else tmp = 2.0 * (((t_m ^ 1.5) * ((k * sqrt(2.0)) / l)) ^ -2.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 4.8e-50], N[(2.0 / N[Power[N[(k * N[(N[(k * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] * N[(N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / 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}\;t\_m \leq 4.8 \cdot 10^{-50}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \frac{k \cdot \sqrt{t\_m}}{\ell}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot {\left({t\_m}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{-2}\\
\end{array}
\end{array}
if t < 4.80000000000000004e-50Initial program 48.3%
Simplified48.6%
associate-*l*46.1%
associate-/r*53.0%
associate-+r+53.0%
metadata-eval53.0%
associate-*l*53.0%
add-sqr-sqrt22.8%
pow222.8%
Applied egg-rr19.2%
associate-*r*19.2%
Simplified19.2%
Taylor expanded in t around 0 23.7%
associate-*l/23.7%
Simplified23.7%
Taylor expanded in k around 0 24.0%
if 4.80000000000000004e-50 < t Initial program 63.2%
Simplified63.2%
associate-*l*53.0%
associate-/r*59.8%
associate-+r+59.8%
metadata-eval59.8%
associate-*l*59.8%
add-sqr-sqrt41.9%
pow241.9%
Applied egg-rr52.9%
associate-*r*52.9%
Simplified52.9%
Taylor expanded in k around 0 70.0%
div-inv70.0%
pow-flip70.0%
associate-/l*70.0%
sqrt-pow177.2%
metadata-eval77.2%
metadata-eval77.2%
Applied egg-rr77.2%
associate-*r/77.2%
Simplified77.2%
Final simplification40.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
(if (<= t_m 5.3e-42)
(/ 2.0 (pow (* k (/ (* k (sqrt t_m)) l)) 2.0))
(/ 2.0 (* (pow (/ (pow t_m 1.5) l) 2.0) (* 2.0 (* k k)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5.3e-42) {
tmp = 2.0 / pow((k * ((k * sqrt(t_m)) / l)), 2.0);
} else {
tmp = 2.0 / (pow((pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 5.3d-42) then
tmp = 2.0d0 / ((k * ((k * sqrt(t_m)) / l)) ** 2.0d0)
else
tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) ** 2.0d0) * (2.0d0 * (k * k)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5.3e-42) {
tmp = 2.0 / Math.pow((k * ((k * Math.sqrt(t_m)) / l)), 2.0);
} else {
tmp = 2.0 / (Math.pow((Math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 5.3e-42: tmp = 2.0 / math.pow((k * ((k * math.sqrt(t_m)) / l)), 2.0) else: tmp = 2.0 / (math.pow((math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 5.3e-42) tmp = Float64(2.0 / (Float64(k * Float64(Float64(k * sqrt(t_m)) / l)) ^ 2.0)); else tmp = Float64(2.0 / Float64((Float64((t_m ^ 1.5) / l) ^ 2.0) * Float64(2.0 * Float64(k * k)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 5.3e-42) tmp = 2.0 / ((k * ((k * sqrt(t_m)) / l)) ^ 2.0); else tmp = 2.0 / ((((t_m ^ 1.5) / l) ^ 2.0) * (2.0 * (k * k))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 5.3e-42], N[(2.0 / N[Power[N[(k * N[(N[(k * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 5.3 \cdot 10^{-42}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \frac{k \cdot \sqrt{t\_m}}{\ell}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\
\end{array}
\end{array}
if t < 5.3e-42Initial program 48.0%
Simplified48.3%
associate-*l*45.9%
associate-/r*52.7%
associate-+r+52.7%
metadata-eval52.7%
associate-*l*52.7%
add-sqr-sqrt22.7%
pow222.7%
Applied egg-rr19.1%
associate-*r*19.1%
Simplified19.1%
Taylor expanded in t around 0 24.1%
associate-*l/24.1%
Simplified24.1%
Taylor expanded in k around 0 23.9%
if 5.3e-42 < t Initial program 64.0%
Simplified60.6%
Taylor expanded in k around 0 58.2%
unpow258.2%
Applied egg-rr58.2%
add-sqr-sqrt58.1%
pow258.1%
associate-/r*52.4%
sqrt-div52.4%
sqrt-pow152.7%
metadata-eval52.7%
sqrt-prod42.4%
add-sqr-sqrt62.2%
Applied egg-rr62.2%
Final simplification35.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 7.5e-42)
(/ 2.0 (pow (* k (/ (* k (sqrt t_m)) l)) 2.0))
(/ 2.0 (* (* 2.0 (* k k)) (/ (* (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 <= 7.5e-42) {
tmp = 2.0 / pow((k * ((k * sqrt(t_m)) / l)), 2.0);
} else {
tmp = 2.0 / ((2.0 * (k * k)) * ((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 <= 7.5d-42) then
tmp = 2.0d0 / ((k * ((k * sqrt(t_m)) / l)) ** 2.0d0)
else
tmp = 2.0d0 / ((2.0d0 * (k * k)) * (((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 <= 7.5e-42) {
tmp = 2.0 / Math.pow((k * ((k * Math.sqrt(t_m)) / l)), 2.0);
} else {
tmp = 2.0 / ((2.0 * (k * k)) * ((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 <= 7.5e-42: tmp = 2.0 / math.pow((k * ((k * math.sqrt(t_m)) / l)), 2.0) else: tmp = 2.0 / ((2.0 * (k * k)) * ((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 <= 7.5e-42) tmp = Float64(2.0 / (Float64(k * Float64(Float64(k * sqrt(t_m)) / l)) ^ 2.0)); else tmp = Float64(2.0 / Float64(Float64(2.0 * Float64(k * k)) * Float64(Float64((t_m ^ 2.0) * 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 <= 7.5e-42) tmp = 2.0 / ((k * ((k * sqrt(t_m)) / l)) ^ 2.0); else tmp = 2.0 / ((2.0 * (k * k)) * (((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, 7.5e-42], N[(2.0 / N[Power[N[(k * N[(N[(k * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 7.5 \cdot 10^{-42}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \frac{k \cdot \sqrt{t\_m}}{\ell}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell}}\\
\end{array}
\end{array}
if t < 7.49999999999999972e-42Initial program 48.0%
Simplified48.3%
associate-*l*45.9%
associate-/r*52.7%
associate-+r+52.7%
metadata-eval52.7%
associate-*l*52.7%
add-sqr-sqrt22.7%
pow222.7%
Applied egg-rr19.1%
associate-*r*19.1%
Simplified19.1%
Taylor expanded in t around 0 24.1%
associate-*l/24.1%
Simplified24.1%
Taylor expanded in k around 0 23.9%
if 7.49999999999999972e-42 < t Initial program 64.0%
Simplified60.6%
Taylor expanded in k around 0 58.2%
unpow258.2%
Applied egg-rr58.2%
associate-/r*52.4%
unpow352.4%
times-frac59.4%
pow259.4%
Applied egg-rr59.4%
associate-*l/59.4%
Applied egg-rr59.4%
Final simplification34.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 4.5e-46)
(/ (/ (* 2.0 (pow l 2.0)) t_m) (pow k 4.0))
(/ 2.0 (* (* 2.0 (* k k)) (/ (* (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 <= 4.5e-46) {
tmp = ((2.0 * pow(l, 2.0)) / t_m) / pow(k, 4.0);
} else {
tmp = 2.0 / ((2.0 * (k * k)) * ((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 <= 4.5d-46) then
tmp = ((2.0d0 * (l ** 2.0d0)) / t_m) / (k ** 4.0d0)
else
tmp = 2.0d0 / ((2.0d0 * (k * k)) * (((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 <= 4.5e-46) {
tmp = ((2.0 * Math.pow(l, 2.0)) / t_m) / Math.pow(k, 4.0);
} else {
tmp = 2.0 / ((2.0 * (k * k)) * ((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 <= 4.5e-46: tmp = ((2.0 * math.pow(l, 2.0)) / t_m) / math.pow(k, 4.0) else: tmp = 2.0 / ((2.0 * (k * k)) * ((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 <= 4.5e-46) tmp = Float64(Float64(Float64(2.0 * (l ^ 2.0)) / t_m) / (k ^ 4.0)); else tmp = Float64(2.0 / Float64(Float64(2.0 * Float64(k * k)) * Float64(Float64((t_m ^ 2.0) * 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 <= 4.5e-46) tmp = ((2.0 * (l ^ 2.0)) / t_m) / (k ^ 4.0); else tmp = 2.0 / ((2.0 * (k * k)) * (((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, 4.5e-46], N[(N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.5 \cdot 10^{-46}:\\
\;\;\;\;\frac{\frac{2 \cdot {\ell}^{2}}{t\_m}}{{k}^{4}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell}}\\
\end{array}
\end{array}
if t < 4.50000000000000001e-46Initial program 48.3%
Simplified48.6%
associate-*l*46.1%
associate-/r*53.0%
associate-+r+53.0%
metadata-eval53.0%
associate-*l*53.0%
add-sqr-sqrt22.8%
pow222.8%
Applied egg-rr19.2%
associate-*r*19.2%
Simplified19.2%
Taylor expanded in t around 0 23.7%
associate-*l/23.7%
Simplified23.7%
add-cbrt-cube21.6%
pow321.6%
*-commutative21.6%
unpow-prod-down21.5%
pow221.5%
add-sqr-sqrt27.7%
associate-/l*27.7%
Applied egg-rr27.7%
Taylor expanded in k around 0 54.4%
associate-*r/54.4%
*-commutative54.4%
associate-/r*55.5%
associate-*r/55.5%
*-commutative55.5%
associate-*l/55.5%
Simplified55.5%
if 4.50000000000000001e-46 < t Initial program 63.2%
Simplified59.8%
Taylor expanded in k around 0 57.5%
unpow257.5%
Applied egg-rr57.5%
associate-/r*51.8%
unpow351.8%
times-frac58.6%
pow258.6%
Applied egg-rr58.6%
associate-*l/58.7%
Applied egg-rr58.7%
Final simplification56.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 3.7e-50)
(/ 2.0 (* (pow k 4.0) (/ t_m (pow l 2.0))))
(/ 2.0 (* (* 2.0 (* k k)) (/ (* (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 <= 3.7e-50) {
tmp = 2.0 / (pow(k, 4.0) * (t_m / pow(l, 2.0)));
} else {
tmp = 2.0 / ((2.0 * (k * k)) * ((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 <= 3.7d-50) then
tmp = 2.0d0 / ((k ** 4.0d0) * (t_m / (l ** 2.0d0)))
else
tmp = 2.0d0 / ((2.0d0 * (k * k)) * (((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 <= 3.7e-50) {
tmp = 2.0 / (Math.pow(k, 4.0) * (t_m / Math.pow(l, 2.0)));
} else {
tmp = 2.0 / ((2.0 * (k * k)) * ((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 <= 3.7e-50: tmp = 2.0 / (math.pow(k, 4.0) * (t_m / math.pow(l, 2.0))) else: tmp = 2.0 / ((2.0 * (k * k)) * ((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 <= 3.7e-50) tmp = Float64(2.0 / Float64((k ^ 4.0) * Float64(t_m / (l ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(2.0 * Float64(k * k)) * Float64(Float64((t_m ^ 2.0) * 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 <= 3.7e-50) tmp = 2.0 / ((k ^ 4.0) * (t_m / (l ^ 2.0))); else tmp = 2.0 / ((2.0 * (k * k)) * (((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, 3.7e-50], N[(2.0 / N[(N[Power[k, 4.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.7 \cdot 10^{-50}:\\
\;\;\;\;\frac{2}{{k}^{4} \cdot \frac{t\_m}{{\ell}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell}}\\
\end{array}
\end{array}
if t < 3.7000000000000001e-50Initial program 48.3%
Simplified48.6%
associate-*l*46.1%
associate-/r*53.0%
associate-+r+53.0%
metadata-eval53.0%
associate-*l*53.0%
add-sqr-sqrt22.8%
pow222.8%
Applied egg-rr19.2%
associate-*r*19.2%
Simplified19.2%
Taylor expanded in t around 0 23.7%
associate-*l/23.7%
Simplified23.7%
Taylor expanded in k around 0 54.4%
associate-/l*56.0%
Simplified56.0%
if 3.7000000000000001e-50 < t Initial program 63.2%
Simplified59.8%
Taylor expanded in k around 0 57.5%
unpow257.5%
Applied egg-rr57.5%
associate-/r*51.8%
unpow351.8%
times-frac58.6%
pow258.6%
Applied egg-rr58.6%
associate-*l/58.7%
Applied egg-rr58.7%
Final simplification56.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 1.1e+119)
(/ 2.0 (* (* 2.0 (* k k)) (/ (* (pow t_m 2.0) (/ t_m l)) l)))
(* 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) {
double tmp;
if (k <= 1.1e+119) {
tmp = 2.0 / ((2.0 * (k * k)) * ((pow(t_m, 2.0) * (t_m / l)) / l));
} else {
tmp = 2.0 * ((pow(l, 2.0) / pow(k, 4.0)) / t_m);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1.1d+119) then
tmp = 2.0d0 / ((2.0d0 * (k * k)) * (((t_m ** 2.0d0) * (t_m / l)) / l))
else
tmp = 2.0d0 * (((l ** 2.0d0) / (k ** 4.0d0)) / t_m)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.1e+119) {
tmp = 2.0 / ((2.0 * (k * k)) * ((Math.pow(t_m, 2.0) * (t_m / l)) / l));
} else {
tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 4.0)) / t_m);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 1.1e+119: tmp = 2.0 / ((2.0 * (k * k)) * ((math.pow(t_m, 2.0) * (t_m / l)) / l)) else: tmp = 2.0 * ((math.pow(l, 2.0) / math.pow(k, 4.0)) / t_m) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.1e+119) tmp = Float64(2.0 / Float64(Float64(2.0 * Float64(k * k)) * Float64(Float64((t_m ^ 2.0) * Float64(t_m / l)) / l))); else tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 4.0)) / t_m)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 1.1e+119) tmp = 2.0 / ((2.0 * (k * k)) * (((t_m ^ 2.0) * (t_m / l)) / l)); else tmp = 2.0 * (((l ^ 2.0) / (k ^ 4.0)) / t_m); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.1e+119], N[(2.0 / N[(N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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 \begin{array}{l}
\mathbf{if}\;k \leq 1.1 \cdot 10^{+119}:\\
\;\;\;\;\frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t\_m}\\
\end{array}
\end{array}
if k < 1.1000000000000001e119Initial program 54.7%
Simplified56.8%
Taylor expanded in k around 0 56.1%
unpow256.1%
Applied egg-rr56.1%
associate-/r*49.0%
unpow349.0%
times-frac57.4%
pow257.4%
Applied egg-rr57.4%
associate-*l/57.5%
Applied egg-rr57.5%
if 1.1000000000000001e119 < k Initial program 41.8%
Simplified41.8%
associate-*l*41.8%
associate-/r*44.8%
associate-+r+44.8%
metadata-eval44.8%
associate-*l*44.8%
add-sqr-sqrt16.7%
pow216.7%
Applied egg-rr8.4%
associate-*r*8.4%
Simplified8.4%
Taylor expanded in t around 0 16.6%
associate-*l/16.6%
Simplified16.6%
Taylor expanded in k around 0 64.5%
associate-/r*64.5%
Simplified64.5%
Final simplification58.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 (* (* 2.0 (* k k)) (* (/ t_m l) (/ (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 * (k * k)) * ((t_m / l) * (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 * k)) * ((t_m / l) * ((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 * (k * k)) * ((t_m / l) * (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 * (k * k)) * ((t_m / l) * (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(2.0 * Float64(k * k)) * Float64(Float64(t_m / l) * 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 * k)) * ((t_m / l) * ((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[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * 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}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\frac{t\_m}{\ell} \cdot \frac{{t\_m}^{2}}{\ell}\right)}
\end{array}
Initial program 52.9%
Simplified55.1%
Taylor expanded in k around 0 54.5%
unpow254.5%
Applied egg-rr54.5%
associate-/r*48.0%
unpow348.0%
times-frac56.8%
pow256.8%
Applied egg-rr56.8%
Final simplification56.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 (* (* 2.0 (* k k)) (/ (/ (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) {
return t_s * (2.0 / ((2.0 * (k * k)) * ((pow(t_m, 3.0) / l) / l)));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / ((2.0d0 * (k * k)) * (((t_m ** 3.0d0) / l) / l)))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((2.0 * (k * k)) * ((Math.pow(t_m, 3.0) / l) / l)));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / ((2.0 * (k * k)) * ((math.pow(t_m, 3.0) / l) / l)))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64(Float64(2.0 * Float64(k * k)) * Float64(Float64((t_m ^ 3.0) / l) / l)))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / ((2.0 * (k * k)) * (((t_m ^ 3.0) / l) / l))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(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 \frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \frac{\frac{{t\_m}^{3}}{\ell}}{\ell}}
\end{array}
Initial program 52.9%
Simplified55.1%
Taylor expanded in k around 0 54.5%
unpow254.5%
Applied egg-rr54.5%
Final simplification54.5%
herbie shell --seed 2024155
(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))))