
(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 20 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
(let* ((t_2 (/ (* t_m l) k)))
(*
t_s
(if (<= t_m 4.2e-113)
(/ 2.0 (/ (* (pow k 2.0) (* t_m (/ (pow (sin k) 2.0) (* l (cos k))))) l))
(if (<= t_m 2.95e-5)
(* t_2 (* (/ 2.0 (* (tan k) (* (sin k) (pow t_m 3.0)))) t_2))
(if (<= t_m 5.6e+102)
(*
(/ (/ (* 2.0 l) (sin k)) (* (tan k) (pow t_m 3.0)))
(/ l (+ 2.0 (pow (/ k t_m) 2.0))))
(*
(*
(/ 2.0 (pow (* (* t_m (cbrt (sin k))) (cbrt (tan k))) 3.0))
(/ l (hypot 1.0 (hypot 1.0 (/ k t_m)))))
(* l (sqrt 0.5)))))))))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 = (t_m * l) / k;
double tmp;
if (t_m <= 4.2e-113) {
tmp = 2.0 / ((pow(k, 2.0) * (t_m * (pow(sin(k), 2.0) / (l * cos(k))))) / l);
} else if (t_m <= 2.95e-5) {
tmp = t_2 * ((2.0 / (tan(k) * (sin(k) * pow(t_m, 3.0)))) * t_2);
} else if (t_m <= 5.6e+102) {
tmp = (((2.0 * l) / sin(k)) / (tan(k) * pow(t_m, 3.0))) * (l / (2.0 + pow((k / t_m), 2.0)));
} else {
tmp = ((2.0 / pow(((t_m * cbrt(sin(k))) * cbrt(tan(k))), 3.0)) * (l / hypot(1.0, hypot(1.0, (k / t_m))))) * (l * sqrt(0.5));
}
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 = (t_m * l) / k;
double tmp;
if (t_m <= 4.2e-113) {
tmp = 2.0 / ((Math.pow(k, 2.0) * (t_m * (Math.pow(Math.sin(k), 2.0) / (l * Math.cos(k))))) / l);
} else if (t_m <= 2.95e-5) {
tmp = t_2 * ((2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow(t_m, 3.0)))) * t_2);
} else if (t_m <= 5.6e+102) {
tmp = (((2.0 * l) / Math.sin(k)) / (Math.tan(k) * Math.pow(t_m, 3.0))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
} else {
tmp = ((2.0 / Math.pow(((t_m * Math.cbrt(Math.sin(k))) * Math.cbrt(Math.tan(k))), 3.0)) * (l / Math.hypot(1.0, Math.hypot(1.0, (k / t_m))))) * (l * Math.sqrt(0.5));
}
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(Float64(t_m * l) / k) tmp = 0.0 if (t_m <= 4.2e-113) tmp = Float64(2.0 / Float64(Float64((k ^ 2.0) * Float64(t_m * Float64((sin(k) ^ 2.0) / Float64(l * cos(k))))) / l)); elseif (t_m <= 2.95e-5) tmp = Float64(t_2 * Float64(Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (t_m ^ 3.0)))) * t_2)); elseif (t_m <= 5.6e+102) tmp = Float64(Float64(Float64(Float64(2.0 * l) / sin(k)) / Float64(tan(k) * (t_m ^ 3.0))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); else tmp = Float64(Float64(Float64(2.0 / (Float64(Float64(t_m * cbrt(sin(k))) * cbrt(tan(k))) ^ 3.0)) * Float64(l / hypot(1.0, hypot(1.0, Float64(k / t_m))))) * Float64(l * sqrt(0.5))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[(t$95$m * l), $MachinePrecision] / k), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 4.2e-113], N[(2.0 / N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.95e-5], N[(t$95$2 * N[(N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.6e+102], N[(N[(N[(N[(2.0 * l), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[(N[Tan[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 / N[Power[N[(N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] * N[Power[N[Tan[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision] * N[(l / N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{t\_m \cdot \ell}{k}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.2 \cdot 10^{-113}:\\
\;\;\;\;\frac{2}{\frac{{k}^{2} \cdot \left(t\_m \cdot \frac{{\sin k}^{2}}{\ell \cdot \cos k}\right)}{\ell}}\\
\mathbf{elif}\;t\_m \leq 2.95 \cdot 10^{-5}:\\
\;\;\;\;t\_2 \cdot \left(\frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)} \cdot t\_2\right)\\
\mathbf{elif}\;t\_m \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;\frac{\frac{2 \cdot \ell}{\sin k}}{\tan k \cdot {t\_m}^{3}} \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{2}{{\left(\left(t\_m \cdot \sqrt[3]{\sin k}\right) \cdot \sqrt[3]{\tan k}\right)}^{3}} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)}\right) \cdot \left(\ell \cdot \sqrt{0.5}\right)\\
\end{array}
\end{array}
\end{array}
if t < 4.2e-113Initial program 48.9%
Simplified48.9%
associate-*l*45.8%
associate-/r*49.3%
associate-+r+49.3%
metadata-eval49.3%
associate-*l*49.3%
associate-*l/49.3%
associate-*l*49.3%
Applied egg-rr49.3%
Taylor expanded in t around 0 73.4%
associate-/l*73.8%
associate-/l*75.5%
Simplified75.5%
if 4.2e-113 < t < 2.9499999999999999e-5Initial program 79.6%
Simplified79.5%
associate-*r*83.3%
add-sqr-sqrt83.2%
times-frac87.4%
Applied egg-rr87.6%
associate-/l*91.7%
*-commutative91.7%
Simplified91.7%
Taylor expanded in k around inf 63.3%
Taylor expanded in k around inf 92.0%
if 2.9499999999999999e-5 < t < 5.60000000000000037e102Initial program 73.0%
Simplified76.5%
associate-*r*76.7%
*-un-lft-identity76.7%
times-frac80.3%
associate-*r*87.9%
Applied egg-rr87.9%
/-rgt-identity87.9%
*-commutative87.9%
*-commutative87.9%
Simplified87.9%
associate-*r/90.2%
associate-*l*90.1%
Applied egg-rr90.1%
associate-/r*99.5%
Simplified99.5%
if 5.60000000000000037e102 < t Initial program 60.8%
Simplified49.0%
associate-*r*54.4%
add-sqr-sqrt54.4%
times-frac54.4%
Applied egg-rr66.3%
associate-/l*66.3%
*-commutative66.3%
Simplified66.3%
*-commutative66.3%
add-cube-cbrt66.3%
pow366.3%
cbrt-prod66.3%
unpow366.3%
add-cbrt-cube75.2%
Applied egg-rr75.2%
add-cube-cbrt75.1%
pow375.1%
cbrt-prod75.1%
unpow375.1%
add-cbrt-cube79.5%
Applied egg-rr79.5%
Taylor expanded in k around 0 79.5%
Final simplification80.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.2e-73)
(/ 2.0 (/ (* (pow k 2.0) (* t_m (/ (pow (sin k) 2.0) (* l (cos k))))) l))
(*
t_2
(* (/ 2.0 (pow (* (* t_m (cbrt (sin k))) (cbrt (tan k))) 3.0)) t_2))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = l / hypot(1.0, hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 4.2e-73) {
tmp = 2.0 / ((pow(k, 2.0) * (t_m * (pow(sin(k), 2.0) / (l * cos(k))))) / l);
} else {
tmp = t_2 * ((2.0 / pow(((t_m * cbrt(sin(k))) * cbrt(tan(k))), 3.0)) * t_2);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = l / Math.hypot(1.0, Math.hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 4.2e-73) {
tmp = 2.0 / ((Math.pow(k, 2.0) * (t_m * (Math.pow(Math.sin(k), 2.0) / (l * Math.cos(k))))) / l);
} else {
tmp = t_2 * ((2.0 / Math.pow(((t_m * Math.cbrt(Math.sin(k))) * Math.cbrt(Math.tan(k))), 3.0)) * t_2);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(l / hypot(1.0, hypot(1.0, Float64(k / t_m)))) tmp = 0.0 if (t_m <= 4.2e-73) tmp = Float64(2.0 / Float64(Float64((k ^ 2.0) * Float64(t_m * Float64((sin(k) ^ 2.0) / Float64(l * cos(k))))) / l)); else tmp = Float64(t_2 * Float64(Float64(2.0 / (Float64(Float64(t_m * cbrt(sin(k))) * cbrt(tan(k))) ^ 3.0)) * t_2)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(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.2e-73], N[(2.0 / N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[(N[(2.0 / N[Power[N[(N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] * N[Power[N[Tan[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision] * t$95$2), $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.2 \cdot 10^{-73}:\\
\;\;\;\;\frac{2}{\frac{{k}^{2} \cdot \left(t\_m \cdot \frac{{\sin k}^{2}}{\ell \cdot \cos k}\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \left(\frac{2}{{\left(\left(t\_m \cdot \sqrt[3]{\sin k}\right) \cdot \sqrt[3]{\tan k}\right)}^{3}} \cdot t\_2\right)\\
\end{array}
\end{array}
\end{array}
if t < 4.1999999999999997e-73Initial program 50.2%
Simplified50.2%
associate-*l*47.2%
associate-/r*51.1%
associate-+r+51.1%
metadata-eval51.1%
associate-*l*51.1%
associate-*l/51.6%
associate-*l*51.6%
Applied egg-rr51.6%
Taylor expanded in t around 0 74.1%
associate-/l*74.5%
associate-/l*76.1%
Simplified76.1%
if 4.1999999999999997e-73 < t Initial program 68.4%
Simplified63.4%
associate-*r*67.3%
add-sqr-sqrt67.2%
times-frac68.3%
Applied egg-rr76.7%
associate-/l*77.9%
*-commutative77.9%
Simplified77.9%
*-commutative77.9%
add-cube-cbrt77.8%
pow377.8%
cbrt-prod77.7%
unpow377.7%
add-cbrt-cube82.4%
Applied egg-rr82.4%
add-cube-cbrt82.3%
pow382.3%
cbrt-prod82.1%
unpow382.1%
add-cbrt-cube84.4%
Applied egg-rr84.4%
Final simplification78.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 (/ (* t_m l) k)) (t_3 (pow (/ k t_m) 2.0)))
(*
t_s
(if (<= t_m 4.2e-113)
(/ 2.0 (/ (* (pow k 2.0) (* t_m (/ (pow (sin k) 2.0) (* l (cos k))))) l))
(if (<= t_m 2.2e-6)
(* t_2 (* (/ 2.0 (* (tan k) (* (sin k) (pow t_m 3.0)))) t_2))
(if (<= t_m 5.6e+102)
(*
(/ (/ (* 2.0 l) (sin k)) (* (tan k) (pow t_m 3.0)))
(/ l (+ 2.0 t_3)))
(/
2.0
(*
(pow (* (cbrt (sin k)) (* t_m (cbrt (pow l -2.0)))) 3.0)
(* (tan k) (+ 1.0 (+ 1.0 t_3)))))))))))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 = (t_m * l) / k;
double t_3 = pow((k / t_m), 2.0);
double tmp;
if (t_m <= 4.2e-113) {
tmp = 2.0 / ((pow(k, 2.0) * (t_m * (pow(sin(k), 2.0) / (l * cos(k))))) / l);
} else if (t_m <= 2.2e-6) {
tmp = t_2 * ((2.0 / (tan(k) * (sin(k) * pow(t_m, 3.0)))) * t_2);
} else if (t_m <= 5.6e+102) {
tmp = (((2.0 * l) / sin(k)) / (tan(k) * pow(t_m, 3.0))) * (l / (2.0 + t_3));
} else {
tmp = 2.0 / (pow((cbrt(sin(k)) * (t_m * cbrt(pow(l, -2.0)))), 3.0) * (tan(k) * (1.0 + (1.0 + t_3))));
}
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 = (t_m * l) / k;
double t_3 = Math.pow((k / t_m), 2.0);
double tmp;
if (t_m <= 4.2e-113) {
tmp = 2.0 / ((Math.pow(k, 2.0) * (t_m * (Math.pow(Math.sin(k), 2.0) / (l * Math.cos(k))))) / l);
} else if (t_m <= 2.2e-6) {
tmp = t_2 * ((2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow(t_m, 3.0)))) * t_2);
} else if (t_m <= 5.6e+102) {
tmp = (((2.0 * l) / Math.sin(k)) / (Math.tan(k) * Math.pow(t_m, 3.0))) * (l / (2.0 + t_3));
} else {
tmp = 2.0 / (Math.pow((Math.cbrt(Math.sin(k)) * (t_m * Math.cbrt(Math.pow(l, -2.0)))), 3.0) * (Math.tan(k) * (1.0 + (1.0 + t_3))));
}
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(Float64(t_m * l) / k) t_3 = Float64(k / t_m) ^ 2.0 tmp = 0.0 if (t_m <= 4.2e-113) tmp = Float64(2.0 / Float64(Float64((k ^ 2.0) * Float64(t_m * Float64((sin(k) ^ 2.0) / Float64(l * cos(k))))) / l)); elseif (t_m <= 2.2e-6) tmp = Float64(t_2 * Float64(Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (t_m ^ 3.0)))) * t_2)); elseif (t_m <= 5.6e+102) tmp = Float64(Float64(Float64(Float64(2.0 * l) / sin(k)) / Float64(tan(k) * (t_m ^ 3.0))) * Float64(l / Float64(2.0 + t_3))); else tmp = Float64(2.0 / Float64((Float64(cbrt(sin(k)) * Float64(t_m * cbrt((l ^ -2.0)))) ^ 3.0) * Float64(tan(k) * Float64(1.0 + Float64(1.0 + t_3))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[(t$95$m * l), $MachinePrecision] / k), $MachinePrecision]}, Block[{t$95$3 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 4.2e-113], N[(2.0 / N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.2e-6], N[(t$95$2 * N[(N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.6e+102], N[(N[(N[(N[(2.0 * l), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[(N[Tan[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m * N[Power[N[Power[l, -2.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + t$95$3), $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 := \frac{t\_m \cdot \ell}{k}\\
t_3 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.2 \cdot 10^{-113}:\\
\;\;\;\;\frac{2}{\frac{{k}^{2} \cdot \left(t\_m \cdot \frac{{\sin k}^{2}}{\ell \cdot \cos k}\right)}{\ell}}\\
\mathbf{elif}\;t\_m \leq 2.2 \cdot 10^{-6}:\\
\;\;\;\;t\_2 \cdot \left(\frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)} \cdot t\_2\right)\\
\mathbf{elif}\;t\_m \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;\frac{\frac{2 \cdot \ell}{\sin k}}{\tan k \cdot {t\_m}^{3}} \cdot \frac{\ell}{2 + t\_3}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{\sin k} \cdot \left(t\_m \cdot \sqrt[3]{{\ell}^{-2}}\right)\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + t\_3\right)\right)\right)}\\
\end{array}
\end{array}
\end{array}
if t < 4.2e-113Initial program 48.9%
Simplified48.9%
associate-*l*45.8%
associate-/r*49.3%
associate-+r+49.3%
metadata-eval49.3%
associate-*l*49.3%
associate-*l/49.3%
associate-*l*49.3%
Applied egg-rr49.3%
Taylor expanded in t around 0 73.4%
associate-/l*73.8%
associate-/l*75.5%
Simplified75.5%
if 4.2e-113 < t < 2.2000000000000001e-6Initial program 79.6%
Simplified79.5%
associate-*r*83.3%
add-sqr-sqrt83.2%
times-frac87.4%
Applied egg-rr87.6%
associate-/l*91.7%
*-commutative91.7%
Simplified91.7%
Taylor expanded in k around inf 63.3%
Taylor expanded in k around inf 92.0%
if 2.2000000000000001e-6 < t < 5.60000000000000037e102Initial program 73.0%
Simplified76.5%
associate-*r*76.7%
*-un-lft-identity76.7%
times-frac80.3%
associate-*r*87.9%
Applied egg-rr87.9%
/-rgt-identity87.9%
*-commutative87.9%
*-commutative87.9%
Simplified87.9%
associate-*r/90.2%
associate-*l*90.1%
Applied egg-rr90.1%
associate-/r*99.5%
Simplified99.5%
if 5.60000000000000037e102 < t Initial program 60.8%
Simplified60.8%
add-cube-cbrt60.8%
pow360.8%
associate-/r*66.3%
*-commutative66.3%
cbrt-prod66.3%
associate-/r*60.8%
div-inv60.8%
cbrt-prod60.8%
rem-cbrt-cube72.7%
pow272.7%
pow-flip73.6%
metadata-eval73.6%
Applied egg-rr73.6%
Final simplification79.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 (/ (* t_m l) k)))
(*
t_s
(if (<= t_m 4.2e-113)
(/ 2.0 (/ (* (pow k 2.0) (* t_m (/ (pow (sin k) 2.0) (* l (cos k))))) l))
(if (<= t_m 2.95e-5)
(* t_2 (* (/ 2.0 (* (tan k) (* (sin k) (pow t_m 3.0)))) t_2))
(*
(/ l (+ 2.0 (pow (/ k t_m) 2.0)))
(* l (/ 2.0 (* (tan k) (pow (* t_m (cbrt (sin k))) 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 = (t_m * l) / k;
double tmp;
if (t_m <= 4.2e-113) {
tmp = 2.0 / ((pow(k, 2.0) * (t_m * (pow(sin(k), 2.0) / (l * cos(k))))) / l);
} else if (t_m <= 2.95e-5) {
tmp = t_2 * ((2.0 / (tan(k) * (sin(k) * pow(t_m, 3.0)))) * t_2);
} else {
tmp = (l / (2.0 + pow((k / t_m), 2.0))) * (l * (2.0 / (tan(k) * pow((t_m * cbrt(sin(k))), 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 = (t_m * l) / k;
double tmp;
if (t_m <= 4.2e-113) {
tmp = 2.0 / ((Math.pow(k, 2.0) * (t_m * (Math.pow(Math.sin(k), 2.0) / (l * Math.cos(k))))) / l);
} else if (t_m <= 2.95e-5) {
tmp = t_2 * ((2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow(t_m, 3.0)))) * t_2);
} else {
tmp = (l / (2.0 + Math.pow((k / t_m), 2.0))) * (l * (2.0 / (Math.tan(k) * Math.pow((t_m * Math.cbrt(Math.sin(k))), 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(Float64(t_m * l) / k) tmp = 0.0 if (t_m <= 4.2e-113) tmp = Float64(2.0 / Float64(Float64((k ^ 2.0) * Float64(t_m * Float64((sin(k) ^ 2.0) / Float64(l * cos(k))))) / l)); elseif (t_m <= 2.95e-5) tmp = Float64(t_2 * Float64(Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (t_m ^ 3.0)))) * t_2)); else tmp = Float64(Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(l * Float64(2.0 / Float64(tan(k) * (Float64(t_m * cbrt(sin(k))) ^ 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[(N[(t$95$m * l), $MachinePrecision] / k), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 4.2e-113], N[(2.0 / N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.95e-5], N[(t$95$2 * N[(N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $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[Power[N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.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 := \frac{t\_m \cdot \ell}{k}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.2 \cdot 10^{-113}:\\
\;\;\;\;\frac{2}{\frac{{k}^{2} \cdot \left(t\_m \cdot \frac{{\sin k}^{2}}{\ell \cdot \cos k}\right)}{\ell}}\\
\mathbf{elif}\;t\_m \leq 2.95 \cdot 10^{-5}:\\
\;\;\;\;t\_2 \cdot \left(\frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)} \cdot t\_2\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}} \cdot \left(\ell \cdot \frac{2}{\tan k \cdot {\left(t\_m \cdot \sqrt[3]{\sin k}\right)}^{3}}\right)\\
\end{array}
\end{array}
\end{array}
if t < 4.2e-113Initial program 48.9%
Simplified48.9%
associate-*l*45.8%
associate-/r*49.3%
associate-+r+49.3%
metadata-eval49.3%
associate-*l*49.3%
associate-*l/49.3%
associate-*l*49.3%
Applied egg-rr49.3%
Taylor expanded in t around 0 73.4%
associate-/l*73.8%
associate-/l*75.5%
Simplified75.5%
if 4.2e-113 < t < 2.9499999999999999e-5Initial program 79.6%
Simplified79.5%
associate-*r*83.3%
add-sqr-sqrt83.2%
times-frac87.4%
Applied egg-rr87.6%
associate-/l*91.7%
*-commutative91.7%
Simplified91.7%
Taylor expanded in k around inf 63.3%
Taylor expanded in k around inf 92.0%
if 2.9499999999999999e-5 < t Initial program 65.3%
Simplified59.1%
associate-*r*62.6%
*-un-lft-identity62.6%
times-frac63.9%
associate-*r*74.2%
Applied egg-rr74.2%
/-rgt-identity74.2%
*-commutative74.2%
*-commutative74.2%
Simplified74.2%
*-commutative74.2%
add-cube-cbrt74.2%
pow374.2%
cbrt-prod74.1%
unpow374.1%
add-cbrt-cube79.8%
Applied egg-rr79.7%
Final simplification78.2%
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 (/ (* t_m l) k)))
(*
t_s
(if (<= t_m 4.2e-113)
(/ 2.0 (/ (* (pow k 2.0) (* t_m (/ (pow (sin k) 2.0) (* l (cos k))))) l))
(if (<= t_m 8.8e-7)
(* t_2 (* (/ 2.0 (* (tan k) (* (sin k) (pow t_m 3.0)))) t_2))
(if (<= t_m 5.6e+102)
(*
(/ (/ (* 2.0 l) (sin k)) (* (tan k) (pow t_m 3.0)))
(/ l (+ 2.0 (pow (/ k t_m) 2.0))))
(*
(* l (/ 2.0 (* (tan k) (pow (* t_m (cbrt (sin k))) 3.0))))
(* l 0.5))))))))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 = (t_m * l) / k;
double tmp;
if (t_m <= 4.2e-113) {
tmp = 2.0 / ((pow(k, 2.0) * (t_m * (pow(sin(k), 2.0) / (l * cos(k))))) / l);
} else if (t_m <= 8.8e-7) {
tmp = t_2 * ((2.0 / (tan(k) * (sin(k) * pow(t_m, 3.0)))) * t_2);
} else if (t_m <= 5.6e+102) {
tmp = (((2.0 * l) / sin(k)) / (tan(k) * pow(t_m, 3.0))) * (l / (2.0 + pow((k / t_m), 2.0)));
} else {
tmp = (l * (2.0 / (tan(k) * pow((t_m * cbrt(sin(k))), 3.0)))) * (l * 0.5);
}
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 = (t_m * l) / k;
double tmp;
if (t_m <= 4.2e-113) {
tmp = 2.0 / ((Math.pow(k, 2.0) * (t_m * (Math.pow(Math.sin(k), 2.0) / (l * Math.cos(k))))) / l);
} else if (t_m <= 8.8e-7) {
tmp = t_2 * ((2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow(t_m, 3.0)))) * t_2);
} else if (t_m <= 5.6e+102) {
tmp = (((2.0 * l) / Math.sin(k)) / (Math.tan(k) * Math.pow(t_m, 3.0))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
} else {
tmp = (l * (2.0 / (Math.tan(k) * Math.pow((t_m * Math.cbrt(Math.sin(k))), 3.0)))) * (l * 0.5);
}
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(Float64(t_m * l) / k) tmp = 0.0 if (t_m <= 4.2e-113) tmp = Float64(2.0 / Float64(Float64((k ^ 2.0) * Float64(t_m * Float64((sin(k) ^ 2.0) / Float64(l * cos(k))))) / l)); elseif (t_m <= 8.8e-7) tmp = Float64(t_2 * Float64(Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (t_m ^ 3.0)))) * t_2)); elseif (t_m <= 5.6e+102) tmp = Float64(Float64(Float64(Float64(2.0 * l) / sin(k)) / Float64(tan(k) * (t_m ^ 3.0))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); else tmp = Float64(Float64(l * Float64(2.0 / Float64(tan(k) * (Float64(t_m * cbrt(sin(k))) ^ 3.0)))) * Float64(l * 0.5)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[(t$95$m * l), $MachinePrecision] / k), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 4.2e-113], N[(2.0 / N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 8.8e-7], N[(t$95$2 * N[(N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.6e+102], N[(N[(N[(N[(2.0 * l), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[(N[Tan[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[Power[N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * 0.5), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{t\_m \cdot \ell}{k}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.2 \cdot 10^{-113}:\\
\;\;\;\;\frac{2}{\frac{{k}^{2} \cdot \left(t\_m \cdot \frac{{\sin k}^{2}}{\ell \cdot \cos k}\right)}{\ell}}\\
\mathbf{elif}\;t\_m \leq 8.8 \cdot 10^{-7}:\\
\;\;\;\;t\_2 \cdot \left(\frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)} \cdot t\_2\right)\\
\mathbf{elif}\;t\_m \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;\frac{\frac{2 \cdot \ell}{\sin k}}{\tan k \cdot {t\_m}^{3}} \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \frac{2}{\tan k \cdot {\left(t\_m \cdot \sqrt[3]{\sin k}\right)}^{3}}\right) \cdot \left(\ell \cdot 0.5\right)\\
\end{array}
\end{array}
\end{array}
if t < 4.2e-113Initial program 48.9%
Simplified48.9%
associate-*l*45.8%
associate-/r*49.3%
associate-+r+49.3%
metadata-eval49.3%
associate-*l*49.3%
associate-*l/49.3%
associate-*l*49.3%
Applied egg-rr49.3%
Taylor expanded in t around 0 73.4%
associate-/l*73.8%
associate-/l*75.5%
Simplified75.5%
if 4.2e-113 < t < 8.8000000000000004e-7Initial program 79.6%
Simplified79.5%
associate-*r*83.3%
add-sqr-sqrt83.2%
times-frac87.4%
Applied egg-rr87.6%
associate-/l*91.7%
*-commutative91.7%
Simplified91.7%
Taylor expanded in k around inf 63.3%
Taylor expanded in k around inf 92.0%
if 8.8000000000000004e-7 < t < 5.60000000000000037e102Initial program 73.0%
Simplified76.5%
associate-*r*76.7%
*-un-lft-identity76.7%
times-frac80.3%
associate-*r*87.9%
Applied egg-rr87.9%
/-rgt-identity87.9%
*-commutative87.9%
*-commutative87.9%
Simplified87.9%
associate-*r/90.2%
associate-*l*90.1%
Applied egg-rr90.1%
associate-/r*99.5%
Simplified99.5%
if 5.60000000000000037e102 < t Initial program 60.8%
Simplified49.0%
associate-*r*54.4%
*-un-lft-identity54.4%
times-frac54.4%
associate-*r*66.3%
Applied egg-rr66.3%
/-rgt-identity66.3%
*-commutative66.3%
*-commutative66.3%
Simplified66.3%
Taylor expanded in k around 0 66.3%
*-commutative66.3%
Simplified66.3%
*-commutative66.3%
add-cube-cbrt66.3%
pow366.3%
cbrt-prod66.3%
unpow366.3%
add-cbrt-cube75.2%
Applied egg-rr75.1%
Final simplification79.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 (/ (* t_m l) k)))
(*
t_s
(if (<= t_m 4.2e-113)
(/ 2.0 (/ (* (pow k 2.0) (* t_m (/ (pow (sin k) 2.0) (* l (cos k))))) l))
(if (<= t_m 3.3e+69)
(* t_2 (* (/ 2.0 (* (tan k) (* (sin k) (pow t_m 3.0)))) t_2))
(*
(* l (/ 2.0 (* (tan k) (pow (* t_m (cbrt (sin k))) 3.0))))
(* l 0.5)))))))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 = (t_m * l) / k;
double tmp;
if (t_m <= 4.2e-113) {
tmp = 2.0 / ((pow(k, 2.0) * (t_m * (pow(sin(k), 2.0) / (l * cos(k))))) / l);
} else if (t_m <= 3.3e+69) {
tmp = t_2 * ((2.0 / (tan(k) * (sin(k) * pow(t_m, 3.0)))) * t_2);
} else {
tmp = (l * (2.0 / (tan(k) * pow((t_m * cbrt(sin(k))), 3.0)))) * (l * 0.5);
}
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 = (t_m * l) / k;
double tmp;
if (t_m <= 4.2e-113) {
tmp = 2.0 / ((Math.pow(k, 2.0) * (t_m * (Math.pow(Math.sin(k), 2.0) / (l * Math.cos(k))))) / l);
} else if (t_m <= 3.3e+69) {
tmp = t_2 * ((2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow(t_m, 3.0)))) * t_2);
} else {
tmp = (l * (2.0 / (Math.tan(k) * Math.pow((t_m * Math.cbrt(Math.sin(k))), 3.0)))) * (l * 0.5);
}
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(Float64(t_m * l) / k) tmp = 0.0 if (t_m <= 4.2e-113) tmp = Float64(2.0 / Float64(Float64((k ^ 2.0) * Float64(t_m * Float64((sin(k) ^ 2.0) / Float64(l * cos(k))))) / l)); elseif (t_m <= 3.3e+69) tmp = Float64(t_2 * Float64(Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (t_m ^ 3.0)))) * t_2)); else tmp = Float64(Float64(l * Float64(2.0 / Float64(tan(k) * (Float64(t_m * cbrt(sin(k))) ^ 3.0)))) * Float64(l * 0.5)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[(t$95$m * l), $MachinePrecision] / k), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 4.2e-113], N[(2.0 / N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.3e+69], N[(t$95$2 * N[(N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], N[(N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[Power[N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * 0.5), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{t\_m \cdot \ell}{k}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.2 \cdot 10^{-113}:\\
\;\;\;\;\frac{2}{\frac{{k}^{2} \cdot \left(t\_m \cdot \frac{{\sin k}^{2}}{\ell \cdot \cos k}\right)}{\ell}}\\
\mathbf{elif}\;t\_m \leq 3.3 \cdot 10^{+69}:\\
\;\;\;\;t\_2 \cdot \left(\frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)} \cdot t\_2\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \frac{2}{\tan k \cdot {\left(t\_m \cdot \sqrt[3]{\sin k}\right)}^{3}}\right) \cdot \left(\ell \cdot 0.5\right)\\
\end{array}
\end{array}
\end{array}
if t < 4.2e-113Initial program 48.9%
Simplified48.9%
associate-*l*45.8%
associate-/r*49.3%
associate-+r+49.3%
metadata-eval49.3%
associate-*l*49.3%
associate-*l/49.3%
associate-*l*49.3%
Applied egg-rr49.3%
Taylor expanded in t around 0 73.4%
associate-/l*73.8%
associate-/l*75.5%
Simplified75.5%
if 4.2e-113 < t < 3.2999999999999999e69Initial program 83.7%
Simplified83.6%
associate-*r*85.8%
add-sqr-sqrt85.7%
times-frac88.1%
Applied egg-rr88.2%
associate-/l*90.6%
*-commutative90.6%
Simplified90.6%
Taylor expanded in k around inf 62.6%
Taylor expanded in k around inf 86.3%
if 3.2999999999999999e69 < t Initial program 56.7%
Simplified48.3%
associate-*r*53.0%
*-un-lft-identity53.0%
times-frac54.8%
associate-*r*68.9%
Applied egg-rr68.9%
/-rgt-identity68.9%
*-commutative68.9%
*-commutative68.9%
Simplified68.9%
Taylor expanded in k around 0 67.0%
*-commutative67.0%
Simplified67.0%
*-commutative68.9%
add-cube-cbrt68.9%
pow368.9%
cbrt-prod68.8%
unpow368.8%
add-cbrt-cube76.4%
Applied egg-rr74.5%
Final simplification77.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 (/ (* t_m l) k)))
(*
t_s
(if (<= t_m 4.2e-113)
(/ 2.0 (/ (* (* k k) (* t_m (pow (sin k) 2.0))) (* (cos k) (pow l 2.0))))
(if (<= t_m 1.35e+69)
(* t_2 (* (/ 2.0 (* (tan k) (* (sin k) (pow t_m 3.0)))) t_2))
(*
(* l (/ 2.0 (* (tan k) (pow (* t_m (cbrt (sin k))) 3.0))))
(* l 0.5)))))))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 = (t_m * l) / k;
double tmp;
if (t_m <= 4.2e-113) {
tmp = 2.0 / (((k * k) * (t_m * pow(sin(k), 2.0))) / (cos(k) * pow(l, 2.0)));
} else if (t_m <= 1.35e+69) {
tmp = t_2 * ((2.0 / (tan(k) * (sin(k) * pow(t_m, 3.0)))) * t_2);
} else {
tmp = (l * (2.0 / (tan(k) * pow((t_m * cbrt(sin(k))), 3.0)))) * (l * 0.5);
}
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 = (t_m * l) / k;
double tmp;
if (t_m <= 4.2e-113) {
tmp = 2.0 / (((k * k) * (t_m * Math.pow(Math.sin(k), 2.0))) / (Math.cos(k) * Math.pow(l, 2.0)));
} else if (t_m <= 1.35e+69) {
tmp = t_2 * ((2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow(t_m, 3.0)))) * t_2);
} else {
tmp = (l * (2.0 / (Math.tan(k) * Math.pow((t_m * Math.cbrt(Math.sin(k))), 3.0)))) * (l * 0.5);
}
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(Float64(t_m * l) / k) tmp = 0.0 if (t_m <= 4.2e-113) tmp = Float64(2.0 / Float64(Float64(Float64(k * k) * Float64(t_m * (sin(k) ^ 2.0))) / Float64(cos(k) * (l ^ 2.0)))); elseif (t_m <= 1.35e+69) tmp = Float64(t_2 * Float64(Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (t_m ^ 3.0)))) * t_2)); else tmp = Float64(Float64(l * Float64(2.0 / Float64(tan(k) * (Float64(t_m * cbrt(sin(k))) ^ 3.0)))) * Float64(l * 0.5)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[(t$95$m * l), $MachinePrecision] / k), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 4.2e-113], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.35e+69], N[(t$95$2 * N[(N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], N[(N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[Power[N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * 0.5), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{t\_m \cdot \ell}{k}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.2 \cdot 10^{-113}:\\
\;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot \left(t\_m \cdot {\sin k}^{2}\right)}{\cos k \cdot {\ell}^{2}}}\\
\mathbf{elif}\;t\_m \leq 1.35 \cdot 10^{+69}:\\
\;\;\;\;t\_2 \cdot \left(\frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)} \cdot t\_2\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \frac{2}{\tan k \cdot {\left(t\_m \cdot \sqrt[3]{\sin k}\right)}^{3}}\right) \cdot \left(\ell \cdot 0.5\right)\\
\end{array}
\end{array}
\end{array}
if t < 4.2e-113Initial program 48.9%
Simplified48.9%
Taylor expanded in t around 0 67.9%
unpow267.9%
Applied egg-rr67.9%
if 4.2e-113 < t < 1.3499999999999999e69Initial program 83.7%
Simplified83.6%
associate-*r*85.8%
add-sqr-sqrt85.7%
times-frac88.1%
Applied egg-rr88.2%
associate-/l*90.6%
*-commutative90.6%
Simplified90.6%
Taylor expanded in k around inf 62.6%
Taylor expanded in k around inf 86.3%
if 1.3499999999999999e69 < t Initial program 56.7%
Simplified48.3%
associate-*r*53.0%
*-un-lft-identity53.0%
times-frac54.8%
associate-*r*68.9%
Applied egg-rr68.9%
/-rgt-identity68.9%
*-commutative68.9%
*-commutative68.9%
Simplified68.9%
Taylor expanded in k around 0 67.0%
*-commutative67.0%
Simplified67.0%
*-commutative68.9%
add-cube-cbrt68.9%
pow368.9%
cbrt-prod68.8%
unpow368.8%
add-cbrt-cube76.4%
Applied egg-rr74.5%
Final simplification72.2%
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 (/ (* t_m l) k)))
(*
t_s
(if (<= t_m 4.2e-113)
(/ 2.0 (* (pow k 4.0) (/ t_m (* (cos k) (pow l 2.0)))))
(if (<= t_m 1.4e+69)
(* t_2 (* (/ 2.0 (* (tan k) (* (sin k) (pow t_m 3.0)))) t_2))
(*
(* l (/ 2.0 (* (tan k) (pow (* t_m (cbrt (sin k))) 3.0))))
(* l 0.5)))))))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 = (t_m * l) / k;
double tmp;
if (t_m <= 4.2e-113) {
tmp = 2.0 / (pow(k, 4.0) * (t_m / (cos(k) * pow(l, 2.0))));
} else if (t_m <= 1.4e+69) {
tmp = t_2 * ((2.0 / (tan(k) * (sin(k) * pow(t_m, 3.0)))) * t_2);
} else {
tmp = (l * (2.0 / (tan(k) * pow((t_m * cbrt(sin(k))), 3.0)))) * (l * 0.5);
}
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 = (t_m * l) / k;
double tmp;
if (t_m <= 4.2e-113) {
tmp = 2.0 / (Math.pow(k, 4.0) * (t_m / (Math.cos(k) * Math.pow(l, 2.0))));
} else if (t_m <= 1.4e+69) {
tmp = t_2 * ((2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow(t_m, 3.0)))) * t_2);
} else {
tmp = (l * (2.0 / (Math.tan(k) * Math.pow((t_m * Math.cbrt(Math.sin(k))), 3.0)))) * (l * 0.5);
}
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(Float64(t_m * l) / k) tmp = 0.0 if (t_m <= 4.2e-113) tmp = Float64(2.0 / Float64((k ^ 4.0) * Float64(t_m / Float64(cos(k) * (l ^ 2.0))))); elseif (t_m <= 1.4e+69) tmp = Float64(t_2 * Float64(Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (t_m ^ 3.0)))) * t_2)); else tmp = Float64(Float64(l * Float64(2.0 / Float64(tan(k) * (Float64(t_m * cbrt(sin(k))) ^ 3.0)))) * Float64(l * 0.5)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[(t$95$m * l), $MachinePrecision] / k), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 4.2e-113], N[(2.0 / N[(N[Power[k, 4.0], $MachinePrecision] * N[(t$95$m / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.4e+69], N[(t$95$2 * N[(N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], N[(N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[Power[N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * 0.5), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{t\_m \cdot \ell}{k}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.2 \cdot 10^{-113}:\\
\;\;\;\;\frac{2}{{k}^{4} \cdot \frac{t\_m}{\cos k \cdot {\ell}^{2}}}\\
\mathbf{elif}\;t\_m \leq 1.4 \cdot 10^{+69}:\\
\;\;\;\;t\_2 \cdot \left(\frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)} \cdot t\_2\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \frac{2}{\tan k \cdot {\left(t\_m \cdot \sqrt[3]{\sin k}\right)}^{3}}\right) \cdot \left(\ell \cdot 0.5\right)\\
\end{array}
\end{array}
\end{array}
if t < 4.2e-113Initial program 48.9%
Simplified48.9%
Taylor expanded in t around 0 67.9%
Taylor expanded in k around 0 61.9%
div-inv61.9%
associate-/l*62.4%
Applied egg-rr62.4%
associate-*r/62.4%
metadata-eval62.4%
Simplified62.4%
if 4.2e-113 < t < 1.39999999999999991e69Initial program 83.7%
Simplified83.6%
associate-*r*85.8%
add-sqr-sqrt85.7%
times-frac88.1%
Applied egg-rr88.2%
associate-/l*90.6%
*-commutative90.6%
Simplified90.6%
Taylor expanded in k around inf 62.6%
Taylor expanded in k around inf 86.3%
if 1.39999999999999991e69 < t Initial program 56.7%
Simplified48.3%
associate-*r*53.0%
*-un-lft-identity53.0%
times-frac54.8%
associate-*r*68.9%
Applied egg-rr68.9%
/-rgt-identity68.9%
*-commutative68.9%
*-commutative68.9%
Simplified68.9%
Taylor expanded in k around 0 67.0%
*-commutative67.0%
Simplified67.0%
*-commutative68.9%
add-cube-cbrt68.9%
pow368.9%
cbrt-prod68.8%
unpow368.8%
add-cbrt-cube76.4%
Applied egg-rr74.5%
Final simplification68.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ (* t_m l) k)))
(*
t_s
(if (<= t_m 4.2e-113)
(/ 2.0 (* (pow k 4.0) (/ t_m (* (cos k) (pow l 2.0)))))
(if (<= t_m 2.8e+34)
(* t_2 (* (/ 2.0 (* (tan k) (* (sin k) (pow t_m 3.0)))) t_2))
(* (/ (/ (* 2.0 l) (sin k)) (* (tan k) (pow t_m 3.0))) (* l 0.5)))))))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 = (t_m * l) / k;
double tmp;
if (t_m <= 4.2e-113) {
tmp = 2.0 / (pow(k, 4.0) * (t_m / (cos(k) * pow(l, 2.0))));
} else if (t_m <= 2.8e+34) {
tmp = t_2 * ((2.0 / (tan(k) * (sin(k) * pow(t_m, 3.0)))) * t_2);
} else {
tmp = (((2.0 * l) / sin(k)) / (tan(k) * pow(t_m, 3.0))) * (l * 0.5);
}
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 = (t_m * l) / k
if (t_m <= 4.2d-113) then
tmp = 2.0d0 / ((k ** 4.0d0) * (t_m / (cos(k) * (l ** 2.0d0))))
else if (t_m <= 2.8d+34) then
tmp = t_2 * ((2.0d0 / (tan(k) * (sin(k) * (t_m ** 3.0d0)))) * t_2)
else
tmp = (((2.0d0 * l) / sin(k)) / (tan(k) * (t_m ** 3.0d0))) * (l * 0.5d0)
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 = (t_m * l) / k;
double tmp;
if (t_m <= 4.2e-113) {
tmp = 2.0 / (Math.pow(k, 4.0) * (t_m / (Math.cos(k) * Math.pow(l, 2.0))));
} else if (t_m <= 2.8e+34) {
tmp = t_2 * ((2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow(t_m, 3.0)))) * t_2);
} else {
tmp = (((2.0 * l) / Math.sin(k)) / (Math.tan(k) * Math.pow(t_m, 3.0))) * (l * 0.5);
}
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 = (t_m * l) / k tmp = 0 if t_m <= 4.2e-113: tmp = 2.0 / (math.pow(k, 4.0) * (t_m / (math.cos(k) * math.pow(l, 2.0)))) elif t_m <= 2.8e+34: tmp = t_2 * ((2.0 / (math.tan(k) * (math.sin(k) * math.pow(t_m, 3.0)))) * t_2) else: tmp = (((2.0 * l) / math.sin(k)) / (math.tan(k) * math.pow(t_m, 3.0))) * (l * 0.5) 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(Float64(t_m * l) / k) tmp = 0.0 if (t_m <= 4.2e-113) tmp = Float64(2.0 / Float64((k ^ 4.0) * Float64(t_m / Float64(cos(k) * (l ^ 2.0))))); elseif (t_m <= 2.8e+34) tmp = Float64(t_2 * Float64(Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (t_m ^ 3.0)))) * t_2)); else tmp = Float64(Float64(Float64(Float64(2.0 * l) / sin(k)) / Float64(tan(k) * (t_m ^ 3.0))) * Float64(l * 0.5)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = (t_m * l) / k; tmp = 0.0; if (t_m <= 4.2e-113) tmp = 2.0 / ((k ^ 4.0) * (t_m / (cos(k) * (l ^ 2.0)))); elseif (t_m <= 2.8e+34) tmp = t_2 * ((2.0 / (tan(k) * (sin(k) * (t_m ^ 3.0)))) * t_2); else tmp = (((2.0 * l) / sin(k)) / (tan(k) * (t_m ^ 3.0))) * (l * 0.5); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[(t$95$m * l), $MachinePrecision] / k), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 4.2e-113], N[(2.0 / N[(N[Power[k, 4.0], $MachinePrecision] * N[(t$95$m / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.8e+34], N[(t$95$2 * N[(N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(2.0 * l), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[(N[Tan[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * 0.5), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{t\_m \cdot \ell}{k}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.2 \cdot 10^{-113}:\\
\;\;\;\;\frac{2}{{k}^{4} \cdot \frac{t\_m}{\cos k \cdot {\ell}^{2}}}\\
\mathbf{elif}\;t\_m \leq 2.8 \cdot 10^{+34}:\\
\;\;\;\;t\_2 \cdot \left(\frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)} \cdot t\_2\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2 \cdot \ell}{\sin k}}{\tan k \cdot {t\_m}^{3}} \cdot \left(\ell \cdot 0.5\right)\\
\end{array}
\end{array}
\end{array}
if t < 4.2e-113Initial program 48.9%
Simplified48.9%
Taylor expanded in t around 0 67.9%
Taylor expanded in k around 0 61.9%
div-inv61.9%
associate-/l*62.4%
Applied egg-rr62.4%
associate-*r/62.4%
metadata-eval62.4%
Simplified62.4%
if 4.2e-113 < t < 2.80000000000000008e34Initial program 85.1%
Simplified85.1%
associate-*r*87.8%
add-sqr-sqrt87.6%
times-frac90.7%
Applied egg-rr90.9%
associate-/l*93.9%
*-commutative93.9%
Simplified93.9%
Taylor expanded in k around inf 61.4%
Taylor expanded in k around inf 88.4%
if 2.80000000000000008e34 < t Initial program 60.0%
Simplified52.9%
associate-*r*56.9%
*-un-lft-identity56.9%
times-frac58.4%
associate-*r*70.3%
Applied egg-rr70.3%
/-rgt-identity70.3%
*-commutative70.3%
*-commutative70.3%
Simplified70.3%
Taylor expanded in k around 0 67.2%
*-commutative67.2%
Simplified67.2%
associate-*r/71.3%
associate-*l*71.3%
Applied egg-rr68.1%
associate-/r*75.0%
Simplified71.8%
Final simplification67.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 4.2e-113)
(/ 2.0 (* (pow k 4.0) (/ t_m (* (cos k) (pow l 2.0)))))
(if (<= t_m 3.7e+34)
(*
(* (/ 2.0 (* (tan k) (* (sin k) (pow t_m 3.0)))) (/ (* t_m l) k))
(* l (/ t_m k)))
(* (/ (/ (* 2.0 l) (sin k)) (* (tan k) (pow t_m 3.0))) (* l 0.5))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4.2e-113) {
tmp = 2.0 / (pow(k, 4.0) * (t_m / (cos(k) * pow(l, 2.0))));
} else if (t_m <= 3.7e+34) {
tmp = ((2.0 / (tan(k) * (sin(k) * pow(t_m, 3.0)))) * ((t_m * l) / k)) * (l * (t_m / k));
} else {
tmp = (((2.0 * l) / sin(k)) / (tan(k) * pow(t_m, 3.0))) * (l * 0.5);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 4.2d-113) then
tmp = 2.0d0 / ((k ** 4.0d0) * (t_m / (cos(k) * (l ** 2.0d0))))
else if (t_m <= 3.7d+34) then
tmp = ((2.0d0 / (tan(k) * (sin(k) * (t_m ** 3.0d0)))) * ((t_m * l) / k)) * (l * (t_m / k))
else
tmp = (((2.0d0 * l) / sin(k)) / (tan(k) * (t_m ** 3.0d0))) * (l * 0.5d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4.2e-113) {
tmp = 2.0 / (Math.pow(k, 4.0) * (t_m / (Math.cos(k) * Math.pow(l, 2.0))));
} else if (t_m <= 3.7e+34) {
tmp = ((2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow(t_m, 3.0)))) * ((t_m * l) / k)) * (l * (t_m / k));
} else {
tmp = (((2.0 * l) / Math.sin(k)) / (Math.tan(k) * Math.pow(t_m, 3.0))) * (l * 0.5);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 4.2e-113: tmp = 2.0 / (math.pow(k, 4.0) * (t_m / (math.cos(k) * math.pow(l, 2.0)))) elif t_m <= 3.7e+34: tmp = ((2.0 / (math.tan(k) * (math.sin(k) * math.pow(t_m, 3.0)))) * ((t_m * l) / k)) * (l * (t_m / k)) else: tmp = (((2.0 * l) / math.sin(k)) / (math.tan(k) * math.pow(t_m, 3.0))) * (l * 0.5) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 4.2e-113) tmp = Float64(2.0 / Float64((k ^ 4.0) * Float64(t_m / Float64(cos(k) * (l ^ 2.0))))); elseif (t_m <= 3.7e+34) tmp = Float64(Float64(Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (t_m ^ 3.0)))) * Float64(Float64(t_m * l) / k)) * Float64(l * Float64(t_m / k))); else tmp = Float64(Float64(Float64(Float64(2.0 * l) / sin(k)) / Float64(tan(k) * (t_m ^ 3.0))) * Float64(l * 0.5)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 4.2e-113) tmp = 2.0 / ((k ^ 4.0) * (t_m / (cos(k) * (l ^ 2.0)))); elseif (t_m <= 3.7e+34) tmp = ((2.0 / (tan(k) * (sin(k) * (t_m ^ 3.0)))) * ((t_m * l) / k)) * (l * (t_m / k)); else tmp = (((2.0 * l) / sin(k)) / (tan(k) * (t_m ^ 3.0))) * (l * 0.5); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 4.2e-113], N[(2.0 / N[(N[Power[k, 4.0], $MachinePrecision] * N[(t$95$m / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.7e+34], N[(N[(N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m * l), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision] * N[(l * N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(2.0 * l), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[(N[Tan[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * 0.5), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.2 \cdot 10^{-113}:\\
\;\;\;\;\frac{2}{{k}^{4} \cdot \frac{t\_m}{\cos k \cdot {\ell}^{2}}}\\
\mathbf{elif}\;t\_m \leq 3.7 \cdot 10^{+34}:\\
\;\;\;\;\left(\frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)} \cdot \frac{t\_m \cdot \ell}{k}\right) \cdot \left(\ell \cdot \frac{t\_m}{k}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2 \cdot \ell}{\sin k}}{\tan k \cdot {t\_m}^{3}} \cdot \left(\ell \cdot 0.5\right)\\
\end{array}
\end{array}
if t < 4.2e-113Initial program 48.9%
Simplified48.9%
Taylor expanded in t around 0 67.9%
Taylor expanded in k around 0 61.9%
div-inv61.9%
associate-/l*62.4%
Applied egg-rr62.4%
associate-*r/62.4%
metadata-eval62.4%
Simplified62.4%
if 4.2e-113 < t < 3.70000000000000009e34Initial program 85.1%
Simplified85.1%
associate-*r*87.8%
add-sqr-sqrt87.6%
times-frac90.7%
Applied egg-rr90.9%
associate-/l*93.9%
*-commutative93.9%
Simplified93.9%
Taylor expanded in k around inf 61.4%
Taylor expanded in k around inf 88.4%
associate-/l*85.5%
Simplified85.5%
if 3.70000000000000009e34 < t Initial program 60.0%
Simplified52.9%
associate-*r*56.9%
*-un-lft-identity56.9%
times-frac58.4%
associate-*r*70.3%
Applied egg-rr70.3%
/-rgt-identity70.3%
*-commutative70.3%
*-commutative70.3%
Simplified70.3%
Taylor expanded in k around 0 67.2%
*-commutative67.2%
Simplified67.2%
associate-*r/71.3%
associate-*l*71.3%
Applied egg-rr68.1%
associate-/r*75.0%
Simplified71.8%
Final simplification67.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 (<= k 1.35e+54)
(* (/ (/ (* 2.0 l) (sin k)) (* (tan k) (pow t_m 3.0))) (* l 0.5))
(/ 2.0 (* (pow k 4.0) (/ t_m (* (cos k) (pow l 2.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.35e+54) {
tmp = (((2.0 * l) / sin(k)) / (tan(k) * pow(t_m, 3.0))) * (l * 0.5);
} else {
tmp = 2.0 / (pow(k, 4.0) * (t_m / (cos(k) * 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) :: tmp
if (k <= 1.35d+54) then
tmp = (((2.0d0 * l) / sin(k)) / (tan(k) * (t_m ** 3.0d0))) * (l * 0.5d0)
else
tmp = 2.0d0 / ((k ** 4.0d0) * (t_m / (cos(k) * (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 (k <= 1.35e+54) {
tmp = (((2.0 * l) / Math.sin(k)) / (Math.tan(k) * Math.pow(t_m, 3.0))) * (l * 0.5);
} else {
tmp = 2.0 / (Math.pow(k, 4.0) * (t_m / (Math.cos(k) * 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): tmp = 0 if k <= 1.35e+54: tmp = (((2.0 * l) / math.sin(k)) / (math.tan(k) * math.pow(t_m, 3.0))) * (l * 0.5) else: tmp = 2.0 / (math.pow(k, 4.0) * (t_m / (math.cos(k) * math.pow(l, 2.0)))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.35e+54) tmp = Float64(Float64(Float64(Float64(2.0 * l) / sin(k)) / Float64(tan(k) * (t_m ^ 3.0))) * Float64(l * 0.5)); else tmp = Float64(2.0 / Float64((k ^ 4.0) * Float64(t_m / Float64(cos(k) * (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 (k <= 1.35e+54) tmp = (((2.0 * l) / sin(k)) / (tan(k) * (t_m ^ 3.0))) * (l * 0.5); else tmp = 2.0 / ((k ^ 4.0) * (t_m / (cos(k) * (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[k, 1.35e+54], N[(N[(N[(N[(2.0 * l), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[(N[Tan[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * 0.5), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[k, 4.0], $MachinePrecision] * N[(t$95$m / N[(N[Cos[k], $MachinePrecision] * 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)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.35 \cdot 10^{+54}:\\
\;\;\;\;\frac{\frac{2 \cdot \ell}{\sin k}}{\tan k \cdot {t\_m}^{3}} \cdot \left(\ell \cdot 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{4} \cdot \frac{t\_m}{\cos k \cdot {\ell}^{2}}}\\
\end{array}
\end{array}
if k < 1.35000000000000005e54Initial program 58.6%
Simplified53.9%
associate-*r*58.3%
*-un-lft-identity58.3%
times-frac57.1%
associate-*r*62.6%
Applied egg-rr62.6%
/-rgt-identity62.6%
*-commutative62.6%
*-commutative62.6%
Simplified62.6%
Taylor expanded in k around 0 65.4%
*-commutative65.4%
Simplified65.4%
associate-*r/62.9%
associate-*l*62.9%
Applied egg-rr65.7%
associate-/r*64.4%
Simplified67.2%
if 1.35000000000000005e54 < k Initial program 47.3%
Simplified47.3%
Taylor expanded in t around 0 72.3%
Taylor expanded in k around 0 64.8%
div-inv64.8%
associate-/l*66.3%
Applied egg-rr66.3%
associate-*r/66.3%
metadata-eval66.3%
Simplified66.3%
Final simplification67.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 3.55e+53)
(* (* l 0.5) (* l (/ 2.0 (* (tan k) (* (sin k) (pow t_m 3.0))))))
(/ 2.0 (* (pow k 4.0) (/ t_m (* (cos k) (pow l 2.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 3.55e+53) {
tmp = (l * 0.5) * (l * (2.0 / (tan(k) * (sin(k) * pow(t_m, 3.0)))));
} else {
tmp = 2.0 / (pow(k, 4.0) * (t_m / (cos(k) * 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) :: tmp
if (k <= 3.55d+53) then
tmp = (l * 0.5d0) * (l * (2.0d0 / (tan(k) * (sin(k) * (t_m ** 3.0d0)))))
else
tmp = 2.0d0 / ((k ** 4.0d0) * (t_m / (cos(k) * (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 (k <= 3.55e+53) {
tmp = (l * 0.5) * (l * (2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow(t_m, 3.0)))));
} else {
tmp = 2.0 / (Math.pow(k, 4.0) * (t_m / (Math.cos(k) * 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): tmp = 0 if k <= 3.55e+53: tmp = (l * 0.5) * (l * (2.0 / (math.tan(k) * (math.sin(k) * math.pow(t_m, 3.0))))) else: tmp = 2.0 / (math.pow(k, 4.0) * (t_m / (math.cos(k) * math.pow(l, 2.0)))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 3.55e+53) tmp = Float64(Float64(l * 0.5) * Float64(l * Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (t_m ^ 3.0)))))); else tmp = Float64(2.0 / Float64((k ^ 4.0) * Float64(t_m / Float64(cos(k) * (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 (k <= 3.55e+53) tmp = (l * 0.5) * (l * (2.0 / (tan(k) * (sin(k) * (t_m ^ 3.0))))); else tmp = 2.0 / ((k ^ 4.0) * (t_m / (cos(k) * (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[k, 3.55e+53], N[(N[(l * 0.5), $MachinePrecision] * 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]), $MachinePrecision], N[(2.0 / N[(N[Power[k, 4.0], $MachinePrecision] * N[(t$95$m / N[(N[Cos[k], $MachinePrecision] * 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)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 3.55 \cdot 10^{+53}:\\
\;\;\;\;\left(\ell \cdot 0.5\right) \cdot \left(\ell \cdot \frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{4} \cdot \frac{t\_m}{\cos k \cdot {\ell}^{2}}}\\
\end{array}
\end{array}
if k < 3.54999999999999987e53Initial program 58.6%
Simplified53.9%
associate-*r*58.3%
*-un-lft-identity58.3%
times-frac57.1%
associate-*r*62.6%
Applied egg-rr62.6%
/-rgt-identity62.6%
*-commutative62.6%
*-commutative62.6%
Simplified62.6%
Taylor expanded in k around 0 65.4%
*-commutative65.4%
Simplified65.4%
if 3.54999999999999987e53 < k Initial program 47.3%
Simplified47.3%
Taylor expanded in t around 0 72.3%
Taylor expanded in k around 0 64.8%
div-inv64.8%
associate-/l*66.3%
Applied egg-rr66.3%
associate-*r/66.3%
metadata-eval66.3%
Simplified66.3%
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 (<= k 1.25e-34)
(* (* l 0.5) (* l (/ 2.0 (* (tan k) (* k (pow t_m 3.0))))))
(/ 2.0 (/ (* t_m (pow k 4.0)) (* (cos k) (pow l 2.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.25e-34) {
tmp = (l * 0.5) * (l * (2.0 / (tan(k) * (k * pow(t_m, 3.0)))));
} else {
tmp = 2.0 / ((t_m * pow(k, 4.0)) / (cos(k) * 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) :: tmp
if (k <= 1.25d-34) then
tmp = (l * 0.5d0) * (l * (2.0d0 / (tan(k) * (k * (t_m ** 3.0d0)))))
else
tmp = 2.0d0 / ((t_m * (k ** 4.0d0)) / (cos(k) * (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 (k <= 1.25e-34) {
tmp = (l * 0.5) * (l * (2.0 / (Math.tan(k) * (k * Math.pow(t_m, 3.0)))));
} else {
tmp = 2.0 / ((t_m * Math.pow(k, 4.0)) / (Math.cos(k) * 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): tmp = 0 if k <= 1.25e-34: tmp = (l * 0.5) * (l * (2.0 / (math.tan(k) * (k * math.pow(t_m, 3.0))))) else: tmp = 2.0 / ((t_m * math.pow(k, 4.0)) / (math.cos(k) * math.pow(l, 2.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.25e-34) tmp = Float64(Float64(l * 0.5) * Float64(l * Float64(2.0 / Float64(tan(k) * Float64(k * (t_m ^ 3.0)))))); else tmp = Float64(2.0 / Float64(Float64(t_m * (k ^ 4.0)) / Float64(cos(k) * (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 (k <= 1.25e-34) tmp = (l * 0.5) * (l * (2.0 / (tan(k) * (k * (t_m ^ 3.0))))); else tmp = 2.0 / ((t_m * (k ^ 4.0)) / (cos(k) * (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[k, 1.25e-34], N[(N[(l * 0.5), $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], N[(2.0 / N[(N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.25 \cdot 10^{-34}:\\
\;\;\;\;\left(\ell \cdot 0.5\right) \cdot \left(\ell \cdot \frac{2}{\tan k \cdot \left(k \cdot {t\_m}^{3}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{4}}{\cos k \cdot {\ell}^{2}}}\\
\end{array}
\end{array}
if k < 1.2500000000000001e-34Initial program 60.8%
Simplified55.5%
associate-*r*59.3%
*-un-lft-identity59.3%
times-frac57.9%
associate-*r*64.2%
Applied egg-rr64.2%
/-rgt-identity64.2%
*-commutative64.2%
*-commutative64.2%
Simplified64.2%
Taylor expanded in k around 0 66.7%
*-commutative66.7%
Simplified66.7%
Taylor expanded in k around 0 65.4%
if 1.2500000000000001e-34 < k Initial program 45.7%
Simplified45.7%
Taylor expanded in t around 0 72.1%
Taylor expanded in k around 0 63.4%
Final simplification64.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1.15e-34)
(* (* l 0.5) (* l (/ 2.0 (* (tan k) (* k (pow t_m 3.0))))))
(/ 2.0 (* (pow k 4.0) (/ t_m (* (cos k) (pow l 2.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.15e-34) {
tmp = (l * 0.5) * (l * (2.0 / (tan(k) * (k * pow(t_m, 3.0)))));
} else {
tmp = 2.0 / (pow(k, 4.0) * (t_m / (cos(k) * 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) :: tmp
if (k <= 1.15d-34) then
tmp = (l * 0.5d0) * (l * (2.0d0 / (tan(k) * (k * (t_m ** 3.0d0)))))
else
tmp = 2.0d0 / ((k ** 4.0d0) * (t_m / (cos(k) * (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 (k <= 1.15e-34) {
tmp = (l * 0.5) * (l * (2.0 / (Math.tan(k) * (k * Math.pow(t_m, 3.0)))));
} else {
tmp = 2.0 / (Math.pow(k, 4.0) * (t_m / (Math.cos(k) * 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): tmp = 0 if k <= 1.15e-34: tmp = (l * 0.5) * (l * (2.0 / (math.tan(k) * (k * math.pow(t_m, 3.0))))) else: tmp = 2.0 / (math.pow(k, 4.0) * (t_m / (math.cos(k) * math.pow(l, 2.0)))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.15e-34) tmp = Float64(Float64(l * 0.5) * Float64(l * Float64(2.0 / Float64(tan(k) * Float64(k * (t_m ^ 3.0)))))); else tmp = Float64(2.0 / Float64((k ^ 4.0) * Float64(t_m / Float64(cos(k) * (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 (k <= 1.15e-34) tmp = (l * 0.5) * (l * (2.0 / (tan(k) * (k * (t_m ^ 3.0))))); else tmp = 2.0 / ((k ^ 4.0) * (t_m / (cos(k) * (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[k, 1.15e-34], N[(N[(l * 0.5), $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], N[(2.0 / N[(N[Power[k, 4.0], $MachinePrecision] * N[(t$95$m / N[(N[Cos[k], $MachinePrecision] * 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)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.15 \cdot 10^{-34}:\\
\;\;\;\;\left(\ell \cdot 0.5\right) \cdot \left(\ell \cdot \frac{2}{\tan k \cdot \left(k \cdot {t\_m}^{3}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{4} \cdot \frac{t\_m}{\cos k \cdot {\ell}^{2}}}\\
\end{array}
\end{array}
if k < 1.15000000000000006e-34Initial program 60.8%
Simplified55.5%
associate-*r*59.3%
*-un-lft-identity59.3%
times-frac57.9%
associate-*r*64.2%
Applied egg-rr64.2%
/-rgt-identity64.2%
*-commutative64.2%
*-commutative64.2%
Simplified64.2%
Taylor expanded in k around 0 66.7%
*-commutative66.7%
Simplified66.7%
Taylor expanded in k around 0 65.4%
if 1.15000000000000006e-34 < k Initial program 45.7%
Simplified45.7%
Taylor expanded in t around 0 72.1%
Taylor expanded in k around 0 63.4%
div-inv63.4%
associate-/l*64.5%
Applied egg-rr64.5%
associate-*r/64.5%
metadata-eval64.5%
Simplified64.5%
Final simplification65.1%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 3.95e+40)
(* (* l 0.5) (* l (/ 2.0 (* (tan k) (* k (pow t_m 3.0))))))
(* 2.0 (/ (pow l 2.0) (* t_m (pow k 4.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 3.95e+40) {
tmp = (l * 0.5) * (l * (2.0 / (tan(k) * (k * pow(t_m, 3.0)))));
} else {
tmp = 2.0 * (pow(l, 2.0) / (t_m * pow(k, 4.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 3.95d+40) then
tmp = (l * 0.5d0) * (l * (2.0d0 / (tan(k) * (k * (t_m ** 3.0d0)))))
else
tmp = 2.0d0 * ((l ** 2.0d0) / (t_m * (k ** 4.0d0)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 3.95e+40) {
tmp = (l * 0.5) * (l * (2.0 / (Math.tan(k) * (k * Math.pow(t_m, 3.0)))));
} else {
tmp = 2.0 * (Math.pow(l, 2.0) / (t_m * Math.pow(k, 4.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 3.95e+40: tmp = (l * 0.5) * (l * (2.0 / (math.tan(k) * (k * math.pow(t_m, 3.0))))) else: tmp = 2.0 * (math.pow(l, 2.0) / (t_m * math.pow(k, 4.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 3.95e+40) tmp = Float64(Float64(l * 0.5) * Float64(l * Float64(2.0 / Float64(tan(k) * Float64(k * (t_m ^ 3.0)))))); else tmp = Float64(2.0 * Float64((l ^ 2.0) / Float64(t_m * (k ^ 4.0)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 3.95e+40) tmp = (l * 0.5) * (l * (2.0 / (tan(k) * (k * (t_m ^ 3.0))))); else tmp = 2.0 * ((l ^ 2.0) / (t_m * (k ^ 4.0))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 3.95e+40], N[(N[(l * 0.5), $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], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 3.95 \cdot 10^{+40}:\\
\;\;\;\;\left(\ell \cdot 0.5\right) \cdot \left(\ell \cdot \frac{2}{\tan k \cdot \left(k \cdot {t\_m}^{3}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\\
\end{array}
\end{array}
if k < 3.9499999999999999e40Initial program 58.7%
Simplified54.0%
associate-*r*58.4%
*-un-lft-identity58.4%
times-frac57.1%
associate-*r*62.7%
Applied egg-rr62.7%
/-rgt-identity62.7%
*-commutative62.7%
*-commutative62.7%
Simplified62.7%
Taylor expanded in k around 0 65.6%
*-commutative65.6%
Simplified65.6%
Taylor expanded in k around 0 64.0%
if 3.9499999999999999e40 < k Initial program 47.4%
Simplified47.4%
Taylor expanded in t around 0 71.6%
Taylor expanded in k around 0 62.6%
Final simplification63.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 3.5e+81)
(/ 2.0 (* (pow (/ (pow t_m 1.5) l) 2.0) (* 2.0 (* k k))))
(* 2.0 (/ (pow l 2.0) (* t_m (pow k 4.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 3.5e+81) {
tmp = 2.0 / (pow((pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)));
} else {
tmp = 2.0 * (pow(l, 2.0) / (t_m * pow(k, 4.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 3.5d+81) then
tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) ** 2.0d0) * (2.0d0 * (k * k)))
else
tmp = 2.0d0 * ((l ** 2.0d0) / (t_m * (k ** 4.0d0)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 3.5e+81) {
tmp = 2.0 / (Math.pow((Math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)));
} else {
tmp = 2.0 * (Math.pow(l, 2.0) / (t_m * Math.pow(k, 4.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 3.5e+81: tmp = 2.0 / (math.pow((math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k))) else: tmp = 2.0 * (math.pow(l, 2.0) / (t_m * math.pow(k, 4.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 3.5e+81) tmp = Float64(2.0 / Float64((Float64((t_m ^ 1.5) / l) ^ 2.0) * Float64(2.0 * Float64(k * k)))); else tmp = Float64(2.0 * Float64((l ^ 2.0) / Float64(t_m * (k ^ 4.0)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 3.5e+81) tmp = 2.0 / ((((t_m ^ 1.5) / l) ^ 2.0) * (2.0 * (k * k))); else tmp = 2.0 * ((l ^ 2.0) / (t_m * (k ^ 4.0))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 3.5e+81], N[(2.0 / N[(N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 3.5 \cdot 10^{+81}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\\
\end{array}
\end{array}
if k < 3.5e81Initial program 57.5%
Simplified56.8%
Taylor expanded in k around 0 58.7%
unpow261.9%
Applied egg-rr58.7%
add-sqr-sqrt31.7%
pow231.7%
associate-/r*29.8%
sqrt-div29.8%
sqrt-pow129.9%
metadata-eval29.9%
sqrt-prod15.5%
add-sqr-sqrt31.7%
Applied egg-rr31.7%
if 3.5e81 < k Initial program 50.1%
Simplified50.1%
Taylor expanded in t around 0 68.3%
Taylor expanded in k around 0 64.1%
Final simplification37.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1.25e-34)
(* (* l 0.5) (/ (* 2.0 l) (* (pow k 2.0) (pow t_m 3.0))))
(* 2.0 (/ (pow l 2.0) (* t_m (pow k 4.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.25e-34) {
tmp = (l * 0.5) * ((2.0 * l) / (pow(k, 2.0) * pow(t_m, 3.0)));
} else {
tmp = 2.0 * (pow(l, 2.0) / (t_m * pow(k, 4.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1.25d-34) then
tmp = (l * 0.5d0) * ((2.0d0 * l) / ((k ** 2.0d0) * (t_m ** 3.0d0)))
else
tmp = 2.0d0 * ((l ** 2.0d0) / (t_m * (k ** 4.0d0)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.25e-34) {
tmp = (l * 0.5) * ((2.0 * l) / (Math.pow(k, 2.0) * Math.pow(t_m, 3.0)));
} else {
tmp = 2.0 * (Math.pow(l, 2.0) / (t_m * Math.pow(k, 4.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 1.25e-34: tmp = (l * 0.5) * ((2.0 * l) / (math.pow(k, 2.0) * math.pow(t_m, 3.0))) else: tmp = 2.0 * (math.pow(l, 2.0) / (t_m * math.pow(k, 4.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.25e-34) tmp = Float64(Float64(l * 0.5) * Float64(Float64(2.0 * l) / Float64((k ^ 2.0) * (t_m ^ 3.0)))); else tmp = Float64(2.0 * Float64((l ^ 2.0) / Float64(t_m * (k ^ 4.0)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 1.25e-34) tmp = (l * 0.5) * ((2.0 * l) / ((k ^ 2.0) * (t_m ^ 3.0))); else tmp = 2.0 * ((l ^ 2.0) / (t_m * (k ^ 4.0))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.25e-34], N[(N[(l * 0.5), $MachinePrecision] * N[(N[(2.0 * l), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.25 \cdot 10^{-34}:\\
\;\;\;\;\left(\ell \cdot 0.5\right) \cdot \frac{2 \cdot \ell}{{k}^{2} \cdot {t\_m}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\\
\end{array}
\end{array}
if k < 1.2500000000000001e-34Initial program 60.8%
Simplified55.5%
associate-*r*59.3%
*-un-lft-identity59.3%
times-frac57.9%
associate-*r*64.2%
Applied egg-rr64.2%
/-rgt-identity64.2%
*-commutative64.2%
*-commutative64.2%
Simplified64.2%
Taylor expanded in k around 0 66.7%
*-commutative66.7%
Simplified66.7%
Taylor expanded in k around 0 60.2%
associate-*r/60.2%
*-commutative60.2%
Simplified60.2%
if 1.2500000000000001e-34 < k Initial program 45.7%
Simplified45.7%
Taylor expanded in t around 0 72.1%
Taylor expanded in k around 0 59.4%
Final simplification59.9%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1.25e-34)
(/ 2.0 (* (* 2.0 (* k k)) (/ (* t_m (/ (pow t_m 2.0) l)) l)))
(* 2.0 (/ (pow l 2.0) (* t_m (pow k 4.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.25e-34) {
tmp = 2.0 / ((2.0 * (k * k)) * ((t_m * (pow(t_m, 2.0) / l)) / l));
} else {
tmp = 2.0 * (pow(l, 2.0) / (t_m * pow(k, 4.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1.25d-34) then
tmp = 2.0d0 / ((2.0d0 * (k * k)) * ((t_m * ((t_m ** 2.0d0) / l)) / l))
else
tmp = 2.0d0 * ((l ** 2.0d0) / (t_m * (k ** 4.0d0)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.25e-34) {
tmp = 2.0 / ((2.0 * (k * k)) * ((t_m * (Math.pow(t_m, 2.0) / l)) / l));
} else {
tmp = 2.0 * (Math.pow(l, 2.0) / (t_m * Math.pow(k, 4.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 1.25e-34: tmp = 2.0 / ((2.0 * (k * k)) * ((t_m * (math.pow(t_m, 2.0) / l)) / l)) else: tmp = 2.0 * (math.pow(l, 2.0) / (t_m * math.pow(k, 4.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.25e-34) tmp = Float64(2.0 / Float64(Float64(2.0 * Float64(k * k)) * Float64(Float64(t_m * Float64((t_m ^ 2.0) / l)) / l))); else tmp = Float64(2.0 * Float64((l ^ 2.0) / Float64(t_m * (k ^ 4.0)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 1.25e-34) tmp = 2.0 / ((2.0 * (k * k)) * ((t_m * ((t_m ^ 2.0) / l)) / l)); else tmp = 2.0 * ((l ^ 2.0) / (t_m * (k ^ 4.0))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.25e-34], N[(2.0 / N[(N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.25 \cdot 10^{-34}:\\
\;\;\;\;\frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \frac{t\_m \cdot \frac{{t\_m}^{2}}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\\
\end{array}
\end{array}
if k < 1.2500000000000001e-34Initial program 60.8%
Simplified58.8%
Taylor expanded in k around 0 59.2%
unpow259.1%
Applied egg-rr59.2%
associate-/r*56.2%
unpow356.2%
times-frac60.4%
pow260.4%
Applied egg-rr60.4%
associate-*r/60.4%
Applied egg-rr60.4%
if 1.2500000000000001e-34 < k Initial program 45.7%
Simplified45.7%
Taylor expanded in t around 0 72.1%
Taylor expanded in k around 0 59.4%
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 (/ 2.0 (* (* 2.0 (* k k)) (/ (* 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) {
return t_s * (2.0 / ((2.0 * (k * k)) * ((t_m * (pow(t_m, 2.0) / l)) / l)));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / ((2.0d0 * (k * k)) * ((t_m * ((t_m ** 2.0d0) / l)) / l)))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((2.0 * (k * k)) * ((t_m * (Math.pow(t_m, 2.0) / l)) / l)));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / ((2.0 * (k * k)) * ((t_m * (math.pow(t_m, 2.0) / l)) / l)))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64(Float64(2.0 * Float64(k * k)) * Float64(Float64(t_m * Float64((t_m ^ 2.0) / l)) / l)))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / ((2.0 * (k * k)) * ((t_m * ((t_m ^ 2.0) / l)) / l))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(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 \frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \frac{t\_m \cdot \frac{{t\_m}^{2}}{\ell}}{\ell}}
\end{array}
Initial program 56.2%
Simplified55.6%
Taylor expanded in k around 0 56.9%
unpow263.1%
Applied egg-rr56.9%
associate-/r*53.9%
unpow353.9%
times-frac58.1%
pow258.1%
Applied egg-rr58.1%
associate-*r/58.1%
Applied egg-rr58.1%
Final simplification58.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 (* (* 2.0 (* k k)) (* (/ (* t_m t_m) 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) {
return t_s * (2.0 / ((2.0 * (k * k)) * (((t_m * t_m) / l) * (t_m / l))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / ((2.0d0 * (k * k)) * (((t_m * t_m) / l) * (t_m / l))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((2.0 * (k * k)) * (((t_m * t_m) / l) * (t_m / l))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / ((2.0 * (k * k)) * (((t_m * t_m) / l) * (t_m / l))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64(Float64(2.0 * Float64(k * k)) * Float64(Float64(Float64(t_m * t_m) / l) * Float64(t_m / l))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / ((2.0 * (k * k)) * (((t_m * t_m) / l) * (t_m / l)))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\frac{t\_m \cdot t\_m}{\ell} \cdot \frac{t\_m}{\ell}\right)}
\end{array}
Initial program 56.2%
Simplified55.6%
Taylor expanded in k around 0 56.9%
unpow263.1%
Applied egg-rr56.9%
associate-/r*53.9%
unpow353.9%
times-frac58.1%
pow258.1%
Applied egg-rr58.1%
unpow258.1%
Applied egg-rr58.1%
Final simplification58.1%
herbie shell --seed 2024146
(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))))