
(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 21 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 (pow (sin k) 2.0)) (t_3 (/ t_m (pow (cbrt l) 2.0))))
(*
t_s
(if (<= t_m 5.9e-266)
(pow (* l (* (/ (sqrt 2.0) (sin k)) (/ (sqrt (/ (cos k) t_m)) k))) 2.0)
(if (<= t_m 3.6e-118)
(* 2.0 (* (/ (pow l 2.0) (* t_m (pow k 2.0))) (/ (cos k) t_2)))
(if (<= t_m 2.6e-75)
(/
2.0
(pow
(*
t_3
(*
k
(+
(cbrt (/ t_2 (* (cos k) (* k (pow t_m 2.0)))))
(*
0.6666666666666666
(cbrt (* (pow t_m 4.0) (/ t_2 (* (cos k) (pow k 7.0)))))))))
3.0))
(/
2.0
(pow
(*
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 = pow(sin(k), 2.0);
double t_3 = t_m / pow(cbrt(l), 2.0);
double tmp;
if (t_m <= 5.9e-266) {
tmp = pow((l * ((sqrt(2.0) / sin(k)) * (sqrt((cos(k) / t_m)) / k))), 2.0);
} else if (t_m <= 3.6e-118) {
tmp = 2.0 * ((pow(l, 2.0) / (t_m * pow(k, 2.0))) * (cos(k) / t_2));
} else if (t_m <= 2.6e-75) {
tmp = 2.0 / pow((t_3 * (k * (cbrt((t_2 / (cos(k) * (k * pow(t_m, 2.0))))) + (0.6666666666666666 * cbrt((pow(t_m, 4.0) * (t_2 / (cos(k) * pow(k, 7.0))))))))), 3.0);
} else {
tmp = 2.0 / pow((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.pow(Math.sin(k), 2.0);
double t_3 = t_m / Math.pow(Math.cbrt(l), 2.0);
double tmp;
if (t_m <= 5.9e-266) {
tmp = Math.pow((l * ((Math.sqrt(2.0) / Math.sin(k)) * (Math.sqrt((Math.cos(k) / t_m)) / k))), 2.0);
} else if (t_m <= 3.6e-118) {
tmp = 2.0 * ((Math.pow(l, 2.0) / (t_m * Math.pow(k, 2.0))) * (Math.cos(k) / t_2));
} else if (t_m <= 2.6e-75) {
tmp = 2.0 / Math.pow((t_3 * (k * (Math.cbrt((t_2 / (Math.cos(k) * (k * Math.pow(t_m, 2.0))))) + (0.6666666666666666 * Math.cbrt((Math.pow(t_m, 4.0) * (t_2 / (Math.cos(k) * Math.pow(k, 7.0))))))))), 3.0);
} else {
tmp = 2.0 / Math.pow((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 = sin(k) ^ 2.0 t_3 = Float64(t_m / (cbrt(l) ^ 2.0)) tmp = 0.0 if (t_m <= 5.9e-266) tmp = Float64(l * Float64(Float64(sqrt(2.0) / sin(k)) * Float64(sqrt(Float64(cos(k) / t_m)) / k))) ^ 2.0; elseif (t_m <= 3.6e-118) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / Float64(t_m * (k ^ 2.0))) * Float64(cos(k) / t_2))); elseif (t_m <= 2.6e-75) tmp = Float64(2.0 / (Float64(t_3 * Float64(k * Float64(cbrt(Float64(t_2 / Float64(cos(k) * Float64(k * (t_m ^ 2.0))))) + Float64(0.6666666666666666 * cbrt(Float64((t_m ^ 4.0) * Float64(t_2 / Float64(cos(k) * (k ^ 7.0))))))))) ^ 3.0)); else tmp = Float64(2.0 / (Float64(t_3 * Float64(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[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 5.9e-266], N[Power[N[(l * N[(N[(N[Sqrt[2.0], $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[t$95$m, 3.6e-118], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.6e-75], N[(2.0 / N[Power[N[(t$95$3 * N[(k * N[(N[Power[N[(t$95$2 / N[(N[Cos[k], $MachinePrecision] * N[(k * N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] + N[(0.6666666666666666 * N[Power[N[(N[Power[t$95$m, 4.0], $MachinePrecision] * N[(t$95$2 / N[(N[Cos[k], $MachinePrecision] * N[Power[k, 7.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(t$95$3 * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {\sin k}^{2}\\
t_3 := \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 5.9 \cdot 10^{-266}:\\
\;\;\;\;{\left(\ell \cdot \left(\frac{\sqrt{2}}{\sin k} \cdot \frac{\sqrt{\frac{\cos k}{t\_m}}}{k}\right)\right)}^{2}\\
\mathbf{elif}\;t\_m \leq 3.6 \cdot 10^{-118}:\\
\;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{t\_m \cdot {k}^{2}} \cdot \frac{\cos k}{t\_2}\right)\\
\mathbf{elif}\;t\_m \leq 2.6 \cdot 10^{-75}:\\
\;\;\;\;\frac{2}{{\left(t\_3 \cdot \left(k \cdot \left(\sqrt[3]{\frac{t\_2}{\cos k \cdot \left(k \cdot {t\_m}^{2}\right)}} + 0.6666666666666666 \cdot \sqrt[3]{{t\_m}^{4} \cdot \frac{t\_2}{\cos k \cdot {k}^{7}}}\right)\right)\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_3 \cdot \left(\sqrt[3]{\sin k} \cdot \sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)}\right)\right)}^{3}}\\
\end{array}
\end{array}
\end{array}
if t < 5.90000000000000025e-266Initial program 49.3%
associate-/r*49.3%
+-commutative49.3%
unpow249.3%
sqr-neg49.3%
distribute-frac-neg249.3%
distribute-frac-neg249.3%
unpow249.3%
+-commutative49.3%
associate-*l*45.8%
associate-*l/46.5%
associate-/r/46.4%
+-commutative46.4%
associate-+r+46.4%
Simplified46.4%
add-sqr-sqrt27.8%
add-sqr-sqrt27.7%
times-frac27.7%
Applied egg-rr30.9%
unpow230.9%
associate-/l*31.0%
Simplified31.0%
Taylor expanded in t around 0 31.4%
associate-*l/31.4%
*-commutative31.4%
times-frac31.5%
Simplified31.5%
if 5.90000000000000025e-266 < t < 3.6000000000000002e-118Initial program 22.8%
associate-/r*22.8%
+-commutative22.8%
unpow222.8%
sqr-neg22.8%
distribute-frac-neg222.8%
distribute-frac-neg222.8%
unpow222.8%
+-commutative22.8%
associate-*l*22.8%
associate-*l/22.8%
associate-/r/22.8%
+-commutative22.8%
associate-+r+22.8%
Simplified22.8%
Taylor expanded in t around 0 87.2%
associate-*r*87.1%
times-frac87.2%
Simplified87.2%
if 3.6000000000000002e-118 < t < 2.6e-75Initial program 35.4%
Simplified35.5%
associate-*l*35.5%
associate-/r*43.3%
associate-+r+43.3%
metadata-eval43.3%
associate-*l*43.3%
add-cube-cbrt42.9%
pow342.9%
Applied egg-rr61.9%
Taylor expanded in k around inf 82.1%
associate-*r*82.1%
associate-/l*82.1%
*-commutative82.1%
Simplified82.1%
if 2.6e-75 < t Initial program 68.2%
Simplified68.2%
associate-*l*66.8%
associate-/r*71.2%
associate-+r+71.2%
metadata-eval71.2%
associate-*l*71.2%
add-cube-cbrt71.1%
pow371.1%
Applied egg-rr83.4%
associate-*l*83.4%
cbrt-prod95.4%
Applied egg-rr95.4%
Final simplification62.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2
(/
2.0
(*
(* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l))))
(+ 1.0 (+ (pow (/ k t_m) 2.0) 1.0))))))
(*
t_s
(if (<= t_2 -2e-284)
(/
2.0
(*
(* (* (sin k) (tan k)) (+ 2.0 (/ (/ k t_m) (/ t_m k))))
(/ (* (pow t_m 3.0) (/ 1.0 l)) l)))
(if (<= t_2 2e+303)
(/
2.0
(pow
(* (/ (pow t_m 1.5) l) (* k (hypot 1.0 (hypot 1.0 (/ k t_m)))))
2.0))
(/
2.0
(pow (* (sqrt (/ t_m (cos k))) (* k (/ (sin k) (- l)))) 2.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = 2.0 / ((tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l)))) * (1.0 + (pow((k / t_m), 2.0) + 1.0)));
double tmp;
if (t_2 <= -2e-284) {
tmp = 2.0 / (((sin(k) * tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))) * ((pow(t_m, 3.0) * (1.0 / l)) / l));
} else if (t_2 <= 2e+303) {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * hypot(1.0, hypot(1.0, (k / t_m))))), 2.0);
} else {
tmp = 2.0 / pow((sqrt((t_m / cos(k))) * (k * (sin(k) / -l))), 2.0);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = 2.0 / ((Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l)))) * (1.0 + (Math.pow((k / t_m), 2.0) + 1.0)));
double tmp;
if (t_2 <= -2e-284) {
tmp = 2.0 / (((Math.sin(k) * Math.tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))) * ((Math.pow(t_m, 3.0) * (1.0 / l)) / l));
} else if (t_2 <= 2e+303) {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.hypot(1.0, Math.hypot(1.0, (k / t_m))))), 2.0);
} else {
tmp = 2.0 / Math.pow((Math.sqrt((t_m / Math.cos(k))) * (k * (Math.sin(k) / -l))), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = 2.0 / ((math.tan(k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l)))) * (1.0 + (math.pow((k / t_m), 2.0) + 1.0))) tmp = 0 if t_2 <= -2e-284: tmp = 2.0 / (((math.sin(k) * math.tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))) * ((math.pow(t_m, 3.0) * (1.0 / l)) / l)) elif t_2 <= 2e+303: tmp = 2.0 / math.pow(((math.pow(t_m, 1.5) / l) * (k * math.hypot(1.0, math.hypot(1.0, (k / t_m))))), 2.0) else: tmp = 2.0 / math.pow((math.sqrt((t_m / math.cos(k))) * (k * (math.sin(k) / -l))), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(2.0 / Float64(Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l)))) * Float64(1.0 + Float64((Float64(k / t_m) ^ 2.0) + 1.0)))) tmp = 0.0 if (t_2 <= -2e-284) tmp = Float64(2.0 / Float64(Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + Float64(Float64(k / t_m) / Float64(t_m / k)))) * Float64(Float64((t_m ^ 3.0) * Float64(1.0 / l)) / l))); elseif (t_2 <= 2e+303) tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * hypot(1.0, hypot(1.0, Float64(k / t_m))))) ^ 2.0)); else tmp = Float64(2.0 / (Float64(sqrt(Float64(t_m / cos(k))) * Float64(k * Float64(sin(k) / Float64(-l)))) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = 2.0 / ((tan(k) * (sin(k) * ((t_m ^ 3.0) / (l * l)))) * (1.0 + (((k / t_m) ^ 2.0) + 1.0))); tmp = 0.0; if (t_2 <= -2e-284) tmp = 2.0 / (((sin(k) * tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))) * (((t_m ^ 3.0) * (1.0 / l)) / l)); elseif (t_2 <= 2e+303) tmp = 2.0 / ((((t_m ^ 1.5) / l) * (k * hypot(1.0, hypot(1.0, (k / t_m))))) ^ 2.0); else tmp = 2.0 / ((sqrt((t_m / cos(k))) * (k * (sin(k) / -l))) ^ 2.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$2, -2e-284], N[(2.0 / N[(N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(1.0 / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+303], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(k * N[(N[Sin[k], $MachinePrecision] / (-l)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{2}{\left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right) \cdot \left(1 + \left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right)\right)}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{-284}:\\
\;\;\;\;\frac{2}{\left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\right) \cdot \frac{{t\_m}^{3} \cdot \frac{1}{\ell}}{\ell}}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+303}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\sqrt{\frac{t\_m}{\cos k}} \cdot \left(k \cdot \frac{\sin k}{-\ell}\right)\right)}^{2}}\\
\end{array}
\end{array}
\end{array}
if (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))) < -2.00000000000000007e-284Initial program 96.2%
Simplified96.4%
unpow296.4%
clear-num96.3%
un-div-inv96.4%
Applied egg-rr96.4%
div-inv96.4%
cube-mult96.3%
associate-*l*96.2%
pow296.2%
Applied egg-rr96.2%
associate-*r*96.3%
unpow296.3%
cube-mult96.4%
Simplified96.4%
if -2.00000000000000007e-284 < (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))) < 2e303Initial program 69.9%
Simplified69.9%
Applied egg-rr29.3%
Taylor expanded in k around 0 46.6%
if 2e303 < (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))) Initial program 24.3%
Simplified24.3%
Applied egg-rr42.5%
Taylor expanded in k around -inf 69.0%
mul-1-neg69.0%
*-commutative69.0%
distribute-rgt-neg-in69.0%
associate-/l*69.0%
Simplified69.0%
Final simplification62.1%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (sin k) 2.0)))
(*
t_s
(if (<= t_m 1.05e-261)
(pow (* l (* (/ (sqrt 2.0) (sin k)) (/ (sqrt (/ (cos k) t_m)) k))) 2.0)
(if (<= t_m 2.1e-206)
(* 2.0 (* (/ (pow l 2.0) (* t_m (pow k 2.0))) (/ (cos k) t_2)))
(if (<= t_m 3.5e-189)
(/ 2.0 (* (/ (/ (pow t_m 3.0) l) l) (* 2.0 (/ t_2 (cos k)))))
(/
2.0
(pow
(*
(/ t_m (pow (cbrt l) 2.0))
(* (cbrt (sin k)) (cbrt (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0))))))
3.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow(sin(k), 2.0);
double tmp;
if (t_m <= 1.05e-261) {
tmp = pow((l * ((sqrt(2.0) / sin(k)) * (sqrt((cos(k) / t_m)) / k))), 2.0);
} else if (t_m <= 2.1e-206) {
tmp = 2.0 * ((pow(l, 2.0) / (t_m * pow(k, 2.0))) * (cos(k) / t_2));
} else if (t_m <= 3.5e-189) {
tmp = 2.0 / (((pow(t_m, 3.0) / l) / l) * (2.0 * (t_2 / cos(k))));
} else {
tmp = 2.0 / pow(((t_m / pow(cbrt(l), 2.0)) * (cbrt(sin(k)) * cbrt((tan(k) * (2.0 + pow((k / t_m), 2.0)))))), 3.0);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.pow(Math.sin(k), 2.0);
double tmp;
if (t_m <= 1.05e-261) {
tmp = Math.pow((l * ((Math.sqrt(2.0) / Math.sin(k)) * (Math.sqrt((Math.cos(k) / t_m)) / k))), 2.0);
} else if (t_m <= 2.1e-206) {
tmp = 2.0 * ((Math.pow(l, 2.0) / (t_m * Math.pow(k, 2.0))) * (Math.cos(k) / t_2));
} else if (t_m <= 3.5e-189) {
tmp = 2.0 / (((Math.pow(t_m, 3.0) / l) / l) * (2.0 * (t_2 / Math.cos(k))));
} else {
tmp = 2.0 / Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * (Math.cbrt(Math.sin(k)) * Math.cbrt((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0)))))), 3.0);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = sin(k) ^ 2.0 tmp = 0.0 if (t_m <= 1.05e-261) tmp = Float64(l * Float64(Float64(sqrt(2.0) / sin(k)) * Float64(sqrt(Float64(cos(k) / t_m)) / k))) ^ 2.0; elseif (t_m <= 2.1e-206) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / Float64(t_m * (k ^ 2.0))) * Float64(cos(k) / t_2))); elseif (t_m <= 3.5e-189) tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 3.0) / l) / l) * Float64(2.0 * Float64(t_2 / cos(k))))); else tmp = Float64(2.0 / (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * Float64(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[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.05e-261], N[Power[N[(l * N[(N[(N[Sqrt[2.0], $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[t$95$m, 2.1e-206], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.5e-189], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision] * N[(2.0 * N[(t$95$2 / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {\sin k}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.05 \cdot 10^{-261}:\\
\;\;\;\;{\left(\ell \cdot \left(\frac{\sqrt{2}}{\sin k} \cdot \frac{\sqrt{\frac{\cos k}{t\_m}}}{k}\right)\right)}^{2}\\
\mathbf{elif}\;t\_m \leq 2.1 \cdot 10^{-206}:\\
\;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{t\_m \cdot {k}^{2}} \cdot \frac{\cos k}{t\_2}\right)\\
\mathbf{elif}\;t\_m \leq 3.5 \cdot 10^{-189}:\\
\;\;\;\;\frac{2}{\frac{\frac{{t\_m}^{3}}{\ell}}{\ell} \cdot \left(2 \cdot \frac{t\_2}{\cos k}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \left(\sqrt[3]{\sin k} \cdot \sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)}\right)\right)}^{3}}\\
\end{array}
\end{array}
\end{array}
if t < 1.04999999999999998e-261Initial program 49.3%
associate-/r*49.3%
+-commutative49.3%
unpow249.3%
sqr-neg49.3%
distribute-frac-neg249.3%
distribute-frac-neg249.3%
unpow249.3%
+-commutative49.3%
associate-*l*45.8%
associate-*l/46.5%
associate-/r/46.4%
+-commutative46.4%
associate-+r+46.4%
Simplified46.4%
add-sqr-sqrt27.8%
add-sqr-sqrt27.7%
times-frac27.7%
Applied egg-rr30.9%
unpow230.9%
associate-/l*31.0%
Simplified31.0%
Taylor expanded in t around 0 31.4%
associate-*l/31.4%
*-commutative31.4%
times-frac31.5%
Simplified31.5%
if 1.04999999999999998e-261 < t < 2.1000000000000001e-206Initial program 29.4%
associate-/r*29.4%
+-commutative29.4%
unpow229.4%
sqr-neg29.4%
distribute-frac-neg229.4%
distribute-frac-neg229.4%
unpow229.4%
+-commutative29.4%
associate-*l*29.4%
associate-*l/29.4%
associate-/r/29.4%
+-commutative29.4%
associate-+r+29.4%
Simplified29.4%
Taylor expanded in t around 0 94.2%
associate-*r*94.1%
times-frac94.2%
Simplified94.2%
if 2.1000000000000001e-206 < t < 3.5000000000000001e-189Initial program 20.0%
Simplified40.0%
Taylor expanded in t around inf 100.0%
if 3.5000000000000001e-189 < t Initial program 58.2%
Simplified58.2%
associate-*l*57.1%
associate-/r*61.8%
associate-+r+61.8%
metadata-eval61.8%
associate-*l*61.8%
add-cube-cbrt61.6%
pow361.6%
Applied egg-rr77.7%
associate-*l*77.8%
cbrt-prod86.8%
Applied egg-rr86.8%
Final simplification60.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.36e-18)
(/
2.0
(pow (* (/ (pow t_m 1.5) l) (* k (hypot 1.0 (hypot 1.0 (/ k t_m))))) 2.0))
(if (<= k 9.5e+145)
(*
2.0
(* (/ (pow l 2.0) (* t_m (pow k 2.0))) (/ (cos k) (pow (sin k) 2.0))))
(/
2.0
(pow
(*
(* t_m (pow (cbrt l) -2.0))
(cbrt (* (sin k) (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0))))))
3.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.36e-18) {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * hypot(1.0, hypot(1.0, (k / t_m))))), 2.0);
} else if (k <= 9.5e+145) {
tmp = 2.0 * ((pow(l, 2.0) / (t_m * pow(k, 2.0))) * (cos(k) / pow(sin(k), 2.0)));
} else {
tmp = 2.0 / pow(((t_m * pow(cbrt(l), -2.0)) * cbrt((sin(k) * (tan(k) * (2.0 + pow((k / t_m), 2.0)))))), 3.0);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.36e-18) {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.hypot(1.0, Math.hypot(1.0, (k / t_m))))), 2.0);
} else if (k <= 9.5e+145) {
tmp = 2.0 * ((Math.pow(l, 2.0) / (t_m * Math.pow(k, 2.0))) * (Math.cos(k) / Math.pow(Math.sin(k), 2.0)));
} else {
tmp = 2.0 / Math.pow(((t_m * Math.pow(Math.cbrt(l), -2.0)) * Math.cbrt((Math.sin(k) * (Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0)))))), 3.0);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.36e-18) tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * hypot(1.0, hypot(1.0, Float64(k / t_m))))) ^ 2.0)); elseif (k <= 9.5e+145) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / Float64(t_m * (k ^ 2.0))) * Float64(cos(k) / (sin(k) ^ 2.0)))); else tmp = Float64(2.0 / (Float64(Float64(t_m * (cbrt(l) ^ -2.0)) * cbrt(Float64(sin(k) * Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0)))))) ^ 3.0)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.36e-18], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 9.5e+145], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.36 \cdot 10^{-18}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\right)\right)}^{2}}\\
\mathbf{elif}\;k \leq 9.5 \cdot 10^{+145}:\\
\;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{t\_m \cdot {k}^{2}} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \sqrt[3]{\sin k \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)}\right)}^{3}}\\
\end{array}
\end{array}
if k < 1.3600000000000001e-18Initial program 53.1%
Simplified53.1%
Applied egg-rr34.6%
Taylor expanded in k around 0 40.1%
if 1.3600000000000001e-18 < k < 9.49999999999999948e145Initial program 47.1%
associate-/r*47.1%
+-commutative47.1%
unpow247.1%
sqr-neg47.1%
distribute-frac-neg247.1%
distribute-frac-neg247.1%
unpow247.1%
+-commutative47.1%
associate-*l*47.1%
associate-*l/47.1%
associate-/r/47.1%
+-commutative47.1%
associate-+r+47.1%
Simplified47.1%
Taylor expanded in t around 0 82.4%
associate-*r*82.3%
times-frac82.6%
Simplified82.6%
if 9.49999999999999948e145 < k Initial program 46.1%
Simplified46.1%
add-cube-cbrt46.1%
pow346.1%
*-commutative46.1%
cbrt-prod46.1%
cbrt-div46.1%
rem-cbrt-cube62.4%
cbrt-prod67.6%
pow267.6%
Applied egg-rr67.6%
*-commutative67.6%
Simplified67.6%
Applied egg-rr73.6%
Final simplification51.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 1.36e-18)
(/
2.0
(pow (* (/ (pow t_m 1.5) l) (* k (hypot 1.0 (hypot 1.0 (/ k t_m))))) 2.0))
(if (<= k 8.8e+148)
(*
2.0
(* (/ (pow l 2.0) (* t_m (pow k 2.0))) (/ (cos k) (pow (sin k) 2.0))))
(/
2.0
(*
(pow (* t_m (pow (cbrt l) -2.0)) 3.0)
(* (* (sin k) (tan k)) (+ 2.0 (/ (/ k t_m) (/ t_m k))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.36e-18) {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * hypot(1.0, hypot(1.0, (k / t_m))))), 2.0);
} else if (k <= 8.8e+148) {
tmp = 2.0 * ((pow(l, 2.0) / (t_m * pow(k, 2.0))) * (cos(k) / pow(sin(k), 2.0)));
} else {
tmp = 2.0 / (pow((t_m * pow(cbrt(l), -2.0)), 3.0) * ((sin(k) * tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.36e-18) {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.hypot(1.0, Math.hypot(1.0, (k / t_m))))), 2.0);
} else if (k <= 8.8e+148) {
tmp = 2.0 * ((Math.pow(l, 2.0) / (t_m * Math.pow(k, 2.0))) * (Math.cos(k) / Math.pow(Math.sin(k), 2.0)));
} else {
tmp = 2.0 / (Math.pow((t_m * Math.pow(Math.cbrt(l), -2.0)), 3.0) * ((Math.sin(k) * Math.tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.36e-18) tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * hypot(1.0, hypot(1.0, Float64(k / t_m))))) ^ 2.0)); elseif (k <= 8.8e+148) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / Float64(t_m * (k ^ 2.0))) * Float64(cos(k) / (sin(k) ^ 2.0)))); else tmp = Float64(2.0 / Float64((Float64(t_m * (cbrt(l) ^ -2.0)) ^ 3.0) * Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + Float64(Float64(k / t_m) / Float64(t_m / k)))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.36e-18], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 8.8e+148], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.36 \cdot 10^{-18}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\right)\right)}^{2}}\\
\mathbf{elif}\;k \leq 8.8 \cdot 10^{+148}:\\
\;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{t\_m \cdot {k}^{2}} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\right)}\\
\end{array}
\end{array}
if k < 1.3600000000000001e-18Initial program 53.1%
Simplified53.1%
Applied egg-rr34.6%
Taylor expanded in k around 0 40.1%
if 1.3600000000000001e-18 < k < 8.7999999999999995e148Initial program 45.8%
associate-/r*45.8%
+-commutative45.8%
unpow245.8%
sqr-neg45.8%
distribute-frac-neg245.8%
distribute-frac-neg245.8%
unpow245.8%
+-commutative45.8%
associate-*l*45.8%
associate-*l/45.9%
associate-/r/45.8%
+-commutative45.8%
associate-+r+45.8%
Simplified45.8%
Taylor expanded in t around 0 82.8%
associate-*r*82.8%
times-frac83.1%
Simplified83.1%
if 8.7999999999999995e148 < k Initial program 47.4%
Simplified50.3%
unpow250.3%
clear-num50.3%
un-div-inv50.3%
Applied egg-rr50.3%
add-cube-cbrt50.3%
pow350.3%
associate-/l/47.4%
cbrt-div47.4%
unpow347.4%
add-cbrt-cube64.1%
cbrt-unprod66.9%
unpow266.9%
div-inv66.9%
unpow-prod-down47.4%
pow-flip47.4%
metadata-eval47.4%
Applied egg-rr47.4%
cube-prod66.9%
Simplified69.5%
Final simplification50.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ (pow t_m 1.5) l)))
(*
t_s
(if (<= k 1.36e-18)
(/ 2.0 (pow (* t_2 (* k (hypot 1.0 (hypot 1.0 (/ k t_m))))) 2.0))
(if (<= k 1.5e+159)
(*
2.0
(* (/ (pow l 2.0) (* t_m (pow k 2.0))) (/ (cos k) (pow (sin k) 2.0))))
(/
2.0
(*
(pow t_2 2.0)
(* (+ 2.0 (pow (/ k t_m) 2.0)) (* (sin k) (tan 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(t_m, 1.5) / l;
double tmp;
if (k <= 1.36e-18) {
tmp = 2.0 / pow((t_2 * (k * hypot(1.0, hypot(1.0, (k / t_m))))), 2.0);
} else if (k <= 1.5e+159) {
tmp = 2.0 * ((pow(l, 2.0) / (t_m * pow(k, 2.0))) * (cos(k) / pow(sin(k), 2.0)));
} else {
tmp = 2.0 / (pow(t_2, 2.0) * ((2.0 + pow((k / t_m), 2.0)) * (sin(k) * tan(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(t_m, 1.5) / l;
double tmp;
if (k <= 1.36e-18) {
tmp = 2.0 / Math.pow((t_2 * (k * Math.hypot(1.0, Math.hypot(1.0, (k / t_m))))), 2.0);
} else if (k <= 1.5e+159) {
tmp = 2.0 * ((Math.pow(l, 2.0) / (t_m * Math.pow(k, 2.0))) * (Math.cos(k) / Math.pow(Math.sin(k), 2.0)));
} else {
tmp = 2.0 / (Math.pow(t_2, 2.0) * ((2.0 + Math.pow((k / t_m), 2.0)) * (Math.sin(k) * Math.tan(k))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = math.pow(t_m, 1.5) / l tmp = 0 if k <= 1.36e-18: tmp = 2.0 / math.pow((t_2 * (k * math.hypot(1.0, math.hypot(1.0, (k / t_m))))), 2.0) elif k <= 1.5e+159: tmp = 2.0 * ((math.pow(l, 2.0) / (t_m * math.pow(k, 2.0))) * (math.cos(k) / math.pow(math.sin(k), 2.0))) else: tmp = 2.0 / (math.pow(t_2, 2.0) * ((2.0 + math.pow((k / t_m), 2.0)) * (math.sin(k) * math.tan(k)))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64((t_m ^ 1.5) / l) tmp = 0.0 if (k <= 1.36e-18) tmp = Float64(2.0 / (Float64(t_2 * Float64(k * hypot(1.0, hypot(1.0, Float64(k / t_m))))) ^ 2.0)); elseif (k <= 1.5e+159) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / Float64(t_m * (k ^ 2.0))) * Float64(cos(k) / (sin(k) ^ 2.0)))); else tmp = Float64(2.0 / Float64((t_2 ^ 2.0) * Float64(Float64(2.0 + (Float64(k / t_m) ^ 2.0)) * Float64(sin(k) * tan(k))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = (t_m ^ 1.5) / l; tmp = 0.0; if (k <= 1.36e-18) tmp = 2.0 / ((t_2 * (k * hypot(1.0, hypot(1.0, (k / t_m))))) ^ 2.0); elseif (k <= 1.5e+159) tmp = 2.0 * (((l ^ 2.0) / (t_m * (k ^ 2.0))) * (cos(k) / (sin(k) ^ 2.0))); else tmp = 2.0 / ((t_2 ^ 2.0) * ((2.0 + ((k / t_m) ^ 2.0)) * (sin(k) * tan(k)))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 1.36e-18], N[(2.0 / N[Power[N[(t$95$2 * N[(k * N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.5e+159], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[t$95$2, 2.0], $MachinePrecision] * N[(N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{{t\_m}^{1.5}}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.36 \cdot 10^{-18}:\\
\;\;\;\;\frac{2}{{\left(t\_2 \cdot \left(k \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\right)\right)}^{2}}\\
\mathbf{elif}\;k \leq 1.5 \cdot 10^{+159}:\\
\;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{t\_m \cdot {k}^{2}} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{t\_2}^{2} \cdot \left(\left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right) \cdot \left(\sin k \cdot \tan k\right)\right)}\\
\end{array}
\end{array}
\end{array}
if k < 1.3600000000000001e-18Initial program 53.1%
Simplified53.1%
Applied egg-rr34.6%
Taylor expanded in k around 0 40.1%
if 1.3600000000000001e-18 < k < 1.5000000000000001e159Initial program 43.5%
associate-/r*43.5%
+-commutative43.5%
unpow243.5%
sqr-neg43.5%
distribute-frac-neg243.5%
distribute-frac-neg243.5%
unpow243.5%
+-commutative43.5%
associate-*l*43.5%
associate-*l/43.5%
associate-/r/43.5%
+-commutative43.5%
associate-+r+43.5%
Simplified43.5%
Taylor expanded in t around 0 81.3%
associate-*r*81.3%
times-frac81.6%
Simplified81.6%
if 1.5000000000000001e159 < k Initial program 50.2%
Simplified50.2%
Applied egg-rr23.4%
*-un-lft-identity23.4%
unpow-prod-down17.8%
unpow-prod-down17.8%
Applied egg-rr38.4%
*-lft-identity38.4%
Simplified38.4%
Final simplification46.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 1.36e-18)
(/
2.0
(pow (* (/ (pow t_m 1.5) l) (* k (hypot 1.0 (hypot 1.0 (/ k t_m))))) 2.0))
(if (<= k 1.35e+154)
(*
2.0
(* (/ (pow l 2.0) (* t_m (pow k 2.0))) (/ (cos k) (pow (sin k) 2.0))))
(/
2.0
(/ (pow (* (/ t_m (cbrt l)) (cbrt (* 2.0 (pow k 2.0)))) 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 <= 1.36e-18) {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * hypot(1.0, hypot(1.0, (k / t_m))))), 2.0);
} else if (k <= 1.35e+154) {
tmp = 2.0 * ((pow(l, 2.0) / (t_m * pow(k, 2.0))) * (cos(k) / pow(sin(k), 2.0)));
} else {
tmp = 2.0 / (pow(((t_m / cbrt(l)) * cbrt((2.0 * pow(k, 2.0)))), 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 <= 1.36e-18) {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.hypot(1.0, Math.hypot(1.0, (k / t_m))))), 2.0);
} else if (k <= 1.35e+154) {
tmp = 2.0 * ((Math.pow(l, 2.0) / (t_m * Math.pow(k, 2.0))) * (Math.cos(k) / Math.pow(Math.sin(k), 2.0)));
} else {
tmp = 2.0 / (Math.pow(((t_m / Math.cbrt(l)) * Math.cbrt((2.0 * Math.pow(k, 2.0)))), 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 <= 1.36e-18) tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * hypot(1.0, hypot(1.0, Float64(k / t_m))))) ^ 2.0)); elseif (k <= 1.35e+154) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / Float64(t_m * (k ^ 2.0))) * Float64(cos(k) / (sin(k) ^ 2.0)))); else tmp = Float64(2.0 / Float64((Float64(Float64(t_m / cbrt(l)) * cbrt(Float64(2.0 * (k ^ 2.0)))) ^ 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, 1.36e-18], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.35e+154], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision] * N[Power[N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $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 1.36 \cdot 10^{-18}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\right)\right)}^{2}}\\
\mathbf{elif}\;k \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{t\_m \cdot {k}^{2}} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{\left(\frac{t\_m}{\sqrt[3]{\ell}} \cdot \sqrt[3]{2 \cdot {k}^{2}}\right)}^{3}}{\ell}}\\
\end{array}
\end{array}
if k < 1.3600000000000001e-18Initial program 53.1%
Simplified53.1%
Applied egg-rr34.6%
Taylor expanded in k around 0 40.1%
if 1.3600000000000001e-18 < k < 1.35000000000000003e154Initial program 44.6%
associate-/r*44.6%
+-commutative44.6%
unpow244.6%
sqr-neg44.6%
distribute-frac-neg244.6%
distribute-frac-neg244.6%
unpow244.6%
+-commutative44.6%
associate-*l*44.6%
associate-*l/44.7%
associate-/r/44.6%
+-commutative44.6%
associate-+r+44.6%
Simplified44.6%
Taylor expanded in t around 0 80.8%
associate-*r*80.8%
times-frac81.1%
Simplified81.1%
if 1.35000000000000003e154 < k Initial program 48.7%
Simplified51.7%
Taylor expanded in k around 0 51.7%
div-inv51.7%
metadata-eval51.7%
pow-prod-up28.8%
associate-*r*31.7%
associate-*l/31.8%
associate-*r*28.9%
pow-prod-up51.8%
metadata-eval51.8%
div-inv51.8%
Applied egg-rr51.8%
add-cube-cbrt51.8%
pow351.8%
cbrt-prod51.8%
cbrt-div51.9%
rem-cbrt-cube72.4%
Applied egg-rr72.4%
Final simplification50.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (* k (sin k))) (t_3 (sqrt (/ t_m (cos k)))))
(*
t_s
(if (<= t_m 5.8e-155)
(/ 2.0 (pow (* t_3 (/ t_2 l)) 2.0))
(if (<= t_m 1.9e-69)
(/
2.0
(*
(* (* (sin k) (tan k)) (+ 2.0 (/ (/ k t_m) (/ t_m k))))
(* (/ (pow t_m 2.0) l) (/ t_m l))))
(if (<= t_m 3.4e-65)
(/ 2.0 (pow (/ (* t_3 t_2) l) 2.0))
(if (<= t_m 2.1e+93)
(/ 2.0 (pow (* (/ (* (sqrt 2.0) k) l) (sqrt (pow t_m 3.0))) 2.0))
(/
2.0
(*
(pow (* (/ t_m (pow (cbrt l) 2.0)) (cbrt k)) 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 = k * sin(k);
double t_3 = sqrt((t_m / cos(k)));
double tmp;
if (t_m <= 5.8e-155) {
tmp = 2.0 / pow((t_3 * (t_2 / l)), 2.0);
} else if (t_m <= 1.9e-69) {
tmp = 2.0 / (((sin(k) * tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))) * ((pow(t_m, 2.0) / l) * (t_m / l)));
} else if (t_m <= 3.4e-65) {
tmp = 2.0 / pow(((t_3 * t_2) / l), 2.0);
} else if (t_m <= 2.1e+93) {
tmp = 2.0 / pow((((sqrt(2.0) * k) / l) * sqrt(pow(t_m, 3.0))), 2.0);
} else {
tmp = 2.0 / (pow(((t_m / pow(cbrt(l), 2.0)) * cbrt(k)), 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 = k * Math.sin(k);
double t_3 = Math.sqrt((t_m / Math.cos(k)));
double tmp;
if (t_m <= 5.8e-155) {
tmp = 2.0 / Math.pow((t_3 * (t_2 / l)), 2.0);
} else if (t_m <= 1.9e-69) {
tmp = 2.0 / (((Math.sin(k) * Math.tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))) * ((Math.pow(t_m, 2.0) / l) * (t_m / l)));
} else if (t_m <= 3.4e-65) {
tmp = 2.0 / Math.pow(((t_3 * t_2) / l), 2.0);
} else if (t_m <= 2.1e+93) {
tmp = 2.0 / Math.pow((((Math.sqrt(2.0) * k) / l) * Math.sqrt(Math.pow(t_m, 3.0))), 2.0);
} else {
tmp = 2.0 / (Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * Math.cbrt(k)), 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 = Float64(k * sin(k)) t_3 = sqrt(Float64(t_m / cos(k))) tmp = 0.0 if (t_m <= 5.8e-155) tmp = Float64(2.0 / (Float64(t_3 * Float64(t_2 / l)) ^ 2.0)); elseif (t_m <= 1.9e-69) tmp = Float64(2.0 / Float64(Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + Float64(Float64(k / t_m) / Float64(t_m / k)))) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l)))); elseif (t_m <= 3.4e-65) tmp = Float64(2.0 / (Float64(Float64(t_3 * t_2) / l) ^ 2.0)); elseif (t_m <= 2.1e+93) tmp = Float64(2.0 / (Float64(Float64(Float64(sqrt(2.0) * k) / l) * sqrt((t_m ^ 3.0))) ^ 2.0)); else tmp = Float64(2.0 / Float64((Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * cbrt(k)) ^ 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[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 5.8e-155], N[(2.0 / N[Power[N[(t$95$3 * N[(t$95$2 / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.9e-69], N[(2.0 / N[(N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.4e-65], N[(2.0 / N[Power[N[(N[(t$95$3 * t$95$2), $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.1e+93], N[(2.0 / N[Power[N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] * k), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Power[t$95$m, 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[k, 1/3], $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 := k \cdot \sin k\\
t_3 := \sqrt{\frac{t\_m}{\cos k}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 5.8 \cdot 10^{-155}:\\
\;\;\;\;\frac{2}{{\left(t\_3 \cdot \frac{t\_2}{\ell}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 1.9 \cdot 10^{-69}:\\
\;\;\;\;\frac{2}{\left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\right) \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)}\\
\mathbf{elif}\;t\_m \leq 3.4 \cdot 10^{-65}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_3 \cdot t\_2}{\ell}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 2.1 \cdot 10^{+93}:\\
\;\;\;\;\frac{2}{{\left(\frac{\sqrt{2} \cdot k}{\ell} \cdot \sqrt{{t\_m}^{3}}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{k}\right)}^{3} \cdot \left(2 \cdot k\right)}\\
\end{array}
\end{array}
\end{array}
if t < 5.80000000000000021e-155Initial program 44.7%
Simplified44.7%
Applied egg-rr11.3%
Taylor expanded in t around 0 40.6%
if 5.80000000000000021e-155 < t < 1.8999999999999999e-69Initial program 32.3%
Simplified38.5%
unpow238.5%
clear-num38.4%
un-div-inv38.5%
Applied egg-rr38.5%
associate-/l/23.0%
unpow323.0%
unpow223.0%
frac-times40.5%
Applied egg-rr61.5%
if 1.8999999999999999e-69 < t < 3.39999999999999987e-65Initial program 34.6%
Simplified34.6%
Applied egg-rr69.7%
Taylor expanded in t around 0 98.7%
associate-*l/99.5%
Simplified99.5%
if 3.39999999999999987e-65 < t < 2.0999999999999998e93Initial program 84.8%
Simplified84.8%
Applied egg-rr64.4%
Taylor expanded in k around 0 87.9%
if 2.0999999999999998e93 < t Initial program 54.9%
Simplified54.9%
add-cube-cbrt54.9%
pow354.9%
*-commutative54.9%
cbrt-prod54.9%
cbrt-div54.9%
rem-cbrt-cube73.7%
cbrt-prod87.5%
pow287.5%
Applied egg-rr87.5%
*-commutative87.5%
Simplified87.5%
Taylor expanded in k around 0 83.2%
*-commutative69.7%
Simplified83.2%
Taylor expanded in k around 0 83.0%
Final simplification57.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 (sqrt (/ t_m (cos k)))))
(*
t_s
(if (<= t_m 8e-156)
(/ 2.0 (pow (* t_2 (* k (/ (sin k) (- l)))) 2.0))
(if (<= t_m 1.1e-69)
(/
2.0
(*
(* (* (sin k) (tan k)) (+ 2.0 (/ (/ k t_m) (/ t_m k))))
(* (/ (pow t_m 2.0) l) (/ t_m l))))
(if (<= t_m 3.4e-65)
(/ 2.0 (pow (/ (* t_2 (* k (sin k))) l) 2.0))
(if (<= t_m 2.1e+93)
(/ 2.0 (pow (* (/ (* (sqrt 2.0) k) l) (sqrt (pow t_m 3.0))) 2.0))
(/
2.0
(*
(pow (* (/ t_m (pow (cbrt l) 2.0)) (cbrt k)) 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 = sqrt((t_m / cos(k)));
double tmp;
if (t_m <= 8e-156) {
tmp = 2.0 / pow((t_2 * (k * (sin(k) / -l))), 2.0);
} else if (t_m <= 1.1e-69) {
tmp = 2.0 / (((sin(k) * tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))) * ((pow(t_m, 2.0) / l) * (t_m / l)));
} else if (t_m <= 3.4e-65) {
tmp = 2.0 / pow(((t_2 * (k * sin(k))) / l), 2.0);
} else if (t_m <= 2.1e+93) {
tmp = 2.0 / pow((((sqrt(2.0) * k) / l) * sqrt(pow(t_m, 3.0))), 2.0);
} else {
tmp = 2.0 / (pow(((t_m / pow(cbrt(l), 2.0)) * cbrt(k)), 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.sqrt((t_m / Math.cos(k)));
double tmp;
if (t_m <= 8e-156) {
tmp = 2.0 / Math.pow((t_2 * (k * (Math.sin(k) / -l))), 2.0);
} else if (t_m <= 1.1e-69) {
tmp = 2.0 / (((Math.sin(k) * Math.tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))) * ((Math.pow(t_m, 2.0) / l) * (t_m / l)));
} else if (t_m <= 3.4e-65) {
tmp = 2.0 / Math.pow(((t_2 * (k * Math.sin(k))) / l), 2.0);
} else if (t_m <= 2.1e+93) {
tmp = 2.0 / Math.pow((((Math.sqrt(2.0) * k) / l) * Math.sqrt(Math.pow(t_m, 3.0))), 2.0);
} else {
tmp = 2.0 / (Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * Math.cbrt(k)), 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 = sqrt(Float64(t_m / cos(k))) tmp = 0.0 if (t_m <= 8e-156) tmp = Float64(2.0 / (Float64(t_2 * Float64(k * Float64(sin(k) / Float64(-l)))) ^ 2.0)); elseif (t_m <= 1.1e-69) tmp = Float64(2.0 / Float64(Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + Float64(Float64(k / t_m) / Float64(t_m / k)))) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l)))); elseif (t_m <= 3.4e-65) tmp = Float64(2.0 / (Float64(Float64(t_2 * Float64(k * sin(k))) / l) ^ 2.0)); elseif (t_m <= 2.1e+93) tmp = Float64(2.0 / (Float64(Float64(Float64(sqrt(2.0) * k) / l) * sqrt((t_m ^ 3.0))) ^ 2.0)); else tmp = Float64(2.0 / Float64((Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * cbrt(k)) ^ 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[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 8e-156], N[(2.0 / N[Power[N[(t$95$2 * N[(k * N[(N[Sin[k], $MachinePrecision] / (-l)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.1e-69], N[(2.0 / N[(N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.4e-65], N[(2.0 / N[Power[N[(N[(t$95$2 * N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.1e+93], N[(2.0 / N[Power[N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] * k), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Power[t$95$m, 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[k, 1/3], $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 := \sqrt{\frac{t\_m}{\cos k}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 8 \cdot 10^{-156}:\\
\;\;\;\;\frac{2}{{\left(t\_2 \cdot \left(k \cdot \frac{\sin k}{-\ell}\right)\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 1.1 \cdot 10^{-69}:\\
\;\;\;\;\frac{2}{\left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\right) \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)}\\
\mathbf{elif}\;t\_m \leq 3.4 \cdot 10^{-65}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_2 \cdot \left(k \cdot \sin k\right)}{\ell}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 2.1 \cdot 10^{+93}:\\
\;\;\;\;\frac{2}{{\left(\frac{\sqrt{2} \cdot k}{\ell} \cdot \sqrt{{t\_m}^{3}}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{k}\right)}^{3} \cdot \left(2 \cdot k\right)}\\
\end{array}
\end{array}
\end{array}
if t < 8.00000000000000032e-156Initial program 44.7%
Simplified44.7%
Applied egg-rr11.3%
Taylor expanded in k around -inf 40.6%
mul-1-neg40.6%
*-commutative40.6%
distribute-rgt-neg-in40.6%
associate-/l*40.6%
Simplified40.6%
if 8.00000000000000032e-156 < t < 1.1e-69Initial program 32.3%
Simplified38.5%
unpow238.5%
clear-num38.4%
un-div-inv38.5%
Applied egg-rr38.5%
associate-/l/23.0%
unpow323.0%
unpow223.0%
frac-times40.5%
Applied egg-rr61.5%
if 1.1e-69 < t < 3.39999999999999987e-65Initial program 34.6%
Simplified34.6%
Applied egg-rr69.7%
Taylor expanded in t around 0 98.7%
associate-*l/99.5%
Simplified99.5%
if 3.39999999999999987e-65 < t < 2.0999999999999998e93Initial program 84.8%
Simplified84.8%
Applied egg-rr64.4%
Taylor expanded in k around 0 87.9%
if 2.0999999999999998e93 < t Initial program 54.9%
Simplified54.9%
add-cube-cbrt54.9%
pow354.9%
*-commutative54.9%
cbrt-prod54.9%
cbrt-div54.9%
rem-cbrt-cube73.7%
cbrt-prod87.5%
pow287.5%
Applied egg-rr87.5%
*-commutative87.5%
Simplified87.5%
Taylor expanded in k around 0 83.2%
*-commutative69.7%
Simplified83.2%
Taylor expanded in k around 0 83.0%
Final simplification57.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 (/ 2.0 (* (* 2.0 k) (pow (* t_m (cbrt (/ k (pow l 2.0)))) 3.0)))))
(*
t_s
(if (<= t_m 1.55e-162)
t_2
(if (<= t_m 4.7e-70)
(/
2.0
(*
(* (* (sin k) (tan k)) (+ 2.0 (/ (/ k t_m) (/ t_m k))))
(* (/ (pow t_m 2.0) l) (/ t_m l))))
(if (<= t_m 2.1e+93)
(/ 2.0 (pow (* (/ (* (sqrt 2.0) k) l) (sqrt (pow t_m 3.0))) 2.0))
(if (<= t_m 1.15e+175)
t_2
(/
2.0
(*
(pow (* t_m (pow (cbrt l) -2.0)) 3.0)
(* 2.0 (pow k 2.0)))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = 2.0 / ((2.0 * k) * pow((t_m * cbrt((k / pow(l, 2.0)))), 3.0));
double tmp;
if (t_m <= 1.55e-162) {
tmp = t_2;
} else if (t_m <= 4.7e-70) {
tmp = 2.0 / (((sin(k) * tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))) * ((pow(t_m, 2.0) / l) * (t_m / l)));
} else if (t_m <= 2.1e+93) {
tmp = 2.0 / pow((((sqrt(2.0) * k) / l) * sqrt(pow(t_m, 3.0))), 2.0);
} else if (t_m <= 1.15e+175) {
tmp = t_2;
} else {
tmp = 2.0 / (pow((t_m * pow(cbrt(l), -2.0)), 3.0) * (2.0 * pow(k, 2.0)));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = 2.0 / ((2.0 * k) * Math.pow((t_m * Math.cbrt((k / Math.pow(l, 2.0)))), 3.0));
double tmp;
if (t_m <= 1.55e-162) {
tmp = t_2;
} else if (t_m <= 4.7e-70) {
tmp = 2.0 / (((Math.sin(k) * Math.tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))) * ((Math.pow(t_m, 2.0) / l) * (t_m / l)));
} else if (t_m <= 2.1e+93) {
tmp = 2.0 / Math.pow((((Math.sqrt(2.0) * k) / l) * Math.sqrt(Math.pow(t_m, 3.0))), 2.0);
} else if (t_m <= 1.15e+175) {
tmp = t_2;
} else {
tmp = 2.0 / (Math.pow((t_m * Math.pow(Math.cbrt(l), -2.0)), 3.0) * (2.0 * Math.pow(k, 2.0)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(t_m * cbrt(Float64(k / (l ^ 2.0)))) ^ 3.0))) tmp = 0.0 if (t_m <= 1.55e-162) tmp = t_2; elseif (t_m <= 4.7e-70) tmp = Float64(2.0 / Float64(Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + Float64(Float64(k / t_m) / Float64(t_m / k)))) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l)))); elseif (t_m <= 2.1e+93) tmp = Float64(2.0 / (Float64(Float64(Float64(sqrt(2.0) * k) / l) * sqrt((t_m ^ 3.0))) ^ 2.0)); elseif (t_m <= 1.15e+175) tmp = t_2; else tmp = Float64(2.0 / Float64((Float64(t_m * (cbrt(l) ^ -2.0)) ^ 3.0) * Float64(2.0 * (k ^ 2.0)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(t$95$m * N[Power[N[(k / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.55e-162], t$95$2, If[LessEqual[t$95$m, 4.7e-70], N[(2.0 / N[(N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.1e+93], N[(2.0 / N[Power[N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] * k), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Power[t$95$m, 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.15e+175], t$95$2, N[(2.0 / N[(N[Power[N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{2}{\left(2 \cdot k\right) \cdot {\left(t\_m \cdot \sqrt[3]{\frac{k}{{\ell}^{2}}}\right)}^{3}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.55 \cdot 10^{-162}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_m \leq 4.7 \cdot 10^{-70}:\\
\;\;\;\;\frac{2}{\left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\right) \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)}\\
\mathbf{elif}\;t\_m \leq 2.1 \cdot 10^{+93}:\\
\;\;\;\;\frac{2}{{\left(\frac{\sqrt{2} \cdot k}{\ell} \cdot \sqrt{{t\_m}^{3}}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 1.15 \cdot 10^{+175}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3} \cdot \left(2 \cdot {k}^{2}\right)}\\
\end{array}
\end{array}
\end{array}
if t < 1.5499999999999999e-162 or 2.0999999999999998e93 < t < 1.15e175Initial program 44.6%
Simplified44.6%
add-cube-cbrt44.6%
pow344.6%
*-commutative44.6%
cbrt-prod44.6%
cbrt-div45.2%
rem-cbrt-cube55.7%
cbrt-prod66.8%
pow266.8%
Applied egg-rr66.8%
*-commutative66.8%
Simplified66.8%
Taylor expanded in k around 0 63.3%
*-commutative58.8%
Simplified63.3%
Taylor expanded in k around 0 59.8%
if 1.5499999999999999e-162 < t < 4.6999999999999998e-70Initial program 32.3%
Simplified38.5%
unpow238.5%
clear-num38.4%
un-div-inv38.5%
Applied egg-rr38.5%
associate-/l/23.0%
unpow323.0%
unpow223.0%
frac-times40.5%
Applied egg-rr61.5%
if 4.6999999999999998e-70 < t < 2.0999999999999998e93Initial program 81.2%
Simplified81.2%
Applied egg-rr64.7%
Taylor expanded in k around 0 84.3%
if 1.15e175 < t Initial program 59.5%
Simplified66.2%
Taylor expanded in k around 0 66.2%
add-cube-cbrt66.2%
pow366.2%
associate-/l/58.9%
cbrt-div58.9%
unpow358.9%
add-cbrt-cube62.6%
cbrt-unprod72.9%
unpow272.9%
div-inv72.9%
unpow-prod-down58.9%
pow-flip58.9%
metadata-eval58.9%
Applied egg-rr58.9%
cube-prod72.9%
Simplified72.9%
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
(let* ((t_2 (/ 2.0 (pow (* (sqrt (/ t_m (cos k))) (/ (* k (sin k)) l)) 2.0))))
(*
t_s
(if (<= t_m 4.2e-155)
t_2
(if (<= t_m 3.8e-70)
(/
2.0
(*
(* (* (sin k) (tan k)) (+ 2.0 (/ (/ k t_m) (/ t_m k))))
(* (/ (pow t_m 2.0) l) (/ t_m l))))
(if (<= t_m 6.2e-64)
t_2
(if (<= t_m 2.1e+93)
(/ 2.0 (pow (* (/ (* (sqrt 2.0) k) l) (sqrt (pow t_m 3.0))) 2.0))
(/
2.0
(*
(pow (* t_m (pow (cbrt l) -2.0)) 3.0)
(* 2.0 (pow k 2.0)))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = 2.0 / pow((sqrt((t_m / cos(k))) * ((k * sin(k)) / l)), 2.0);
double tmp;
if (t_m <= 4.2e-155) {
tmp = t_2;
} else if (t_m <= 3.8e-70) {
tmp = 2.0 / (((sin(k) * tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))) * ((pow(t_m, 2.0) / l) * (t_m / l)));
} else if (t_m <= 6.2e-64) {
tmp = t_2;
} else if (t_m <= 2.1e+93) {
tmp = 2.0 / pow((((sqrt(2.0) * k) / l) * sqrt(pow(t_m, 3.0))), 2.0);
} else {
tmp = 2.0 / (pow((t_m * pow(cbrt(l), -2.0)), 3.0) * (2.0 * pow(k, 2.0)));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = 2.0 / Math.pow((Math.sqrt((t_m / Math.cos(k))) * ((k * Math.sin(k)) / l)), 2.0);
double tmp;
if (t_m <= 4.2e-155) {
tmp = t_2;
} else if (t_m <= 3.8e-70) {
tmp = 2.0 / (((Math.sin(k) * Math.tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))) * ((Math.pow(t_m, 2.0) / l) * (t_m / l)));
} else if (t_m <= 6.2e-64) {
tmp = t_2;
} else if (t_m <= 2.1e+93) {
tmp = 2.0 / Math.pow((((Math.sqrt(2.0) * k) / l) * Math.sqrt(Math.pow(t_m, 3.0))), 2.0);
} else {
tmp = 2.0 / (Math.pow((t_m * Math.pow(Math.cbrt(l), -2.0)), 3.0) * (2.0 * Math.pow(k, 2.0)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(2.0 / (Float64(sqrt(Float64(t_m / cos(k))) * Float64(Float64(k * sin(k)) / l)) ^ 2.0)) tmp = 0.0 if (t_m <= 4.2e-155) tmp = t_2; elseif (t_m <= 3.8e-70) tmp = Float64(2.0 / Float64(Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + Float64(Float64(k / t_m) / Float64(t_m / k)))) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l)))); elseif (t_m <= 6.2e-64) tmp = t_2; elseif (t_m <= 2.1e+93) tmp = Float64(2.0 / (Float64(Float64(Float64(sqrt(2.0) * k) / l) * sqrt((t_m ^ 3.0))) ^ 2.0)); else tmp = Float64(2.0 / Float64((Float64(t_m * (cbrt(l) ^ -2.0)) ^ 3.0) * Float64(2.0 * (k ^ 2.0)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(2.0 / N[Power[N[(N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 4.2e-155], t$95$2, If[LessEqual[t$95$m, 3.8e-70], N[(2.0 / N[(N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 6.2e-64], t$95$2, If[LessEqual[t$95$m, 2.1e+93], N[(2.0 / N[Power[N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] * k), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Power[t$95$m, 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{2}{{\left(\sqrt{\frac{t\_m}{\cos k}} \cdot \frac{k \cdot \sin k}{\ell}\right)}^{2}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.2 \cdot 10^{-155}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_m \leq 3.8 \cdot 10^{-70}:\\
\;\;\;\;\frac{2}{\left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\right) \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)}\\
\mathbf{elif}\;t\_m \leq 6.2 \cdot 10^{-64}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_m \leq 2.1 \cdot 10^{+93}:\\
\;\;\;\;\frac{2}{{\left(\frac{\sqrt{2} \cdot k}{\ell} \cdot \sqrt{{t\_m}^{3}}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3} \cdot \left(2 \cdot {k}^{2}\right)}\\
\end{array}
\end{array}
\end{array}
if t < 4.2000000000000003e-155 or 3.7999999999999998e-70 < t < 6.20000000000000049e-64Initial program 44.5%
Simplified44.5%
Applied egg-rr12.5%
Taylor expanded in t around 0 41.7%
if 4.2000000000000003e-155 < t < 3.7999999999999998e-70Initial program 32.3%
Simplified38.5%
unpow238.5%
clear-num38.4%
un-div-inv38.5%
Applied egg-rr38.5%
associate-/l/23.0%
unpow323.0%
unpow223.0%
frac-times40.5%
Applied egg-rr61.5%
if 6.20000000000000049e-64 < t < 2.0999999999999998e93Initial program 84.8%
Simplified84.8%
Applied egg-rr64.4%
Taylor expanded in k around 0 87.9%
if 2.0999999999999998e93 < t Initial program 54.9%
Simplified59.4%
Taylor expanded in k around 0 59.4%
add-cube-cbrt59.4%
pow359.4%
associate-/l/54.2%
cbrt-div54.2%
unpow354.2%
add-cbrt-cube61.7%
cbrt-unprod69.0%
unpow269.0%
div-inv69.0%
unpow-prod-down54.2%
pow-flip54.2%
metadata-eval54.2%
Applied egg-rr54.2%
cube-prod69.0%
Simplified69.0%
Final simplification54.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 (* k (sin k))) (t_3 (sqrt (/ t_m (cos k)))))
(*
t_s
(if (<= t_m 5.6e-155)
(/ 2.0 (pow (* t_3 (/ t_2 l)) 2.0))
(if (<= t_m 5.4e-70)
(/
2.0
(*
(* (* (sin k) (tan k)) (+ 2.0 (/ (/ k t_m) (/ t_m k))))
(* (/ (pow t_m 2.0) l) (/ t_m l))))
(if (<= t_m 1.55e-63)
(/ 2.0 (pow (/ (* t_3 t_2) l) 2.0))
(if (<= t_m 2.1e+93)
(/ 2.0 (pow (* (/ (* (sqrt 2.0) k) l) (sqrt (pow t_m 3.0))) 2.0))
(/
2.0
(*
(pow (* t_m (pow (cbrt l) -2.0)) 3.0)
(* 2.0 (pow k 2.0)))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = k * sin(k);
double t_3 = sqrt((t_m / cos(k)));
double tmp;
if (t_m <= 5.6e-155) {
tmp = 2.0 / pow((t_3 * (t_2 / l)), 2.0);
} else if (t_m <= 5.4e-70) {
tmp = 2.0 / (((sin(k) * tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))) * ((pow(t_m, 2.0) / l) * (t_m / l)));
} else if (t_m <= 1.55e-63) {
tmp = 2.0 / pow(((t_3 * t_2) / l), 2.0);
} else if (t_m <= 2.1e+93) {
tmp = 2.0 / pow((((sqrt(2.0) * k) / l) * sqrt(pow(t_m, 3.0))), 2.0);
} else {
tmp = 2.0 / (pow((t_m * pow(cbrt(l), -2.0)), 3.0) * (2.0 * pow(k, 2.0)));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = k * Math.sin(k);
double t_3 = Math.sqrt((t_m / Math.cos(k)));
double tmp;
if (t_m <= 5.6e-155) {
tmp = 2.0 / Math.pow((t_3 * (t_2 / l)), 2.0);
} else if (t_m <= 5.4e-70) {
tmp = 2.0 / (((Math.sin(k) * Math.tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))) * ((Math.pow(t_m, 2.0) / l) * (t_m / l)));
} else if (t_m <= 1.55e-63) {
tmp = 2.0 / Math.pow(((t_3 * t_2) / l), 2.0);
} else if (t_m <= 2.1e+93) {
tmp = 2.0 / Math.pow((((Math.sqrt(2.0) * k) / l) * Math.sqrt(Math.pow(t_m, 3.0))), 2.0);
} else {
tmp = 2.0 / (Math.pow((t_m * Math.pow(Math.cbrt(l), -2.0)), 3.0) * (2.0 * Math.pow(k, 2.0)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(k * sin(k)) t_3 = sqrt(Float64(t_m / cos(k))) tmp = 0.0 if (t_m <= 5.6e-155) tmp = Float64(2.0 / (Float64(t_3 * Float64(t_2 / l)) ^ 2.0)); elseif (t_m <= 5.4e-70) tmp = Float64(2.0 / Float64(Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + Float64(Float64(k / t_m) / Float64(t_m / k)))) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l)))); elseif (t_m <= 1.55e-63) tmp = Float64(2.0 / (Float64(Float64(t_3 * t_2) / l) ^ 2.0)); elseif (t_m <= 2.1e+93) tmp = Float64(2.0 / (Float64(Float64(Float64(sqrt(2.0) * k) / l) * sqrt((t_m ^ 3.0))) ^ 2.0)); else tmp = Float64(2.0 / Float64((Float64(t_m * (cbrt(l) ^ -2.0)) ^ 3.0) * Float64(2.0 * (k ^ 2.0)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 5.6e-155], N[(2.0 / N[Power[N[(t$95$3 * N[(t$95$2 / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.4e-70], N[(2.0 / N[(N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.55e-63], N[(2.0 / N[Power[N[(N[(t$95$3 * t$95$2), $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.1e+93], N[(2.0 / N[Power[N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] * k), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Power[t$95$m, 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := k \cdot \sin k\\
t_3 := \sqrt{\frac{t\_m}{\cos k}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 5.6 \cdot 10^{-155}:\\
\;\;\;\;\frac{2}{{\left(t\_3 \cdot \frac{t\_2}{\ell}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 5.4 \cdot 10^{-70}:\\
\;\;\;\;\frac{2}{\left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\right) \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)}\\
\mathbf{elif}\;t\_m \leq 1.55 \cdot 10^{-63}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_3 \cdot t\_2}{\ell}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 2.1 \cdot 10^{+93}:\\
\;\;\;\;\frac{2}{{\left(\frac{\sqrt{2} \cdot k}{\ell} \cdot \sqrt{{t\_m}^{3}}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3} \cdot \left(2 \cdot {k}^{2}\right)}\\
\end{array}
\end{array}
\end{array}
if t < 5.5999999999999999e-155Initial program 44.7%
Simplified44.7%
Applied egg-rr11.3%
Taylor expanded in t around 0 40.6%
if 5.5999999999999999e-155 < t < 5.4000000000000003e-70Initial program 32.3%
Simplified38.5%
unpow238.5%
clear-num38.4%
un-div-inv38.5%
Applied egg-rr38.5%
associate-/l/23.0%
unpow323.0%
unpow223.0%
frac-times40.5%
Applied egg-rr61.5%
if 5.4000000000000003e-70 < t < 1.54999999999999992e-63Initial program 34.6%
Simplified34.6%
Applied egg-rr69.7%
Taylor expanded in t around 0 98.7%
associate-*l/99.5%
Simplified99.5%
if 1.54999999999999992e-63 < t < 2.0999999999999998e93Initial program 84.8%
Simplified84.8%
Applied egg-rr64.4%
Taylor expanded in k around 0 87.9%
if 2.0999999999999998e93 < t Initial program 54.9%
Simplified59.4%
Taylor expanded in k around 0 59.4%
add-cube-cbrt59.4%
pow359.4%
associate-/l/54.2%
cbrt-div54.2%
unpow354.2%
add-cbrt-cube61.7%
cbrt-unprod69.0%
unpow269.0%
div-inv69.0%
unpow-prod-down54.2%
pow-flip54.2%
metadata-eval54.2%
Applied egg-rr54.2%
cube-prod69.0%
Simplified69.0%
Final simplification54.9%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (* (/ (pow t_m 2.0) l) (/ t_m l))))
(*
t_s
(if (<= t_m 2.9e-162)
(/ 2.0 (* (* 2.0 k) (pow (* t_m (cbrt (/ k (pow l 2.0)))) 3.0)))
(if (<= t_m 5e-70)
(/ 2.0 (* (* (* (sin k) (tan k)) (+ 2.0 (/ (/ k t_m) (/ t_m k)))) t_2))
(if (<= t_m 2e+93)
(/ 2.0 (pow (* (sqrt (pow t_m 3.0)) (* k (/ (sqrt 2.0) l))) 2.0))
(/ 2.0 (* (* 2.0 k) (* (sin k) t_2)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = (pow(t_m, 2.0) / l) * (t_m / l);
double tmp;
if (t_m <= 2.9e-162) {
tmp = 2.0 / ((2.0 * k) * pow((t_m * cbrt((k / pow(l, 2.0)))), 3.0));
} else if (t_m <= 5e-70) {
tmp = 2.0 / (((sin(k) * tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))) * t_2);
} else if (t_m <= 2e+93) {
tmp = 2.0 / pow((sqrt(pow(t_m, 3.0)) * (k * (sqrt(2.0) / l))), 2.0);
} else {
tmp = 2.0 / ((2.0 * k) * (sin(k) * t_2));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = (Math.pow(t_m, 2.0) / l) * (t_m / l);
double tmp;
if (t_m <= 2.9e-162) {
tmp = 2.0 / ((2.0 * k) * Math.pow((t_m * Math.cbrt((k / Math.pow(l, 2.0)))), 3.0));
} else if (t_m <= 5e-70) {
tmp = 2.0 / (((Math.sin(k) * Math.tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))) * t_2);
} else if (t_m <= 2e+93) {
tmp = 2.0 / Math.pow((Math.sqrt(Math.pow(t_m, 3.0)) * (k * (Math.sqrt(2.0) / l))), 2.0);
} else {
tmp = 2.0 / ((2.0 * k) * (Math.sin(k) * t_2));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l)) tmp = 0.0 if (t_m <= 2.9e-162) tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(t_m * cbrt(Float64(k / (l ^ 2.0)))) ^ 3.0))); elseif (t_m <= 5e-70) tmp = Float64(2.0 / Float64(Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + Float64(Float64(k / t_m) / Float64(t_m / k)))) * t_2)); elseif (t_m <= 2e+93) tmp = Float64(2.0 / (Float64(sqrt((t_m ^ 3.0)) * Float64(k * Float64(sqrt(2.0) / l))) ^ 2.0)); else tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(sin(k) * t_2))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.9e-162], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(t$95$m * N[Power[N[(k / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5e-70], N[(2.0 / N[(N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2e+93], N[(2.0 / N[Power[N[(N[Sqrt[N[Power[t$95$m, 3.0], $MachinePrecision]], $MachinePrecision] * N[(k * N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.9 \cdot 10^{-162}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(t\_m \cdot \sqrt[3]{\frac{k}{{\ell}^{2}}}\right)}^{3}}\\
\mathbf{elif}\;t\_m \leq 5 \cdot 10^{-70}:\\
\;\;\;\;\frac{2}{\left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\right) \cdot t\_2}\\
\mathbf{elif}\;t\_m \leq 2 \cdot 10^{+93}:\\
\;\;\;\;\frac{2}{{\left(\sqrt{{t\_m}^{3}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot t\_2\right)}\\
\end{array}
\end{array}
\end{array}
if t < 2.9000000000000001e-162Initial program 44.7%
Simplified44.7%
add-cube-cbrt44.7%
pow344.7%
*-commutative44.7%
cbrt-prod44.7%
cbrt-div45.3%
rem-cbrt-cube54.1%
cbrt-prod65.5%
pow265.5%
Applied egg-rr65.5%
*-commutative65.5%
Simplified65.5%
Taylor expanded in k around 0 62.3%
*-commutative57.4%
Simplified62.3%
Taylor expanded in k around 0 58.5%
if 2.9000000000000001e-162 < t < 4.9999999999999998e-70Initial program 32.3%
Simplified38.5%
unpow238.5%
clear-num38.4%
un-div-inv38.5%
Applied egg-rr38.5%
associate-/l/23.0%
unpow323.0%
unpow223.0%
frac-times40.5%
Applied egg-rr61.5%
if 4.9999999999999998e-70 < t < 2.00000000000000009e93Initial program 81.2%
Simplified81.2%
Applied egg-rr64.7%
Taylor expanded in k around 0 84.3%
associate-/l*84.2%
Simplified84.2%
if 2.00000000000000009e93 < t Initial program 54.9%
Simplified54.9%
unpow354.9%
times-frac71.9%
pow271.9%
Applied egg-rr71.9%
Taylor expanded in k around 0 69.7%
*-commutative69.7%
Simplified69.7%
Final simplification64.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (* (/ (pow t_m 2.0) l) (/ t_m l))))
(*
t_s
(if (<= t_m 8.2e-163)
(/ 2.0 (* (* 2.0 k) (pow (* t_m (cbrt (/ k (pow l 2.0)))) 3.0)))
(if (<= t_m 1.9e-69)
(/ 2.0 (* (* (* (sin k) (tan k)) (+ 2.0 (/ (/ k t_m) (/ t_m k)))) t_2))
(if (<= t_m 2.1e+93)
(/ 2.0 (pow (* (/ (* (sqrt 2.0) k) l) (sqrt (pow t_m 3.0))) 2.0))
(/ 2.0 (* (* 2.0 k) (* (sin k) t_2)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = (pow(t_m, 2.0) / l) * (t_m / l);
double tmp;
if (t_m <= 8.2e-163) {
tmp = 2.0 / ((2.0 * k) * pow((t_m * cbrt((k / pow(l, 2.0)))), 3.0));
} else if (t_m <= 1.9e-69) {
tmp = 2.0 / (((sin(k) * tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))) * t_2);
} else if (t_m <= 2.1e+93) {
tmp = 2.0 / pow((((sqrt(2.0) * k) / l) * sqrt(pow(t_m, 3.0))), 2.0);
} else {
tmp = 2.0 / ((2.0 * k) * (sin(k) * t_2));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = (Math.pow(t_m, 2.0) / l) * (t_m / l);
double tmp;
if (t_m <= 8.2e-163) {
tmp = 2.0 / ((2.0 * k) * Math.pow((t_m * Math.cbrt((k / Math.pow(l, 2.0)))), 3.0));
} else if (t_m <= 1.9e-69) {
tmp = 2.0 / (((Math.sin(k) * Math.tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))) * t_2);
} else if (t_m <= 2.1e+93) {
tmp = 2.0 / Math.pow((((Math.sqrt(2.0) * k) / l) * Math.sqrt(Math.pow(t_m, 3.0))), 2.0);
} else {
tmp = 2.0 / ((2.0 * k) * (Math.sin(k) * t_2));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l)) tmp = 0.0 if (t_m <= 8.2e-163) tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(t_m * cbrt(Float64(k / (l ^ 2.0)))) ^ 3.0))); elseif (t_m <= 1.9e-69) tmp = Float64(2.0 / Float64(Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + Float64(Float64(k / t_m) / Float64(t_m / k)))) * t_2)); elseif (t_m <= 2.1e+93) tmp = Float64(2.0 / (Float64(Float64(Float64(sqrt(2.0) * k) / l) * sqrt((t_m ^ 3.0))) ^ 2.0)); else tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(sin(k) * t_2))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 8.2e-163], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(t$95$m * N[Power[N[(k / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.9e-69], N[(2.0 / N[(N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.1e+93], N[(2.0 / N[Power[N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] * k), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Power[t$95$m, 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 8.2 \cdot 10^{-163}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(t\_m \cdot \sqrt[3]{\frac{k}{{\ell}^{2}}}\right)}^{3}}\\
\mathbf{elif}\;t\_m \leq 1.9 \cdot 10^{-69}:\\
\;\;\;\;\frac{2}{\left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\right) \cdot t\_2}\\
\mathbf{elif}\;t\_m \leq 2.1 \cdot 10^{+93}:\\
\;\;\;\;\frac{2}{{\left(\frac{\sqrt{2} \cdot k}{\ell} \cdot \sqrt{{t\_m}^{3}}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot t\_2\right)}\\
\end{array}
\end{array}
\end{array}
if t < 8.19999999999999965e-163Initial program 44.7%
Simplified44.7%
add-cube-cbrt44.7%
pow344.7%
*-commutative44.7%
cbrt-prod44.7%
cbrt-div45.3%
rem-cbrt-cube54.1%
cbrt-prod65.5%
pow265.5%
Applied egg-rr65.5%
*-commutative65.5%
Simplified65.5%
Taylor expanded in k around 0 62.3%
*-commutative57.4%
Simplified62.3%
Taylor expanded in k around 0 58.5%
if 8.19999999999999965e-163 < t < 1.8999999999999999e-69Initial program 32.3%
Simplified38.5%
unpow238.5%
clear-num38.4%
un-div-inv38.5%
Applied egg-rr38.5%
associate-/l/23.0%
unpow323.0%
unpow223.0%
frac-times40.5%
Applied egg-rr61.5%
if 1.8999999999999999e-69 < t < 2.0999999999999998e93Initial program 81.2%
Simplified81.2%
Applied egg-rr64.7%
Taylor expanded in k around 0 84.3%
if 2.0999999999999998e93 < t Initial program 54.9%
Simplified54.9%
unpow354.9%
times-frac71.9%
pow271.9%
Applied egg-rr71.9%
Taylor expanded in k around 0 69.7%
*-commutative69.7%
Simplified69.7%
Final simplification64.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (* (/ (pow t_m 2.0) l) (/ t_m l))))
(*
t_s
(if (<= k 3.45e+44)
(/ 2.0 (* (* 2.0 k) (* (sin k) t_2)))
(/
2.0
(* (* (* (sin k) (tan k)) (+ 2.0 (/ (/ k t_m) (/ t_m k)))) t_2))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = (pow(t_m, 2.0) / l) * (t_m / l);
double tmp;
if (k <= 3.45e+44) {
tmp = 2.0 / ((2.0 * k) * (sin(k) * t_2));
} else {
tmp = 2.0 / (((sin(k) * tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))) * t_2);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: tmp
t_2 = ((t_m ** 2.0d0) / l) * (t_m / l)
if (k <= 3.45d+44) then
tmp = 2.0d0 / ((2.0d0 * k) * (sin(k) * t_2))
else
tmp = 2.0d0 / (((sin(k) * tan(k)) * (2.0d0 + ((k / t_m) / (t_m / k)))) * t_2)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = (Math.pow(t_m, 2.0) / l) * (t_m / l);
double tmp;
if (k <= 3.45e+44) {
tmp = 2.0 / ((2.0 * k) * (Math.sin(k) * t_2));
} else {
tmp = 2.0 / (((Math.sin(k) * Math.tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))) * t_2);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = (math.pow(t_m, 2.0) / l) * (t_m / l) tmp = 0 if k <= 3.45e+44: tmp = 2.0 / ((2.0 * k) * (math.sin(k) * t_2)) else: tmp = 2.0 / (((math.sin(k) * math.tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))) * t_2) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l)) tmp = 0.0 if (k <= 3.45e+44) tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(sin(k) * t_2))); else tmp = Float64(2.0 / Float64(Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + Float64(Float64(k / t_m) / Float64(t_m / k)))) * t_2)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = ((t_m ^ 2.0) / l) * (t_m / l); tmp = 0.0; if (k <= 3.45e+44) tmp = 2.0 / ((2.0 * k) * (sin(k) * t_2)); else tmp = 2.0 / (((sin(k) * tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))) * t_2); 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[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 3.45e+44], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 3.45 \cdot 10^{+44}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot t\_2\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\right) \cdot t\_2}\\
\end{array}
\end{array}
\end{array}
if k < 3.4499999999999999e44Initial program 52.9%
Simplified52.9%
unpow352.9%
times-frac65.1%
pow265.1%
Applied egg-rr65.1%
Taylor expanded in k around 0 63.4%
*-commutative63.4%
Simplified63.4%
if 3.4499999999999999e44 < k Initial program 45.7%
Simplified48.5%
unpow248.5%
clear-num48.5%
un-div-inv48.5%
Applied egg-rr48.5%
associate-/l/44.4%
unpow344.4%
unpow244.4%
frac-times53.0%
Applied egg-rr58.5%
Final simplification62.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 (<= (* l l) 5e+254)
(/ 2.0 (* (* 2.0 k) (pow (* t_m (cbrt (/ k (pow l 2.0)))) 3.0)))
(/ 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 tmp;
if ((l * l) <= 5e+254) {
tmp = 2.0 / ((2.0 * k) * pow((t_m * cbrt((k / pow(l, 2.0)))), 3.0));
} else {
tmp = 2.0 / ((2.0 * k) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / 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 ((l * l) <= 5e+254) {
tmp = 2.0 / ((2.0 * k) * Math.pow((t_m * Math.cbrt((k / Math.pow(l, 2.0)))), 3.0));
} 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) tmp = 0.0 if (Float64(l * l) <= 5e+254) tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(t_m * cbrt(Float64(k / (l ^ 2.0)))) ^ 3.0))); 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 = 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[N[(l * l), $MachinePrecision], 5e+254], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(t$95$m * N[Power[N[(k / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $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)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 5 \cdot 10^{+254}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(t\_m \cdot \sqrt[3]{\frac{k}{{\ell}^{2}}}\right)}^{3}}\\
\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}
if (*.f64 l l) < 4.99999999999999994e254Initial program 55.3%
Simplified55.3%
add-cube-cbrt55.3%
pow355.3%
*-commutative55.3%
cbrt-prod55.2%
cbrt-div55.8%
rem-cbrt-cube66.6%
cbrt-prod74.5%
pow274.5%
Applied egg-rr74.5%
*-commutative74.5%
Simplified74.5%
Taylor expanded in k around 0 64.4%
*-commutative60.3%
Simplified64.4%
Taylor expanded in k around 0 66.4%
if 4.99999999999999994e254 < (*.f64 l l) Initial program 42.4%
Simplified42.4%
unpow342.4%
times-frac57.0%
pow257.0%
Applied egg-rr57.0%
Taylor expanded in k around 0 59.5%
*-commutative59.5%
Simplified59.5%
Final simplification64.2%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 2.0 (* (* 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) {
return t_s * (2.0 / ((2.0 * k) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / l)))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / ((2.0d0 * k) * (sin(k) * (((t_m ** 2.0d0) / l) * (t_m / l)))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((2.0 * k) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / l)))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / ((2.0 * k) * (math.sin(k) * ((math.pow(t_m, 2.0) / l) * (t_m / l)))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64(Float64(2.0 * k) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l)))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / ((2.0 * k) * (sin(k) * (((t_m ^ 2.0) / l) * (t_m / l))))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(2.0 * 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)
\\
t\_s \cdot \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}
Initial program 51.2%
Simplified51.2%
unpow351.2%
times-frac63.6%
pow263.6%
Applied egg-rr63.6%
Taylor expanded in k around 0 60.0%
*-commutative60.0%
Simplified60.0%
Final simplification60.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 (/ 2.0 (* (* 2.0 (pow k 2.0)) (* (/ (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) {
return t_s * (2.0 / ((2.0 * pow(k, 2.0)) * ((pow(t_m, 2.0) / l) * (t_m / l))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / ((2.0d0 * (k ** 2.0d0)) * (((t_m ** 2.0d0) / l) * (t_m / l))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((2.0 * Math.pow(k, 2.0)) * ((Math.pow(t_m, 2.0) / l) * (t_m / l))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / ((2.0 * math.pow(k, 2.0)) * ((math.pow(t_m, 2.0) / l) * (t_m / l))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / ((2.0 * (k ^ 2.0)) * (((t_m ^ 2.0) / l) * (t_m / l)))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)}
\end{array}
Initial program 51.2%
Simplified54.0%
Taylor expanded in k around 0 53.3%
associate-/l/49.9%
unpow349.9%
unpow249.9%
frac-times57.2%
Applied egg-rr57.2%
Final simplification57.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 (* l (/ 2.0 (* (pow t_m 3.0) (* 2.0 (/ (pow k 2.0) l)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (l * (2.0 / (pow(t_m, 3.0) * (2.0 * (pow(k, 2.0) / l)))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (l * (2.0d0 / ((t_m ** 3.0d0) * (2.0d0 * ((k ** 2.0d0) / l)))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (l * (2.0 / (Math.pow(t_m, 3.0) * (2.0 * (Math.pow(k, 2.0) / l)))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (l * (2.0 / (math.pow(t_m, 3.0) * (2.0 * (math.pow(k, 2.0) / l)))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(l * Float64(2.0 / Float64((t_m ^ 3.0) * Float64(2.0 * Float64((k ^ 2.0) / l)))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (l * (2.0 / ((t_m ^ 3.0) * (2.0 * ((k ^ 2.0) / l))))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(l * N[(2.0 / N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(2.0 * N[(N[Power[k, 2.0], $MachinePrecision] / 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 \left(\ell \cdot \frac{2}{{t\_m}^{3} \cdot \left(2 \cdot \frac{{k}^{2}}{\ell}\right)}\right)
\end{array}
Initial program 51.2%
Simplified54.0%
Taylor expanded in k around 0 53.3%
div-inv53.3%
metadata-eval53.3%
pow-prod-up30.9%
associate-*r*32.9%
associate-*l/32.8%
associate-*r*30.8%
pow-prod-up54.0%
metadata-eval54.0%
div-inv54.0%
Applied egg-rr54.0%
associate-/r/53.6%
Applied egg-rr53.6%
*-commutative53.6%
associate-*l/53.7%
associate-/l*53.6%
associate-/l*53.6%
Simplified53.6%
Final simplification53.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 (* l (/ 2.0 (* (/ (pow t_m 3.0) l) (* 2.0 (pow k 2.0)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (l * (2.0 / ((pow(t_m, 3.0) / l) * (2.0 * pow(k, 2.0)))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (l * (2.0d0 / (((t_m ** 3.0d0) / l) * (2.0d0 * (k ** 2.0d0)))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (l * (2.0 / ((Math.pow(t_m, 3.0) / l) * (2.0 * Math.pow(k, 2.0)))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (l * (2.0 / ((math.pow(t_m, 3.0) / l) * (2.0 * math.pow(k, 2.0)))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(l * Float64(2.0 / Float64(Float64((t_m ^ 3.0) / l) * Float64(2.0 * (k ^ 2.0)))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (l * (2.0 / (((t_m ^ 3.0) / l) * (2.0 * (k ^ 2.0))))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(l * N[(2.0 / N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] * N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(\ell \cdot \frac{2}{\frac{{t\_m}^{3}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}\right)
\end{array}
Initial program 51.2%
Simplified54.0%
Taylor expanded in k around 0 53.3%
div-inv53.3%
metadata-eval53.3%
pow-prod-up30.9%
associate-*r*32.9%
associate-*l/32.8%
associate-*r*30.8%
pow-prod-up54.0%
metadata-eval54.0%
div-inv54.0%
Applied egg-rr54.0%
associate-/r/53.6%
Applied egg-rr53.6%
Final simplification53.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 (/ 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) {
return t_s * (2.0 / ((pow(t_m, 3.0) / l) * ((2.0 * pow(k, 2.0)) / l)));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / (((t_m ** 3.0d0) / l) * ((2.0d0 * (k ** 2.0d0)) / l)))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((Math.pow(t_m, 3.0) / l) * ((2.0 * Math.pow(k, 2.0)) / l)));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / ((math.pow(t_m, 3.0) / l) * ((2.0 * math.pow(k, 2.0)) / l)))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64(Float64((t_m ^ 3.0) / l) * Float64(Float64(2.0 * (k ^ 2.0)) / l)))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / (((t_m ^ 3.0) / l) * ((2.0 * (k ^ 2.0)) / l))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(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 \frac{2}{\frac{{t\_m}^{3}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\ell}}
\end{array}
Initial program 51.2%
Simplified54.0%
Taylor expanded in k around 0 53.3%
div-inv53.3%
metadata-eval53.3%
pow-prod-up30.9%
associate-*r*32.9%
associate-*l/32.8%
associate-*r*30.8%
pow-prod-up54.0%
metadata-eval54.0%
div-inv54.0%
Applied egg-rr54.0%
associate-/l*54.0%
Simplified54.0%
Final simplification54.0%
herbie shell --seed 2024059
(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))))