
(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 24 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (* t_m (cbrt (sin k))))
(t_3 (hypot 1.0 (hypot 1.0 (/ k t_m))))
(t_4 (cbrt (/ (* 2.0 (pow l 2.0)) (tan k))))
(t_5 (/ l t_3)))
(*
t_s
(if (<= t_m 1.6e-200)
(pow (* (* l (/ (/ (sqrt 2.0) k) (sin k))) (sqrt (/ (cos k) t_m))) 2.0)
(if (<= t_m 5.5e-104)
(* (/ (pow (/ t_4 t_2) 2.0) t_3) (/ t_4 (* t_2 t_3)))
(if (<= t_m 4.5e+87)
(* t_5 (* (/ 2.0 (* (pow t_m 3.0) (* (sin k) (tan k)))) t_5))
(/
2.0
(*
(pow (* t_2 (pow (cbrt l) -2.0)) 3.0)
(* (tan k) (pow 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 = t_m * cbrt(sin(k));
double t_3 = hypot(1.0, hypot(1.0, (k / t_m)));
double t_4 = cbrt(((2.0 * pow(l, 2.0)) / tan(k)));
double t_5 = l / t_3;
double tmp;
if (t_m <= 1.6e-200) {
tmp = pow(((l * ((sqrt(2.0) / k) / sin(k))) * sqrt((cos(k) / t_m))), 2.0);
} else if (t_m <= 5.5e-104) {
tmp = (pow((t_4 / t_2), 2.0) / t_3) * (t_4 / (t_2 * t_3));
} else if (t_m <= 4.5e+87) {
tmp = t_5 * ((2.0 / (pow(t_m, 3.0) * (sin(k) * tan(k)))) * t_5);
} else {
tmp = 2.0 / (pow((t_2 * pow(cbrt(l), -2.0)), 3.0) * (tan(k) * pow(t_3, 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 = t_m * Math.cbrt(Math.sin(k));
double t_3 = Math.hypot(1.0, Math.hypot(1.0, (k / t_m)));
double t_4 = Math.cbrt(((2.0 * Math.pow(l, 2.0)) / Math.tan(k)));
double t_5 = l / t_3;
double tmp;
if (t_m <= 1.6e-200) {
tmp = Math.pow(((l * ((Math.sqrt(2.0) / k) / Math.sin(k))) * Math.sqrt((Math.cos(k) / t_m))), 2.0);
} else if (t_m <= 5.5e-104) {
tmp = (Math.pow((t_4 / t_2), 2.0) / t_3) * (t_4 / (t_2 * t_3));
} else if (t_m <= 4.5e+87) {
tmp = t_5 * ((2.0 / (Math.pow(t_m, 3.0) * (Math.sin(k) * Math.tan(k)))) * t_5);
} else {
tmp = 2.0 / (Math.pow((t_2 * Math.pow(Math.cbrt(l), -2.0)), 3.0) * (Math.tan(k) * Math.pow(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(t_m * cbrt(sin(k))) t_3 = hypot(1.0, hypot(1.0, Float64(k / t_m))) t_4 = cbrt(Float64(Float64(2.0 * (l ^ 2.0)) / tan(k))) t_5 = Float64(l / t_3) tmp = 0.0 if (t_m <= 1.6e-200) tmp = Float64(Float64(l * Float64(Float64(sqrt(2.0) / k) / sin(k))) * sqrt(Float64(cos(k) / t_m))) ^ 2.0; elseif (t_m <= 5.5e-104) tmp = Float64(Float64((Float64(t_4 / t_2) ^ 2.0) / t_3) * Float64(t_4 / Float64(t_2 * t_3))); elseif (t_m <= 4.5e+87) tmp = Float64(t_5 * Float64(Float64(2.0 / Float64((t_m ^ 3.0) * Float64(sin(k) * tan(k)))) * t_5)); else tmp = Float64(2.0 / Float64((Float64(t_2 * (cbrt(l) ^ -2.0)) ^ 3.0) * Float64(tan(k) * (t_3 ^ 2.0)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]}, Block[{t$95$4 = N[Power[N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$5 = N[(l / t$95$3), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.6e-200], N[Power[N[(N[(l * N[(N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[t$95$m, 5.5e-104], N[(N[(N[Power[N[(t$95$4 / t$95$2), $MachinePrecision], 2.0], $MachinePrecision] / t$95$3), $MachinePrecision] * N[(t$95$4 / N[(t$95$2 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.5e+87], N[(t$95$5 * 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$5), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(t$95$2 * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := t\_m \cdot \sqrt[3]{\sin k}\\
t_3 := \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\\
t_4 := \sqrt[3]{\frac{2 \cdot {\ell}^{2}}{\tan k}}\\
t_5 := \frac{\ell}{t\_3}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.6 \cdot 10^{-200}:\\
\;\;\;\;{\left(\left(\ell \cdot \frac{\frac{\sqrt{2}}{k}}{\sin k}\right) \cdot \sqrt{\frac{\cos k}{t\_m}}\right)}^{2}\\
\mathbf{elif}\;t\_m \leq 5.5 \cdot 10^{-104}:\\
\;\;\;\;\frac{{\left(\frac{t\_4}{t\_2}\right)}^{2}}{t\_3} \cdot \frac{t\_4}{t\_2 \cdot t\_3}\\
\mathbf{elif}\;t\_m \leq 4.5 \cdot 10^{+87}:\\
\;\;\;\;t\_5 \cdot \left(\frac{2}{{t\_m}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot t\_5\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_2 \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3} \cdot \left(\tan k \cdot {t\_3}^{2}\right)}\\
\end{array}
\end{array}
\end{array}
if t < 1.59999999999999991e-200Initial program 45.6%
Simplified46.9%
add-sqr-sqrt32.1%
Applied egg-rr38.9%
unpow238.9%
associate-/l*38.9%
associate-*l*37.5%
Simplified37.5%
Taylor expanded in t around 0 43.5%
associate-/l*43.6%
associate-/r*43.6%
Simplified43.6%
if 1.59999999999999991e-200 < t < 5.4999999999999998e-104Initial program 44.4%
Simplified44.4%
add-cube-cbrt44.4%
add-sqr-sqrt44.4%
times-frac44.4%
Applied egg-rr85.0%
associate-*l/85.0%
associate-/l/85.0%
associate-*l/85.0%
Simplified85.0%
if 5.4999999999999998e-104 < t < 4.5000000000000003e87Initial program 61.9%
Simplified57.1%
associate-*r*63.8%
add-sqr-sqrt63.7%
times-frac63.9%
Applied egg-rr70.6%
associate-/l*76.7%
associate-*l*76.6%
Simplified76.6%
if 4.5000000000000003e87 < t Initial program 60.2%
Simplified60.2%
add-cube-cbrt60.2%
pow360.2%
associate-/r*63.9%
*-commutative63.9%
cbrt-prod63.9%
associate-/r*60.2%
cbrt-div62.7%
rem-cbrt-cube73.6%
cbrt-prod93.5%
pow293.5%
Applied egg-rr93.5%
add-sqr-sqrt42.6%
pow242.6%
associate-+r+42.6%
metadata-eval42.6%
sqrt-prod42.6%
metadata-eval42.6%
associate-+r+42.6%
add-sqr-sqrt42.6%
hypot-1-def42.6%
unpow242.6%
hypot-1-def42.6%
Applied egg-rr42.6%
unpow242.6%
swap-sqr42.6%
rem-square-sqrt93.5%
unpow293.5%
Simplified93.5%
add-cube-cbrt93.7%
pow393.7%
associate-*r/93.8%
Applied egg-rr93.8%
unpow393.8%
add-cube-cbrt93.6%
div-inv93.5%
pow-flip93.7%
metadata-eval93.7%
Applied egg-rr93.7%
Final simplification61.1%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (* t_m (cbrt (sin k))))
(t_3 (hypot 1.0 (hypot 1.0 (/ k t_m))))
(t_4 (/ (cbrt (* (pow l 2.0) (/ 2.0 (tan k)))) t_2))
(t_5 (/ l t_3)))
(*
t_s
(if (<= t_m 1.6e-200)
(pow (* (* l (/ (/ (sqrt 2.0) k) (sin k))) (sqrt (/ (cos k) t_m))) 2.0)
(if (<= t_m 5.5e-104)
(* (/ (pow t_4 2.0) t_3) (/ t_4 t_3))
(if (<= t_m 9.2e+87)
(* t_5 (* (/ 2.0 (* (pow t_m 3.0) (* (sin k) (tan k)))) t_5))
(/
2.0
(*
(pow (* t_2 (pow (cbrt l) -2.0)) 3.0)
(* (tan k) (pow 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 = t_m * cbrt(sin(k));
double t_3 = hypot(1.0, hypot(1.0, (k / t_m)));
double t_4 = cbrt((pow(l, 2.0) * (2.0 / tan(k)))) / t_2;
double t_5 = l / t_3;
double tmp;
if (t_m <= 1.6e-200) {
tmp = pow(((l * ((sqrt(2.0) / k) / sin(k))) * sqrt((cos(k) / t_m))), 2.0);
} else if (t_m <= 5.5e-104) {
tmp = (pow(t_4, 2.0) / t_3) * (t_4 / t_3);
} else if (t_m <= 9.2e+87) {
tmp = t_5 * ((2.0 / (pow(t_m, 3.0) * (sin(k) * tan(k)))) * t_5);
} else {
tmp = 2.0 / (pow((t_2 * pow(cbrt(l), -2.0)), 3.0) * (tan(k) * pow(t_3, 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 = t_m * Math.cbrt(Math.sin(k));
double t_3 = Math.hypot(1.0, Math.hypot(1.0, (k / t_m)));
double t_4 = Math.cbrt((Math.pow(l, 2.0) * (2.0 / Math.tan(k)))) / t_2;
double t_5 = l / t_3;
double tmp;
if (t_m <= 1.6e-200) {
tmp = Math.pow(((l * ((Math.sqrt(2.0) / k) / Math.sin(k))) * Math.sqrt((Math.cos(k) / t_m))), 2.0);
} else if (t_m <= 5.5e-104) {
tmp = (Math.pow(t_4, 2.0) / t_3) * (t_4 / t_3);
} else if (t_m <= 9.2e+87) {
tmp = t_5 * ((2.0 / (Math.pow(t_m, 3.0) * (Math.sin(k) * Math.tan(k)))) * t_5);
} else {
tmp = 2.0 / (Math.pow((t_2 * Math.pow(Math.cbrt(l), -2.0)), 3.0) * (Math.tan(k) * Math.pow(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(t_m * cbrt(sin(k))) t_3 = hypot(1.0, hypot(1.0, Float64(k / t_m))) t_4 = Float64(cbrt(Float64((l ^ 2.0) * Float64(2.0 / tan(k)))) / t_2) t_5 = Float64(l / t_3) tmp = 0.0 if (t_m <= 1.6e-200) tmp = Float64(Float64(l * Float64(Float64(sqrt(2.0) / k) / sin(k))) * sqrt(Float64(cos(k) / t_m))) ^ 2.0; elseif (t_m <= 5.5e-104) tmp = Float64(Float64((t_4 ^ 2.0) / t_3) * Float64(t_4 / t_3)); elseif (t_m <= 9.2e+87) tmp = Float64(t_5 * Float64(Float64(2.0 / Float64((t_m ^ 3.0) * Float64(sin(k) * tan(k)))) * t_5)); else tmp = Float64(2.0 / Float64((Float64(t_2 * (cbrt(l) ^ -2.0)) ^ 3.0) * Float64(tan(k) * (t_3 ^ 2.0)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]}, Block[{t$95$4 = N[(N[Power[N[(N[Power[l, 2.0], $MachinePrecision] * N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$5 = N[(l / t$95$3), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.6e-200], N[Power[N[(N[(l * N[(N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[t$95$m, 5.5e-104], N[(N[(N[Power[t$95$4, 2.0], $MachinePrecision] / t$95$3), $MachinePrecision] * N[(t$95$4 / t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 9.2e+87], N[(t$95$5 * 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$5), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(t$95$2 * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := t\_m \cdot \sqrt[3]{\sin k}\\
t_3 := \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\\
t_4 := \frac{\sqrt[3]{{\ell}^{2} \cdot \frac{2}{\tan k}}}{t\_2}\\
t_5 := \frac{\ell}{t\_3}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.6 \cdot 10^{-200}:\\
\;\;\;\;{\left(\left(\ell \cdot \frac{\frac{\sqrt{2}}{k}}{\sin k}\right) \cdot \sqrt{\frac{\cos k}{t\_m}}\right)}^{2}\\
\mathbf{elif}\;t\_m \leq 5.5 \cdot 10^{-104}:\\
\;\;\;\;\frac{{t\_4}^{2}}{t\_3} \cdot \frac{t\_4}{t\_3}\\
\mathbf{elif}\;t\_m \leq 9.2 \cdot 10^{+87}:\\
\;\;\;\;t\_5 \cdot \left(\frac{2}{{t\_m}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot t\_5\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_2 \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3} \cdot \left(\tan k \cdot {t\_3}^{2}\right)}\\
\end{array}
\end{array}
\end{array}
if t < 1.59999999999999991e-200Initial program 45.6%
Simplified46.9%
add-sqr-sqrt32.1%
Applied egg-rr38.9%
unpow238.9%
associate-/l*38.9%
associate-*l*37.5%
Simplified37.5%
Taylor expanded in t around 0 43.5%
associate-/l*43.6%
associate-/r*43.6%
Simplified43.6%
if 1.59999999999999991e-200 < t < 5.4999999999999998e-104Initial program 44.4%
Simplified44.4%
add-cube-cbrt44.4%
add-sqr-sqrt44.4%
times-frac44.4%
Applied egg-rr85.0%
if 5.4999999999999998e-104 < t < 9.2000000000000007e87Initial program 61.9%
Simplified57.1%
associate-*r*63.8%
add-sqr-sqrt63.7%
times-frac63.9%
Applied egg-rr70.6%
associate-/l*76.7%
associate-*l*76.6%
Simplified76.6%
if 9.2000000000000007e87 < t Initial program 60.2%
Simplified60.2%
add-cube-cbrt60.2%
pow360.2%
associate-/r*63.9%
*-commutative63.9%
cbrt-prod63.9%
associate-/r*60.2%
cbrt-div62.7%
rem-cbrt-cube73.6%
cbrt-prod93.5%
pow293.5%
Applied egg-rr93.5%
add-sqr-sqrt42.6%
pow242.6%
associate-+r+42.6%
metadata-eval42.6%
sqrt-prod42.6%
metadata-eval42.6%
associate-+r+42.6%
add-sqr-sqrt42.6%
hypot-1-def42.6%
unpow242.6%
hypot-1-def42.6%
Applied egg-rr42.6%
unpow242.6%
swap-sqr42.6%
rem-square-sqrt93.5%
unpow293.5%
Simplified93.5%
add-cube-cbrt93.7%
pow393.7%
associate-*r/93.8%
Applied egg-rr93.8%
unpow393.8%
add-cube-cbrt93.6%
div-inv93.5%
pow-flip93.7%
metadata-eval93.7%
Applied egg-rr93.7%
Final simplification61.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 (hypot 1.0 (hypot 1.0 (/ k t_m)))) (t_3 (/ l t_2)))
(*
t_s
(if (<= t_m 1.95e-255)
(pow (* (* l (/ (/ (sqrt 2.0) k) (sin k))) (sqrt (/ (cos k) t_m))) 2.0)
(if (<= t_m 5.5e-104)
(/
2.0
(/ (* (* k k) (* t_m (pow (sin k) 2.0))) (* (cos k) (pow l 2.0))))
(if (<= t_m 2.8e+88)
(* t_3 (* (/ 2.0 (* (pow t_m 3.0) (* (sin k) (tan k)))) t_3))
(/
2.0
(*
(pow (* (* t_m (cbrt (sin k))) (pow (cbrt l) -2.0)) 3.0)
(* (tan k) (pow t_2 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 = hypot(1.0, hypot(1.0, (k / t_m)));
double t_3 = l / t_2;
double tmp;
if (t_m <= 1.95e-255) {
tmp = pow(((l * ((sqrt(2.0) / k) / sin(k))) * sqrt((cos(k) / t_m))), 2.0);
} else if (t_m <= 5.5e-104) {
tmp = 2.0 / (((k * k) * (t_m * pow(sin(k), 2.0))) / (cos(k) * pow(l, 2.0)));
} else if (t_m <= 2.8e+88) {
tmp = t_3 * ((2.0 / (pow(t_m, 3.0) * (sin(k) * tan(k)))) * t_3);
} else {
tmp = 2.0 / (pow(((t_m * cbrt(sin(k))) * pow(cbrt(l), -2.0)), 3.0) * (tan(k) * pow(t_2, 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 = Math.hypot(1.0, Math.hypot(1.0, (k / t_m)));
double t_3 = l / t_2;
double tmp;
if (t_m <= 1.95e-255) {
tmp = Math.pow(((l * ((Math.sqrt(2.0) / k) / Math.sin(k))) * Math.sqrt((Math.cos(k) / t_m))), 2.0);
} else if (t_m <= 5.5e-104) {
tmp = 2.0 / (((k * k) * (t_m * Math.pow(Math.sin(k), 2.0))) / (Math.cos(k) * Math.pow(l, 2.0)));
} else if (t_m <= 2.8e+88) {
tmp = t_3 * ((2.0 / (Math.pow(t_m, 3.0) * (Math.sin(k) * Math.tan(k)))) * t_3);
} else {
tmp = 2.0 / (Math.pow(((t_m * Math.cbrt(Math.sin(k))) * Math.pow(Math.cbrt(l), -2.0)), 3.0) * (Math.tan(k) * Math.pow(t_2, 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 = hypot(1.0, hypot(1.0, Float64(k / t_m))) t_3 = Float64(l / t_2) tmp = 0.0 if (t_m <= 1.95e-255) tmp = Float64(Float64(l * Float64(Float64(sqrt(2.0) / k) / sin(k))) * sqrt(Float64(cos(k) / t_m))) ^ 2.0; elseif (t_m <= 5.5e-104) tmp = Float64(2.0 / Float64(Float64(Float64(k * k) * Float64(t_m * (sin(k) ^ 2.0))) / Float64(cos(k) * (l ^ 2.0)))); elseif (t_m <= 2.8e+88) tmp = Float64(t_3 * Float64(Float64(2.0 / Float64((t_m ^ 3.0) * Float64(sin(k) * tan(k)))) * t_3)); else tmp = Float64(2.0 / Float64((Float64(Float64(t_m * cbrt(sin(k))) * (cbrt(l) ^ -2.0)) ^ 3.0) * Float64(tan(k) * (t_2 ^ 2.0)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]}, Block[{t$95$3 = N[(l / t$95$2), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.95e-255], N[Power[N[(N[(l * N[(N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[t$95$m, 5.5e-104], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.8e+88], N[(t$95$3 * 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$3), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\\
t_3 := \frac{\ell}{t\_2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.95 \cdot 10^{-255}:\\
\;\;\;\;{\left(\left(\ell \cdot \frac{\frac{\sqrt{2}}{k}}{\sin k}\right) \cdot \sqrt{\frac{\cos k}{t\_m}}\right)}^{2}\\
\mathbf{elif}\;t\_m \leq 5.5 \cdot 10^{-104}:\\
\;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot \left(t\_m \cdot {\sin k}^{2}\right)}{\cos k \cdot {\ell}^{2}}}\\
\mathbf{elif}\;t\_m \leq 2.8 \cdot 10^{+88}:\\
\;\;\;\;t\_3 \cdot \left(\frac{2}{{t\_m}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot t\_3\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot \sqrt[3]{\sin k}\right) \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3} \cdot \left(\tan k \cdot {t\_2}^{2}\right)}\\
\end{array}
\end{array}
\end{array}
if t < 1.95e-255Initial program 48.1%
Simplified49.6%
add-sqr-sqrt32.2%
Applied egg-rr37.7%
unpow237.7%
associate-/l*37.7%
associate-*l*36.0%
Simplified36.0%
Taylor expanded in t around 0 36.8%
associate-/l*36.8%
associate-/r*36.9%
Simplified36.9%
if 1.95e-255 < t < 5.4999999999999998e-104Initial program 38.8%
Simplified38.8%
Taylor expanded in t around 0 80.1%
unpow280.1%
Applied egg-rr80.1%
if 5.4999999999999998e-104 < t < 2.79999999999999989e88Initial program 61.9%
Simplified57.1%
associate-*r*63.8%
add-sqr-sqrt63.7%
times-frac63.9%
Applied egg-rr70.6%
associate-/l*76.7%
associate-*l*76.6%
Simplified76.6%
if 2.79999999999999989e88 < t Initial program 60.2%
Simplified60.2%
add-cube-cbrt60.2%
pow360.2%
associate-/r*63.9%
*-commutative63.9%
cbrt-prod63.9%
associate-/r*60.2%
cbrt-div62.7%
rem-cbrt-cube73.6%
cbrt-prod93.5%
pow293.5%
Applied egg-rr93.5%
add-sqr-sqrt42.6%
pow242.6%
associate-+r+42.6%
metadata-eval42.6%
sqrt-prod42.6%
metadata-eval42.6%
associate-+r+42.6%
add-sqr-sqrt42.6%
hypot-1-def42.6%
unpow242.6%
hypot-1-def42.6%
Applied egg-rr42.6%
unpow242.6%
swap-sqr42.6%
rem-square-sqrt93.5%
unpow293.5%
Simplified93.5%
add-cube-cbrt93.7%
pow393.7%
associate-*r/93.8%
Applied egg-rr93.8%
unpow393.8%
add-cube-cbrt93.6%
div-inv93.5%
pow-flip93.7%
metadata-eval93.7%
Applied egg-rr93.7%
Final simplification60.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 (/ l (hypot 1.0 (hypot 1.0 (/ k t_m))))))
(*
t_s
(if (<= t_m 5.6e-253)
(pow (* (* l (/ (/ (sqrt 2.0) k) (sin k))) (sqrt (/ (cos k) t_m))) 2.0)
(if (<= t_m 5.5e-104)
(/
2.0
(/ (* (* k k) (* t_m (pow (sin k) 2.0))) (* (cos k) (pow l 2.0))))
(if (<= t_m 2.85e+88)
(* t_2 (* (/ 2.0 (* (pow t_m 3.0) (* (sin k) (tan k)))) t_2))
(/
2.0
(*
(pow (* (cbrt (sin k)) (/ t_m (pow (cbrt l) 2.0))) 3.0)
(* (tan k) (+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0))))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = l / hypot(1.0, hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 5.6e-253) {
tmp = pow(((l * ((sqrt(2.0) / k) / sin(k))) * sqrt((cos(k) / t_m))), 2.0);
} else if (t_m <= 5.5e-104) {
tmp = 2.0 / (((k * k) * (t_m * pow(sin(k), 2.0))) / (cos(k) * pow(l, 2.0)));
} else if (t_m <= 2.85e+88) {
tmp = t_2 * ((2.0 / (pow(t_m, 3.0) * (sin(k) * tan(k)))) * t_2);
} else {
tmp = 2.0 / (pow((cbrt(sin(k)) * (t_m / pow(cbrt(l), 2.0))), 3.0) * (tan(k) * (1.0 + (1.0 + pow((k / t_m), 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 = l / Math.hypot(1.0, Math.hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 5.6e-253) {
tmp = Math.pow(((l * ((Math.sqrt(2.0) / k) / Math.sin(k))) * Math.sqrt((Math.cos(k) / t_m))), 2.0);
} else if (t_m <= 5.5e-104) {
tmp = 2.0 / (((k * k) * (t_m * Math.pow(Math.sin(k), 2.0))) / (Math.cos(k) * Math.pow(l, 2.0)));
} else if (t_m <= 2.85e+88) {
tmp = t_2 * ((2.0 / (Math.pow(t_m, 3.0) * (Math.sin(k) * Math.tan(k)))) * t_2);
} else {
tmp = 2.0 / (Math.pow((Math.cbrt(Math.sin(k)) * (t_m / Math.pow(Math.cbrt(l), 2.0))), 3.0) * (Math.tan(k) * (1.0 + (1.0 + Math.pow((k / t_m), 2.0)))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(l / hypot(1.0, hypot(1.0, Float64(k / t_m)))) tmp = 0.0 if (t_m <= 5.6e-253) tmp = Float64(Float64(l * Float64(Float64(sqrt(2.0) / k) / sin(k))) * sqrt(Float64(cos(k) / t_m))) ^ 2.0; elseif (t_m <= 5.5e-104) tmp = Float64(2.0 / Float64(Float64(Float64(k * k) * Float64(t_m * (sin(k) ^ 2.0))) / Float64(cos(k) * (l ^ 2.0)))); elseif (t_m <= 2.85e+88) tmp = Float64(t_2 * Float64(Float64(2.0 / Float64((t_m ^ 3.0) * Float64(sin(k) * tan(k)))) * t_2)); else tmp = Float64(2.0 / Float64((Float64(cbrt(sin(k)) * Float64(t_m / (cbrt(l) ^ 2.0))) ^ 3.0) * Float64(tan(k) * Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0)))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(l / N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 5.6e-253], N[Power[N[(N[(l * N[(N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[t$95$m, 5.5e-104], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.85e+88], N[(t$95$2 * 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$2), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 5.6 \cdot 10^{-253}:\\
\;\;\;\;{\left(\left(\ell \cdot \frac{\frac{\sqrt{2}}{k}}{\sin k}\right) \cdot \sqrt{\frac{\cos k}{t\_m}}\right)}^{2}\\
\mathbf{elif}\;t\_m \leq 5.5 \cdot 10^{-104}:\\
\;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot \left(t\_m \cdot {\sin k}^{2}\right)}{\cos k \cdot {\ell}^{2}}}\\
\mathbf{elif}\;t\_m \leq 2.85 \cdot 10^{+88}:\\
\;\;\;\;t\_2 \cdot \left(\frac{2}{{t\_m}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot t\_2\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)\right)}\\
\end{array}
\end{array}
\end{array}
if t < 5.60000000000000011e-253Initial program 48.1%
Simplified49.6%
add-sqr-sqrt32.2%
Applied egg-rr37.7%
unpow237.7%
associate-/l*37.7%
associate-*l*36.0%
Simplified36.0%
Taylor expanded in t around 0 36.8%
associate-/l*36.8%
associate-/r*36.9%
Simplified36.9%
if 5.60000000000000011e-253 < t < 5.4999999999999998e-104Initial program 38.8%
Simplified38.8%
Taylor expanded in t around 0 80.1%
unpow280.1%
Applied egg-rr80.1%
if 5.4999999999999998e-104 < t < 2.85000000000000011e88Initial program 61.9%
Simplified57.1%
associate-*r*63.8%
add-sqr-sqrt63.7%
times-frac63.9%
Applied egg-rr70.6%
associate-/l*76.7%
associate-*l*76.6%
Simplified76.6%
if 2.85000000000000011e88 < t Initial program 60.2%
Simplified60.2%
add-cube-cbrt60.2%
pow360.2%
associate-/r*63.9%
*-commutative63.9%
cbrt-prod63.9%
associate-/r*60.2%
cbrt-div62.7%
rem-cbrt-cube73.6%
cbrt-prod93.5%
pow293.5%
Applied egg-rr93.5%
Final simplification60.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.86e-252)
(pow (* (* l (/ (/ (sqrt 2.0) k) (sin k))) (sqrt (/ (cos k) t_m))) 2.0)
(if (<= t_m 5.5e-104)
(/ 2.0 (/ (* (* k k) (* t_m (pow (sin k) 2.0))) (* (cos k) (pow l 2.0))))
(if (<= t_m 28000000000000.0)
(*
(*
(/ 2.0 (* (pow t_m 3.0) (* (sin k) (tan k))))
(/ l (hypot 1.0 (hypot 1.0 (/ k t_m)))))
(/ (* t_m l) k))
(/
2.0
(*
(pow (* (cbrt (sin k)) (/ t_m (pow (cbrt l) 2.0))) 3.0)
(* (tan k) (+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0)))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.86e-252) {
tmp = pow(((l * ((sqrt(2.0) / k) / sin(k))) * sqrt((cos(k) / t_m))), 2.0);
} else if (t_m <= 5.5e-104) {
tmp = 2.0 / (((k * k) * (t_m * pow(sin(k), 2.0))) / (cos(k) * pow(l, 2.0)));
} else if (t_m <= 28000000000000.0) {
tmp = ((2.0 / (pow(t_m, 3.0) * (sin(k) * tan(k)))) * (l / hypot(1.0, hypot(1.0, (k / t_m))))) * ((t_m * l) / k);
} else {
tmp = 2.0 / (pow((cbrt(sin(k)) * (t_m / pow(cbrt(l), 2.0))), 3.0) * (tan(k) * (1.0 + (1.0 + pow((k / t_m), 2.0)))));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.86e-252) {
tmp = Math.pow(((l * ((Math.sqrt(2.0) / k) / Math.sin(k))) * Math.sqrt((Math.cos(k) / t_m))), 2.0);
} else if (t_m <= 5.5e-104) {
tmp = 2.0 / (((k * k) * (t_m * Math.pow(Math.sin(k), 2.0))) / (Math.cos(k) * Math.pow(l, 2.0)));
} else if (t_m <= 28000000000000.0) {
tmp = ((2.0 / (Math.pow(t_m, 3.0) * (Math.sin(k) * Math.tan(k)))) * (l / Math.hypot(1.0, Math.hypot(1.0, (k / t_m))))) * ((t_m * l) / k);
} else {
tmp = 2.0 / (Math.pow((Math.cbrt(Math.sin(k)) * (t_m / Math.pow(Math.cbrt(l), 2.0))), 3.0) * (Math.tan(k) * (1.0 + (1.0 + Math.pow((k / t_m), 2.0)))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.86e-252) tmp = Float64(Float64(l * Float64(Float64(sqrt(2.0) / k) / sin(k))) * sqrt(Float64(cos(k) / t_m))) ^ 2.0; elseif (t_m <= 5.5e-104) tmp = Float64(2.0 / Float64(Float64(Float64(k * k) * Float64(t_m * (sin(k) ^ 2.0))) / Float64(cos(k) * (l ^ 2.0)))); elseif (t_m <= 28000000000000.0) tmp = Float64(Float64(Float64(2.0 / Float64((t_m ^ 3.0) * Float64(sin(k) * tan(k)))) * Float64(l / hypot(1.0, hypot(1.0, Float64(k / t_m))))) * Float64(Float64(t_m * l) / k)); else tmp = Float64(2.0 / Float64((Float64(cbrt(sin(k)) * Float64(t_m / (cbrt(l) ^ 2.0))) ^ 3.0) * Float64(tan(k) * Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0)))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.86e-252], N[Power[N[(N[(l * N[(N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[t$95$m, 5.5e-104], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 28000000000000.0], N[(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] * N[(l / N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m * l), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.86 \cdot 10^{-252}:\\
\;\;\;\;{\left(\left(\ell \cdot \frac{\frac{\sqrt{2}}{k}}{\sin k}\right) \cdot \sqrt{\frac{\cos k}{t\_m}}\right)}^{2}\\
\mathbf{elif}\;t\_m \leq 5.5 \cdot 10^{-104}:\\
\;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot \left(t\_m \cdot {\sin k}^{2}\right)}{\cos k \cdot {\ell}^{2}}}\\
\mathbf{elif}\;t\_m \leq 28000000000000:\\
\;\;\;\;\left(\frac{2}{{t\_m}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)}\right) \cdot \frac{t\_m \cdot \ell}{k}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)\right)}\\
\end{array}
\end{array}
if t < 1.8600000000000001e-252Initial program 48.1%
Simplified49.6%
add-sqr-sqrt32.2%
Applied egg-rr37.7%
unpow237.7%
associate-/l*37.7%
associate-*l*36.0%
Simplified36.0%
Taylor expanded in t around 0 36.8%
associate-/l*36.8%
associate-/r*36.9%
Simplified36.9%
if 1.8600000000000001e-252 < t < 5.4999999999999998e-104Initial program 38.8%
Simplified38.8%
Taylor expanded in t around 0 80.1%
unpow280.1%
Applied egg-rr80.1%
if 5.4999999999999998e-104 < t < 2.8e13Initial program 59.3%
Simplified52.4%
associate-*r*56.2%
add-sqr-sqrt56.2%
times-frac56.3%
Applied egg-rr63.7%
associate-/l*73.3%
associate-*l*73.3%
Simplified73.3%
Taylor expanded in k around inf 46.3%
if 2.8e13 < t Initial program 62.1%
Simplified62.1%
add-cube-cbrt62.1%
pow362.1%
associate-/r*68.1%
*-commutative68.1%
cbrt-prod68.0%
associate-/r*62.1%
cbrt-div63.8%
rem-cbrt-cube71.3%
cbrt-prod90.1%
pow290.1%
Applied egg-rr90.1%
Final simplification57.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (sin k) 2.0)))
(*
t_s
(if (<= k 4e-19)
(/
2.0
(pow
(* (* t_m (pow (cbrt l) -2.0)) (* (pow (cbrt k) 2.0) (cbrt 2.0)))
3.0))
(if (<= k 1.1e+189)
(* 2.0 (/ (* (cos k) (pow l 2.0)) (* (* t_m t_2) (pow k 2.0))))
(*
(/ l (hypot 1.0 (hypot 1.0 (/ k t_m))))
(* (/ 2.0 k) (* (/ l (pow t_m 2.0)) (/ (cos k) t_2)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow(sin(k), 2.0);
double tmp;
if (k <= 4e-19) {
tmp = 2.0 / pow(((t_m * pow(cbrt(l), -2.0)) * (pow(cbrt(k), 2.0) * cbrt(2.0))), 3.0);
} else if (k <= 1.1e+189) {
tmp = 2.0 * ((cos(k) * pow(l, 2.0)) / ((t_m * t_2) * pow(k, 2.0)));
} else {
tmp = (l / hypot(1.0, hypot(1.0, (k / t_m)))) * ((2.0 / k) * ((l / pow(t_m, 2.0)) * (cos(k) / t_2)));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.pow(Math.sin(k), 2.0);
double tmp;
if (k <= 4e-19) {
tmp = 2.0 / Math.pow(((t_m * Math.pow(Math.cbrt(l), -2.0)) * (Math.pow(Math.cbrt(k), 2.0) * Math.cbrt(2.0))), 3.0);
} else if (k <= 1.1e+189) {
tmp = 2.0 * ((Math.cos(k) * Math.pow(l, 2.0)) / ((t_m * t_2) * Math.pow(k, 2.0)));
} else {
tmp = (l / Math.hypot(1.0, Math.hypot(1.0, (k / t_m)))) * ((2.0 / k) * ((l / Math.pow(t_m, 2.0)) * (Math.cos(k) / t_2)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = sin(k) ^ 2.0 tmp = 0.0 if (k <= 4e-19) tmp = Float64(2.0 / (Float64(Float64(t_m * (cbrt(l) ^ -2.0)) * Float64((cbrt(k) ^ 2.0) * cbrt(2.0))) ^ 3.0)); elseif (k <= 1.1e+189) tmp = Float64(2.0 * Float64(Float64(cos(k) * (l ^ 2.0)) / Float64(Float64(t_m * t_2) * (k ^ 2.0)))); else tmp = Float64(Float64(l / hypot(1.0, hypot(1.0, Float64(k / t_m)))) * Float64(Float64(2.0 / k) * Float64(Float64(l / (t_m ^ 2.0)) * Float64(cos(k) / t_2)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 4e-19], 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[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.1e+189], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$m * t$95$2), $MachinePrecision] * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 / k), $MachinePrecision] * N[(N[(l / N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {\sin k}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 4 \cdot 10^{-19}:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \left({\left(\sqrt[3]{k}\right)}^{2} \cdot \sqrt[3]{2}\right)\right)}^{3}}\\
\mathbf{elif}\;k \leq 1.1 \cdot 10^{+189}:\\
\;\;\;\;2 \cdot \frac{\cos k \cdot {\ell}^{2}}{\left(t\_m \cdot t\_2\right) \cdot {k}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)} \cdot \left(\frac{2}{k} \cdot \left(\frac{\ell}{{t\_m}^{2}} \cdot \frac{\cos k}{t\_2}\right)\right)\\
\end{array}
\end{array}
\end{array}
if k < 3.9999999999999999e-19Initial program 52.1%
Simplified52.7%
Taylor expanded in k around 0 52.7%
add-cube-cbrt52.6%
pow352.6%
cbrt-prod52.6%
associate-/l/50.5%
unpow250.5%
cbrt-div50.8%
unpow350.8%
add-cbrt-cube58.4%
unpow258.4%
cbrt-prod61.6%
unpow261.6%
div-inv61.6%
pow-flip61.6%
metadata-eval61.6%
Applied egg-rr61.6%
pow261.6%
*-commutative61.6%
cbrt-prod61.7%
cbrt-prod71.9%
pow271.9%
Applied egg-rr71.9%
if 3.9999999999999999e-19 < k < 1.10000000000000003e189Initial program 51.6%
Simplified51.6%
Taylor expanded in t around 0 76.2%
if 1.10000000000000003e189 < k Initial program 36.6%
Simplified36.5%
associate-*r*52.7%
add-sqr-sqrt52.7%
times-frac52.6%
Applied egg-rr56.8%
associate-/l*68.4%
associate-*l*68.4%
Simplified68.4%
Taylor expanded in t around 0 38.0%
associate-*r/38.0%
times-frac41.2%
times-frac41.2%
Simplified41.2%
Final simplification69.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (* t_m (pow (cbrt l) -2.0))))
(*
t_s
(if (<= k 3.5e-19)
(/ 2.0 (pow (* t_2 (* (pow (cbrt k) 2.0) (cbrt 2.0))) 3.0))
(if (<= k 1.2e+189)
(*
2.0
(/ (* (cos k) (pow l 2.0)) (* (* t_m (pow (sin k) 2.0)) (pow k 2.0))))
(if (<= k 3.5e+264)
(*
(/ l (hypot 1.0 (hypot 1.0 (/ k t_m))))
(* (/ 2.0 (* (pow t_m 3.0) (* (sin k) (tan k)))) (* l (/ t_m k))))
(/ 2.0 (pow (* t_2 (cbrt (* 2.0 (pow k 2.0)))) 3.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = t_m * pow(cbrt(l), -2.0);
double tmp;
if (k <= 3.5e-19) {
tmp = 2.0 / pow((t_2 * (pow(cbrt(k), 2.0) * cbrt(2.0))), 3.0);
} else if (k <= 1.2e+189) {
tmp = 2.0 * ((cos(k) * pow(l, 2.0)) / ((t_m * pow(sin(k), 2.0)) * pow(k, 2.0)));
} else if (k <= 3.5e+264) {
tmp = (l / hypot(1.0, hypot(1.0, (k / t_m)))) * ((2.0 / (pow(t_m, 3.0) * (sin(k) * tan(k)))) * (l * (t_m / k)));
} else {
tmp = 2.0 / pow((t_2 * cbrt((2.0 * pow(k, 2.0)))), 3.0);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = t_m * Math.pow(Math.cbrt(l), -2.0);
double tmp;
if (k <= 3.5e-19) {
tmp = 2.0 / Math.pow((t_2 * (Math.pow(Math.cbrt(k), 2.0) * Math.cbrt(2.0))), 3.0);
} else if (k <= 1.2e+189) {
tmp = 2.0 * ((Math.cos(k) * Math.pow(l, 2.0)) / ((t_m * Math.pow(Math.sin(k), 2.0)) * Math.pow(k, 2.0)));
} else if (k <= 3.5e+264) {
tmp = (l / Math.hypot(1.0, Math.hypot(1.0, (k / t_m)))) * ((2.0 / (Math.pow(t_m, 3.0) * (Math.sin(k) * Math.tan(k)))) * (l * (t_m / k)));
} else {
tmp = 2.0 / Math.pow((t_2 * Math.cbrt((2.0 * Math.pow(k, 2.0)))), 3.0);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(t_m * (cbrt(l) ^ -2.0)) tmp = 0.0 if (k <= 3.5e-19) tmp = Float64(2.0 / (Float64(t_2 * Float64((cbrt(k) ^ 2.0) * cbrt(2.0))) ^ 3.0)); elseif (k <= 1.2e+189) tmp = Float64(2.0 * Float64(Float64(cos(k) * (l ^ 2.0)) / Float64(Float64(t_m * (sin(k) ^ 2.0)) * (k ^ 2.0)))); elseif (k <= 3.5e+264) tmp = Float64(Float64(l / hypot(1.0, hypot(1.0, Float64(k / t_m)))) * Float64(Float64(2.0 / Float64((t_m ^ 3.0) * Float64(sin(k) * tan(k)))) * Float64(l * Float64(t_m / k)))); else tmp = Float64(2.0 / (Float64(t_2 * cbrt(Float64(2.0 * (k ^ 2.0)))) ^ 3.0)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 3.5e-19], N[(2.0 / N[Power[N[(t$95$2 * N[(N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.2e+189], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3.5e+264], N[(N[(l / N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] * 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] * N[(l * N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(t$95$2 * N[Power[N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 3.5 \cdot 10^{-19}:\\
\;\;\;\;\frac{2}{{\left(t\_2 \cdot \left({\left(\sqrt[3]{k}\right)}^{2} \cdot \sqrt[3]{2}\right)\right)}^{3}}\\
\mathbf{elif}\;k \leq 1.2 \cdot 10^{+189}:\\
\;\;\;\;2 \cdot \frac{\cos k \cdot {\ell}^{2}}{\left(t\_m \cdot {\sin k}^{2}\right) \cdot {k}^{2}}\\
\mathbf{elif}\;k \leq 3.5 \cdot 10^{+264}:\\
\;\;\;\;\frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)} \cdot \left(\frac{2}{{t\_m}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \left(\ell \cdot \frac{t\_m}{k}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_2 \cdot \sqrt[3]{2 \cdot {k}^{2}}\right)}^{3}}\\
\end{array}
\end{array}
\end{array}
if k < 3.50000000000000015e-19Initial program 52.1%
Simplified52.7%
Taylor expanded in k around 0 52.7%
add-cube-cbrt52.6%
pow352.6%
cbrt-prod52.6%
associate-/l/50.5%
unpow250.5%
cbrt-div50.8%
unpow350.8%
add-cbrt-cube58.4%
unpow258.4%
cbrt-prod61.6%
unpow261.6%
div-inv61.6%
pow-flip61.6%
metadata-eval61.6%
Applied egg-rr61.6%
pow261.6%
*-commutative61.6%
cbrt-prod61.7%
cbrt-prod71.9%
pow271.9%
Applied egg-rr71.9%
if 3.50000000000000015e-19 < k < 1.2e189Initial program 51.6%
Simplified51.6%
Taylor expanded in t around 0 76.2%
if 1.2e189 < k < 3.49999999999999987e264Initial program 39.7%
Simplified39.6%
associate-*r*56.5%
add-sqr-sqrt56.5%
times-frac56.4%
Applied egg-rr62.2%
associate-/l*77.9%
associate-*l*77.9%
Simplified77.9%
Taylor expanded in k around inf 40.4%
associate-/l*40.6%
Simplified40.6%
if 3.49999999999999987e264 < k Initial program 28.6%
Simplified42.9%
Taylor expanded in k around 0 42.9%
add-cube-cbrt42.9%
pow342.9%
cbrt-prod42.9%
associate-/l/28.6%
unpow228.6%
cbrt-div28.6%
unpow328.6%
add-cbrt-cube43.5%
unpow243.5%
cbrt-prod58.8%
unpow258.8%
div-inv58.8%
pow-flip58.8%
metadata-eval58.8%
Applied egg-rr58.8%
Final simplification70.1%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (* t_m (pow (cbrt l) -2.0))))
(*
t_s
(if (<= k 1.3e-19)
(/ 2.0 (pow (* t_2 (* (cbrt k) (cbrt (* 2.0 k)))) 3.0))
(if (<= k 1.4e+189)
(*
2.0
(/ (* (cos k) (pow l 2.0)) (* (* t_m (pow (sin k) 2.0)) (pow k 2.0))))
(if (<= k 9.5e+265)
(*
(/ l (hypot 1.0 (hypot 1.0 (/ k t_m))))
(* (/ 2.0 (* (pow t_m 3.0) (* (sin k) (tan k)))) (* l (/ t_m k))))
(/ 2.0 (pow (* t_2 (cbrt (* 2.0 (pow k 2.0)))) 3.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = t_m * pow(cbrt(l), -2.0);
double tmp;
if (k <= 1.3e-19) {
tmp = 2.0 / pow((t_2 * (cbrt(k) * cbrt((2.0 * k)))), 3.0);
} else if (k <= 1.4e+189) {
tmp = 2.0 * ((cos(k) * pow(l, 2.0)) / ((t_m * pow(sin(k), 2.0)) * pow(k, 2.0)));
} else if (k <= 9.5e+265) {
tmp = (l / hypot(1.0, hypot(1.0, (k / t_m)))) * ((2.0 / (pow(t_m, 3.0) * (sin(k) * tan(k)))) * (l * (t_m / k)));
} else {
tmp = 2.0 / pow((t_2 * cbrt((2.0 * pow(k, 2.0)))), 3.0);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = t_m * Math.pow(Math.cbrt(l), -2.0);
double tmp;
if (k <= 1.3e-19) {
tmp = 2.0 / Math.pow((t_2 * (Math.cbrt(k) * Math.cbrt((2.0 * k)))), 3.0);
} else if (k <= 1.4e+189) {
tmp = 2.0 * ((Math.cos(k) * Math.pow(l, 2.0)) / ((t_m * Math.pow(Math.sin(k), 2.0)) * Math.pow(k, 2.0)));
} else if (k <= 9.5e+265) {
tmp = (l / Math.hypot(1.0, Math.hypot(1.0, (k / t_m)))) * ((2.0 / (Math.pow(t_m, 3.0) * (Math.sin(k) * Math.tan(k)))) * (l * (t_m / k)));
} else {
tmp = 2.0 / Math.pow((t_2 * Math.cbrt((2.0 * Math.pow(k, 2.0)))), 3.0);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(t_m * (cbrt(l) ^ -2.0)) tmp = 0.0 if (k <= 1.3e-19) tmp = Float64(2.0 / (Float64(t_2 * Float64(cbrt(k) * cbrt(Float64(2.0 * k)))) ^ 3.0)); elseif (k <= 1.4e+189) tmp = Float64(2.0 * Float64(Float64(cos(k) * (l ^ 2.0)) / Float64(Float64(t_m * (sin(k) ^ 2.0)) * (k ^ 2.0)))); elseif (k <= 9.5e+265) tmp = Float64(Float64(l / hypot(1.0, hypot(1.0, Float64(k / t_m)))) * Float64(Float64(2.0 / Float64((t_m ^ 3.0) * Float64(sin(k) * tan(k)))) * Float64(l * Float64(t_m / k)))); else tmp = Float64(2.0 / (Float64(t_2 * cbrt(Float64(2.0 * (k ^ 2.0)))) ^ 3.0)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 1.3e-19], N[(2.0 / N[Power[N[(t$95$2 * N[(N[Power[k, 1/3], $MachinePrecision] * N[Power[N[(2.0 * k), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.4e+189], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 9.5e+265], N[(N[(l / N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] * 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] * N[(l * N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(t$95$2 * N[Power[N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.3 \cdot 10^{-19}:\\
\;\;\;\;\frac{2}{{\left(t\_2 \cdot \left(\sqrt[3]{k} \cdot \sqrt[3]{2 \cdot k}\right)\right)}^{3}}\\
\mathbf{elif}\;k \leq 1.4 \cdot 10^{+189}:\\
\;\;\;\;2 \cdot \frac{\cos k \cdot {\ell}^{2}}{\left(t\_m \cdot {\sin k}^{2}\right) \cdot {k}^{2}}\\
\mathbf{elif}\;k \leq 9.5 \cdot 10^{+265}:\\
\;\;\;\;\frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)} \cdot \left(\frac{2}{{t\_m}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \left(\ell \cdot \frac{t\_m}{k}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_2 \cdot \sqrt[3]{2 \cdot {k}^{2}}\right)}^{3}}\\
\end{array}
\end{array}
\end{array}
if k < 1.30000000000000006e-19Initial program 52.1%
Simplified52.7%
Taylor expanded in k around 0 52.7%
add-cube-cbrt52.6%
pow352.6%
cbrt-prod52.6%
associate-/l/50.5%
unpow250.5%
cbrt-div50.8%
unpow350.8%
add-cbrt-cube58.4%
unpow258.4%
cbrt-prod61.6%
unpow261.6%
div-inv61.6%
pow-flip61.6%
metadata-eval61.6%
Applied egg-rr61.6%
pow261.6%
associate-*r*61.6%
cbrt-prod71.9%
Applied egg-rr71.9%
if 1.30000000000000006e-19 < k < 1.40000000000000003e189Initial program 51.6%
Simplified51.6%
Taylor expanded in t around 0 76.2%
if 1.40000000000000003e189 < k < 9.4999999999999993e265Initial program 39.7%
Simplified39.6%
associate-*r*56.5%
add-sqr-sqrt56.5%
times-frac56.4%
Applied egg-rr62.2%
associate-/l*77.9%
associate-*l*77.9%
Simplified77.9%
Taylor expanded in k around inf 40.4%
associate-/l*40.6%
Simplified40.6%
if 9.4999999999999993e265 < k Initial program 28.6%
Simplified42.9%
Taylor expanded in k around 0 42.9%
add-cube-cbrt42.9%
pow342.9%
cbrt-prod42.9%
associate-/l/28.6%
unpow228.6%
cbrt-div28.6%
unpow328.6%
add-cbrt-cube43.5%
unpow243.5%
cbrt-prod58.8%
unpow258.8%
div-inv58.8%
pow-flip58.8%
metadata-eval58.8%
Applied egg-rr58.8%
Final simplification70.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 3e-255)
(pow (* (* l (/ (/ (sqrt 2.0) k) (sin k))) (sqrt (/ (cos k) t_m))) 2.0)
(if (<= t_m 7.4e-26)
(/ 2.0 (/ (* (* k k) (* t_m (pow (sin k) 2.0))) (* (cos k) (pow l 2.0))))
(if (<= t_m 5.6e+102)
(*
(* l (/ 2.0 (* (tan k) (* (sin k) (pow t_m 3.0)))))
(/ l (+ 2.0 (pow (/ k t_m) 2.0))))
(/
2.0
(*
(pow (* (cbrt (sin k)) (/ t_m (pow (cbrt l) 2.0))) 3.0)
(* 2.0 k))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3e-255) {
tmp = pow(((l * ((sqrt(2.0) / k) / sin(k))) * sqrt((cos(k) / t_m))), 2.0);
} else if (t_m <= 7.4e-26) {
tmp = 2.0 / (((k * k) * (t_m * pow(sin(k), 2.0))) / (cos(k) * pow(l, 2.0)));
} else if (t_m <= 5.6e+102) {
tmp = (l * (2.0 / (tan(k) * (sin(k) * pow(t_m, 3.0))))) * (l / (2.0 + pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / (pow((cbrt(sin(k)) * (t_m / pow(cbrt(l), 2.0))), 3.0) * (2.0 * k));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3e-255) {
tmp = Math.pow(((l * ((Math.sqrt(2.0) / k) / Math.sin(k))) * Math.sqrt((Math.cos(k) / t_m))), 2.0);
} else if (t_m <= 7.4e-26) {
tmp = 2.0 / (((k * k) * (t_m * Math.pow(Math.sin(k), 2.0))) / (Math.cos(k) * Math.pow(l, 2.0)));
} else if (t_m <= 5.6e+102) {
tmp = (l * (2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow(t_m, 3.0))))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / (Math.pow((Math.cbrt(Math.sin(k)) * (t_m / Math.pow(Math.cbrt(l), 2.0))), 3.0) * (2.0 * k));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 3e-255) tmp = Float64(Float64(l * Float64(Float64(sqrt(2.0) / k) / sin(k))) * sqrt(Float64(cos(k) / t_m))) ^ 2.0; elseif (t_m <= 7.4e-26) tmp = Float64(2.0 / Float64(Float64(Float64(k * k) * Float64(t_m * (sin(k) ^ 2.0))) / Float64(cos(k) * (l ^ 2.0)))); elseif (t_m <= 5.6e+102) tmp = Float64(Float64(l * Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (t_m ^ 3.0))))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); else tmp = Float64(2.0 / Float64((Float64(cbrt(sin(k)) * Float64(t_m / (cbrt(l) ^ 2.0))) ^ 3.0) * Float64(2.0 * k))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3e-255], N[Power[N[(N[(l * N[(N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[t$95$m, 7.4e-26], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.6e+102], N[(N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3 \cdot 10^{-255}:\\
\;\;\;\;{\left(\left(\ell \cdot \frac{\frac{\sqrt{2}}{k}}{\sin k}\right) \cdot \sqrt{\frac{\cos k}{t\_m}}\right)}^{2}\\
\mathbf{elif}\;t\_m \leq 7.4 \cdot 10^{-26}:\\
\;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot \left(t\_m \cdot {\sin k}^{2}\right)}{\cos k \cdot {\ell}^{2}}}\\
\mathbf{elif}\;t\_m \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;\left(\ell \cdot \frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot k\right)}\\
\end{array}
\end{array}
if t < 3.00000000000000002e-255Initial program 48.1%
Simplified49.6%
add-sqr-sqrt32.2%
Applied egg-rr37.7%
unpow237.7%
associate-/l*37.7%
associate-*l*36.0%
Simplified36.0%
Taylor expanded in t around 0 36.8%
associate-/l*36.8%
associate-/r*36.9%
Simplified36.9%
if 3.00000000000000002e-255 < t < 7.3999999999999997e-26Initial program 45.2%
Simplified45.2%
Taylor expanded in t around 0 73.8%
unpow273.8%
Applied egg-rr73.8%
if 7.3999999999999997e-26 < t < 5.60000000000000037e102Initial program 60.8%
Simplified63.5%
associate-*r*77.8%
*-un-lft-identity77.8%
times-frac77.9%
associate-/l/78.0%
Applied egg-rr78.0%
if 5.60000000000000037e102 < t Initial program 62.4%
Simplified62.4%
add-cube-cbrt62.4%
pow362.4%
associate-/r*63.7%
*-commutative63.7%
cbrt-prod63.7%
associate-/r*62.4%
cbrt-div62.4%
rem-cbrt-cube74.3%
cbrt-prod93.2%
pow293.2%
Applied egg-rr93.2%
Taylor expanded in k around 0 83.0%
Final simplification57.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-18)
(/
2.0
(pow (* (* t_m (pow (cbrt l) -2.0)) (* (cbrt k) (cbrt (* 2.0 k)))) 3.0))
(*
2.0
(/ (* (cos k) (pow l 2.0)) (* (* t_m (pow (sin k) 2.0)) (pow k 2.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.7e-18) {
tmp = 2.0 / pow(((t_m * pow(cbrt(l), -2.0)) * (cbrt(k) * cbrt((2.0 * k)))), 3.0);
} else {
tmp = 2.0 * ((cos(k) * pow(l, 2.0)) / ((t_m * pow(sin(k), 2.0)) * pow(k, 2.0)));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.7e-18) {
tmp = 2.0 / Math.pow(((t_m * Math.pow(Math.cbrt(l), -2.0)) * (Math.cbrt(k) * Math.cbrt((2.0 * k)))), 3.0);
} else {
tmp = 2.0 * ((Math.cos(k) * Math.pow(l, 2.0)) / ((t_m * Math.pow(Math.sin(k), 2.0)) * Math.pow(k, 2.0)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.7e-18) tmp = Float64(2.0 / (Float64(Float64(t_m * (cbrt(l) ^ -2.0)) * Float64(cbrt(k) * cbrt(Float64(2.0 * k)))) ^ 3.0)); else tmp = Float64(2.0 * Float64(Float64(cos(k) * (l ^ 2.0)) / Float64(Float64(t_m * (sin(k) ^ 2.0)) * (k ^ 2.0)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.7e-18], 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[Power[N[(2.0 * k), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.7 \cdot 10^{-18}:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \left(\sqrt[3]{k} \cdot \sqrt[3]{2 \cdot k}\right)\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\cos k \cdot {\ell}^{2}}{\left(t\_m \cdot {\sin k}^{2}\right) \cdot {k}^{2}}\\
\end{array}
\end{array}
if k < 1.70000000000000001e-18Initial program 52.1%
Simplified52.7%
Taylor expanded in k around 0 52.7%
add-cube-cbrt52.6%
pow352.6%
cbrt-prod52.6%
associate-/l/50.5%
unpow250.5%
cbrt-div50.8%
unpow350.8%
add-cbrt-cube58.4%
unpow258.4%
cbrt-prod61.6%
unpow261.6%
div-inv61.6%
pow-flip61.6%
metadata-eval61.6%
Applied egg-rr61.6%
pow261.6%
associate-*r*61.6%
cbrt-prod71.9%
Applied egg-rr71.9%
if 1.70000000000000001e-18 < k Initial program 46.3%
Simplified46.3%
Taylor expanded in t around 0 62.3%
Final simplification69.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1.65e-18)
(/
2.0
(pow (* (* t_m (pow (cbrt l) -2.0)) (* (cbrt k) (cbrt (* 2.0 k)))) 3.0))
(/
2.0
(/ (* (* k k) (* t_m (pow (sin k) 2.0))) (* (cos k) (pow l 2.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.65e-18) {
tmp = 2.0 / pow(((t_m * pow(cbrt(l), -2.0)) * (cbrt(k) * cbrt((2.0 * k)))), 3.0);
} else {
tmp = 2.0 / (((k * k) * (t_m * pow(sin(k), 2.0))) / (cos(k) * pow(l, 2.0)));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.65e-18) {
tmp = 2.0 / Math.pow(((t_m * Math.pow(Math.cbrt(l), -2.0)) * (Math.cbrt(k) * Math.cbrt((2.0 * k)))), 3.0);
} else {
tmp = 2.0 / (((k * k) * (t_m * Math.pow(Math.sin(k), 2.0))) / (Math.cos(k) * Math.pow(l, 2.0)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.65e-18) tmp = Float64(2.0 / (Float64(Float64(t_m * (cbrt(l) ^ -2.0)) * Float64(cbrt(k) * cbrt(Float64(2.0 * k)))) ^ 3.0)); else tmp = Float64(2.0 / Float64(Float64(Float64(k * k) * Float64(t_m * (sin(k) ^ 2.0))) / Float64(cos(k) * (l ^ 2.0)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.65e-18], 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[Power[N[(2.0 * k), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $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.65 \cdot 10^{-18}:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \left(\sqrt[3]{k} \cdot \sqrt[3]{2 \cdot k}\right)\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot \left(t\_m \cdot {\sin k}^{2}\right)}{\cos k \cdot {\ell}^{2}}}\\
\end{array}
\end{array}
if k < 1.6500000000000001e-18Initial program 52.1%
Simplified52.7%
Taylor expanded in k around 0 52.7%
add-cube-cbrt52.6%
pow352.6%
cbrt-prod52.6%
associate-/l/50.5%
unpow250.5%
cbrt-div50.8%
unpow350.8%
add-cbrt-cube58.4%
unpow258.4%
cbrt-prod61.6%
unpow261.6%
div-inv61.6%
pow-flip61.6%
metadata-eval61.6%
Applied egg-rr61.6%
pow261.6%
associate-*r*61.6%
cbrt-prod71.9%
Applied egg-rr71.9%
if 1.6500000000000001e-18 < k Initial program 46.3%
Simplified46.3%
Taylor expanded in t around 0 62.3%
unpow262.3%
Applied egg-rr62.3%
Final simplification69.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 8e-255)
(pow (* (* l (/ (/ (sqrt 2.0) k) (sin k))) (sqrt (/ (cos k) t_m))) 2.0)
(if (<= t_m 2.15e-22)
(/ 2.0 (/ (* (* k k) (* t_m (pow (sin k) 2.0))) (* (cos k) (pow l 2.0))))
(if (<= t_m 5.6e+102)
(*
(* l (/ 2.0 (* (tan k) (* (sin k) (pow t_m 3.0)))))
(/ l (+ 2.0 (pow (/ k t_m) 2.0))))
(/
2.0
(* (* 2.0 k) (pow (* (/ t_m (pow (cbrt l) 2.0)) (cbrt 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 <= 8e-255) {
tmp = pow(((l * ((sqrt(2.0) / k) / sin(k))) * sqrt((cos(k) / t_m))), 2.0);
} else if (t_m <= 2.15e-22) {
tmp = 2.0 / (((k * k) * (t_m * pow(sin(k), 2.0))) / (cos(k) * pow(l, 2.0)));
} else if (t_m <= 5.6e+102) {
tmp = (l * (2.0 / (tan(k) * (sin(k) * pow(t_m, 3.0))))) * (l / (2.0 + pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / ((2.0 * k) * pow(((t_m / pow(cbrt(l), 2.0)) * cbrt(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 <= 8e-255) {
tmp = Math.pow(((l * ((Math.sqrt(2.0) / k) / Math.sin(k))) * Math.sqrt((Math.cos(k) / t_m))), 2.0);
} else if (t_m <= 2.15e-22) {
tmp = 2.0 / (((k * k) * (t_m * Math.pow(Math.sin(k), 2.0))) / (Math.cos(k) * Math.pow(l, 2.0)));
} else if (t_m <= 5.6e+102) {
tmp = (l * (2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow(t_m, 3.0))))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / ((2.0 * k) * Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * Math.cbrt(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 <= 8e-255) tmp = Float64(Float64(l * Float64(Float64(sqrt(2.0) / k) / sin(k))) * sqrt(Float64(cos(k) / t_m))) ^ 2.0; elseif (t_m <= 2.15e-22) tmp = Float64(2.0 / Float64(Float64(Float64(k * k) * Float64(t_m * (sin(k) ^ 2.0))) / Float64(cos(k) * (l ^ 2.0)))); elseif (t_m <= 5.6e+102) tmp = Float64(Float64(l * Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (t_m ^ 3.0))))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * cbrt(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, 8e-255], N[Power[N[(N[(l * N[(N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[t$95$m, 2.15e-22], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.6e+102], N[(N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[k, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $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 \cdot 10^{-255}:\\
\;\;\;\;{\left(\left(\ell \cdot \frac{\frac{\sqrt{2}}{k}}{\sin k}\right) \cdot \sqrt{\frac{\cos k}{t\_m}}\right)}^{2}\\
\mathbf{elif}\;t\_m \leq 2.15 \cdot 10^{-22}:\\
\;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot \left(t\_m \cdot {\sin k}^{2}\right)}{\cos k \cdot {\ell}^{2}}}\\
\mathbf{elif}\;t\_m \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;\left(\ell \cdot \frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{k}\right)}^{3}}\\
\end{array}
\end{array}
if t < 8.0000000000000001e-255Initial program 48.1%
Simplified49.6%
add-sqr-sqrt32.2%
Applied egg-rr37.7%
unpow237.7%
associate-/l*37.7%
associate-*l*36.0%
Simplified36.0%
Taylor expanded in t around 0 36.8%
associate-/l*36.8%
associate-/r*36.9%
Simplified36.9%
if 8.0000000000000001e-255 < t < 2.15000000000000019e-22Initial program 45.2%
Simplified45.2%
Taylor expanded in t around 0 73.8%
unpow273.8%
Applied egg-rr73.8%
if 2.15000000000000019e-22 < t < 5.60000000000000037e102Initial program 60.8%
Simplified63.5%
associate-*r*77.8%
*-un-lft-identity77.8%
times-frac77.9%
associate-/l/78.0%
Applied egg-rr78.0%
if 5.60000000000000037e102 < t Initial program 62.4%
Simplified62.4%
add-cube-cbrt62.4%
pow362.4%
associate-/r*63.7%
*-commutative63.7%
cbrt-prod63.7%
associate-/r*62.4%
cbrt-div62.4%
rem-cbrt-cube74.3%
cbrt-prod93.2%
pow293.2%
Applied egg-rr93.2%
Taylor expanded in k around 0 83.0%
Taylor expanded in k around 0 83.0%
Final simplification57.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 9.8e-255)
(pow (* l (* (/ (/ (sqrt 2.0) k) (sin k)) (sqrt (/ (cos k) t_m)))) 2.0)
(if (<= t_m 3.1e-25)
(/ 2.0 (/ (* (* k k) (* t_m (pow (sin k) 2.0))) (* (cos k) (pow l 2.0))))
(if (<= t_m 5.6e+102)
(*
(* l (/ 2.0 (* (tan k) (* (sin k) (pow t_m 3.0)))))
(/ l (+ 2.0 (pow (/ k t_m) 2.0))))
(/
2.0
(* (* 2.0 k) (pow (* (/ t_m (pow (cbrt l) 2.0)) (cbrt 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 <= 9.8e-255) {
tmp = pow((l * (((sqrt(2.0) / k) / sin(k)) * sqrt((cos(k) / t_m)))), 2.0);
} else if (t_m <= 3.1e-25) {
tmp = 2.0 / (((k * k) * (t_m * pow(sin(k), 2.0))) / (cos(k) * pow(l, 2.0)));
} else if (t_m <= 5.6e+102) {
tmp = (l * (2.0 / (tan(k) * (sin(k) * pow(t_m, 3.0))))) * (l / (2.0 + pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / ((2.0 * k) * pow(((t_m / pow(cbrt(l), 2.0)) * cbrt(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 <= 9.8e-255) {
tmp = Math.pow((l * (((Math.sqrt(2.0) / k) / Math.sin(k)) * Math.sqrt((Math.cos(k) / t_m)))), 2.0);
} else if (t_m <= 3.1e-25) {
tmp = 2.0 / (((k * k) * (t_m * Math.pow(Math.sin(k), 2.0))) / (Math.cos(k) * Math.pow(l, 2.0)));
} else if (t_m <= 5.6e+102) {
tmp = (l * (2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow(t_m, 3.0))))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / ((2.0 * k) * Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * Math.cbrt(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 <= 9.8e-255) tmp = Float64(l * Float64(Float64(Float64(sqrt(2.0) / k) / sin(k)) * sqrt(Float64(cos(k) / t_m)))) ^ 2.0; elseif (t_m <= 3.1e-25) tmp = Float64(2.0 / Float64(Float64(Float64(k * k) * Float64(t_m * (sin(k) ^ 2.0))) / Float64(cos(k) * (l ^ 2.0)))); elseif (t_m <= 5.6e+102) tmp = Float64(Float64(l * Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (t_m ^ 3.0))))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * cbrt(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, 9.8e-255], N[Power[N[(l * N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[t$95$m, 3.1e-25], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.6e+102], N[(N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[k, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 9.8 \cdot 10^{-255}:\\
\;\;\;\;{\left(\ell \cdot \left(\frac{\frac{\sqrt{2}}{k}}{\sin k} \cdot \sqrt{\frac{\cos k}{t\_m}}\right)\right)}^{2}\\
\mathbf{elif}\;t\_m \leq 3.1 \cdot 10^{-25}:\\
\;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot \left(t\_m \cdot {\sin k}^{2}\right)}{\cos k \cdot {\ell}^{2}}}\\
\mathbf{elif}\;t\_m \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;\left(\ell \cdot \frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{k}\right)}^{3}}\\
\end{array}
\end{array}
if t < 9.79999999999999922e-255Initial program 48.1%
Simplified49.6%
add-sqr-sqrt32.2%
Applied egg-rr37.7%
unpow237.7%
associate-/l*37.7%
associate-*l*36.0%
Simplified36.0%
Taylor expanded in t around 0 35.3%
*-commutative35.3%
associate-/r*35.3%
Simplified35.3%
if 9.79999999999999922e-255 < t < 3.09999999999999995e-25Initial program 45.2%
Simplified45.2%
Taylor expanded in t around 0 73.8%
unpow273.8%
Applied egg-rr73.8%
if 3.09999999999999995e-25 < t < 5.60000000000000037e102Initial program 60.8%
Simplified63.5%
associate-*r*77.8%
*-un-lft-identity77.8%
times-frac77.9%
associate-/l/78.0%
Applied egg-rr78.0%
if 5.60000000000000037e102 < t Initial program 62.4%
Simplified62.4%
add-cube-cbrt62.4%
pow362.4%
associate-/r*63.7%
*-commutative63.7%
cbrt-prod63.7%
associate-/r*62.4%
cbrt-div62.4%
rem-cbrt-cube74.3%
cbrt-prod93.2%
pow293.2%
Applied egg-rr93.2%
Taylor expanded in k around 0 83.0%
Taylor expanded in k around 0 83.0%
Final simplification56.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 5.8e-26)
(/ 2.0 (/ (* (* k k) (* t_m (pow (sin k) 2.0))) (* (cos k) (pow l 2.0))))
(if (<= t_m 5.6e+102)
(*
(* l (/ 2.0 (* (tan k) (* (sin k) (pow t_m 3.0)))))
(/ l (+ 2.0 (pow (/ k t_m) 2.0))))
(/
2.0
(* (* 2.0 k) (pow (* (/ t_m (pow (cbrt l) 2.0)) (cbrt 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 <= 5.8e-26) {
tmp = 2.0 / (((k * k) * (t_m * pow(sin(k), 2.0))) / (cos(k) * pow(l, 2.0)));
} else if (t_m <= 5.6e+102) {
tmp = (l * (2.0 / (tan(k) * (sin(k) * pow(t_m, 3.0))))) * (l / (2.0 + pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / ((2.0 * k) * pow(((t_m / pow(cbrt(l), 2.0)) * cbrt(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 <= 5.8e-26) {
tmp = 2.0 / (((k * k) * (t_m * Math.pow(Math.sin(k), 2.0))) / (Math.cos(k) * Math.pow(l, 2.0)));
} else if (t_m <= 5.6e+102) {
tmp = (l * (2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow(t_m, 3.0))))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / ((2.0 * k) * Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * Math.cbrt(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 <= 5.8e-26) tmp = Float64(2.0 / Float64(Float64(Float64(k * k) * Float64(t_m * (sin(k) ^ 2.0))) / Float64(cos(k) * (l ^ 2.0)))); elseif (t_m <= 5.6e+102) tmp = Float64(Float64(l * Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (t_m ^ 3.0))))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * cbrt(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, 5.8e-26], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.6e+102], N[(N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[k, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 5.8 \cdot 10^{-26}:\\
\;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot \left(t\_m \cdot {\sin k}^{2}\right)}{\cos k \cdot {\ell}^{2}}}\\
\mathbf{elif}\;t\_m \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;\left(\ell \cdot \frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{k}\right)}^{3}}\\
\end{array}
\end{array}
if t < 5.7999999999999996e-26Initial program 47.0%
Simplified47.0%
Taylor expanded in t around 0 62.3%
unpow262.3%
Applied egg-rr62.3%
if 5.7999999999999996e-26 < t < 5.60000000000000037e102Initial program 60.8%
Simplified63.5%
associate-*r*77.8%
*-un-lft-identity77.8%
times-frac77.9%
associate-/l/78.0%
Applied egg-rr78.0%
if 5.60000000000000037e102 < t Initial program 62.4%
Simplified62.4%
add-cube-cbrt62.4%
pow362.4%
associate-/r*63.7%
*-commutative63.7%
cbrt-prod63.7%
associate-/r*62.4%
cbrt-div62.4%
rem-cbrt-cube74.3%
cbrt-prod93.2%
pow293.2%
Applied egg-rr93.2%
Taylor expanded in k around 0 83.0%
Taylor expanded in k around 0 83.0%
Final simplification66.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 2.2e-29)
(/ 2.0 (* (* 2.0 k) (pow (* (/ t_m (pow (cbrt l) 2.0)) (cbrt k)) 3.0)))
(/
2.0
(/ (* (* k k) (* t_m (pow (sin k) 2.0))) (* (cos k) (pow l 2.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 2.2e-29) {
tmp = 2.0 / ((2.0 * k) * pow(((t_m / pow(cbrt(l), 2.0)) * cbrt(k)), 3.0));
} else {
tmp = 2.0 / (((k * k) * (t_m * pow(sin(k), 2.0))) / (cos(k) * pow(l, 2.0)));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 2.2e-29) {
tmp = 2.0 / ((2.0 * k) * Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * Math.cbrt(k)), 3.0));
} else {
tmp = 2.0 / (((k * k) * (t_m * Math.pow(Math.sin(k), 2.0))) / (Math.cos(k) * Math.pow(l, 2.0)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 2.2e-29) tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * cbrt(k)) ^ 3.0))); else tmp = Float64(2.0 / Float64(Float64(Float64(k * k) * Float64(t_m * (sin(k) ^ 2.0))) / Float64(cos(k) * (l ^ 2.0)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 2.2e-29], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[k, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2.2 \cdot 10^{-29}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{k}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot \left(t\_m \cdot {\sin k}^{2}\right)}{\cos k \cdot {\ell}^{2}}}\\
\end{array}
\end{array}
if k < 2.1999999999999999e-29Initial program 52.1%
Simplified52.1%
add-cube-cbrt52.1%
pow352.1%
associate-/r*56.7%
*-commutative56.7%
cbrt-prod56.6%
associate-/r*52.1%
cbrt-div53.1%
rem-cbrt-cube60.3%
cbrt-prod70.3%
pow270.3%
Applied egg-rr70.3%
Taylor expanded in k around 0 64.6%
Taylor expanded in k around 0 67.1%
if 2.1999999999999999e-29 < k Initial program 46.3%
Simplified46.3%
Taylor expanded in t around 0 62.3%
unpow262.3%
Applied egg-rr62.3%
Final simplification65.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1.7e-18)
(/ 2.0 (* (* 2.0 k) (pow (* (/ t_m (pow (cbrt l) 2.0)) (cbrt k)) 3.0)))
(/ 2.0 (/ (* (pow k 2.0) (* t_m (pow k 2.0))) (* (cos k) (pow l 2.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.7e-18) {
tmp = 2.0 / ((2.0 * k) * pow(((t_m / pow(cbrt(l), 2.0)) * cbrt(k)), 3.0));
} else {
tmp = 2.0 / ((pow(k, 2.0) * (t_m * pow(k, 2.0))) / (cos(k) * pow(l, 2.0)));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.7e-18) {
tmp = 2.0 / ((2.0 * k) * Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * Math.cbrt(k)), 3.0));
} else {
tmp = 2.0 / ((Math.pow(k, 2.0) * (t_m * Math.pow(k, 2.0))) / (Math.cos(k) * Math.pow(l, 2.0)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.7e-18) tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * cbrt(k)) ^ 3.0))); else tmp = Float64(2.0 / Float64(Float64((k ^ 2.0) * Float64(t_m * (k ^ 2.0))) / Float64(cos(k) * (l ^ 2.0)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.7e-18], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[k, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.7 \cdot 10^{-18}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{k}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{k}^{2} \cdot \left(t\_m \cdot {k}^{2}\right)}{\cos k \cdot {\ell}^{2}}}\\
\end{array}
\end{array}
if k < 1.70000000000000001e-18Initial program 52.1%
Simplified52.1%
add-cube-cbrt52.1%
pow352.1%
associate-/r*56.7%
*-commutative56.7%
cbrt-prod56.6%
associate-/r*52.1%
cbrt-div53.1%
rem-cbrt-cube60.3%
cbrt-prod70.3%
pow270.3%
Applied egg-rr70.3%
Taylor expanded in k around 0 64.6%
Taylor expanded in k around 0 67.1%
if 1.70000000000000001e-18 < k Initial program 46.3%
Simplified46.3%
Taylor expanded in t around 0 62.3%
Taylor expanded in k around 0 52.8%
Final simplification63.2%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1e-63)
(/ 2.0 (* (* 2.0 k) (pow (* (/ t_m (pow (cbrt l) 2.0)) (cbrt k)) 3.0)))
(/ 2.0 (* (* 2.0 k) (pow (* t_m (cbrt (/ k (pow l 2.0)))) 3.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1e-63) {
tmp = 2.0 / ((2.0 * k) * pow(((t_m / pow(cbrt(l), 2.0)) * cbrt(k)), 3.0));
} else {
tmp = 2.0 / ((2.0 * k) * pow((t_m * cbrt((k / pow(l, 2.0)))), 3.0));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1e-63) {
tmp = 2.0 / ((2.0 * k) * Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * Math.cbrt(k)), 3.0));
} else {
tmp = 2.0 / ((2.0 * k) * Math.pow((t_m * Math.cbrt((k / Math.pow(l, 2.0)))), 3.0));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1e-63) tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * cbrt(k)) ^ 3.0))); else tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(t_m * cbrt(Float64(k / (l ^ 2.0)))) ^ 3.0))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1e-63], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[k, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(t$95$m * N[Power[N[(k / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $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 10^{-63}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{k}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(t\_m \cdot \sqrt[3]{\frac{k}{{\ell}^{2}}}\right)}^{3}}\\
\end{array}
\end{array}
if k < 1.00000000000000007e-63Initial program 51.9%
Simplified51.9%
add-cube-cbrt51.8%
pow351.8%
associate-/r*56.4%
*-commutative56.4%
cbrt-prod56.4%
associate-/r*51.8%
cbrt-div52.8%
rem-cbrt-cube60.0%
cbrt-prod70.2%
pow270.2%
Applied egg-rr70.2%
Taylor expanded in k around 0 64.4%
Taylor expanded in k around 0 66.9%
if 1.00000000000000007e-63 < k Initial program 47.0%
Simplified47.0%
add-cube-cbrt47.0%
pow347.0%
associate-/r*54.3%
*-commutative54.3%
cbrt-prod54.2%
associate-/r*46.9%
cbrt-div47.0%
rem-cbrt-cube54.0%
cbrt-prod67.3%
pow267.3%
Applied egg-rr67.3%
Taylor expanded in k around 0 43.1%
Taylor expanded in k around 0 53.7%
Final simplification63.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1.6e-62)
(/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* (sqrt 2.0) k)) 2.0))
(/ 2.0 (* (* 2.0 k) (pow (* t_m (cbrt (/ k (pow l 2.0)))) 3.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.6e-62) {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (sqrt(2.0) * k)), 2.0);
} else {
tmp = 2.0 / ((2.0 * k) * pow((t_m * cbrt((k / pow(l, 2.0)))), 3.0));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.6e-62) {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (Math.sqrt(2.0) * k)), 2.0);
} else {
tmp = 2.0 / ((2.0 * k) * Math.pow((t_m * Math.cbrt((k / Math.pow(l, 2.0)))), 3.0));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.6e-62) tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(sqrt(2.0) * k)) ^ 2.0)); else tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(t_m * cbrt(Float64(k / (l ^ 2.0)))) ^ 3.0))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.6e-62], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(t$95$m * N[Power[N[(k / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $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.6 \cdot 10^{-62}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(\sqrt{2} \cdot k\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(t\_m \cdot \sqrt[3]{\frac{k}{{\ell}^{2}}}\right)}^{3}}\\
\end{array}
\end{array}
if k < 1.60000000000000011e-62Initial program 51.9%
Simplified52.5%
Taylor expanded in k around 0 52.4%
unpow259.2%
Applied egg-rr52.4%
Applied egg-rr37.5%
associate-*r/37.5%
metadata-eval37.5%
*-commutative37.5%
Simplified37.5%
if 1.60000000000000011e-62 < k Initial program 47.0%
Simplified47.0%
add-cube-cbrt47.0%
pow347.0%
associate-/r*54.3%
*-commutative54.3%
cbrt-prod54.2%
associate-/r*46.9%
cbrt-div47.0%
rem-cbrt-cube54.0%
cbrt-prod67.3%
pow267.3%
Applied egg-rr67.3%
Taylor expanded in k around 0 43.1%
Taylor expanded in k around 0 53.7%
Final simplification42.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1.8e-35)
(/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* (sqrt 2.0) k)) 2.0))
(/ 2.0 (/ (* t_m (pow k 4.0)) (* (cos k) (pow l 2.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.8e-35) {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (sqrt(2.0) * k)), 2.0);
} else {
tmp = 2.0 / ((t_m * pow(k, 4.0)) / (cos(k) * pow(l, 2.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1.8d-35) then
tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) * (sqrt(2.0d0) * k)) ** 2.0d0)
else
tmp = 2.0d0 / ((t_m * (k ** 4.0d0)) / (cos(k) * (l ** 2.0d0)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.8e-35) {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (Math.sqrt(2.0) * k)), 2.0);
} else {
tmp = 2.0 / ((t_m * Math.pow(k, 4.0)) / (Math.cos(k) * Math.pow(l, 2.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 1.8e-35: tmp = 2.0 / math.pow(((math.pow(t_m, 1.5) / l) * (math.sqrt(2.0) * k)), 2.0) else: tmp = 2.0 / ((t_m * math.pow(k, 4.0)) / (math.cos(k) * math.pow(l, 2.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.8e-35) tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(sqrt(2.0) * k)) ^ 2.0)); else tmp = Float64(2.0 / Float64(Float64(t_m * (k ^ 4.0)) / Float64(cos(k) * (l ^ 2.0)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 1.8e-35) tmp = 2.0 / ((((t_m ^ 1.5) / l) * (sqrt(2.0) * k)) ^ 2.0); else tmp = 2.0 / ((t_m * (k ^ 4.0)) / (cos(k) * (l ^ 2.0))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.8e-35], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.8 \cdot 10^{-35}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(\sqrt{2} \cdot k\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{4}}{\cos k \cdot {\ell}^{2}}}\\
\end{array}
\end{array}
if k < 1.80000000000000009e-35Initial program 52.1%
Simplified52.7%
Taylor expanded in k around 0 52.7%
unpow258.9%
Applied egg-rr52.7%
Applied egg-rr37.3%
associate-*r/37.3%
metadata-eval37.3%
*-commutative37.3%
Simplified37.3%
if 1.80000000000000009e-35 < k Initial program 46.3%
Simplified46.3%
Taylor expanded in t around 0 62.3%
Taylor expanded in k around 0 51.4%
Final simplification41.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 2.4e-63)
(/ 2.0 (/ (* t_m (pow k 4.0)) (* (cos k) (pow l 2.0))))
(/ 2.0 (* (* 2.0 k) (/ (* k (pow t_m 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) {
double tmp;
if (t_m <= 2.4e-63) {
tmp = 2.0 / ((t_m * pow(k, 4.0)) / (cos(k) * pow(l, 2.0)));
} else {
tmp = 2.0 / ((2.0 * k) * ((k * pow(t_m, 3.0)) / pow(l, 2.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 2.4d-63) then
tmp = 2.0d0 / ((t_m * (k ** 4.0d0)) / (cos(k) * (l ** 2.0d0)))
else
tmp = 2.0d0 / ((2.0d0 * k) * ((k * (t_m ** 3.0d0)) / (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 <= 2.4e-63) {
tmp = 2.0 / ((t_m * Math.pow(k, 4.0)) / (Math.cos(k) * Math.pow(l, 2.0)));
} else {
tmp = 2.0 / ((2.0 * k) * ((k * Math.pow(t_m, 3.0)) / Math.pow(l, 2.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 2.4e-63: tmp = 2.0 / ((t_m * math.pow(k, 4.0)) / (math.cos(k) * math.pow(l, 2.0))) else: tmp = 2.0 / ((2.0 * k) * ((k * math.pow(t_m, 3.0)) / math.pow(l, 2.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 2.4e-63) tmp = Float64(2.0 / Float64(Float64(t_m * (k ^ 4.0)) / Float64(cos(k) * (l ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(Float64(k * (t_m ^ 3.0)) / (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 <= 2.4e-63) tmp = 2.0 / ((t_m * (k ^ 4.0)) / (cos(k) * (l ^ 2.0))); else tmp = 2.0 / ((2.0 * k) * ((k * (t_m ^ 3.0)) / (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, 2.4e-63], N[(2.0 / N[(N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[(k * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.4 \cdot 10^{-63}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{4}}{\cos k \cdot {\ell}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \frac{k \cdot {t\_m}^{3}}{{\ell}^{2}}}\\
\end{array}
\end{array}
if t < 2.4000000000000001e-63Initial program 46.0%
Simplified46.0%
Taylor expanded in t around 0 62.3%
Taylor expanded in k around 0 50.8%
if 2.4000000000000001e-63 < t Initial program 61.7%
Simplified61.7%
add-cube-cbrt61.7%
pow361.7%
associate-/r*68.7%
*-commutative68.7%
cbrt-prod68.6%
associate-/r*61.7%
cbrt-div63.0%
rem-cbrt-cube68.4%
cbrt-prod84.6%
pow284.6%
Applied egg-rr84.6%
Taylor expanded in k around 0 69.9%
Taylor expanded in k around 0 60.7%
Final simplification53.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 5.5e-104)
(/ 2.0 (* (pow k 4.0) (/ t_m (pow l 2.0))))
(/ 2.0 (* (* 2.0 k) (/ (* k (pow t_m 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) {
double tmp;
if (t_m <= 5.5e-104) {
tmp = 2.0 / (pow(k, 4.0) * (t_m / pow(l, 2.0)));
} else {
tmp = 2.0 / ((2.0 * k) * ((k * pow(t_m, 3.0)) / pow(l, 2.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 5.5d-104) then
tmp = 2.0d0 / ((k ** 4.0d0) * (t_m / (l ** 2.0d0)))
else
tmp = 2.0d0 / ((2.0d0 * k) * ((k * (t_m ** 3.0d0)) / (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 <= 5.5e-104) {
tmp = 2.0 / (Math.pow(k, 4.0) * (t_m / Math.pow(l, 2.0)));
} else {
tmp = 2.0 / ((2.0 * k) * ((k * Math.pow(t_m, 3.0)) / Math.pow(l, 2.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 5.5e-104: tmp = 2.0 / (math.pow(k, 4.0) * (t_m / math.pow(l, 2.0))) else: tmp = 2.0 / ((2.0 * k) * ((k * math.pow(t_m, 3.0)) / math.pow(l, 2.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 5.5e-104) tmp = Float64(2.0 / Float64((k ^ 4.0) * Float64(t_m / (l ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(Float64(k * (t_m ^ 3.0)) / (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 <= 5.5e-104) tmp = 2.0 / ((k ^ 4.0) * (t_m / (l ^ 2.0))); else tmp = 2.0 / ((2.0 * k) * ((k * (t_m ^ 3.0)) / (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, 5.5e-104], N[(2.0 / N[(N[Power[k, 4.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[(k * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 5.5 \cdot 10^{-104}:\\
\;\;\;\;\frac{2}{{k}^{4} \cdot \frac{t\_m}{{\ell}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \frac{k \cdot {t\_m}^{3}}{{\ell}^{2}}}\\
\end{array}
\end{array}
if t < 5.4999999999999998e-104Initial program 45.4%
Simplified45.4%
Taylor expanded in t around 0 62.6%
Taylor expanded in k around 0 49.7%
associate-/l*50.0%
Simplified50.0%
if 5.4999999999999998e-104 < t Initial program 61.1%
Simplified61.1%
add-cube-cbrt61.1%
pow361.1%
associate-/r*68.5%
*-commutative68.5%
cbrt-prod68.4%
associate-/r*61.0%
cbrt-div62.2%
rem-cbrt-cube67.0%
cbrt-prod82.6%
pow282.6%
Applied egg-rr82.6%
Taylor expanded in k around 0 66.3%
Taylor expanded in k around 0 59.0%
Final simplification52.9%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.02e-86)
(/ 2.0 (* (pow k 4.0) (/ t_m (pow l 2.0))))
(/ 2.0 (* (* (* (pow t_m 2.0) (/ 1.0 l)) (/ t_m l)) (* 2.0 (* k k)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.02e-86) {
tmp = 2.0 / (pow(k, 4.0) * (t_m / pow(l, 2.0)));
} else {
tmp = 2.0 / (((pow(t_m, 2.0) * (1.0 / l)) * (t_m / l)) * (2.0 * (k * k)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1.02d-86) then
tmp = 2.0d0 / ((k ** 4.0d0) * (t_m / (l ** 2.0d0)))
else
tmp = 2.0d0 / ((((t_m ** 2.0d0) * (1.0d0 / l)) * (t_m / l)) * (2.0d0 * (k * k)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.02e-86) {
tmp = 2.0 / (Math.pow(k, 4.0) * (t_m / Math.pow(l, 2.0)));
} else {
tmp = 2.0 / (((Math.pow(t_m, 2.0) * (1.0 / l)) * (t_m / l)) * (2.0 * (k * k)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 1.02e-86: tmp = 2.0 / (math.pow(k, 4.0) * (t_m / math.pow(l, 2.0))) else: tmp = 2.0 / (((math.pow(t_m, 2.0) * (1.0 / l)) * (t_m / l)) * (2.0 * (k * k))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.02e-86) tmp = Float64(2.0 / Float64((k ^ 4.0) * Float64(t_m / (l ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 2.0) * Float64(1.0 / l)) * Float64(t_m / l)) * Float64(2.0 * Float64(k * k)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 1.02e-86) tmp = 2.0 / ((k ^ 4.0) * (t_m / (l ^ 2.0))); else tmp = 2.0 / ((((t_m ^ 2.0) * (1.0 / l)) * (t_m / l)) * (2.0 * (k * k))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.02e-86], N[(2.0 / N[(N[Power[k, 4.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(1.0 / l), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.02 \cdot 10^{-86}:\\
\;\;\;\;\frac{2}{{k}^{4} \cdot \frac{t\_m}{{\ell}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left({t\_m}^{2} \cdot \frac{1}{\ell}\right) \cdot \frac{t\_m}{\ell}\right) \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\
\end{array}
\end{array}
if t < 1.02000000000000005e-86Initial program 45.5%
Simplified45.5%
Taylor expanded in t around 0 62.4%
Taylor expanded in k around 0 49.7%
associate-/l*50.0%
Simplified50.0%
if 1.02000000000000005e-86 < t Initial program 61.7%
Simplified62.9%
Taylor expanded in k around 0 55.9%
unpow254.0%
Applied egg-rr55.9%
associate-/r*55.3%
unpow355.3%
times-frac58.2%
pow258.2%
Applied egg-rr58.2%
div-inv58.2%
Applied egg-rr58.2%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 2.0 (* (* (* (pow t_m 2.0) (/ 1.0 l)) (/ t_m l)) (* 2.0 (* k k))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / (((pow(t_m, 2.0) * (1.0 / l)) * (t_m / l)) * (2.0 * (k * k))));
}
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 ** 2.0d0) * (1.0d0 / l)) * (t_m / l)) * (2.0d0 * (k * k))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / (((Math.pow(t_m, 2.0) * (1.0 / l)) * (t_m / l)) * (2.0 * (k * k))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / (((math.pow(t_m, 2.0) * (1.0 / l)) * (t_m / l)) * (2.0 * (k * k))))
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(Float64((t_m ^ 2.0) * Float64(1.0 / l)) * Float64(t_m / l)) * Float64(2.0 * Float64(k * k))))) 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 ^ 2.0) * (1.0 / l)) * (t_m / l)) * (2.0 * (k * k)))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(1.0 / l), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(k * k), $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(\left({t\_m}^{2} \cdot \frac{1}{\ell}\right) \cdot \frac{t\_m}{\ell}\right) \cdot \left(2 \cdot \left(k \cdot k\right)\right)}
\end{array}
Initial program 50.5%
Simplified53.0%
Taylor expanded in k around 0 50.8%
unpow259.8%
Applied egg-rr50.8%
associate-/r*49.1%
unpow349.0%
times-frac53.2%
pow253.2%
Applied egg-rr53.2%
div-inv53.2%
Applied egg-rr53.2%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 2.0 (* (* 2.0 (* k k)) (* (/ t_m l) (/ (* t_m t_m) l))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / ((2.0d0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64(Float64(2.0 * Float64(k * k)) * Float64(Float64(t_m / l) * Float64(Float64(t_m * t_m) / l))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l)))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $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 \frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\frac{t\_m}{\ell} \cdot \frac{t\_m \cdot t\_m}{\ell}\right)}
\end{array}
Initial program 50.5%
Simplified53.0%
Taylor expanded in k around 0 50.8%
unpow259.8%
Applied egg-rr50.8%
associate-/r*49.1%
unpow349.0%
times-frac53.2%
pow253.2%
Applied egg-rr53.2%
unpow253.2%
Applied egg-rr53.2%
Final simplification53.2%
herbie shell --seed 2024149
(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))))