
(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 27 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 (cbrt (sin k)))
(t_3 (* (tan k) (+ 1.0 (+ (pow (/ k t_m) 2.0) 1.0))))
(t_4 (/ l (hypot 1.0 (hypot 1.0 (/ k t_m)))))
(t_5 (* t_4 (* (/ 2.0 (* (pow t_m 3.0) (* (sin k) (tan k)))) t_4)))
(t_6 (pow (cbrt l) 2.0)))
(*
t_s
(if (<= t_m 1.42e-102)
(/
2.0
(/ (* (* t_m (pow k 2.0)) (pow (sin k) 2.0)) (* (pow l 2.0) (cos k))))
(if (<= t_m 4.8e-48)
t_5
(if (<= t_m 5e-22)
(/ 2.0 (* (pow (* (/ t_m t_6) t_2) 3.0) t_3))
(if (<= t_m 8.2e+30)
t_5
(/ 2.0 (* t_3 (pow (/ (* t_m t_2) t_6) 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 = cbrt(sin(k));
double t_3 = tan(k) * (1.0 + (pow((k / t_m), 2.0) + 1.0));
double t_4 = l / hypot(1.0, hypot(1.0, (k / t_m)));
double t_5 = t_4 * ((2.0 / (pow(t_m, 3.0) * (sin(k) * tan(k)))) * t_4);
double t_6 = pow(cbrt(l), 2.0);
double tmp;
if (t_m <= 1.42e-102) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) * pow(sin(k), 2.0)) / (pow(l, 2.0) * cos(k)));
} else if (t_m <= 4.8e-48) {
tmp = t_5;
} else if (t_m <= 5e-22) {
tmp = 2.0 / (pow(((t_m / t_6) * t_2), 3.0) * t_3);
} else if (t_m <= 8.2e+30) {
tmp = t_5;
} else {
tmp = 2.0 / (t_3 * pow(((t_m * t_2) / t_6), 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.cbrt(Math.sin(k));
double t_3 = Math.tan(k) * (1.0 + (Math.pow((k / t_m), 2.0) + 1.0));
double t_4 = l / Math.hypot(1.0, Math.hypot(1.0, (k / t_m)));
double t_5 = t_4 * ((2.0 / (Math.pow(t_m, 3.0) * (Math.sin(k) * Math.tan(k)))) * t_4);
double t_6 = Math.pow(Math.cbrt(l), 2.0);
double tmp;
if (t_m <= 1.42e-102) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) * Math.pow(Math.sin(k), 2.0)) / (Math.pow(l, 2.0) * Math.cos(k)));
} else if (t_m <= 4.8e-48) {
tmp = t_5;
} else if (t_m <= 5e-22) {
tmp = 2.0 / (Math.pow(((t_m / t_6) * t_2), 3.0) * t_3);
} else if (t_m <= 8.2e+30) {
tmp = t_5;
} else {
tmp = 2.0 / (t_3 * Math.pow(((t_m * t_2) / t_6), 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 = cbrt(sin(k)) t_3 = Float64(tan(k) * Float64(1.0 + Float64((Float64(k / t_m) ^ 2.0) + 1.0))) t_4 = Float64(l / hypot(1.0, hypot(1.0, Float64(k / t_m)))) t_5 = Float64(t_4 * Float64(Float64(2.0 / Float64((t_m ^ 3.0) * Float64(sin(k) * tan(k)))) * t_4)) t_6 = cbrt(l) ^ 2.0 tmp = 0.0 if (t_m <= 1.42e-102) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) * (sin(k) ^ 2.0)) / Float64((l ^ 2.0) * cos(k)))); elseif (t_m <= 4.8e-48) tmp = t_5; elseif (t_m <= 5e-22) tmp = Float64(2.0 / Float64((Float64(Float64(t_m / t_6) * t_2) ^ 3.0) * t_3)); elseif (t_m <= 8.2e+30) tmp = t_5; else tmp = Float64(2.0 / Float64(t_3 * (Float64(Float64(t_m * t_2) / t_6) ^ 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], 1/3], $MachinePrecision]}, Block[{t$95$3 = N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(l / N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 * N[(N[(2.0 / N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.42e-102], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.8e-48], t$95$5, If[LessEqual[t$95$m, 5e-22], N[(2.0 / N[(N[Power[N[(N[(t$95$m / t$95$6), $MachinePrecision] * t$95$2), $MachinePrecision], 3.0], $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 8.2e+30], t$95$5, N[(2.0 / N[(t$95$3 * N[Power[N[(N[(t$95$m * t$95$2), $MachinePrecision] / t$95$6), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]]]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \sqrt[3]{\sin k}\\
t_3 := \tan k \cdot \left(1 + \left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right)\right)\\
t_4 := \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)}\\
t_5 := t\_4 \cdot \left(\frac{2}{{t\_m}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot t\_4\right)\\
t_6 := {\left(\sqrt[3]{\ell}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.42 \cdot 10^{-102}:\\
\;\;\;\;\frac{2}{\frac{\left(t\_m \cdot {k}^{2}\right) \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}\\
\mathbf{elif}\;t\_m \leq 4.8 \cdot 10^{-48}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;t\_m \leq 5 \cdot 10^{-22}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{t\_6} \cdot t\_2\right)}^{3} \cdot t\_3}\\
\mathbf{elif}\;t\_m \leq 8.2 \cdot 10^{+30}:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_3 \cdot {\left(\frac{t\_m \cdot t\_2}{t\_6}\right)}^{3}}\\
\end{array}
\end{array}
\end{array}
if t < 1.42000000000000009e-102Initial program 41.3%
Simplified41.3%
Taylor expanded in t around 0 61.9%
associate-*r*61.9%
Simplified61.9%
if 1.42000000000000009e-102 < t < 4.8e-48 or 4.99999999999999954e-22 < t < 8.20000000000000011e30Initial program 61.1%
Simplified57.2%
associate-*r*61.0%
add-sqr-sqrt61.0%
times-frac64.8%
Applied egg-rr84.3%
associate-/l*88.3%
associate-*l*88.3%
Simplified88.3%
if 4.8e-48 < t < 4.99999999999999954e-22Initial program 67.5%
Simplified67.5%
add-cube-cbrt67.5%
pow367.5%
*-commutative67.5%
cbrt-prod67.5%
cbrt-div67.5%
rem-cbrt-cube67.5%
cbrt-prod98.3%
pow298.3%
Applied egg-rr98.3%
if 8.20000000000000011e30 < t Initial program 67.0%
Simplified67.0%
add-cube-cbrt67.0%
pow367.0%
*-commutative67.0%
cbrt-prod67.0%
cbrt-div68.8%
rem-cbrt-cube73.3%
cbrt-prod95.5%
pow295.5%
Applied egg-rr95.5%
associate-*r/95.6%
Applied egg-rr95.6%
Final simplification71.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 (+ 1.0 (+ (pow (/ k t_m) 2.0) 1.0)))
(t_3 (* t_2 (* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l)))))))
(*
t_s
(if (<= t_3 5e-269)
(/ 2.0 (* (* (tan k) t_2) (* (sin k) (* (/ (pow t_m 2.0) l) (/ t_m l)))))
(if (<= t_3 INFINITY)
(/ 2.0 (pow (* (sqrt 2.0) (* k (/ (pow t_m 1.5) l))) 2.0))
(*
2.0
(*
(/ (pow l 2.0) (pow k 2.0))
(/ (cos k) (* t_m (pow (sin k) 2.0))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = 1.0 + (pow((k / t_m), 2.0) + 1.0);
double t_3 = t_2 * (tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l))));
double tmp;
if (t_3 <= 5e-269) {
tmp = 2.0 / ((tan(k) * t_2) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / l))));
} else if (t_3 <= ((double) INFINITY)) {
tmp = 2.0 / pow((sqrt(2.0) * (k * (pow(t_m, 1.5) / l))), 2.0);
} else {
tmp = 2.0 * ((pow(l, 2.0) / pow(k, 2.0)) * (cos(k) / (t_m * pow(sin(k), 2.0))));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = 1.0 + (Math.pow((k / t_m), 2.0) + 1.0);
double t_3 = t_2 * (Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l))));
double tmp;
if (t_3 <= 5e-269) {
tmp = 2.0 / ((Math.tan(k) * t_2) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / l))));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = 2.0 / Math.pow((Math.sqrt(2.0) * (k * (Math.pow(t_m, 1.5) / l))), 2.0);
} else {
tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 2.0)) * (Math.cos(k) / (t_m * Math.pow(Math.sin(k), 2.0))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = 1.0 + (math.pow((k / t_m), 2.0) + 1.0) t_3 = t_2 * (math.tan(k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l)))) tmp = 0 if t_3 <= 5e-269: tmp = 2.0 / ((math.tan(k) * t_2) * (math.sin(k) * ((math.pow(t_m, 2.0) / l) * (t_m / l)))) elif t_3 <= math.inf: tmp = 2.0 / math.pow((math.sqrt(2.0) * (k * (math.pow(t_m, 1.5) / l))), 2.0) else: tmp = 2.0 * ((math.pow(l, 2.0) / math.pow(k, 2.0)) * (math.cos(k) / (t_m * math.pow(math.sin(k), 2.0)))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(1.0 + Float64((Float64(k / t_m) ^ 2.0) + 1.0)) t_3 = Float64(t_2 * Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l))))) tmp = 0.0 if (t_3 <= 5e-269) tmp = Float64(2.0 / Float64(Float64(tan(k) * t_2) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l))))); elseif (t_3 <= Inf) tmp = Float64(2.0 / (Float64(sqrt(2.0) * Float64(k * Float64((t_m ^ 1.5) / l))) ^ 2.0)); else tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 2.0)) * Float64(cos(k) / Float64(t_m * (sin(k) ^ 2.0))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = 1.0 + (((k / t_m) ^ 2.0) + 1.0); t_3 = t_2 * (tan(k) * (sin(k) * ((t_m ^ 3.0) / (l * l)))); tmp = 0.0; if (t_3 <= 5e-269) tmp = 2.0 / ((tan(k) * t_2) * (sin(k) * (((t_m ^ 2.0) / l) * (t_m / l)))); elseif (t_3 <= Inf) tmp = 2.0 / ((sqrt(2.0) * (k * ((t_m ^ 1.5) / l))) ^ 2.0); else tmp = 2.0 * (((l ^ 2.0) / (k ^ 2.0)) * (cos(k) / (t_m * (sin(k) ^ 2.0)))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(1.0 + N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * 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]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$3, 5e-269], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * t$95$2), $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], If[LessEqual[t$95$3, Infinity], N[(2.0 / N[Power[N[(N[Sqrt[2.0], $MachinePrecision] * N[(k * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := 1 + \left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right)\\
t_3 := t\_2 \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_3 \leq 5 \cdot 10^{-269}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot t\_2\right) \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\frac{2}{{\left(\sqrt{2} \cdot \left(k \cdot \frac{{t\_m}^{1.5}}{\ell}\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t\_m \cdot {\sin k}^{2}}\right)\\
\end{array}
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))) < 4.99999999999999979e-269Initial program 82.3%
Simplified82.2%
unpow382.2%
times-frac88.3%
pow288.3%
Applied egg-rr88.3%
if 4.99999999999999979e-269 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))) < +inf.0Initial program 87.0%
Simplified84.6%
Taylor expanded in k around 0 78.0%
add-sqr-sqrt49.0%
pow249.0%
associate-*r*49.0%
sqrt-prod49.0%
associate-/l/47.2%
unpow247.2%
div-inv47.2%
pow-flip47.2%
metadata-eval47.2%
sqrt-pow153.1%
metadata-eval53.1%
pow153.1%
Applied egg-rr53.1%
pow153.1%
*-commutative53.1%
sqrt-prod53.1%
sqrt-prod55.0%
sqrt-pow156.9%
metadata-eval56.9%
sqrt-pow160.0%
metadata-eval60.0%
unpow-160.0%
Applied egg-rr60.0%
unpow160.0%
*-commutative60.0%
*-commutative60.0%
associate-*l*60.0%
associate-*r/60.0%
*-rgt-identity60.0%
Simplified60.0%
if +inf.0 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))) Initial program 0.0%
Simplified0.0%
Taylor expanded in t around 0 47.0%
times-frac44.9%
Simplified44.9%
Final simplification64.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.08e-106)
(/
2.0
(/ (* (* t_m (pow k 2.0)) (pow (sin k) 2.0)) (* (pow l 2.0) (cos k))))
(/
2.0
(pow
(*
(/ t_m (pow (cbrt l) 2.0))
(* (cbrt (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))) (cbrt (sin k))))
3.0)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.08e-106) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) * pow(sin(k), 2.0)) / (pow(l, 2.0) * cos(k)));
} else {
tmp = 2.0 / pow(((t_m / pow(cbrt(l), 2.0)) * (cbrt((tan(k) * (2.0 + pow((k / t_m), 2.0)))) * cbrt(sin(k)))), 3.0);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.08e-106) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) * Math.pow(Math.sin(k), 2.0)) / (Math.pow(l, 2.0) * Math.cos(k)));
} else {
tmp = 2.0 / Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * (Math.cbrt((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0)))) * Math.cbrt(Math.sin(k)))), 3.0);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.08e-106) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) * (sin(k) ^ 2.0)) / Float64((l ^ 2.0) * cos(k)))); else tmp = Float64(2.0 / (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * Float64(cbrt(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0)))) * cbrt(sin(k)))) ^ 3.0)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.08e-106], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $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[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.08 \cdot 10^{-106}:\\
\;\;\;\;\frac{2}{\frac{\left(t\_m \cdot {k}^{2}\right) \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \left(\sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)} \cdot \sqrt[3]{\sin k}\right)\right)}^{3}}\\
\end{array}
\end{array}
if t < 1.08e-106Initial program 41.3%
Simplified41.3%
Taylor expanded in t around 0 61.9%
associate-*r*61.9%
Simplified61.9%
if 1.08e-106 < t Initial program 65.2%
Simplified65.2%
add-cube-cbrt65.1%
pow365.1%
Applied egg-rr80.2%
*-commutative80.2%
metadata-eval80.2%
associate-+r+80.2%
cbrt-prod90.6%
associate-+r+90.6%
metadata-eval90.6%
Applied egg-rr90.6%
Final simplification71.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (cbrt l) 2.0))
(t_3 (pow (sin k) 2.0))
(t_4 (* (sin k) (tan k))))
(*
t_s
(if (<= k 1.5e-146)
(/ 2.0 (pow (* (/ t_m t_2) (* (cbrt k) (* (cbrt k) (cbrt 2.0)))) 3.0))
(if (<= k 1.76e-10)
(/
2.0
(pow
(*
(* (hypot 1.0 (hypot 1.0 (/ k t_m))) (/ (pow t_m 1.5) l))
(sqrt t_4))
2.0))
(if (<= k 2.05e-7)
(/
2.0
(pow
(* (* t_m (pow (cbrt l) -2.0)) (cbrt (* 2.0 (/ t_3 (cos k)))))
3.0))
(if (<= k 1.95e+150)
(/ 2.0 (/ (* (* t_m (pow k 2.0)) t_3) (* (pow l 2.0) (cos k))))
(/
2.0
(pow
(* t_m (/ (cbrt (* (+ 2.0 (pow (/ k t_m) 2.0)) t_4)) t_2))
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(cbrt(l), 2.0);
double t_3 = pow(sin(k), 2.0);
double t_4 = sin(k) * tan(k);
double tmp;
if (k <= 1.5e-146) {
tmp = 2.0 / pow(((t_m / t_2) * (cbrt(k) * (cbrt(k) * cbrt(2.0)))), 3.0);
} else if (k <= 1.76e-10) {
tmp = 2.0 / pow(((hypot(1.0, hypot(1.0, (k / t_m))) * (pow(t_m, 1.5) / l)) * sqrt(t_4)), 2.0);
} else if (k <= 2.05e-7) {
tmp = 2.0 / pow(((t_m * pow(cbrt(l), -2.0)) * cbrt((2.0 * (t_3 / cos(k))))), 3.0);
} else if (k <= 1.95e+150) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) * t_3) / (pow(l, 2.0) * cos(k)));
} else {
tmp = 2.0 / pow((t_m * (cbrt(((2.0 + pow((k / t_m), 2.0)) * t_4)) / t_2)), 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.cbrt(l), 2.0);
double t_3 = Math.pow(Math.sin(k), 2.0);
double t_4 = Math.sin(k) * Math.tan(k);
double tmp;
if (k <= 1.5e-146) {
tmp = 2.0 / Math.pow(((t_m / t_2) * (Math.cbrt(k) * (Math.cbrt(k) * Math.cbrt(2.0)))), 3.0);
} else if (k <= 1.76e-10) {
tmp = 2.0 / Math.pow(((Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) * (Math.pow(t_m, 1.5) / l)) * Math.sqrt(t_4)), 2.0);
} else if (k <= 2.05e-7) {
tmp = 2.0 / Math.pow(((t_m * Math.pow(Math.cbrt(l), -2.0)) * Math.cbrt((2.0 * (t_3 / Math.cos(k))))), 3.0);
} else if (k <= 1.95e+150) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) * t_3) / (Math.pow(l, 2.0) * Math.cos(k)));
} else {
tmp = 2.0 / Math.pow((t_m * (Math.cbrt(((2.0 + Math.pow((k / t_m), 2.0)) * t_4)) / t_2)), 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 = cbrt(l) ^ 2.0 t_3 = sin(k) ^ 2.0 t_4 = Float64(sin(k) * tan(k)) tmp = 0.0 if (k <= 1.5e-146) tmp = Float64(2.0 / (Float64(Float64(t_m / t_2) * Float64(cbrt(k) * Float64(cbrt(k) * cbrt(2.0)))) ^ 3.0)); elseif (k <= 1.76e-10) tmp = Float64(2.0 / (Float64(Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) * Float64((t_m ^ 1.5) / l)) * sqrt(t_4)) ^ 2.0)); elseif (k <= 2.05e-7) tmp = Float64(2.0 / (Float64(Float64(t_m * (cbrt(l) ^ -2.0)) * cbrt(Float64(2.0 * Float64(t_3 / cos(k))))) ^ 3.0)); elseif (k <= 1.95e+150) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) * t_3) / Float64((l ^ 2.0) * cos(k)))); else tmp = Float64(2.0 / (Float64(t_m * Float64(cbrt(Float64(Float64(2.0 + (Float64(k / t_m) ^ 2.0)) * t_4)) / t_2)) ^ 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[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$4 = N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 1.5e-146], N[(2.0 / N[Power[N[(N[(t$95$m / t$95$2), $MachinePrecision] * N[(N[Power[k, 1/3], $MachinePrecision] * N[(N[Power[k, 1/3], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.76e-10], N[(2.0 / N[Power[N[(N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[t$95$4], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.05e-7], 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[(2.0 * N[(t$95$3 / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.95e+150], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(t$95$m * N[(N[Power[N[(N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * t$95$4), $MachinePrecision], 1/3], $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {\left(\sqrt[3]{\ell}\right)}^{2}\\
t_3 := {\sin k}^{2}\\
t_4 := \sin k \cdot \tan k\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.5 \cdot 10^{-146}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{t\_2} \cdot \left(\sqrt[3]{k} \cdot \left(\sqrt[3]{k} \cdot \sqrt[3]{2}\right)\right)\right)}^{3}}\\
\mathbf{elif}\;k \leq 1.76 \cdot 10^{-10}:\\
\;\;\;\;\frac{2}{{\left(\left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \frac{{t\_m}^{1.5}}{\ell}\right) \cdot \sqrt{t\_4}\right)}^{2}}\\
\mathbf{elif}\;k \leq 2.05 \cdot 10^{-7}:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \sqrt[3]{2 \cdot \frac{t\_3}{\cos k}}\right)}^{3}}\\
\mathbf{elif}\;k \leq 1.95 \cdot 10^{+150}:\\
\;\;\;\;\frac{2}{\frac{\left(t\_m \cdot {k}^{2}\right) \cdot t\_3}{{\ell}^{2} \cdot \cos k}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot \frac{\sqrt[3]{\left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right) \cdot t\_4}}{t\_2}\right)}^{3}}\\
\end{array}
\end{array}
\end{array}
if k < 1.50000000000000009e-146Initial program 50.6%
Simplified50.6%
add-cube-cbrt50.5%
pow350.5%
Applied egg-rr65.4%
*-commutative65.4%
metadata-eval65.4%
associate-+r+65.4%
cbrt-prod80.1%
associate-+r+80.1%
metadata-eval80.1%
Applied egg-rr80.1%
Taylor expanded in k around 0 73.4%
Taylor expanded in k around 0 71.5%
if 1.50000000000000009e-146 < k < 1.7600000000000001e-10Initial program 68.9%
Simplified68.9%
Applied egg-rr53.9%
associate-*r*53.9%
Simplified53.9%
if 1.7600000000000001e-10 < k < 2.05e-7Initial program 0.0%
Simplified2.2%
add-cube-cbrt2.2%
pow32.2%
cbrt-div2.2%
rem-cbrt-cube2.2%
Applied egg-rr2.2%
add-cube-cbrt2.2%
pow32.2%
Applied egg-rr49.2%
Taylor expanded in t around inf 99.2%
if 2.05e-7 < k < 1.94999999999999995e150Initial program 37.8%
Simplified37.8%
Taylor expanded in t around 0 71.1%
associate-*r*71.2%
Simplified71.2%
if 1.94999999999999995e150 < k Initial program 37.1%
Simplified37.1%
add-cube-cbrt37.1%
pow337.1%
Applied egg-rr59.7%
associate-*l/59.9%
Applied egg-rr59.9%
associate-/l*59.9%
associate-*r*59.9%
Simplified59.9%
Final simplification67.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 (pow (cbrt l) 2.0))
(t_3 (+ 2.0 (pow (/ k t_m) 2.0)))
(t_4 (* (sin k) (tan k))))
(*
t_s
(if (<= k 7.2e-94)
(/ 2.0 (pow (* (/ t_m t_2) (* (cbrt (* (tan k) t_3)) (cbrt k))) 3.0))
(if (<= k 2.5e-16)
(/
2.0
(pow
(*
(* (hypot 1.0 (hypot 1.0 (/ k t_m))) (/ (pow t_m 1.5) l))
(sqrt t_4))
2.0))
(if (<= k 7.6e+99)
(/
2.0
(/
(* (* t_m (pow k 2.0)) (pow (sin k) 2.0))
(* (pow l 2.0) (cos k))))
(/ 2.0 (pow (* t_m (/ (cbrt (* t_3 t_4)) t_2)) 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(cbrt(l), 2.0);
double t_3 = 2.0 + pow((k / t_m), 2.0);
double t_4 = sin(k) * tan(k);
double tmp;
if (k <= 7.2e-94) {
tmp = 2.0 / pow(((t_m / t_2) * (cbrt((tan(k) * t_3)) * cbrt(k))), 3.0);
} else if (k <= 2.5e-16) {
tmp = 2.0 / pow(((hypot(1.0, hypot(1.0, (k / t_m))) * (pow(t_m, 1.5) / l)) * sqrt(t_4)), 2.0);
} else if (k <= 7.6e+99) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) * pow(sin(k), 2.0)) / (pow(l, 2.0) * cos(k)));
} else {
tmp = 2.0 / pow((t_m * (cbrt((t_3 * t_4)) / t_2)), 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.cbrt(l), 2.0);
double t_3 = 2.0 + Math.pow((k / t_m), 2.0);
double t_4 = Math.sin(k) * Math.tan(k);
double tmp;
if (k <= 7.2e-94) {
tmp = 2.0 / Math.pow(((t_m / t_2) * (Math.cbrt((Math.tan(k) * t_3)) * Math.cbrt(k))), 3.0);
} else if (k <= 2.5e-16) {
tmp = 2.0 / Math.pow(((Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) * (Math.pow(t_m, 1.5) / l)) * Math.sqrt(t_4)), 2.0);
} else if (k <= 7.6e+99) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) * Math.pow(Math.sin(k), 2.0)) / (Math.pow(l, 2.0) * Math.cos(k)));
} else {
tmp = 2.0 / Math.pow((t_m * (Math.cbrt((t_3 * t_4)) / t_2)), 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 = cbrt(l) ^ 2.0 t_3 = Float64(2.0 + (Float64(k / t_m) ^ 2.0)) t_4 = Float64(sin(k) * tan(k)) tmp = 0.0 if (k <= 7.2e-94) tmp = Float64(2.0 / (Float64(Float64(t_m / t_2) * Float64(cbrt(Float64(tan(k) * t_3)) * cbrt(k))) ^ 3.0)); elseif (k <= 2.5e-16) tmp = Float64(2.0 / (Float64(Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) * Float64((t_m ^ 1.5) / l)) * sqrt(t_4)) ^ 2.0)); elseif (k <= 7.6e+99) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) * (sin(k) ^ 2.0)) / Float64((l ^ 2.0) * cos(k)))); else tmp = Float64(2.0 / (Float64(t_m * Float64(cbrt(Float64(t_3 * t_4)) / t_2)) ^ 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[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 7.2e-94], N[(2.0 / N[Power[N[(N[(t$95$m / t$95$2), $MachinePrecision] * N[(N[Power[N[(N[Tan[k], $MachinePrecision] * t$95$3), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[k, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.5e-16], N[(2.0 / N[Power[N[(N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[t$95$4], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 7.6e+99], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(t$95$m * N[(N[Power[N[(t$95$3 * t$95$4), $MachinePrecision], 1/3], $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {\left(\sqrt[3]{\ell}\right)}^{2}\\
t_3 := 2 + {\left(\frac{k}{t\_m}\right)}^{2}\\
t_4 := \sin k \cdot \tan k\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 7.2 \cdot 10^{-94}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{t\_2} \cdot \left(\sqrt[3]{\tan k \cdot t\_3} \cdot \sqrt[3]{k}\right)\right)}^{3}}\\
\mathbf{elif}\;k \leq 2.5 \cdot 10^{-16}:\\
\;\;\;\;\frac{2}{{\left(\left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \frac{{t\_m}^{1.5}}{\ell}\right) \cdot \sqrt{t\_4}\right)}^{2}}\\
\mathbf{elif}\;k \leq 7.6 \cdot 10^{+99}:\\
\;\;\;\;\frac{2}{\frac{\left(t\_m \cdot {k}^{2}\right) \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot \frac{\sqrt[3]{t\_3 \cdot t\_4}}{t\_2}\right)}^{3}}\\
\end{array}
\end{array}
\end{array}
if k < 7.2e-94Initial program 53.5%
Simplified53.5%
add-cube-cbrt53.4%
pow353.4%
Applied egg-rr68.3%
*-commutative68.3%
metadata-eval68.3%
associate-+r+68.3%
cbrt-prod81.7%
associate-+r+81.7%
metadata-eval81.7%
Applied egg-rr81.7%
Taylor expanded in k around 0 75.6%
if 7.2e-94 < k < 2.5000000000000002e-16Initial program 58.7%
Simplified58.7%
Applied egg-rr52.0%
associate-*r*52.0%
Simplified52.0%
if 2.5000000000000002e-16 < k < 7.6e99Initial program 47.3%
Simplified47.2%
Taylor expanded in t around 0 73.3%
associate-*r*73.3%
Simplified73.3%
if 7.6e99 < k Initial program 30.8%
Simplified30.8%
add-cube-cbrt30.8%
pow330.8%
Applied egg-rr58.7%
associate-*l/58.8%
Applied egg-rr58.8%
associate-/l*58.8%
associate-*r*58.8%
Simplified58.8%
Final simplification70.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (cbrt l) 2.0)) (t_3 (pow (sin k) 2.0)))
(*
t_s
(if (<= l 5.8e+51)
(/
2.0
(*
(* (tan k) (+ 1.0 (+ (pow (/ k t_m) 2.0) 1.0)))
(pow (* t_m (* (cbrt k) (pow (cbrt l) -2.0))) 3.0)))
(if (<= l 3.3e+72)
(* 2.0 (* (/ (pow l 2.0) (pow k 2.0)) (/ (cos k) (* t_m t_3))))
(if (<= l 3.5e+176)
(/
2.0
(pow
(* (/ t_m t_2) (* (cbrt (sin k)) (* (cbrt k) (cbrt 2.0))))
3.0))
(/
2.0
(pow (* t_m (/ (cbrt (/ (* 2.0 t_3) (cos k))) t_2)) 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(cbrt(l), 2.0);
double t_3 = pow(sin(k), 2.0);
double tmp;
if (l <= 5.8e+51) {
tmp = 2.0 / ((tan(k) * (1.0 + (pow((k / t_m), 2.0) + 1.0))) * pow((t_m * (cbrt(k) * pow(cbrt(l), -2.0))), 3.0));
} else if (l <= 3.3e+72) {
tmp = 2.0 * ((pow(l, 2.0) / pow(k, 2.0)) * (cos(k) / (t_m * t_3)));
} else if (l <= 3.5e+176) {
tmp = 2.0 / pow(((t_m / t_2) * (cbrt(sin(k)) * (cbrt(k) * cbrt(2.0)))), 3.0);
} else {
tmp = 2.0 / pow((t_m * (cbrt(((2.0 * t_3) / cos(k))) / t_2)), 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.cbrt(l), 2.0);
double t_3 = Math.pow(Math.sin(k), 2.0);
double tmp;
if (l <= 5.8e+51) {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (Math.pow((k / t_m), 2.0) + 1.0))) * Math.pow((t_m * (Math.cbrt(k) * Math.pow(Math.cbrt(l), -2.0))), 3.0));
} else if (l <= 3.3e+72) {
tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 2.0)) * (Math.cos(k) / (t_m * t_3)));
} else if (l <= 3.5e+176) {
tmp = 2.0 / Math.pow(((t_m / t_2) * (Math.cbrt(Math.sin(k)) * (Math.cbrt(k) * Math.cbrt(2.0)))), 3.0);
} else {
tmp = 2.0 / Math.pow((t_m * (Math.cbrt(((2.0 * t_3) / Math.cos(k))) / t_2)), 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 = cbrt(l) ^ 2.0 t_3 = sin(k) ^ 2.0 tmp = 0.0 if (l <= 5.8e+51) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64((Float64(k / t_m) ^ 2.0) + 1.0))) * (Float64(t_m * Float64(cbrt(k) * (cbrt(l) ^ -2.0))) ^ 3.0))); elseif (l <= 3.3e+72) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 2.0)) * Float64(cos(k) / Float64(t_m * t_3)))); elseif (l <= 3.5e+176) tmp = Float64(2.0 / (Float64(Float64(t_m / t_2) * Float64(cbrt(sin(k)) * Float64(cbrt(k) * cbrt(2.0)))) ^ 3.0)); else tmp = Float64(2.0 / (Float64(t_m * Float64(cbrt(Float64(Float64(2.0 * t_3) / cos(k))) / t_2)) ^ 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[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[l, 5.8e+51], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[(t$95$m * N[(N[Power[k, 1/3], $MachinePrecision] * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 3.3e+72], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 3.5e+176], N[(2.0 / N[Power[N[(N[(t$95$m / t$95$2), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(N[Power[k, 1/3], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(t$95$m * N[(N[Power[N[(N[(2.0 * t$95$3), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {\left(\sqrt[3]{\ell}\right)}^{2}\\
t_3 := {\sin k}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 5.8 \cdot 10^{+51}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right)\right)\right) \cdot {\left(t\_m \cdot \left(\sqrt[3]{k} \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right)}^{3}}\\
\mathbf{elif}\;\ell \leq 3.3 \cdot 10^{+72}:\\
\;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t\_m \cdot t\_3}\right)\\
\mathbf{elif}\;\ell \leq 3.5 \cdot 10^{+176}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{t\_2} \cdot \left(\sqrt[3]{\sin k} \cdot \left(\sqrt[3]{k} \cdot \sqrt[3]{2}\right)\right)\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot \frac{\sqrt[3]{\frac{2 \cdot t\_3}{\cos k}}}{t\_2}\right)}^{3}}\\
\end{array}
\end{array}
\end{array}
if l < 5.7999999999999997e51Initial program 53.4%
Simplified53.4%
Taylor expanded in k around 0 51.7%
associate-/l*52.0%
Simplified52.0%
add-cube-cbrt52.0%
pow352.0%
unpow252.0%
associate-/l/56.4%
*-commutative56.4%
cbrt-prod56.3%
associate-/l/52.0%
unpow252.0%
cbrt-div52.5%
rem-cbrt-cube63.2%
unpow263.2%
cbrt-prod71.9%
unpow271.9%
div-inv71.9%
pow-flip71.9%
metadata-eval71.9%
Applied egg-rr71.9%
associate-*l*72.0%
Simplified72.0%
if 5.7999999999999997e51 < l < 3.3e72Initial program 66.1%
Simplified66.1%
Taylor expanded in t around 0 67.8%
times-frac67.7%
Simplified67.7%
if 3.3e72 < l < 3.50000000000000003e176Initial program 37.5%
Simplified37.5%
add-cube-cbrt37.4%
pow337.4%
Applied egg-rr48.9%
*-commutative48.9%
metadata-eval48.9%
associate-+r+48.9%
cbrt-prod67.9%
associate-+r+67.9%
metadata-eval67.9%
Applied egg-rr67.9%
Taylor expanded in k around 0 73.5%
if 3.50000000000000003e176 < l Initial program 20.8%
Simplified20.8%
add-cube-cbrt20.8%
pow320.8%
Applied egg-rr58.0%
associate-*l/58.4%
Applied egg-rr58.4%
associate-/l*58.5%
associate-*r*58.5%
Simplified58.5%
Taylor expanded in t around inf 70.1%
*-commutative70.1%
associate-*l/70.1%
Simplified70.1%
Final simplification71.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 8.5e-107)
(/
2.0
(/ (* (* t_m (pow k 2.0)) (pow (sin k) 2.0)) (* (pow l 2.0) (cos k))))
(/
2.0
(*
(pow (* (/ t_m (pow (cbrt l) 2.0)) (cbrt (sin k))) 3.0)
(* (tan k) (+ 1.0 (+ (pow (/ k t_m) 2.0) 1.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 8.5e-107) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) * pow(sin(k), 2.0)) / (pow(l, 2.0) * cos(k)));
} else {
tmp = 2.0 / (pow(((t_m / pow(cbrt(l), 2.0)) * cbrt(sin(k))), 3.0) * (tan(k) * (1.0 + (pow((k / t_m), 2.0) + 1.0))));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 8.5e-107) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) * Math.pow(Math.sin(k), 2.0)) / (Math.pow(l, 2.0) * Math.cos(k)));
} else {
tmp = 2.0 / (Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * Math.cbrt(Math.sin(k))), 3.0) * (Math.tan(k) * (1.0 + (Math.pow((k / t_m), 2.0) + 1.0))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 8.5e-107) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) * (sin(k) ^ 2.0)) / Float64((l ^ 2.0) * cos(k)))); else tmp = Float64(2.0 / Float64((Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * cbrt(sin(k))) ^ 3.0) * Float64(tan(k) * Float64(1.0 + Float64((Float64(k / t_m) ^ 2.0) + 1.0))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 8.5e-107], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $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[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 8.5 \cdot 10^{-107}:\\
\;\;\;\;\frac{2}{\frac{\left(t\_m \cdot {k}^{2}\right) \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right)\right)\right)}\\
\end{array}
\end{array}
if t < 8.49999999999999956e-107Initial program 41.5%
Simplified41.5%
Taylor expanded in t around 0 61.7%
associate-*r*61.7%
Simplified61.7%
if 8.49999999999999956e-107 < t Initial program 64.4%
Simplified64.4%
add-cube-cbrt64.4%
pow364.4%
*-commutative64.4%
cbrt-prod64.3%
cbrt-div65.4%
rem-cbrt-cube68.3%
cbrt-prod86.1%
pow286.1%
Applied egg-rr86.1%
Final simplification69.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 (* (sin k) (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))))
(t_3
(/
2.0
(/
(* (* t_m (pow k 2.0)) (pow (sin k) 2.0))
(* (pow l 2.0) (cos k)))))
(t_4 (/ t_m (pow (cbrt l) 2.0))))
(*
t_s
(if (<= k 6.2e-8)
(/ 2.0 (pow (* t_4 (* (cbrt k) (* (cbrt k) (cbrt 2.0)))) 3.0))
(if (<= k 2.6e+15)
(/ 2.0 (* (pow (* t_m (pow (cbrt l) -2.0)) 3.0) t_2))
(if (<= k 9e+101)
t_3
(if (<= k 6.5e+110)
(/ 2.0 (* (pow t_4 3.0) t_2))
(if (<= k 2e+152)
t_3
(/
2.0
(pow
(* (* k (cbrt (pow l -2.0))) (cbrt (* t_m k)))
3.0))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = sin(k) * (tan(k) * (2.0 + pow((k / t_m), 2.0)));
double t_3 = 2.0 / (((t_m * pow(k, 2.0)) * pow(sin(k), 2.0)) / (pow(l, 2.0) * cos(k)));
double t_4 = t_m / pow(cbrt(l), 2.0);
double tmp;
if (k <= 6.2e-8) {
tmp = 2.0 / pow((t_4 * (cbrt(k) * (cbrt(k) * cbrt(2.0)))), 3.0);
} else if (k <= 2.6e+15) {
tmp = 2.0 / (pow((t_m * pow(cbrt(l), -2.0)), 3.0) * t_2);
} else if (k <= 9e+101) {
tmp = t_3;
} else if (k <= 6.5e+110) {
tmp = 2.0 / (pow(t_4, 3.0) * t_2);
} else if (k <= 2e+152) {
tmp = t_3;
} else {
tmp = 2.0 / pow(((k * cbrt(pow(l, -2.0))) * cbrt((t_m * k))), 3.0);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.sin(k) * (Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0)));
double t_3 = 2.0 / (((t_m * Math.pow(k, 2.0)) * Math.pow(Math.sin(k), 2.0)) / (Math.pow(l, 2.0) * Math.cos(k)));
double t_4 = t_m / Math.pow(Math.cbrt(l), 2.0);
double tmp;
if (k <= 6.2e-8) {
tmp = 2.0 / Math.pow((t_4 * (Math.cbrt(k) * (Math.cbrt(k) * Math.cbrt(2.0)))), 3.0);
} else if (k <= 2.6e+15) {
tmp = 2.0 / (Math.pow((t_m * Math.pow(Math.cbrt(l), -2.0)), 3.0) * t_2);
} else if (k <= 9e+101) {
tmp = t_3;
} else if (k <= 6.5e+110) {
tmp = 2.0 / (Math.pow(t_4, 3.0) * t_2);
} else if (k <= 2e+152) {
tmp = t_3;
} else {
tmp = 2.0 / Math.pow(((k * Math.cbrt(Math.pow(l, -2.0))) * Math.cbrt((t_m * k))), 3.0);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(sin(k) * Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0)))) t_3 = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) * (sin(k) ^ 2.0)) / Float64((l ^ 2.0) * cos(k)))) t_4 = Float64(t_m / (cbrt(l) ^ 2.0)) tmp = 0.0 if (k <= 6.2e-8) tmp = Float64(2.0 / (Float64(t_4 * Float64(cbrt(k) * Float64(cbrt(k) * cbrt(2.0)))) ^ 3.0)); elseif (k <= 2.6e+15) tmp = Float64(2.0 / Float64((Float64(t_m * (cbrt(l) ^ -2.0)) ^ 3.0) * t_2)); elseif (k <= 9e+101) tmp = t_3; elseif (k <= 6.5e+110) tmp = Float64(2.0 / Float64((t_4 ^ 3.0) * t_2)); elseif (k <= 2e+152) tmp = t_3; else tmp = Float64(2.0 / (Float64(Float64(k * cbrt((l ^ -2.0))) * cbrt(Float64(t_m * k))) ^ 3.0)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[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]}, Block[{t$95$3 = N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 6.2e-8], N[(2.0 / N[Power[N[(t$95$4 * N[(N[Power[k, 1/3], $MachinePrecision] * N[(N[Power[k, 1/3], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.6e+15], 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] * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 9e+101], t$95$3, If[LessEqual[k, 6.5e+110], N[(2.0 / N[(N[Power[t$95$4, 3.0], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2e+152], t$95$3, N[(2.0 / N[Power[N[(N[(k * N[Power[N[Power[l, -2.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] * N[Power[N[(t$95$m * k), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]]]]), $MachinePrecision]]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \sin k \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)\\
t_3 := \frac{2}{\frac{\left(t\_m \cdot {k}^{2}\right) \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}\\
t_4 := \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 6.2 \cdot 10^{-8}:\\
\;\;\;\;\frac{2}{{\left(t\_4 \cdot \left(\sqrt[3]{k} \cdot \left(\sqrt[3]{k} \cdot \sqrt[3]{2}\right)\right)\right)}^{3}}\\
\mathbf{elif}\;k \leq 2.6 \cdot 10^{+15}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3} \cdot t\_2}\\
\mathbf{elif}\;k \leq 9 \cdot 10^{+101}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;k \leq 6.5 \cdot 10^{+110}:\\
\;\;\;\;\frac{2}{{t\_4}^{3} \cdot t\_2}\\
\mathbf{elif}\;k \leq 2 \cdot 10^{+152}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \sqrt[3]{{\ell}^{-2}}\right) \cdot \sqrt[3]{t\_m \cdot k}\right)}^{3}}\\
\end{array}
\end{array}
\end{array}
if k < 6.2e-8Initial program 54.1%
Simplified54.1%
add-cube-cbrt54.0%
pow354.0%
Applied egg-rr69.2%
*-commutative69.2%
metadata-eval69.2%
associate-+r+69.2%
cbrt-prod80.7%
associate-+r+80.7%
metadata-eval80.7%
Applied egg-rr80.7%
Taylor expanded in k around 0 75.4%
Taylor expanded in k around 0 74.7%
if 6.2e-8 < k < 2.6e15Initial program 45.3%
Simplified56.4%
add-cube-cbrt56.3%
pow356.1%
cbrt-div56.1%
rem-cbrt-cube56.1%
Applied egg-rr56.1%
add-cube-cbrt56.0%
pow356.0%
Applied egg-rr88.6%
cube-prod88.5%
rem-cube-cbrt88.5%
*-commutative88.5%
Simplified88.5%
if 2.6e15 < k < 9.0000000000000004e101 or 6.4999999999999997e110 < k < 2.0000000000000001e152Initial program 39.4%
Simplified39.4%
Taylor expanded in t around 0 79.2%
associate-*r*79.2%
Simplified79.2%
if 9.0000000000000004e101 < k < 6.4999999999999997e110Initial program 0.0%
Simplified0.0%
add-cube-cbrt0.0%
pow30.0%
Applied egg-rr98.8%
cube-prod98.8%
rem-cube-cbrt98.9%
Simplified98.9%
if 2.0000000000000001e152 < k Initial program 37.1%
Simplified37.1%
Taylor expanded in k around 0 37.4%
associate-/l*37.1%
Simplified37.1%
Taylor expanded in k around inf 56.7%
times-frac56.7%
Simplified56.7%
add-cube-cbrt56.7%
pow356.7%
cbrt-prod56.7%
div-inv56.7%
cbrt-prod56.7%
unpow356.7%
add-cbrt-cube59.6%
pow-flip59.6%
metadata-eval59.6%
associate-/l*59.6%
tan-quot59.6%
Applied egg-rr59.6%
Taylor expanded in k around 0 59.7%
Final simplification73.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (/ k t_m) 2.0)))
(*
t_s
(if (<= t_m 4.6e-89)
(/
2.0
(/ (* (* t_m (pow k 2.0)) (pow (sin k) 2.0)) (* (pow l 2.0) (cos k))))
(if (<= t_m 4.2e-39)
(/
2.0
(*
(/ 1.0 l)
(* (* (tan k) (+ 2.0 t_2)) (* (sin k) (/ (pow t_m 3.0) l)))))
(if (<= t_m 1.06e+100)
(/
2.0
(*
(* (tan k) (+ 1.0 (+ t_2 1.0)))
(* (sin k) (* (/ (pow t_m 2.0) l) (/ t_m l)))))
(/
2.0
(pow
(* t_m (* (pow (cbrt l) -2.0) (* (cbrt k) (cbrt (* 2.0 (sin k))))))
3.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow((k / t_m), 2.0);
double tmp;
if (t_m <= 4.6e-89) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) * pow(sin(k), 2.0)) / (pow(l, 2.0) * cos(k)));
} else if (t_m <= 4.2e-39) {
tmp = 2.0 / ((1.0 / l) * ((tan(k) * (2.0 + t_2)) * (sin(k) * (pow(t_m, 3.0) / l))));
} else if (t_m <= 1.06e+100) {
tmp = 2.0 / ((tan(k) * (1.0 + (t_2 + 1.0))) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / l))));
} else {
tmp = 2.0 / pow((t_m * (pow(cbrt(l), -2.0) * (cbrt(k) * cbrt((2.0 * sin(k)))))), 3.0);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.pow((k / t_m), 2.0);
double tmp;
if (t_m <= 4.6e-89) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) * Math.pow(Math.sin(k), 2.0)) / (Math.pow(l, 2.0) * Math.cos(k)));
} else if (t_m <= 4.2e-39) {
tmp = 2.0 / ((1.0 / l) * ((Math.tan(k) * (2.0 + t_2)) * (Math.sin(k) * (Math.pow(t_m, 3.0) / l))));
} else if (t_m <= 1.06e+100) {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (t_2 + 1.0))) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / l))));
} else {
tmp = 2.0 / Math.pow((t_m * (Math.pow(Math.cbrt(l), -2.0) * (Math.cbrt(k) * Math.cbrt((2.0 * Math.sin(k)))))), 3.0);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(k / t_m) ^ 2.0 tmp = 0.0 if (t_m <= 4.6e-89) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) * (sin(k) ^ 2.0)) / Float64((l ^ 2.0) * cos(k)))); elseif (t_m <= 4.2e-39) tmp = Float64(2.0 / Float64(Float64(1.0 / l) * Float64(Float64(tan(k) * Float64(2.0 + t_2)) * Float64(sin(k) * Float64((t_m ^ 3.0) / l))))); elseif (t_m <= 1.06e+100) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(t_2 + 1.0))) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l))))); else tmp = Float64(2.0 / (Float64(t_m * Float64((cbrt(l) ^ -2.0) * Float64(cbrt(k) * cbrt(Float64(2.0 * sin(k)))))) ^ 3.0)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 4.6e-89], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.2e-39], N[(2.0 / N[(N[(1.0 / l), $MachinePrecision] * N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.06e+100], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(t$95$2 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(t$95$m * N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * N[(N[Power[k, 1/3], $MachinePrecision] * N[Power[N[(2.0 * N[Sin[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.6 \cdot 10^{-89}:\\
\;\;\;\;\frac{2}{\frac{\left(t\_m \cdot {k}^{2}\right) \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}\\
\mathbf{elif}\;t\_m \leq 4.2 \cdot 10^{-39}:\\
\;\;\;\;\frac{2}{\frac{1}{\ell} \cdot \left(\left(\tan k \cdot \left(2 + t\_2\right)\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell}\right)\right)}\\
\mathbf{elif}\;t\_m \leq 1.06 \cdot 10^{+100}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(t\_2 + 1\right)\right)\right) \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot \left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \left(\sqrt[3]{k} \cdot \sqrt[3]{2 \cdot \sin k}\right)\right)\right)}^{3}}\\
\end{array}
\end{array}
\end{array}
if t < 4.6e-89Initial program 41.4%
Simplified41.4%
Taylor expanded in t around 0 62.3%
associate-*r*62.4%
Simplified62.4%
if 4.6e-89 < t < 4.19999999999999987e-39Initial program 54.8%
Simplified54.7%
associate-*l*54.6%
associate-/r*67.3%
associate-+r+67.3%
metadata-eval67.3%
associate-*l*67.4%
associate-*l/68.2%
clear-num68.2%
associate-*l*68.2%
Applied egg-rr68.2%
associate-/r/68.2%
associate-*r*68.1%
Simplified68.1%
if 4.19999999999999987e-39 < t < 1.06000000000000007e100Initial program 80.1%
Simplified80.1%
unpow380.1%
times-frac82.9%
pow282.9%
Applied egg-rr82.9%
if 1.06000000000000007e100 < t Initial program 61.3%
Simplified61.3%
add-cube-cbrt61.3%
pow361.3%
Applied egg-rr82.5%
*-commutative82.5%
metadata-eval82.5%
associate-+r+82.5%
cbrt-prod98.8%
associate-+r+98.8%
metadata-eval98.8%
Applied egg-rr98.8%
Taylor expanded in k around 0 83.7%
pow183.7%
div-inv83.7%
pow-flip83.7%
metadata-eval83.7%
cbrt-unprod83.6%
cbrt-unprod67.4%
Applied egg-rr67.4%
unpow167.4%
associate-*l*67.5%
*-commutative67.5%
*-commutative67.5%
Simplified67.5%
associate-*r*67.5%
cbrt-prod82.0%
Applied egg-rr82.0%
Final simplification67.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 4.2e-8)
(/
2.0
(pow
(* (/ t_m (pow (cbrt l) 2.0)) (* (cbrt k) (* (cbrt k) (cbrt 2.0))))
3.0))
(if (<= k 7e+28)
(/
2.0
(*
(pow (* t_m (pow (cbrt l) -2.0)) 3.0)
(* (sin k) (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0))))))
(if (<= k 5.9e+150)
(/
2.0
(/ (* (* t_m (pow k 2.0)) (pow (sin k) 2.0)) (* (pow l 2.0) (cos k))))
(if (<= k 9.6e+150)
(* l (/ 2.0 (* (pow t_m 3.0) (/ (* 2.0 (pow k 2.0)) l))))
(/
2.0
(pow (* (* k (cbrt (pow l -2.0))) (cbrt (* t_m k))) 3.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 4.2e-8) {
tmp = 2.0 / pow(((t_m / pow(cbrt(l), 2.0)) * (cbrt(k) * (cbrt(k) * cbrt(2.0)))), 3.0);
} else if (k <= 7e+28) {
tmp = 2.0 / (pow((t_m * pow(cbrt(l), -2.0)), 3.0) * (sin(k) * (tan(k) * (2.0 + pow((k / t_m), 2.0)))));
} else if (k <= 5.9e+150) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) * pow(sin(k), 2.0)) / (pow(l, 2.0) * cos(k)));
} else if (k <= 9.6e+150) {
tmp = l * (2.0 / (pow(t_m, 3.0) * ((2.0 * pow(k, 2.0)) / l)));
} else {
tmp = 2.0 / pow(((k * cbrt(pow(l, -2.0))) * cbrt((t_m * k))), 3.0);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 4.2e-8) {
tmp = 2.0 / Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * (Math.cbrt(k) * (Math.cbrt(k) * Math.cbrt(2.0)))), 3.0);
} else if (k <= 7e+28) {
tmp = 2.0 / (Math.pow((t_m * Math.pow(Math.cbrt(l), -2.0)), 3.0) * (Math.sin(k) * (Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0)))));
} else if (k <= 5.9e+150) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) * Math.pow(Math.sin(k), 2.0)) / (Math.pow(l, 2.0) * Math.cos(k)));
} else if (k <= 9.6e+150) {
tmp = l * (2.0 / (Math.pow(t_m, 3.0) * ((2.0 * Math.pow(k, 2.0)) / l)));
} else {
tmp = 2.0 / Math.pow(((k * Math.cbrt(Math.pow(l, -2.0))) * Math.cbrt((t_m * k))), 3.0);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 4.2e-8) tmp = Float64(2.0 / (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * Float64(cbrt(k) * Float64(cbrt(k) * cbrt(2.0)))) ^ 3.0)); elseif (k <= 7e+28) tmp = Float64(2.0 / Float64((Float64(t_m * (cbrt(l) ^ -2.0)) ^ 3.0) * Float64(sin(k) * Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0)))))); elseif (k <= 5.9e+150) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) * (sin(k) ^ 2.0)) / Float64((l ^ 2.0) * cos(k)))); elseif (k <= 9.6e+150) tmp = Float64(l * Float64(2.0 / Float64((t_m ^ 3.0) * Float64(Float64(2.0 * (k ^ 2.0)) / l)))); else tmp = Float64(2.0 / (Float64(Float64(k * cbrt((l ^ -2.0))) * cbrt(Float64(t_m * k))) ^ 3.0)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 4.2e-8], 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[k, 1/3], $MachinePrecision] * N[(N[Power[k, 1/3], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 7e+28], 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[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]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 5.9e+150], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 9.6e+150], N[(l * N[(2.0 / N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(k * N[Power[N[Power[l, -2.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] * N[Power[N[(t$95$m * k), $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 4.2 \cdot 10^{-8}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \left(\sqrt[3]{k} \cdot \left(\sqrt[3]{k} \cdot \sqrt[3]{2}\right)\right)\right)}^{3}}\\
\mathbf{elif}\;k \leq 7 \cdot 10^{+28}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3} \cdot \left(\sin k \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)\right)}\\
\mathbf{elif}\;k \leq 5.9 \cdot 10^{+150}:\\
\;\;\;\;\frac{2}{\frac{\left(t\_m \cdot {k}^{2}\right) \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}\\
\mathbf{elif}\;k \leq 9.6 \cdot 10^{+150}:\\
\;\;\;\;\ell \cdot \frac{2}{{t\_m}^{3} \cdot \frac{2 \cdot {k}^{2}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \sqrt[3]{{\ell}^{-2}}\right) \cdot \sqrt[3]{t\_m \cdot k}\right)}^{3}}\\
\end{array}
\end{array}
if k < 4.19999999999999989e-8Initial program 54.1%
Simplified54.1%
add-cube-cbrt54.0%
pow354.0%
Applied egg-rr69.2%
*-commutative69.2%
metadata-eval69.2%
associate-+r+69.2%
cbrt-prod80.7%
associate-+r+80.7%
metadata-eval80.7%
Applied egg-rr80.7%
Taylor expanded in k around 0 75.4%
Taylor expanded in k around 0 74.7%
if 4.19999999999999989e-8 < k < 6.9999999999999999e28Initial program 43.8%
Simplified57.7%
add-cube-cbrt57.6%
pow357.6%
cbrt-div57.3%
rem-cbrt-cube64.3%
Applied egg-rr64.3%
add-cube-cbrt64.5%
pow364.5%
Applied egg-rr85.3%
cube-prod85.1%
rem-cube-cbrt85.1%
*-commutative85.1%
Simplified85.1%
if 6.9999999999999999e28 < k < 5.90000000000000023e150Initial program 33.3%
Simplified33.3%
Taylor expanded in t around 0 78.2%
associate-*r*78.2%
Simplified78.2%
if 5.90000000000000023e150 < k < 9.60000000000000011e150Initial program 48.8%
Simplified50.2%
Taylor expanded in k around 0 51.3%
associate-*l/52.1%
Applied egg-rr52.1%
*-un-lft-identity52.1%
associate-/r/52.1%
Applied egg-rr52.1%
*-lft-identity52.1%
*-commutative52.1%
associate-*l/51.0%
associate-/l*51.6%
Simplified51.6%
if 9.60000000000000011e150 < k Initial program 37.1%
Simplified37.1%
Taylor expanded in k around 0 37.4%
associate-/l*37.1%
Simplified37.1%
Taylor expanded in k around inf 56.7%
times-frac56.7%
Simplified56.7%
add-cube-cbrt56.7%
pow356.7%
cbrt-prod56.7%
div-inv56.7%
cbrt-prod56.7%
unpow356.7%
add-cbrt-cube59.6%
pow-flip59.6%
metadata-eval59.6%
associate-/l*59.6%
tan-quot59.6%
Applied egg-rr59.6%
Taylor expanded in k around 0 59.7%
Final simplification73.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 (pow (/ k t_m) 2.0)))
(*
t_s
(if (<= t_m 1.3e-89)
(/
2.0
(/ (* (* t_m (pow k 2.0)) (pow (sin k) 2.0)) (* (pow l 2.0) (cos k))))
(if (<= t_m 2.1e-39)
(/
2.0
(*
(/ 1.0 l)
(* (* (tan k) (+ 2.0 t_2)) (* (sin k) (/ (pow t_m 3.0) l)))))
(if (<= t_m 5.1e+100)
(/
2.0
(*
(* (tan k) (+ 1.0 (+ t_2 1.0)))
(* (sin k) (* (/ (pow t_m 2.0) l) (/ t_m l)))))
(/
2.0
(pow
(* t_m (/ (* (cbrt 2.0) (pow (cbrt k) 2.0)) (pow (cbrt l) 2.0)))
3.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow((k / t_m), 2.0);
double tmp;
if (t_m <= 1.3e-89) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) * pow(sin(k), 2.0)) / (pow(l, 2.0) * cos(k)));
} else if (t_m <= 2.1e-39) {
tmp = 2.0 / ((1.0 / l) * ((tan(k) * (2.0 + t_2)) * (sin(k) * (pow(t_m, 3.0) / l))));
} else if (t_m <= 5.1e+100) {
tmp = 2.0 / ((tan(k) * (1.0 + (t_2 + 1.0))) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / l))));
} else {
tmp = 2.0 / pow((t_m * ((cbrt(2.0) * pow(cbrt(k), 2.0)) / pow(cbrt(l), 2.0))), 3.0);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.pow((k / t_m), 2.0);
double tmp;
if (t_m <= 1.3e-89) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) * Math.pow(Math.sin(k), 2.0)) / (Math.pow(l, 2.0) * Math.cos(k)));
} else if (t_m <= 2.1e-39) {
tmp = 2.0 / ((1.0 / l) * ((Math.tan(k) * (2.0 + t_2)) * (Math.sin(k) * (Math.pow(t_m, 3.0) / l))));
} else if (t_m <= 5.1e+100) {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (t_2 + 1.0))) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / l))));
} else {
tmp = 2.0 / Math.pow((t_m * ((Math.cbrt(2.0) * Math.pow(Math.cbrt(k), 2.0)) / Math.pow(Math.cbrt(l), 2.0))), 3.0);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(k / t_m) ^ 2.0 tmp = 0.0 if (t_m <= 1.3e-89) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) * (sin(k) ^ 2.0)) / Float64((l ^ 2.0) * cos(k)))); elseif (t_m <= 2.1e-39) tmp = Float64(2.0 / Float64(Float64(1.0 / l) * Float64(Float64(tan(k) * Float64(2.0 + t_2)) * Float64(sin(k) * Float64((t_m ^ 3.0) / l))))); elseif (t_m <= 5.1e+100) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(t_2 + 1.0))) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l))))); else tmp = Float64(2.0 / (Float64(t_m * Float64(Float64(cbrt(2.0) * (cbrt(k) ^ 2.0)) / (cbrt(l) ^ 2.0))) ^ 3.0)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.3e-89], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.1e-39], N[(2.0 / N[(N[(1.0 / l), $MachinePrecision] * N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.1e+100], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(t$95$2 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(t$95$m * N[(N[(N[Power[2.0, 1/3], $MachinePrecision] * N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.3 \cdot 10^{-89}:\\
\;\;\;\;\frac{2}{\frac{\left(t\_m \cdot {k}^{2}\right) \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}\\
\mathbf{elif}\;t\_m \leq 2.1 \cdot 10^{-39}:\\
\;\;\;\;\frac{2}{\frac{1}{\ell} \cdot \left(\left(\tan k \cdot \left(2 + t\_2\right)\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell}\right)\right)}\\
\mathbf{elif}\;t\_m \leq 5.1 \cdot 10^{+100}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(t\_2 + 1\right)\right)\right) \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot \frac{\sqrt[3]{2} \cdot {\left(\sqrt[3]{k}\right)}^{2}}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}}\\
\end{array}
\end{array}
\end{array}
if t < 1.2999999999999999e-89Initial program 41.4%
Simplified41.4%
Taylor expanded in t around 0 62.3%
associate-*r*62.4%
Simplified62.4%
if 1.2999999999999999e-89 < t < 2.09999999999999993e-39Initial program 54.8%
Simplified54.7%
associate-*l*54.6%
associate-/r*67.3%
associate-+r+67.3%
metadata-eval67.3%
associate-*l*67.4%
associate-*l/68.2%
clear-num68.2%
associate-*l*68.2%
Applied egg-rr68.2%
associate-/r/68.2%
associate-*r*68.1%
Simplified68.1%
if 2.09999999999999993e-39 < t < 5.1000000000000001e100Initial program 80.1%
Simplified80.1%
unpow380.1%
times-frac82.9%
pow282.9%
Applied egg-rr82.9%
if 5.1000000000000001e100 < t Initial program 61.3%
Simplified61.3%
add-cube-cbrt61.3%
pow361.3%
Applied egg-rr82.5%
associate-*l/82.7%
Applied egg-rr82.7%
associate-/l*82.7%
associate-*r*82.7%
Simplified82.7%
Taylor expanded in k around 0 67.3%
*-commutative67.3%
cbrt-prod67.3%
unpow267.3%
cbrt-prod81.8%
pow281.8%
Applied egg-rr81.8%
Final simplification67.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 5000000.0)
(/
2.0
(pow
(* (/ t_m (pow (cbrt l) 2.0)) (* (cbrt k) (* (cbrt k) (cbrt 2.0))))
3.0))
(if (<= k 5.8e+149)
(/
2.0
(/ (* (* t_m (pow k 2.0)) (pow (sin k) 2.0)) (* (pow l 2.0) (cos k))))
(/ 2.0 (pow (* (* k (cbrt (pow l -2.0))) (cbrt (* t_m k))) 3.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 5000000.0) {
tmp = 2.0 / pow(((t_m / pow(cbrt(l), 2.0)) * (cbrt(k) * (cbrt(k) * cbrt(2.0)))), 3.0);
} else if (k <= 5.8e+149) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) * pow(sin(k), 2.0)) / (pow(l, 2.0) * cos(k)));
} else {
tmp = 2.0 / pow(((k * cbrt(pow(l, -2.0))) * cbrt((t_m * k))), 3.0);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 5000000.0) {
tmp = 2.0 / Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * (Math.cbrt(k) * (Math.cbrt(k) * Math.cbrt(2.0)))), 3.0);
} else if (k <= 5.8e+149) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) * Math.pow(Math.sin(k), 2.0)) / (Math.pow(l, 2.0) * Math.cos(k)));
} else {
tmp = 2.0 / Math.pow(((k * Math.cbrt(Math.pow(l, -2.0))) * Math.cbrt((t_m * k))), 3.0);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 5000000.0) tmp = Float64(2.0 / (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * Float64(cbrt(k) * Float64(cbrt(k) * cbrt(2.0)))) ^ 3.0)); elseif (k <= 5.8e+149) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) * (sin(k) ^ 2.0)) / Float64((l ^ 2.0) * cos(k)))); else tmp = Float64(2.0 / (Float64(Float64(k * cbrt((l ^ -2.0))) * cbrt(Float64(t_m * k))) ^ 3.0)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 5000000.0], 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[k, 1/3], $MachinePrecision] * N[(N[Power[k, 1/3], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 5.8e+149], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(k * N[Power[N[Power[l, -2.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] * N[Power[N[(t$95$m * k), $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 5000000:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \left(\sqrt[3]{k} \cdot \left(\sqrt[3]{k} \cdot \sqrt[3]{2}\right)\right)\right)}^{3}}\\
\mathbf{elif}\;k \leq 5.8 \cdot 10^{+149}:\\
\;\;\;\;\frac{2}{\frac{\left(t\_m \cdot {k}^{2}\right) \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \sqrt[3]{{\ell}^{-2}}\right) \cdot \sqrt[3]{t\_m \cdot k}\right)}^{3}}\\
\end{array}
\end{array}
if k < 5e6Initial program 54.1%
Simplified54.1%
add-cube-cbrt54.0%
pow354.0%
Applied egg-rr69.8%
*-commutative69.8%
metadata-eval69.8%
associate-+r+69.8%
cbrt-prod81.1%
associate-+r+81.1%
metadata-eval81.1%
Applied egg-rr81.1%
Taylor expanded in k around 0 75.7%
Taylor expanded in k around 0 74.7%
if 5e6 < k < 5.8000000000000004e149Initial program 36.2%
Simplified36.2%
Taylor expanded in t around 0 73.1%
associate-*r*73.1%
Simplified73.1%
if 5.8000000000000004e149 < k Initial program 36.2%
Simplified36.2%
Taylor expanded in k around 0 36.4%
associate-/l*36.2%
Simplified36.2%
Taylor expanded in k around inf 55.6%
times-frac55.6%
Simplified55.6%
add-cube-cbrt55.6%
pow355.6%
cbrt-prod55.6%
div-inv55.6%
cbrt-prod55.6%
unpow355.6%
add-cbrt-cube58.4%
pow-flip58.4%
metadata-eval58.4%
associate-/l*58.4%
tan-quot58.4%
Applied egg-rr58.4%
Taylor expanded in k around 0 58.5%
Final simplification72.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (/ k t_m) 2.0)) (t_3 (/ (pow t_m 1.5) l)))
(*
t_s
(if (<= t_m 2.4e-89)
(/
2.0
(/ (* (* t_m (pow k 2.0)) (pow (sin k) 2.0)) (* (pow l 2.0) (cos k))))
(if (<= t_m 4.2e-39)
(/
2.0
(*
(/ 1.0 l)
(* (* (tan k) (+ 2.0 t_2)) (* (sin k) (/ (pow t_m 3.0) l)))))
(if (<= t_m 2.1e+167)
(/ 2.0 (* (* (tan k) (+ 1.0 (+ t_2 1.0))) (* (sin k) (pow t_3 2.0))))
(/ 2.0 (pow (* (sqrt 2.0) (* k t_3)) 2.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow((k / t_m), 2.0);
double t_3 = pow(t_m, 1.5) / l;
double tmp;
if (t_m <= 2.4e-89) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) * pow(sin(k), 2.0)) / (pow(l, 2.0) * cos(k)));
} else if (t_m <= 4.2e-39) {
tmp = 2.0 / ((1.0 / l) * ((tan(k) * (2.0 + t_2)) * (sin(k) * (pow(t_m, 3.0) / l))));
} else if (t_m <= 2.1e+167) {
tmp = 2.0 / ((tan(k) * (1.0 + (t_2 + 1.0))) * (sin(k) * pow(t_3, 2.0)));
} else {
tmp = 2.0 / pow((sqrt(2.0) * (k * t_3)), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_2 = (k / t_m) ** 2.0d0
t_3 = (t_m ** 1.5d0) / l
if (t_m <= 2.4d-89) then
tmp = 2.0d0 / (((t_m * (k ** 2.0d0)) * (sin(k) ** 2.0d0)) / ((l ** 2.0d0) * cos(k)))
else if (t_m <= 4.2d-39) then
tmp = 2.0d0 / ((1.0d0 / l) * ((tan(k) * (2.0d0 + t_2)) * (sin(k) * ((t_m ** 3.0d0) / l))))
else if (t_m <= 2.1d+167) then
tmp = 2.0d0 / ((tan(k) * (1.0d0 + (t_2 + 1.0d0))) * (sin(k) * (t_3 ** 2.0d0)))
else
tmp = 2.0d0 / ((sqrt(2.0d0) * (k * t_3)) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.pow((k / t_m), 2.0);
double t_3 = Math.pow(t_m, 1.5) / l;
double tmp;
if (t_m <= 2.4e-89) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) * Math.pow(Math.sin(k), 2.0)) / (Math.pow(l, 2.0) * Math.cos(k)));
} else if (t_m <= 4.2e-39) {
tmp = 2.0 / ((1.0 / l) * ((Math.tan(k) * (2.0 + t_2)) * (Math.sin(k) * (Math.pow(t_m, 3.0) / l))));
} else if (t_m <= 2.1e+167) {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (t_2 + 1.0))) * (Math.sin(k) * Math.pow(t_3, 2.0)));
} else {
tmp = 2.0 / Math.pow((Math.sqrt(2.0) * (k * t_3)), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = math.pow((k / t_m), 2.0) t_3 = math.pow(t_m, 1.5) / l tmp = 0 if t_m <= 2.4e-89: tmp = 2.0 / (((t_m * math.pow(k, 2.0)) * math.pow(math.sin(k), 2.0)) / (math.pow(l, 2.0) * math.cos(k))) elif t_m <= 4.2e-39: tmp = 2.0 / ((1.0 / l) * ((math.tan(k) * (2.0 + t_2)) * (math.sin(k) * (math.pow(t_m, 3.0) / l)))) elif t_m <= 2.1e+167: tmp = 2.0 / ((math.tan(k) * (1.0 + (t_2 + 1.0))) * (math.sin(k) * math.pow(t_3, 2.0))) else: tmp = 2.0 / math.pow((math.sqrt(2.0) * (k * t_3)), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(k / t_m) ^ 2.0 t_3 = Float64((t_m ^ 1.5) / l) tmp = 0.0 if (t_m <= 2.4e-89) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) * (sin(k) ^ 2.0)) / Float64((l ^ 2.0) * cos(k)))); elseif (t_m <= 4.2e-39) tmp = Float64(2.0 / Float64(Float64(1.0 / l) * Float64(Float64(tan(k) * Float64(2.0 + t_2)) * Float64(sin(k) * Float64((t_m ^ 3.0) / l))))); elseif (t_m <= 2.1e+167) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(t_2 + 1.0))) * Float64(sin(k) * (t_3 ^ 2.0)))); else tmp = Float64(2.0 / (Float64(sqrt(2.0) * Float64(k * t_3)) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = (k / t_m) ^ 2.0; t_3 = (t_m ^ 1.5) / l; tmp = 0.0; if (t_m <= 2.4e-89) tmp = 2.0 / (((t_m * (k ^ 2.0)) * (sin(k) ^ 2.0)) / ((l ^ 2.0) * cos(k))); elseif (t_m <= 4.2e-39) tmp = 2.0 / ((1.0 / l) * ((tan(k) * (2.0 + t_2)) * (sin(k) * ((t_m ^ 3.0) / l)))); elseif (t_m <= 2.1e+167) tmp = 2.0 / ((tan(k) * (1.0 + (t_2 + 1.0))) * (sin(k) * (t_3 ^ 2.0))); else tmp = 2.0 / ((sqrt(2.0) * (k * t_3)) ^ 2.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.4e-89], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.2e-39], N[(2.0 / N[(N[(1.0 / l), $MachinePrecision] * N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.1e+167], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(t$95$2 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[Sqrt[2.0], $MachinePrecision] * N[(k * t$95$3), $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 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t_3 := \frac{{t\_m}^{1.5}}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.4 \cdot 10^{-89}:\\
\;\;\;\;\frac{2}{\frac{\left(t\_m \cdot {k}^{2}\right) \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}\\
\mathbf{elif}\;t\_m \leq 4.2 \cdot 10^{-39}:\\
\;\;\;\;\frac{2}{\frac{1}{\ell} \cdot \left(\left(\tan k \cdot \left(2 + t\_2\right)\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell}\right)\right)}\\
\mathbf{elif}\;t\_m \leq 2.1 \cdot 10^{+167}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(t\_2 + 1\right)\right)\right) \cdot \left(\sin k \cdot {t\_3}^{2}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\sqrt{2} \cdot \left(k \cdot t\_3\right)\right)}^{2}}\\
\end{array}
\end{array}
\end{array}
if t < 2.40000000000000016e-89Initial program 41.4%
Simplified41.4%
Taylor expanded in t around 0 62.3%
associate-*r*62.4%
Simplified62.4%
if 2.40000000000000016e-89 < t < 4.19999999999999987e-39Initial program 54.8%
Simplified54.7%
associate-*l*54.6%
associate-/r*67.3%
associate-+r+67.3%
metadata-eval67.3%
associate-*l*67.4%
associate-*l/68.2%
clear-num68.2%
associate-*l*68.2%
Applied egg-rr68.2%
associate-/r/68.2%
associate-*r*68.1%
Simplified68.1%
if 4.19999999999999987e-39 < t < 2.0999999999999999e167Initial program 68.1%
Simplified68.0%
add-sqr-sqrt68.0%
pow268.0%
sqrt-div68.1%
sqrt-pow168.9%
metadata-eval68.9%
sqrt-prod57.1%
add-sqr-sqrt87.8%
Applied egg-rr87.8%
if 2.0999999999999999e167 < t Initial program 68.1%
Simplified65.8%
Taylor expanded in k around 0 65.8%
add-sqr-sqrt65.8%
pow265.8%
associate-*r*65.8%
sqrt-prod65.8%
associate-/l/61.5%
unpow261.5%
div-inv61.5%
pow-flip61.5%
metadata-eval61.5%
sqrt-pow168.1%
metadata-eval68.1%
pow168.1%
Applied egg-rr68.1%
pow168.1%
*-commutative68.1%
sqrt-prod68.1%
sqrt-prod68.1%
sqrt-pow171.3%
metadata-eval71.3%
sqrt-pow175.7%
metadata-eval75.7%
unpow-175.7%
Applied egg-rr75.7%
unpow175.7%
*-commutative75.7%
*-commutative75.7%
associate-*l*75.7%
associate-*r/75.7%
*-rgt-identity75.7%
Simplified75.7%
Final simplification67.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1.7e-28)
(/ 2.0 (pow (* (sqrt 2.0) (* k (/ (pow t_m 1.5) l))) 2.0))
(if (<= k 2e+152)
(/
2.0
(/ (* (* t_m (pow k 2.0)) (pow (sin k) 2.0)) (* (pow l 2.0) (cos k))))
(/ 2.0 (pow (* (* k (cbrt (pow l -2.0))) (cbrt (* t_m k))) 3.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.7e-28) {
tmp = 2.0 / pow((sqrt(2.0) * (k * (pow(t_m, 1.5) / l))), 2.0);
} else if (k <= 2e+152) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) * pow(sin(k), 2.0)) / (pow(l, 2.0) * cos(k)));
} else {
tmp = 2.0 / pow(((k * cbrt(pow(l, -2.0))) * cbrt((t_m * k))), 3.0);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.7e-28) {
tmp = 2.0 / Math.pow((Math.sqrt(2.0) * (k * (Math.pow(t_m, 1.5) / l))), 2.0);
} else if (k <= 2e+152) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) * Math.pow(Math.sin(k), 2.0)) / (Math.pow(l, 2.0) * Math.cos(k)));
} else {
tmp = 2.0 / Math.pow(((k * Math.cbrt(Math.pow(l, -2.0))) * Math.cbrt((t_m * k))), 3.0);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.7e-28) tmp = Float64(2.0 / (Float64(sqrt(2.0) * Float64(k * Float64((t_m ^ 1.5) / l))) ^ 2.0)); elseif (k <= 2e+152) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) * (sin(k) ^ 2.0)) / Float64((l ^ 2.0) * cos(k)))); else tmp = Float64(2.0 / (Float64(Float64(k * cbrt((l ^ -2.0))) * cbrt(Float64(t_m * k))) ^ 3.0)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.7e-28], N[(2.0 / N[Power[N[(N[Sqrt[2.0], $MachinePrecision] * N[(k * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2e+152], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(k * N[Power[N[Power[l, -2.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] * N[Power[N[(t$95$m * k), $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.7 \cdot 10^{-28}:\\
\;\;\;\;\frac{2}{{\left(\sqrt{2} \cdot \left(k \cdot \frac{{t\_m}^{1.5}}{\ell}\right)\right)}^{2}}\\
\mathbf{elif}\;k \leq 2 \cdot 10^{+152}:\\
\;\;\;\;\frac{2}{\frac{\left(t\_m \cdot {k}^{2}\right) \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \sqrt[3]{{\ell}^{-2}}\right) \cdot \sqrt[3]{t\_m \cdot k}\right)}^{3}}\\
\end{array}
\end{array}
if k < 1.7e-28Initial program 54.0%
Simplified54.1%
Taylor expanded in k around 0 55.8%
add-sqr-sqrt28.4%
pow228.4%
associate-*r*28.4%
sqrt-prod28.4%
associate-/l/27.5%
unpow227.5%
div-inv27.5%
pow-flip27.5%
metadata-eval27.5%
sqrt-pow129.4%
metadata-eval29.4%
pow129.4%
Applied egg-rr29.4%
pow129.4%
*-commutative29.4%
sqrt-prod29.4%
sqrt-prod30.0%
sqrt-pow128.8%
metadata-eval28.8%
sqrt-pow131.7%
metadata-eval31.7%
unpow-131.7%
Applied egg-rr31.7%
unpow131.7%
*-commutative31.7%
*-commutative31.7%
associate-*l*31.7%
associate-*r/31.7%
*-rgt-identity31.7%
Simplified31.7%
if 1.7e-28 < k < 2.0000000000000001e152Initial program 39.6%
Simplified39.6%
Taylor expanded in t around 0 71.3%
associate-*r*71.3%
Simplified71.3%
if 2.0000000000000001e152 < k Initial program 37.1%
Simplified37.1%
Taylor expanded in k around 0 37.4%
associate-/l*37.1%
Simplified37.1%
Taylor expanded in k around inf 56.7%
times-frac56.7%
Simplified56.7%
add-cube-cbrt56.7%
pow356.7%
cbrt-prod56.7%
div-inv56.7%
cbrt-prod56.7%
unpow356.7%
add-cbrt-cube59.6%
pow-flip59.6%
metadata-eval59.6%
associate-/l*59.6%
tan-quot59.6%
Applied egg-rr59.6%
Taylor expanded in k around 0 59.7%
Final simplification43.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 (/ k t_m) 2.0)))
(*
t_s
(if (<= t_m 1.4e-121)
(/ 2.0 (pow (* (pow k 2.0) (/ (sqrt t_m) l)) 2.0))
(if (<= t_m 6.8e-22)
(/
2.0
(*
(* (tan k) (+ 1.0 (+ t_2 1.0)))
(* (sin k) (* (/ (pow t_m 2.0) l) (/ t_m l)))))
(if (<= t_m 5.3e+102)
(/
2.0
(/ (* (* (tan k) (+ 2.0 t_2)) (* (sin k) (/ (pow t_m 3.0) l))) l))
(/ 2.0 (pow (* (sqrt 2.0) (* k (/ (pow t_m 1.5) l))) 2.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow((k / t_m), 2.0);
double tmp;
if (t_m <= 1.4e-121) {
tmp = 2.0 / pow((pow(k, 2.0) * (sqrt(t_m) / l)), 2.0);
} else if (t_m <= 6.8e-22) {
tmp = 2.0 / ((tan(k) * (1.0 + (t_2 + 1.0))) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / l))));
} else if (t_m <= 5.3e+102) {
tmp = 2.0 / (((tan(k) * (2.0 + t_2)) * (sin(k) * (pow(t_m, 3.0) / l))) / l);
} else {
tmp = 2.0 / pow((sqrt(2.0) * (k * (pow(t_m, 1.5) / l))), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: tmp
t_2 = (k / t_m) ** 2.0d0
if (t_m <= 1.4d-121) then
tmp = 2.0d0 / (((k ** 2.0d0) * (sqrt(t_m) / l)) ** 2.0d0)
else if (t_m <= 6.8d-22) then
tmp = 2.0d0 / ((tan(k) * (1.0d0 + (t_2 + 1.0d0))) * (sin(k) * (((t_m ** 2.0d0) / l) * (t_m / l))))
else if (t_m <= 5.3d+102) then
tmp = 2.0d0 / (((tan(k) * (2.0d0 + t_2)) * (sin(k) * ((t_m ** 3.0d0) / l))) / l)
else
tmp = 2.0d0 / ((sqrt(2.0d0) * (k * ((t_m ** 1.5d0) / l))) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.pow((k / t_m), 2.0);
double tmp;
if (t_m <= 1.4e-121) {
tmp = 2.0 / Math.pow((Math.pow(k, 2.0) * (Math.sqrt(t_m) / l)), 2.0);
} else if (t_m <= 6.8e-22) {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (t_2 + 1.0))) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / l))));
} else if (t_m <= 5.3e+102) {
tmp = 2.0 / (((Math.tan(k) * (2.0 + t_2)) * (Math.sin(k) * (Math.pow(t_m, 3.0) / l))) / l);
} else {
tmp = 2.0 / Math.pow((Math.sqrt(2.0) * (k * (Math.pow(t_m, 1.5) / l))), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = math.pow((k / t_m), 2.0) tmp = 0 if t_m <= 1.4e-121: tmp = 2.0 / math.pow((math.pow(k, 2.0) * (math.sqrt(t_m) / l)), 2.0) elif t_m <= 6.8e-22: tmp = 2.0 / ((math.tan(k) * (1.0 + (t_2 + 1.0))) * (math.sin(k) * ((math.pow(t_m, 2.0) / l) * (t_m / l)))) elif t_m <= 5.3e+102: tmp = 2.0 / (((math.tan(k) * (2.0 + t_2)) * (math.sin(k) * (math.pow(t_m, 3.0) / l))) / l) else: tmp = 2.0 / math.pow((math.sqrt(2.0) * (k * (math.pow(t_m, 1.5) / l))), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(k / t_m) ^ 2.0 tmp = 0.0 if (t_m <= 1.4e-121) tmp = Float64(2.0 / (Float64((k ^ 2.0) * Float64(sqrt(t_m) / l)) ^ 2.0)); elseif (t_m <= 6.8e-22) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(t_2 + 1.0))) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l))))); elseif (t_m <= 5.3e+102) tmp = Float64(2.0 / Float64(Float64(Float64(tan(k) * Float64(2.0 + t_2)) * Float64(sin(k) * Float64((t_m ^ 3.0) / l))) / l)); else tmp = Float64(2.0 / (Float64(sqrt(2.0) * Float64(k * Float64((t_m ^ 1.5) / l))) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = (k / t_m) ^ 2.0; tmp = 0.0; if (t_m <= 1.4e-121) tmp = 2.0 / (((k ^ 2.0) * (sqrt(t_m) / l)) ^ 2.0); elseif (t_m <= 6.8e-22) tmp = 2.0 / ((tan(k) * (1.0 + (t_2 + 1.0))) * (sin(k) * (((t_m ^ 2.0) / l) * (t_m / l)))); elseif (t_m <= 5.3e+102) tmp = 2.0 / (((tan(k) * (2.0 + t_2)) * (sin(k) * ((t_m ^ 3.0) / l))) / l); else tmp = 2.0 / ((sqrt(2.0) * (k * ((t_m ^ 1.5) / l))) ^ 2.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.4e-121], N[(2.0 / N[Power[N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Sqrt[t$95$m], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 6.8e-22], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(t$95$2 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.3e+102], N[(2.0 / N[(N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[Sqrt[2.0], $MachinePrecision] * N[(k * N[(N[Power[t$95$m, 1.5], $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 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.4 \cdot 10^{-121}:\\
\;\;\;\;\frac{2}{{\left({k}^{2} \cdot \frac{\sqrt{t\_m}}{\ell}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 6.8 \cdot 10^{-22}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(t\_2 + 1\right)\right)\right) \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\
\mathbf{elif}\;t\_m \leq 5.3 \cdot 10^{+102}:\\
\;\;\;\;\frac{2}{\frac{\left(\tan k \cdot \left(2 + t\_2\right)\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell}\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\sqrt{2} \cdot \left(k \cdot \frac{{t\_m}^{1.5}}{\ell}\right)\right)}^{2}}\\
\end{array}
\end{array}
\end{array}
if t < 1.4000000000000001e-121Initial program 42.2%
Simplified42.2%
Taylor expanded in k around 0 40.9%
associate-/l*41.2%
Simplified41.2%
Taylor expanded in k around inf 53.1%
times-frac53.1%
Simplified53.1%
Taylor expanded in k around 0 52.4%
associate-/l*52.3%
Simplified52.3%
add-sqr-sqrt12.5%
pow212.5%
sqrt-prod12.5%
sqrt-pow113.7%
metadata-eval13.7%
sqrt-div11.4%
sqrt-pow112.5%
metadata-eval12.5%
pow112.5%
Applied egg-rr12.5%
if 1.4000000000000001e-121 < t < 6.7999999999999997e-22Initial program 48.3%
Simplified48.3%
unpow348.3%
times-frac62.9%
pow262.9%
Applied egg-rr62.9%
if 6.7999999999999997e-22 < t < 5.2999999999999997e102Initial program 76.6%
Simplified76.5%
associate-*l*76.4%
associate-/r*81.1%
associate-+r+81.1%
metadata-eval81.1%
associate-*l*81.1%
associate-*l/85.8%
associate-*l*85.8%
Applied egg-rr85.8%
associate-*r*85.9%
Simplified85.9%
if 5.2999999999999997e102 < t Initial program 62.8%
Simplified58.8%
Taylor expanded in k around 0 58.8%
add-sqr-sqrt58.8%
pow258.8%
associate-*r*58.8%
sqrt-prod58.8%
associate-/l/55.1%
unpow255.1%
div-inv55.1%
pow-flip55.1%
metadata-eval55.1%
sqrt-pow162.8%
metadata-eval62.8%
pow162.8%
Applied egg-rr62.8%
pow162.8%
*-commutative62.8%
sqrt-prod62.8%
sqrt-prod62.8%
sqrt-pow165.8%
metadata-eval65.8%
sqrt-pow173.8%
metadata-eval73.8%
unpow-173.8%
Applied egg-rr73.8%
unpow173.8%
*-commutative73.8%
*-commutative73.8%
associate-*l*73.8%
associate-*r/73.8%
*-rgt-identity73.8%
Simplified73.8%
Final simplification32.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 4.1e-95)
(/ 2.0 (pow (* (pow k 2.0) (/ (sqrt t_m) l)) 2.0))
(if (<= t_m 1.66e-46)
(/ 2.0 (pow (* k (* (/ (sqrt 2.0) l) (sqrt (pow t_m 3.0)))) 2.0))
(if (<= t_m 3.4e+31)
(*
(/ (* 2.0 l) (* (pow t_m 3.0) (* (sin k) (tan k))))
(/ l (+ 2.0 (pow (/ k t_m) 2.0))))
(/ 2.0 (pow (* (sqrt 2.0) (* k (/ (pow t_m 1.5) l))) 2.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4.1e-95) {
tmp = 2.0 / pow((pow(k, 2.0) * (sqrt(t_m) / l)), 2.0);
} else if (t_m <= 1.66e-46) {
tmp = 2.0 / pow((k * ((sqrt(2.0) / l) * sqrt(pow(t_m, 3.0)))), 2.0);
} else if (t_m <= 3.4e+31) {
tmp = ((2.0 * l) / (pow(t_m, 3.0) * (sin(k) * tan(k)))) * (l / (2.0 + pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / pow((sqrt(2.0) * (k * (pow(t_m, 1.5) / l))), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 4.1d-95) then
tmp = 2.0d0 / (((k ** 2.0d0) * (sqrt(t_m) / l)) ** 2.0d0)
else if (t_m <= 1.66d-46) then
tmp = 2.0d0 / ((k * ((sqrt(2.0d0) / l) * sqrt((t_m ** 3.0d0)))) ** 2.0d0)
else if (t_m <= 3.4d+31) then
tmp = ((2.0d0 * l) / ((t_m ** 3.0d0) * (sin(k) * tan(k)))) * (l / (2.0d0 + ((k / t_m) ** 2.0d0)))
else
tmp = 2.0d0 / ((sqrt(2.0d0) * (k * ((t_m ** 1.5d0) / l))) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4.1e-95) {
tmp = 2.0 / Math.pow((Math.pow(k, 2.0) * (Math.sqrt(t_m) / l)), 2.0);
} else if (t_m <= 1.66e-46) {
tmp = 2.0 / Math.pow((k * ((Math.sqrt(2.0) / l) * Math.sqrt(Math.pow(t_m, 3.0)))), 2.0);
} else if (t_m <= 3.4e+31) {
tmp = ((2.0 * l) / (Math.pow(t_m, 3.0) * (Math.sin(k) * Math.tan(k)))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / Math.pow((Math.sqrt(2.0) * (k * (Math.pow(t_m, 1.5) / l))), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 4.1e-95: tmp = 2.0 / math.pow((math.pow(k, 2.0) * (math.sqrt(t_m) / l)), 2.0) elif t_m <= 1.66e-46: tmp = 2.0 / math.pow((k * ((math.sqrt(2.0) / l) * math.sqrt(math.pow(t_m, 3.0)))), 2.0) elif t_m <= 3.4e+31: tmp = ((2.0 * l) / (math.pow(t_m, 3.0) * (math.sin(k) * math.tan(k)))) * (l / (2.0 + math.pow((k / t_m), 2.0))) else: tmp = 2.0 / math.pow((math.sqrt(2.0) * (k * (math.pow(t_m, 1.5) / l))), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 4.1e-95) tmp = Float64(2.0 / (Float64((k ^ 2.0) * Float64(sqrt(t_m) / l)) ^ 2.0)); elseif (t_m <= 1.66e-46) tmp = Float64(2.0 / (Float64(k * Float64(Float64(sqrt(2.0) / l) * sqrt((t_m ^ 3.0)))) ^ 2.0)); elseif (t_m <= 3.4e+31) tmp = Float64(Float64(Float64(2.0 * l) / Float64((t_m ^ 3.0) * Float64(sin(k) * tan(k)))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); else tmp = Float64(2.0 / (Float64(sqrt(2.0) * Float64(k * Float64((t_m ^ 1.5) / l))) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 4.1e-95) tmp = 2.0 / (((k ^ 2.0) * (sqrt(t_m) / l)) ^ 2.0); elseif (t_m <= 1.66e-46) tmp = 2.0 / ((k * ((sqrt(2.0) / l) * sqrt((t_m ^ 3.0)))) ^ 2.0); elseif (t_m <= 3.4e+31) tmp = ((2.0 * l) / ((t_m ^ 3.0) * (sin(k) * tan(k)))) * (l / (2.0 + ((k / t_m) ^ 2.0))); else tmp = 2.0 / ((sqrt(2.0) * (k * ((t_m ^ 1.5) / l))) ^ 2.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 4.1e-95], N[(2.0 / N[Power[N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Sqrt[t$95$m], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.66e-46], N[(2.0 / N[Power[N[(k * N[(N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Power[t$95$m, 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.4e+31], N[(N[(N[(2.0 * l), $MachinePrecision] / N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[Sqrt[2.0], $MachinePrecision] * N[(k * N[(N[Power[t$95$m, 1.5], $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)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.1 \cdot 10^{-95}:\\
\;\;\;\;\frac{2}{{\left({k}^{2} \cdot \frac{\sqrt{t\_m}}{\ell}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 1.66 \cdot 10^{-46}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \left(\frac{\sqrt{2}}{\ell} \cdot \sqrt{{t\_m}^{3}}\right)\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 3.4 \cdot 10^{+31}:\\
\;\;\;\;\frac{2 \cdot \ell}{{t\_m}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\sqrt{2} \cdot \left(k \cdot \frac{{t\_m}^{1.5}}{\ell}\right)\right)}^{2}}\\
\end{array}
\end{array}
if t < 4.0999999999999997e-95Initial program 41.3%
Simplified41.3%
Taylor expanded in k around 0 40.0%
associate-/l*40.2%
Simplified40.2%
Taylor expanded in k around inf 52.5%
times-frac52.6%
Simplified52.6%
Taylor expanded in k around 0 51.9%
associate-/l*51.7%
Simplified51.7%
add-sqr-sqrt12.9%
pow212.9%
sqrt-prod12.8%
sqrt-pow114.0%
metadata-eval14.0%
sqrt-div11.8%
sqrt-pow112.9%
metadata-eval12.9%
pow112.9%
Applied egg-rr12.9%
if 4.0999999999999997e-95 < t < 1.6599999999999999e-46Initial program 54.8%
Simplified60.9%
Taylor expanded in k around 0 50.2%
add-sqr-sqrt50.2%
pow250.2%
associate-*r*50.2%
sqrt-prod50.2%
associate-/l/50.4%
unpow250.4%
div-inv50.4%
pow-flip50.4%
metadata-eval50.4%
sqrt-pow150.0%
metadata-eval50.0%
pow150.0%
Applied egg-rr50.0%
Taylor expanded in t around 0 54.4%
if 1.6599999999999999e-46 < t < 3.3999999999999998e31Initial program 69.5%
Simplified67.7%
associate-*r*74.5%
*-un-lft-identity74.5%
times-frac81.2%
associate-*r*81.0%
Applied egg-rr81.0%
/-rgt-identity81.0%
associate-*l/80.7%
associate-*l*81.0%
Simplified81.0%
if 3.3999999999999998e31 < t Initial program 67.0%
Simplified65.7%
Taylor expanded in k around 0 63.8%
add-sqr-sqrt63.8%
pow263.8%
associate-*r*63.8%
sqrt-prod63.8%
associate-/l/60.8%
unpow260.8%
div-inv60.8%
pow-flip60.8%
metadata-eval60.8%
sqrt-pow166.9%
metadata-eval66.9%
pow166.9%
Applied egg-rr66.9%
pow166.9%
*-commutative66.9%
sqrt-prod66.9%
sqrt-prod68.8%
sqrt-pow171.2%
metadata-eval71.2%
sqrt-pow177.5%
metadata-eval77.5%
unpow-177.5%
Applied egg-rr77.5%
unpow177.5%
*-commutative77.5%
*-commutative77.5%
associate-*l*77.5%
associate-*r/77.5%
*-rgt-identity77.5%
Simplified77.5%
Final simplification32.2%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 3.4e-113)
(/ 2.0 (pow (* (pow k 2.0) (/ (sqrt t_m) l)) 2.0))
(if (<= t_m 7.5e+29)
(/
2.0
(/
(*
(* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
(* (sin k) (/ (pow t_m 3.0) l)))
l))
(/ 2.0 (pow (* (sqrt 2.0) (* k (/ (pow t_m 1.5) l))) 2.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3.4e-113) {
tmp = 2.0 / pow((pow(k, 2.0) * (sqrt(t_m) / l)), 2.0);
} else if (t_m <= 7.5e+29) {
tmp = 2.0 / (((tan(k) * (2.0 + pow((k / t_m), 2.0))) * (sin(k) * (pow(t_m, 3.0) / l))) / l);
} else {
tmp = 2.0 / pow((sqrt(2.0) * (k * (pow(t_m, 1.5) / l))), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 3.4d-113) then
tmp = 2.0d0 / (((k ** 2.0d0) * (sqrt(t_m) / l)) ** 2.0d0)
else if (t_m <= 7.5d+29) then
tmp = 2.0d0 / (((tan(k) * (2.0d0 + ((k / t_m) ** 2.0d0))) * (sin(k) * ((t_m ** 3.0d0) / l))) / l)
else
tmp = 2.0d0 / ((sqrt(2.0d0) * (k * ((t_m ** 1.5d0) / l))) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3.4e-113) {
tmp = 2.0 / Math.pow((Math.pow(k, 2.0) * (Math.sqrt(t_m) / l)), 2.0);
} else if (t_m <= 7.5e+29) {
tmp = 2.0 / (((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))) * (Math.sin(k) * (Math.pow(t_m, 3.0) / l))) / l);
} else {
tmp = 2.0 / Math.pow((Math.sqrt(2.0) * (k * (Math.pow(t_m, 1.5) / l))), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 3.4e-113: tmp = 2.0 / math.pow((math.pow(k, 2.0) * (math.sqrt(t_m) / l)), 2.0) elif t_m <= 7.5e+29: tmp = 2.0 / (((math.tan(k) * (2.0 + math.pow((k / t_m), 2.0))) * (math.sin(k) * (math.pow(t_m, 3.0) / l))) / l) else: tmp = 2.0 / math.pow((math.sqrt(2.0) * (k * (math.pow(t_m, 1.5) / l))), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 3.4e-113) tmp = Float64(2.0 / (Float64((k ^ 2.0) * Float64(sqrt(t_m) / l)) ^ 2.0)); elseif (t_m <= 7.5e+29) tmp = Float64(2.0 / Float64(Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(sin(k) * Float64((t_m ^ 3.0) / l))) / l)); else tmp = Float64(2.0 / (Float64(sqrt(2.0) * Float64(k * Float64((t_m ^ 1.5) / l))) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 3.4e-113) tmp = 2.0 / (((k ^ 2.0) * (sqrt(t_m) / l)) ^ 2.0); elseif (t_m <= 7.5e+29) tmp = 2.0 / (((tan(k) * (2.0 + ((k / t_m) ^ 2.0))) * (sin(k) * ((t_m ^ 3.0) / l))) / l); else tmp = 2.0 / ((sqrt(2.0) * (k * ((t_m ^ 1.5) / l))) ^ 2.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3.4e-113], N[(2.0 / N[Power[N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Sqrt[t$95$m], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 7.5e+29], N[(2.0 / N[(N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[Sqrt[2.0], $MachinePrecision] * N[(k * N[(N[Power[t$95$m, 1.5], $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)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.4 \cdot 10^{-113}:\\
\;\;\;\;\frac{2}{{\left({k}^{2} \cdot \frac{\sqrt{t\_m}}{\ell}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 7.5 \cdot 10^{+29}:\\
\;\;\;\;\frac{2}{\frac{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell}\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\sqrt{2} \cdot \left(k \cdot \frac{{t\_m}^{1.5}}{\ell}\right)\right)}^{2}}\\
\end{array}
\end{array}
if t < 3.4000000000000002e-113Initial program 41.7%
Simplified41.8%
Taylor expanded in k around 0 40.4%
associate-/l*40.7%
Simplified40.7%
Taylor expanded in k around inf 53.1%
times-frac53.1%
Simplified53.1%
Taylor expanded in k around 0 52.4%
associate-/l*52.3%
Simplified52.3%
add-sqr-sqrt13.0%
pow213.0%
sqrt-prod13.0%
sqrt-pow114.2%
metadata-eval14.2%
sqrt-div11.9%
sqrt-pow113.0%
metadata-eval13.0%
pow113.0%
Applied egg-rr13.0%
if 3.4000000000000002e-113 < t < 7.49999999999999945e29Initial program 58.3%
Simplified58.2%
associate-*l*57.4%
associate-/r*63.4%
associate-+r+63.4%
metadata-eval63.4%
associate-*l*63.4%
associate-*l/66.9%
associate-*l*66.9%
Applied egg-rr66.9%
associate-*r*66.8%
Simplified66.8%
if 7.49999999999999945e29 < t Initial program 67.0%
Simplified65.7%
Taylor expanded in k around 0 63.8%
add-sqr-sqrt63.8%
pow263.8%
associate-*r*63.8%
sqrt-prod63.8%
associate-/l/60.8%
unpow260.8%
div-inv60.8%
pow-flip60.8%
metadata-eval60.8%
sqrt-pow166.9%
metadata-eval66.9%
pow166.9%
Applied egg-rr66.9%
pow166.9%
*-commutative66.9%
sqrt-prod66.9%
sqrt-prod68.8%
sqrt-pow171.2%
metadata-eval71.2%
sqrt-pow177.5%
metadata-eval77.5%
unpow-177.5%
Applied egg-rr77.5%
unpow177.5%
*-commutative77.5%
*-commutative77.5%
associate-*l*77.5%
associate-*r/77.5%
*-rgt-identity77.5%
Simplified77.5%
Final simplification32.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 4.5e-124)
(/ 2.0 (pow (* (pow k 2.0) (/ (sqrt t_m) l)) 2.0))
(/ 2.0 (pow (* (sqrt 2.0) (* k (/ (pow t_m 1.5) l))) 2.0)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4.5e-124) {
tmp = 2.0 / pow((pow(k, 2.0) * (sqrt(t_m) / l)), 2.0);
} else {
tmp = 2.0 / pow((sqrt(2.0) * (k * (pow(t_m, 1.5) / l))), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 4.5d-124) then
tmp = 2.0d0 / (((k ** 2.0d0) * (sqrt(t_m) / l)) ** 2.0d0)
else
tmp = 2.0d0 / ((sqrt(2.0d0) * (k * ((t_m ** 1.5d0) / l))) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4.5e-124) {
tmp = 2.0 / Math.pow((Math.pow(k, 2.0) * (Math.sqrt(t_m) / l)), 2.0);
} else {
tmp = 2.0 / Math.pow((Math.sqrt(2.0) * (k * (Math.pow(t_m, 1.5) / l))), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 4.5e-124: tmp = 2.0 / math.pow((math.pow(k, 2.0) * (math.sqrt(t_m) / l)), 2.0) else: tmp = 2.0 / math.pow((math.sqrt(2.0) * (k * (math.pow(t_m, 1.5) / l))), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 4.5e-124) tmp = Float64(2.0 / (Float64((k ^ 2.0) * Float64(sqrt(t_m) / l)) ^ 2.0)); else tmp = Float64(2.0 / (Float64(sqrt(2.0) * Float64(k * Float64((t_m ^ 1.5) / l))) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 4.5e-124) tmp = 2.0 / (((k ^ 2.0) * (sqrt(t_m) / l)) ^ 2.0); else tmp = 2.0 / ((sqrt(2.0) * (k * ((t_m ^ 1.5) / l))) ^ 2.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 4.5e-124], N[(2.0 / N[Power[N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Sqrt[t$95$m], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[Sqrt[2.0], $MachinePrecision] * N[(k * N[(N[Power[t$95$m, 1.5], $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)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.5 \cdot 10^{-124}:\\
\;\;\;\;\frac{2}{{\left({k}^{2} \cdot \frac{\sqrt{t\_m}}{\ell}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\sqrt{2} \cdot \left(k \cdot \frac{{t\_m}^{1.5}}{\ell}\right)\right)}^{2}}\\
\end{array}
\end{array}
if t < 4.4999999999999996e-124Initial program 42.2%
Simplified42.2%
Taylor expanded in k around 0 40.9%
associate-/l*41.2%
Simplified41.2%
Taylor expanded in k around inf 53.1%
times-frac53.1%
Simplified53.1%
Taylor expanded in k around 0 52.4%
associate-/l*52.3%
Simplified52.3%
add-sqr-sqrt12.5%
pow212.5%
sqrt-prod12.5%
sqrt-pow113.7%
metadata-eval13.7%
sqrt-div11.4%
sqrt-pow112.5%
metadata-eval12.5%
pow112.5%
Applied egg-rr12.5%
if 4.4999999999999996e-124 < t Initial program 62.1%
Simplified63.3%
Taylor expanded in k around 0 58.4%
add-sqr-sqrt58.4%
pow258.4%
associate-*r*58.4%
sqrt-prod58.4%
associate-/l/55.5%
unpow255.5%
div-inv55.3%
pow-flip55.3%
metadata-eval55.3%
sqrt-pow159.0%
metadata-eval59.0%
pow159.0%
Applied egg-rr59.0%
pow159.0%
*-commutative59.0%
sqrt-prod59.0%
sqrt-prod60.2%
sqrt-pow162.8%
metadata-eval62.8%
sqrt-pow169.8%
metadata-eval69.8%
unpow-169.8%
Applied egg-rr69.8%
unpow169.8%
*-commutative69.8%
*-commutative69.8%
associate-*l*69.8%
associate-*r/69.8%
*-rgt-identity69.8%
Simplified69.8%
Final simplification31.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (* 2.0 (pow k 2.0))))
(*
t_s
(if (<= t_m 3.1e-106)
(/ 2.0 (pow (* (pow k 2.0) (/ (sqrt t_m) l)) 2.0))
(if (<= t_m 2e+31)
(/ 2.0 (* (/ t_2 l) (/ (pow t_m 3.0) l)))
(/ 2.0 (* t_2 (/ (* t_m (/ (pow t_m 2.0) l)) l))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = 2.0 * pow(k, 2.0);
double tmp;
if (t_m <= 3.1e-106) {
tmp = 2.0 / pow((pow(k, 2.0) * (sqrt(t_m) / l)), 2.0);
} else if (t_m <= 2e+31) {
tmp = 2.0 / ((t_2 / l) * (pow(t_m, 3.0) / l));
} else {
tmp = 2.0 / (t_2 * ((t_m * (pow(t_m, 2.0) / l)) / l));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: tmp
t_2 = 2.0d0 * (k ** 2.0d0)
if (t_m <= 3.1d-106) then
tmp = 2.0d0 / (((k ** 2.0d0) * (sqrt(t_m) / l)) ** 2.0d0)
else if (t_m <= 2d+31) then
tmp = 2.0d0 / ((t_2 / l) * ((t_m ** 3.0d0) / l))
else
tmp = 2.0d0 / (t_2 * ((t_m * ((t_m ** 2.0d0) / l)) / l))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = 2.0 * Math.pow(k, 2.0);
double tmp;
if (t_m <= 3.1e-106) {
tmp = 2.0 / Math.pow((Math.pow(k, 2.0) * (Math.sqrt(t_m) / l)), 2.0);
} else if (t_m <= 2e+31) {
tmp = 2.0 / ((t_2 / l) * (Math.pow(t_m, 3.0) / l));
} else {
tmp = 2.0 / (t_2 * ((t_m * (Math.pow(t_m, 2.0) / l)) / l));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = 2.0 * math.pow(k, 2.0) tmp = 0 if t_m <= 3.1e-106: tmp = 2.0 / math.pow((math.pow(k, 2.0) * (math.sqrt(t_m) / l)), 2.0) elif t_m <= 2e+31: tmp = 2.0 / ((t_2 / l) * (math.pow(t_m, 3.0) / l)) else: tmp = 2.0 / (t_2 * ((t_m * (math.pow(t_m, 2.0) / l)) / l)) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(2.0 * (k ^ 2.0)) tmp = 0.0 if (t_m <= 3.1e-106) tmp = Float64(2.0 / (Float64((k ^ 2.0) * Float64(sqrt(t_m) / l)) ^ 2.0)); elseif (t_m <= 2e+31) tmp = Float64(2.0 / Float64(Float64(t_2 / l) * Float64((t_m ^ 3.0) / l))); else tmp = Float64(2.0 / Float64(t_2 * Float64(Float64(t_m * Float64((t_m ^ 2.0) / l)) / l))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = 2.0 * (k ^ 2.0); tmp = 0.0; if (t_m <= 3.1e-106) tmp = 2.0 / (((k ^ 2.0) * (sqrt(t_m) / l)) ^ 2.0); elseif (t_m <= 2e+31) tmp = 2.0 / ((t_2 / l) * ((t_m ^ 3.0) / l)); else tmp = 2.0 / (t_2 * ((t_m * ((t_m ^ 2.0) / l)) / l)); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 3.1e-106], N[(2.0 / N[Power[N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Sqrt[t$95$m], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2e+31], N[(2.0 / N[(N[(t$95$2 / l), $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$2 * N[(N[(t$95$m * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := 2 \cdot {k}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.1 \cdot 10^{-106}:\\
\;\;\;\;\frac{2}{{\left({k}^{2} \cdot \frac{\sqrt{t\_m}}{\ell}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 2 \cdot 10^{+31}:\\
\;\;\;\;\frac{2}{\frac{t\_2}{\ell} \cdot \frac{{t\_m}^{3}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_2 \cdot \frac{t\_m \cdot \frac{{t\_m}^{2}}{\ell}}{\ell}}\\
\end{array}
\end{array}
\end{array}
if t < 3.09999999999999985e-106Initial program 41.3%
Simplified41.3%
Taylor expanded in k around 0 40.0%
associate-/l*40.2%
Simplified40.2%
Taylor expanded in k around inf 52.5%
times-frac52.6%
Simplified52.6%
Taylor expanded in k around 0 51.9%
associate-/l*51.7%
Simplified51.7%
add-sqr-sqrt12.9%
pow212.9%
sqrt-prod12.8%
sqrt-pow114.0%
metadata-eval14.0%
sqrt-div11.8%
sqrt-pow112.9%
metadata-eval12.9%
pow112.9%
Applied egg-rr12.9%
if 3.09999999999999985e-106 < t < 1.9999999999999999e31Initial program 62.2%
Simplified67.7%
Taylor expanded in k around 0 56.8%
associate-*l/58.8%
Applied egg-rr58.8%
associate-/l*59.5%
Simplified59.5%
if 1.9999999999999999e31 < t Initial program 67.0%
Simplified65.7%
Taylor expanded in k around 0 63.8%
cube-mult63.8%
*-un-lft-identity63.8%
times-frac65.9%
pow265.9%
Applied egg-rr65.9%
Final simplification28.9%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (* 2.0 (pow k 2.0))))
(*
t_s
(if (<= t_m 3.5e-106)
(/ 2.0 (pow (* (sqrt t_m) (/ (pow k 2.0) l)) 2.0))
(if (<= t_m 3.4e+31)
(/ 2.0 (* (/ t_2 l) (/ (pow t_m 3.0) l)))
(/ 2.0 (* t_2 (/ (* t_m (/ (pow t_m 2.0) l)) l))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = 2.0 * pow(k, 2.0);
double tmp;
if (t_m <= 3.5e-106) {
tmp = 2.0 / pow((sqrt(t_m) * (pow(k, 2.0) / l)), 2.0);
} else if (t_m <= 3.4e+31) {
tmp = 2.0 / ((t_2 / l) * (pow(t_m, 3.0) / l));
} else {
tmp = 2.0 / (t_2 * ((t_m * (pow(t_m, 2.0) / l)) / l));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: tmp
t_2 = 2.0d0 * (k ** 2.0d0)
if (t_m <= 3.5d-106) then
tmp = 2.0d0 / ((sqrt(t_m) * ((k ** 2.0d0) / l)) ** 2.0d0)
else if (t_m <= 3.4d+31) then
tmp = 2.0d0 / ((t_2 / l) * ((t_m ** 3.0d0) / l))
else
tmp = 2.0d0 / (t_2 * ((t_m * ((t_m ** 2.0d0) / l)) / l))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = 2.0 * Math.pow(k, 2.0);
double tmp;
if (t_m <= 3.5e-106) {
tmp = 2.0 / Math.pow((Math.sqrt(t_m) * (Math.pow(k, 2.0) / l)), 2.0);
} else if (t_m <= 3.4e+31) {
tmp = 2.0 / ((t_2 / l) * (Math.pow(t_m, 3.0) / l));
} else {
tmp = 2.0 / (t_2 * ((t_m * (Math.pow(t_m, 2.0) / l)) / l));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = 2.0 * math.pow(k, 2.0) tmp = 0 if t_m <= 3.5e-106: tmp = 2.0 / math.pow((math.sqrt(t_m) * (math.pow(k, 2.0) / l)), 2.0) elif t_m <= 3.4e+31: tmp = 2.0 / ((t_2 / l) * (math.pow(t_m, 3.0) / l)) else: tmp = 2.0 / (t_2 * ((t_m * (math.pow(t_m, 2.0) / l)) / l)) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(2.0 * (k ^ 2.0)) tmp = 0.0 if (t_m <= 3.5e-106) tmp = Float64(2.0 / (Float64(sqrt(t_m) * Float64((k ^ 2.0) / l)) ^ 2.0)); elseif (t_m <= 3.4e+31) tmp = Float64(2.0 / Float64(Float64(t_2 / l) * Float64((t_m ^ 3.0) / l))); else tmp = Float64(2.0 / Float64(t_2 * Float64(Float64(t_m * Float64((t_m ^ 2.0) / l)) / l))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = 2.0 * (k ^ 2.0); tmp = 0.0; if (t_m <= 3.5e-106) tmp = 2.0 / ((sqrt(t_m) * ((k ^ 2.0) / l)) ^ 2.0); elseif (t_m <= 3.4e+31) tmp = 2.0 / ((t_2 / l) * ((t_m ^ 3.0) / l)); else tmp = 2.0 / (t_2 * ((t_m * ((t_m ^ 2.0) / l)) / l)); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 3.5e-106], N[(2.0 / N[Power[N[(N[Sqrt[t$95$m], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.4e+31], N[(2.0 / N[(N[(t$95$2 / l), $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$2 * N[(N[(t$95$m * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := 2 \cdot {k}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.5 \cdot 10^{-106}:\\
\;\;\;\;\frac{2}{{\left(\sqrt{t\_m} \cdot \frac{{k}^{2}}{\ell}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 3.4 \cdot 10^{+31}:\\
\;\;\;\;\frac{2}{\frac{t\_2}{\ell} \cdot \frac{{t\_m}^{3}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_2 \cdot \frac{t\_m \cdot \frac{{t\_m}^{2}}{\ell}}{\ell}}\\
\end{array}
\end{array}
\end{array}
if t < 3.5e-106Initial program 41.3%
Simplified41.3%
Taylor expanded in k around 0 40.0%
associate-/l*40.2%
Simplified40.2%
Taylor expanded in k around inf 52.5%
times-frac52.6%
Simplified52.6%
Taylor expanded in k around 0 51.9%
add-sqr-sqrt13.0%
sqrt-div11.2%
sqrt-prod11.2%
sqrt-pow111.2%
metadata-eval11.2%
sqrt-pow16.7%
metadata-eval6.7%
pow16.7%
sqrt-div6.7%
sqrt-prod6.7%
sqrt-pow16.7%
metadata-eval6.7%
sqrt-pow111.9%
metadata-eval11.9%
pow111.9%
Applied egg-rr11.9%
unpow211.9%
*-commutative11.9%
associate-/l*12.4%
Simplified12.4%
if 3.5e-106 < t < 3.3999999999999998e31Initial program 62.2%
Simplified67.7%
Taylor expanded in k around 0 56.8%
associate-*l/58.8%
Applied egg-rr58.8%
associate-/l*59.5%
Simplified59.5%
if 3.3999999999999998e31 < t Initial program 67.0%
Simplified65.7%
Taylor expanded in k around 0 63.8%
cube-mult63.8%
*-un-lft-identity63.8%
times-frac65.9%
pow265.9%
Applied egg-rr65.9%
Final simplification28.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 (* 2.0 (pow k 2.0))) (t_3 (/ t_2 l)) (t_4 (/ (pow t_m 3.0) l)))
(*
t_s
(if (<= t_m 3.1e-106)
(/ 2.0 (* (* t_m k) (/ (pow k 3.0) (pow l 2.0))))
(if (<= t_m 2e-39)
(/ 2.0 (* t_3 t_4))
(if (<= t_m 1.8e+82)
(/ 2.0 (/ (* t_2 t_4) l))
(/ 2.0 (* t_3 (* (pow t_m 2.0) (/ t_m l))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = 2.0 * pow(k, 2.0);
double t_3 = t_2 / l;
double t_4 = pow(t_m, 3.0) / l;
double tmp;
if (t_m <= 3.1e-106) {
tmp = 2.0 / ((t_m * k) * (pow(k, 3.0) / pow(l, 2.0)));
} else if (t_m <= 2e-39) {
tmp = 2.0 / (t_3 * t_4);
} else if (t_m <= 1.8e+82) {
tmp = 2.0 / ((t_2 * t_4) / l);
} else {
tmp = 2.0 / (t_3 * (pow(t_m, 2.0) * (t_m / l)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_2 = 2.0d0 * (k ** 2.0d0)
t_3 = t_2 / l
t_4 = (t_m ** 3.0d0) / l
if (t_m <= 3.1d-106) then
tmp = 2.0d0 / ((t_m * k) * ((k ** 3.0d0) / (l ** 2.0d0)))
else if (t_m <= 2d-39) then
tmp = 2.0d0 / (t_3 * t_4)
else if (t_m <= 1.8d+82) then
tmp = 2.0d0 / ((t_2 * t_4) / l)
else
tmp = 2.0d0 / (t_3 * ((t_m ** 2.0d0) * (t_m / l)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = 2.0 * Math.pow(k, 2.0);
double t_3 = t_2 / l;
double t_4 = Math.pow(t_m, 3.0) / l;
double tmp;
if (t_m <= 3.1e-106) {
tmp = 2.0 / ((t_m * k) * (Math.pow(k, 3.0) / Math.pow(l, 2.0)));
} else if (t_m <= 2e-39) {
tmp = 2.0 / (t_3 * t_4);
} else if (t_m <= 1.8e+82) {
tmp = 2.0 / ((t_2 * t_4) / l);
} else {
tmp = 2.0 / (t_3 * (Math.pow(t_m, 2.0) * (t_m / l)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = 2.0 * math.pow(k, 2.0) t_3 = t_2 / l t_4 = math.pow(t_m, 3.0) / l tmp = 0 if t_m <= 3.1e-106: tmp = 2.0 / ((t_m * k) * (math.pow(k, 3.0) / math.pow(l, 2.0))) elif t_m <= 2e-39: tmp = 2.0 / (t_3 * t_4) elif t_m <= 1.8e+82: tmp = 2.0 / ((t_2 * t_4) / l) else: tmp = 2.0 / (t_3 * (math.pow(t_m, 2.0) * (t_m / l))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(2.0 * (k ^ 2.0)) t_3 = Float64(t_2 / l) t_4 = Float64((t_m ^ 3.0) / l) tmp = 0.0 if (t_m <= 3.1e-106) tmp = Float64(2.0 / Float64(Float64(t_m * k) * Float64((k ^ 3.0) / (l ^ 2.0)))); elseif (t_m <= 2e-39) tmp = Float64(2.0 / Float64(t_3 * t_4)); elseif (t_m <= 1.8e+82) tmp = Float64(2.0 / Float64(Float64(t_2 * t_4) / l)); else tmp = Float64(2.0 / Float64(t_3 * Float64((t_m ^ 2.0) * Float64(t_m / l)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = 2.0 * (k ^ 2.0); t_3 = t_2 / l; t_4 = (t_m ^ 3.0) / l; tmp = 0.0; if (t_m <= 3.1e-106) tmp = 2.0 / ((t_m * k) * ((k ^ 3.0) / (l ^ 2.0))); elseif (t_m <= 2e-39) tmp = 2.0 / (t_3 * t_4); elseif (t_m <= 1.8e+82) tmp = 2.0 / ((t_2 * t_4) / l); else tmp = 2.0 / (t_3 * ((t_m ^ 2.0) * (t_m / l))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / l), $MachinePrecision]}, Block[{t$95$4 = N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 3.1e-106], N[(2.0 / N[(N[(t$95$m * k), $MachinePrecision] * N[(N[Power[k, 3.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2e-39], N[(2.0 / N[(t$95$3 * t$95$4), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.8e+82], N[(2.0 / N[(N[(t$95$2 * t$95$4), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$3 * N[(N[Power[t$95$m, 2.0], $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)
\\
\begin{array}{l}
t_2 := 2 \cdot {k}^{2}\\
t_3 := \frac{t\_2}{\ell}\\
t_4 := \frac{{t\_m}^{3}}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.1 \cdot 10^{-106}:\\
\;\;\;\;\frac{2}{\left(t\_m \cdot k\right) \cdot \frac{{k}^{3}}{{\ell}^{2}}}\\
\mathbf{elif}\;t\_m \leq 2 \cdot 10^{-39}:\\
\;\;\;\;\frac{2}{t\_3 \cdot t\_4}\\
\mathbf{elif}\;t\_m \leq 1.8 \cdot 10^{+82}:\\
\;\;\;\;\frac{2}{\frac{t\_2 \cdot t\_4}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_3 \cdot \left({t\_m}^{2} \cdot \frac{t\_m}{\ell}\right)}\\
\end{array}
\end{array}
\end{array}
if t < 3.09999999999999985e-106Initial program 41.3%
Simplified41.3%
Taylor expanded in k around 0 40.0%
associate-/l*40.2%
Simplified40.2%
Taylor expanded in k around inf 52.5%
times-frac52.6%
Simplified52.6%
Taylor expanded in k around 0 52.5%
if 3.09999999999999985e-106 < t < 1.99999999999999986e-39Initial program 54.3%
Simplified65.4%
Taylor expanded in k around 0 52.3%
associate-*l/55.3%
Applied egg-rr55.3%
associate-/l*56.6%
Simplified56.6%
if 1.99999999999999986e-39 < t < 1.80000000000000007e82Initial program 79.2%
Simplified78.1%
Taylor expanded in k around 0 73.3%
associate-*l/73.7%
Applied egg-rr73.7%
if 1.80000000000000007e82 < t Initial program 62.3%
Simplified60.8%
Taylor expanded in k around 0 58.5%
associate-*l/58.5%
Applied egg-rr58.5%
associate-/l*57.9%
Simplified57.9%
unpow357.9%
*-un-lft-identity57.9%
times-frac58.4%
pow258.4%
Applied egg-rr58.4%
Final simplification55.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 2.3e-106)
(/ 2.0 (* (* t_m k) (/ (pow k 3.0) (pow l 2.0))))
(/ 2.0 (* (* 2.0 (pow k 2.0)) (/ (* t_m (/ (pow t_m 2.0) l)) l))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.3e-106) {
tmp = 2.0 / ((t_m * k) * (pow(k, 3.0) / pow(l, 2.0)));
} else {
tmp = 2.0 / ((2.0 * pow(k, 2.0)) * ((t_m * (pow(t_m, 2.0) / l)) / l));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 2.3d-106) then
tmp = 2.0d0 / ((t_m * k) * ((k ** 3.0d0) / (l ** 2.0d0)))
else
tmp = 2.0d0 / ((2.0d0 * (k ** 2.0d0)) * ((t_m * ((t_m ** 2.0d0) / l)) / l))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.3e-106) {
tmp = 2.0 / ((t_m * k) * (Math.pow(k, 3.0) / Math.pow(l, 2.0)));
} else {
tmp = 2.0 / ((2.0 * Math.pow(k, 2.0)) * ((t_m * (Math.pow(t_m, 2.0) / l)) / l));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 2.3e-106: tmp = 2.0 / ((t_m * k) * (math.pow(k, 3.0) / math.pow(l, 2.0))) else: tmp = 2.0 / ((2.0 * math.pow(k, 2.0)) * ((t_m * (math.pow(t_m, 2.0) / l)) / l)) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 2.3e-106) tmp = Float64(2.0 / Float64(Float64(t_m * k) * Float64((k ^ 3.0) / (l ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64(Float64(t_m * Float64((t_m ^ 2.0) / l)) / l))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 2.3e-106) tmp = 2.0 / ((t_m * k) * ((k ^ 3.0) / (l ^ 2.0))); else tmp = 2.0 / ((2.0 * (k ^ 2.0)) * ((t_m * ((t_m ^ 2.0) / l)) / l)); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.3e-106], N[(2.0 / N[(N[(t$95$m * k), $MachinePrecision] * N[(N[Power[k, 3.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.3 \cdot 10^{-106}:\\
\;\;\;\;\frac{2}{\left(t\_m \cdot k\right) \cdot \frac{{k}^{3}}{{\ell}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{t\_m \cdot \frac{{t\_m}^{2}}{\ell}}{\ell}}\\
\end{array}
\end{array}
if t < 2.3000000000000001e-106Initial program 41.3%
Simplified41.3%
Taylor expanded in k around 0 40.0%
associate-/l*40.2%
Simplified40.2%
Taylor expanded in k around inf 52.5%
times-frac52.6%
Simplified52.6%
Taylor expanded in k around 0 52.5%
if 2.3000000000000001e-106 < t Initial program 65.2%
Simplified66.4%
Taylor expanded in k around 0 61.2%
cube-mult61.2%
*-un-lft-identity61.2%
times-frac62.5%
pow262.5%
Applied egg-rr62.5%
Final simplification55.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 2.2e-113)
(/ 2.0 (* (* t_m k) (/ (pow k 3.0) (pow l 2.0))))
(/ 2.0 (/ (* (* 2.0 (pow k 2.0)) (/ (pow t_m 3.0) l)) l)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.2e-113) {
tmp = 2.0 / ((t_m * k) * (pow(k, 3.0) / pow(l, 2.0)));
} else {
tmp = 2.0 / (((2.0 * pow(k, 2.0)) * (pow(t_m, 3.0) / l)) / l);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 2.2d-113) then
tmp = 2.0d0 / ((t_m * k) * ((k ** 3.0d0) / (l ** 2.0d0)))
else
tmp = 2.0d0 / (((2.0d0 * (k ** 2.0d0)) * ((t_m ** 3.0d0) / l)) / l)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.2e-113) {
tmp = 2.0 / ((t_m * k) * (Math.pow(k, 3.0) / Math.pow(l, 2.0)));
} else {
tmp = 2.0 / (((2.0 * Math.pow(k, 2.0)) * (Math.pow(t_m, 3.0) / l)) / l);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 2.2e-113: tmp = 2.0 / ((t_m * k) * (math.pow(k, 3.0) / math.pow(l, 2.0))) else: tmp = 2.0 / (((2.0 * math.pow(k, 2.0)) * (math.pow(t_m, 3.0) / l)) / l) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 2.2e-113) tmp = Float64(2.0 / Float64(Float64(t_m * k) * Float64((k ^ 3.0) / (l ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(Float64(2.0 * (k ^ 2.0)) * Float64((t_m ^ 3.0) / l)) / l)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 2.2e-113) tmp = 2.0 / ((t_m * k) * ((k ^ 3.0) / (l ^ 2.0))); else tmp = 2.0 / (((2.0 * (k ^ 2.0)) * ((t_m ^ 3.0) / l)) / l); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.2e-113], N[(2.0 / N[(N[(t$95$m * k), $MachinePrecision] * N[(N[Power[k, 3.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.2 \cdot 10^{-113}:\\
\;\;\;\;\frac{2}{\left(t\_m \cdot k\right) \cdot \frac{{k}^{3}}{{\ell}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\left(2 \cdot {k}^{2}\right) \cdot \frac{{t\_m}^{3}}{\ell}}{\ell}}\\
\end{array}
\end{array}
if t < 2.20000000000000004e-113Initial program 42.0%
Simplified42.0%
Taylor expanded in k around 0 40.7%
associate-/l*40.9%
Simplified40.9%
Taylor expanded in k around inf 52.8%
times-frac52.9%
Simplified52.9%
Taylor expanded in k around 0 52.8%
if 2.20000000000000004e-113 < t Initial program 62.9%
Simplified64.1%
Taylor expanded in k around 0 59.1%
associate-*l/59.8%
Applied egg-rr59.8%
Final simplification55.1%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 2.2e-113)
(/ 2.0 (* (* t_m k) (/ (pow k 3.0) (pow l 2.0))))
(/ 2.0 (* (/ (* 2.0 (pow k 2.0)) l) (/ (pow t_m 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 (t_m <= 2.2e-113) {
tmp = 2.0 / ((t_m * k) * (pow(k, 3.0) / pow(l, 2.0)));
} else {
tmp = 2.0 / (((2.0 * pow(k, 2.0)) / l) * (pow(t_m, 3.0) / l));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 2.2d-113) then
tmp = 2.0d0 / ((t_m * k) * ((k ** 3.0d0) / (l ** 2.0d0)))
else
tmp = 2.0d0 / (((2.0d0 * (k ** 2.0d0)) / l) * ((t_m ** 3.0d0) / l))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.2e-113) {
tmp = 2.0 / ((t_m * k) * (Math.pow(k, 3.0) / Math.pow(l, 2.0)));
} else {
tmp = 2.0 / (((2.0 * Math.pow(k, 2.0)) / l) * (Math.pow(t_m, 3.0) / l));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 2.2e-113: tmp = 2.0 / ((t_m * k) * (math.pow(k, 3.0) / math.pow(l, 2.0))) else: tmp = 2.0 / (((2.0 * math.pow(k, 2.0)) / l) * (math.pow(t_m, 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 (t_m <= 2.2e-113) tmp = Float64(2.0 / Float64(Float64(t_m * k) * Float64((k ^ 3.0) / (l ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(Float64(2.0 * (k ^ 2.0)) / l) * Float64((t_m ^ 3.0) / l))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 2.2e-113) tmp = 2.0 / ((t_m * k) * ((k ^ 3.0) / (l ^ 2.0))); else tmp = 2.0 / (((2.0 * (k ^ 2.0)) / l) * ((t_m ^ 3.0) / l)); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.2e-113], N[(2.0 / N[(N[(t$95$m * k), $MachinePrecision] * N[(N[Power[k, 3.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.2 \cdot 10^{-113}:\\
\;\;\;\;\frac{2}{\left(t\_m \cdot k\right) \cdot \frac{{k}^{3}}{{\ell}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{2 \cdot {k}^{2}}{\ell} \cdot \frac{{t\_m}^{3}}{\ell}}\\
\end{array}
\end{array}
if t < 2.20000000000000004e-113Initial program 42.0%
Simplified42.0%
Taylor expanded in k around 0 40.7%
associate-/l*40.9%
Simplified40.9%
Taylor expanded in k around inf 52.8%
times-frac52.9%
Simplified52.9%
Taylor expanded in k around 0 52.8%
if 2.20000000000000004e-113 < t Initial program 62.9%
Simplified64.1%
Taylor expanded in k around 0 59.1%
associate-*l/59.8%
Applied egg-rr59.8%
associate-/l*59.8%
Simplified59.8%
Final simplification55.1%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 2.2e-113)
(/ 2.0 (* (* t_m k) (/ (pow k 3.0) (pow l 2.0))))
(* l (/ 2.0 (* (pow t_m 3.0) (/ (* 2.0 (pow k 2.0)) l)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.2e-113) {
tmp = 2.0 / ((t_m * k) * (pow(k, 3.0) / pow(l, 2.0)));
} else {
tmp = l * (2.0 / (pow(t_m, 3.0) * ((2.0 * pow(k, 2.0)) / l)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 2.2d-113) then
tmp = 2.0d0 / ((t_m * k) * ((k ** 3.0d0) / (l ** 2.0d0)))
else
tmp = l * (2.0d0 / ((t_m ** 3.0d0) * ((2.0d0 * (k ** 2.0d0)) / l)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.2e-113) {
tmp = 2.0 / ((t_m * k) * (Math.pow(k, 3.0) / Math.pow(l, 2.0)));
} else {
tmp = l * (2.0 / (Math.pow(t_m, 3.0) * ((2.0 * Math.pow(k, 2.0)) / l)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 2.2e-113: tmp = 2.0 / ((t_m * k) * (math.pow(k, 3.0) / math.pow(l, 2.0))) else: tmp = l * (2.0 / (math.pow(t_m, 3.0) * ((2.0 * math.pow(k, 2.0)) / l))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 2.2e-113) tmp = Float64(2.0 / Float64(Float64(t_m * k) * Float64((k ^ 3.0) / (l ^ 2.0)))); else tmp = Float64(l * Float64(2.0 / Float64((t_m ^ 3.0) * Float64(Float64(2.0 * (k ^ 2.0)) / l)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 2.2e-113) tmp = 2.0 / ((t_m * k) * ((k ^ 3.0) / (l ^ 2.0))); else tmp = l * (2.0 / ((t_m ^ 3.0) * ((2.0 * (k ^ 2.0)) / l))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.2e-113], N[(2.0 / N[(N[(t$95$m * k), $MachinePrecision] * N[(N[Power[k, 3.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(2.0 / N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.2 \cdot 10^{-113}:\\
\;\;\;\;\frac{2}{\left(t\_m \cdot k\right) \cdot \frac{{k}^{3}}{{\ell}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{2}{{t\_m}^{3} \cdot \frac{2 \cdot {k}^{2}}{\ell}}\\
\end{array}
\end{array}
if t < 2.20000000000000004e-113Initial program 42.0%
Simplified42.0%
Taylor expanded in k around 0 40.7%
associate-/l*40.9%
Simplified40.9%
Taylor expanded in k around inf 52.8%
times-frac52.9%
Simplified52.9%
Taylor expanded in k around 0 52.8%
if 2.20000000000000004e-113 < t Initial program 62.9%
Simplified64.1%
Taylor expanded in k around 0 59.1%
associate-*l/59.8%
Applied egg-rr59.8%
*-un-lft-identity59.8%
associate-/r/59.8%
Applied egg-rr59.8%
*-lft-identity59.8%
*-commutative59.8%
associate-*l/59.0%
associate-/l*59.6%
Simplified59.6%
Final simplification55.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 (* (* t_m k) (/ (pow k 3.0) (pow l 2.0))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((t_m * k) * (pow(k, 3.0) / pow(l, 2.0))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / ((t_m * k) * ((k ** 3.0d0) / (l ** 2.0d0))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((t_m * k) * (Math.pow(k, 3.0) / Math.pow(l, 2.0))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / ((t_m * k) * (math.pow(k, 3.0) / math.pow(l, 2.0))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64(Float64(t_m * k) * Float64((k ^ 3.0) / (l ^ 2.0))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / ((t_m * k) * ((k ^ 3.0) / (l ^ 2.0)))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(t$95$m * k), $MachinePrecision] * N[(N[Power[k, 3.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{2}{\left(t\_m \cdot k\right) \cdot \frac{{k}^{3}}{{\ell}^{2}}}
\end{array}
Initial program 48.8%
Simplified48.8%
Taylor expanded in k around 0 47.1%
associate-/l*47.3%
Simplified47.3%
Taylor expanded in k around inf 51.3%
times-frac51.4%
Simplified51.4%
Taylor expanded in k around 0 50.9%
Final simplification50.9%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* 2.0 (/ (pow l 2.0) (* t_m (pow k 4.0))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 * (pow(l, 2.0) / (t_m * pow(k, 4.0))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 * ((l ** 2.0d0) / (t_m * (k ** 4.0d0))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 * (Math.pow(l, 2.0) / (t_m * Math.pow(k, 4.0))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 * (math.pow(l, 2.0) / (t_m * math.pow(k, 4.0))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 * Float64((l ^ 2.0) / Float64(t_m * (k ^ 4.0))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 * ((l ^ 2.0) / (t_m * (k ^ 4.0)))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\right)
\end{array}
Initial program 48.8%
Simplified48.8%
Taylor expanded in k around 0 47.1%
associate-/l*47.3%
Simplified47.3%
Taylor expanded in k around inf 51.3%
times-frac51.4%
Simplified51.4%
Taylor expanded in k around 0 50.1%
Final simplification50.1%
herbie shell --seed 2024107
(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))))