
(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 23 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 (hypot 1.0 (hypot 1.0 (/ k t_m)))) (t_3 (/ 1.0 (cbrt l))))
(*
t_s
(if (<= t_m 1.15e-83)
(/
2.0
(* (/ (* t_m (pow k 2.0)) (pow l 2.0)) (/ (pow (sin k) 2.0) (cos k))))
(if (<= t_m 5e+55)
(*
(/ (/ (* 2.0 l) (* (pow t_m 3.0) (* (sin k) (tan k)))) t_2)
(/ l t_2))
(/
2.0
(pow
(*
(* t_m (* (* t_3 t_3) (cbrt (sin k))))
(cbrt (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))))
3.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = hypot(1.0, hypot(1.0, (k / t_m)));
double t_3 = 1.0 / cbrt(l);
double tmp;
if (t_m <= 1.15e-83) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) / pow(l, 2.0)) * (pow(sin(k), 2.0) / cos(k)));
} else if (t_m <= 5e+55) {
tmp = (((2.0 * l) / (pow(t_m, 3.0) * (sin(k) * tan(k)))) / t_2) * (l / t_2);
} else {
tmp = 2.0 / pow(((t_m * ((t_3 * t_3) * cbrt(sin(k)))) * cbrt((tan(k) * (2.0 + pow((k / t_m), 2.0))))), 3.0);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.hypot(1.0, Math.hypot(1.0, (k / t_m)));
double t_3 = 1.0 / Math.cbrt(l);
double tmp;
if (t_m <= 1.15e-83) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) / Math.pow(l, 2.0)) * (Math.pow(Math.sin(k), 2.0) / Math.cos(k)));
} else if (t_m <= 5e+55) {
tmp = (((2.0 * l) / (Math.pow(t_m, 3.0) * (Math.sin(k) * Math.tan(k)))) / t_2) * (l / t_2);
} else {
tmp = 2.0 / Math.pow(((t_m * ((t_3 * t_3) * Math.cbrt(Math.sin(k)))) * Math.cbrt((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))))), 3.0);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = hypot(1.0, hypot(1.0, Float64(k / t_m))) t_3 = Float64(1.0 / cbrt(l)) tmp = 0.0 if (t_m <= 1.15e-83) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) / (l ^ 2.0)) * Float64((sin(k) ^ 2.0) / cos(k)))); elseif (t_m <= 5e+55) tmp = Float64(Float64(Float64(Float64(2.0 * l) / Float64((t_m ^ 3.0) * Float64(sin(k) * tan(k)))) / t_2) * Float64(l / t_2)); else tmp = Float64(2.0 / (Float64(Float64(t_m * Float64(Float64(t_3 * t_3) * cbrt(sin(k)))) * cbrt(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))))) ^ 3.0)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]}, Block[{t$95$3 = N[(1.0 / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.15e-83], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5e+55], N[(N[(N[(N[(2.0 * l), $MachinePrecision] / N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision] * N[(l / t$95$2), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(t$95$m * N[(N[(t$95$3 * t$95$3), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\\
t_3 := \frac{1}{\sqrt[3]{\ell}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.15 \cdot 10^{-83}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}\\
\mathbf{elif}\;t\_m \leq 5 \cdot 10^{+55}:\\
\;\;\;\;\frac{\frac{2 \cdot \ell}{{t\_m}^{3} \cdot \left(\sin k \cdot \tan k\right)}}{t\_2} \cdot \frac{\ell}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot \left(\left(t\_3 \cdot t\_3\right) \cdot \sqrt[3]{\sin k}\right)\right) \cdot \sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)}\right)}^{3}}\\
\end{array}
\end{array}
\end{array}
if t < 1.14999999999999995e-83Initial program 52.0%
Simplified52.0%
Taylor expanded in t around 0 55.6%
associate-*r*55.6%
times-frac56.1%
Simplified56.1%
if 1.14999999999999995e-83 < t < 5.00000000000000046e55Initial program 79.0%
Simplified76.0%
associate-*r*82.4%
add-sqr-sqrt82.2%
times-frac82.6%
metadata-eval82.6%
associate-+r+82.6%
add-sqr-sqrt82.6%
hypot-1-def82.6%
unpow282.6%
hypot-1-def82.6%
metadata-eval82.6%
Applied egg-rr92.6%
associate-*l/92.6%
Simplified92.6%
if 5.00000000000000046e55 < t Initial program 71.5%
Simplified71.5%
add-cube-cbrt71.4%
pow371.4%
*-commutative71.4%
cbrt-prod71.4%
cbrt-div73.3%
rem-cbrt-cube79.8%
cbrt-prod89.3%
pow289.3%
Applied egg-rr89.3%
*-commutative89.3%
Simplified89.3%
pow189.3%
div-inv89.3%
pow-flip89.2%
metadata-eval89.2%
Applied egg-rr89.2%
unpow189.2%
associate-*l*89.3%
Simplified89.3%
add-cube-cbrt89.2%
pow389.2%
Applied egg-rr96.5%
sqr-pow96.6%
metadata-eval96.6%
unpow-196.6%
metadata-eval96.6%
unpow-196.6%
Applied egg-rr96.6%
Final simplification67.8%
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 (<=
(*
(* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l))))
(+ 1.0 (+ 1.0 t_2)))
INFINITY)
(*
(* (/ l (sin k)) (/ (* 2.0 (pow t_m -3.0)) (tan k)))
(/ l (+ 2.0 t_2)))
(/
2.0
(pow
(* t_m (* (pow (cbrt l) -2.0) (cbrt (* 2.0 (pow k 2.0)))))
3.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow((k / t_m), 2.0);
double tmp;
if (((tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l)))) * (1.0 + (1.0 + t_2))) <= ((double) INFINITY)) {
tmp = ((l / sin(k)) * ((2.0 * pow(t_m, -3.0)) / tan(k))) * (l / (2.0 + t_2));
} else {
tmp = 2.0 / pow((t_m * (pow(cbrt(l), -2.0) * cbrt((2.0 * pow(k, 2.0))))), 3.0);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.pow((k / t_m), 2.0);
double tmp;
if (((Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l)))) * (1.0 + (1.0 + t_2))) <= Double.POSITIVE_INFINITY) {
tmp = ((l / Math.sin(k)) * ((2.0 * Math.pow(t_m, -3.0)) / Math.tan(k))) * (l / (2.0 + t_2));
} else {
tmp = 2.0 / Math.pow((t_m * (Math.pow(Math.cbrt(l), -2.0) * Math.cbrt((2.0 * Math.pow(k, 2.0))))), 3.0);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(k / t_m) ^ 2.0 tmp = 0.0 if (Float64(Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l)))) * Float64(1.0 + Float64(1.0 + t_2))) <= Inf) tmp = Float64(Float64(Float64(l / sin(k)) * Float64(Float64(2.0 * (t_m ^ -3.0)) / tan(k))) * Float64(l / Float64(2.0 + t_2))); else tmp = Float64(2.0 / (Float64(t_m * Float64((cbrt(l) ^ -2.0) * cbrt(Float64(2.0 * (k ^ 2.0))))) ^ 3.0)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[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[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * N[Power[t$95$m, -3.0], $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(t$95$m * N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * N[Power[N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right) \cdot \left(1 + \left(1 + t\_2\right)\right) \leq \infty:\\
\;\;\;\;\left(\frac{\ell}{\sin k} \cdot \frac{2 \cdot {t\_m}^{-3}}{\tan k}\right) \cdot \frac{\ell}{2 + t\_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot \left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \sqrt[3]{2 \cdot {k}^{2}}\right)\right)}^{3}}\\
\end{array}
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))) < +inf.0Initial program 82.1%
Simplified74.8%
div-inv74.8%
associate-*r*77.0%
associate-*l*77.9%
Applied egg-rr77.9%
associate-*l/78.0%
times-frac77.3%
associate-*r/77.4%
*-rgt-identity77.4%
Simplified77.4%
associate-*r/77.9%
div-inv77.9%
pow-flip78.1%
metadata-eval78.1%
Applied egg-rr78.1%
*-commutative78.1%
times-frac87.5%
Simplified87.5%
if +inf.0 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))) Initial program 0.0%
Simplified10.5%
Taylor expanded in k around 0 19.1%
add-cube-cbrt19.1%
pow319.1%
cbrt-prod19.1%
associate-/l/8.4%
unpow28.4%
cbrt-div8.5%
unpow38.5%
add-cbrt-cube23.7%
unpow223.7%
cbrt-prod38.9%
unpow238.9%
div-inv38.9%
pow-flip39.0%
metadata-eval39.0%
Applied egg-rr39.0%
associate-*l*39.0%
Simplified39.0%
Final simplification73.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 (pow (/ k t_m) 2.0)))
(*
t_s
(if (<=
(*
(* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l))))
(+ 1.0 (+ 1.0 t_2)))
INFINITY)
(*
(* (/ l (sin k)) (/ (* 2.0 (pow t_m -3.0)) (tan k)))
(/ l (+ 2.0 t_2)))
(/
2.0
(/ (pow (* (cbrt (* 2.0 (pow k 2.0))) (/ t_m (cbrt l))) 3.0) l))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow((k / t_m), 2.0);
double tmp;
if (((tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l)))) * (1.0 + (1.0 + t_2))) <= ((double) INFINITY)) {
tmp = ((l / sin(k)) * ((2.0 * pow(t_m, -3.0)) / tan(k))) * (l / (2.0 + t_2));
} else {
tmp = 2.0 / (pow((cbrt((2.0 * pow(k, 2.0))) * (t_m / cbrt(l))), 3.0) / l);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.pow((k / t_m), 2.0);
double tmp;
if (((Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l)))) * (1.0 + (1.0 + t_2))) <= Double.POSITIVE_INFINITY) {
tmp = ((l / Math.sin(k)) * ((2.0 * Math.pow(t_m, -3.0)) / Math.tan(k))) * (l / (2.0 + t_2));
} else {
tmp = 2.0 / (Math.pow((Math.cbrt((2.0 * Math.pow(k, 2.0))) * (t_m / Math.cbrt(l))), 3.0) / l);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(k / t_m) ^ 2.0 tmp = 0.0 if (Float64(Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l)))) * Float64(1.0 + Float64(1.0 + t_2))) <= Inf) tmp = Float64(Float64(Float64(l / sin(k)) * Float64(Float64(2.0 * (t_m ^ -3.0)) / tan(k))) * Float64(l / Float64(2.0 + t_2))); else tmp = Float64(2.0 / Float64((Float64(cbrt(Float64(2.0 * (k ^ 2.0))) * Float64(t_m / cbrt(l))) ^ 3.0) / l)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[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[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * N[Power[t$95$m, -3.0], $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[Power[N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right) \cdot \left(1 + \left(1 + t\_2\right)\right) \leq \infty:\\
\;\;\;\;\left(\frac{\ell}{\sin k} \cdot \frac{2 \cdot {t\_m}^{-3}}{\tan k}\right) \cdot \frac{\ell}{2 + t\_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{\left(\sqrt[3]{2 \cdot {k}^{2}} \cdot \frac{t\_m}{\sqrt[3]{\ell}}\right)}^{3}}{\ell}}\\
\end{array}
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))) < +inf.0Initial program 82.1%
Simplified74.8%
div-inv74.8%
associate-*r*77.0%
associate-*l*77.9%
Applied egg-rr77.9%
associate-*l/78.0%
times-frac77.3%
associate-*r/77.4%
*-rgt-identity77.4%
Simplified77.4%
associate-*r/77.9%
div-inv77.9%
pow-flip78.1%
metadata-eval78.1%
Applied egg-rr78.1%
*-commutative78.1%
times-frac87.5%
Simplified87.5%
if +inf.0 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))) Initial program 0.0%
Simplified10.5%
Taylor expanded in k around 0 19.1%
associate-*l/19.3%
Applied egg-rr19.3%
add-cube-cbrt19.3%
pow319.3%
cbrt-prod19.3%
cbrt-div19.3%
unpow319.3%
add-cbrt-cube36.5%
Applied egg-rr36.5%
Final simplification72.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 (hypot 1.0 (hypot 1.0 (/ k t_m)))))
(*
t_s
(if (<= t_m 4.8e-85)
(/
2.0
(* (/ (* t_m (pow k 2.0)) (pow l 2.0)) (/ (pow (sin k) 2.0) (cos k))))
(if (<= t_m 5e+55)
(*
(/ (/ (* 2.0 l) (* (pow t_m 3.0) (* (sin k) (tan k)))) t_2)
(/ l t_2))
(/
2.0
(pow
(*
(cbrt (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0))))
(* 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 t_2 = hypot(1.0, hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 4.8e-85) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) / pow(l, 2.0)) * (pow(sin(k), 2.0) / cos(k)));
} else if (t_m <= 5e+55) {
tmp = (((2.0 * l) / (pow(t_m, 3.0) * (sin(k) * tan(k)))) / t_2) * (l / t_2);
} else {
tmp = 2.0 / pow((cbrt((tan(k) * (2.0 + pow((k / t_m), 2.0)))) * (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 t_2 = Math.hypot(1.0, Math.hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 4.8e-85) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) / Math.pow(l, 2.0)) * (Math.pow(Math.sin(k), 2.0) / Math.cos(k)));
} else if (t_m <= 5e+55) {
tmp = (((2.0 * l) / (Math.pow(t_m, 3.0) * (Math.sin(k) * Math.tan(k)))) / t_2) * (l / t_2);
} else {
tmp = 2.0 / Math.pow((Math.cbrt((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0)))) * (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) t_2 = hypot(1.0, hypot(1.0, Float64(k / t_m))) tmp = 0.0 if (t_m <= 4.8e-85) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) / (l ^ 2.0)) * Float64((sin(k) ^ 2.0) / cos(k)))); elseif (t_m <= 5e+55) tmp = Float64(Float64(Float64(Float64(2.0 * l) / Float64((t_m ^ 3.0) * Float64(sin(k) * tan(k)))) / t_2) * Float64(l / t_2)); else tmp = Float64(2.0 / (Float64(cbrt(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_] := Block[{t$95$2 = N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 4.8e-85], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5e+55], N[(N[(N[(N[(2.0 * l), $MachinePrecision] / N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision] * N[(l / t$95$2), $MachinePrecision]), $MachinePrecision], 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[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $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 := \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.8 \cdot 10^{-85}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}\\
\mathbf{elif}\;t\_m \leq 5 \cdot 10^{+55}:\\
\;\;\;\;\frac{\frac{2 \cdot \ell}{{t\_m}^{3} \cdot \left(\sin k \cdot \tan k\right)}}{t\_2} \cdot \frac{\ell}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)} \cdot \left(t\_m \cdot \left(\sqrt[3]{\sin k} \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right)\right)}^{3}}\\
\end{array}
\end{array}
\end{array}
if t < 4.8000000000000001e-85Initial program 52.0%
Simplified52.0%
Taylor expanded in t around 0 55.6%
associate-*r*55.6%
times-frac56.1%
Simplified56.1%
if 4.8000000000000001e-85 < t < 5.00000000000000046e55Initial program 79.0%
Simplified76.0%
associate-*r*82.4%
add-sqr-sqrt82.2%
times-frac82.6%
metadata-eval82.6%
associate-+r+82.6%
add-sqr-sqrt82.6%
hypot-1-def82.6%
unpow282.6%
hypot-1-def82.6%
metadata-eval82.6%
Applied egg-rr92.6%
associate-*l/92.6%
Simplified92.6%
if 5.00000000000000046e55 < t Initial program 71.5%
Simplified71.5%
add-cube-cbrt71.4%
pow371.4%
*-commutative71.4%
cbrt-prod71.4%
cbrt-div73.3%
rem-cbrt-cube79.8%
cbrt-prod89.3%
pow289.3%
Applied egg-rr89.3%
*-commutative89.3%
Simplified89.3%
pow189.3%
div-inv89.3%
pow-flip89.2%
metadata-eval89.2%
Applied egg-rr89.2%
unpow189.2%
associate-*l*89.3%
Simplified89.3%
add-cube-cbrt89.2%
pow389.2%
Applied egg-rr96.5%
Final simplification67.8%
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 (hypot 1.0 (hypot 1.0 (/ k t_m)))))
(*
t_s
(if (<= t_m 5.4e-85)
(/
2.0
(* (/ (* t_m (pow k 2.0)) (pow l 2.0)) (/ (pow (sin k) 2.0) (cos k))))
(if (<= t_m 1.9e+78)
(*
(/ l t_2)
(/ (* (/ 2.0 (pow t_m 3.0)) (/ l (* (sin k) (tan k)))) t_2))
(/
2.0
(*
(sin k)
(pow
(*
(cbrt (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0))))
(* t_m (pow (cbrt l) -2.0)))
3.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = hypot(1.0, hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 5.4e-85) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) / pow(l, 2.0)) * (pow(sin(k), 2.0) / cos(k)));
} else if (t_m <= 1.9e+78) {
tmp = (l / t_2) * (((2.0 / pow(t_m, 3.0)) * (l / (sin(k) * tan(k)))) / t_2);
} else {
tmp = 2.0 / (sin(k) * pow((cbrt((tan(k) * (2.0 + pow((k / t_m), 2.0)))) * (t_m * pow(cbrt(l), -2.0))), 3.0));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.hypot(1.0, Math.hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 5.4e-85) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) / Math.pow(l, 2.0)) * (Math.pow(Math.sin(k), 2.0) / Math.cos(k)));
} else if (t_m <= 1.9e+78) {
tmp = (l / t_2) * (((2.0 / Math.pow(t_m, 3.0)) * (l / (Math.sin(k) * Math.tan(k)))) / t_2);
} else {
tmp = 2.0 / (Math.sin(k) * 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))), 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 = hypot(1.0, hypot(1.0, Float64(k / t_m))) tmp = 0.0 if (t_m <= 5.4e-85) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) / (l ^ 2.0)) * Float64((sin(k) ^ 2.0) / cos(k)))); elseif (t_m <= 1.9e+78) tmp = Float64(Float64(l / t_2) * Float64(Float64(Float64(2.0 / (t_m ^ 3.0)) * Float64(l / Float64(sin(k) * tan(k)))) / t_2)); else tmp = Float64(2.0 / Float64(sin(k) * (Float64(cbrt(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0)))) * Float64(t_m * (cbrt(l) ^ -2.0))) ^ 3.0))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 5.4e-85], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.9e+78], N[(N[(l / t$95$2), $MachinePrecision] * N[(N[(N[(2.0 / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] * N[(l / N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * 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[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)
\\
\begin{array}{l}
t_2 := \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 5.4 \cdot 10^{-85}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}\\
\mathbf{elif}\;t\_m \leq 1.9 \cdot 10^{+78}:\\
\;\;\;\;\frac{\ell}{t\_2} \cdot \frac{\frac{2}{{t\_m}^{3}} \cdot \frac{\ell}{\sin k \cdot \tan k}}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\sin k \cdot {\left(\sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)} \cdot \left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right)}^{3}}\\
\end{array}
\end{array}
\end{array}
if t < 5.4000000000000003e-85Initial program 52.0%
Simplified52.0%
Taylor expanded in t around 0 55.6%
associate-*r*55.6%
times-frac56.1%
Simplified56.1%
if 5.4000000000000003e-85 < t < 1.9e78Initial program 78.3%
Simplified75.8%
associate-*r*80.9%
add-sqr-sqrt80.7%
times-frac81.0%
metadata-eval81.0%
associate-+r+81.0%
add-sqr-sqrt81.0%
hypot-1-def81.0%
unpow281.0%
hypot-1-def81.0%
metadata-eval81.0%
Applied egg-rr91.3%
associate-*l/91.4%
times-frac91.3%
Simplified91.3%
if 1.9e78 < t Initial program 70.6%
Simplified70.6%
add-cube-cbrt70.6%
pow370.6%
*-commutative70.6%
cbrt-prod70.5%
cbrt-div72.9%
rem-cbrt-cube80.6%
cbrt-prod92.2%
pow292.2%
Applied egg-rr92.2%
*-commutative92.2%
Simplified92.2%
pow192.2%
div-inv92.1%
pow-flip92.1%
metadata-eval92.1%
Applied egg-rr92.1%
unpow192.1%
associate-*l*92.2%
Simplified92.2%
pow192.2%
associate-*r*92.1%
unpow-prod-down87.5%
pow387.5%
add-cube-cbrt87.5%
associate-+r+87.5%
metadata-eval87.5%
Applied egg-rr87.5%
unpow187.5%
*-commutative87.5%
associate-*l*87.5%
Simplified87.5%
add-cube-cbrt87.5%
pow387.5%
*-commutative87.5%
cbrt-prod87.4%
unpow387.4%
add-cbrt-cube92.2%
Applied egg-rr92.2%
Final simplification66.8%
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 (hypot 1.0 (hypot 1.0 (/ k t_m)))))
(*
t_s
(if (<= t_m 1.3e-83)
(/
2.0
(* (/ (* t_m (pow k 2.0)) (pow l 2.0)) (/ (pow (sin k) 2.0) (cos k))))
(if (<= t_m 2.1e+78)
(*
(/ (/ (* 2.0 l) (* (pow t_m 3.0) (* (sin k) (tan k)))) t_2)
(/ l t_2))
(/
2.0
(*
(sin k)
(pow
(*
(cbrt (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0))))
(* t_m (pow (cbrt l) -2.0)))
3.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = hypot(1.0, hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 1.3e-83) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) / pow(l, 2.0)) * (pow(sin(k), 2.0) / cos(k)));
} else if (t_m <= 2.1e+78) {
tmp = (((2.0 * l) / (pow(t_m, 3.0) * (sin(k) * tan(k)))) / t_2) * (l / t_2);
} else {
tmp = 2.0 / (sin(k) * pow((cbrt((tan(k) * (2.0 + pow((k / t_m), 2.0)))) * (t_m * pow(cbrt(l), -2.0))), 3.0));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.hypot(1.0, Math.hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 1.3e-83) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) / Math.pow(l, 2.0)) * (Math.pow(Math.sin(k), 2.0) / Math.cos(k)));
} else if (t_m <= 2.1e+78) {
tmp = (((2.0 * l) / (Math.pow(t_m, 3.0) * (Math.sin(k) * Math.tan(k)))) / t_2) * (l / t_2);
} else {
tmp = 2.0 / (Math.sin(k) * 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))), 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 = hypot(1.0, hypot(1.0, Float64(k / t_m))) tmp = 0.0 if (t_m <= 1.3e-83) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) / (l ^ 2.0)) * Float64((sin(k) ^ 2.0) / cos(k)))); elseif (t_m <= 2.1e+78) tmp = Float64(Float64(Float64(Float64(2.0 * l) / Float64((t_m ^ 3.0) * Float64(sin(k) * tan(k)))) / t_2) * Float64(l / t_2)); else tmp = Float64(2.0 / Float64(sin(k) * (Float64(cbrt(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0)))) * Float64(t_m * (cbrt(l) ^ -2.0))) ^ 3.0))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.3e-83], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.1e+78], N[(N[(N[(N[(2.0 * l), $MachinePrecision] / N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision] * N[(l / t$95$2), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * 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[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)
\\
\begin{array}{l}
t_2 := \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 1.3 \cdot 10^{-83}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}\\
\mathbf{elif}\;t\_m \leq 2.1 \cdot 10^{+78}:\\
\;\;\;\;\frac{\frac{2 \cdot \ell}{{t\_m}^{3} \cdot \left(\sin k \cdot \tan k\right)}}{t\_2} \cdot \frac{\ell}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\sin k \cdot {\left(\sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)} \cdot \left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right)}^{3}}\\
\end{array}
\end{array}
\end{array}
if t < 1.30000000000000004e-83Initial program 52.0%
Simplified52.0%
Taylor expanded in t around 0 55.6%
associate-*r*55.6%
times-frac56.1%
Simplified56.1%
if 1.30000000000000004e-83 < t < 2.1000000000000001e78Initial program 78.3%
Simplified75.8%
associate-*r*80.9%
add-sqr-sqrt80.7%
times-frac81.0%
metadata-eval81.0%
associate-+r+81.0%
add-sqr-sqrt81.0%
hypot-1-def81.0%
unpow281.0%
hypot-1-def81.0%
metadata-eval81.0%
Applied egg-rr91.3%
associate-*l/91.4%
Simplified91.4%
if 2.1000000000000001e78 < t Initial program 70.6%
Simplified70.6%
add-cube-cbrt70.6%
pow370.6%
*-commutative70.6%
cbrt-prod70.5%
cbrt-div72.9%
rem-cbrt-cube80.6%
cbrt-prod92.2%
pow292.2%
Applied egg-rr92.2%
*-commutative92.2%
Simplified92.2%
pow192.2%
div-inv92.1%
pow-flip92.1%
metadata-eval92.1%
Applied egg-rr92.1%
unpow192.1%
associate-*l*92.2%
Simplified92.2%
pow192.2%
associate-*r*92.1%
unpow-prod-down87.5%
pow387.5%
add-cube-cbrt87.5%
associate-+r+87.5%
metadata-eval87.5%
Applied egg-rr87.5%
unpow187.5%
*-commutative87.5%
associate-*l*87.5%
Simplified87.5%
add-cube-cbrt87.5%
pow387.5%
*-commutative87.5%
cbrt-prod87.4%
unpow387.4%
add-cbrt-cube92.2%
Applied egg-rr92.2%
Final simplification66.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.8e-61)
(/
2.0
(* (/ (* t_m (pow k 2.0)) (pow l 2.0)) (/ (pow (sin k) 2.0) (cos k))))
(if (<= t_m 2.3e+98)
(*
(* (/ l (sin k)) (/ (* 2.0 (pow t_m -3.0)) (tan k)))
(/ l (+ 2.0 (pow (/ k t_m) 2.0))))
(/
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 <= 1.8e-61) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) / pow(l, 2.0)) * (pow(sin(k), 2.0) / cos(k)));
} else if (t_m <= 2.3e+98) {
tmp = ((l / sin(k)) * ((2.0 * pow(t_m, -3.0)) / tan(k))) * (l / (2.0 + pow((k / t_m), 2.0)));
} 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 <= 1.8e-61) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) / Math.pow(l, 2.0)) * (Math.pow(Math.sin(k), 2.0) / Math.cos(k)));
} else if (t_m <= 2.3e+98) {
tmp = ((l / Math.sin(k)) * ((2.0 * Math.pow(t_m, -3.0)) / Math.tan(k))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
} 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 <= 1.8e-61) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) / (l ^ 2.0)) * Float64((sin(k) ^ 2.0) / cos(k)))); elseif (t_m <= 2.3e+98) tmp = Float64(Float64(Float64(l / sin(k)) * Float64(Float64(2.0 * (t_m ^ -3.0)) / tan(k))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); 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, 1.8e-61], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.3e+98], N[(N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * N[Power[t$95$m, -3.0], $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $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[(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 1.8 \cdot 10^{-61}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}\\
\mathbf{elif}\;t\_m \leq 2.3 \cdot 10^{+98}:\\
\;\;\;\;\left(\frac{\ell}{\sin k} \cdot \frac{2 \cdot {t\_m}^{-3}}{\tan k}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\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 < 1.80000000000000007e-61Initial program 52.2%
Simplified52.2%
Taylor expanded in t around 0 55.8%
associate-*r*55.8%
times-frac56.3%
Simplified56.3%
if 1.80000000000000007e-61 < t < 2.30000000000000013e98Initial program 78.9%
Simplified76.6%
div-inv76.6%
associate-*r*81.5%
associate-*l*81.6%
Applied egg-rr81.6%
associate-*l/81.7%
times-frac81.7%
associate-*r/81.7%
*-rgt-identity81.7%
Simplified81.7%
associate-*r/81.7%
div-inv81.7%
pow-flip81.7%
metadata-eval81.7%
Applied egg-rr81.7%
*-commutative81.7%
times-frac86.7%
Simplified86.7%
if 2.30000000000000013e98 < t Initial program 70.1%
Simplified70.1%
add-cube-cbrt70.1%
pow370.1%
*-commutative70.1%
cbrt-prod70.1%
cbrt-div70.1%
rem-cbrt-cube78.7%
cbrt-prod91.7%
pow291.7%
Applied egg-rr91.7%
*-commutative91.7%
Simplified91.7%
pow191.7%
div-inv91.7%
pow-flip91.7%
metadata-eval91.7%
Applied egg-rr91.7%
unpow191.7%
associate-*l*91.7%
Simplified91.7%
add-cube-cbrt91.6%
pow391.6%
Applied egg-rr98.9%
Taylor expanded in k around 0 98.9%
Final simplification66.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 6.6e-245)
(/
2.0
(* (sin k) (/ (* (pow k 2.0) (* t_m (sin k))) (* (pow l 2.0) (cos k)))))
(/
2.0
(*
(sin k)
(pow
(*
(cbrt (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0))))
(* t_m (pow (cbrt l) -2.0)))
3.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 6.6e-245) {
tmp = 2.0 / (sin(k) * ((pow(k, 2.0) * (t_m * sin(k))) / (pow(l, 2.0) * cos(k))));
} else {
tmp = 2.0 / (sin(k) * pow((cbrt((tan(k) * (2.0 + pow((k / t_m), 2.0)))) * (t_m * pow(cbrt(l), -2.0))), 3.0));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 6.6e-245) {
tmp = 2.0 / (Math.sin(k) * ((Math.pow(k, 2.0) * (t_m * Math.sin(k))) / (Math.pow(l, 2.0) * Math.cos(k))));
} else {
tmp = 2.0 / (Math.sin(k) * 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))), 3.0));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 6.6e-245) tmp = Float64(2.0 / Float64(sin(k) * Float64(Float64((k ^ 2.0) * Float64(t_m * sin(k))) / Float64((l ^ 2.0) * cos(k))))); else tmp = Float64(2.0 / Float64(sin(k) * (Float64(cbrt(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0)))) * Float64(t_m * (cbrt(l) ^ -2.0))) ^ 3.0))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 6.6e-245], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * 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[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 6.6 \cdot 10^{-245}:\\
\;\;\;\;\frac{2}{\sin k \cdot \frac{{k}^{2} \cdot \left(t\_m \cdot \sin k\right)}{{\ell}^{2} \cdot \cos k}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\sin k \cdot {\left(\sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)} \cdot \left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right)}^{3}}\\
\end{array}
\end{array}
if t < 6.6000000000000002e-245Initial program 53.4%
Simplified53.4%
add-cube-cbrt53.4%
pow353.4%
*-commutative53.4%
cbrt-prod53.3%
cbrt-div53.9%
rem-cbrt-cube63.2%
cbrt-prod73.2%
pow273.2%
Applied egg-rr73.2%
*-commutative73.2%
Simplified73.2%
pow173.2%
div-inv73.2%
pow-flip73.3%
metadata-eval73.3%
Applied egg-rr73.3%
unpow173.3%
associate-*l*73.3%
Simplified73.3%
pow173.3%
associate-*r*73.3%
unpow-prod-down66.6%
pow366.6%
add-cube-cbrt66.7%
associate-+r+66.7%
metadata-eval66.7%
Applied egg-rr66.7%
unpow166.7%
*-commutative66.7%
associate-*l*67.2%
Simplified67.2%
Taylor expanded in t around 0 51.6%
if 6.6000000000000002e-245 < t Initial program 65.1%
Simplified65.1%
add-cube-cbrt64.9%
pow364.9%
*-commutative64.9%
cbrt-prod64.8%
cbrt-div65.7%
rem-cbrt-cube69.3%
cbrt-prod78.9%
pow278.9%
Applied egg-rr78.9%
*-commutative78.9%
Simplified78.9%
pow178.9%
div-inv78.9%
pow-flip78.9%
metadata-eval78.9%
Applied egg-rr78.9%
unpow178.9%
associate-*l*78.9%
Simplified78.9%
pow178.9%
associate-*r*78.9%
unpow-prod-down77.3%
pow377.3%
add-cube-cbrt77.3%
associate-+r+77.3%
metadata-eval77.3%
Applied egg-rr77.3%
unpow177.3%
*-commutative77.3%
associate-*l*77.4%
Simplified77.4%
add-cube-cbrt77.4%
pow377.4%
*-commutative77.4%
cbrt-prod77.3%
unpow377.3%
add-cbrt-cube83.4%
Applied egg-rr83.4%
Final simplification66.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (cbrt l) -2.0)))
(*
t_s
(if (<= t_m 2e-103)
(/ 2.0 (pow (* t_m (* t_2 (cbrt (* 2.0 (pow k 2.0))))) 3.0))
(if (<= t_m 6e+104)
(*
(* (/ l (sin k)) (/ (* 2.0 (pow t_m -3.0)) (tan k)))
(/ l (+ 2.0 (pow (/ k t_m) 2.0))))
(/ 2.0 (* (pow (* t_m (* (cbrt (sin k)) t_2)) 3.0) (* 2.0 k))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow(cbrt(l), -2.0);
double tmp;
if (t_m <= 2e-103) {
tmp = 2.0 / pow((t_m * (t_2 * cbrt((2.0 * pow(k, 2.0))))), 3.0);
} else if (t_m <= 6e+104) {
tmp = ((l / sin(k)) * ((2.0 * pow(t_m, -3.0)) / tan(k))) * (l / (2.0 + pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / (pow((t_m * (cbrt(sin(k)) * t_2)), 3.0) * (2.0 * k));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.pow(Math.cbrt(l), -2.0);
double tmp;
if (t_m <= 2e-103) {
tmp = 2.0 / Math.pow((t_m * (t_2 * Math.cbrt((2.0 * Math.pow(k, 2.0))))), 3.0);
} else if (t_m <= 6e+104) {
tmp = ((l / Math.sin(k)) * ((2.0 * Math.pow(t_m, -3.0)) / Math.tan(k))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / (Math.pow((t_m * (Math.cbrt(Math.sin(k)) * t_2)), 3.0) * (2.0 * k));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = cbrt(l) ^ -2.0 tmp = 0.0 if (t_m <= 2e-103) tmp = Float64(2.0 / (Float64(t_m * Float64(t_2 * cbrt(Float64(2.0 * (k ^ 2.0))))) ^ 3.0)); elseif (t_m <= 6e+104) tmp = Float64(Float64(Float64(l / sin(k)) * Float64(Float64(2.0 * (t_m ^ -3.0)) / tan(k))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); else tmp = Float64(2.0 / Float64((Float64(t_m * Float64(cbrt(sin(k)) * t_2)) ^ 3.0) * Float64(2.0 * k))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2e-103], N[(2.0 / N[Power[N[(t$95$m * N[(t$95$2 * N[Power[N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 6e+104], N[(N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * N[Power[t$95$m, -3.0], $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(t$95$m * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {\left(\sqrt[3]{\ell}\right)}^{-2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2 \cdot 10^{-103}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot \left(t\_2 \cdot \sqrt[3]{2 \cdot {k}^{2}}\right)\right)}^{3}}\\
\mathbf{elif}\;t\_m \leq 6 \cdot 10^{+104}:\\
\;\;\;\;\left(\frac{\ell}{\sin k} \cdot \frac{2 \cdot {t\_m}^{-3}}{\tan k}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot \left(\sqrt[3]{\sin k} \cdot t\_2\right)\right)}^{3} \cdot \left(2 \cdot k\right)}\\
\end{array}
\end{array}
\end{array}
if t < 1.99999999999999992e-103Initial program 52.0%
Simplified49.7%
Taylor expanded in k around 0 50.5%
add-cube-cbrt50.5%
pow350.5%
cbrt-prod50.4%
associate-/l/46.6%
unpow246.6%
cbrt-div46.6%
unpow346.6%
add-cbrt-cube54.7%
unpow254.7%
cbrt-prod58.9%
unpow258.9%
div-inv58.9%
pow-flip59.0%
metadata-eval59.0%
Applied egg-rr59.0%
associate-*l*59.1%
Simplified59.1%
if 1.99999999999999992e-103 < t < 5.99999999999999937e104Initial program 75.8%
Simplified74.0%
div-inv74.0%
associate-*r*77.9%
associate-*l*78.0%
Applied egg-rr78.0%
associate-*l/78.1%
times-frac78.1%
associate-*r/78.1%
*-rgt-identity78.1%
Simplified78.1%
associate-*r/78.1%
div-inv78.1%
pow-flip78.1%
metadata-eval78.1%
Applied egg-rr78.1%
*-commutative78.1%
times-frac82.0%
Simplified82.0%
if 5.99999999999999937e104 < t Initial program 68.4%
Simplified68.4%
add-cube-cbrt68.4%
pow368.4%
*-commutative68.4%
cbrt-prod68.4%
cbrt-div68.4%
rem-cbrt-cube77.5%
cbrt-prod91.3%
pow291.3%
Applied egg-rr91.3%
*-commutative91.3%
Simplified91.3%
pow191.3%
div-inv91.2%
pow-flip91.2%
metadata-eval91.2%
Applied egg-rr91.2%
unpow191.2%
associate-*l*91.2%
Simplified91.2%
Taylor expanded in k around 0 91.2%
*-commutative68.4%
Simplified91.2%
Final simplification67.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 1e-61)
(*
2.0
(/ (* (pow l 2.0) (cos k)) (* (pow k 2.0) (* t_m (pow (sin k) 2.0)))))
(if (<= t_m 6.2e+104)
(*
(* (/ l (sin k)) (/ (* 2.0 (pow t_m -3.0)) (tan k)))
(/ l (+ 2.0 (pow (/ k t_m) 2.0))))
(/
2.0
(*
(pow (* t_m (* (cbrt (sin k)) (pow (cbrt l) -2.0))) 3.0)
(* 2.0 k)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1e-61) {
tmp = 2.0 * ((pow(l, 2.0) * cos(k)) / (pow(k, 2.0) * (t_m * pow(sin(k), 2.0))));
} else if (t_m <= 6.2e+104) {
tmp = ((l / sin(k)) * ((2.0 * pow(t_m, -3.0)) / tan(k))) * (l / (2.0 + pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / (pow((t_m * (cbrt(sin(k)) * pow(cbrt(l), -2.0))), 3.0) * (2.0 * k));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1e-61) {
tmp = 2.0 * ((Math.pow(l, 2.0) * Math.cos(k)) / (Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0))));
} else if (t_m <= 6.2e+104) {
tmp = ((l / Math.sin(k)) * ((2.0 * Math.pow(t_m, -3.0)) / Math.tan(k))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / (Math.pow((t_m * (Math.cbrt(Math.sin(k)) * Math.pow(Math.cbrt(l), -2.0))), 3.0) * (2.0 * k));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1e-61) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) * cos(k)) / Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0))))); elseif (t_m <= 6.2e+104) tmp = Float64(Float64(Float64(l / sin(k)) * Float64(Float64(2.0 * (t_m ^ -3.0)) / tan(k))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); else tmp = Float64(2.0 / Float64((Float64(t_m * Float64(cbrt(sin(k)) * (cbrt(l) ^ -2.0))) ^ 3.0) * Float64(2.0 * k))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1e-61], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 6.2e+104], N[(N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * N[Power[t$95$m, -3.0], $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(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] * N[(2.0 * k), $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 10^{-61}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}\\
\mathbf{elif}\;t\_m \leq 6.2 \cdot 10^{+104}:\\
\;\;\;\;\left(\frac{\ell}{\sin k} \cdot \frac{2 \cdot {t\_m}^{-3}}{\tan k}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot \left(\sqrt[3]{\sin k} \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right)}^{3} \cdot \left(2 \cdot k\right)}\\
\end{array}
\end{array}
if t < 1e-61Initial program 52.2%
Simplified45.9%
Taylor expanded in t around 0 55.8%
if 1e-61 < t < 6.20000000000000033e104Initial program 80.0%
Simplified77.7%
div-inv77.7%
associate-*r*82.5%
associate-*l*82.5%
Applied egg-rr82.5%
associate-*l/82.6%
times-frac82.6%
associate-*r/82.6%
*-rgt-identity82.6%
Simplified82.6%
associate-*r/82.6%
div-inv82.6%
pow-flip82.6%
metadata-eval82.6%
Applied egg-rr82.6%
*-commutative82.6%
times-frac87.4%
Simplified87.4%
if 6.20000000000000033e104 < t Initial program 68.4%
Simplified68.4%
add-cube-cbrt68.4%
pow368.4%
*-commutative68.4%
cbrt-prod68.4%
cbrt-div68.4%
rem-cbrt-cube77.5%
cbrt-prod91.3%
pow291.3%
Applied egg-rr91.3%
*-commutative91.3%
Simplified91.3%
pow191.3%
div-inv91.2%
pow-flip91.2%
metadata-eval91.2%
Applied egg-rr91.2%
unpow191.2%
associate-*l*91.2%
Simplified91.2%
Taylor expanded in k around 0 91.2%
*-commutative68.4%
Simplified91.2%
Final simplification65.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 7e-62)
(/
2.0
(* (/ (* t_m (pow k 2.0)) (pow l 2.0)) (/ (pow (sin k) 2.0) (cos k))))
(if (<= t_m 3.3e+103)
(*
(* (/ l (sin k)) (/ (* 2.0 (pow t_m -3.0)) (tan k)))
(/ l (+ 2.0 (pow (/ k t_m) 2.0))))
(/
2.0
(*
(pow (* t_m (* (cbrt (sin k)) (pow (cbrt l) -2.0))) 3.0)
(* 2.0 k)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 7e-62) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) / pow(l, 2.0)) * (pow(sin(k), 2.0) / cos(k)));
} else if (t_m <= 3.3e+103) {
tmp = ((l / sin(k)) * ((2.0 * pow(t_m, -3.0)) / tan(k))) * (l / (2.0 + pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / (pow((t_m * (cbrt(sin(k)) * pow(cbrt(l), -2.0))), 3.0) * (2.0 * k));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 7e-62) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) / Math.pow(l, 2.0)) * (Math.pow(Math.sin(k), 2.0) / Math.cos(k)));
} else if (t_m <= 3.3e+103) {
tmp = ((l / Math.sin(k)) * ((2.0 * Math.pow(t_m, -3.0)) / Math.tan(k))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / (Math.pow((t_m * (Math.cbrt(Math.sin(k)) * Math.pow(Math.cbrt(l), -2.0))), 3.0) * (2.0 * k));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 7e-62) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) / (l ^ 2.0)) * Float64((sin(k) ^ 2.0) / cos(k)))); elseif (t_m <= 3.3e+103) tmp = Float64(Float64(Float64(l / sin(k)) * Float64(Float64(2.0 * (t_m ^ -3.0)) / tan(k))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); else tmp = Float64(2.0 / Float64((Float64(t_m * Float64(cbrt(sin(k)) * (cbrt(l) ^ -2.0))) ^ 3.0) * Float64(2.0 * k))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 7e-62], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.3e+103], N[(N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * N[Power[t$95$m, -3.0], $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(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] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 7 \cdot 10^{-62}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}\\
\mathbf{elif}\;t\_m \leq 3.3 \cdot 10^{+103}:\\
\;\;\;\;\left(\frac{\ell}{\sin k} \cdot \frac{2 \cdot {t\_m}^{-3}}{\tan k}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot \left(\sqrt[3]{\sin k} \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right)}^{3} \cdot \left(2 \cdot k\right)}\\
\end{array}
\end{array}
if t < 7.0000000000000003e-62Initial program 52.2%
Simplified52.2%
Taylor expanded in t around 0 55.8%
associate-*r*55.8%
times-frac56.3%
Simplified56.3%
if 7.0000000000000003e-62 < t < 3.30000000000000009e103Initial program 80.0%
Simplified77.7%
div-inv77.7%
associate-*r*82.5%
associate-*l*82.5%
Applied egg-rr82.5%
associate-*l/82.6%
times-frac82.6%
associate-*r/82.6%
*-rgt-identity82.6%
Simplified82.6%
associate-*r/82.6%
div-inv82.6%
pow-flip82.6%
metadata-eval82.6%
Applied egg-rr82.6%
*-commutative82.6%
times-frac87.4%
Simplified87.4%
if 3.30000000000000009e103 < t Initial program 68.4%
Simplified68.4%
add-cube-cbrt68.4%
pow368.4%
*-commutative68.4%
cbrt-prod68.4%
cbrt-div68.4%
rem-cbrt-cube77.5%
cbrt-prod91.3%
pow291.3%
Applied egg-rr91.3%
*-commutative91.3%
Simplified91.3%
pow191.3%
div-inv91.2%
pow-flip91.2%
metadata-eval91.2%
Applied egg-rr91.2%
unpow191.2%
associate-*l*91.2%
Simplified91.2%
Taylor expanded in k around 0 91.2%
*-commutative68.4%
Simplified91.2%
Final simplification65.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 6.2e-11)
(/ 2.0 (* (* 2.0 k) (pow (* (/ (pow t_m 1.5) l) (sqrt (sin k))) 2.0)))
(if (<= k 3.1e+162)
(*
(/ l (+ 2.0 (pow (/ k t_m) 2.0)))
(* (/ 2.0 (tan k)) (/ (/ l (pow t_m 3.0)) (sin k))))
(/
2.0
(/ (pow (* (cbrt (* 2.0 (pow k 2.0))) (/ t_m (cbrt l))) 3.0) l))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 6.2e-11) {
tmp = 2.0 / ((2.0 * k) * pow(((pow(t_m, 1.5) / l) * sqrt(sin(k))), 2.0));
} else if (k <= 3.1e+162) {
tmp = (l / (2.0 + pow((k / t_m), 2.0))) * ((2.0 / tan(k)) * ((l / pow(t_m, 3.0)) / sin(k)));
} else {
tmp = 2.0 / (pow((cbrt((2.0 * pow(k, 2.0))) * (t_m / cbrt(l))), 3.0) / l);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 6.2e-11) {
tmp = 2.0 / ((2.0 * k) * Math.pow(((Math.pow(t_m, 1.5) / l) * Math.sqrt(Math.sin(k))), 2.0));
} else if (k <= 3.1e+162) {
tmp = (l / (2.0 + Math.pow((k / t_m), 2.0))) * ((2.0 / Math.tan(k)) * ((l / Math.pow(t_m, 3.0)) / Math.sin(k)));
} else {
tmp = 2.0 / (Math.pow((Math.cbrt((2.0 * Math.pow(k, 2.0))) * (t_m / Math.cbrt(l))), 3.0) / l);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 6.2e-11) tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(Float64((t_m ^ 1.5) / l) * sqrt(sin(k))) ^ 2.0))); elseif (k <= 3.1e+162) tmp = Float64(Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(Float64(2.0 / tan(k)) * Float64(Float64(l / (t_m ^ 3.0)) / sin(k)))); else tmp = Float64(2.0 / Float64((Float64(cbrt(Float64(2.0 * (k ^ 2.0))) * Float64(t_m / cbrt(l))) ^ 3.0) / l)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 6.2e-11], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Sin[k], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3.1e+162], N[(N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[Power[N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 6.2 \cdot 10^{-11}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2}}\\
\mathbf{elif}\;k \leq 3.1 \cdot 10^{+162}:\\
\;\;\;\;\frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}} \cdot \left(\frac{2}{\tan k} \cdot \frac{\frac{\ell}{{t\_m}^{3}}}{\sin k}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{\left(\sqrt[3]{2 \cdot {k}^{2}} \cdot \frac{t\_m}{\sqrt[3]{\ell}}\right)}^{3}}{\ell}}\\
\end{array}
\end{array}
if k < 6.20000000000000056e-11Initial program 63.2%
Simplified63.2%
add-sqr-sqrt31.3%
pow231.3%
*-commutative31.3%
sqrt-prod16.8%
sqrt-div16.8%
sqrt-pow117.4%
metadata-eval17.4%
sqrt-prod7.6%
add-sqr-sqrt19.3%
Applied egg-rr19.3%
*-commutative19.3%
Simplified19.3%
Taylor expanded in k around 0 16.2%
*-commutative57.7%
Simplified16.2%
if 6.20000000000000056e-11 < k < 3.1e162Initial program 46.5%
Simplified46.6%
div-inv46.6%
associate-*r*55.0%
associate-*l*58.9%
Applied egg-rr58.9%
associate-*l/58.9%
times-frac58.7%
associate-*r/58.7%
*-rgt-identity58.7%
Simplified58.7%
frac-times58.9%
Applied egg-rr58.9%
associate-/r*58.9%
associate-*r/58.9%
*-commutative58.9%
times-frac58.8%
Simplified58.8%
if 3.1e162 < k Initial program 42.3%
Simplified45.2%
Taylor expanded in k around 0 45.1%
associate-*l/45.3%
Applied egg-rr45.3%
add-cube-cbrt45.3%
pow345.3%
cbrt-prod45.3%
cbrt-div45.4%
unpow345.4%
add-cbrt-cube57.4%
Applied egg-rr57.4%
Final simplification26.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 7.4e-11)
(/ 2.0 (* (* 2.0 k) (pow (* (/ (pow t_m 1.5) l) (sqrt (sin k))) 2.0)))
(if (<= k 4e+160)
(/
2.0
(*
(/ (/ (pow t_m 3.0) l) l)
(* (* (sin k) (tan k)) (+ 2.0 (/ k (* t_m (/ t_m k)))))))
(/
2.0
(/ (pow (* (cbrt (* 2.0 (pow k 2.0))) (/ t_m (cbrt l))) 3.0) l))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 7.4e-11) {
tmp = 2.0 / ((2.0 * k) * pow(((pow(t_m, 1.5) / l) * sqrt(sin(k))), 2.0));
} else if (k <= 4e+160) {
tmp = 2.0 / (((pow(t_m, 3.0) / l) / l) * ((sin(k) * tan(k)) * (2.0 + (k / (t_m * (t_m / k))))));
} else {
tmp = 2.0 / (pow((cbrt((2.0 * pow(k, 2.0))) * (t_m / cbrt(l))), 3.0) / l);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 7.4e-11) {
tmp = 2.0 / ((2.0 * k) * Math.pow(((Math.pow(t_m, 1.5) / l) * Math.sqrt(Math.sin(k))), 2.0));
} else if (k <= 4e+160) {
tmp = 2.0 / (((Math.pow(t_m, 3.0) / l) / l) * ((Math.sin(k) * Math.tan(k)) * (2.0 + (k / (t_m * (t_m / k))))));
} else {
tmp = 2.0 / (Math.pow((Math.cbrt((2.0 * Math.pow(k, 2.0))) * (t_m / Math.cbrt(l))), 3.0) / l);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 7.4e-11) tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(Float64((t_m ^ 1.5) / l) * sqrt(sin(k))) ^ 2.0))); elseif (k <= 4e+160) tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 3.0) / l) / l) * Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + Float64(k / Float64(t_m * Float64(t_m / k))))))); else tmp = Float64(2.0 / Float64((Float64(cbrt(Float64(2.0 * (k ^ 2.0))) * Float64(t_m / cbrt(l))) ^ 3.0) / l)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 7.4e-11], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Sin[k], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 4e+160], 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[(k / N[(t$95$m * N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[Power[N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 7.4 \cdot 10^{-11}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2}}\\
\mathbf{elif}\;k \leq 4 \cdot 10^{+160}:\\
\;\;\;\;\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{t\_m}{k}}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{\left(\sqrt[3]{2 \cdot {k}^{2}} \cdot \frac{t\_m}{\sqrt[3]{\ell}}\right)}^{3}}{\ell}}\\
\end{array}
\end{array}
if k < 7.4000000000000003e-11Initial program 63.2%
Simplified63.2%
add-sqr-sqrt31.3%
pow231.3%
*-commutative31.3%
sqrt-prod16.8%
sqrt-div16.8%
sqrt-pow117.4%
metadata-eval17.4%
sqrt-prod7.6%
add-sqr-sqrt19.3%
Applied egg-rr19.3%
*-commutative19.3%
Simplified19.3%
Taylor expanded in k around 0 16.2%
*-commutative57.7%
Simplified16.2%
if 7.4000000000000003e-11 < k < 4.00000000000000003e160Initial program 46.5%
Simplified54.9%
unpow254.9%
clear-num54.9%
frac-times55.0%
*-un-lft-identity55.0%
Applied egg-rr55.0%
if 4.00000000000000003e160 < k Initial program 42.3%
Simplified45.2%
Taylor expanded in k around 0 45.1%
associate-*l/45.3%
Applied egg-rr45.3%
add-cube-cbrt45.3%
pow345.3%
cbrt-prod45.3%
cbrt-div45.4%
unpow345.4%
add-cbrt-cube57.4%
Applied egg-rr57.4%
Final simplification25.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 5.8e-11)
(/ 2.0 (* (* 2.0 k) (pow (* (/ (pow t_m 1.5) l) (sqrt (sin k))) 2.0)))
(if (<= k 4.2e+163)
(/
2.0
(*
(/ (/ (pow t_m 3.0) l) l)
(* (* (sin k) (tan k)) (+ 2.0 (/ k (* t_m (/ t_m 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 <= 5.8e-11) {
tmp = 2.0 / ((2.0 * k) * pow(((pow(t_m, 1.5) / l) * sqrt(sin(k))), 2.0));
} else if (k <= 4.2e+163) {
tmp = 2.0 / (((pow(t_m, 3.0) / l) / l) * ((sin(k) * tan(k)) * (2.0 + (k / (t_m * (t_m / 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 <= 5.8d-11) then
tmp = 2.0d0 / ((2.0d0 * k) * ((((t_m ** 1.5d0) / l) * sqrt(sin(k))) ** 2.0d0))
else if (k <= 4.2d+163) then
tmp = 2.0d0 / ((((t_m ** 3.0d0) / l) / l) * ((sin(k) * tan(k)) * (2.0d0 + (k / (t_m * (t_m / 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 <= 5.8e-11) {
tmp = 2.0 / ((2.0 * k) * Math.pow(((Math.pow(t_m, 1.5) / l) * Math.sqrt(Math.sin(k))), 2.0));
} else if (k <= 4.2e+163) {
tmp = 2.0 / (((Math.pow(t_m, 3.0) / l) / l) * ((Math.sin(k) * Math.tan(k)) * (2.0 + (k / (t_m * (t_m / 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 <= 5.8e-11: tmp = 2.0 / ((2.0 * k) * math.pow(((math.pow(t_m, 1.5) / l) * math.sqrt(math.sin(k))), 2.0)) elif k <= 4.2e+163: tmp = 2.0 / (((math.pow(t_m, 3.0) / l) / l) * ((math.sin(k) * math.tan(k)) * (2.0 + (k / (t_m * (t_m / 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 <= 5.8e-11) tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(Float64((t_m ^ 1.5) / l) * sqrt(sin(k))) ^ 2.0))); elseif (k <= 4.2e+163) tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 3.0) / l) / l) * Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + Float64(k / Float64(t_m * Float64(t_m / 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 <= 5.8e-11) tmp = 2.0 / ((2.0 * k) * ((((t_m ^ 1.5) / l) * sqrt(sin(k))) ^ 2.0)); elseif (k <= 4.2e+163) tmp = 2.0 / ((((t_m ^ 3.0) / l) / l) * ((sin(k) * tan(k)) * (2.0 + (k / (t_m * (t_m / 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, 5.8e-11], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Sin[k], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 4.2e+163], 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[(k / N[(t$95$m * N[(t$95$m / k), $MachinePrecision]), $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 5.8 \cdot 10^{-11}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2}}\\
\mathbf{elif}\;k \leq 4.2 \cdot 10^{+163}:\\
\;\;\;\;\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{t\_m}{k}}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\\
\end{array}
\end{array}
if k < 5.8e-11Initial program 63.2%
Simplified63.2%
add-sqr-sqrt31.3%
pow231.3%
*-commutative31.3%
sqrt-prod16.8%
sqrt-div16.8%
sqrt-pow117.4%
metadata-eval17.4%
sqrt-prod7.6%
add-sqr-sqrt19.3%
Applied egg-rr19.3%
*-commutative19.3%
Simplified19.3%
Taylor expanded in k around 0 16.2%
*-commutative57.7%
Simplified16.2%
if 5.8e-11 < k < 4.2000000000000001e163Initial program 48.7%
Simplified56.7%
unpow256.7%
clear-num56.7%
frac-times56.8%
*-un-lft-identity56.8%
Applied egg-rr56.8%
if 4.2000000000000001e163 < k Initial program 40.6%
Simplified40.6%
div-inv40.6%
associate-*r*43.6%
associate-*l*46.5%
Applied egg-rr46.5%
associate-*l/46.5%
times-frac46.5%
associate-*r/46.5%
*-rgt-identity46.5%
Simplified46.5%
Taylor expanded in k around 0 43.9%
associate-*r/43.9%
Simplified43.9%
Taylor expanded in k around inf 52.9%
Final simplification25.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 (* (sin k) (tan k))))
(*
t_s
(if (<= t_m 1.15e-217)
(* 2.0 (/ (pow l 2.0) (* t_m (pow k 4.0))))
(if (<= t_m 9.2e-107)
(* (* (/ 2.0 (pow t_m 3.0)) (/ l t_2)) (* l 0.5))
(if (<= t_m 1.5e+98)
(/
2.0
(*
(/ (/ (pow t_m 3.0) l) l)
(* t_2 (+ 2.0 (/ k (* t_m (/ t_m k)))))))
(/
2.0
(* (* 2.0 k) (* (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 t_2 = sin(k) * tan(k);
double tmp;
if (t_m <= 1.15e-217) {
tmp = 2.0 * (pow(l, 2.0) / (t_m * pow(k, 4.0)));
} else if (t_m <= 9.2e-107) {
tmp = ((2.0 / pow(t_m, 3.0)) * (l / t_2)) * (l * 0.5);
} else if (t_m <= 1.5e+98) {
tmp = 2.0 / (((pow(t_m, 3.0) / l) / l) * (t_2 * (2.0 + (k / (t_m * (t_m / k))))));
} else {
tmp = 2.0 / ((2.0 * k) * (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) :: t_2
real(8) :: tmp
t_2 = sin(k) * tan(k)
if (t_m <= 1.15d-217) then
tmp = 2.0d0 * ((l ** 2.0d0) / (t_m * (k ** 4.0d0)))
else if (t_m <= 9.2d-107) then
tmp = ((2.0d0 / (t_m ** 3.0d0)) * (l / t_2)) * (l * 0.5d0)
else if (t_m <= 1.5d+98) then
tmp = 2.0d0 / ((((t_m ** 3.0d0) / l) / l) * (t_2 * (2.0d0 + (k / (t_m * (t_m / k))))))
else
tmp = 2.0d0 / ((2.0d0 * k) * (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 t_2 = Math.sin(k) * Math.tan(k);
double tmp;
if (t_m <= 1.15e-217) {
tmp = 2.0 * (Math.pow(l, 2.0) / (t_m * Math.pow(k, 4.0)));
} else if (t_m <= 9.2e-107) {
tmp = ((2.0 / Math.pow(t_m, 3.0)) * (l / t_2)) * (l * 0.5);
} else if (t_m <= 1.5e+98) {
tmp = 2.0 / (((Math.pow(t_m, 3.0) / l) / l) * (t_2 * (2.0 + (k / (t_m * (t_m / k))))));
} else {
tmp = 2.0 / ((2.0 * k) * (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): t_2 = math.sin(k) * math.tan(k) tmp = 0 if t_m <= 1.15e-217: tmp = 2.0 * (math.pow(l, 2.0) / (t_m * math.pow(k, 4.0))) elif t_m <= 9.2e-107: tmp = ((2.0 / math.pow(t_m, 3.0)) * (l / t_2)) * (l * 0.5) elif t_m <= 1.5e+98: tmp = 2.0 / (((math.pow(t_m, 3.0) / l) / l) * (t_2 * (2.0 + (k / (t_m * (t_m / k)))))) else: tmp = 2.0 / ((2.0 * k) * (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) t_2 = Float64(sin(k) * tan(k)) tmp = 0.0 if (t_m <= 1.15e-217) tmp = Float64(2.0 * Float64((l ^ 2.0) / Float64(t_m * (k ^ 4.0)))); elseif (t_m <= 9.2e-107) tmp = Float64(Float64(Float64(2.0 / (t_m ^ 3.0)) * Float64(l / t_2)) * Float64(l * 0.5)); elseif (t_m <= 1.5e+98) tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 3.0) / l) / l) * Float64(t_2 * Float64(2.0 + Float64(k / Float64(t_m * Float64(t_m / k))))))); else tmp = Float64(2.0 / Float64(Float64(2.0 * k) * 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) t_2 = sin(k) * tan(k); tmp = 0.0; if (t_m <= 1.15e-217) tmp = 2.0 * ((l ^ 2.0) / (t_m * (k ^ 4.0))); elseif (t_m <= 9.2e-107) tmp = ((2.0 / (t_m ^ 3.0)) * (l / t_2)) * (l * 0.5); elseif (t_m <= 1.5e+98) tmp = 2.0 / ((((t_m ^ 3.0) / l) / l) * (t_2 * (2.0 + (k / (t_m * (t_m / k)))))); else tmp = 2.0 / ((2.0 * k) * (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_] := Block[{t$95$2 = N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.15e-217], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 9.2e-107], N[(N[(N[(2.0 / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] * N[(l / t$95$2), $MachinePrecision]), $MachinePrecision] * N[(l * 0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.5e+98], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$2 * N[(2.0 + N[(k / N[(t$95$m * N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $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)
\\
\begin{array}{l}
t_2 := \sin k \cdot \tan k\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.15 \cdot 10^{-217}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\\
\mathbf{elif}\;t\_m \leq 9.2 \cdot 10^{-107}:\\
\;\;\;\;\left(\frac{2}{{t\_m}^{3}} \cdot \frac{\ell}{t\_2}\right) \cdot \left(\ell \cdot 0.5\right)\\
\mathbf{elif}\;t\_m \leq 1.5 \cdot 10^{+98}:\\
\;\;\;\;\frac{2}{\frac{\frac{{t\_m}^{3}}{\ell}}{\ell} \cdot \left(t\_2 \cdot \left(2 + \frac{k}{t\_m \cdot \frac{t\_m}{k}}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\
\end{array}
\end{array}
\end{array}
if t < 1.15000000000000002e-217Initial program 53.2%
Simplified45.6%
div-inv45.6%
associate-*r*49.3%
associate-*l*50.5%
Applied egg-rr50.5%
associate-*l/50.6%
times-frac50.5%
associate-*r/50.5%
*-rgt-identity50.5%
Simplified50.5%
Taylor expanded in k around 0 46.7%
associate-*r/46.7%
Simplified46.7%
Taylor expanded in k around inf 45.0%
if 1.15000000000000002e-217 < t < 9.20000000000000014e-107Initial program 43.7%
Simplified43.7%
div-inv43.7%
associate-*r*57.0%
associate-*l*57.0%
Applied egg-rr57.0%
associate-*l/57.0%
times-frac57.0%
associate-*r/57.0%
*-rgt-identity57.0%
Simplified57.0%
Taylor expanded in k around 0 70.5%
*-commutative65.8%
Simplified70.5%
if 9.20000000000000014e-107 < t < 1.5000000000000001e98Initial program 74.8%
Simplified76.8%
unpow276.8%
clear-num76.8%
frac-times77.1%
*-un-lft-identity77.1%
Applied egg-rr77.1%
if 1.5000000000000001e98 < t Initial program 70.1%
Simplified70.1%
unpow370.1%
times-frac81.4%
pow281.4%
Applied egg-rr81.4%
Taylor expanded in k around 0 81.4%
*-commutative70.1%
Simplified81.4%
Final simplification58.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.75e-217)
(* 2.0 (/ (pow l 2.0) (* t_m (pow k 4.0))))
(if (<= t_m 2.15e+48)
(/ 2.0 (/ (* (pow t_m 3.0) (* 2.0 (/ (pow k 2.0) l))) l))
(/ 2.0 (* (* 2.0 k) (* (sin k) (/ (pow t_m 3.0) (* l l)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.75e-217) {
tmp = 2.0 * (pow(l, 2.0) / (t_m * pow(k, 4.0)));
} else if (t_m <= 2.15e+48) {
tmp = 2.0 / ((pow(t_m, 3.0) * (2.0 * (pow(k, 2.0) / l))) / l);
} else {
tmp = 2.0 / ((2.0 * k) * (sin(k) * (pow(t_m, 3.0) / (l * l))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1.75d-217) then
tmp = 2.0d0 * ((l ** 2.0d0) / (t_m * (k ** 4.0d0)))
else if (t_m <= 2.15d+48) then
tmp = 2.0d0 / (((t_m ** 3.0d0) * (2.0d0 * ((k ** 2.0d0) / l))) / l)
else
tmp = 2.0d0 / ((2.0d0 * k) * (sin(k) * ((t_m ** 3.0d0) / (l * l))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.75e-217) {
tmp = 2.0 * (Math.pow(l, 2.0) / (t_m * Math.pow(k, 4.0)));
} else if (t_m <= 2.15e+48) {
tmp = 2.0 / ((Math.pow(t_m, 3.0) * (2.0 * (Math.pow(k, 2.0) / l))) / l);
} else {
tmp = 2.0 / ((2.0 * k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 1.75e-217: tmp = 2.0 * (math.pow(l, 2.0) / (t_m * math.pow(k, 4.0))) elif t_m <= 2.15e+48: tmp = 2.0 / ((math.pow(t_m, 3.0) * (2.0 * (math.pow(k, 2.0) / l))) / l) else: tmp = 2.0 / ((2.0 * k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l)))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.75e-217) tmp = Float64(2.0 * Float64((l ^ 2.0) / Float64(t_m * (k ^ 4.0)))); elseif (t_m <= 2.15e+48) tmp = Float64(2.0 / Float64(Float64((t_m ^ 3.0) * Float64(2.0 * Float64((k ^ 2.0) / l))) / l)); else tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(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.75e-217) tmp = 2.0 * ((l ^ 2.0) / (t_m * (k ^ 4.0))); elseif (t_m <= 2.15e+48) tmp = 2.0 / (((t_m ^ 3.0) * (2.0 * ((k ^ 2.0) / l))) / l); else tmp = 2.0 / ((2.0 * k) * (sin(k) * ((t_m ^ 3.0) / (l * l)))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.75e-217], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.15e+48], N[(2.0 / N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(2.0 * N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * 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.75 \cdot 10^{-217}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\\
\mathbf{elif}\;t\_m \leq 2.15 \cdot 10^{+48}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{3} \cdot \left(2 \cdot \frac{{k}^{2}}{\ell}\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)}\\
\end{array}
\end{array}
if t < 1.75e-217Initial program 53.2%
Simplified45.6%
div-inv45.6%
associate-*r*49.3%
associate-*l*50.5%
Applied egg-rr50.5%
associate-*l/50.6%
times-frac50.5%
associate-*r/50.5%
*-rgt-identity50.5%
Simplified50.5%
Taylor expanded in k around 0 46.7%
associate-*r/46.7%
Simplified46.7%
Taylor expanded in k around inf 45.0%
if 1.75e-217 < t < 2.14999999999999989e48Initial program 62.4%
Simplified66.5%
Taylor expanded in k around 0 56.2%
associate-*l/56.3%
Applied egg-rr56.3%
associate-/l*58.1%
Simplified58.1%
associate-*l/58.2%
associate-/l*58.2%
Applied egg-rr58.2%
if 2.14999999999999989e48 < t Initial program 70.6%
Simplified70.6%
Taylor expanded in k around 0 66.8%
*-commutative66.8%
Simplified66.8%
Final simplification52.2%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 0.66)
(/ 2.0 (* (* 2.0 k) (* (sin k) (* (/ (pow t_m 2.0) l) (/ t_m 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 <= 0.66) {
tmp = 2.0 / ((2.0 * k) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / 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 <= 0.66d0) then
tmp = 2.0d0 / ((2.0d0 * k) * (sin(k) * (((t_m ** 2.0d0) / l) * (t_m / 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 <= 0.66) {
tmp = 2.0 / ((2.0 * k) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / 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 <= 0.66: tmp = 2.0 / ((2.0 * k) * (math.sin(k) * ((math.pow(t_m, 2.0) / l) * (t_m / 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 <= 0.66) tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / 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 <= 0.66) tmp = 2.0 / ((2.0 * k) * (sin(k) * (((t_m ^ 2.0) / l) * (t_m / 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, 0.66], N[(2.0 / N[(N[(2.0 * k), $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], 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 0.66:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\\
\end{array}
\end{array}
if k < 0.660000000000000031Initial program 63.4%
Simplified63.4%
unpow363.4%
times-frac70.6%
pow270.6%
Applied egg-rr70.6%
Taylor expanded in k around 0 63.2%
*-commutative57.8%
Simplified63.2%
if 0.660000000000000031 < k Initial program 43.1%
Simplified43.1%
div-inv43.1%
associate-*r*48.2%
associate-*l*51.5%
Applied egg-rr51.5%
associate-*l/51.5%
times-frac51.5%
associate-*r/51.5%
*-rgt-identity51.5%
Simplified51.5%
Taylor expanded in k around 0 43.4%
associate-*r/43.4%
Simplified43.4%
Taylor expanded in k around inf 50.6%
Final simplification60.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 2.3e+27)
(* l (/ 2.0 (/ (* (pow t_m 3.0) (* 2.0 (pow k 2.0))) 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 <= 2.3e+27) {
tmp = l * (2.0 / ((pow(t_m, 3.0) * (2.0 * pow(k, 2.0))) / 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 <= 2.3d+27) then
tmp = l * (2.0d0 / (((t_m ** 3.0d0) * (2.0d0 * (k ** 2.0d0))) / 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 <= 2.3e+27) {
tmp = l * (2.0 / ((Math.pow(t_m, 3.0) * (2.0 * Math.pow(k, 2.0))) / 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 <= 2.3e+27: tmp = l * (2.0 / ((math.pow(t_m, 3.0) * (2.0 * math.pow(k, 2.0))) / 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 <= 2.3e+27) tmp = Float64(l * Float64(2.0 / Float64(Float64((t_m ^ 3.0) * Float64(2.0 * (k ^ 2.0))) / 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 <= 2.3e+27) tmp = l * (2.0 / (((t_m ^ 3.0) * (2.0 * (k ^ 2.0))) / 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, 2.3e+27], 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], 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 2.3 \cdot 10^{+27}:\\
\;\;\;\;\ell \cdot \frac{2}{\frac{{t\_m}^{3} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\\
\end{array}
\end{array}
if k < 2.3000000000000001e27Initial program 62.8%
Simplified59.8%
Taylor expanded in k around 0 55.6%
associate-*l/55.3%
Applied egg-rr55.3%
associate-/r/55.3%
associate-*l/55.3%
Applied egg-rr55.3%
if 2.3000000000000001e27 < k Initial program 44.6%
Simplified44.6%
div-inv44.6%
associate-*r*49.7%
associate-*l*53.1%
Applied egg-rr53.1%
associate-*l/53.1%
times-frac53.1%
associate-*r/53.1%
*-rgt-identity53.1%
Simplified53.1%
Taylor expanded in k around 0 44.7%
associate-*r/44.7%
Simplified44.7%
Taylor expanded in k around inf 52.3%
Final simplification54.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1.85e+28)
(* (* 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.85e+28) {
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.85d+28) 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.85e+28) {
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.85e+28: 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.85e+28) 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.85e+28) 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.85e+28], 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.85 \cdot 10^{+28}:\\
\;\;\;\;\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.85e28Initial program 62.8%
Simplified56.0%
div-inv56.0%
associate-*r*60.4%
associate-*l*60.4%
Applied egg-rr60.4%
associate-*l/60.4%
times-frac59.7%
associate-*r/59.7%
*-rgt-identity59.7%
Simplified59.7%
Taylor expanded in k around 0 54.5%
associate-*r/54.5%
Simplified54.5%
Taylor expanded in k around 0 55.3%
*-commutative55.3%
Simplified55.3%
if 1.85e28 < k Initial program 44.6%
Simplified44.6%
div-inv44.6%
associate-*r*49.7%
associate-*l*53.1%
Applied egg-rr53.1%
associate-*l/53.1%
times-frac53.1%
associate-*r/53.1%
*-rgt-identity53.1%
Simplified53.1%
Taylor expanded in k around 0 44.7%
associate-*r/44.7%
Simplified44.7%
Taylor expanded in k around inf 52.3%
Final simplification54.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.7e-217)
(* 2.0 (/ (pow l 2.0) (* t_m (pow k 4.0))))
(/ 2.0 (* (* 2.0 (pow k 2.0)) (/ (/ (pow t_m 3.0) l) l))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.7e-217) {
tmp = 2.0 * (pow(l, 2.0) / (t_m * pow(k, 4.0)));
} else {
tmp = 2.0 / ((2.0 * pow(k, 2.0)) * ((pow(t_m, 3.0) / l) / l));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 2.7d-217) then
tmp = 2.0d0 * ((l ** 2.0d0) / (t_m * (k ** 4.0d0)))
else
tmp = 2.0d0 / ((2.0d0 * (k ** 2.0d0)) * (((t_m ** 3.0d0) / l) / l))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.7e-217) {
tmp = 2.0 * (Math.pow(l, 2.0) / (t_m * Math.pow(k, 4.0)));
} else {
tmp = 2.0 / ((2.0 * Math.pow(k, 2.0)) * ((Math.pow(t_m, 3.0) / l) / l));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 2.7e-217: tmp = 2.0 * (math.pow(l, 2.0) / (t_m * math.pow(k, 4.0))) else: tmp = 2.0 / ((2.0 * math.pow(k, 2.0)) * ((math.pow(t_m, 3.0) / l) / l)) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 2.7e-217) tmp = Float64(2.0 * Float64((l ^ 2.0) / Float64(t_m * (k ^ 4.0)))); else tmp = Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64(Float64((t_m ^ 3.0) / l) / l))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 2.7e-217) tmp = 2.0 * ((l ^ 2.0) / (t_m * (k ^ 4.0))); else tmp = 2.0 / ((2.0 * (k ^ 2.0)) * (((t_m ^ 3.0) / l) / l)); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.7e-217], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.7 \cdot 10^{-217}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{\frac{{t\_m}^{3}}{\ell}}{\ell}}\\
\end{array}
\end{array}
if t < 2.70000000000000016e-217Initial program 53.2%
Simplified45.6%
div-inv45.6%
associate-*r*49.3%
associate-*l*50.5%
Applied egg-rr50.5%
associate-*l/50.6%
times-frac50.5%
associate-*r/50.5%
*-rgt-identity50.5%
Simplified50.5%
Taylor expanded in k around 0 46.7%
associate-*r/46.7%
Simplified46.7%
Taylor expanded in k around inf 45.0%
if 2.70000000000000016e-217 < t Initial program 66.5%
Simplified70.2%
Taylor expanded in k around 0 61.2%
Final simplification51.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 1.75e-217)
(* 2.0 (/ (pow l 2.0) (* t_m (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.75e-217) {
tmp = 2.0 * (pow(l, 2.0) / (t_m * 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.75d-217) then
tmp = 2.0d0 * ((l ** 2.0d0) / (t_m * (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.75e-217) {
tmp = 2.0 * (Math.pow(l, 2.0) / (t_m * 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.75e-217: tmp = 2.0 * (math.pow(l, 2.0) / (t_m * 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.75e-217) tmp = Float64(2.0 * Float64((l ^ 2.0) / Float64(t_m * (k ^ 4.0)))); else tmp = Float64(2.0 / Float64(Float64((t_m ^ 3.0) / l) * Float64(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.75e-217) tmp = 2.0 * ((l ^ 2.0) / (t_m * (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.75e-217], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] * N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.75 \cdot 10^{-217}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{3}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\ell}}\\
\end{array}
\end{array}
if t < 1.75e-217Initial program 53.2%
Simplified45.6%
div-inv45.6%
associate-*r*49.3%
associate-*l*50.5%
Applied egg-rr50.5%
associate-*l/50.6%
times-frac50.5%
associate-*r/50.5%
*-rgt-identity50.5%
Simplified50.5%
Taylor expanded in k around 0 46.7%
associate-*r/46.7%
Simplified46.7%
Taylor expanded in k around inf 45.0%
if 1.75e-217 < t Initial program 66.5%
Simplified70.2%
Taylor expanded in k around 0 61.2%
associate-*l/60.4%
Applied egg-rr60.4%
associate-/l*61.1%
Simplified61.1%
Final simplification51.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 1.55e-217)
(* 2.0 (/ (pow l 2.0) (* t_m (pow k 4.0))))
(/ 2.0 (/ (* (pow t_m 3.0) (* 2.0 (/ (pow k 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.55e-217) {
tmp = 2.0 * (pow(l, 2.0) / (t_m * pow(k, 4.0)));
} else {
tmp = 2.0 / ((pow(t_m, 3.0) * (2.0 * (pow(k, 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.55d-217) then
tmp = 2.0d0 * ((l ** 2.0d0) / (t_m * (k ** 4.0d0)))
else
tmp = 2.0d0 / (((t_m ** 3.0d0) * (2.0d0 * ((k ** 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.55e-217) {
tmp = 2.0 * (Math.pow(l, 2.0) / (t_m * Math.pow(k, 4.0)));
} else {
tmp = 2.0 / ((Math.pow(t_m, 3.0) * (2.0 * (Math.pow(k, 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.55e-217: tmp = 2.0 * (math.pow(l, 2.0) / (t_m * math.pow(k, 4.0))) else: tmp = 2.0 / ((math.pow(t_m, 3.0) * (2.0 * (math.pow(k, 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.55e-217) tmp = Float64(2.0 * Float64((l ^ 2.0) / Float64(t_m * (k ^ 4.0)))); else tmp = Float64(2.0 / Float64(Float64((t_m ^ 3.0) * Float64(2.0 * Float64((k ^ 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.55e-217) tmp = 2.0 * ((l ^ 2.0) / (t_m * (k ^ 4.0))); else tmp = 2.0 / (((t_m ^ 3.0) * (2.0 * ((k ^ 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.55e-217], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(2.0 * N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]]), $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^{-217}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{3} \cdot \left(2 \cdot \frac{{k}^{2}}{\ell}\right)}{\ell}}\\
\end{array}
\end{array}
if t < 1.5499999999999999e-217Initial program 53.2%
Simplified45.6%
div-inv45.6%
associate-*r*49.3%
associate-*l*50.5%
Applied egg-rr50.5%
associate-*l/50.6%
times-frac50.5%
associate-*r/50.5%
*-rgt-identity50.5%
Simplified50.5%
Taylor expanded in k around 0 46.7%
associate-*r/46.7%
Simplified46.7%
Taylor expanded in k around inf 45.0%
if 1.5499999999999999e-217 < t Initial program 66.5%
Simplified70.2%
Taylor expanded in k around 0 61.2%
associate-*l/60.4%
Applied egg-rr60.4%
associate-/l*61.1%
Simplified61.1%
associate-*l/61.2%
associate-/l*61.2%
Applied egg-rr61.2%
Final simplification51.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 (* 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) {
return t_s * (2.0 * (pow(l, 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 * (2.0d0 * ((l ** 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 * (2.0 * (Math.pow(l, 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 * (2.0 * (math.pow(l, 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(2.0 * Float64((l ^ 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 * (2.0 * ((l ^ 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[(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 \left(2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\right)
\end{array}
Initial program 58.7%
Simplified53.4%
div-inv53.5%
associate-*r*58.0%
associate-*l*58.7%
Applied egg-rr58.7%
associate-*l/58.8%
times-frac58.3%
associate-*r/58.3%
*-rgt-identity58.3%
Simplified58.3%
Taylor expanded in k around 0 52.3%
associate-*r/52.3%
Simplified52.3%
Taylor expanded in k around inf 45.9%
Final simplification45.9%
herbie shell --seed 2024081
(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))))