
(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 26 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.38e-104)
(*
2.0
(* (/ (cos k) (* t_m (pow k 2.0))) (/ (pow l 2.0) (pow (sin k) 2.0))))
(/
2.0
(pow
(*
(* t_m (* (cbrt (sin k)) (pow (cbrt l) -2.0)))
(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.38e-104) {
tmp = 2.0 * ((cos(k) / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / pow(sin(k), 2.0)));
} else {
tmp = 2.0 / pow(((t_m * (cbrt(sin(k)) * pow(cbrt(l), -2.0))) * 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.38e-104) {
tmp = 2.0 * ((Math.cos(k) / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / Math.pow(Math.sin(k), 2.0)));
} else {
tmp = 2.0 / Math.pow(((t_m * (Math.cbrt(Math.sin(k)) * Math.pow(Math.cbrt(l), -2.0))) * 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.38e-104) tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / (sin(k) ^ 2.0)))); else tmp = Float64(2.0 / (Float64(Float64(t_m * Float64(cbrt(sin(k)) * (cbrt(l) ^ -2.0))) * 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.38e-104], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(t$95$m * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $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.38 \cdot 10^{-104}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{{\sin k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot \left(\sqrt[3]{\sin k} \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\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.38000000000000006e-104Initial program 54.6%
associate-/r*54.6%
+-commutative54.6%
unpow254.6%
sqr-neg54.6%
distribute-frac-neg254.6%
distribute-frac-neg254.6%
unpow254.6%
+-commutative54.6%
associate-*l*47.9%
associate-*l/47.4%
associate-/r/46.2%
+-commutative46.2%
associate-+r+46.2%
Simplified46.2%
unpow246.2%
Applied egg-rr46.2%
Taylor expanded in t around 0 65.7%
*-commutative65.7%
associate-*r*65.7%
times-frac66.8%
Simplified66.8%
if 1.38000000000000006e-104 < t Initial program 72.2%
Simplified72.3%
add-cube-cbrt72.2%
pow372.2%
*-commutative72.2%
cbrt-prod72.1%
cbrt-div72.1%
rem-cbrt-cube78.2%
cbrt-prod88.2%
pow288.2%
Applied egg-rr88.2%
pow188.2%
div-inv88.1%
pow-flip88.1%
metadata-eval88.1%
Applied egg-rr88.1%
unpow188.1%
associate-*r*88.2%
*-commutative88.2%
Simplified88.2%
add-cube-cbrt88.2%
pow388.2%
Applied egg-rr95.8%
Final simplification76.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (/ k t_m) 2.0)))
(*
t_s
(if (<=
(/
2.0
(*
(* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l))))
(+ 1.0 (+ t_2 1.0))))
2e+257)
(/
2.0
(*
(/ 1.0 l)
(* (* (tan k) (+ 2.0 t_2)) (* (sin k) (/ (pow t_m 3.0) l)))))
(/ 2.0 (* (pow k 2.0) (* (pow k 2.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) {
double t_2 = pow((k / t_m), 2.0);
double tmp;
if ((2.0 / ((tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l)))) * (1.0 + (t_2 + 1.0)))) <= 2e+257) {
tmp = 2.0 / ((1.0 / l) * ((tan(k) * (2.0 + t_2)) * (sin(k) * (pow(t_m, 3.0) / l))));
} else {
tmp = 2.0 / (pow(k, 2.0) * (pow(k, 2.0) * (t_m / pow(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) :: t_2
real(8) :: tmp
t_2 = (k / t_m) ** 2.0d0
if ((2.0d0 / ((tan(k) * (sin(k) * ((t_m ** 3.0d0) / (l * l)))) * (1.0d0 + (t_2 + 1.0d0)))) <= 2d+257) then
tmp = 2.0d0 / ((1.0d0 / l) * ((tan(k) * (2.0d0 + t_2)) * (sin(k) * ((t_m ** 3.0d0) / l))))
else
tmp = 2.0d0 / ((k ** 2.0d0) * ((k ** 2.0d0) * (t_m / (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 t_2 = Math.pow((k / t_m), 2.0);
double tmp;
if ((2.0 / ((Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l)))) * (1.0 + (t_2 + 1.0)))) <= 2e+257) {
tmp = 2.0 / ((1.0 / l) * ((Math.tan(k) * (2.0 + t_2)) * (Math.sin(k) * (Math.pow(t_m, 3.0) / l))));
} else {
tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(k, 2.0) * (t_m / Math.pow(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): t_2 = math.pow((k / t_m), 2.0) tmp = 0 if (2.0 / ((math.tan(k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l)))) * (1.0 + (t_2 + 1.0)))) <= 2e+257: tmp = 2.0 / ((1.0 / l) * ((math.tan(k) * (2.0 + t_2)) * (math.sin(k) * (math.pow(t_m, 3.0) / l)))) else: tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(k, 2.0) * (t_m / math.pow(l, 2.0)))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(k / t_m) ^ 2.0 tmp = 0.0 if (Float64(2.0 / Float64(Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l)))) * Float64(1.0 + Float64(t_2 + 1.0)))) <= 2e+257) tmp = Float64(2.0 / Float64(Float64(1.0 / l) * Float64(Float64(tan(k) * Float64(2.0 + t_2)) * Float64(sin(k) * Float64((t_m ^ 3.0) / l))))); else tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((k ^ 2.0) * Float64(t_m / (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) t_2 = (k / t_m) ^ 2.0; tmp = 0.0; if ((2.0 / ((tan(k) * (sin(k) * ((t_m ^ 3.0) / (l * l)))) * (1.0 + (t_2 + 1.0)))) <= 2e+257) tmp = 2.0 / ((1.0 / l) * ((tan(k) * (2.0 + t_2)) * (sin(k) * ((t_m ^ 3.0) / l)))); else tmp = 2.0 / ((k ^ 2.0) * ((k ^ 2.0) * (t_m / (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_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(t$95$2 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e+257], N[(2.0 / N[(N[(1.0 / l), $MachinePrecision] * N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{2}{\left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right) \cdot \left(1 + \left(t\_2 + 1\right)\right)} \leq 2 \cdot 10^{+257}:\\
\;\;\;\;\frac{2}{\frac{1}{\ell} \cdot \left(\left(\tan k \cdot \left(2 + t\_2\right)\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({k}^{2} \cdot \frac{t\_m}{{\ell}^{2}}\right)}\\
\end{array}
\end{array}
\end{array}
if (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))) < 2.00000000000000006e257Initial program 84.7%
Simplified84.7%
associate-*l*72.5%
associate-/r*75.0%
associate-+r+75.0%
metadata-eval75.0%
associate-*l*75.0%
associate-*l/75.5%
clear-num75.5%
associate-*l*75.4%
Applied egg-rr75.4%
associate-/r/75.4%
associate-*r*88.5%
Simplified88.5%
if 2.00000000000000006e257 < (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))) Initial program 23.6%
Simplified23.6%
add-cube-cbrt23.6%
pow323.6%
*-commutative23.6%
cbrt-prod23.6%
cbrt-div23.6%
rem-cbrt-cube36.3%
cbrt-prod47.2%
pow247.2%
Applied egg-rr47.2%
Taylor expanded in k around inf 61.1%
associate-/l*59.5%
*-commutative59.5%
*-commutative59.5%
times-frac60.1%
Simplified60.1%
Taylor expanded in k around 0 47.1%
associate-/l*47.5%
Simplified47.5%
Final simplification72.1%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1.18e-112)
(/
2.0
(pow
(*
(cbrt (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0))))
(* t_m (* (pow (cbrt l) -2.0) (cbrt k))))
3.0))
(if (<= k 1e-17)
(pow
(/
(sqrt 2.0)
(*
(/ (pow t_m 1.5) l)
(* (hypot 1.0 (hypot 1.0 (/ k t_m))) (sqrt (* (sin k) (tan k))))))
2.0)
(*
2.0
(*
(/ (cos k) (* t_m (pow k 2.0)))
(/ (pow l 2.0) (pow (sin k) 2.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.18e-112) {
tmp = 2.0 / pow((cbrt((tan(k) * (2.0 + pow((k / t_m), 2.0)))) * (t_m * (pow(cbrt(l), -2.0) * cbrt(k)))), 3.0);
} else if (k <= 1e-17) {
tmp = pow((sqrt(2.0) / ((pow(t_m, 1.5) / l) * (hypot(1.0, hypot(1.0, (k / t_m))) * sqrt((sin(k) * tan(k)))))), 2.0);
} else {
tmp = 2.0 * ((cos(k) / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / pow(sin(k), 2.0)));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.18e-112) {
tmp = 2.0 / Math.pow((Math.cbrt((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0)))) * (t_m * (Math.pow(Math.cbrt(l), -2.0) * Math.cbrt(k)))), 3.0);
} else if (k <= 1e-17) {
tmp = Math.pow((Math.sqrt(2.0) / ((Math.pow(t_m, 1.5) / l) * (Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) * Math.sqrt((Math.sin(k) * Math.tan(k)))))), 2.0);
} else {
tmp = 2.0 * ((Math.cos(k) / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / Math.pow(Math.sin(k), 2.0)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.18e-112) tmp = Float64(2.0 / (Float64(cbrt(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0)))) * Float64(t_m * Float64((cbrt(l) ^ -2.0) * cbrt(k)))) ^ 3.0)); elseif (k <= 1e-17) tmp = Float64(sqrt(2.0) / Float64(Float64((t_m ^ 1.5) / l) * Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) * sqrt(Float64(sin(k) * tan(k)))))) ^ 2.0; else tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / (sin(k) ^ 2.0)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.18e-112], N[(2.0 / N[Power[N[(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] * N[(t$95$m * N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * N[Power[k, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1e-17], N[Power[N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] * N[Sqrt[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.18 \cdot 10^{-112}:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)} \cdot \left(t\_m \cdot \left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \sqrt[3]{k}\right)\right)\right)}^{3}}\\
\mathbf{elif}\;k \leq 10^{-17}:\\
\;\;\;\;{\left(\frac{\sqrt{2}}{\frac{{t\_m}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{{\sin k}^{2}}\right)\\
\end{array}
\end{array}
if k < 1.1799999999999999e-112Initial program 64.8%
Simplified64.8%
add-cube-cbrt64.8%
pow364.8%
*-commutative64.8%
cbrt-prod64.8%
cbrt-div64.7%
rem-cbrt-cube71.4%
cbrt-prod79.2%
pow279.2%
Applied egg-rr79.2%
pow179.2%
div-inv79.2%
pow-flip79.2%
metadata-eval79.2%
Applied egg-rr79.2%
unpow179.2%
associate-*r*79.3%
*-commutative79.3%
Simplified79.3%
add-cube-cbrt79.3%
pow379.3%
Applied egg-rr87.7%
Taylor expanded in k around 0 82.7%
if 1.1799999999999999e-112 < k < 1.00000000000000007e-17Initial program 53.6%
Simplified53.6%
Applied egg-rr41.9%
unpow241.9%
Simplified41.9%
if 1.00000000000000007e-17 < k Initial program 51.6%
associate-/r*51.6%
+-commutative51.6%
unpow251.6%
sqr-neg51.6%
distribute-frac-neg251.6%
distribute-frac-neg251.6%
unpow251.6%
+-commutative51.6%
associate-*l*51.6%
associate-*l/51.6%
associate-/r/51.6%
+-commutative51.6%
associate-+r+51.6%
Simplified51.6%
unpow251.6%
Applied egg-rr51.6%
Taylor expanded in t around 0 70.0%
*-commutative70.0%
associate-*r*70.1%
times-frac71.3%
Simplified71.3%
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
(*
t_s
(if (<= t_m 2.4e-103)
(*
2.0
(* (/ (cos k) (* t_m (pow k 2.0))) (/ (pow l 2.0) (pow (sin k) 2.0))))
(/
2.0
(pow
(*
t_m
(*
(* (cbrt (sin k)) (pow (cbrt l) -2.0))
(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 <= 2.4e-103) {
tmp = 2.0 * ((cos(k) / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / pow(sin(k), 2.0)));
} else {
tmp = 2.0 / pow((t_m * ((cbrt(sin(k)) * pow(cbrt(l), -2.0)) * 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 <= 2.4e-103) {
tmp = 2.0 * ((Math.cos(k) / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / Math.pow(Math.sin(k), 2.0)));
} else {
tmp = 2.0 / Math.pow((t_m * ((Math.cbrt(Math.sin(k)) * Math.pow(Math.cbrt(l), -2.0)) * 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 <= 2.4e-103) tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / (sin(k) ^ 2.0)))); else tmp = Float64(2.0 / (Float64(t_m * Float64(Float64(cbrt(sin(k)) * (cbrt(l) ^ -2.0)) * 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, 2.4e-103], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(t$95$m * N[(N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $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 2.4 \cdot 10^{-103}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{{\sin k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot \left(\left(\sqrt[3]{\sin k} \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\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 < 2.4000000000000002e-103Initial program 54.6%
associate-/r*54.6%
+-commutative54.6%
unpow254.6%
sqr-neg54.6%
distribute-frac-neg254.6%
distribute-frac-neg254.6%
unpow254.6%
+-commutative54.6%
associate-*l*47.9%
associate-*l/47.4%
associate-/r/46.2%
+-commutative46.2%
associate-+r+46.2%
Simplified46.2%
unpow246.2%
Applied egg-rr46.2%
Taylor expanded in t around 0 65.7%
*-commutative65.7%
associate-*r*65.7%
times-frac66.8%
Simplified66.8%
if 2.4000000000000002e-103 < t Initial program 72.2%
Simplified72.3%
add-cube-cbrt72.2%
pow372.2%
*-commutative72.2%
cbrt-prod72.1%
cbrt-div72.1%
rem-cbrt-cube78.2%
cbrt-prod88.2%
pow288.2%
Applied egg-rr88.2%
pow188.2%
div-inv88.1%
pow-flip88.1%
metadata-eval88.1%
Applied egg-rr88.1%
unpow188.1%
associate-*r*88.2%
*-commutative88.2%
Simplified88.2%
add-cube-cbrt88.2%
pow388.2%
Applied egg-rr95.8%
associate-*l*95.2%
Simplified95.2%
Final simplification76.1%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ l (hypot 1.0 (hypot 1.0 (/ k t_m))))))
(*
t_s
(if (<= t_m 4.3e-103)
(*
2.0
(* (/ (cos k) (* t_m (pow k 2.0))) (/ (pow l 2.0) (pow (sin k) 2.0))))
(if (<= t_m 8.2e+26)
(* t_2 (* (/ 2.0 (* (* (sin k) (tan k)) (pow t_m 3.0))) t_2))
(/
2.0
(pow
(*
(* t_m (* (cbrt (sin k)) (pow (cbrt l) -2.0)))
(* (cbrt k) (cbrt 2.0)))
3.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = l / hypot(1.0, hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 4.3e-103) {
tmp = 2.0 * ((cos(k) / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / pow(sin(k), 2.0)));
} else if (t_m <= 8.2e+26) {
tmp = t_2 * ((2.0 / ((sin(k) * tan(k)) * pow(t_m, 3.0))) * t_2);
} else {
tmp = 2.0 / pow(((t_m * (cbrt(sin(k)) * pow(cbrt(l), -2.0))) * (cbrt(k) * cbrt(2.0))), 3.0);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = l / Math.hypot(1.0, Math.hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 4.3e-103) {
tmp = 2.0 * ((Math.cos(k) / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / Math.pow(Math.sin(k), 2.0)));
} else if (t_m <= 8.2e+26) {
tmp = t_2 * ((2.0 / ((Math.sin(k) * Math.tan(k)) * Math.pow(t_m, 3.0))) * t_2);
} else {
tmp = 2.0 / Math.pow(((t_m * (Math.cbrt(Math.sin(k)) * Math.pow(Math.cbrt(l), -2.0))) * (Math.cbrt(k) * Math.cbrt(2.0))), 3.0);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(l / hypot(1.0, hypot(1.0, Float64(k / t_m)))) tmp = 0.0 if (t_m <= 4.3e-103) tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / (sin(k) ^ 2.0)))); elseif (t_m <= 8.2e+26) tmp = Float64(t_2 * Float64(Float64(2.0 / Float64(Float64(sin(k) * tan(k)) * (t_m ^ 3.0))) * t_2)); else tmp = Float64(2.0 / (Float64(Float64(t_m * Float64(cbrt(sin(k)) * (cbrt(l) ^ -2.0))) * Float64(cbrt(k) * cbrt(2.0))) ^ 3.0)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(l / N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 4.3e-103], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 8.2e+26], N[(t$95$2 * N[(N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(t$95$m * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[k, 1/3], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.3 \cdot 10^{-103}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{{\sin k}^{2}}\right)\\
\mathbf{elif}\;t\_m \leq 8.2 \cdot 10^{+26}:\\
\;\;\;\;t\_2 \cdot \left(\frac{2}{\left(\sin k \cdot \tan k\right) \cdot {t\_m}^{3}} \cdot t\_2\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot \left(\sqrt[3]{\sin k} \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right) \cdot \left(\sqrt[3]{k} \cdot \sqrt[3]{2}\right)\right)}^{3}}\\
\end{array}
\end{array}
\end{array}
if t < 4.30000000000000023e-103Initial program 54.6%
associate-/r*54.6%
+-commutative54.6%
unpow254.6%
sqr-neg54.6%
distribute-frac-neg254.6%
distribute-frac-neg254.6%
unpow254.6%
+-commutative54.6%
associate-*l*47.9%
associate-*l/47.4%
associate-/r/46.2%
+-commutative46.2%
associate-+r+46.2%
Simplified46.2%
unpow246.2%
Applied egg-rr46.2%
Taylor expanded in t around 0 65.7%
*-commutative65.7%
associate-*r*65.7%
times-frac66.8%
Simplified66.8%
if 4.30000000000000023e-103 < t < 8.19999999999999967e26Initial program 84.5%
associate-/r*84.6%
+-commutative84.6%
unpow284.6%
sqr-neg84.6%
distribute-frac-neg284.6%
distribute-frac-neg284.6%
unpow284.6%
+-commutative84.6%
associate-*l*84.6%
associate-*l/84.6%
associate-/r/84.6%
+-commutative84.6%
associate-+r+84.6%
Simplified84.6%
associate-*r*88.3%
add-sqr-sqrt88.4%
times-frac88.6%
Applied egg-rr92.4%
associate-/l*96.1%
associate-*l*96.1%
Simplified96.1%
if 8.19999999999999967e26 < t Initial program 66.7%
Simplified66.8%
add-cube-cbrt66.7%
pow366.7%
*-commutative66.7%
cbrt-prod66.7%
cbrt-div66.7%
rem-cbrt-cube75.5%
cbrt-prod86.8%
pow286.8%
Applied egg-rr86.8%
pow186.8%
div-inv86.8%
pow-flip86.8%
metadata-eval86.8%
Applied egg-rr86.8%
unpow186.8%
associate-*r*86.9%
*-commutative86.9%
Simplified86.9%
add-cube-cbrt86.9%
pow386.9%
Applied egg-rr97.8%
Taylor expanded in k around 0 88.4%
Final simplification74.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 2.9e-101)
(*
2.0
(* (/ (cos k) (* t_m (pow k 2.0))) (/ (pow l 2.0) (pow (sin k) 2.0))))
(/
2.0
(*
(pow (* (pow (cbrt l) -2.0) (* t_m (cbrt (sin k)))) 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 <= 2.9e-101) {
tmp = 2.0 * ((cos(k) / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / pow(sin(k), 2.0)));
} else {
tmp = 2.0 / (pow((pow(cbrt(l), -2.0) * (t_m * cbrt(sin(k)))), 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 <= 2.9e-101) {
tmp = 2.0 * ((Math.cos(k) / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / Math.pow(Math.sin(k), 2.0)));
} else {
tmp = 2.0 / (Math.pow((Math.pow(Math.cbrt(l), -2.0) * (t_m * Math.cbrt(Math.sin(k)))), 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 <= 2.9e-101) tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / (sin(k) ^ 2.0)))); else tmp = Float64(2.0 / Float64((Float64((cbrt(l) ^ -2.0) * Float64(t_m * cbrt(sin(k)))) ^ 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, 2.9e-101], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / 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[(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 2.9 \cdot 10^{-101}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{{\sin k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \left(t\_m \cdot \sqrt[3]{\sin k}\right)\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 < 2.9e-101Initial program 54.6%
associate-/r*54.6%
+-commutative54.6%
unpow254.6%
sqr-neg54.6%
distribute-frac-neg254.6%
distribute-frac-neg254.6%
unpow254.6%
+-commutative54.6%
associate-*l*47.9%
associate-*l/47.4%
associate-/r/46.2%
+-commutative46.2%
associate-+r+46.2%
Simplified46.2%
unpow246.2%
Applied egg-rr46.2%
Taylor expanded in t around 0 65.7%
*-commutative65.7%
associate-*r*65.7%
times-frac66.8%
Simplified66.8%
if 2.9e-101 < t Initial program 72.2%
Simplified72.3%
add-cube-cbrt72.2%
pow372.2%
*-commutative72.2%
cbrt-prod72.1%
cbrt-div72.1%
rem-cbrt-cube78.2%
cbrt-prod88.2%
pow288.2%
Applied egg-rr88.2%
pow188.2%
div-inv88.1%
pow-flip88.1%
metadata-eval88.1%
Applied egg-rr88.1%
unpow188.1%
associate-*r*88.2%
*-commutative88.2%
Simplified88.2%
Final simplification73.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 5.2e-103)
(*
2.0
(* (/ (cos k) (* t_m (pow k 2.0))) (/ (pow l 2.0) (pow (sin k) 2.0))))
(if (<= t_m 1.55e+167)
(/
2.0
(*
(+ 2.0 (pow (/ k t_m) 2.0))
(* (tan k) (* (pow (/ (pow t_m 1.5) (sqrt l)) 2.0) (/ (sin k) l)))))
(/
2.0
(pow
(*
(* t_m (* (cbrt (sin k)) (pow (cbrt l) -2.0)))
(* (cbrt k) (cbrt 2.0)))
3.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5.2e-103) {
tmp = 2.0 * ((cos(k) / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / pow(sin(k), 2.0)));
} else if (t_m <= 1.55e+167) {
tmp = 2.0 / ((2.0 + pow((k / t_m), 2.0)) * (tan(k) * (pow((pow(t_m, 1.5) / sqrt(l)), 2.0) * (sin(k) / l))));
} else {
tmp = 2.0 / pow(((t_m * (cbrt(sin(k)) * pow(cbrt(l), -2.0))) * (cbrt(k) * cbrt(2.0))), 3.0);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5.2e-103) {
tmp = 2.0 * ((Math.cos(k) / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / Math.pow(Math.sin(k), 2.0)));
} else if (t_m <= 1.55e+167) {
tmp = 2.0 / ((2.0 + Math.pow((k / t_m), 2.0)) * (Math.tan(k) * (Math.pow((Math.pow(t_m, 1.5) / Math.sqrt(l)), 2.0) * (Math.sin(k) / l))));
} else {
tmp = 2.0 / Math.pow(((t_m * (Math.cbrt(Math.sin(k)) * Math.pow(Math.cbrt(l), -2.0))) * (Math.cbrt(k) * Math.cbrt(2.0))), 3.0);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 5.2e-103) tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / (sin(k) ^ 2.0)))); elseif (t_m <= 1.55e+167) tmp = Float64(2.0 / Float64(Float64(2.0 + (Float64(k / t_m) ^ 2.0)) * Float64(tan(k) * Float64((Float64((t_m ^ 1.5) / sqrt(l)) ^ 2.0) * Float64(sin(k) / l))))); else tmp = Float64(2.0 / (Float64(Float64(t_m * Float64(cbrt(sin(k)) * (cbrt(l) ^ -2.0))) * Float64(cbrt(k) * cbrt(2.0))) ^ 3.0)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 5.2e-103], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.55e+167], N[(2.0 / N[(N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(t$95$m * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[k, 1/3], $MachinePrecision] * N[Power[2.0, 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 5.2 \cdot 10^{-103}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{{\sin k}^{2}}\right)\\
\mathbf{elif}\;t\_m \leq 1.55 \cdot 10^{+167}:\\
\;\;\;\;\frac{2}{\left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right) \cdot \left(\tan k \cdot \left({\left(\frac{{t\_m}^{1.5}}{\sqrt{\ell}}\right)}^{2} \cdot \frac{\sin k}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot \left(\sqrt[3]{\sin k} \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right) \cdot \left(\sqrt[3]{k} \cdot \sqrt[3]{2}\right)\right)}^{3}}\\
\end{array}
\end{array}
if t < 5.19999999999999993e-103Initial program 54.6%
associate-/r*54.6%
+-commutative54.6%
unpow254.6%
sqr-neg54.6%
distribute-frac-neg254.6%
distribute-frac-neg254.6%
unpow254.6%
+-commutative54.6%
associate-*l*47.9%
associate-*l/47.4%
associate-/r/46.2%
+-commutative46.2%
associate-+r+46.2%
Simplified46.2%
unpow246.2%
Applied egg-rr46.2%
Taylor expanded in t around 0 65.7%
*-commutative65.7%
associate-*r*65.7%
times-frac66.8%
Simplified66.8%
if 5.19999999999999993e-103 < t < 1.55e167Initial program 77.7%
Simplified77.8%
associate-/r*82.1%
add-sqr-sqrt40.3%
*-un-lft-identity40.3%
times-frac40.3%
sqrt-div40.3%
sqrt-pow140.3%
metadata-eval40.3%
sqrt-div40.3%
sqrt-pow144.3%
metadata-eval44.3%
Applied egg-rr44.3%
/-rgt-identity44.3%
associate-*r/44.3%
unpow244.3%
Simplified44.3%
pow144.3%
associate-*l*44.3%
associate-+r+44.3%
metadata-eval44.3%
Applied egg-rr44.3%
unpow144.3%
associate-*r*44.3%
*-commutative44.3%
associate-*r*44.3%
associate-*r/44.3%
*-commutative44.3%
associate-/l*44.4%
Simplified44.4%
if 1.55e167 < t Initial program 64.9%
Simplified64.9%
add-cube-cbrt64.9%
pow364.9%
*-commutative64.9%
cbrt-prod64.9%
cbrt-div64.9%
rem-cbrt-cube70.6%
cbrt-prod83.7%
pow283.7%
Applied egg-rr83.7%
pow183.7%
div-inv83.6%
pow-flip83.7%
metadata-eval83.7%
Applied egg-rr83.7%
unpow183.7%
associate-*r*83.7%
*-commutative83.7%
Simplified83.7%
add-cube-cbrt83.7%
pow383.7%
Applied egg-rr98.6%
Taylor expanded in k around 0 93.6%
Final simplification66.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 4e-101)
(*
2.0
(* (/ (cos k) (* t_m (pow k 2.0))) (/ (pow l 2.0) (pow (sin k) 2.0))))
(/
2.0
(*
(* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
(pow (* t_m (* (cbrt (sin k)) (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 <= 4e-101) {
tmp = 2.0 * ((cos(k) / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / pow(sin(k), 2.0)));
} else {
tmp = 2.0 / ((tan(k) * (2.0 + pow((k / t_m), 2.0))) * pow((t_m * (cbrt(sin(k)) * 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 <= 4e-101) {
tmp = 2.0 * ((Math.cos(k) / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / Math.pow(Math.sin(k), 2.0)));
} else {
tmp = 2.0 / ((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))) * Math.pow((t_m * (Math.cbrt(Math.sin(k)) * 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 <= 4e-101) tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / (sin(k) ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * (Float64(t_m * Float64(cbrt(sin(k)) * (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, 4e-101], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[(t$95$m * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4 \cdot 10^{-101}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{{\sin k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right) \cdot {\left(t\_m \cdot \left(\sqrt[3]{\sin k} \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right)}^{3}}\\
\end{array}
\end{array}
if t < 4.00000000000000021e-101Initial program 54.6%
associate-/r*54.6%
+-commutative54.6%
unpow254.6%
sqr-neg54.6%
distribute-frac-neg254.6%
distribute-frac-neg254.6%
unpow254.6%
+-commutative54.6%
associate-*l*47.9%
associate-*l/47.4%
associate-/r/46.2%
+-commutative46.2%
associate-+r+46.2%
Simplified46.2%
unpow246.2%
Applied egg-rr46.2%
Taylor expanded in t around 0 65.7%
*-commutative65.7%
associate-*r*65.7%
times-frac66.8%
Simplified66.8%
if 4.00000000000000021e-101 < t Initial program 72.2%
Simplified72.3%
add-cube-cbrt72.2%
pow372.2%
*-commutative72.2%
cbrt-prod72.1%
cbrt-div72.1%
rem-cbrt-cube78.2%
cbrt-prod88.2%
pow288.2%
Applied egg-rr88.2%
pow188.2%
div-inv88.1%
pow-flip88.1%
metadata-eval88.1%
Applied egg-rr88.1%
unpow188.1%
associate-*r*88.2%
*-commutative88.2%
Simplified88.2%
add-cube-cbrt88.2%
pow388.2%
Applied egg-rr95.8%
*-commutative95.8%
cube-prod88.2%
rem-cube-cbrt88.2%
Simplified88.2%
Final simplification73.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.35e-102)
(*
2.0
(* (/ (cos k) (* t_m (pow k 2.0))) (/ (pow l 2.0) (pow (sin k) 2.0))))
(/
2.0
(*
(* (tan k) (+ 1.0 (+ (pow (/ k t_m) 2.0) 1.0)))
(* (sin k) (pow (/ (pow t_m 1.5) 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.35e-102) {
tmp = 2.0 * ((cos(k) / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / pow(sin(k), 2.0)));
} else {
tmp = 2.0 / ((tan(k) * (1.0 + (pow((k / t_m), 2.0) + 1.0))) * (sin(k) * pow((pow(t_m, 1.5) / 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.35d-102) then
tmp = 2.0d0 * ((cos(k) / (t_m * (k ** 2.0d0))) * ((l ** 2.0d0) / (sin(k) ** 2.0d0)))
else
tmp = 2.0d0 / ((tan(k) * (1.0d0 + (((k / t_m) ** 2.0d0) + 1.0d0))) * (sin(k) * (((t_m ** 1.5d0) / 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.35e-102) {
tmp = 2.0 * ((Math.cos(k) / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / Math.pow(Math.sin(k), 2.0)));
} else {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (Math.pow((k / t_m), 2.0) + 1.0))) * (Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / 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.35e-102: tmp = 2.0 * ((math.cos(k) / (t_m * math.pow(k, 2.0))) * (math.pow(l, 2.0) / math.pow(math.sin(k), 2.0))) else: tmp = 2.0 / ((math.tan(k) * (1.0 + (math.pow((k / t_m), 2.0) + 1.0))) * (math.sin(k) * math.pow((math.pow(t_m, 1.5) / 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.35e-102) tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / (sin(k) ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64((Float64(k / t_m) ^ 2.0) + 1.0))) * Float64(sin(k) * (Float64((t_m ^ 1.5) / 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.35e-102) tmp = 2.0 * ((cos(k) / (t_m * (k ^ 2.0))) * ((l ^ 2.0) / (sin(k) ^ 2.0))); else tmp = 2.0 / ((tan(k) * (1.0 + (((k / t_m) ^ 2.0) + 1.0))) * (sin(k) * (((t_m ^ 1.5) / 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.35e-102], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(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] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.35 \cdot 10^{-102}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{{\sin k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right)\right)\right) \cdot \left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\right)}\\
\end{array}
\end{array}
if t < 1.35e-102Initial program 54.6%
associate-/r*54.6%
+-commutative54.6%
unpow254.6%
sqr-neg54.6%
distribute-frac-neg254.6%
distribute-frac-neg254.6%
unpow254.6%
+-commutative54.6%
associate-*l*47.9%
associate-*l/47.4%
associate-/r/46.2%
+-commutative46.2%
associate-+r+46.2%
Simplified46.2%
unpow246.2%
Applied egg-rr46.2%
Taylor expanded in t around 0 65.7%
*-commutative65.7%
associate-*r*65.7%
times-frac66.8%
Simplified66.8%
if 1.35e-102 < t Initial program 72.2%
Simplified72.3%
add-sqr-sqrt72.2%
pow272.2%
sqrt-div72.2%
sqrt-pow177.1%
metadata-eval77.1%
sqrt-prod46.8%
add-sqr-sqrt86.4%
Applied egg-rr86.4%
Final simplification73.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.12e-100)
(*
2.0
(* (/ (cos k) (* t_m (pow k 2.0))) (/ (pow l 2.0) (pow (sin k) 2.0))))
(/
2.0
(*
(* (tan k) (+ 1.0 (+ (pow (/ k t_m) 2.0) 1.0)))
(* (sin k) (* (/ (pow t_m 2.0) l) (/ t_m 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 <= 1.12e-100) {
tmp = 2.0 * ((cos(k) / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / pow(sin(k), 2.0)));
} else {
tmp = 2.0 / ((tan(k) * (1.0 + (pow((k / t_m), 2.0) + 1.0))) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / 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 <= 1.12d-100) then
tmp = 2.0d0 * ((cos(k) / (t_m * (k ** 2.0d0))) * ((l ** 2.0d0) / (sin(k) ** 2.0d0)))
else
tmp = 2.0d0 / ((tan(k) * (1.0d0 + (((k / t_m) ** 2.0d0) + 1.0d0))) * (sin(k) * (((t_m ** 2.0d0) / l) * (t_m / 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 <= 1.12e-100) {
tmp = 2.0 * ((Math.cos(k) / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / Math.pow(Math.sin(k), 2.0)));
} else {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (Math.pow((k / t_m), 2.0) + 1.0))) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / 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 <= 1.12e-100: tmp = 2.0 * ((math.cos(k) / (t_m * math.pow(k, 2.0))) * (math.pow(l, 2.0) / math.pow(math.sin(k), 2.0))) else: tmp = 2.0 / ((math.tan(k) * (1.0 + (math.pow((k / t_m), 2.0) + 1.0))) * (math.sin(k) * ((math.pow(t_m, 2.0) / l) * (t_m / 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 <= 1.12e-100) tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / (sin(k) ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64((Float64(k / t_m) ^ 2.0) + 1.0))) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / 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 <= 1.12e-100) tmp = 2.0 * ((cos(k) / (t_m * (k ^ 2.0))) * ((l ^ 2.0) / (sin(k) ^ 2.0))); else tmp = 2.0 / ((tan(k) * (1.0 + (((k / t_m) ^ 2.0) + 1.0))) * (sin(k) * (((t_m ^ 2.0) / l) * (t_m / 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, 1.12e-100], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(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] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $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.12 \cdot 10^{-100}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{{\sin k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right)\right)\right) \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\
\end{array}
\end{array}
if t < 1.11999999999999996e-100Initial program 54.6%
associate-/r*54.6%
+-commutative54.6%
unpow254.6%
sqr-neg54.6%
distribute-frac-neg254.6%
distribute-frac-neg254.6%
unpow254.6%
+-commutative54.6%
associate-*l*47.9%
associate-*l/47.4%
associate-/r/46.2%
+-commutative46.2%
associate-+r+46.2%
Simplified46.2%
unpow246.2%
Applied egg-rr46.2%
Taylor expanded in t around 0 65.7%
*-commutative65.7%
associate-*r*65.7%
times-frac66.8%
Simplified66.8%
if 1.11999999999999996e-100 < t Initial program 72.2%
Simplified72.3%
unpow372.3%
times-frac80.8%
pow280.8%
Applied egg-rr80.8%
Final simplification71.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 5e-97)
(pow (* (* (/ l k) (/ (sqrt 2.0) (sin k))) (sqrt (/ (cos k) t_m))) 2.0)
(/
2.0
(*
(* (tan k) (+ 1.0 (+ (pow (/ k t_m) 2.0) 1.0)))
(* (sin k) (* (/ (pow t_m 2.0) l) (/ t_m 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 <= 5e-97) {
tmp = pow((((l / k) * (sqrt(2.0) / sin(k))) * sqrt((cos(k) / t_m))), 2.0);
} else {
tmp = 2.0 / ((tan(k) * (1.0 + (pow((k / t_m), 2.0) + 1.0))) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / 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 <= 5d-97) then
tmp = (((l / k) * (sqrt(2.0d0) / sin(k))) * sqrt((cos(k) / t_m))) ** 2.0d0
else
tmp = 2.0d0 / ((tan(k) * (1.0d0 + (((k / t_m) ** 2.0d0) + 1.0d0))) * (sin(k) * (((t_m ** 2.0d0) / l) * (t_m / 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 <= 5e-97) {
tmp = Math.pow((((l / k) * (Math.sqrt(2.0) / Math.sin(k))) * Math.sqrt((Math.cos(k) / t_m))), 2.0);
} else {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (Math.pow((k / t_m), 2.0) + 1.0))) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / 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 <= 5e-97: tmp = math.pow((((l / k) * (math.sqrt(2.0) / math.sin(k))) * math.sqrt((math.cos(k) / t_m))), 2.0) else: tmp = 2.0 / ((math.tan(k) * (1.0 + (math.pow((k / t_m), 2.0) + 1.0))) * (math.sin(k) * ((math.pow(t_m, 2.0) / l) * (t_m / 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 <= 5e-97) tmp = Float64(Float64(Float64(l / k) * Float64(sqrt(2.0) / sin(k))) * sqrt(Float64(cos(k) / t_m))) ^ 2.0; else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64((Float64(k / t_m) ^ 2.0) + 1.0))) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / 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 <= 5e-97) tmp = (((l / k) * (sqrt(2.0) / sin(k))) * sqrt((cos(k) / t_m))) ^ 2.0; else tmp = 2.0 / ((tan(k) * (1.0 + (((k / t_m) ^ 2.0) + 1.0))) * (sin(k) * (((t_m ^ 2.0) / l) * (t_m / 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, 5e-97], N[Power[N[(N[(N[(l / k), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(2.0 / N[(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] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $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 5 \cdot 10^{-97}:\\
\;\;\;\;{\left(\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right) \cdot \sqrt{\frac{\cos k}{t\_m}}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right)\right)\right) \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\
\end{array}
\end{array}
if t < 4.9999999999999995e-97Initial program 54.8%
associate-/r*54.8%
+-commutative54.8%
unpow254.8%
sqr-neg54.8%
distribute-frac-neg254.8%
distribute-frac-neg254.8%
unpow254.8%
+-commutative54.8%
associate-*l*48.2%
associate-*l/47.7%
associate-/r/46.5%
+-commutative46.5%
associate-+r+46.5%
Simplified46.5%
add-sqr-sqrt30.8%
pow230.8%
Applied egg-rr35.9%
Taylor expanded in t around 0 41.9%
times-frac42.0%
Simplified42.0%
if 4.9999999999999995e-97 < t Initial program 71.9%
Simplified71.9%
unpow371.9%
times-frac80.6%
pow280.6%
Applied egg-rr80.6%
Final simplification54.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 2.05e-104)
(/ 2.0 (* (pow k 2.0) (* (pow k 2.0) (/ t_m (pow l 2.0)))))
(if (<= t_m 2.4e-13)
(/ 2.0 (/ (* (/ (pow t_m 3.0) l) (* (sin k) (* (tan k) t_2))) l))
(* (/ l t_2) (* l (/ 2.0 (* (tan k) (* k (pow t_m 3.0)))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = 2.0 + pow((k / t_m), 2.0);
double tmp;
if (t_m <= 2.05e-104) {
tmp = 2.0 / (pow(k, 2.0) * (pow(k, 2.0) * (t_m / pow(l, 2.0))));
} else if (t_m <= 2.4e-13) {
tmp = 2.0 / (((pow(t_m, 3.0) / l) * (sin(k) * (tan(k) * t_2))) / l);
} else {
tmp = (l / t_2) * (l * (2.0 / (tan(k) * (k * pow(t_m, 3.0)))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: tmp
t_2 = 2.0d0 + ((k / t_m) ** 2.0d0)
if (t_m <= 2.05d-104) then
tmp = 2.0d0 / ((k ** 2.0d0) * ((k ** 2.0d0) * (t_m / (l ** 2.0d0))))
else if (t_m <= 2.4d-13) then
tmp = 2.0d0 / ((((t_m ** 3.0d0) / l) * (sin(k) * (tan(k) * t_2))) / l)
else
tmp = (l / t_2) * (l * (2.0d0 / (tan(k) * (k * (t_m ** 3.0d0)))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = 2.0 + Math.pow((k / t_m), 2.0);
double tmp;
if (t_m <= 2.05e-104) {
tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(k, 2.0) * (t_m / Math.pow(l, 2.0))));
} else if (t_m <= 2.4e-13) {
tmp = 2.0 / (((Math.pow(t_m, 3.0) / l) * (Math.sin(k) * (Math.tan(k) * t_2))) / l);
} else {
tmp = (l / t_2) * (l * (2.0 / (Math.tan(k) * (k * Math.pow(t_m, 3.0)))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = 2.0 + math.pow((k / t_m), 2.0) tmp = 0 if t_m <= 2.05e-104: tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(k, 2.0) * (t_m / math.pow(l, 2.0)))) elif t_m <= 2.4e-13: tmp = 2.0 / (((math.pow(t_m, 3.0) / l) * (math.sin(k) * (math.tan(k) * t_2))) / l) else: tmp = (l / t_2) * (l * (2.0 / (math.tan(k) * (k * math.pow(t_m, 3.0))))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(2.0 + (Float64(k / t_m) ^ 2.0)) tmp = 0.0 if (t_m <= 2.05e-104) tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((k ^ 2.0) * Float64(t_m / (l ^ 2.0))))); elseif (t_m <= 2.4e-13) tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 3.0) / l) * Float64(sin(k) * Float64(tan(k) * t_2))) / l)); else tmp = Float64(Float64(l / t_2) * Float64(l * Float64(2.0 / Float64(tan(k) * Float64(k * (t_m ^ 3.0)))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = 2.0 + ((k / t_m) ^ 2.0); tmp = 0.0; if (t_m <= 2.05e-104) tmp = 2.0 / ((k ^ 2.0) * ((k ^ 2.0) * (t_m / (l ^ 2.0)))); elseif (t_m <= 2.4e-13) tmp = 2.0 / ((((t_m ^ 3.0) / l) * (sin(k) * (tan(k) * t_2))) / l); else tmp = (l / t_2) * (l * (2.0 / (tan(k) * (k * (t_m ^ 3.0))))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.05e-104], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.4e-13], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(l / t$95$2), $MachinePrecision] * N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(k * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := 2 + {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.05 \cdot 10^{-104}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({k}^{2} \cdot \frac{t\_m}{{\ell}^{2}}\right)}\\
\mathbf{elif}\;t\_m \leq 2.4 \cdot 10^{-13}:\\
\;\;\;\;\frac{2}{\frac{\frac{{t\_m}^{3}}{\ell} \cdot \left(\sin k \cdot \left(\tan k \cdot t\_2\right)\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{t\_2} \cdot \left(\ell \cdot \frac{2}{\tan k \cdot \left(k \cdot {t\_m}^{3}\right)}\right)\\
\end{array}
\end{array}
\end{array}
if t < 2.04999999999999992e-104Initial program 54.6%
Simplified54.6%
add-cube-cbrt54.5%
pow354.5%
*-commutative54.5%
cbrt-prod54.5%
cbrt-div54.5%
rem-cbrt-cube62.8%
cbrt-prod67.1%
pow267.1%
Applied egg-rr67.1%
Taylor expanded in k around inf 65.6%
associate-/l*64.7%
*-commutative64.7%
*-commutative64.7%
times-frac66.1%
Simplified66.1%
Taylor expanded in k around 0 56.9%
associate-/l*58.1%
Simplified58.1%
if 2.04999999999999992e-104 < t < 2.3999999999999999e-13Initial program 85.8%
Simplified85.9%
associate-*l*85.8%
associate-/r*95.0%
associate-+r+95.0%
metadata-eval95.0%
associate-*l*95.0%
associate-*l/95.2%
associate-*l*95.0%
Applied egg-rr95.0%
if 2.3999999999999999e-13 < t Initial program 67.7%
associate-/r*67.8%
+-commutative67.8%
unpow267.8%
sqr-neg67.8%
distribute-frac-neg267.8%
distribute-frac-neg267.8%
unpow267.8%
+-commutative67.8%
associate-*l*55.9%
associate-*l/56.0%
associate-/r/56.0%
+-commutative56.0%
associate-+r+56.0%
Simplified56.0%
associate-*r*58.0%
*-un-lft-identity58.0%
times-frac58.0%
associate-*r*69.9%
Applied egg-rr69.9%
Taylor expanded in k around 0 65.4%
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 (+ 2.0 (pow (/ k t_m) 2.0))))
(*
t_s
(if (<= t_m 3.1e-102)
(/ 2.0 (* (pow k 2.0) (* (pow k 2.0) (/ t_m (pow l 2.0)))))
(if (<= t_m 1.05e-7)
(/ 2.0 (* (/ (/ (pow t_m 3.0) l) l) (* t_2 (* (sin k) (tan k)))))
(* (/ l t_2) (* l (/ 2.0 (* (tan k) (* k (pow t_m 3.0)))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = 2.0 + pow((k / t_m), 2.0);
double tmp;
if (t_m <= 3.1e-102) {
tmp = 2.0 / (pow(k, 2.0) * (pow(k, 2.0) * (t_m / pow(l, 2.0))));
} else if (t_m <= 1.05e-7) {
tmp = 2.0 / (((pow(t_m, 3.0) / l) / l) * (t_2 * (sin(k) * tan(k))));
} else {
tmp = (l / t_2) * (l * (2.0 / (tan(k) * (k * pow(t_m, 3.0)))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: tmp
t_2 = 2.0d0 + ((k / t_m) ** 2.0d0)
if (t_m <= 3.1d-102) then
tmp = 2.0d0 / ((k ** 2.0d0) * ((k ** 2.0d0) * (t_m / (l ** 2.0d0))))
else if (t_m <= 1.05d-7) then
tmp = 2.0d0 / ((((t_m ** 3.0d0) / l) / l) * (t_2 * (sin(k) * tan(k))))
else
tmp = (l / t_2) * (l * (2.0d0 / (tan(k) * (k * (t_m ** 3.0d0)))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = 2.0 + Math.pow((k / t_m), 2.0);
double tmp;
if (t_m <= 3.1e-102) {
tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(k, 2.0) * (t_m / Math.pow(l, 2.0))));
} else if (t_m <= 1.05e-7) {
tmp = 2.0 / (((Math.pow(t_m, 3.0) / l) / l) * (t_2 * (Math.sin(k) * Math.tan(k))));
} else {
tmp = (l / t_2) * (l * (2.0 / (Math.tan(k) * (k * Math.pow(t_m, 3.0)))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = 2.0 + math.pow((k / t_m), 2.0) tmp = 0 if t_m <= 3.1e-102: tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(k, 2.0) * (t_m / math.pow(l, 2.0)))) elif t_m <= 1.05e-7: tmp = 2.0 / (((math.pow(t_m, 3.0) / l) / l) * (t_2 * (math.sin(k) * math.tan(k)))) else: tmp = (l / t_2) * (l * (2.0 / (math.tan(k) * (k * math.pow(t_m, 3.0))))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(2.0 + (Float64(k / t_m) ^ 2.0)) tmp = 0.0 if (t_m <= 3.1e-102) tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((k ^ 2.0) * Float64(t_m / (l ^ 2.0))))); elseif (t_m <= 1.05e-7) tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 3.0) / l) / l) * Float64(t_2 * Float64(sin(k) * tan(k))))); else tmp = Float64(Float64(l / t_2) * Float64(l * Float64(2.0 / Float64(tan(k) * Float64(k * (t_m ^ 3.0)))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = 2.0 + ((k / t_m) ^ 2.0); tmp = 0.0; if (t_m <= 3.1e-102) tmp = 2.0 / ((k ^ 2.0) * ((k ^ 2.0) * (t_m / (l ^ 2.0)))); elseif (t_m <= 1.05e-7) tmp = 2.0 / ((((t_m ^ 3.0) / l) / l) * (t_2 * (sin(k) * tan(k)))); else tmp = (l / t_2) * (l * (2.0 / (tan(k) * (k * (t_m ^ 3.0))))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := 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, 3.1e-102], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.05e-7], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$2 * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / t$95$2), $MachinePrecision] * N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(k * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := 2 + {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.1 \cdot 10^{-102}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({k}^{2} \cdot \frac{t\_m}{{\ell}^{2}}\right)}\\
\mathbf{elif}\;t\_m \leq 1.05 \cdot 10^{-7}:\\
\;\;\;\;\frac{2}{\frac{\frac{{t\_m}^{3}}{\ell}}{\ell} \cdot \left(t\_2 \cdot \left(\sin k \cdot \tan k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{t\_2} \cdot \left(\ell \cdot \frac{2}{\tan k \cdot \left(k \cdot {t\_m}^{3}\right)}\right)\\
\end{array}
\end{array}
\end{array}
if t < 3.10000000000000013e-102Initial program 54.6%
Simplified54.6%
add-cube-cbrt54.5%
pow354.5%
*-commutative54.5%
cbrt-prod54.5%
cbrt-div54.5%
rem-cbrt-cube62.8%
cbrt-prod67.1%
pow267.1%
Applied egg-rr67.1%
Taylor expanded in k around inf 65.6%
associate-/l*64.7%
*-commutative64.7%
*-commutative64.7%
times-frac66.1%
Simplified66.1%
Taylor expanded in k around 0 56.9%
associate-/l*58.1%
Simplified58.1%
if 3.10000000000000013e-102 < t < 1.05e-7Initial program 86.3%
Simplified95.1%
if 1.05e-7 < t Initial program 67.2%
associate-/r*67.3%
+-commutative67.3%
unpow267.3%
sqr-neg67.3%
distribute-frac-neg267.3%
distribute-frac-neg267.3%
unpow267.3%
+-commutative67.3%
associate-*l*55.2%
associate-*l/55.3%
associate-/r/55.3%
+-commutative55.3%
associate-+r+55.3%
Simplified55.3%
associate-*r*57.3%
*-un-lft-identity57.3%
times-frac57.4%
associate-*r*69.4%
Applied egg-rr69.4%
Taylor expanded in k around 0 64.9%
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
(*
t_s
(if (<= t_m 5.6e-105)
(/ 2.0 (* (pow k 2.0) (* (pow k 2.0) (/ t_m (pow l 2.0)))))
(/
2.0
(*
(* (tan k) (+ 1.0 (+ (pow (/ k t_m) 2.0) 1.0)))
(* (sin k) (* (/ (pow t_m 2.0) l) (/ t_m l))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5.6e-105) {
tmp = 2.0 / (pow(k, 2.0) * (pow(k, 2.0) * (t_m / pow(l, 2.0))));
} else {
tmp = 2.0 / ((tan(k) * (1.0 + (pow((k / t_m), 2.0) + 1.0))) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / l))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 5.6d-105) then
tmp = 2.0d0 / ((k ** 2.0d0) * ((k ** 2.0d0) * (t_m / (l ** 2.0d0))))
else
tmp = 2.0d0 / ((tan(k) * (1.0d0 + (((k / t_m) ** 2.0d0) + 1.0d0))) * (sin(k) * (((t_m ** 2.0d0) / l) * (t_m / l))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5.6e-105) {
tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(k, 2.0) * (t_m / Math.pow(l, 2.0))));
} else {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (Math.pow((k / t_m), 2.0) + 1.0))) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / l))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 5.6e-105: tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(k, 2.0) * (t_m / math.pow(l, 2.0)))) else: tmp = 2.0 / ((math.tan(k) * (1.0 + (math.pow((k / t_m), 2.0) + 1.0))) * (math.sin(k) * ((math.pow(t_m, 2.0) / l) * (t_m / l)))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 5.6e-105) tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((k ^ 2.0) * Float64(t_m / (l ^ 2.0))))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64((Float64(k / t_m) ^ 2.0) + 1.0))) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 5.6e-105) tmp = 2.0 / ((k ^ 2.0) * ((k ^ 2.0) * (t_m / (l ^ 2.0)))); else tmp = 2.0 / ((tan(k) * (1.0 + (((k / t_m) ^ 2.0) + 1.0))) * (sin(k) * (((t_m ^ 2.0) / l) * (t_m / l)))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 5.6e-105], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(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] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $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 5.6 \cdot 10^{-105}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({k}^{2} \cdot \frac{t\_m}{{\ell}^{2}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right)\right)\right) \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\
\end{array}
\end{array}
if t < 5.6e-105Initial program 54.6%
Simplified54.6%
add-cube-cbrt54.5%
pow354.5%
*-commutative54.5%
cbrt-prod54.5%
cbrt-div54.5%
rem-cbrt-cube62.8%
cbrt-prod67.1%
pow267.1%
Applied egg-rr67.1%
Taylor expanded in k around inf 65.6%
associate-/l*64.7%
*-commutative64.7%
*-commutative64.7%
times-frac66.1%
Simplified66.1%
Taylor expanded in k around 0 56.9%
associate-/l*58.1%
Simplified58.1%
if 5.6e-105 < t Initial program 72.2%
Simplified72.3%
unpow372.3%
times-frac80.8%
pow280.8%
Applied egg-rr80.8%
Final simplification65.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 9.2e-101)
(/ 2.0 (* (pow k 2.0) (* (pow k 2.0) (/ t_m (pow l 2.0)))))
(*
(* l (/ 2.0 (* (tan k) (* (sin k) (pow t_m 3.0)))))
(/ l (+ 2.0 (pow (/ k t_m) 2.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 9.2e-101) {
tmp = 2.0 / (pow(k, 2.0) * (pow(k, 2.0) * (t_m / pow(l, 2.0))));
} else {
tmp = (l * (2.0 / (tan(k) * (sin(k) * pow(t_m, 3.0))))) * (l / (2.0 + pow((k / t_m), 2.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 9.2d-101) then
tmp = 2.0d0 / ((k ** 2.0d0) * ((k ** 2.0d0) * (t_m / (l ** 2.0d0))))
else
tmp = (l * (2.0d0 / (tan(k) * (sin(k) * (t_m ** 3.0d0))))) * (l / (2.0d0 + ((k / t_m) ** 2.0d0)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 9.2e-101) {
tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(k, 2.0) * (t_m / Math.pow(l, 2.0))));
} else {
tmp = (l * (2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow(t_m, 3.0))))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 9.2e-101: tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(k, 2.0) * (t_m / math.pow(l, 2.0)))) else: tmp = (l * (2.0 / (math.tan(k) * (math.sin(k) * math.pow(t_m, 3.0))))) * (l / (2.0 + math.pow((k / t_m), 2.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 9.2e-101) tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((k ^ 2.0) * Float64(t_m / (l ^ 2.0))))); else tmp = Float64(Float64(l * Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (t_m ^ 3.0))))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 9.2e-101) tmp = 2.0 / ((k ^ 2.0) * ((k ^ 2.0) * (t_m / (l ^ 2.0)))); else tmp = (l * (2.0 / (tan(k) * (sin(k) * (t_m ^ 3.0))))) * (l / (2.0 + ((k / t_m) ^ 2.0))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 9.2e-101], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 9.2 \cdot 10^{-101}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({k}^{2} \cdot \frac{t\_m}{{\ell}^{2}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\end{array}
\end{array}
if t < 9.1999999999999998e-101Initial program 54.6%
Simplified54.6%
add-cube-cbrt54.5%
pow354.5%
*-commutative54.5%
cbrt-prod54.5%
cbrt-div54.5%
rem-cbrt-cube62.8%
cbrt-prod67.1%
pow267.1%
Applied egg-rr67.1%
Taylor expanded in k around inf 65.6%
associate-/l*64.7%
*-commutative64.7%
*-commutative64.7%
times-frac66.1%
Simplified66.1%
Taylor expanded in k around 0 56.9%
associate-/l*58.1%
Simplified58.1%
if 9.1999999999999998e-101 < t Initial program 72.2%
associate-/r*72.3%
+-commutative72.3%
unpow272.3%
sqr-neg72.3%
distribute-frac-neg272.3%
distribute-frac-neg272.3%
unpow272.3%
+-commutative72.3%
associate-*l*63.4%
associate-*l/63.4%
associate-/r/63.4%
+-commutative63.4%
associate-+r+63.4%
Simplified63.4%
associate-*r*66.1%
*-un-lft-identity66.1%
times-frac66.2%
associate-*r*75.0%
Applied egg-rr75.0%
Final simplification63.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 5.1e-105)
(/ 2.0 (* (pow k 2.0) (* (pow k 2.0) (/ t_m (pow l 2.0)))))
(if (<= t_m 4.8e-8)
(/
2.0
(*
(/ (/ (pow t_m 3.0) l) l)
(* (* (sin k) (tan k)) (+ 2.0 (* (/ k t_m) (/ k t_m))))))
(*
(/ l (+ 2.0 (pow (/ k t_m) 2.0)))
(* l (/ 2.0 (* (tan k) (* k (pow t_m 3.0))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5.1e-105) {
tmp = 2.0 / (pow(k, 2.0) * (pow(k, 2.0) * (t_m / pow(l, 2.0))));
} else if (t_m <= 4.8e-8) {
tmp = 2.0 / (((pow(t_m, 3.0) / l) / l) * ((sin(k) * tan(k)) * (2.0 + ((k / t_m) * (k / t_m)))));
} else {
tmp = (l / (2.0 + pow((k / t_m), 2.0))) * (l * (2.0 / (tan(k) * (k * pow(t_m, 3.0)))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 5.1d-105) then
tmp = 2.0d0 / ((k ** 2.0d0) * ((k ** 2.0d0) * (t_m / (l ** 2.0d0))))
else if (t_m <= 4.8d-8) then
tmp = 2.0d0 / ((((t_m ** 3.0d0) / l) / l) * ((sin(k) * tan(k)) * (2.0d0 + ((k / t_m) * (k / t_m)))))
else
tmp = (l / (2.0d0 + ((k / t_m) ** 2.0d0))) * (l * (2.0d0 / (tan(k) * (k * (t_m ** 3.0d0)))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5.1e-105) {
tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(k, 2.0) * (t_m / Math.pow(l, 2.0))));
} else if (t_m <= 4.8e-8) {
tmp = 2.0 / (((Math.pow(t_m, 3.0) / l) / l) * ((Math.sin(k) * Math.tan(k)) * (2.0 + ((k / t_m) * (k / t_m)))));
} else {
tmp = (l / (2.0 + Math.pow((k / t_m), 2.0))) * (l * (2.0 / (Math.tan(k) * (k * Math.pow(t_m, 3.0)))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 5.1e-105: tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(k, 2.0) * (t_m / math.pow(l, 2.0)))) elif t_m <= 4.8e-8: tmp = 2.0 / (((math.pow(t_m, 3.0) / l) / l) * ((math.sin(k) * math.tan(k)) * (2.0 + ((k / t_m) * (k / t_m))))) else: tmp = (l / (2.0 + math.pow((k / t_m), 2.0))) * (l * (2.0 / (math.tan(k) * (k * math.pow(t_m, 3.0))))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 5.1e-105) tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((k ^ 2.0) * Float64(t_m / (l ^ 2.0))))); elseif (t_m <= 4.8e-8) tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 3.0) / l) / l) * Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + Float64(Float64(k / t_m) * Float64(k / t_m)))))); else tmp = Float64(Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(l * Float64(2.0 / Float64(tan(k) * Float64(k * (t_m ^ 3.0)))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 5.1e-105) tmp = 2.0 / ((k ^ 2.0) * ((k ^ 2.0) * (t_m / (l ^ 2.0)))); elseif (t_m <= 4.8e-8) tmp = 2.0 / ((((t_m ^ 3.0) / l) / l) * ((sin(k) * tan(k)) * (2.0 + ((k / t_m) * (k / t_m))))); else tmp = (l / (2.0 + ((k / t_m) ^ 2.0))) * (l * (2.0 / (tan(k) * (k * (t_m ^ 3.0))))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 5.1e-105], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.8e-8], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(k * N[Power[t$95$m, 3.0], $MachinePrecision]), $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 5.1 \cdot 10^{-105}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({k}^{2} \cdot \frac{t\_m}{{\ell}^{2}}\right)}\\
\mathbf{elif}\;t\_m \leq 4.8 \cdot 10^{-8}:\\
\;\;\;\;\frac{2}{\frac{\frac{{t\_m}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + \frac{k}{t\_m} \cdot \frac{k}{t\_m}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}} \cdot \left(\ell \cdot \frac{2}{\tan k \cdot \left(k \cdot {t\_m}^{3}\right)}\right)\\
\end{array}
\end{array}
if t < 5.10000000000000007e-105Initial program 54.6%
Simplified54.6%
add-cube-cbrt54.5%
pow354.5%
*-commutative54.5%
cbrt-prod54.5%
cbrt-div54.5%
rem-cbrt-cube62.8%
cbrt-prod67.1%
pow267.1%
Applied egg-rr67.1%
Taylor expanded in k around inf 65.6%
associate-/l*64.7%
*-commutative64.7%
*-commutative64.7%
times-frac66.1%
Simplified66.1%
Taylor expanded in k around 0 56.9%
associate-/l*58.1%
Simplified58.1%
if 5.10000000000000007e-105 < t < 4.79999999999999997e-8Initial program 86.3%
Simplified95.1%
unpow286.3%
Applied egg-rr95.1%
if 4.79999999999999997e-8 < t Initial program 67.2%
associate-/r*67.3%
+-commutative67.3%
unpow267.3%
sqr-neg67.3%
distribute-frac-neg267.3%
distribute-frac-neg267.3%
unpow267.3%
+-commutative67.3%
associate-*l*55.2%
associate-*l/55.3%
associate-/r/55.3%
+-commutative55.3%
associate-+r+55.3%
Simplified55.3%
associate-*r*57.3%
*-un-lft-identity57.3%
times-frac57.4%
associate-*r*69.4%
Applied egg-rr69.4%
Taylor expanded in k around 0 64.9%
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
(*
t_s
(if (<= t_m 9.6e-108)
(/ 2.0 (* (pow k 2.0) (* (pow k 2.0) (/ t_m (pow l 2.0)))))
(*
(/ l (+ 2.0 (pow (/ k t_m) 2.0)))
(* l (/ 2.0 (* (tan k) (* k (pow t_m 3.0)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 9.6e-108) {
tmp = 2.0 / (pow(k, 2.0) * (pow(k, 2.0) * (t_m / pow(l, 2.0))));
} else {
tmp = (l / (2.0 + pow((k / t_m), 2.0))) * (l * (2.0 / (tan(k) * (k * pow(t_m, 3.0)))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 9.6d-108) then
tmp = 2.0d0 / ((k ** 2.0d0) * ((k ** 2.0d0) * (t_m / (l ** 2.0d0))))
else
tmp = (l / (2.0d0 + ((k / t_m) ** 2.0d0))) * (l * (2.0d0 / (tan(k) * (k * (t_m ** 3.0d0)))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 9.6e-108) {
tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(k, 2.0) * (t_m / Math.pow(l, 2.0))));
} else {
tmp = (l / (2.0 + Math.pow((k / t_m), 2.0))) * (l * (2.0 / (Math.tan(k) * (k * Math.pow(t_m, 3.0)))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 9.6e-108: tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(k, 2.0) * (t_m / math.pow(l, 2.0)))) else: tmp = (l / (2.0 + math.pow((k / t_m), 2.0))) * (l * (2.0 / (math.tan(k) * (k * math.pow(t_m, 3.0))))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 9.6e-108) tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((k ^ 2.0) * Float64(t_m / (l ^ 2.0))))); else tmp = Float64(Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(l * Float64(2.0 / Float64(tan(k) * Float64(k * (t_m ^ 3.0)))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 9.6e-108) tmp = 2.0 / ((k ^ 2.0) * ((k ^ 2.0) * (t_m / (l ^ 2.0)))); else tmp = (l / (2.0 + ((k / t_m) ^ 2.0))) * (l * (2.0 / (tan(k) * (k * (t_m ^ 3.0))))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 9.6e-108], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(k * N[Power[t$95$m, 3.0], $MachinePrecision]), $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 9.6 \cdot 10^{-108}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({k}^{2} \cdot \frac{t\_m}{{\ell}^{2}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}} \cdot \left(\ell \cdot \frac{2}{\tan k \cdot \left(k \cdot {t\_m}^{3}\right)}\right)\\
\end{array}
\end{array}
if t < 9.60000000000000068e-108Initial program 54.1%
Simplified54.1%
add-cube-cbrt54.0%
pow354.0%
*-commutative54.0%
cbrt-prod54.0%
cbrt-div54.0%
rem-cbrt-cube62.6%
cbrt-prod66.9%
pow266.9%
Applied egg-rr66.9%
Taylor expanded in k around inf 65.4%
associate-/l*64.5%
*-commutative64.5%
*-commutative64.5%
times-frac65.9%
Simplified65.9%
Taylor expanded in k around 0 56.4%
associate-/l*57.7%
Simplified57.7%
if 9.60000000000000068e-108 < t Initial program 72.3%
associate-/r*72.4%
+-commutative72.4%
unpow272.4%
sqr-neg72.4%
distribute-frac-neg272.4%
distribute-frac-neg272.4%
unpow272.4%
+-commutative72.4%
associate-*l*63.9%
associate-*l/64.0%
associate-/r/61.7%
+-commutative61.7%
associate-+r+61.7%
Simplified61.7%
associate-*r*64.2%
*-un-lft-identity64.2%
times-frac64.3%
associate-*r*72.7%
Applied egg-rr72.7%
Taylor expanded in k around 0 68.7%
Final simplification61.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 1.55e-99)
(/ 2.0 (* (pow k 2.0) (* (pow k 2.0) (/ t_m (pow l 2.0)))))
(/
2.0
(* (pow (* t_m (pow l -0.6666666666666666)) 3.0) (* 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 <= 1.55e-99) {
tmp = 2.0 / (pow(k, 2.0) * (pow(k, 2.0) * (t_m / pow(l, 2.0))));
} else {
tmp = 2.0 / (pow((t_m * pow(l, -0.6666666666666666)), 3.0) * (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 <= 1.55d-99) then
tmp = 2.0d0 / ((k ** 2.0d0) * ((k ** 2.0d0) * (t_m / (l ** 2.0d0))))
else
tmp = 2.0d0 / (((t_m * (l ** (-0.6666666666666666d0))) ** 3.0d0) * (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 <= 1.55e-99) {
tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(k, 2.0) * (t_m / Math.pow(l, 2.0))));
} else {
tmp = 2.0 / (Math.pow((t_m * Math.pow(l, -0.6666666666666666)), 3.0) * (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 <= 1.55e-99: tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(k, 2.0) * (t_m / math.pow(l, 2.0)))) else: tmp = 2.0 / (math.pow((t_m * math.pow(l, -0.6666666666666666)), 3.0) * (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 <= 1.55e-99) tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((k ^ 2.0) * Float64(t_m / (l ^ 2.0))))); else tmp = Float64(2.0 / Float64((Float64(t_m * (l ^ -0.6666666666666666)) ^ 3.0) * 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 <= 1.55e-99) tmp = 2.0 / ((k ^ 2.0) * ((k ^ 2.0) * (t_m / (l ^ 2.0)))); else tmp = 2.0 / (((t_m * (l ^ -0.6666666666666666)) ^ 3.0) * (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, 1.55e-99], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(t$95$m * N[Power[l, -0.6666666666666666], $MachinePrecision]), $MachinePrecision], 3.0], $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 1.55 \cdot 10^{-99}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({k}^{2} \cdot \frac{t\_m}{{\ell}^{2}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot {\ell}^{-0.6666666666666666}\right)}^{3} \cdot \left(2 \cdot {k}^{2}\right)}\\
\end{array}
\end{array}
if t < 1.5499999999999999e-99Initial program 54.6%
Simplified54.6%
add-cube-cbrt54.5%
pow354.5%
*-commutative54.5%
cbrt-prod54.5%
cbrt-div54.5%
rem-cbrt-cube62.8%
cbrt-prod67.1%
pow267.1%
Applied egg-rr67.1%
Taylor expanded in k around inf 65.6%
associate-/l*64.7%
*-commutative64.7%
*-commutative64.7%
times-frac66.1%
Simplified66.1%
Taylor expanded in k around 0 56.9%
associate-/l*58.1%
Simplified58.1%
if 1.5499999999999999e-99 < t Initial program 72.2%
Simplified67.2%
Taylor expanded in k around 0 60.5%
add-cube-cbrt60.5%
pow360.6%
associate-/l/56.8%
cbrt-div56.7%
unpow356.7%
add-cbrt-cube60.6%
cbrt-unprod65.2%
unpow265.2%
div-inv65.2%
unpow-prod-down56.7%
pow-flip56.7%
metadata-eval56.7%
Applied egg-rr56.7%
cube-prod65.2%
Simplified65.2%
add-exp-log64.9%
log-pow32.7%
Applied egg-rr32.7%
*-commutative32.7%
pow-to-exp65.2%
pow1/332.6%
pow-pow32.6%
metadata-eval32.6%
Applied egg-rr32.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 1.12e-102)
(/ 2.0 (* (pow k 2.0) (* (pow k 2.0) (/ t_m (pow l 2.0)))))
(/ 2.0 (* (* 2.0 (pow k 2.0)) (/ (* t_m (/ (pow t_m 2.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 <= 1.12e-102) {
tmp = 2.0 / (pow(k, 2.0) * (pow(k, 2.0) * (t_m / pow(l, 2.0))));
} else {
tmp = 2.0 / ((2.0 * pow(k, 2.0)) * ((t_m * (pow(t_m, 2.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 <= 1.12d-102) then
tmp = 2.0d0 / ((k ** 2.0d0) * ((k ** 2.0d0) * (t_m / (l ** 2.0d0))))
else
tmp = 2.0d0 / ((2.0d0 * (k ** 2.0d0)) * ((t_m * ((t_m ** 2.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 <= 1.12e-102) {
tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(k, 2.0) * (t_m / Math.pow(l, 2.0))));
} else {
tmp = 2.0 / ((2.0 * Math.pow(k, 2.0)) * ((t_m * (Math.pow(t_m, 2.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 <= 1.12e-102: tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(k, 2.0) * (t_m / math.pow(l, 2.0)))) else: tmp = 2.0 / ((2.0 * math.pow(k, 2.0)) * ((t_m * (math.pow(t_m, 2.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 <= 1.12e-102) tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((k ^ 2.0) * Float64(t_m / (l ^ 2.0))))); else tmp = Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64(Float64(t_m * Float64((t_m ^ 2.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 <= 1.12e-102) tmp = 2.0 / ((k ^ 2.0) * ((k ^ 2.0) * (t_m / (l ^ 2.0)))); else tmp = 2.0 / ((2.0 * (k ^ 2.0)) * ((t_m * ((t_m ^ 2.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[LessEqual[t$95$m, 1.12e-102], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / 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 1.12 \cdot 10^{-102}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({k}^{2} \cdot \frac{t\_m}{{\ell}^{2}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{t\_m \cdot \frac{{t\_m}^{2}}{\ell}}{\ell}}\\
\end{array}
\end{array}
if t < 1.12000000000000009e-102Initial program 54.6%
Simplified54.6%
add-cube-cbrt54.5%
pow354.5%
*-commutative54.5%
cbrt-prod54.5%
cbrt-div54.5%
rem-cbrt-cube62.8%
cbrt-prod67.1%
pow267.1%
Applied egg-rr67.1%
Taylor expanded in k around inf 65.6%
associate-/l*64.7%
*-commutative64.7%
*-commutative64.7%
times-frac66.1%
Simplified66.1%
Taylor expanded in k around 0 56.9%
associate-/l*58.1%
Simplified58.1%
if 1.12000000000000009e-102 < t Initial program 72.2%
Simplified67.2%
Taylor expanded in k around 0 60.5%
cube-mult60.5%
*-un-lft-identity60.5%
times-frac64.1%
pow264.1%
Applied egg-rr64.1%
Final simplification60.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 5.8e-104)
(/ 2.0 (* (/ t_m (pow l 2.0)) (pow k 4.0)))
(/ 2.0 (* (* 2.0 (pow k 2.0)) (/ (* t_m (/ (pow t_m 2.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 <= 5.8e-104) {
tmp = 2.0 / ((t_m / pow(l, 2.0)) * pow(k, 4.0));
} else {
tmp = 2.0 / ((2.0 * pow(k, 2.0)) * ((t_m * (pow(t_m, 2.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 <= 5.8d-104) then
tmp = 2.0d0 / ((t_m / (l ** 2.0d0)) * (k ** 4.0d0))
else
tmp = 2.0d0 / ((2.0d0 * (k ** 2.0d0)) * ((t_m * ((t_m ** 2.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 <= 5.8e-104) {
tmp = 2.0 / ((t_m / Math.pow(l, 2.0)) * Math.pow(k, 4.0));
} else {
tmp = 2.0 / ((2.0 * Math.pow(k, 2.0)) * ((t_m * (Math.pow(t_m, 2.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 <= 5.8e-104: tmp = 2.0 / ((t_m / math.pow(l, 2.0)) * math.pow(k, 4.0)) else: tmp = 2.0 / ((2.0 * math.pow(k, 2.0)) * ((t_m * (math.pow(t_m, 2.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 <= 5.8e-104) tmp = Float64(2.0 / Float64(Float64(t_m / (l ^ 2.0)) * (k ^ 4.0))); else tmp = Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64(Float64(t_m * Float64((t_m ^ 2.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 <= 5.8e-104) tmp = 2.0 / ((t_m / (l ^ 2.0)) * (k ^ 4.0)); else tmp = 2.0 / ((2.0 * (k ^ 2.0)) * ((t_m * ((t_m ^ 2.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[LessEqual[t$95$m, 5.8e-104], N[(2.0 / N[(N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / 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 5.8 \cdot 10^{-104}:\\
\;\;\;\;\frac{2}{\frac{t\_m}{{\ell}^{2}} \cdot {k}^{4}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{t\_m \cdot \frac{{t\_m}^{2}}{\ell}}{\ell}}\\
\end{array}
\end{array}
if t < 5.8000000000000002e-104Initial program 54.6%
Simplified54.6%
add-cube-cbrt54.5%
pow354.5%
*-commutative54.5%
cbrt-prod54.5%
cbrt-div54.5%
rem-cbrt-cube62.8%
cbrt-prod67.1%
pow267.1%
Applied egg-rr67.1%
Taylor expanded in k around inf 65.6%
associate-/l*64.7%
*-commutative64.7%
*-commutative64.7%
times-frac66.1%
Simplified66.1%
Taylor expanded in k around 0 54.3%
associate-/l*55.8%
Simplified55.8%
if 5.8000000000000002e-104 < t Initial program 72.2%
Simplified67.2%
Taylor expanded in k around 0 60.5%
cube-mult60.5%
*-un-lft-identity60.5%
times-frac64.1%
pow264.1%
Applied egg-rr64.1%
Final simplification58.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 1.32e-104)
(/ 2.0 (* (/ t_m (pow l 2.0)) (pow k 4.0)))
(/ 2.0 (/ (* (/ (pow t_m 3.0) l) (* 2.0 (pow k 2.0))) l)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.32e-104) {
tmp = 2.0 / ((t_m / pow(l, 2.0)) * pow(k, 4.0));
} else {
tmp = 2.0 / (((pow(t_m, 3.0) / l) * (2.0 * pow(k, 2.0))) / l);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1.32d-104) then
tmp = 2.0d0 / ((t_m / (l ** 2.0d0)) * (k ** 4.0d0))
else
tmp = 2.0d0 / ((((t_m ** 3.0d0) / l) * (2.0d0 * (k ** 2.0d0))) / l)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.32e-104) {
tmp = 2.0 / ((t_m / Math.pow(l, 2.0)) * Math.pow(k, 4.0));
} else {
tmp = 2.0 / (((Math.pow(t_m, 3.0) / l) * (2.0 * Math.pow(k, 2.0))) / l);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 1.32e-104: tmp = 2.0 / ((t_m / math.pow(l, 2.0)) * math.pow(k, 4.0)) else: tmp = 2.0 / (((math.pow(t_m, 3.0) / l) * (2.0 * math.pow(k, 2.0))) / l) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.32e-104) tmp = Float64(2.0 / Float64(Float64(t_m / (l ^ 2.0)) * (k ^ 4.0))); else tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 3.0) / l) * Float64(2.0 * (k ^ 2.0))) / l)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 1.32e-104) tmp = 2.0 / ((t_m / (l ^ 2.0)) * (k ^ 4.0)); else tmp = 2.0 / ((((t_m ^ 3.0) / l) * (2.0 * (k ^ 2.0))) / l); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.32e-104], N[(2.0 / N[(N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] * N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.32 \cdot 10^{-104}:\\
\;\;\;\;\frac{2}{\frac{t\_m}{{\ell}^{2}} \cdot {k}^{4}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\frac{{t\_m}^{3}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}}\\
\end{array}
\end{array}
if t < 1.3199999999999999e-104Initial program 54.6%
Simplified54.6%
add-cube-cbrt54.5%
pow354.5%
*-commutative54.5%
cbrt-prod54.5%
cbrt-div54.5%
rem-cbrt-cube62.8%
cbrt-prod67.1%
pow267.1%
Applied egg-rr67.1%
Taylor expanded in k around inf 65.6%
associate-/l*64.7%
*-commutative64.7%
*-commutative64.7%
times-frac66.1%
Simplified66.1%
Taylor expanded in k around 0 54.3%
associate-/l*55.8%
Simplified55.8%
if 1.3199999999999999e-104 < t Initial program 72.2%
Simplified67.2%
Taylor expanded in k around 0 60.5%
associate-*l/60.6%
Applied egg-rr60.6%
Final simplification57.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 6.2e-101)
(/ 2.0 (* (/ t_m (pow l 2.0)) (pow k 4.0)))
(/ 2.0 (* (/ (/ (pow t_m 3.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.2e-101) {
tmp = 2.0 / ((t_m / pow(l, 2.0)) * pow(k, 4.0));
} else {
tmp = 2.0 / (((pow(t_m, 3.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.2d-101) then
tmp = 2.0d0 / ((t_m / (l ** 2.0d0)) * (k ** 4.0d0))
else
tmp = 2.0d0 / ((((t_m ** 3.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.2e-101) {
tmp = 2.0 / ((t_m / Math.pow(l, 2.0)) * Math.pow(k, 4.0));
} else {
tmp = 2.0 / (((Math.pow(t_m, 3.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.2e-101: tmp = 2.0 / ((t_m / math.pow(l, 2.0)) * math.pow(k, 4.0)) else: tmp = 2.0 / (((math.pow(t_m, 3.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.2e-101) tmp = Float64(2.0 / Float64(Float64(t_m / (l ^ 2.0)) * (k ^ 4.0))); else tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 3.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.2e-101) tmp = 2.0 / ((t_m / (l ^ 2.0)) * (k ^ 4.0)); else tmp = 2.0 / ((((t_m ^ 3.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.2e-101], N[(2.0 / N[(N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $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.2 \cdot 10^{-101}:\\
\;\;\;\;\frac{2}{\frac{t\_m}{{\ell}^{2}} \cdot {k}^{4}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\frac{{t\_m}^{3}}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}\\
\end{array}
\end{array}
if t < 6.19999999999999946e-101Initial program 54.6%
Simplified54.6%
add-cube-cbrt54.5%
pow354.5%
*-commutative54.5%
cbrt-prod54.5%
cbrt-div54.5%
rem-cbrt-cube62.8%
cbrt-prod67.1%
pow267.1%
Applied egg-rr67.1%
Taylor expanded in k around inf 65.6%
associate-/l*64.7%
*-commutative64.7%
*-commutative64.7%
times-frac66.1%
Simplified66.1%
Taylor expanded in k around 0 54.3%
associate-/l*55.8%
Simplified55.8%
if 6.19999999999999946e-101 < t Initial program 72.2%
Simplified67.2%
Taylor expanded in k around 0 60.5%
Final simplification57.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 6e-116)
(/ 2.0 (* (/ t_m (pow l 2.0)) (pow k 4.0)))
(* l (/ 2.0 (/ (* (pow t_m 3.0) (* 2.0 (pow k 2.0))) l))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 6e-116) {
tmp = 2.0 / ((t_m / pow(l, 2.0)) * pow(k, 4.0));
} else {
tmp = l * (2.0 / ((pow(t_m, 3.0) * (2.0 * pow(k, 2.0))) / l));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 6d-116) then
tmp = 2.0d0 / ((t_m / (l ** 2.0d0)) * (k ** 4.0d0))
else
tmp = l * (2.0d0 / (((t_m ** 3.0d0) * (2.0d0 * (k ** 2.0d0))) / l))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 6e-116) {
tmp = 2.0 / ((t_m / Math.pow(l, 2.0)) * Math.pow(k, 4.0));
} else {
tmp = l * (2.0 / ((Math.pow(t_m, 3.0) * (2.0 * Math.pow(k, 2.0))) / l));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 6e-116: tmp = 2.0 / ((t_m / math.pow(l, 2.0)) * math.pow(k, 4.0)) else: tmp = l * (2.0 / ((math.pow(t_m, 3.0) * (2.0 * math.pow(k, 2.0))) / l)) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 6e-116) tmp = Float64(2.0 / Float64(Float64(t_m / (l ^ 2.0)) * (k ^ 4.0))); else tmp = Float64(l * Float64(2.0 / Float64(Float64((t_m ^ 3.0) * Float64(2.0 * (k ^ 2.0))) / l))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 6e-116) tmp = 2.0 / ((t_m / (l ^ 2.0)) * (k ^ 4.0)); else tmp = l * (2.0 / (((t_m ^ 3.0) * (2.0 * (k ^ 2.0))) / l)); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 6e-116], N[(2.0 / N[(N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(2.0 / N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 6 \cdot 10^{-116}:\\
\;\;\;\;\frac{2}{\frac{t\_m}{{\ell}^{2}} \cdot {k}^{4}}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{2}{\frac{{t\_m}^{3} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}}\\
\end{array}
\end{array}
if t < 6.00000000000000053e-116Initial program 54.5%
Simplified54.5%
add-cube-cbrt54.4%
pow354.4%
*-commutative54.4%
cbrt-prod54.4%
cbrt-div54.4%
rem-cbrt-cube63.1%
cbrt-prod67.6%
pow267.6%
Applied egg-rr67.6%
Taylor expanded in k around inf 64.8%
associate-/l*63.9%
*-commutative63.9%
*-commutative63.9%
times-frac65.3%
Simplified65.3%
Taylor expanded in k around 0 54.1%
associate-/l*55.8%
Simplified55.8%
if 6.00000000000000053e-116 < t Initial program 71.1%
Simplified66.4%
Taylor expanded in k around 0 60.3%
associate-*l/60.4%
Applied egg-rr60.4%
associate-/r/60.4%
associate-*l/59.4%
Applied egg-rr59.4%
Final simplification57.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 (/ 2.0 (* (/ t_m (pow l 2.0)) (pow k 4.0)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((t_m / pow(l, 2.0)) * pow(k, 4.0)));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / ((t_m / (l ** 2.0d0)) * (k ** 4.0d0)))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((t_m / Math.pow(l, 2.0)) * Math.pow(k, 4.0)));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / ((t_m / math.pow(l, 2.0)) * math.pow(k, 4.0)))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64(Float64(t_m / (l ^ 2.0)) * (k ^ 4.0)))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / ((t_m / (l ^ 2.0)) * (k ^ 4.0))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{2}{\frac{t\_m}{{\ell}^{2}} \cdot {k}^{4}}
\end{array}
Initial program 60.4%
Simplified60.4%
add-cube-cbrt60.3%
pow360.3%
*-commutative60.3%
cbrt-prod60.3%
cbrt-div60.3%
rem-cbrt-cube67.9%
cbrt-prod74.0%
pow274.0%
Applied egg-rr74.0%
Taylor expanded in k around inf 62.8%
associate-/l*62.6%
*-commutative62.6%
*-commutative62.6%
times-frac64.2%
Simplified64.2%
Taylor expanded in k around 0 53.2%
associate-/l*53.8%
Simplified53.8%
Final simplification53.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 \left(t\_m \cdot {\ell}^{-2}\right)}
\end{array}
Initial program 60.4%
Simplified60.4%
add-cube-cbrt60.3%
pow360.3%
*-commutative60.3%
cbrt-prod60.3%
cbrt-div60.3%
rem-cbrt-cube67.9%
cbrt-prod74.0%
pow274.0%
Applied egg-rr74.0%
Taylor expanded in k around inf 62.8%
associate-/l*62.6%
*-commutative62.6%
*-commutative62.6%
times-frac64.2%
Simplified64.2%
Taylor expanded in k around 0 53.2%
associate-/l*53.8%
Simplified53.8%
div-inv53.4%
pow-flip53.4%
metadata-eval53.4%
Applied egg-rr53.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 (* (pow l 2.0) (/ 2.0 (* t_m (pow k 4.0))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (pow(l, 2.0) * (2.0 / (t_m * pow(k, 4.0))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * ((l ** 2.0d0) * (2.0d0 / (t_m * (k ** 4.0d0))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (Math.pow(l, 2.0) * (2.0 / (t_m * Math.pow(k, 4.0))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (math.pow(l, 2.0) * (2.0 / (t_m * math.pow(k, 4.0))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64((l ^ 2.0) * Float64(2.0 / Float64(t_m * (k ^ 4.0))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * ((l ^ 2.0) * (2.0 / (t_m * (k ^ 4.0)))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(N[Power[l, 2.0], $MachinePrecision] * N[(2.0 / N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left({\ell}^{2} \cdot \frac{2}{t\_m \cdot {k}^{4}}\right)
\end{array}
Initial program 60.4%
Simplified60.4%
add-cube-cbrt60.3%
pow360.3%
*-commutative60.3%
cbrt-prod60.3%
cbrt-div60.3%
rem-cbrt-cube67.9%
cbrt-prod74.0%
pow274.0%
Applied egg-rr74.0%
Taylor expanded in k around inf 62.8%
associate-/l*62.6%
*-commutative62.6%
*-commutative62.6%
times-frac64.2%
Simplified64.2%
Taylor expanded in k around 0 53.2%
associate-/l*53.8%
Simplified53.8%
div-inv53.8%
pow253.8%
associate-*r/53.2%
pow253.2%
Applied egg-rr53.2%
associate-*r/53.2%
metadata-eval53.2%
associate-/r/53.2%
*-commutative53.2%
Simplified53.2%
Final simplification53.2%
herbie shell --seed 2024103
(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))))